diff --git a/CMakeLists.txt b/CMakeLists.txt index 4bdb84e..b3e8557 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.25) -project(image-gp-6 VERSION 0.0.16) +project(image-gp-6 VERSION 0.0.17) include(FetchContent) diff --git a/include/config.h b/include/config.h index ff483f9..348af01 100644 --- a/include/config.h +++ b/include/config.h @@ -19,23 +19,23 @@ #ifndef IMAGE_GP_6_CONFIG_H #define IMAGE_GP_6_CONFIG_H -constexpr size_t log2(size_t n) // NOLINT +inline constexpr size_t log2(size_t n) // NOLINT { return ((n < 2) ? 1 : 1 + log2(n / 2)); } -static const blt::u64 SEED = std::random_device()(); -static constexpr blt::size_t IMAGE_SIZE = 128; -static constexpr blt::size_t IMAGE_PADDING = 16; -static constexpr blt::size_t POP_SIZE = 64; -static constexpr blt::size_t CHANNELS = 3; -static constexpr blt::size_t DATA_SIZE = IMAGE_SIZE * IMAGE_SIZE; -static constexpr blt::size_t DATA_CHANNELS_SIZE = DATA_SIZE * CHANNELS; -static constexpr blt::size_t BOX_COUNT = static_cast(log2(IMAGE_SIZE / 2)); -static constexpr float THRESHOLD = 0.3; -static constexpr auto load_image = "../GSab4SWWcAA1TNR.png"; +inline const blt::u64 SEED = std::random_device()(); +inline constexpr blt::size_t IMAGE_SIZE = 128; +inline constexpr blt::size_t IMAGE_PADDING = 16; +inline constexpr blt::size_t POP_SIZE = 64; +inline constexpr blt::size_t CHANNELS = 3; +inline constexpr blt::size_t DATA_SIZE = IMAGE_SIZE * IMAGE_SIZE; +inline constexpr blt::size_t DATA_CHANNELS_SIZE = DATA_SIZE * CHANNELS; +inline constexpr blt::size_t BOX_COUNT = static_cast(log2(IMAGE_SIZE / 2)); +inline constexpr float THRESHOLD = 0.3; +inline constexpr auto load_image = "../GSab4SWWcAA1TNR.png"; -blt::gp::prog_config_t config = blt::gp::prog_config_t() +inline blt::gp::prog_config_t config = blt::gp::prog_config_t() .set_initial_min_tree_size(4) .set_initial_max_tree_size(8) .set_elite_count(2) diff --git a/lib/blt-gp b/lib/blt-gp index f62494d..3af4676 160000 --- a/lib/blt-gp +++ b/lib/blt-gp @@ -1 +1 @@ -Subproject commit f62494d7d896ec3a10266a878e644771ac84aebb +Subproject commit 3af4676c8342ab3722bc58d8f8b5414ba016aa1d