Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
|
A CPU implementation of the DataSequence2D. More...
#include <cheetah/data/DataSequence2D.h>
Public Types | |
typedef T | DataType |
typedef DataSequence2DFastIterator< Cpu, DataType > | Iterator |
typedef DataSequence2DFastIterator< Cpu, const DataType > | ConstIterator |
typedef DataSequence2DPartialIterator< Cpu, DataType > | PartialIterator |
Public Member Functions | |
DataSequence2D () | |
Create a zero-sized DataSequence2D. | |
DataSequence2D (std::size_t fast_axis_length, std::size_t slow_axis_length) | |
Create a pre-sized DataSequence2D filled with the default constructor of T. More... | |
DataSequence2D (std::size_t fast_axis_length, std::size_t slow_axis_length, const T &fill) | |
Create a pre-sized DataSequence2D, filled with copies of a provided T. More... | |
~DataSequence2D () | |
Free memory associated with DataSequence2D. | |
std::size_t | fast_axis_length () const |
Get the current fast_axis_length. | |
std::size_t | slow_axis_length () const |
Get the current slow_axis_length. | |
std::size_t | size () const |
the number fo elements in the data | |
void | resize (std::size_t fast_axis_length, std::size_t slow_axis_length, const T &fill) |
Destructive resize of underlying data. Fill with copies. More... | |
void | resize (std::size_t fast_axis_length, std::size_t slow_axis_length) |
Destructive resize of underlying data. More... | |
T const * | data () const |
access a read-only pointer to the data | |
T * | data () |
access a pointer to the data | |
Iterator | begin () |
get the default Iterator More... | |
ConstIterator | begin () const |
get the default Iterator More... | |
ConstIterator | cbegin () const |
get the default Iterator More... | |
Iterator | end () |
get the default end Iterator More... | |
ConstIterator | end () const |
get the default end Iterator More... | |
ConstIterator | cend () const |
get the default end Iterator More... | |
PartialIterator | slice (std::size_t fbegin, std::size_t fend, std::size_t sbegin, std::size_t send) |
Return an Iterator to a slice of the datasequence. The partial Iterator returned will iterate only over the range specified, from fbegin to fend on the fast axis and from sbegin to send on the slow axis. Otherwise the Iterator behaves as if it were a FastIterator over a smaller DataSequence2D of length (fend-fbegin) by (send-sbegin) More... | |
A CPU implementation of the DataSequence2D.
A two dimensional data structure, guaraneteed to be stored in continuous memory. Has a "fast" and "slow" axis. The "fast" axis is the index that moves fastest as one moves through the memory, and the "slow" axis moves slowest as one moves through the memory. Typically the "fast" axis is equivilent to "columns" and the slow axis is "rows"
The index to the memory is such that memory index = FastAxis + fast_axis_length*SlowAxis
Allows access to a pointer of type T*, but may be backed by any data structure.
T | is the type of the pointer stored. |
Definition at line 80 of file DataSequence2D.h.
ska::cheetah::data::DataSequence2D< Cpu, T >::DataSequence2D | ( | std::size_t | fast_axis_length, |
std::size_t | slow_axis_length | ||
) |
Create a pre-sized DataSequence2D filled with the default constructor of T.
fast_axis_length | the length of the fast axis |
slow_axis_length | the length of the slow axis. |
Definition at line 32 of file DataSequence2D.cpp.
ska::cheetah::data::DataSequence2D< Cpu, T >::DataSequence2D | ( | std::size_t | fast_axis_length, |
std::size_t | slow_axis_length, | ||
const T & | fill | ||
) |
Create a pre-sized DataSequence2D, filled with copies of a provided T.
fast_axis_length | the length of the fast axis |
slow_axis_length | the length of the slow axis. |
fill | object to be copied. |
Definition at line 41 of file DataSequence2D.cpp.
DataSequence2D< Cpu, T >::Iterator ska::cheetah::data::DataSequence2D< Cpu, T >::begin | ( | ) |
get the default Iterator
iterates over fast axis first, then slow axis
Definition at line 84 of file DataSequence2D.cpp.
DataSequence2D< Cpu, T >::ConstIterator ska::cheetah::data::DataSequence2D< Cpu, T >::begin | ( | ) | const |
get the default Iterator
iterates over fast axis first, then slow axis
Definition at line 89 of file DataSequence2D.cpp.
DataSequence2D< Cpu, T >::ConstIterator ska::cheetah::data::DataSequence2D< Cpu, T >::cbegin | ( | ) | const |
get the default Iterator
iterates over fast axis first, then slow axis
Definition at line 94 of file DataSequence2D.cpp.
DataSequence2D< Cpu, T >::ConstIterator ska::cheetah::data::DataSequence2D< Cpu, T >::cend | ( | ) | const |
get the default end Iterator
iterates over fast axis first, then slow axis
Definition at line 110 of file DataSequence2D.cpp.
DataSequence2D< Cpu, T >::Iterator ska::cheetah::data::DataSequence2D< Cpu, T >::end | ( | ) |
get the default end Iterator
iterates over fast axis first, then slow axis
Definition at line 100 of file DataSequence2D.cpp.
DataSequence2D< Cpu, T >::ConstIterator ska::cheetah::data::DataSequence2D< Cpu, T >::end | ( | ) | const |
get the default end Iterator
iterates over fast axis first, then slow axis
Definition at line 105 of file DataSequence2D.cpp.
void ska::cheetah::data::DataSequence2D< Cpu, T >::resize | ( | std::size_t | fast_axis_length, |
std::size_t | slow_axis_length, | ||
const T & | fill | ||
) |
Destructive resize of underlying data. Fill with copies.
fast_axis_length | new fast axis length |
slow_axis_length | new slow axis length |
fill | Value to copy to fill underlying array. |
Definition at line 61 of file DataSequence2D.cpp.
void ska::cheetah::data::DataSequence2D< Cpu, T >::resize | ( | std::size_t | fast_axis_length, |
std::size_t | slow_axis_length | ||
) |
Destructive resize of underlying data.
the contents of the memory are not defined after a call to this method.
fast_axis_length | new fast axis length |
slow_axis_length | new slow axis length |
fill | Value to copy to fill underlying array. |
Definition at line 70 of file DataSequence2D.cpp.
DataSequence2D< Cpu, T >::PartialIterator ska::cheetah::data::DataSequence2D< Cpu, T >::slice | ( | std::size_t | fbegin, |
std::size_t | fend, | ||
std::size_t | sbegin, | ||
std::size_t | send | ||
) |
Return an Iterator to a slice of the datasequence. The partial Iterator returned will iterate only over the range specified, from fbegin to fend on the fast axis and from sbegin to send on the slow axis. Otherwise the Iterator behaves as if it were a FastIterator over a smaller DataSequence2D of length (fend-fbegin) by (send-sbegin)
Definition at line 115 of file DataSequence2D.cpp.