     return __int_as_float(old);
 }
 
-static inline CUDA_DEVICE float AtomicMinf(float* address, float value) {
+static inline CUDA_DEVICE float AtomicMin(float* address, float value) {
     int* address_as_int = (int*)address;
     int old = *address_as_int, assumed;
 


// Used by cub
struct real3Min {
    inline CUDA_DEVICE real3 operator()(const real3& a, const real3& b) { return Min(a, b); }
};

struct real3Max {
    inline CUDA_DEVICE real3 operator()(const real3& a, const real3& b) { return Max(a, b); }
};

// code adopted from http://stackoverflow.com/questions/17371275/implementing-max-reduce-in-cuda
// ========================================================================================
static inline CUDA_DEVICE float AtomicMaxf(float* address, float value) {
    int* address_as_int = (int*)address;
    int old = *address_as_int, assumed;


}

static inline CUDA_DEVICE void AtomicMax(real3* pointer, real3 val) {
    AtomicMax(&pointer->x, val.x);
    AtomicMax(&pointer->y, val.y);
    AtomicMax(&pointer->z, val.z);
}

static inline CUDA_DEVICE void AtomicMin(real3* pointer, real3 val) {
    AtomicMin(&pointer->x, val.x);
    AtomicMin(&pointer->y, val.y);
    AtomicMin(&pointer->z, val.z);
}
}
