I’m trying to do computations with double precision floats. I have figured out how to enable them - but the code will not compile if I try to use any of the built in math functions on these variables :S
See below code for an example:
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
kernel void TestAll(global write_only double* a)
{
int index = get_global_id(0);
double x, y;
x = trunc(index / pow(4, 2));
y = trunc(index / 4) - (x * 4);
a[index] = hypot(x, y);
}
If anyone could tell me how to fix / get round this issue I would be most gratefull.