169 static void Zip(
const size_t aSize,
const size_t aDataTypeSize,
const byte_type* __restrict__ aRecordOne,
const byte_type* __restrict__ aRecordTwo,
byte_type* __restrict__ anInterleavedRecord );
171 static void Zip(
const size_t aSize,
const size_t aDataTypeSize,
const byte_type* aRecordOne,
const byte_type* aRecordTwo,
byte_type* anInterleavedRecord );
175 static void Unzip(
const size_t aSize,
const size_t aDataTypeSize,
byte_type* __restrict__ aRecordOne,
byte_type* __restrict__ aRecordTwo,
const byte_type* __restrict__ anInterleavedRecord );
219 inline void Monarch2::Zip(
const size_t aSize,
const size_t aDataTypeSize,
const byte_type* __restrict__ aRecordOne,
const byte_type* __restrict__ aRecordTwo,
byte_type* __restrict__ anInterleavedRecord )
224 for(
size_t anIndex = 0; anIndex < aSize; anIndex++ )
226 *anInterleavedRecord = *aRecordOne;
227 anInterleavedRecord += aDataTypeSize;
228 aRecordOne += aDataTypeSize;
230 *anInterleavedRecord = *aRecordTwo;
231 anInterleavedRecord += aDataTypeSize;
232 aRecordTwo += aDataTypeSize;
242 for(
size_t anIndex = 0; anIndex < aSize; anIndex++ )
244 *aRecordOne = *anInterleavedRecord;
245 anInterleavedRecord += aDataTypeSize;
246 aRecordOne += aDataTypeSize;
248 *aRecordTwo = *anInterleavedRecord;
249 anInterleavedRecord += aDataTypeSize;
250 aRecordTwo += aDataTypeSize;
size_t fInterleavedRecordNBytes
bool SeparateFromSeparate(int anOffset) const
static Monarch2 * OpenForWriting(const std::string &filename)
bool ReadRecord(int anOffset=0) const
const M2RecordBytes * GetRecordInterleaved() const
uint32_t InterfaceModeType
bool SeparateFromSingle(int anOffset) const
bool InterleavedToSeparate()
byte_type * fRecordInterleavedBytes
M2RecordBytes * fRecordSeparateTwo
bool SeparateToInterleaved()
static void Unzip(const size_t aSize, const size_t aDataTypeSize, byte_type *aRecordOne, byte_type *aRecordTwo, const byte_type *anInterleavedRecord)
void SetInterface(InterfaceModeType aMode) const
bool InterleavedFromSeparate(int anOffset) const
byte_type * fRecordSeparateOneBytes
M2RecordBytes * fRecordInterleaved
const M2RecordBytes * GetRecordSeparateOne() const
size_t fSeparateRecordNBytes
byte_type * fRecordSeparateTwoBytes
bool InterleavedFromSingle(int anOffset) const
bool(Monarch2::* fWriteFunction)()
bool(Monarch2::* fReadFunction)(int anOffset) const
bool InterleavedToSingle()
bool SeparateFromInterleaved(int anOffset) const
const M2Header * GetHeader() const
static const Monarch2 * OpenForReading(const std::string &filename)
const M2RecordBytes * GetRecordSeparateTwo() const
bool SeparateToSeparate()
M2RecordBytes * fRecordSeparateOne
bool InterleavedFromInterleaved(int anOffset) const
bool InterleavedToInterleaved()
static void Zip(const size_t aSize, const size_t aDataTypeSize, const byte_type *aRecordOne, const byte_type *aRecordTwo, byte_type *anInterleavedRecord)