Compadre  1.5.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
Compadre::SubviewND< T, T2, T3 > Struct Template Reference

Creates 1D subviews of data from a 2D view, generally constructed with CreateNDSliceOnDeviceView. More...

Detailed Description

template<typename T, typename T2, typename T3 = void>
struct Compadre::SubviewND< T, T2, T3 >

Creates 1D subviews of data from a 2D view, generally constructed with CreateNDSliceOnDeviceView.

Definition at line 20 of file Compadre_Evaluator.hpp.

#include <Compadre_Evaluator.hpp>

Public Member Functions

 SubviewND (T data_in, T2 data_original_view, bool scalar_as_vector_if_needed)
 
auto get1DView (const int column_num) -> decltype(Kokkos::subview(_data_in, Kokkos::ALL, column_num))
 
auto get2DView (const int column_num, const int block_size) -> decltype(Kokkos::subview(_data_in, Kokkos::ALL, Kokkos::make_pair(column_num *block_size,(column_num+1)*block_size)))
 
T2 copyToAndReturnOriginalView ()
 

Public Attributes

_data_in
 
T2 _data_original_view
 
bool _scalar_as_vector_if_needed
 

Constructor & Destructor Documentation

template<typename T , typename T2 , typename T3 = void>
Compadre::SubviewND< T, T2, T3 >::SubviewND ( data_in,
T2  data_original_view,
bool  scalar_as_vector_if_needed 
)
inline

Definition at line 26 of file Compadre_Evaluator.hpp.

Member Function Documentation

template<typename T , typename T2 , typename T3 = void>
T2 Compadre::SubviewND< T, T2, T3 >::copyToAndReturnOriginalView ( )
inline

Definition at line 57 of file Compadre_Evaluator.hpp.

template<typename T , typename T2 , typename T3 = void>
auto Compadre::SubviewND< T, T2, T3 >::get1DView ( const int  column_num) -> decltype(Kokkos::subview(_data_in, Kokkos::ALL, column_num))
inline

Definition at line 32 of file Compadre_Evaluator.hpp.

template<typename T , typename T2 , typename T3 = void>
auto Compadre::SubviewND< T, T2, T3 >::get2DView ( const int  column_num,
const int  block_size 
) -> decltype(Kokkos::subview(_data_in, Kokkos::ALL, Kokkos::make_pair(column_num*block_size, (column_num+1)*block_size)))
inline

Definition at line 43 of file Compadre_Evaluator.hpp.

Member Data Documentation

template<typename T , typename T2 , typename T3 = void>
T Compadre::SubviewND< T, T2, T3 >::_data_in

Definition at line 22 of file Compadre_Evaluator.hpp.

template<typename T , typename T2 , typename T3 = void>
T2 Compadre::SubviewND< T, T2, T3 >::_data_original_view

Definition at line 23 of file Compadre_Evaluator.hpp.

template<typename T , typename T2 , typename T3 = void>
bool Compadre::SubviewND< T, T2, T3 >::_scalar_as_vector_if_needed

Definition at line 24 of file Compadre_Evaluator.hpp.


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