Skip to content
Snippets Groups Projects
Commit 46c18c91 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

rm LLData<>::convertCoordinate

parent 3115bcec
No related branches found
No related tags found
1 merge request!41various simplifications and clarifications around OutputData
......@@ -62,7 +62,6 @@ private:
void allocate(size_t rank, const int* dimensions);
void clear();
bool checkDimensions(size_t rank, const int* dimensions) const;
size_t convertCoordinate(int* coordinate) const;
void swapContents(LLData<T>& other);
T getZeroElement() const;
......@@ -228,17 +227,6 @@ template <class T> inline bool LLData<T>::checkDimensions(size_t rank, const int
[](const int& dim) -> bool { return dim > 0; });
}
template <class T> inline size_t LLData<T>::convertCoordinate(int* coordinate) const
{
size_t offset = 1;
size_t result = 0;
for (size_t i = m_rank; i > 0; --i) {
result += offset * coordinate[i - 1];
offset *= m_dims[i - 1];
}
return result;
}
template <class T> void LLData<T>::swapContents(LLData<T>& other)
{
std::swap(this->m_rank, other.m_rank);
......
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