|
1 | 1 | #include "openmc/event.h" |
| 2 | + |
2 | 3 | #include "openmc/material.h" |
3 | 4 | #include "openmc/simulation.h" |
4 | 5 | #include "openmc/timer.h" |
@@ -73,17 +74,17 @@ void process_calculate_xs_events(SharedArray<EventQueueItem>& queue) |
73 | 74 | { |
74 | 75 | simulation::time_event_calculate_xs.start(); |
75 | 76 |
|
76 | | - // TODO: If using C++17, perform a parallel sort of the queue |
77 | | - // by particle type, material type, and then energy, in order to |
78 | | - // improve cache locality and reduce thread divergence on GPU. Prior |
79 | | - // to C++17, std::sort is a serial only operation, which in this case |
80 | | - // makes it too slow to be practical for most test problems. |
| 77 | + // TODO: If using C++17, we could perform a parallel sort of the queue by |
| 78 | + // particle type, material type, and then energy, in order to improve cache |
| 79 | + // locality and reduce thread divergence on GPU. However, the parallel |
| 80 | + // algorithms typically require linking against an additional library (Intel |
| 81 | + // TBB). Prior to C++17, std::sort is a serial only operation, which in this |
| 82 | + // case makes it too slow to be practical for most test problems. |
81 | 83 | // |
82 | 84 | // std::sort(std::execution::par_unseq, queue.data(), queue.data() + |
83 | 85 | // queue.size()); |
84 | 86 |
|
85 | 87 | int64_t offset = simulation::advance_particle_queue.size(); |
86 | | - ; |
87 | 88 |
|
88 | 89 | #pragma omp parallel for schedule(runtime) |
89 | 90 | for (int64_t i = 0; i < queue.size(); i++) { |
|
0 commit comments