Mallard 0.8.0
Unstructured, GPU accelerated, high-order finite volume CFD solver
Mallard website
Loading...
Searching...
No Matches
chemistry::TeamLanes< Member > Struct Template Reference

All threads and vector lanes of a team (TeamPolicy(cells, T, V), T * V lanes) share the work of a cell. Scalar code runs on every lane with the same values; sums accumulate SUM_SHARES strided shares in index order and then the shares in order, so a team's results do not depend on its width. Needs scratch_bytes(T * V) of level-0 team scratch. More...

#include <lanes.h>

Public Member Functions

KOKKOS_INLINE_FUNCTION TeamLanes (const Member &m, const uint32_t L)
 
template<typename F >
KOKKOS_INLINE_FUNCTION void for_each (const uint32_t n, const F &f) const
 
KOKKOS_INLINE_FUNCTION void sync () const
 
template<typename F >
KOKKOS_INLINE_FUNCTION void single (const F &f) const
 
template<typename F >
KOKKOS_INLINE_FUNCTION double sum (const uint32_t n, const F &f) const
 
template<typename F >
KOKKOS_INLINE_FUNCTION double argmax_abs (const uint32_t first, const uint32_t n, const F &f, uint32_t &index) const
 

Static Public Member Functions

static KOKKOS_INLINE_FUNCTION constexpr uint32_t shares (const uint32_t L)
 
static constexpr size_t scratch_bytes (const uint32_t L)
 

Public Attributes

const Member & member
 
uint32_t lanes
 
double * partial
 
uint32_t * where
 

Static Public Attributes

static constexpr bool column_major = true
 
static constexpr bool parallel = true
 
static constexpr uint32_t SUM_SHARES = 32
 

Detailed Description

template<typename Member>
struct chemistry::TeamLanes< Member >

All threads and vector lanes of a team (TeamPolicy(cells, T, V), T * V lanes) share the work of a cell. Scalar code runs on every lane with the same values; sums accumulate SUM_SHARES strided shares in index order and then the shares in order, so a team's results do not depend on its width. Needs scratch_bytes(T * V) of level-0 team scratch.

Constructor & Destructor Documentation

◆ TeamLanes()

template<typename Member >
KOKKOS_INLINE_FUNCTION chemistry::TeamLanes< Member >::TeamLanes ( const Member &  m,
const uint32_t  L 
)
inline

Member Function Documentation

◆ argmax_abs()

template<typename Member >
template<typename F >
KOKKOS_INLINE_FUNCTION double chemistry::TeamLanes< Member >::argmax_abs ( const uint32_t  first,
const uint32_t  n,
const F &  f,
uint32_t &  index 
) const
inline

◆ for_each()

template<typename Member >
template<typename F >
KOKKOS_INLINE_FUNCTION void chemistry::TeamLanes< Member >::for_each ( const uint32_t  n,
const F &  f 
) const
inline

◆ scratch_bytes()

template<typename Member >
static constexpr size_t chemistry::TeamLanes< Member >::scratch_bytes ( const uint32_t  L)
inlinestaticconstexpr

◆ shares()

template<typename Member >
static KOKKOS_INLINE_FUNCTION constexpr uint32_t chemistry::TeamLanes< Member >::shares ( const uint32_t  L)
inlinestaticconstexpr

◆ single()

template<typename Member >
template<typename F >
KOKKOS_INLINE_FUNCTION void chemistry::TeamLanes< Member >::single ( const F &  f) const
inline

◆ sum()

template<typename Member >
template<typename F >
KOKKOS_INLINE_FUNCTION double chemistry::TeamLanes< Member >::sum ( const uint32_t  n,
const F &  f 
) const
inline

◆ sync()

template<typename Member >
KOKKOS_INLINE_FUNCTION void chemistry::TeamLanes< Member >::sync ( ) const
inline

Member Data Documentation

◆ column_major

template<typename Member >
constexpr bool chemistry::TeamLanes< Member >::column_major = true
staticconstexpr

◆ lanes

template<typename Member >
uint32_t chemistry::TeamLanes< Member >::lanes

◆ member

template<typename Member >
const Member& chemistry::TeamLanes< Member >::member

◆ parallel

template<typename Member >
constexpr bool chemistry::TeamLanes< Member >::parallel = true
staticconstexpr

◆ partial

template<typename Member >
double* chemistry::TeamLanes< Member >::partial

◆ SUM_SHARES

template<typename Member >
constexpr uint32_t chemistry::TeamLanes< Member >::SUM_SHARES = 32
staticconstexpr

◆ where

template<typename Member >
uint32_t* chemistry::TeamLanes< Member >::where

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