Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.core
Commits
413e0bc6
Commit
413e0bc6
authored
Nov 24, 2015
by
Manuel Günther
Browse files
Added ccopy that takes source and target array
parent
3e531c22
Changes
1
Hide whitespace changes
Inline
Side-by-side
bob/core/include/bob.core/array_copy.h
View file @
413e0bc6
...
...
@@ -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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment