test_mathop.c
Go to the documentation of this file.
00001 #include <vl/generic.h>
00002 #include <vl/mathop.h>
00003 #include <math.h>
00004 #include <float.h>
00005 
00006 int
00007 main (int argc VL_UNUSED, char** argv VL_UNUSED)
00008 {
00009   int error = 0 ;
00010 
00011   /* -----------------------------------------------------------------
00012    *                                                  vl_fast_resqrt_*
00013    * -------------------------------------------------------------- */
00014 
00015   VL_PRINTF ("%20s %10s %10s %10s\n", "func", "elaps [s]", "eval/s", "chksum") ;
00016 
00017 #define SFX f
00018 #define SFX2 FLT
00019 #define T float
00020 #define SQRT sqrtf
00021 #define ABS  fabsf
00022 #define ONE 1.0F
00023 #include "test_mathop_fast_resqrt.tc"
00024 #undef ONE
00025 #undef ABS
00026 #undef SQRT
00027 #undef T
00028 #undef SFX2
00029 #undef SFX
00030 
00031 #define SFX d
00032 #define SFX2 DBL
00033 #define T float
00034 #define SQRT sqrt
00035 #define ABS  fabs
00036 #define ONE 1.0
00037 #include "test_mathop_fast_resqrt.tc"
00038 #undef ONE
00039 #undef ABS
00040 #undef SQRT
00041 #undef T
00042 #undef SFX2
00043 #undef SFX
00044 
00045   VL_PRINTF("\n") ;
00046 
00047   /* -----------------------------------------------------------------
00048    *                                                  vl_fast_sqrt_ui*
00049    * -------------------------------------------------------------- */
00050 
00051   VL_PRINTF ("%20s %10s %10s %10s\n", "func", "elaps [s]", "eval/s", "chksum") ;
00052 
00053 #undef SFX
00054 #undef T
00055 #undef STEP
00056 #define SFX 32
00057 #define T vl_uint32
00058 #define STEP 7
00059 #include "test_mathop_fast_sqrt_ui.tc"
00060 
00061 #undef SFX
00062 #undef T
00063 #undef STEP
00064 #define SFX 16
00065 #define T vl_uint16
00066 #define STEP 0
00067 #include "test_mathop_fast_sqrt_ui.tc"
00068 
00069 #undef SFX
00070 #undef T
00071 #undef STEP
00072 #define SFX 8
00073 #define T vl_uint8
00074 #define STEP 0
00075 #include "test_mathop_fast_sqrt_ui.tc"
00076 
00077   return error ;
00078 }


libvlfeat
Author(s): Andrea Vedaldi
autogenerated on Thu Jun 6 2019 20:25:51