Loading...
Searching...
No Matches
dyscoweightcolumn.h
Go to the documentation of this file.
#ifndef DYSCO_WEIGHT_COLUMN_H
#define DYSCO_WEIGHT_COLUMN_H
#include "stochasticencoder.h"
#include "threadeddyscocolumn.h"
#include "weightblockencoder.h"
namespace dyscostman {
class DyscoStMan;
class DyscoWeightColumn final : public ThreadedDyscoColumn<float> {
public:
DyscoWeightColumn(DyscoStMan *parent, int dtype)
: ThreadedDyscoColumn(parent, dtype) {}
DyscoWeightColumn(const DyscoWeightColumn &source) = delete;
void operator=(const DyscoWeightColumn &source) = delete;
virtual ~DyscoWeightColumn() { shutdown(); }
virtual void Prepare(DyscoDistribution distribution,
Normalization normalization, double studentsTNu,
double distributionTruncation) override;
protected:
virtual void initializeDecode(TimeBlockBuffer<data_t> *buffer,
const float *metaBuffer, size_t nRow,
size_t nAntennae) override;
virtual void decode(TimeBlockBuffer<data_t> *buffer, const symbol_t *data,
size_t blockRow, size_t a1, size_t a2) override;
virtual std::unique_ptr<ThreadDataBase> initializeEncodeThread() override {
return nullptr;
}
virtual void encode(ThreadDataBase *threadData,
TimeBlockBuffer<data_t> *buffer, float *metaBuffer,
symbol_t *symbolBuffer, size_t nAntennae) override;
virtual size_t metaDataFloatCount(size_t /*nRows*/, size_t /*nPolarizations*/,
size_t /*nChannels*/,
size_t /*nAntennae*/) const override {
return _encoder->MetaDataFloatCount();
}
virtual size_t symbolCount(size_t nRowsInBlock, size_t /*nPolarizations*/,
size_t /*nChannels*/) const override {
return _encoder->SymbolCount(nRowsInBlock);
}
private:
std::unique_ptr<WeightBlockEncoder> _encoder;
};
} // namespace dyscostman
#endif
TimeBlockBuffer
Definition timeblockbuffer.h:10
casacore::StManColumnBase::dtype
DataType dtype() const
Definition StManColumnBase.h:90
dyscostman::DyscoStManColumn::nAntennae
size_t nAntennae() const
Definition dyscostmancol.h:150
dyscostman::DyscoStManColumn::nRowsInBlock
size_t nRowsInBlock() const
Definition dyscostmancol.h:146
dyscostman::DyscoStMan
The main class for the Dysco storage manager.
Definition dyscostman.h:46
dyscostman::DyscoWeightColumn::~DyscoWeightColumn
virtual ~DyscoWeightColumn()
Destructor.
Definition dyscoweightcolumn.h:31
dyscostman::DyscoWeightColumn::DyscoWeightColumn
DyscoWeightColumn(DyscoStMan *parent, int dtype)
Create a new column.
Definition dyscoweightcolumn.h:23
dyscostman::DyscoWeightColumn::decode
virtual void decode(TimeBlockBuffer< data_t > *buffer, const symbol_t *data, size_t blockRow, size_t a1, size_t a2) override
dyscostman::DyscoWeightColumn::symbolCount
virtual size_t symbolCount(size_t nRowsInBlock, size_t, size_t) const override
Definition dyscoweightcolumn.h:59
dyscostman::DyscoWeightColumn::DyscoWeightColumn
DyscoWeightColumn(const DyscoWeightColumn &source)=delete
dyscostman::DyscoWeightColumn::operator=
void operator=(const DyscoWeightColumn &source)=delete
dyscostman::DyscoWeightColumn::_encoder
std::unique_ptr< WeightBlockEncoder > _encoder
Definition dyscoweightcolumn.h:65
dyscostman::DyscoWeightColumn::initializeEncodeThread
virtual std::unique_ptr< ThreadDataBase > initializeEncodeThread() override
Definition dyscoweightcolumn.h:45
dyscostman::DyscoWeightColumn::Prepare
virtual void Prepare(DyscoDistribution distribution, Normalization normalization, double studentsTNu, double distributionTruncation) override
dyscostman::DyscoWeightColumn::encode
virtual void encode(ThreadDataBase *threadData, TimeBlockBuffer< data_t > *buffer, float *metaBuffer, symbol_t *symbolBuffer, size_t nAntennae) override
dyscostman::DyscoWeightColumn::initializeDecode
virtual void initializeDecode(TimeBlockBuffer< data_t > *buffer, const float *metaBuffer, size_t nRow, size_t nAntennae) override
dyscostman::DyscoWeightColumn::metaDataFloatCount
virtual size_t metaDataFloatCount(size_t, size_t, size_t, size_t) const override
Definition dyscoweightcolumn.h:53
dyscostman::ThreadedDyscoColumn< float >::symbol_t
TimeBlockBuffer< data_t >::symbol_t symbol_t
Definition threadeddyscocolumn.h:115
dyscostman::ThreadedDyscoColumn< float >::ThreadedDyscoColumn
ThreadedDyscoColumn(DyscoStMan *parent, int dtype)
dyscostman::ThreadedDyscoColumn< float >::shutdown
virtual void shutdown() override final
dyscostman
Definition bytepacker.h:7
dyscostman::Normalization
Normalization
Definition dysconormalization.h:5
dyscostman::DyscoDistribution
DyscoDistribution
Definition dyscodistribution.h:5
stochasticencoder.h
threadeddyscocolumn.h
weightblockencoder.h