Morpheus 1.0.0
Dynamic matrix type and algorithms for sparse matrices
Loading...
Searching...
No Matches
Functions

Copy Operations on Containers. More...

Collaboration diagram for Copy:

Functions

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...
 

Detailed Description

Copy Operations on Containers.

Function Documentation

◆ 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
SourceTypeThe type of the source container
DestinationTypeThe type of the destination container
Parameters
srcThe container we are copying from
dstThe 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
SourceTypeThe type of the source container
DestinationTypeThe type of the destination container
Parameters
srcThe type of the source container
dstThe container we are copying to
src_beginThe begining of the input/output slice
src_endThe 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
SourceTypeThe type of the source container
DestinationTypeThe type of the destination container
Parameters
srcThe type of the source container
dstThe container we are copying to
src_beginThe begining of the input slice
src_endThe end of the input slice
dst_beginThe begining of the output slice
dst_endThe 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
ExecSpaceExecution space to run the algorithm
KeyTypeThe type of the container with the keys
SourceTypeThe type of the source container
DestinationTypeThe type of the destination container
Parameters
keysThe set of keys we are copying with
srcThe type of the source container
dstThe 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.