Good evening! I am writing a high-performance application and trying to use boost to speed up complex computations.
The essence of my question: is there a way to pass an external pointer to array (like float4_ *) to a BOOST_COMPUTE_CLOSURE?
I'd like to get something like:
float4_ *normals = new float4_[NORMALS_NO];
BOOST_COMPUTE_CLOSURE(void, evalNormals, (int4_ indices), (normals), {
...
});
The documentation of
BOOST_COMPUTE_CLOSUREis slightly sparse as reported here by the library author, but some test cases show how to capturevectors andarrays. It actually works transparently, the same than with scalar.For instance, capturing
vec: