Copy Operations on Containers.
More...
|
template<typename SourceType , typename DestinationType > |
void | Morpheus::copy (const SourceType &src, DestinationType &dst) |
| Performs a deep copy operation between two containers. More...
|
|
template<typename SourceType , typename DestinationType > |
void | Morpheus::copy (const SourceType &src, DestinationType &dst, const typename SourceType::index_type src_begin, const typename SourceType::index_type src_end, const typename DestinationType::index_type dst_begin, const typename DestinationType::index_type dst_end) |
| Performs a sliced deep copy operation between two containers. More...
|
|
template<typename SourceType , typename DestinationType > |
void | Morpheus::copy (const SourceType &src, DestinationType &dst, const typename SourceType::index_type begin, const typename SourceType::index_type end) |
| Performs a sliced deep copy operation between two containers. More...
|
|
template<typename ExecSpace , typename KeyType , typename SourceType , typename DestinationType > |
void | Morpheus::copy_by_key (const KeyType keys, const SourceType &src, DestinationType &dst) |
| Performs an indirect copy between two containers using a set of key values. More...
|
|
Copy Operations on Containers.
◆ copy() [1/3]
template<typename SourceType , typename DestinationType >
void Morpheus::copy |
( |
const SourceType & |
src, |
|
|
DestinationType & |
dst |
|
) |
| |
Performs a deep copy operation between two containers.
- Template Parameters
-
SourceType | The type of the source container |
DestinationType | The type of the destination container |
- Parameters
-
src | The container we are copying from |
dst | The container we are copying to |
- Note
- The SourceType and DestinationType must satisfy the
is_format_compatible
or is_format_compatible_different_space
checks.
◆ copy() [2/3]
template<typename SourceType , typename DestinationType >
void Morpheus::copy |
( |
const SourceType & |
src, |
|
|
DestinationType & |
dst, |
|
|
const typename SourceType::index_type |
begin, |
|
|
const typename SourceType::index_type |
end |
|
) |
| |
Performs a sliced deep copy operation between two containers.
- Template Parameters
-
SourceType | The type of the source container |
DestinationType | The type of the destination container |
- Parameters
-
src | The type of the source container |
dst | The container we are copying to |
src_begin | The begining of the input/output slice |
src_end | The end of the input/output slice |
- Note
- Both containers must be DenseVector containers.
◆ copy() [3/3]
template<typename SourceType , typename DestinationType >
void Morpheus::copy |
( |
const SourceType & |
src, |
|
|
DestinationType & |
dst, |
|
|
const typename SourceType::index_type |
src_begin, |
|
|
const typename SourceType::index_type |
src_end, |
|
|
const typename DestinationType::index_type |
dst_begin, |
|
|
const typename DestinationType::index_type |
dst_end |
|
) |
| |
Performs a sliced deep copy operation between two containers.
- Template Parameters
-
SourceType | The type of the source container |
DestinationType | The type of the destination container |
- Parameters
-
src | The type of the source container |
dst | The container we are copying to |
src_begin | The begining of the input slice |
src_end | The end of the input slice |
dst_begin | The begining of the output slice |
dst_end | The end of the output slice |
- Note
- Both containers must be DenseVector containers.
◆ copy_by_key()
template<typename ExecSpace , typename KeyType , typename SourceType , typename DestinationType >
void Morpheus::copy_by_key |
( |
const KeyType |
keys, |
|
|
const SourceType & |
src, |
|
|
DestinationType & |
dst |
|
) |
| |
Performs an indirect copy between two containers using a set of key values.
- Template Parameters
-
ExecSpace | Execution space to run the algorithm |
KeyType | The type of the container with the keys |
SourceType | The type of the source container |
DestinationType | The type of the destination container |
- Parameters
-
keys | The set of keys we are copying with |
src | The type of the source container |
dst | The container we are copying to |
- Note
- The index used to access the key is used as the index where the value will be stored in the dst container: dst[i] = src[keys[i]];
-
All containers must be DenseVector containers.