开发者

Can OpenCL inline functions return OpenCL types?

开发者 https://www.devze.com 2023-01-13 00:18 出处:网络
I know OpenCL supports inline functions, but can those functions开发者_C百科 accept and return OpenCL types?

I know OpenCL supports inline functions, but can those functions开发者_C百科 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消