pre-calculate morton codes in threadpool

This commit is contained in:
2026-03-06 02:42:30 +01:00
parent c060cfd35d
commit 6ab935c9be
5 changed files with 33 additions and 15 deletions

View File

@ -2,6 +2,7 @@
#define OCTREE_HPP_
#include "util.hpp"
#include "config.hpp"
#include <array>
#include <vector>
@ -98,7 +99,9 @@ public:
[[nodiscard]] auto root() const -> const node&;
// Morton/linear octree implementation
static auto build_octree_morton(octree& t, const std::vector<Vector3>& positions) -> void;
static auto build_octree_morton(octree& t,
const std::vector<Vector3>& positions,
const std::optional<BS::thread_pool<>*>& thread_pool) -> void;
[[nodiscard]] auto calculate_force_morton(int node_idx, const Vector3& pos, int self_id) const -> Vector3;
};