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) {
std::vector< DataRow > _data
const std::vector< DataRow > & GetVector() const
DataRow & operator[](size_t rowIndex)
void SetData(size_t blockRow, size_t antenna1, size_t antenna2, const data_t *data)
size_t MaxAntennaIndex() const
std::vector< DataRow > & GetVector()
TimeBlockBuffer(size_t nPol, size_t nChannels)
void ConvertVector(std::vector< typename TimeBlockBuffer< other_t >::DataRow > &vector) const
void GetData(size_t blockRow, data_t *destination) const
void resize(size_t nRows)
LatticeExprNode max(const LatticeExprNode &left, const LatticeExprNode &right)
std::vector< data_t > visibilities
Header file for uvector and its relational and swap functions.