1 #ifndef ADIAR_EXEC_POLICY_H
2 #define ADIAR_EXEC_POLICY_H
7 #include <adiar/type_traits.h>
124 static constexpr
float min_val = 0.0f;
138 return std::numeric_limits<float>::max();
145 static constexpr
float
149 return f < min_val ? min_val : f;
153 constexpr transposition_growth()
159 : _value(from_float(value))
163 operator float()
const
179 return std::numeric_limits<unsigned char>::min();
187 return std::numeric_limits<unsigned char>::max();
191 unsigned char _value;
196 : _value(std::numeric_limits<unsigned char>::
min())
205 operator unsigned char()
const
233 quantify::transposition_growth _quantify__transposition_growth ;
238 quantify::transposition_max _quantify__transposition_max ;
275 : _quantify__algorithm(qa)
282 : _quantify__transposition_growth(tg)
289 : _quantify__transposition_max(tm)
311 template <
typename T>
323 return this->_memory == ep._memory && this->_access == ep._access
324 && this->_quantify__algorithm == ep._quantify__algorithm
325 && this->_quantify__transposition_growth == ep._quantify__transposition_growth
326 && this->_quantify__transposition_max == ep._quantify__transposition_max;
335 return !(*
this == ep);
385 this->_quantify__algorithm = qa;
405 this->_quantify__transposition_growth = tg;
425 this->_quantify__transposition_max = tm;
445 exec_policy::get<exec_policy::access>()
const
447 return this->_access;
455 exec_policy::get<exec_policy::memory>()
const
457 return this->_memory;
465 exec_policy::get<exec_policy::quantify::algorithm>()
const
467 return this->_quantify__algorithm;
475 exec_policy::get<exec_policy::quantify::transposition_growth>()
const
477 return this->_quantify__transposition_growth;
485 exec_policy::get<exec_policy::quantify::transposition_max>()
const
487 return this->_quantify__transposition_max;
501 typename = enable_if<needs_conversion<A, exec_policy> && needs_conversion<B, exec_policy>>>
505 return exec_policy(a) & b;
Multiplicative value for the maximal growth of a BDD may during repeated transpostion before switchin...
Definition: exec_policy.h:122
constexpr transposition_growth(float value)
Wrap a float.
Definition: exec_policy.h:158
static constexpr transposition_growth max()
Maximal value.
Definition: exec_policy.h:136
static constexpr transposition_growth min()
Minimal value.
Definition: exec_policy.h:129
Maximum number of repeated transpositions before switching to nested sweeping.
Definition: exec_policy.h:173
constexpr transposition_max()
Default value construction.
Definition: exec_policy.h:195
constexpr transposition_max(unsigned char value)
Wrap an unsigned char
Definition: exec_policy.h:200
static constexpr transposition_max max()
Maximal value (equivalent to using the built-in heuristics based on the graph's meta information).
Definition: exec_policy.h:185
static constexpr transposition_max min()
Minimal value (equivalent to disabling repeated transpositions).
Definition: exec_policy.h:177
Strategies and settings for Adiar to use in quantify/project algorithms.
Definition: exec_policy.h:98
algorithm
to use for quantification and projection.
Definition: exec_policy.h:104
@ Nested
Definition: exec_policy.h:106
@ Singleton
Definition: exec_policy.h:108
Settings to dictate the execution of Adiar's algorithms.
Definition: exec_policy.h:35
exec_policy & set(const quantify::transposition_growth &tg)
Set the quantify strategy.
Definition: exec_policy.h:403
exec_policy(const quantify::transposition_growth &tg)
Conversion construction from quantify transposition growth value.
Definition: exec_policy.h:281
exec_policy operator&(const quantify::transposition_growth &tg) const
Create a copy with the quantify algorithm changed.
Definition: exec_policy.h:413
memory
Whether Adiar should exclusively use internal or external memory or automatically pick either type ba...
Definition: exec_policy.h:79
exec_policy operator&(const access &am) const
Create a copy with the access mode changed.
Definition: exec_policy.h:353
access
Whether Adiar should exclusively use random access or priority queues or automatically pick either wa...
Definition: exec_policy.h:55
exec_policy()=default
Default constructor with all options set to their default value.
exec_policy & operator=(const exec_policy &)=default
Copy assignment.
exec_policy & set(const quantify::algorithm &qa)
Set the quantify algorithm.
Definition: exec_policy.h:383
exec_policy(const memory &mm)
Conversion construction from memory enum.
Definition: exec_policy.h:267
exec_policy operator&(const memory &mm) const
Create a copy with the memory mode changed.
Definition: exec_policy.h:373
exec_policy & set(const access &am)
Set the access mode.
Definition: exec_policy.h:343
exec_policy(const access &am)
Conversion construction from access enum.
Definition: exec_policy.h:260
bool operator==(const exec_policy &ep) const
Check for equality of settings.
Definition: exec_policy.h:320
exec_policy & set(const quantify::transposition_max &tm)
Set the quantify strategy.
Definition: exec_policy.h:423
exec_policy(const quantify::algorithm &qa)
Conversion construction from quantify enum.
Definition: exec_policy.h:274
bool operator!=(const exec_policy &ep) const
Check for at least one mismatch in the settings.
Definition: exec_policy.h:333
exec_policy operator&(const quantify::transposition_max &tm) const
Create a copy with the quantify algorithm changed.
Definition: exec_policy.h:433
exec_policy(exec_policy &&)=default
Move constructor.
exec_policy & operator=(exec_policy &&)=default
Move assignment.
exec_policy & set(const memory &mm)
Set the memory mode.
Definition: exec_policy.h:363
exec_policy(const quantify::transposition_max &tm)
Conversion construction from quantify transposition max runs value.
Definition: exec_policy.h:288
const T & get() const
Obtain a value.
exec_policy(const exec_policy &)=default
Copy constructor.
exec_policy operator&(const quantify::algorithm &qa) const
Create a copy with the quantify algorithm changed.
Definition: exec_policy.h:393
__bdd operator&(const bdd &lhs, const bdd &rhs)
Core types.
Definition: adiar.h:40