Skip to content
Snippets Groups Projects
Commit 413e0bc6 authored by Manuel Günther's avatar Manuel Günther
Browse files

Added ccopy that takes source and target array

parent 3e531c22
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,17 @@ namespace bob {
return b;
}
/**
* @brief Copies blitz array 'a' into 'b' like copy() does, but resets the storage
* ordering. The shape of 'b' is adapted to that of 'a', so iterators of 'b' are invalid afterward.
*/
template <typename T, int D>
void ccopy(const blitz::Array<T,D>& a, blitz::Array<T,D>& b)
{
b.resize(a.shape());
b = a;
}
/**
* @brief Copies a std::vector of blitz arrays, making deep copies of the
* arrays.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment