2022-09-09 19:41:43 +02:00
|
|
|
|
2022-09-15 16:45:45 +02:00
|
|
|
#ifndef __cxz_darray_cc_h__
|
|
|
|
#define __cxz_darray_cc_h__
|
|
|
|
|
|
|
|
#include "darray.h"
|
2022-09-09 19:41:43 +02:00
|
|
|
|
|
|
|
namespace CNORXZ
|
|
|
|
{
|
|
|
|
/****************
|
|
|
|
* DArray *
|
|
|
|
***************/
|
|
|
|
|
|
|
|
template <typename T>
|
|
|
|
DArray<T>::DArray(const RangePtr& range) : MDArrayBase<T>(range), mCont(range->size()) {}
|
|
|
|
|
|
|
|
template <typename T>
|
2022-09-15 16:45:45 +02:00
|
|
|
DArray<T>::DArray(const RangePtr& range, const Vector<T>& vec) :
|
2022-09-09 19:41:43 +02:00
|
|
|
MDArrayBase<T>(range), mCont(vec) {}
|
|
|
|
|
|
|
|
template <typename T>
|
2022-09-15 16:45:45 +02:00
|
|
|
DArray<T>::DArray(const RangePtr& range, Vector<T>&& vec) :
|
2022-09-09 19:41:43 +02:00
|
|
|
MDArrayBase<T>(range), mCont(vec) {}
|
|
|
|
|
|
|
|
template <typename T>
|
|
|
|
const T* DArray<T>::data() const
|
|
|
|
{
|
|
|
|
return mCont.data();
|
|
|
|
}
|
|
|
|
|
|
|
|
template <typename T>
|
|
|
|
T* DArray<T>::data()
|
|
|
|
{
|
|
|
|
return mCont.data();
|
|
|
|
}
|
|
|
|
|
|
|
|
template <typename T>
|
|
|
|
typename DArray<T>::const_iterator DArray<T>::cbegin() const
|
|
|
|
{
|
|
|
|
assert(0);
|
|
|
|
return const_iterator();
|
|
|
|
}
|
|
|
|
|
|
|
|
template <typename T>
|
|
|
|
typename DArray<T>::const_iterator DArray<T>::cend() const
|
|
|
|
{
|
|
|
|
assert(0);
|
|
|
|
return const_iterator();
|
|
|
|
}
|
|
|
|
|
|
|
|
template <typename T>
|
|
|
|
bool DArray<T>::isView() const
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2022-09-15 16:45:45 +02:00
|
|
|
|
|
|
|
#endif
|