|
Nektar++
|
Serial/AVX sum-factorised (SumFac) implementation of the per-block mass operator. More...
#include <LibUtilities/SimdLib/tinysimd.hpp>#include <LibUtilities/BasicUtils/Utils/UtilsKernels.hpp>#include <MultiRegions/ElmtOps/Mass/MassBlockOp.hpp>#include <MultiRegions/ElmtOps/Mass/MassBlockOpSerialAVXSumFacKernels.hpp>Go to the source code of this file.
Classes | |
| class | Nektar::MultiRegions::detail::MassBlockOpImpl< ExecSpace, Implementation, TData > |
| Device StdMat mass operator: the whole block's operation as one or two strided-batched dense matrix products on the back-end BLAS, with the Jacobian applied by a device kernel between or after them. More... | |
Namespaces | |
| namespace | Nektar |
| namespace | Nektar::MultiRegions |
| namespace | Nektar::MultiRegions::detail |
Macros | |
| #define | NEKTAR_BLOCKOP_SWITCH_CODE |
Serial/AVX sum-factorised (SumFac) implementation of the per-block mass operator.
Sum factorisation exploits the tensor-product structure of the expansion basis: instead of multiplying by a dense standard-region matrix, each stage is applied one coordinate direction at a time through the one-dimensional basis tables, which reduces both the operation count and the matrix data that must be streamed. The mass operator runs two such stages back to back per element group – the backward transform of BwdTransBlockOpSerialAVXSumFacKernels.hpp, then the inner product of IProductWRTBaseBlockOpSerialAVXSumFacKernels.hpp, which is where the quadrature weights and the Jacobian enter – and never forms the element mass matrix. The MassKernelLauncher overloads of MassBlockOpSerialAVXSumFacKernels.hpp string the two together 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 the two-level switch over modes and points (BlockOpSwitchCode.h.in, selected by the NEKTAR_BLOCKOP_SWITCH_CODE macro below) so that compile-time element sizes reach the kernels for equi-ordered blocks whose mode count lies in the configured range and whose quadrature order follows the standard relation to the mode order, falling back to a runtime-sized call, with a one-time warning, for other sizes.
Vectorisation is across elements: on the AVX execution space the element data is interleaved in groups of simd_t::width elements, and every arithmetic operation in the kernels acts on one SIMD vector holding the same point or mode of width different elements. On Serial simd_t is scalar, giving the one-element-at-a-time reference path from the same source.
This header provides the definition of detail::MassBlockOpImpl for the Serial and AVX execution spaces with the SumFac implementation tag; see MassBlockOpSerialAVXStdMat.hpp for the StdMat sibling and the note on the one-definition-per-translation-unit scheme.
Definition in file MassBlockOpSerialAVXSumFac.hpp.
| #define NEKTAR_BLOCKOP_SWITCH_CODE |
Definition at line 97 of file MassBlockOpSerialAVXSumFac.hpp.