61 bool btest(
int value,
int pos);
72 int ibclr(
int value,
int pos);
73 int ibset(
int value,
int pos);
74 bool is_zero(
double value1,
double value2=0.0);
76 double mem_usage(
const bool print_usage=
false,
const std::string& prefix=
"");
80 double norm(
const Array<double>& U);
82 void print_mem(
const std::string& type,
const std::string& prefix,
const double memory_in_use,
const double memory_returned);
83 void print_stats(
const std::string& type,
const std::string& prefix,
const int allocated,
const int active);
85 bool pull_stack(
stackType& stk,
int& iVal);
89 int sign(
double value);
91 void swap(
int& value1,
int& value2);
int maxN
Maximum length of the stack.
Definition: utils.h:43
int n
Current size of stack.
Definition: utils.h:46
Vector< int > v
Values inside stack.
Definition: utils.h:49
double norm(const Vector< double > &U)
This function will compute second NORM of a vector.
Definition: utils.cpp:239
void push_stack(stackType &stk, std::initializer_list< int > values)
Push a list of values onto the stack.
Definition: utils.cpp:359
int ibset(int value, int pos)
Returns 'value' with the bit at position 'pos' set to one.
Definition: utils.cpp:166
int ibclr(int value, int pos)
Clear a bit.
Definition: utils.cpp:159
int CountBits(int n)
Count the number of bits in an int.
Definition: utils.cpp:54