12#ifndef __cxz_cereal_utilities_cc_h__
13#define __cxz_cereal_utilities_cc_h__
24 template <Format F,
typename T>
31 ar(cereal::make_nvp(
"cnorxz",
h));
32 ar(cereal::make_nvp(
"array",data));
35 template <Format F,
typename T>
42 ar(cereal::make_nvp(
"cnorxz",
h));
45 <<
static_cast<SizeT>(
h.content));
46 ar(cereal::make_nvp(
"array",data));
49 template <Format F,
typename T>
52 std::fstream
os(name, std::ios::binary | std::ios::out);
53 CXZ_ASSERT(
os.good(),
"could not open output file " << name);
55 CXZ_ASSERT(
os.good(),
"an error occurred while writing data to file " << name);
59 template <Format F,
typename T>
62 std::fstream
is(name, std::ios::binary | std::ios::in);
63 CXZ_ASSERT(
is.good(),
"could not open input file " << name);
#define CXZ_ASSERT(statement, errmsg)
Header mkHeader(const ContentType content)
void read(std::istream &is, MArray< T > &data)
void writeFile(const String &name, const MArray< T > &data)
void readFile(const String &name, MArray< T > &data)
void write(std::ostream &os, const MArray< T > &data)
Sptr< Range > rangeCast(const RangePtr r)
CNORXZ Cereal utilities declaration.