1 #ifndef DYSCO_TIME_BLOCK_BUFFER_H
2 #define DYSCO_TIME_BLOCK_BUFFER_H
9 template <
typename data_t>
30 void SetData(
size_t blockRow,
size_t antenna1,
size_t antenna2,
32 if (
_data.size() <= blockRow)
_data.resize(blockRow + 1);
41 void GetData(
size_t blockRow, data_t *destination)
const {
42 const data_t *srcPtr =
_data[blockRow].visibilities.data();
43 memcpy(destination, srcPtr,
44 sizeof(data_t) *
_data[blockRow].visibilities.size());
50 size_t maxAntennaIndex = 0;
55 return maxAntennaIndex;
61 template <
typename other_t>
64 vector.resize(
_data.size());
65 for (
size_t i = 0; i !=
_data.size(); ++i) {
void ConvertVector(std::vector< typename TimeBlockBuffer< other_t >::DataRow > &vector) const
void resize(size_t nRows)
size_t MaxAntennaIndex() const
LatticeExprNode max(const LatticeExprNode &left, const LatticeExprNode &right)
std::vector< data_t > visibilities
TimeBlockBuffer(size_t nPol, size_t nChannels)
void GetData(size_t blockRow, data_t *destination) const
std::vector< DataRow > _data
DataRow & operator[](size_t rowIndex)
const std::vector< DataRow > & GetVector() const
Header file for uvector and its relational and swap functions.
std::vector< DataRow > & GetVector()
void SetData(size_t blockRow, size_t antenna1, size_t antenna2, const data_t *data)