Generator¶
-
template<typename CoefficientPrecision>
class VirtualGenerator¶ Define the interface for the user to give Htool a function generating dense sub-blocks of the global matrix the user wants to compress. This is done by the user implementing VirtualGenerator::copy_submatrix.
- Template Parameters:
CoefficientPrecision – Precision of the coefficients (float, double,…)
Public Functions
-
virtual void copy_submatrix(int M, int N, const int *rows, const int *cols, CoefficientPrecision *ptr) const = 0¶
Generate a dense sub-block of the global matrix the user wants to compress. Note that sub-blocks queried by Htool are potentially non-contiguous in the user’s numbering.
- Parameters:
M – [in] specifies the number of columns of the queried block
N – [in] specifies the number of rows of the queried block
rows – [in] is an integer array of size \(M\). It specifies the queried columns in the user’s numbering
cols – [in] is an integer array of size \(N\). It specifies the queried rows in the user’s numbering
ptr – [out] is a
CoefficientPrecision
precision array of size \( M\times N\). Htool already allocates and desallocates it internally, so it should not be allocated by the user.
-
inline VirtualGenerator()¶
-
VirtualGenerator(const VirtualGenerator&) = default¶
-
VirtualGenerator &operator=(const VirtualGenerator&) = default¶
-
VirtualGenerator(VirtualGenerator&&) = default¶
-
VirtualGenerator &operator=(VirtualGenerator&&) = default¶
-
inline virtual ~VirtualGenerator()¶