With the very last l_a, the expression (li_a + 1) * len_b indexes beyond the end of the vector, and taking a pointer to that is an illegal operation.
A fix would be either passing iterators instead of pointers to std::copy (i.e. packed_table.begin()+(li_a * len_b)) or taking the data pointer of the vector and then using pointer arithmetic on that (i.e. packed_table.data()+(li_a * len_b)).
When trying to set pairwise costs table from a
std::vector
as opposed to an array, the call fails. The problem is on this line: https://github.com/dthuerck/mapmap_cpu/blob/master/mapmap/source/cost_instances/pairwise_table.impl.h#L100With the very last
l_a
, the expression(li_a + 1) * len_b
indexes beyond the end of the vector, and taking a pointer to that is an illegal operation.A fix would be either passing iterators instead of pointers to
std::copy
(i.e.packed_table.begin()+(li_a * len_b)
) or taking the data pointer of the vector and then using pointer arithmetic on that (i.e.packed_table.data()+(li_a * len_b)
).