Morpheus 1.0.0
Dynamic matrix type and algorithms for sparse matrices
Loading...
Searching...
No Matches
Public Types | List of all members
Morpheus::CustomBackend< Space > Struct Template Reference

A wrapper that converts a valid space into a custom backend. More...

#include <Morpheus_CustomBackend.hpp>

Public Types

using backend = CustomBackend< Space >
 The type of the custom backend.
 
using execution_space = typename Space::execution_space
 Execution space of custom backend.
 
using memory_space = typename Space::memory_space
 Memory space of the custom backend.
 
using device_type = Device< execution_space, memory_space, backend >
 Device type of custom backend.
 

Detailed Description

template<typename Space>
struct Morpheus::CustomBackend< Space >

A wrapper that converts a valid space into a custom backend.

Template Parameters
SpaceA space to be converted as a custom.
Overview
A wrapper like that is helpful if we want to distinguish algorithms that explicitly use a custom backend from the ones that we want to use a performance portable kernel and effectively keep a single source implementation.
Example
#include <Morpheus_Core.hpp>
int main(){
using exec = Kokkos::DefaultHostSpace;
Morpheus::dot<exec>(x, y, z2); // Dispatches generic implementation
using custom_back = Morpheus::CustomBackend<exec>;
Morpheus::dot<custom_back>(x, y, z1); // Dispatches custom implementation
using generic_back = Morpheus::GenericBackend<exec>;
Morpheus::dot<generic_back>(x, y, z2); // Dispatches generic implementation
}
The DenseVector container is a one-dimensional container that contains contiguous elements....
Definition: Morpheus_DenseVector.hpp:83
A wrapper that converts a valid space into a custom backend.
Definition: Morpheus_CustomBackend.hpp:75
A wrapper that converts a valid space into a generic backend.
Definition: Morpheus_GenericBackend.hpp:68

The documentation for this struct was generated from the following file: