31 #include <ray_queues.h> 53 void alloc(
const uint32 n_entries)
55 m_rays.alloc(n_entries);
56 m_hits.alloc(n_entries);
57 m_weights.alloc(n_entries);
58 m_probs.alloc(n_entries);
59 m_path_weights.alloc(n_entries);
60 m_pixels.alloc(n_entries);
64 void alloc(
const uint32 n_eye_paths,
const uint32 n_light_paths,
const uint32 max_path_length)
66 const uint32 queue_size = cugar::max(n_eye_paths, n_light_paths) * 2 + n_eye_paths * (max_path_length + 1);
71 BPTQueuesView view(
const uint32 n_eye_paths,
const uint32 n_light_paths)
73 const uint32 n_rays = cugar::max(n_eye_paths, n_light_paths);
77 r.in_queue.rays = m_rays.ptr();
78 r.in_queue.hits = m_hits.ptr();
79 r.in_queue.weights = m_weights.ptr();
80 r.in_queue.probs = m_probs.ptr();
81 r.in_queue.pixels = m_pixels.ptr();
82 r.in_queue.path_weights = m_path_weights.ptr();
83 r.in_queue.size = m_counters.ptr();
85 r.scatter_queue.rays = r.in_queue.rays + n_rays;
86 r.scatter_queue.hits = r.in_queue.hits + n_rays;
87 r.scatter_queue.weights = r.in_queue.weights + n_rays;
88 r.scatter_queue.probs = r.in_queue.probs + n_rays;
89 r.scatter_queue.pixels = r.in_queue.pixels + n_rays;
90 r.scatter_queue.path_weights = r.in_queue.path_weights + n_rays;
91 r.scatter_queue.size = r.in_queue.size + 1;
93 r.shadow_queue.rays = r.scatter_queue.rays + n_rays;
94 r.shadow_queue.hits = r.scatter_queue.hits + n_rays;
95 r.shadow_queue.weights = r.scatter_queue.weights + n_rays;
96 r.shadow_queue.probs = r.scatter_queue.probs + n_rays;
97 r.shadow_queue.pixels = r.scatter_queue.pixels + n_rays;
98 r.shadow_queue.path_weights = r.scatter_queue.path_weights + n_rays;
99 r.shadow_queue.size = r.scatter_queue.size + 1;
Definition: bpt_queues.h:42
Definition: ray_queues.h:57
Definition: bpt_queues.h:51