Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
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)
是的,对于大多数 GPU,所有函数都是内联的,即使您没有指定它。
只有内核函数具有特定的返回类型,即 void。任何其他函数都可以返回任何有效的 OpenCL 类型。