diff options
Diffstat (limited to 'benchmarks/CUDA/WP/microclock.c')
| -rw-r--r-- | benchmarks/CUDA/WP/microclock.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/benchmarks/CUDA/WP/microclock.c b/benchmarks/CUDA/WP/microclock.c new file mode 100644 index 0000000..3cfc9d7 --- /dev/null +++ b/benchmarks/CUDA/WP/microclock.c @@ -0,0 +1,33 @@ +#ifndef CRAY +# ifdef NOUNDERSCORE +# define RSL_INTERNAL_MICROCLOCK rsl_internal_microclock +# else +# ifdef F2CSTYLE +# define RSL_INTERNAL_MICROCLOCK rsl_internal_microclock__ +# else +# define RSL_INTERNAL_MICROCLOCK rsl_internal_microclock_ +# endif +# endif +#endif +#include <sys/time.h> + +RSL_INTERNAL_MICROCLOCK () +{ + struct timeval tb ; + struct timezone tzp ; + int isec ; /* seconds */ + int usec ; /* microseconds */ + int msecs ; + gettimeofday( &tb, &tzp ) ; + isec = tb.tv_sec ; + usec = tb.tv_usec ; + msecs = 1000000 * isec + usec ; + return(msecs) ; +} + +c_pow_ ( float * a, float * b ) +{ + *a = pow( *a , *b ) ; +} + + |
