mem tests
parent
316f973fd8
commit
87d0a46552
|
@ -27,7 +27,7 @@ macro(compile_options target_name)
|
|||
sanitizers(${target_name})
|
||||
endmacro()
|
||||
|
||||
project(blt-gp VERSION 0.3.17)
|
||||
project(blt-gp VERSION 0.3.18)
|
||||
|
||||
include(CTest)
|
||||
|
||||
|
|
|
@ -198,7 +198,7 @@ namespace blt::gp
|
|||
|
||||
[[nodiscard]] bool return_has_ephemeral_drop() const
|
||||
{
|
||||
return detail::has_func_drop_ephemeral_v<Return>;
|
||||
return detail::has_func_drop_v<Return>;
|
||||
}
|
||||
|
||||
operator_id id = -1;
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace blt::gp
|
|||
template <typename T>
|
||||
static type make_type(const type_id id)
|
||||
{
|
||||
return type(stack_allocator::aligned_size<T>(), id, blt::type_string<T>(), detail::has_func_drop_ephemeral_v<T>);
|
||||
return type(stack_allocator::aligned_size<T>(), id, blt::type_string<T>(), detail::has_func_drop_v<T>);
|
||||
}
|
||||
|
||||
[[nodiscard]] size_t size() const
|
||||
|
|
|
@ -123,6 +123,19 @@ bool fitness_function(const tree_t& current_tree, fitness_t& fitness, size_t)
|
|||
|
||||
int main()
|
||||
{
|
||||
int silly = 53;
|
||||
int* silly_ptr = &silly;
|
||||
|
||||
blt::mem::print_bytes(std::cout, silly_ptr);
|
||||
|
||||
for (blt::size_t i = 49; i < 64; i++)
|
||||
{
|
||||
silly_ptr = reinterpret_cast<int*>(reinterpret_cast<std::uintptr_t>(silly_ptr) | 1ul << i);
|
||||
}
|
||||
|
||||
blt::mem::print_bytes(std::cout, silly_ptr);
|
||||
|
||||
return 0;
|
||||
operator_builder<context> builder{};
|
||||
builder.build(add, sub, mul, pro_div, op_sin, op_cos, op_exp, op_log, lit, op_x);
|
||||
regression.get_program().set_operations(builder.grab());
|
||||
|
|
Loading…
Reference in New Issue