BioCMAMC-ST
KokkosEigen::KokkosEigen2D< data_type, layout, exec, args > Class Template Reference

Wraps a Kokkos 2D View as an Eigen matrix map. More...

#include <kokkos_eigen.hpp>

Public Types

using eigen_map_type = Eigen::Map<eigen_mat_type>
 < map over raw data type
using view_layout = layout
using float_type = data_type
 underlying host view
using host_view_type = view_type::t_host
 underlying device view
using device_view_type = view_type::t_dev
 underlying const device view
using const_device_view_type = view_type::t_dev_const

Public Member Functions

 KokkosEigen2D (std::string label, std::size_t n, std::size_t m)
 Allocates Object of shape (n x m) on host and device.
 KokkosEigen2D ()
KokkosEigen2Doperator= (const KokkosEigen2D &)=delete
KokkosEigen2Doperator= (KokkosEigen2D &&rhs) noexcept=delete
 KokkosEigen2D (KokkosEigen2D &&)=delete
 KokkosEigen2D (const KokkosEigen2D &)=delete
 ~KokkosEigen2D ()=default
eigen_map_typeeigen ()
const eigen_map_typecst_eigen () const
view_typeview ()
host_view_type host_view ()
const_device_view_type device_view_cst () const
device_view_type device_view () const
std::size_t n_row () const
std::size_t n_col () const
void host_to_device_sync ()
void device_to_host_sync ()
eigen_array_type as_array ()
eigen_array_type as_array () const
void set_host (std::size_t i_r, std::size_t i_c, data_type &&value)
data_type & get_host (std::size_t i_r, std::size_t i_c)
std::span< const double > get_span () const
std::span< double > get_span ()

Private Types

using view_type = Kokkos::DualView<data_type**, layout, exec, args>
 dynamic Eigen matrix type
using eigen_mat_type
 dynamic Eigen array type
using eigen_array_type

Private Member Functions

template<typename m_type>
auto get_map ()

Private Attributes

view_type m_view
 Kokkos DualView storage.
eigen_map_type m_eigen_map
 Eigen map pointing to host data.

Static Private Attributes

static constexpr auto eigen_layout = get_eigen_layout<layout>()
 < ColMajor or RowMajor

Detailed Description

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
class KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >

Wraps a Kokkos 2D View as an Eigen matrix map.

Template Parameters
data_typeScalar element type
layoutKokkos memory layout; defaults to LayoutLeft
execKokkos execution space; defaults to void
argsAdditional template arguments for the underlying View

Member Typedef Documentation

◆ const_device_view_type

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
using KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::const_device_view_type = view_type::t_dev_const

◆ device_view_type

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
using KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::device_view_type = view_type::t_dev

underlying const device view

◆ eigen_array_type

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
using KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::eigen_array_type
private
Initial value:
Eigen::Array<data_type,
static constexpr auto eigen_layout
< ColMajor or RowMajor
Definition kokkos_eigen.hpp:55
static constexpr int CompileMatrixSizeEigen
Definition kokkos_eigen.hpp:13

◆ eigen_map_type

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
using KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::eigen_map_type = Eigen::Map<eigen_mat_type>

< map over raw data type

◆ eigen_mat_type

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
using KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::eigen_mat_type
private
Initial value:

dynamic Eigen array type

◆ float_type

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
using KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::float_type = data_type

underlying host view

◆ host_view_type

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
using KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::host_view_type = view_type::t_host

underlying device view

◆ view_layout

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
using KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::view_layout = layout

◆ view_type

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
using KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::view_type = Kokkos::DualView<data_type**, layout, exec, args>
private

dynamic Eigen matrix type

Constructor & Destructor Documentation

◆ KokkosEigen2D() [1/4]

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::KokkosEigen2D ( std::string label,
std::size_t n,
std::size_t m )
inline

Allocates Object of shape (n x m) on host and device.

Parameters
labelIdentifier name for the Kokkos View.
nNumber of rows.
mNumber of columns.

◆ KokkosEigen2D() [2/4]

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::KokkosEigen2D ( )
inline

◆ KokkosEigen2D() [3/4]

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::KokkosEigen2D ( KokkosEigen2D< data_type, layout, exec, args > && )
delete

◆ KokkosEigen2D() [4/4]

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::KokkosEigen2D ( const KokkosEigen2D< data_type, layout, exec, args > & )
delete

◆ ~KokkosEigen2D()

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::~KokkosEigen2D ( )
default

Member Function Documentation

◆ as_array() [1/2]

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
eigen_array_type KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::as_array ( )
inline

◆ as_array() [2/2]

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
eigen_array_type KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::as_array ( ) const
inline

◆ cst_eigen()

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
const eigen_map_type & KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::cst_eigen ( ) const
inline

◆ device_to_host_sync()

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
void KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::device_to_host_sync ( )
inline

◆ device_view()

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
device_view_type KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::device_view ( ) const
inline

◆ device_view_cst()

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
const_device_view_type KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::device_view_cst ( ) const
inline

◆ eigen()

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
eigen_map_type & KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::eigen ( )
inline

◆ get_host()

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
data_type & KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::get_host ( std::size_t i_r,
std::size_t i_c )
inline

◆ get_map()

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
template<typename m_type>
auto KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::get_map ( )
inlineprivate

◆ get_span() [1/2]

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
std::span< double > KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::get_span ( )
inline

◆ get_span() [2/2]

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
std::span< const double > KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::get_span ( ) const
inlinenodiscard

◆ host_to_device_sync()

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
void KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::host_to_device_sync ( )
inline

◆ host_view()

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
host_view_type KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::host_view ( )
inline

◆ n_col()

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
std::size_t KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::n_col ( ) const
inlinenodiscard
Here is the caller graph for this function:

◆ n_row()

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
std::size_t KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::n_row ( ) const
inlinenodiscard
Here is the caller graph for this function:

◆ operator=() [1/2]

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
KokkosEigen2D & KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::operator= ( const KokkosEigen2D< data_type, layout, exec, args > & )
delete

◆ operator=() [2/2]

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
KokkosEigen2D & KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::operator= ( KokkosEigen2D< data_type, layout, exec, args > && rhs)
deletenoexcept

◆ set_host()

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
void KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::set_host ( std::size_t i_r,
std::size_t i_c,
data_type && value )
inline

◆ view()

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
view_type & KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::view ( )
inline

Member Data Documentation

◆ eigen_layout

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
auto KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::eigen_layout = get_eigen_layout<layout>()
staticconstexprprivate

< ColMajor or RowMajor

underlying dual view type

◆ m_eigen_map

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
eigen_map_type KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::m_eigen_map
private

Eigen map pointing to host data.

◆ m_view

template<typename data_type, typename layout = Kokkos::LayoutLeft, typename exec = void, typename args = void>
view_type KokkosEigen::KokkosEigen2D< data_type, layout, exec, args >::m_view
private

Kokkos DualView storage.


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