Conversion Operations on Containers.
More...
|
template<typename ExecSpace , typename SourceType , typename DestinationType > |
void | Morpheus::convert (const SourceType &src, DestinationType &dst) |
| Performs a conversion operation between two containers. More...
|
|
template<typename ExecSpace , typename SourceType > |
conversion_error_e | Morpheus::convert (SourceType &src, const formats_e index) |
| Performs an in-place conversion operation of the DynamicMatrix container to the format indicated by the enum index. More...
|
|
template<typename ExecSpace , typename SourceType > |
conversion_error_e | Morpheus::convert (SourceType &src, const int index) |
| Performs an in-place conversion operation of the DynamicMatrix container to the format indicated by the index. More...
|
|
Conversion Operations on Containers.
◆ conversion_error_e
Enum values for in-place conversion status.
Enumerator |
---|
DYNAMIC_TO_PROXY | Dynamic to Proxy conversion failed.
|
PROXY_TO_DYNAMIC | Proxy to Dynamic conversion failed.
|
CONV_SUCCESS | In-place conversion successful.
|
◆ convert() [1/3]
template<typename ExecSpace , typename SourceType , typename DestinationType >
void Morpheus::convert |
( |
const SourceType & |
src, |
|
|
DestinationType & |
dst |
|
) |
| |
Performs a conversion operation between two containers.
- Template Parameters
-
ExecSpace | Execution space to run the algorithm |
SourceType | The type of the source container |
DestinationType | The type of the destination container |
- Parameters
-
src | The source container we are converting from |
dst | The destination container we are converting to |
◆ convert() [2/3]
template<typename ExecSpace , typename SourceType >
Performs an in-place conversion operation of the DynamicMatrix container to the format indicated by the enum index.
- Template Parameters
-
ExecSpace | Execution space to run the algorithm |
SourceType | The type of the source container |
- Parameters
-
src | The source container to convert |
index | The enum index of the format to convert to |
- Returns
- conversion_error_e Error code
- Note
- The src container must be a DynamicMatrix for the conversion to take place.
-
Internally the in-place conversion is achieved using a temporary CooMatrix container.
-
In case the conversion fails internally it throws an error and the state and data of the input container are maintained.
◆ convert() [3/3]
template<typename ExecSpace , typename SourceType >
Performs an in-place conversion operation of the DynamicMatrix container to the format indicated by the index.
- Template Parameters
-
ExecSpace | Execution space to run the algorithm |
SourceType | The type of the source container |
- Parameters
-
src | The source container to convert |
index | The index of the container we will be converting to |
- Returns
- conversion_error_e Error code