View of one matrix block, const-correct via the ScalarType template parameter. CBlockView<const ScalarType> is read-only; CBlockView<ScalarType> is mutable and exposes apply<Overwrite>(f) for writing with on-the-fly quantized encoding. Evaluates to false if the block is absent from the sparsity pattern.
More...
#include <CSysMatrix.hpp>
|
| using | QuantType = std::conditional_t< std::is_const_v< ScalarType >, const int8_t, int8_t > |
| |
| using | QuantScaleType = std::conditional_t< std::is_const_v< ScalarType >, const uint8_t, uint8_t > |
| |
|
| | operator bool () const |
| | False when the block is not present in the sparsity pattern.
|
| |
| std::remove_const_t< ScalarType > | operator() (unsigned long i, unsigned long j) const |
| | Return entry (row i, col j), decoding quantization if necessary.
|
| |
| template<bool Overwrite, class F , class S = ScalarType, su2enable_if<!std::is_const_v< S > > = 0> |
| void | apply (const F &f) const |
| | Write the block from callable f(i,j). Overwrite=true overwrites (or quantizes for Q_LU_SGS off-diagonal blocks); Overwrite=false accumulates into non-quantized storage only — accumulating into quantized storage would require decode-accumulate-encode and is a silent no-op. Only enabled for mutable (non-const ScalarType) views.
|
| |
|
| ScalarType * | ptr = nullptr |
| | Full-precision block; non-null iff not quantized.
|
| |
| QuantScaleType * | qs = nullptr |
| | Per-row biased binary exponent; non-null iff quantized.
|
| |
| QuantType * | qv = nullptr |
| | Quantized values (row-major); non-null iff quantized.
|
| |
| unsigned long | nVar = 0 |
| |
template<class ScalarType>
struct CBlockView< ScalarType >
View of one matrix block, const-correct via the ScalarType template parameter. CBlockView<const ScalarType> is read-only; CBlockView<ScalarType> is mutable and exposes apply<Overwrite>(f) for writing with on-the-fly quantized encoding. Evaluates to false if the block is absent from the sparsity pattern.
◆ QuantScaleType
template<class ScalarType >
| using CBlockView< ScalarType >::QuantScaleType = std::conditional_t<std::is_const_v<ScalarType>, const uint8_t, uint8_t> |
◆ QuantType
template<class ScalarType >
| using CBlockView< ScalarType >::QuantType = std::conditional_t<std::is_const_v<ScalarType>, const int8_t, int8_t> |
◆ apply()
template<class ScalarType >
template<bool Overwrite, class F , class S = ScalarType,
su2enable_if<!std::is_const_v< S > > = 0>
| void CBlockView< ScalarType >::apply |
( |
const F & |
f | ) |
const |
|
inline |
Write the block from callable f(i,j). Overwrite=true overwrites (or quantizes for Q_LU_SGS off-diagonal blocks); Overwrite=false accumulates into non-quantized storage only — accumulating into quantized storage would require decode-accumulate-encode and is a silent no-op. Only enabled for mutable (non-const ScalarType) views.
◆ operator bool()
template<class ScalarType >
False when the block is not present in the sparsity pattern.
◆ operator()()
template<class ScalarType >
| std::remove_const_t< ScalarType > CBlockView< ScalarType >::operator() |
( |
unsigned long |
i, |
|
|
unsigned long |
j |
|
) |
| const |
|
inline |
Return entry (row i, col j), decoding quantization if necessary.
◆ nVar
template<class ScalarType >
◆ ptr
template<class ScalarType >
| ScalarType* CBlockView< ScalarType >::ptr = nullptr |
Full-precision block; non-null iff not quantized.
◆ qs
template<class ScalarType >
Per-row biased binary exponent; non-null iff quantized.
◆ qv
template<class ScalarType >
Quantized values (row-major); non-null iff quantized.
The documentation for this struct was generated from the following file: