Loading...
Searching...
No Matches
casacore::sisco::SiscoWriter Class Reference

File interface for data stored in the generated model compression (Sisco) format. More...

`#include <SiscoWriter.h>`

## Classes

struct | Chunk
struct | PreprocessingTask
struct | WriteTask
struct | BaselineData
struct | ThreadData

## Public Member Functions

| SiscoWriter (const std::string &filename, int predict_level, int deflate_level)
| SiscoWriter (SiscoWriter &&)=delete
| ~SiscoWriter ()
SiscoWriter & | operator= (SiscoWriter &&)=delete
void | Open (std::span< const std::byte > header_data)
void | Write (size_t baseline_index, std::span< const std::complex< float > > data)
void | Close ()

## Private Member Functions

void | NewChunk (std::unique_lock< std::mutex > &lock)
void | RemoveChunk (const Chunk *chunk)
void | PreprocessLoop ()
void | WriteLoop ()
void | Preprocess (SiscoWriter::PreprocessingTask &task, std::unique_lock< std::mutex > &lock)
void | WriteChunk (size_t uncompressed_size, std::span< const std::byte > data)
void | DeflateChunk (Chunk &chunk)

## Private Attributes

size_t | chunk_write_position_
std::byte * | mantisa_position_
std::byte * | exponent_position_
size_t | n_chunks_
std::list< Chunk > | chunks_
| A list is used because we do not want to invalidate pointers when adding/removing members.
Chunk * | write_chunk_
std::map< size_t, BaselineData > | baseline_data_
| Indexed by baseline_index.
std::ofstream | file_
std::string | filename_
int | predict_level_
int | deflate_level_
ConditionalQueue< PreprocessingTask > | preprocessing_tasks_
aocommon::Lane< WriteTask > | write_tasks_
std::mutex | mutex_
std::condition_variable | chunk_finished_condition_
std::set< size_t > | busy_baselines_
| Holds a list of baseline ids currently being preprocessed.
std::vector< std::thread > | compression_threads_
std::thread | write_thread_

## Static Private Attributes

static constexpr size_t | kDefaultChunkSize
| Chunk data.

## Detailed Description

File interface for data stored in the generated model compression (Sisco) format.

Definition at line 25 of file SiscoWriter.h.

## Constructor & Destructor Documentation

## SiscoWriter() [1/2]

casacore::sisco::SiscoWriter::SiscoWriter | ( | const std::string & | filename,
|  | int | predict_level,
|  | int | deflate_level )

Referenced by operator=(), and SiscoWriter().

## SiscoWriter() [2/2]

casacore::sisco::SiscoWriter::SiscoWriter | ( | SiscoWriter && |  | ) |

delete

References SiscoWriter().

## ~SiscoWriter()

casacore::sisco::SiscoWriter::~SiscoWriter | ( |  | ) |

inline

Definition at line 30 of file SiscoWriter.h.

References Close(), and file_.

## Member Function Documentation

## Close()

void casacore::sisco::SiscoWriter::Close | ( |  | ) |

Referenced by ~SiscoWriter().

## DeflateChunk()

void casacore::sisco::SiscoWriter::DeflateChunk | ( | Chunk & | chunk | ) |

private

## NewChunk()

void casacore::sisco::SiscoWriter::NewChunk | ( | std::unique_lock< std::mutex > & | lock | ) |

private

## Open()

void casacore::sisco::SiscoWriter::Open | ( | std::span< const std::byte > | header_data | ) |

## operator=()

SiscoWriter & casacore::sisco::SiscoWriter::operator= | ( | SiscoWriter && |  | ) |

delete

References SiscoWriter().

## Preprocess()

void casacore::sisco::SiscoWriter::Preprocess | ( | SiscoWriter::PreprocessingTask & | task,
|  | std::unique_lock< std::mutex > & | lock )

private

## PreprocessLoop()

void casacore::sisco::SiscoWriter::PreprocessLoop | ( |  | ) |

private

## RemoveChunk()

void casacore::sisco::SiscoWriter::RemoveChunk | ( | const Chunk * | chunk | ) |

private

## Write()

void casacore::sisco::SiscoWriter::Write | ( | size_t | baseline_index,
|  | std::span< const std::complex< float > > | data )

## WriteChunk()

void casacore::sisco::SiscoWriter::WriteChunk | ( | size_t | uncompressed_size,
|  | std::span< const std::byte > | data )

private

## WriteLoop()

void casacore::sisco::SiscoWriter::WriteLoop | ( |  | ) |

private

## Member Data Documentation

## baseline_data_

std::map<size_t, BaselineData> casacore::sisco::SiscoWriter::baseline_data_

private

Indexed by baseline_index.

Definition at line 94 of file SiscoWriter.h.

## busy_baselines_

std::set<size_t> casacore::sisco::SiscoWriter::busy_baselines_

private

Holds a list of baseline ids currently being preprocessed.

Access must be synchronized.

Definition at line 106 of file SiscoWriter.h.

## chunk_finished_condition_

std::condition_variable casacore::sisco::SiscoWriter::chunk_finished_condition_

private

Definition at line 103 of file SiscoWriter.h.

## chunk_write_position_

size_t casacore::sisco::SiscoWriter::chunk_write_position_

private

Definition at line 84 of file SiscoWriter.h.

## chunks_

std::list<Chunk> casacore::sisco::SiscoWriter::chunks_

private

A list is used because we do not want to invalidate pointers when adding/removing members.

Access requires holding the mutex.

Definition at line 90 of file SiscoWriter.h.

## compression_threads_

std::vector<std::thread> casacore::sisco::SiscoWriter::compression_threads_

private

Definition at line 107 of file SiscoWriter.h.

## deflate_level_

int casacore::sisco::SiscoWriter::deflate_level_

private

Definition at line 98 of file SiscoWriter.h.

## exponent_position_

std::byte* casacore::sisco::SiscoWriter::exponent_position_

private

Definition at line 86 of file SiscoWriter.h.

## file_

std::ofstream casacore::sisco::SiscoWriter::file_

private

Definition at line 95 of file SiscoWriter.h.

Referenced by ~SiscoWriter().

## filename_

std::string casacore::sisco::SiscoWriter::filename_

private

Definition at line 96 of file SiscoWriter.h.

## kDefaultChunkSize

size_t casacore::sisco::SiscoWriter::kDefaultChunkSize

static constexpr private

Chunk data.

Definition at line 83 of file SiscoWriter.h.

## mantisa_position_

std::byte* casacore::sisco::SiscoWriter::mantisa_position_

private

Definition at line 85 of file SiscoWriter.h.

## mutex_

std::mutex casacore::sisco::SiscoWriter::mutex_

private

Definition at line 102 of file SiscoWriter.h.

## n_chunks_

size_t casacore::sisco::SiscoWriter::n_chunks_

private

Definition at line 87 of file SiscoWriter.h.

## predict_level_

int casacore::sisco::SiscoWriter::predict_level_

private

Definition at line 97 of file SiscoWriter.h.

## preprocessing_tasks_

ConditionalQueue<PreprocessingTask> casacore::sisco::SiscoWriter::preprocessing_tasks_

private

Definition at line 99 of file SiscoWriter.h.

## write_chunk_

Chunk* casacore::sisco::SiscoWriter::write_chunk_

private

Definition at line 91 of file SiscoWriter.h.

## write_tasks_

aocommon::Lane<WriteTask> casacore::sisco::SiscoWriter::write_tasks_

private

Definition at line 100 of file SiscoWriter.h.

## write_thread_

std::thread casacore::sisco::SiscoWriter::write_thread_

private

Definition at line 108 of file SiscoWriter.h.

The documentation for this class was generated from the following file:

- tables/AlternateMans/SiscoWriter.h