summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Seibert <stan@mtrr.org>2013-02-25 16:00:45 -0500
committertlatorre <tlatorre@uchicago.edu>2021-05-09 08:42:39 -0700
commite1e5cb17df1125fcfc70a5519e3721f7e6aef8ef (patch)
tree61d9c835d2e3cc6c8517fadd17b32be6fb0f95ea
parenta73b5669aefe5612209eec02269b00b964565a5b (diff)
downloadchroma-e1e5cb17df1125fcfc70a5519e3721f7e6aef8ef.tar.gz
chroma-e1e5cb17df1125fcfc70a5519e3721f7e6aef8ef.tar.bz2
chroma-e1e5cb17df1125fcfc70a5519e3721f7e6aef8ef.zip
Fix warning about redefinition of INFINITY.
-rw-r--r--chroma/cuda/intersect.h5
1 files 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