update flags again
This commit is contained in:
@ -3,8 +3,9 @@
|
||||
|
||||
#include <raylib.h>
|
||||
|
||||
// #define WEB // Disables multithreading
|
||||
// #define TRACY // Enable tracy profiling support
|
||||
#define THREADPOOL // Enable physics threadpool
|
||||
#define TRACY // Enable tracy profiling support
|
||||
#define BACKWARD // Enable pretty stack traces
|
||||
|
||||
// Window
|
||||
constexpr int INITIAL_WIDTH = 800;
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
#include <atomic>
|
||||
#include <condition_variable>
|
||||
#include <cstddef>
|
||||
#include <iostream>
|
||||
#include <mutex>
|
||||
#include <queue>
|
||||
#include <raylib.h>
|
||||
@ -15,7 +16,7 @@
|
||||
#include <variant>
|
||||
#include <vector>
|
||||
|
||||
#ifndef WEB
|
||||
#ifdef THREADPOOL
|
||||
#define BS_THREAD_POOL_NATIVE_EXTENSIONS
|
||||
#include <BS_thread_pool.hpp>
|
||||
#endif
|
||||
@ -62,7 +63,7 @@ class MassSpringSystem {
|
||||
private:
|
||||
Octree octree;
|
||||
|
||||
#ifndef WEB
|
||||
#ifdef THREADPOOL
|
||||
BS::thread_pool<BS::tp::none> threads;
|
||||
#endif
|
||||
|
||||
@ -73,11 +74,14 @@ public:
|
||||
|
||||
public:
|
||||
MassSpringSystem()
|
||||
: threads(std::thread::hardware_concurrency() - 1, SetThreadName) {
|
||||
#ifdef THREADPOOL
|
||||
: threads(std::thread::hardware_concurrency() - 1, SetThreadName)
|
||||
#endif
|
||||
{
|
||||
std::cout << "Using Barnes-Hut + octree repulsion force calculation."
|
||||
<< std::endl;
|
||||
|
||||
#ifndef WEB
|
||||
#ifdef THREADPOOL
|
||||
std::cout << "Thread-Pool: " << threads.get_thread_count() << " threads."
|
||||
<< std::endl;
|
||||
#endif
|
||||
@ -89,7 +93,9 @@ public:
|
||||
MassSpringSystem &operator=(MassSpringSystem &&move) = delete;
|
||||
|
||||
private:
|
||||
#ifdef THREADPOOL
|
||||
static auto SetThreadName(std::size_t idx) -> void;
|
||||
#endif
|
||||
|
||||
auto BuildOctree() -> void;
|
||||
|
||||
|
||||
@ -204,14 +204,12 @@ inline auto state_new_century_wc(const State &state) -> bool {
|
||||
static std::vector<StateGenerator> generators{
|
||||
state_simple_1r, state_simple_2r, state_simple_3r, state_complex_1r,
|
||||
state_complex_2r, state_complex_3r, state_complex_4f, state_complex_5r,
|
||||
state_complex_6r, state_klotski, state_century, state_super_century,
|
||||
state_new_century};
|
||||
state_complex_6r, state_klotski, state_century, state_super_century};
|
||||
|
||||
static std::vector<WinCondition> win_conditions{
|
||||
state_simple_1r_wc, state_simple_2r_wc, state_simple_3r_wc,
|
||||
state_complex_1r_wc, state_complex_2r_wc, state_complex_3r_wc,
|
||||
state_complex_4f_wc, state_complex_5r_wc, state_complex_6r_wc,
|
||||
state_klotski_wc, state_century_wc, state_super_century_wc,
|
||||
state_new_century_wc};
|
||||
state_klotski_wc, state_century_wc, state_super_century_wc};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user