My CL program:
constant double LATTICEWEIGHTS[19] = { 1.0 / 36.0,
.....
1.0 / 36.0 };
void
computeFeq(
double density,
double3 velocity,
double* feq) {
for (int i = 0; i < 19; ++i) {
feq[i] = LATTICEWEIGHTS[i]; // Line 1
//feq[i] = 2.0 * LATTICEWEIGHTS[i]; // Line 2
}
}
__kernel void
Kernel(){
.....
double density;
double3 velocity;
double feq[19];
computeFeq(density, velocity, feq);
}
This code works.
But if I comment Line 1 and uncomment Line2, the CL_OUT_OF_RESOURCES will occur immediately.
Any ideas?
I test it with NVIDIA GTX 670M.