Hello ,
I am using the fftwf_complex data type in my codes.
Now, I have a kernel where I want to do:
for ( int i = 0; i < N; i++ )
{
crealf( ouMean[ GlobalIdx ] ) = sqrtf( crealf( Data ) * crealf( Data ) + cimagf( Data ) * cimagf( Data ) - crealf ( ouMean[ GlobalIdx ] ) ) / (i + 1);
}
And I am receiving:
argument of type "const complex_float_t *" is incompatible with parameter of type "float __complex__"
expression must be a modifiable lvalue
no suitable conversion function from "cuFloatComplex" to "float __complex__" exists
If I use:
cuCrealf( ouMean[ GlobalIdx ] ) = sqrtf( cuCrealf( Data ) * cuCrealf( Data ) + cuCimagf( Data ) * cuCimagf( Data ) - cuCrealf ( ouMean[ GlobalIdx ] ) ) / (i + 1);
I receive:
no suitable constructor exists to convert from "const complex_float_t *const" to "float2"
expression must be a modifiable lvalue
How can I overcome this problem?
Thanks!