31 #ifndef BLR_OPTIONS_HPP
32 #define BLR_OPTIONS_HPP
37 #include "dense/BLASLAPACKWrapper.hpp"
46 template<
typename real_t>
inline real_t default_BLR_rel_tol() {
49 template<
typename real_t>
inline real_t default_BLR_abs_tol() {
52 template<>
inline float default_BLR_rel_tol() {
55 template<>
inline float default_BLR_abs_tol() {
59 enum class LowRankAlgorithm { RRQR, ACA, BACA };
60 std::string
get_name(LowRankAlgorithm a);
62 enum class Admissibility { STRONG, WEAK };
63 std::string
get_name(Admissibility a);
65 enum class BLRFactorAlgorithm { RL, LL, COMB, STAR };
66 std::string
get_name(BLRFactorAlgorithm a);
68 enum class CBConstruction { COLWISE, DENSE };
69 std::string
get_name(CBConstruction a);
71 enum class CompressionKernel { HALF, FULL };
72 std::string
get_name(CompressionKernel a);
93 using real_t =
typename RealType<scalar_t>::value_type;
96 structured::StructuredOptions<scalar_t>(structured::
Type::
BLR) {
101 : structured::StructuredOptions<scalar_t>(sopts) {
105 void set_low_rank_algorithm(LowRankAlgorithm a) {
108 void set_admissibility(Admissibility adm) { adm_ = adm; }
109 void set_BACA_blocksize(
int B) {
113 void set_BLR_factor_algorithm(BLRFactorAlgorithm a) {
116 void set_CB_construction(CBConstruction a) {
117 cb_construction_ = a;
119 void set_compression_kernel(CompressionKernel a) {
123 LowRankAlgorithm low_rank_algorithm()
const {
return lr_algo_; }
124 Admissibility admissibility()
const {
return adm_; }
125 int BACA_blocksize()
const {
return BACA_blocksize_; }
126 BLRFactorAlgorithm BLR_factor_algorithm()
const {
return blr_algo_; }
127 CBConstruction CB_construction()
const {
return cb_construction_; }
128 CompressionKernel compression_kernel()
const {
return crn_krnl_; }
130 void set_from_command_line(
int argc,
const char*
const* cargv)
override;
132 void describe_options()
const override;
135 bool verbose_ =
true;
136 LowRankAlgorithm lr_algo_ = LowRankAlgorithm::RRQR;
137 int BACA_blocksize_ = 4;
138 Admissibility adm_ = Admissibility::WEAK;
139 BLRFactorAlgorithm blr_algo_ = BLRFactorAlgorithm::RL;
140 CompressionKernel crn_krnl_ = CompressionKernel::HALF;
141 CBConstruction cb_construction_ = CBConstruction::DENSE;
143 void set_defaults() {
144 this->rel_tol_ = default_BLR_rel_tol<real_t>();
145 this->abs_tol_ = default_BLR_abs_tol<real_t>();
146 this->leaf_size_ = 256;
147 this->max_rank_ = 5000;
Contains the class definition for StructuredOptions, as well as some routines to get default options,...
Class containing several options for the BLR code and data-structures.
Definition: BLROptions.hpp:85
Class containing several options for the StructuredMatrix code and data-structures.
Definition: StructuredOptions.hpp:106
Type
Definition: StructuredOptions.hpp:61
Definition: StrumpackOptions.hpp:42
std::string get_name(ReorderingStrategy method)