39 #include <cugar/basic/atomics.h> 41 #include <cugar/linalg/vector.h> 46 FERMAT_HOST_DEVICE
PixelInfo(
const uint32 _packed) : packed(_packed) {}
47 FERMAT_HOST_DEVICE
PixelInfo(
const uint32 _pixel,
const uint32 _channel) : pixel(_pixel), channel(_channel) {}
64 uint32* light_path_id;
72 RayQueue offset(
const uint32 _count, uint32* _size)
const 75 r.rays = rays ? rays + _count : NULL;
76 r.hits = hits ? hits + _count : NULL;
77 r.weights = weights ? weights + _count : NULL;
78 r.probs = probs ? probs + _count : NULL;
79 r.pixels = pixels ? pixels + _count : NULL;
80 r.path_weights = path_weights ? path_weights + _count : NULL;
92 void append(
const PixelInfo pixel,
const Ray& ray,
const float4 weight,
const float p)
94 uint32 slot = append_slot();
97 weights[slot] = weight;
99 pixels[slot] = pixel.packed;
102 void append(
const PixelInfo pixel,
const Ray& ray,
const float4 weight,
const float p, float4 path_w)
104 uint32 slot = append_slot();
107 weights[slot] = weight;
109 pixels[slot] = pixel.packed;
110 path_weights[slot] = path_w;
113 void append(
const PixelInfo pixel,
const Ray& ray,
const float4 weight,
const uint32 path_id, float4 path_w)
115 uint32 slot = append_slot();
118 weights[slot] = weight;
119 light_path_id[slot] = path_id;
120 pixels[slot] = pixel.packed;
121 path_weights[slot] = path_w;
125 void warp_append(
const PixelInfo pixel,
const Ray& ray,
const float4 weight,
const float p, float4 path_w)
130 weights[slot] = weight;
132 pixels[slot] = pixel.packed;
133 path_weights[slot] = path_w;
136 void warp_append(
const PixelInfo pixel,
const Ray& ray,
const float4 weight,
const uint32 path_id, float4 path_w)
141 weights[slot] = weight;
142 light_path_id[slot] = path_id;
143 pixels[slot] = pixel.packed;
144 path_weights[slot] = path_w;
147 void warp_append(
const PixelInfo pixel,
const Ray& ray,
const float4 weight,
const float p)
152 weights[slot] = weight;
154 pixels[slot] = pixel.packed;
157 void warp_append(
const PixelInfo pixel,
const Ray& ray,
const float4 weight,
const uint32 path_id)
162 weights[slot] = weight;
163 light_path_id[slot] = path_id;
164 pixels[slot] = pixel.packed;
__device__ __forceinline__ unsigned int warp_increment(unsigned int *ptr)
Definition: warp_atomics.h:56
Definition: ray_queues.h:57
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE float atomic_add(float *value, const float op)
Definition: atomics.h:100
Definition: pathtracer_core.h:527
Define CUDA based warp adders.