TDLS 0.2.0
Tiny Device-callable Linear Solvers
Loading...
Searching...
No Matches
options.hpp File Reference

Shared vocabulary and conventions of the solver families. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TDLS_LAYOUT_INDEX(r, c, dim)
 Flat index of matrix element (r, c) under the configured layout: r * dim + c row-major, c * dim + r column-major.
 

Enumerations

enum class  tdls::Schedule { RightLooking , LeftLooking }
 Elimination schedule of a factorization. More...
 
enum class  tdls::MatrixLayout { RowMajor , ColMajor }
 Memory layout of a dense matrix. More...
 

Detailed Description

Shared vocabulary and conventions of the solver families.

Author
Tristan Chenaille

Knob types shared by the configuration of every solver family: the elimination schedule of a factorization and the memory layout of a dense matrix. Each family configuration carries its own members of these types.

The families also share one calling convention. Every operand is a raw pointer pre-offset by the caller plus one runtime element stride, which covers the AoS, SoA and AoSoA batch layouts alike. Offsets are computed in 32-bit arithmetic: the flat element index of an object (N*N for a matrix) must stay below 2^31 and every element offset, index times stride, below 2^32. Residency template booleans, where a solver offers them, describe what the passed buffers are and carry no default. Factorizing entry points come in counting and diagnostics-free overloads, the latter compiling the diagnostics out entirely.

Macro Definition Documentation

◆ TDLS_LAYOUT_INDEX

#define TDLS_LAYOUT_INDEX ( r,
c,
dim )
Value:
(Config.layout == tdls::MatrixLayout::RowMajor ? unsigned((r) * (dim) + (c)) \
: unsigned((c) * (dim) + (r)))

Flat index of matrix element (r, c) under the configured layout: r * dim + c row-major, c * dim + r column-major.

Expands inside solver member functions, where a constexpr Config value carrying a layout member is in scope.

Enumeration Type Documentation

◆ MatrixLayout

enum class tdls::MatrixLayout
strong

Memory layout of a dense matrix.

Enumerator
RowMajor 

Element (r, c) at flat index r * N + c, the TFEL convention.

ColMajor 

Element (r, c) at flat index c * N + r.

◆ Schedule

enum class tdls::Schedule
strong

Elimination schedule of a factorization.

Enumerator
RightLooking 

Factor the diagonal block, push updates into the trailing matrix.

LeftLooking 

Pull updates from prior blocks when a block is visited.