broken
parent
c7bb4a434b
commit
2fcc8369db
|
@ -1,5 +1,5 @@
|
|||
cmake_minimum_required(VERSION 3.25)
|
||||
project(blt-gp VERSION 0.0.84)
|
||||
project(blt-gp VERSION 0.0.85)
|
||||
|
||||
include(CTest)
|
||||
|
||||
|
|
|
@ -506,7 +506,7 @@ namespace blt::gp
|
|||
|
||||
operator_storage storage;
|
||||
population_t current_pop;
|
||||
population_stats current_stats;
|
||||
population_stats current_stats {};
|
||||
population_t next_pop;
|
||||
std::atomic_uint64_t current_generation = 0;
|
||||
|
||||
|
|
|
@ -164,6 +164,7 @@ namespace blt::gp
|
|||
{
|
||||
using NO_REF_T = std::remove_cv_t<std::remove_reference_t<T>>;
|
||||
static_assert(std::is_trivially_copyable_v<NO_REF_T> && "Type must be bitwise copyable!");
|
||||
static_assert(alignof(NO_REF_T) <= MAX_ALIGNMENT && "Type must not be greater than the max alignment!");
|
||||
auto ptr = allocate_bytes<NO_REF_T>();
|
||||
head->metadata.offset = static_cast<blt::u8*>(ptr) + aligned_size<NO_REF_T>();
|
||||
new(ptr) NO_REF_T(std::forward<T>(value));
|
||||
|
@ -487,7 +488,7 @@ namespace blt::gp
|
|||
|
||||
static block* allocate_block(blt::size_t bytes)
|
||||
{
|
||||
auto size = to_nearest_page_size(bytes);
|
||||
auto size = to_nearest_page_size(bytes + sizeof(typename block::block_metadata_t));
|
||||
auto* data = std::aligned_alloc(PAGE_SIZE, size);
|
||||
//auto* data = get_allocator().allocate(size);
|
||||
new(data) block{size};
|
||||
|
|
|
@ -152,7 +152,7 @@ namespace blt::gp
|
|||
std::atomic<double> average_fitness = 0;
|
||||
std::atomic<double> best_fitness = 0;
|
||||
std::atomic<double> worst_fitness = 1;
|
||||
std::vector<double> normalized_fitness;
|
||||
std::vector<double> normalized_fitness{};
|
||||
|
||||
void clear()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue