Go to the documentation of this file.
9 #ifndef _MP_utilities_hpp_
10 #define _MP_utilities_hpp_
41 template<
int nbr,
class T>
42 std::vector<T>
makeVector(T i1, T i2=0, T i3=0, T i4=0, T i5=0) {
43 std::vector<T> S(nbr);
57 inline int mod(
int a,
int b) {
59 return (t>=0) ? t : t+b;
73 RowMajor(
int s1,
int s2,
int s3,
int s4,
int s5) :
75 size_(s1*s2*s3*s4*s5) {}
76 int f(
int i1=0,
int i2=0,
int i3=0,
int i4=0,
int i5=0)
const {
96 std::string
getName()
const {
return name; }
97 void setName(
const std::string& n) { name = n; }
117 if (root != h.root) {
135 if(root->count == 1) {
int mod(int a, int b)
return the strictly positive modulus of two integers
Utility class to flatten multidimensional information into single dimentional offset information.
const int outOfBound
Distinct return value on conditions where an index goes out of bounds.
virtual void operator()() const =0
const Handle & operator=(const Handle &h)
Utility for doing reference counted pointers.
std::vector< T > makeVector(T i1, T i2=0, T i3=0, T i4=0, T i5=0)
This template makes a vector of appropriate size out of the variable number of arguments.
All flopc++ code is contained within the flopc namespace.
Utility interface class for adding a string name onto a structure.
RowMajor(int s1, int s2, int s3, int s4, int s5)
int f(int i1=0, int i2=0, int i3=0, int i4=0, int i5=0) const
void setName(const std::string &n)
const T & operator->() const
std::string getName() const