akasheee

gettimeofday() does not work with AMD openCL

Discussion created by akasheee on Aug 8, 2010
Latest reply on Aug 11, 2010 by jeff_golds

Hi,

I tried to use gettimeofday() function to get timing in my OpenCL program, but it says,

hh.cpp: In function ‘int main(int, const char**)’:
hh.cpp:335: error: ‘gettimeofday’ was not declared in this scope

I included #include <sys/times.h> at the top. I am using gcc/g++ 4.4.1, Ubuntu 9.10 with AMD SDK 2.1. I could use clock() properly, but I think clock() is not accurate.

The same gettimeofday() was perfectly working when I used NVIDIA OpenCL.

If someone can suggest me I appreciate it.

 

Ashraf

Outcomes