_ownership=false;
_dealloc=CPPDeallocator;
}
-
+
template<class T>
void MemArray<T>::writeOnPlace(std::size_t id, T element0, const T *others, std::size_t sizeOfOthers)
{
std::copy(others,others+sizeOfOthers,pointer+id+1);
_nb_of_elem=std::max<std::size_t>(_nb_of_elem,id+sizeOfOthers+1);
}
-
+
template<class T>
template<class InputIterator>
void MemArray<T>::insertAtTheEnd(InputIterator first, InputIterator last)
pointer[_nb_of_elem++]=*first++;
}
}
-
+
template<class T>
void MemArray<T>::pushBack(T elem)
{
T *pt=getPointer();
pt[_nb_of_elem++]=elem;
}
-
+
template<class T>
T MemArray<T>::popBack()
{
}
throw INTERP_KERNEL::Exception("MemArray::popBack : nothing to pop in array !");
}
-
+
template<class T>
void MemArray<T>::pack() const
{
{
if(sl!=0)
stream << _nb_of_elem/sl << std::endl << "Internal memory facts : " << _nb_of_elem << "/" << _nb_of_elem_alloc;
- else
+ else
stream << "Empty Data";
}
else
stream << "No data !\n";
return ret;
}
-
+
/*!
* \param [in] sl is typically the number of components
*/
stream << "Empty Data\n";
}
}
-
+
/*!
* \param [in] sl is typically the number of components
*/
else
stream << "No data !\n";
}
-
+
template<class T>
void MemArray<T>::fillWithValue(const T& val)
{
T *pt=_pointer.getPointer();
std::fill(pt,pt+_nb_of_elem,val);
}
-
+
template<class T>
T *MemArray<T>::fromNoInterlace(int nbOfComp) const
{
*w=pt[j*nbOfTuples+i];
return ret;
}
-
+
template<class T>
T *MemArray<T>::toNoInterlace(int nbOfComp) const
{
typename MemArray<T>::Deallocator MemArray<T>::BuildFromType(DeallocType type)
{
switch(type)
- {
+ {
case CPP_DEALLOC:
return CPPDeallocator;
case C_DEALLOC:
return CDeallocator;
default:
throw INTERP_KERNEL::Exception("Invalid deallocation requested ! Unrecognized enum DeallocType !");
- }
+ }
}
template<class T>
_nb_of_elem=0;
_nb_of_elem_alloc=0;
}
-
+
template<class T>
MemArray<T> &MemArray<T>::operator=(const MemArray<T>& other)
{