 #include <thrust/device_vector.h>
 #include <thrust/pair.h>
 
-#include <cuda.h>    // for float2
 #include <stdlib.h>  // for rand()
 
 
 // This example shows how to compute a bounding box
 // for a set of points in two dimensions.
 
+struct point2d
+{
+    float x, y;
+
+    __host__ __device__
+    point2d() {}
+    
+    __host__ __device__
+    point2d(float _x, float _y) : x(_x), y(_y) {}
+};
+
 
 // bounding box type
-typedef thrust::pair<float2, float2> bbox;
+typedef thrust::pair<point2d, point2d> bbox;
 
 // reduce a pair of bounding boxes (a,b) to a bounding box containing a and b
 struct bbox_reduction

struct bbox_transformation
{
    __host__ __device__
    bbox operator()(float2 point)
    {
        return bbox(point, point);
    }

    bbox operator()(bbox a, bbox b)
    {
        // lower left corner
        point2d ll(min(a.first.x, b.first.x), min(a.first.y, b.first.y));
        
        // upper right corner
        point2d ur(max(a.second.x, b.second.x), max(a.second.y, b.second.y));

        return bbox(ll, ur);
    }
