From e1e5cb17df1125fcfc70a5519e3721f7e6aef8ef Mon Sep 17 00:00:00 2001 From: Stan Seibert Date: Mon, 25 Feb 2013 16:00:45 -0500 Subject: Fix warning about redefinition of INFINITY. --- chroma/cuda/intersect.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/chroma/cuda/intersect.h b/chroma/cuda/intersect.h index 0d4ba8a..389a94f 100644 --- a/chroma/cuda/intersect.h +++ b/chroma/cuda/intersect.h @@ -64,14 +64,15 @@ intersect_triangle(const float3 &origin, const float3 &direction, Source: Optimizing ray tracing for CUDA by Hannu Saransaari https://wiki.aalto.fi/download/attachments/40023967/gpgpu.pdf */ -#define INFINITY __int_as_float(0x7f800000) +// INFINITY is already defined elsewhere +#define CHROMA_INFINITY __int_as_float(0x7f800000) __device__ bool intersect_box(const float3 &neg_origin_inv_dir, const float3 &inv_dir, const float3 &lower_bound, const float3 &upper_bound, float& distance_to_box) { - float tmin = 0.0f, tmax = INFINITY; + float tmin = 0.0f, tmax = CHROMA_INFINITY; float t0, t1; // X -- cgit