Loading...
Searching...
No Matches
Memory.h
Go to the documentation of this file.
#ifndef CASACORE_COPY_2_H
#define CASACORE_COPY_2_H
#include <cstring>
namespace casacore { //#Begin casa namespace
template<typename T>
void copy_n_with_stride(const T* from, std::size_t n, T* to,
std::size_t toStride, std::size_t fromStride)
{
while (n--)
{
*to = *from;
to += toStride;
from += fromStride;
}
}
template<typename T>
void move_n_with_stride(T* from, std::size_t n, T* to,
std::size_t toStride, std::size_t fromStride)
{
while (n--)
{
*to = std::move(*from);
to += toStride;
from += fromStride;
}
}
template<typename T>
void fill_n_with_stride(T* dest, size_t n, const T& value, size_t stride)
{
while (n--)
{
*dest = value;
dest += stride;
};
}
} // namespaces
#endif
casacore
this file contains all the compiler specific defines
Definition mainpage.dox:28
casacore::fill_n_with_stride
void fill_n_with_stride(T *dest, size_t n, const T &value, size_t stride)
Definition Memory.h:33
casacore::move_n_with_stride
void move_n_with_stride(T *from, std::size_t n, T *to, std::size_t toStride, std::size_t fromStride)
Definition Memory.h:21
casacore::value
NewDelAllocator< T > NewDelAllocator< T >::value
Definition Allocator.h:368
casacore::copy_n_with_stride
void copy_n_with_stride(const T *from, std::size_t n, T *to, std::size_t toStride, std::size_t fromStride)
Definition Memory.h:9