3 #include "raytracer/cl/structs.h" 4 #include "raytracer/image_source/tree.h" 6 #include "core/callback_accumulator.h" 7 #include "core/spatial_division/voxelised_scene_data.h" 9 #include "utilities/aligned/vector.h" 15 namespace image_source {
17 util::aligned::vector<impulse<core::simulation_bands>> postprocess_branches(
18 const multitree<path_element>& tree,
19 const glm::vec3& source,
20 const glm::vec3& receiver,
21 const core::voxelised_scene_data<cl_float3,
22 core::surface<core::simulation_bands>>&
26 template <
typename It>
27 auto postprocess_branches(
30 const glm::vec3& source,
31 const glm::vec3& receiver,
32 const core::voxelised_scene_data<cl_float3,
33 core::surface<core::simulation_bands>>&
36 auto futures = util::map_to_vector(
37 b_branches, e_branches, [&](
const auto& branch) {
38 return std::async(std::launch::async, [&] {
39 return postprocess_branches(
40 branch, source, receiver, voxelised, flip_phase);
44 using value_type = decltype(
45 std::declval<
typename decltype(futures)::value_type>().
get());
49 for (
auto& fut : futures) {
50 const auto thread_results = fut.get();
51 ret.insert(ret.end(), thread_results.begin(), thread_results.end());
Definition: pressure.h:22
Definition: capsule_base.h:9