wip: name os threads
This commit is contained in:
@ -16,6 +16,7 @@
|
||||
#include "octree.hpp"
|
||||
|
||||
#ifndef WEB
|
||||
#define BS_THREAD_POOL_NATIVE_EXTENSIONS
|
||||
#include <BS_thread_pool.hpp>
|
||||
#endif
|
||||
|
||||
@ -67,7 +68,8 @@ public:
|
||||
std::vector<Spring> springs;
|
||||
|
||||
public:
|
||||
MassSpringSystem() : threads(std::thread::hardware_concurrency() - 1) {
|
||||
MassSpringSystem()
|
||||
: threads(std::thread::hardware_concurrency() - 1, SetThreadName) {
|
||||
std::cout << "Using Barnes-Hut + octree repulsion force calculation."
|
||||
<< std::endl;
|
||||
|
||||
@ -83,6 +85,8 @@ public:
|
||||
MassSpringSystem &operator=(MassSpringSystem &&move) = delete;
|
||||
|
||||
private:
|
||||
static auto SetThreadName(std::size_t idx) -> void;
|
||||
|
||||
auto BuildOctree() -> void;
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user