Constants¶
Preprocessing Directives¶
The HighFM library can be further customized through a set of preprocessing directives, which can be specified during the installation time by passing -DCMAKE_CXX_FLAGS="-D<option>=<value>"
to cmake
.
Warning
Some directives have major effects on the library and often will break the API (Application Programming Interface) and/or ABI(Application Binary Interface) if it is defined differently than the installed library.
Variable |
Description |
Default Value |
---|---|---|
|
By default, the HighFM library uses 64-bit indexing. To use 32-bit indexing, define |
|
|
If defined, disable all runtime assertion checks. |
Not Defined |
|
Define the SIMD instruction set to use. If it is not defined, then the library will automatically determine the instruction set based on the platform. Available options: |
Automatic |
|
Define the block size when (re)allocating containers. In order to reduce the number of reallocations when changing the size of the container, all memory allocations are based on a block with a fixed number of entries. |
|
|
Define the initial workspace size (in bytes). This will be used as temporary storage. If necessary, the library will automatically expand the workspace. |
|
|
This setting forces the compiler to inline performance-critical methods. You can set this macro to |
Compiler dependant |
|
If defined, disables loop unrolling. |
Not Defined |
|
If defined, emulates 128-bit integer arithmetic operations. This can negatively impact the performance. This option will always be enabled if the platform does not natively support 128-bit integers. |
Not Defined |
Constants¶
- enum MatrixTriangularType¶
Indicate if it is an upper or lower triangular/trapezoidal matrix.
Values:
- enumerator kLower¶
- enumerator kLowerUnit¶
- enumerator kUpper¶
- enumerator kUpperUnit¶
- enum MatrixSymmetry¶
Indicate the symmetry properties of the matrix.
Values:
- enumerator kNonSymmetric¶
The matrix is non-symmetric.
- enumerator kSymmetric¶
The matrix is symmetric/hermitian.
- enum OpSide¶
Indicate the position of the matrix in the equation.
Values:
- enumerator kLeft¶
- enumerator kRight¶
- enum FinalTimeHandle¶
Define how the ODE solver will handle the last time step.
Values:
- enumerator kStepOver¶
Continue to use the same time step as before, stepping over the final time.
- enumerator kAdaptTimeStep¶
Adapt the last time step to reach the final time.
- enum SVDMethod¶
Indicate the method used to compute the SVD.
Values:
- enumerator kSVDDefault¶
Uses the default method for calculating the SVD:
kSVDDivideConquer
(Host) andkSVDPolar
(CUDA).
- enumerator kSVDQR¶
It uses the standard QR algorithm.
- enumerator kSVDDivideConquer¶
(Host only) Divide and conquer method. It is faster than
kSVDQR
, but it consumes more memory.
- enumerator kSVDPolar¶
(CUDA only) It uses the Polar decomposition for computing the SVD. It is faster than
kSVDQR
, but may present some inaccuracies when the input matrix has a singular value close to zero.
- enum PermutationDirection¶
Indicates the direction of the permutation.
Values:
- enumerator kForward¶
- enumerator kBackward¶
- enum SortOrder¶
Indicate how the entries in the container will be sorted.
Values:
- enumerator kNoOrder¶
- enumerator kAscending¶
- enumerator kDescending¶
- using DefaultLocation = Host¶
Indicate the default location of the data.
- using index_t = HIGHFM_INDEX_TYPE¶
Type used for indexing.
- static constexpr int kNone = -1¶
- static constexpr int kAuto = -2¶
Indicate that a variable will be automatically set by the library.
- static constexpr All kAll¶
Select all columns or rows of the matrix.
- static constexpr Host kHost¶
Indicate that the data is located on the host.
- static constexpr Device kDevice¶
Indicate that the data is located on the device.
- static constexpr InPlace inplace¶
Flag indicating that the operation will be done in-place, overwriting the input matrix with the factorization.