Stokhos Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
Stokhos::CooProductTensor< ValueType, ExecutionSpace, true > Class Template Reference

Specialization of CooProductTensor for packed (i,j,k) More...

#include <Stokhos_CooProductTensor.hpp>

Public Types

typedef ExecutionSpace execution_space
 
typedef execution_space::size_type size_type
 
typedef ValueType value_type
 

Public Member Functions

 ~CooProductTensor ()
 
 CooProductTensor ()
 
 CooProductTensor (const CooProductTensor &rhs)
 
CooProductTensoroperator= (const CooProductTensor &rhs)
 
KOKKOS_INLINE_FUNCTION size_type dimension () const
 Dimension of the tensor.
 
KOKKOS_INLINE_FUNCTION size_type entry_count () const
 Number of sparse entries.
 
KOKKOS_INLINE_FUNCTION void coord (const size_type entry, size_type &i, size_type &j, size_type &k) const
 Get (i,j,k) coordinates of an entry.
 
KOKKOS_INLINE_FUNCTION const value_typevalue (const size_type entry) const
 Value of an entry.
 
KOKKOS_INLINE_FUNCTION size_type num_non_zeros () const
 Number of non-zero's.
 
KOKKOS_INLINE_FUNCTION size_type num_flops () const
 Number flop's per multiply-add.
 
void print (std::ostream &os) const
 

Static Public Member Functions

template<typename OrdinalType >
static CooProductTensor create (const Stokhos::ProductBasis< OrdinalType, ValueType > &basis, const Stokhos::Sparse3Tensor< OrdinalType, ValueType > &Cijk, const Teuchos::ParameterList &params=Teuchos::ParameterList())
 

Static Public Attributes

static const size_type max_index = 1 << bits
 Maximum index storable by packed approach.
 

Private Types

typedef Kokkos::View< value_type[], execution_spacevec_type
 
typedef Kokkos::View< size_type[], execution_spacecoord_array_type
 
typedef Kokkos::View< value_type[], execution_spacevalue_array_type
 

Private Member Functions

KOKKOS_INLINE_FUNCTION void unpack (size_type ijk, size_type &i, size_type &j, size_type &k) const
 

Static Private Member Functions

static size_type pack (const size_type i, const size_type j, const size_type k)
 

Private Attributes

coord_array_type m_coord
 
value_array_type m_value
 
size_type m_dim
 
size_type m_flops
 

Static Private Attributes

static const size_type bits = (sizeof(size_type)*8) / 3
 
static const size_type mask = (1 << bits)-1
 

Detailed Description

template<typename ValueType, class ExecutionSpace>
class Stokhos::CooProductTensor< ValueType, ExecutionSpace, true >

Specialization of CooProductTensor for packed (i,j,k)

Definition at line 73 of file Stokhos_CooProductTensor.hpp.

Member Typedef Documentation

◆ execution_space

template<typename ValueType , class ExecutionSpace >
typedef ExecutionSpace Stokhos::CooProductTensor< ValueType, ExecutionSpace, true >::execution_space

Definition at line 76 of file Stokhos_CooProductTensor.hpp.

◆ size_type

template<typename ValueType , class ExecutionSpace >
typedef execution_space::size_type Stokhos::CooProductTensor< ValueType, ExecutionSpace, true >::size_type

Definition at line 77 of file Stokhos_CooProductTensor.hpp.

◆ value_type

template<typename ValueType , class ExecutionSpace >
typedef ValueType Stokhos::CooProductTensor< ValueType, ExecutionSpace, true >::value_type

Definition at line 78 of file Stokhos_CooProductTensor.hpp.

◆ vec_type

template<typename ValueType , class ExecutionSpace >
typedef Kokkos::View< value_type[], execution_space > Stokhos::CooProductTensor< ValueType, ExecutionSpace, true >::vec_type
private

Definition at line 88 of file Stokhos_CooProductTensor.hpp.

◆ coord_array_type

template<typename ValueType , class ExecutionSpace >
typedef Kokkos::View< size_type[], execution_space > Stokhos::CooProductTensor< ValueType, ExecutionSpace, true >::coord_array_type
private

Definition at line 89 of file Stokhos_CooProductTensor.hpp.

◆ value_array_type

template<typename ValueType , class ExecutionSpace >
typedef Kokkos::View< value_type[], execution_space > Stokhos::CooProductTensor< ValueType, ExecutionSpace, true >::value_array_type
private

Definition at line 90 of file Stokhos_CooProductTensor.hpp.

Constructor & Destructor Documentation

◆ ~CooProductTensor()

template<typename ValueType , class ExecutionSpace >
Stokhos::CooProductTensor< ValueType, ExecutionSpace, true >::~CooProductTensor ( )
inline

Definition at line 120 of file Stokhos_CooProductTensor.hpp.

◆ CooProductTensor() [1/2]

template<typename ValueType , class ExecutionSpace >
Stokhos::CooProductTensor< ValueType, ExecutionSpace, true >::CooProductTensor ( )
inline

Definition at line 123 of file Stokhos_CooProductTensor.hpp.

◆ CooProductTensor() [2/2]

template<typename ValueType , class ExecutionSpace >
Stokhos::CooProductTensor< ValueType, ExecutionSpace, true >::CooProductTensor ( const CooProductTensor< ValueType, ExecutionSpace, true > & rhs)
inline

Definition at line 130 of file Stokhos_CooProductTensor.hpp.

Member Function Documentation

◆ pack()

template<typename ValueType , class ExecutionSpace >
static size_type Stokhos::CooProductTensor< ValueType, ExecutionSpace, true >::pack ( const size_type i,
const size_type j,
const size_type k )
inlinestaticprivate

