开发者

Can OpenCL inline functions 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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