From 64762c5acddba333f2d86c02b4df07479d98525f Mon Sep 17 00:00:00 2001 From: Evghenii Date: Mon, 18 Nov 2013 13:15:05 +0100 Subject: [PATCH] +1 --- examples_cuda/rt/rt.cu | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples_cuda/rt/rt.cu b/examples_cuda/rt/rt.cu index b7277cf6..46267941 100644 --- a/examples_cuda/rt/rt.cu +++ b/examples_cuda/rt/rt.cu @@ -2,6 +2,7 @@ #define programIndex (threadIdx.x & 31) #define taskIndex (blockIdx.x*4 + (threadIdx.x >> 5)) #define taskCount (gridDim.x*4) +#define warpIdx (threadIdx.x >> 5) #define float3 Float3 struct Float3 @@ -235,7 +236,12 @@ static inline bool BVHIntersect(const LinearBVHNode nodes[], bool hit = false; // Follow ray through BVH nodes to find primitive intersections int todoOffset = 0, nodeNum = 0; +#if 0 + __shared__ int todoX[64*4]; + volatile int * todo = &todoX[warpIdx * 64]; +#else int todo[64]; +#endif while (true) { // Check ray against BVH node