I am trying to write some size-independent code for a template class in C ++ using boost :: multi_array (although if other containers / data structures are better at this, I would be happy to hear about that).
Given the dimension, I would like to iterate over the entire range of all other dimensions, returning a 1d representation of the selected size. This is pretty simple, or at least it looks like documentation on speeding up.
What I cannot figure out how to do this is to iterate over the selected dimension across all array sizes when the array size is known at compile time.
Any tips on how to do this?
source
share