thread_local static in wrong project

thread
Brett 2024-08-06 13:34:40 -04:00
parent 593e02b6ff
commit b40af05816
2 changed files with 6 additions and 3 deletions

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.25) cmake_minimum_required(VERSION 3.25)
project(blt-gp VERSION 0.0.120) project(blt-gp VERSION 0.0.121)
include(CTest) include(CTest)

View File

@ -80,8 +80,11 @@ namespace blt::gp
stack_allocator& c2_stack = c2.get_values(); stack_allocator& c2_stack = c2.get_values();
// we have to make a copy because we will modify the underlying storage. // we have to make a copy because we will modify the underlying storage.
std::vector<op_container_t> c1_operators; static thread_local std::vector<op_container_t> c1_operators;
std::vector<op_container_t> c2_operators; static thread_local std::vector<op_container_t> c2_operators;
c1_operators.clear();
c2_operators.clear();
for (const auto& op : blt::iterate(crossover_point_begin_itr, crossover_point_end_itr)) for (const auto& op : blt::iterate(crossover_point_begin_itr, crossover_point_end_itr))
c1_operators.push_back(op); c1_operators.push_back(op);