I know OpenCL supports inline functions, but can those functions accept and return OpenCL types?
Specifically, I am interested in something with this signature: float4 func(float4 x, float4 y)
I know OpenCL supports inline functions, but can those functions accept and return OpenCL types?
Specifically, I am interested in something with this signature: float4 func(float4 x, float4 y)
Yes, for most GPUs, all functions are inlined anyway, even if you don't specify it.
Only kernel functions has a specific return type which is void. Any other function can return any valid OpenCL type.