From 69f2911e04ffb1b19eef1fafb8c040af271f656e Mon Sep 17 00:00:00 2001 From: Tor Aamodt Date: Thu, 15 Jul 2010 18:09:46 -0800 Subject: creating branch for adding support for CUDA 3.x and Fermi [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 6829] --- benchmarks/CUDA/WP/microclock.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 benchmarks/CUDA/WP/microclock.c (limited to 'benchmarks/CUDA/WP/microclock.c') 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 + +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 ) ; +} + + -- cgit v1.3