Nektar++
Loading...
Searching...
No Matches
Classes | Namespaces | Macros
DivergenceBlockOpSerialAVXSumFac.hpp File Reference

Serial/AVX sum-factorised implementation of the block divergence. More...

#include <LibUtilities/SimdLib/tinysimd.hpp>
#include <LibUtilities/BasicUtils/Utils/UtilsKernels.hpp>
#include <MultiRegions/ElmtOps/Divergence/DivergenceBlockOp.hpp>
#include <MultiRegions/ElmtOps/Divergence/DivergenceBlockOpSerialAVXSumFacKernels.hpp>

Go to the source code of this file.

Classes

class  Nektar::MultiRegions::detail::DivergenceBlockOpImpl< ExecSpace, Implementation, TData >
 Device StdMat implementation of DivergenceBlockOp: one strided-batched BLAS GEMM forming every reference-direction derivative of every component of the block, followed by one derivative-factor contraction per component accumulating into a single output component. More...
 

Namespaces

namespace  Nektar
 
namespace  Nektar::MultiRegions
 
namespace  Nektar::MultiRegions::detail
 

Macros

#define NEKTAR_BLOCKOP_SWITCH_1DCOORDS
 

Detailed Description

Serial/AVX sum-factorised implementation of the block divergence.

One template serves both CPU execution spaces: simd_t resolves to tinysimd::scalarT<TData> for Serial and tinysimd::simd<TData> for AVX (see simd_type_if), so the same code runs one element at a time or one SIMD group of elements in lock-step, with each vector lane owning one element. Instead of the dense standard-region matrices of the StdMat path, each vector component is differentiated through the tensor-product structure of the basis by the PhysDeriv kernels, which the DivergenceKernelLauncher overloads in DivergenceBlockOpSerialAVXSumFacKernels.hpp chain component by component for one element group.

v_Apply() dispatches on the block's shape type to the ShapeBlock() specialisations, whose definitions CMake generates from LibUtilities/BasicUtils/Switch/BlockOpShapeBlock.cpp.in, one translation unit per shape: each wraps OperatorND() in a switch over the element sizes so that compile-time constants reach the kernels, falling back to a runtime-sized call for other sizes.

This header provides the definition of detail::DivergenceBlockOpImpl for the Serial and AVX execution spaces with the SumFac implementation tag; see DivergenceBlockOpSerialAVXStdMat.hpp for the StdMat sibling.

Note
CMake includes this header into the registration translation units it generates for this operator, execution space and implementation; it should not normally be included by any other translation unit. Other code goes through DivergenceOp.hpp and the operator factory: including this header directly instantiates the whole template set in that translation unit, which is what the generated sources exist to avoid.

Definition in file DivergenceBlockOpSerialAVXSumFac.hpp.

Macro Definition Documentation

◆ NEKTAR_BLOCKOP_SWITCH_1DCOORDS

#define NEKTAR_BLOCKOP_SWITCH_1DCOORDS

Definition at line 84 of file DivergenceBlockOpSerialAVXSumFac.hpp.