Hello,
I was trying to make my kernel compile, and the compiler threw this error:
C:\Users\SAMYRA~1\AppData\Local\Temp\OCL6008T5.cl", line 27: error: function
“cltocppfloat” declared implicitly
out[num] = cltocppfloat(out[num]);
Here is my kernel:
#include “clVecMath.h”
struct cppfloat4{
float x;
float y;
float z;
float w;
};
struct cppfloat4 cltocppfloat4(float4 a){
struct cppfloat4 b;
b.x = a.x;
b.y = a.y;
b.z = a.z;
b.w = a.w;
return(b);
}
float4 cppfloat4tocl(struct cppfloat4 a){
return ((float4)(a.x, a.y, a.z, a.w));
}
__kernel void helloworld(__global float4* in, __global int* multiplier, __global float4* out)
{
int num = get_global_id(0);
out[num] = rotateAxis(in[num], (float4)(1.0f, 0.0f, 0.0f, 0.0f), multiplier[num]);
out[num] = cltocppfloat(out[num]);
}
I do not see any reason while this error is thrown.
Thanks!