Cabana 0.8.0-dev
 
Loading...
Searching...
No Matches
Cabana::Grid::ArrayOp::DotFunctor< ViewType, NumSpaceDim > Struct Template Reference

Dot product functor. More...

#include <Cabana_Grid_Array.hpp>

Public Types

typedef ViewType::value_type value_type[]
 Value type.
 
typedef ViewType::size_type size_type
 Size type.
 

Public Member Functions

 DotFunctor (const ViewType &a, const ViewType &b)
 Constructor.
 
template<std::size_t NSD = num_space_dim>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 3==NSD, void > operator() (const size_type i, const size_type j, const size_type k, const size_type l, value_type sum) const
 3d dot product operation.
 
template<std::size_t NSD = num_space_dim>
KOKKOS_INLINE_FUNCTION std::enable_if_t< 2==NSD, void > operator() (const size_type i, const size_type j, const size_type l, value_type sum) const
 2d dot product operation.
 
KOKKOS_INLINE_FUNCTION void join (value_type dst, const value_type src) const
 Join operation.
 
KOKKOS_INLINE_FUNCTION void join (volatile value_type dst, const volatile value_type src) const
 Join operation.
 
KOKKOS_INLINE_FUNCTION void init (value_type sum) const
 Zero initialization.
 

Public Attributes

size_type value_count
 Size of the array.
 
ViewType _a
 The first array in the dot product.
 
ViewType _b
 The second array in the dot product.
 

Static Public Attributes

static constexpr std::size_t num_space_dim = NumSpaceDim
 Spatial dimension.
 

Detailed Description

template<class ViewType, std::size_t NumSpaceDim>
struct Cabana::Grid::ArrayOp::DotFunctor< ViewType, NumSpaceDim >

Dot product functor.


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