silyl
parent
c89e2967ba
commit
5cf1481914
|
@ -1,5 +1,5 @@
|
||||||
cmake_minimum_required(VERSION 3.25)
|
cmake_minimum_required(VERSION 3.25)
|
||||||
project(blt-gp VERSION 0.1.38)
|
project(blt-gp VERSION 0.1.39)
|
||||||
|
|
||||||
include(CTest)
|
include(CTest)
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
|
|
||||||
namespace blt::gp
|
namespace blt::gp
|
||||||
{
|
{
|
||||||
|
#ifdef BLT_TRACK_ALLOCATIONS
|
||||||
inline allocation_tracker_t tracker;
|
inline allocation_tracker_t tracker;
|
||||||
inline call_tracker_t crossover_calls;
|
inline call_tracker_t crossover_calls;
|
||||||
inline call_tracker_t mutation_calls;
|
inline call_tracker_t mutation_calls;
|
||||||
|
@ -35,6 +36,7 @@ namespace blt::gp
|
||||||
inline call_tracker_t crossover_allocations;
|
inline call_tracker_t crossover_allocations;
|
||||||
inline call_tracker_t mutation_allocations;
|
inline call_tracker_t mutation_allocations;
|
||||||
inline call_tracker_t reproduction_allocations;
|
inline call_tracker_t reproduction_allocations;
|
||||||
|
#endif
|
||||||
|
|
||||||
class gp_program;
|
class gp_program;
|
||||||
|
|
||||||
|
@ -66,9 +68,14 @@ namespace blt::gp
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
class tracked_allocator_t;
|
class tracked_allocator_t;
|
||||||
|
|
||||||
|
#ifdef BLT_TRACK_ALLOCATIONS
|
||||||
template<typename T>
|
template<typename T>
|
||||||
using tracked_vector = std::vector<T, tracked_allocator_t<T>>;
|
using tracked_vector = std::vector<T, tracked_allocator_t<T>>;
|
||||||
|
#else
|
||||||
|
template<typename T>
|
||||||
|
using tracked_vector = std::vector<T>;
|
||||||
|
#endif
|
||||||
|
|
||||||
// using operation_vector_t = tracked_vector<op_container_t>;
|
// using operation_vector_t = tracked_vector<op_container_t>;
|
||||||
// using individual_vector_t = tracked_vector<individual_t, tracked_allocator_t<individual_t>>;
|
// using individual_vector_t = tracked_vector<individual_t, tracked_allocator_t<individual_t>>;
|
||||||
|
|
Loading…
Reference in New Issue