cnorxz/src/include/array/marray.cc.h
Christian Zimmermann 854e1a0533 slices
2022-12-06 19:34:42 +01:00

60 lines
1.1 KiB
C++

#ifndef __cxz_marray_cc_h__
#define __cxz_marray_cc_h__
#include "marray.h"
namespace CNORXZ
{
/****************
* MArray *
***************/
template <typename T>
MArray<T>::MArray(const RangePtr& range) :
ArrayBase<T>(range), mCont(range->size())
{}
template <typename T>
MArray<T>::MArray(const RangePtr& range, const Vector<T>& vec) :
ArrayBase<T>(range), mCont(vec)
{}
template <typename T>
MArray<T>::MArray(const RangePtr& range, Vector<T>&& vec) :
ArrayBase<T>(range), mCont(vec)
{}
template <typename T>
const T* MArray<T>::data() const
{
return mCont.data();
}
template <typename T>
T* MArray<T>::data()
{
return mCont.data();
}
template <typename T>
typename MArray<T>::const_iterator MArray<T>::cbegin() const
{
return const_iterator(mCont.data(), AB::mRange);
}
template <typename T>
typename MArray<T>::const_iterator MArray<T>::cend() const
{
return const_iterator(mCont.data(), AB::mRange, mCont.size());
}
template <typename T>
bool MArray<T>::isView() const
{
return false;
}
}
#endif