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 { COLWISE, RL, LL, COMB, STAR };
66 std::string
get_name(BLRFactorAlgorithm a);
68 enum class CompressionKernel { HALF, FULL };
69 std::string
get_name(CompressionKernel a);
90 using real_t =
typename RealType<scalar_t>::value_type;
93 structured::StructuredOptions<scalar_t>(structured::
Type::
BLR) {
98 : structured::StructuredOptions<scalar_t>(sopts) {
102 void set_low_rank_algorithm(LowRankAlgorithm a) {
105 void set_admissibility(Admissibility adm) { adm_ = adm; }
106 void set_BACA_blocksize(
int B) {
110 void set_BLR_factor_algorithm(BLRFactorAlgorithm a) {
113 void set_compression_kernel(CompressionKernel a) {
117 LowRankAlgorithm low_rank_algorithm()
const {
return lr_algo_; }
118 Admissibility admissibility()
const {
return adm_; }
119 int BACA_blocksize()
const {
return BACA_blocksize_; }
120 BLRFactorAlgorithm BLR_factor_algorithm()
const {
return blr_algo_; }
121 CompressionKernel compression_kernel()
const {
return crn_krnl_; }
123 void set_from_command_line(
int argc,
const char*
const* cargv)
override;
125 void describe_options()
const override;
128 bool verbose_ =
true;
129 LowRankAlgorithm lr_algo_ = LowRankAlgorithm::RRQR;
130 int BACA_blocksize_ = 4;
131 Admissibility adm_ = Admissibility::WEAK;
132 BLRFactorAlgorithm blr_algo_ = BLRFactorAlgorithm::RL;
133 CompressionKernel crn_krnl_ = CompressionKernel::HALF;
135 void set_defaults() {
136 this->rel_tol_ = default_BLR_rel_tol<real_t>();
137 this->abs_tol_ = default_BLR_abs_tol<real_t>();
138 this->leaf_size_ = 256;
139 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:82
Class containing several options for the StructuredMatrix code and data-structures.
Definition: StructuredOptions.hpp:106
Type
Definition: StructuredOptions.hpp:61
Definition: StrumpackOptions.hpp:43
std::string get_name(ReorderingStrategy method)