Nektar++
Loading...
Searching...
No Matches
Namespaces
AdvectionBlockOpDeviceSumFacKernels.hpp File Reference

SumFac device kernels of the advection operator: one element per thread, with the elements of a warp interleaved lane by lane. More...

#include <LibUtilities/Backends/Backends_Device_API.hpp>
#include <LibUtilities/Backends/DeviceProperties.hpp>
#include <LibUtilities/BasicUtils/ShapeType.hpp>
#include <LibUtilities/BasicUtils/Utils/UtilsDeviceKernels.hpp>
#include <MultiRegions/ElmtOps/ElmtHelper.hpp>

Go to the source code of this file.

Namespaces

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

Detailed Description

SumFac device kernels of the advection operator: one element per thread, with the elements of a warp interleaved lane by lane.

Lane ilane of warp iwarp owns one element, and the block storage is interleaved at the warp size so the lanes of a warp read consecutive addresses. Each kernel contracts the one-dimensional derivative matrices itself and then applies, in the same pass, the collapsed-to-standard coordinate correction for simplex-type shapes, the geometric derivative factors and the dot product with the advection velocity, writing (or accumulating) scale * (V . grad u) per quadrature point.

The file provides, for each dimensionality: the per-element kernel (Advection*DSumFacKernel) and the device entry point the block operator launches (the AdvectionKernelLauncher overload for that dimension), which unpacks the size parameter, stages any collapsed-coordinate tables in shared memory, walks the block's elements with a grid stride – one grid row per component or homogeneous mode – and calls the per-element kernel. AdvectionSharedMemorySize reports how much dynamic shared memory a launch must request. The launchers are constrained to the SumFac implementation tag, so the identically named SumFacTOP launchers in AdvectionBlockOpDeviceSumFacTOPKernels.hpp are the ones that resolve when that tag is used instead.

Everything in the namespace is guarded by NEKTAR_ENABLE_DEVICE and DEVICE_COMPILE_ONLY, so it exists only in translation units compiled for a device back-end.

Definition in file AdvectionBlockOpDeviceSumFacKernels.hpp.