BOOST_COMPUTE_ADAPT_STRUCT(double3, double3, (x, y, z))
BOOST_COMPUTE_FUNCTION(bool, CompareX, (double3 a, double3 b),
{
return a.x < b.x;
});
boost::compute::vector<double> points;
...
auto it = boost::compute::min_element(points.begin(), points.end(), CompareX, queue);