Definition at line 99 of file Stokhos_CooProductTensor.hpp.

◆ unpack()

template<typename ValueType , class ExecutionSpace >
KOKKOS_INLINE_FUNCTION void Stokhos::CooProductTensor< ValueType, ExecutionSpace, true >::unpack ( size_type ijk,
size_type & i,
size_type & j,
size_type & k ) const
inlineprivate

Definition at line 108 of file Stokhos_CooProductTensor.hpp.

◆ operator=()

template<typename ValueType , class ExecutionSpace >
CooProductTensor & Stokhos::CooProductTensor< ValueType, ExecutionSpace, true >::operator= ( const CooProductTensor< ValueType, ExecutionSpace, true > & rhs)
inline

Definition at line 137 of file Stokhos_CooProductTensor.hpp.

◆ dimension()

template<typename ValueType , class ExecutionSpace >
KOKKOS_INLINE_FUNCTION size_type Stokhos::CooProductTensor< ValueType, ExecutionSpace, true >::dimension ( ) const
inline

Dimension of the tensor.

Definition at line 148 of file Stokhos_CooProductTensor.hpp.

◆ entry_count()

template<typename ValueType , class ExecutionSpace >
KOKKOS_INLINE_FUNCTION size_type Stokhos::CooProductTensor< ValueType, ExecutionSpace, true >::entry_count ( ) const
inline

Number of sparse entries.

Definition at line 152 of file Stokhos_CooProductTensor.hpp.

◆ coord()

template<typename ValueType , class ExecutionSpace >
KOKKOS_INLINE_FUNCTION void Stokhos::CooProductTensor< ValueType, ExecutionSpace, true >::coord ( const size_type entry,
size_type & i,
size_type & j,
size_type & k ) const
inline

Get (i,j,k) coordinates of an entry.

Definition at line 156 of file Stokhos_CooProductTensor.hpp.

◆ value()

template<typename ValueType , class ExecutionSpace >
KOKKOS_INLINE_FUNCTION const value_type & Stokhos::CooProductTensor< ValueType, ExecutionSpace, true >::value ( const size_type entry) const
inline

Value of an entry.

Definition at line 163 of file Stokhos_CooProductTensor.hpp.

◆ num_non_zeros()

template<typename ValueType , class ExecutionSpace >
KOKKOS_INLINE_FUNCTION size_type Stokhos::CooProductTensor< ValueType, ExecutionSpace, true >::num_non_zeros ( ) const
inline

Number of non-zero's.

Definition at line 168 of file Stokhos_CooProductTensor.hpp.

◆ num_flops()

template<typename ValueType , class ExecutionSpace >
KOKKOS_INLINE_FUNCTION size_type Stokhos::CooProductTensor< ValueType, ExecutionSpace, true >::num_flops ( ) const
inline

Number flop's per multiply-add.

Definition at line 172 of file Stokhos_CooProductTensor.hpp.

◆ create()

template<typename ValueType , class ExecutionSpace >
template<typename OrdinalType >
static CooProductTensor Stokhos::CooProductTensor< ValueType, ExecutionSpace, true >::create ( const Stokhos::ProductBasis< OrdinalType, ValueType > & basis,
const Stokhos::Sparse3Tensor< OrdinalType, ValueType > & Cijk,
const Teuchos::ParameterList & params = Teuchos::ParameterList() )
inlinestatic

Definition at line 176 of file Stokhos_CooProductTensor.hpp.

◆ print()

template<typename ValueType , class ExecutionSpace >
void Stokhos::CooProductTensor< ValueType, ExecutionSpace, true >::print ( std::ostream & os) const
inline

Definition at line 255 of file Stokhos_CooProductTensor.hpp.

Member Data Documentation

◆ bits

template<typename ValueType , class ExecutionSpace >
const size_type Stokhos::CooProductTensor< ValueType, ExecutionSpace, true >::bits = (sizeof(size_type)*8) / 3
staticprivate

Definition at line 83 of file Stokhos_CooProductTensor.hpp.

◆ mask

template<typename ValueType , class ExecutionSpace >
const size_type Stokhos::CooProductTensor< ValueType, ExecutionSpace, true >::mask = (1 << bits)-1
staticprivate

Definition at line 86 of file Stokhos_CooProductTensor.hpp.

◆ m_coord

template<typename ValueType , class ExecutionSpace >
coord_array_type Stokhos::CooProductTensor< ValueType, ExecutionSpace, true >::m_coord
private

Definition at line 92 of file Stokhos_CooProductTensor.hpp.

◆ m_value

template<typename ValueType , class ExecutionSpace >
value_array_type Stokhos::CooProductTensor< ValueType, ExecutionSpace, true >::m_value
private

Definition at line 93 of file Stokhos_CooProductTensor.hpp.

◆ m_dim

template<typename ValueType , class ExecutionSpace >
size_type Stokhos::CooProductTensor< ValueType, ExecutionSpace, true >::m_dim
private

Definition at line 94 of file Stokhos_CooProductTensor.hpp.

◆ m_flops

template<typename ValueType , class ExecutionSpace >
size_type Stokhos::CooProductTensor< ValueType, ExecutionSpace, true >::m_flops
private

Definition at line 95 of file Stokhos_CooProductTensor.hpp.

◆ max_index

template<typename ValueType , class ExecutionSpace >
const size_type Stokhos::CooProductTensor< ValueType, ExecutionSpace, true >::max_index = 1 << bits
static

Maximum index storable by packed approach.

Definition at line 117 of file Stokhos_CooProductTensor.hpp.


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