11 bool enable_compression)
13 _mat_file = Mat_CreateVer(logger_name.c_str(),
17 _compression = enable_compression ? MAT_COMPRESSION_ZLIB : MAT_COMPRESSION_NONE;
24 int n_dims = slices == 1 ? 2 : 3;
30 auto * mat_var = Mat_VarCreate(name,
36 MAT_F_DONT_COPY_DATA);
38 int dim_append = slices == 1 ? 2 : 3;
39 int ret = Mat_VarWriteAppend(_mat_file,
47 fprintf(stderr,
"Mat_VarWriteAppend failed with code %d \n", ret);
59 return 0 == Mat_Close(_mat_file);
virtual bool close() override
virtual bool init(std::string logger_name, bool enable_compression) override
Backend * create_instance()
virtual bool write(const char *name, const double *data, int rows, int cols, int slices) override