32 #ifndef STRUCTURED_OPTIONS_HPP
33 #define STRUCTURED_OPTIONS_HPP
38 #include "dense/BLASLAPACKWrapper.hpp"
41 namespace structured {
43 template<
typename real_t>
inline real_t default_structured_rel_tol() {
46 template<
typename real_t>
inline real_t default_structured_abs_tol() {
49 template<>
inline float default_structured_rel_tol() {
52 template<>
inline float default_structured_abs_tol() {
93 default:
return "unknown";
107 using real_t =
typename RealType<scalar_t>::value_type;
115 void set_rel_tol(real_t rel_tol) {
116 assert(rel_tol <= real_t(1.) && rel_tol >= real_t(0.));
119 void set_abs_tol(real_t abs_tol) {
120 assert(abs_tol >= real_t(0.));
123 void set_leaf_size(
int leaf_size) {
124 assert(leaf_size_ > 0);
125 leaf_size_ = leaf_size;
127 void set_max_rank(
int max_rank) {
128 assert(max_rank > 0);
129 max_rank_ = max_rank;
131 void set_type(
Type a) {
134 void set_verbose(
bool verbose) { verbose_ = verbose; }
136 real_t rel_tol()
const {
return rel_tol_; }
137 real_t abs_tol()
const {
return abs_tol_; }
138 int leaf_size()
const {
return leaf_size_; }
139 int max_rank()
const {
return max_rank_; }
140 Type type()
const {
return type_; }
141 bool verbose()
const {
return verbose_; }
143 virtual void set_from_command_line(
int argc,
const char*
const* cargv);
145 virtual void describe_options()
const;
149 real_t rel_tol_ = default_structured_rel_tol<real_t>();
150 real_t abs_tol_ = default_structured_abs_tol<real_t>();
151 int leaf_size_ = 128;
152 int max_rank_ = 5000;
153 bool verbose_ =
true;
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)