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.
我正在尝试 openCL,我想知道如何将 3 分量向量 (float3) 传递给 openCL 程序?这可能真的很简单,但我无法让它工作......谢谢
float3始终存储在 16 个字节中,而不是 12 个字节中。您应该将所有float3缓冲区对齐为 16 个字节,或者简单地使用float4。在主机上,cl_float3等效于cl_float4。