remove stupid transfer functions

thread
Brett 2024-08-06 02:46:54 -04:00
parent 631c67dc18
commit 19f94b14dc
4 changed files with 2 additions and 25 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.117) project(blt-gp VERSION 0.0.118)
include(CTest) include(CTest)

View File

@ -34,10 +34,6 @@ namespace blt::gp
blt::ptrdiff_t find_endpoint(blt::gp::gp_program& program, const std::vector<blt::gp::op_container_t>& container, blt::ptrdiff_t start); blt::ptrdiff_t find_endpoint(blt::gp::gp_program& program, const std::vector<blt::gp::op_container_t>& container, blt::ptrdiff_t start);
void transfer_forward(blt::gp::stack_allocator& from, blt::gp::stack_allocator& to, detail::op_iter begin, detail::op_iter end);
void transfer_backward(blt::gp::stack_allocator& from, blt::gp::stack_allocator& to, detail::op_iter begin, detail::op_iter end);
class crossover_t class crossover_t
{ {
public: public:

@ -1 +1 @@
Subproject commit 8535480ad57553e592640b98e9e005d7a4d27501 Subproject commit f9938691ecb13b7b6acb2402235015bef9d58982

View File

@ -304,23 +304,4 @@ namespace blt::gp
return index; return index;
} }
void transfer_backward(stack_allocator& from, stack_allocator& to, detail::op_iter begin, detail::op_iter end)
{
for (auto it = begin; it != end; it--)
{
if (it->is_value)
from.transfer_bytes(to, it->type_size);
}
}
void transfer_forward(stack_allocator& from, stack_allocator& to, detail::op_iter begin, detail::op_iter end)
{
// now copy back into the respective children
for (auto it = begin; it != end; it++)
{
if (it->is_value)
from.transfer_bytes(to, it->type_size);
}
}
} }