I tried to write a auxiliary function but i get always this error when i build the program.
:24:7: error: conflicting types for 'AddVector' float AddVector(float a, float b) ^ :19:12: note: previous implicit declaration is here float a = AddVector(b,c);
my kernel:
__kernel void square(
__global float* input,
__global float* output,
const unsigned int count)
{
//...
float b = 2.f;
float c = 4.f;
float a = AddVector(b,c);
}
float AddVector(float a, float b)
{
return a + b;
}
but when i do the same with an integer-typ it works:
__kernel void square(
__global float* input,
__global float* output,
const unsigned int count)
{
//...
int b = 2;
int c = 4;
int a = AddVector(b,c);
}
int AddVector(int a, int b)
{
return a + b;
}
what i am doing wrong?
PS: this kernel is doing nothing - its just for finding the mistake