Mallard 0.8.0
Unstructured, GPU accelerated, high-order finite volume CFD solver
Mallard website
Loading...
Searching...
No Matches
chemistry::SerialLanes Struct Reference

One thread does all the work of a cell. More...

#include <lanes.h>

Public Member Functions

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
 sum_i f(i), in order.
 
template<typename F >
KOKKOS_INLINE_FUNCTION double argmax_abs (const uint32_t first, const uint32_t n, const F &f, uint32_t &index) const
 The largest |f(i)| for first <= i < n and the first i that has it.
 

Static Public Attributes

static constexpr uint32_t lanes = 1
 
static constexpr bool column_major = false
 
static constexpr bool parallel = false
 

Detailed Description

One thread does all the work of a cell.

The interface every cell kernel uses: for_each(n, f) calls f(i) for 0 <= i < n, possibly concurrently; sync() makes the writes of a for_each visible to all lanes; single(f) runs f once; sum and argmax_abs reduce in an order that depends only on the lane count. column_major selects the layout of dense matrices that suits the lanes' access.

Member Function Documentation

◆ argmax_abs()

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

The largest |f(i)| for first <= i < n and the first i that has it.

◆ for_each()

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

◆ single()

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

◆ sum()

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

sum_i f(i), in order.

◆ sync()

KOKKOS_INLINE_FUNCTION void chemistry::SerialLanes::sync ( ) const
inline

Member Data Documentation

◆ column_major

constexpr bool chemistry::SerialLanes::column_major = false
staticconstexpr

◆ lanes

constexpr uint32_t chemistry::SerialLanes::lanes = 1
staticconstexpr

◆ parallel

constexpr bool chemistry::SerialLanes::parallel = false
staticconstexpr

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