Skip to content
Snippets Groups Projects
Commit 0e087abd authored by Akash Kothari's avatar Akash Kothari
Browse files

Marked getter functions in visc-rt as constant

parent 2d4c68ab
No related branches found
No related tags found
No related merge requests found
...@@ -48,7 +48,8 @@ class DFGDepth { ...@@ -48,7 +48,8 @@ class DFGDepth {
unsigned dimLimit[3]; unsigned dimLimit[3];
unsigned dimInstance[3]; unsigned dimInstance[3];
public: public:
DFGDepth() {} DFGDepth() = default;
DFGDepth(unsigned n, unsigned dimX = 0, unsigned iX = 0, unsigned dimY = 0, unsigned iY = 0, DFGDepth(unsigned n, unsigned dimX = 0, unsigned iX = 0, unsigned dimY = 0, unsigned iY = 0,
unsigned dimZ = 0, unsigned iZ = 0) { unsigned dimZ = 0, unsigned iZ = 0) {
assert(n <= 3 && "Error! More than 3 dimensions not supported"); assert(n <= 3 && "Error! More than 3 dimensions not supported");
...@@ -60,17 +61,18 @@ class DFGDepth { ...@@ -60,17 +61,18 @@ class DFGDepth {
dimInstance[1] = iY; dimInstance[1] = iY;
dimInstance[2] = iZ; dimInstance[2] = iZ;
} }
unsigned getDimLimit(unsigned dim) {
unsigned getDimLimit(unsigned dim) const {
assert(dim <= numDim && "Error! Requested dimension limit is not specified"); assert(dim <= numDim && "Error! Requested dimension limit is not specified");
return dimLimit[dim]; return dimLimit[dim];
} }
unsigned getDimInstance(unsigned dim) { unsigned getDimInstance(unsigned dim) const {
assert(dim <= numDim && "Error! Requested dimension instance is not specified"); assert(dim <= numDim && "Error! Requested dimension instance is not specified");
return dimInstance[dim]; return dimInstance[dim];
} }
unsigned getNumDim() { unsigned getNumDim() const {
return numDim; return numDim;
} }
}; };
...@@ -97,19 +99,19 @@ public: ...@@ -97,19 +99,19 @@ public:
size(_size), loc(_loc), addr(_addr), Context(_Context) { size(_size), loc(_loc), addr(_addr), Context(_Context) {
} }
size_t getSize() { size_t getSize() const {
return size; return size;
} }
Location getLocation() { Location getLocation() const {
return loc; return loc;
} }
void* getAddress() { void* getAddress() const {
return addr; return addr;
} }
void* getContext() { void* getContext() const {
return Context; return Context;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment