更新时间:2022-06-27 02:52:46
See the bullet physics engines use of OpenCL for how to do this to a kernel.
在C ++ / C源中
In C++ / C source
#define MSTRINGIFY(A) #A
char* stringifiedSourceCL =
#include "VectorAddKernels.cl"
/ p>
In the OpenCL source
MSTRINGIFY(
__kernel void VectorAdd(__global float8* c)
{
// snipped out OpenCL code...
return;
}
);