We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
for example needs something that,
` __declspec(align(16)) struct Box_aligned { float3 v0; float3 v1; }
boost::compute::vector<Box_aligned> boxes(10, context); // and do something with values of array "boxes"
boost::compute::vector<Box_aligned> boxes(10, context);
Box_aligned bounds;
boost::compute::reduce(boxes.begin(), boxes.end(), &bounds, BoxUnion(), queue); `
where "some BinaryFunction" is somthing lika that,
struct BoxUnion { Box_aligned operator()(const Box_aligned b1, const Box_aligned b2) const { Box_aligned bounds; bounds.v0 = fmin(b1.v0, b2.v0); bounds.v1 = fmax(b1.v1, b2.v1); return bounds; } };
how to reduce such array of "Box_aligned" values ?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
for example needs something that,
`
__declspec(align(16))
struct Box_aligned {
float3 v0;
float3 v1;
}
boost::compute::vector<Box_aligned> boxes(10, context);
// and do something with values of array "boxes"
Box_aligned bounds;
boost::compute::reduce(boxes.begin(), boxes.end(), &bounds, BoxUnion(), queue);
`
where "some BinaryFunction" is somthing lika that,
struct BoxUnion {
Box_aligned operator()(const Box_aligned b1, const Box_aligned b2) const {
Box_aligned bounds;
bounds.v0 = fmin(b1.v0, b2.v0);
bounds.v1 = fmax(b1.v1, b2.v1);
return bounds;
}
};
how to reduce such array of "Box_aligned" values ?
The text was updated successfully, but these errors were encountered: