1 #ifndef _GLUCAT_GLOBAL_H 2 #define _GLUCAT_GLOBAL_H 48 #define _GLUCAT_CTAssert(expr, msg) \ 49 namespace { struct msg { glucat::CTAssertion<(expr)> ERROR_##msg; }; } 53 template <
typename LHS_T,
typename RHS_T >
59 template <
typename T >
68 template<
bool truth_value >
88 #if (ULONG_MAX == (4294967295UL)) 89 #define _GLUCAT_BITS_PER_ULONG 32 90 #elif (ULONG_MAX == (18446744073709551615UL)) 91 #define _GLUCAT_BITS_PER_ULONG 64 92 #elif defined(__WORDSIZE) 93 #define _GLUCAT_BITS_PER_ULONG __WORDSIZE 97 _GLUCAT_CTAssert(std::numeric_limits<unsigned char>::radix == 2, CannotDetermineBitsPerChar)
100 const index_t BITS_PER_CHAR = std::numeric_limits<unsigned char>::digits;
184 template<
typename LHS_T,
typename RHS_T >
188 {
return lhs > 0? lhs % rhs : (-lhs) % rhs == 0 ? 0 : rhs - (-lhs) % rhs; }
191 #endif // _GLUCAT_GLOBAL_H
const double MS_PER_S
Timing constant: deprecated here - moved to test/timing.h.
precision_t
Precision policy.
const unsigned int DEFAULT_Products_Size_Threshold
_GLUCAT_CTAssert(std::numeric_limits< unsigned char >::radix==2, CannotDetermineBitsPerChar) const index_t BITS_PER_CHAR
If radix of unsigned char is not 2, we can't easily determine number of bits from sizeof...
const index_t BITS_PER_SET_VALUE
Number of bits in set_value_t.
const unsigned int DEFAULT_Mult_Matrix_Threshold
const unsigned int DEFAULT_Log_Max_Outer_Steps
const unsigned int DEFAULT_Sqrt_Max_Steps
static const precision_t function_precision
Precision used for exp, log and sqrt functions.
const unsigned int DEFAULT_Fast_Size_Threshold
const unsigned int DEFAULT_Inv_Fast_Dim_Threshold
const unsigned int DEFAULT_Div_Max_Steps
const precision_t DEFAULT_Function_Precision
const unsigned int DEFAULT_Log_Max_Inner_Steps
const unsigned int DEFAULT_Basis_Max_Count
int index_t
Size of index_t should be enough to represent LO, HI.
unsigned long set_value_t
Size of set_value_t should be enough to contain index_set<LO,HI>
LHS_T pos_mod(LHS_T lhs, RHS_T rhs)
Modulo function which works reliably for lhs < 0.
const index_t DEFAULT_HI
Default highest index in an index set.
const double DEFAULT_TRUNCATION
Default for truncation.