Defines | |
#define | swap(a, b) a^=b;b^=a;a^=b |
swap the bytes a and b | |
Functions | |
int | InflateArrayFlags (mat_t *mat, matvar_t *matvar, void *buf) |
Inflates the Array Flags Tag and the Array Flags data. | |
int | InflateData (mat_t *mat, z_stream *z, void *buf, int nBytes) |
Inflates the data. | |
int | InflateDataTag (mat_t *mat, matvar_t *matvar, void *buf) |
Inflates the data's tag. | |
int | InflateDataType (mat_t *mat, z_stream *z, void *buf) |
Inflates the data's type. | |
int | InflateDimensions (mat_t *mat, matvar_t *matvar, void *buf) |
Inflates the dimensions tag and the dimensions data. | |
int | InflateFieldNameLength (mat_t *mat, matvar_t *matvar, void *buf) |
Inflates the structure's fieldname length. | |
int | InflateFieldNames (mat_t *mat, matvar_t *matvar, void *buf, int nfields, int fieldname_length, int padding) |
Inflates the structure's fieldnames. | |
int | InflateFieldNamesTag (mat_t *mat, matvar_t *matvar, void *buf) |
Inflates the structure's fieldname tag. | |
int | InflateSkip (mat_t *mat, z_stream *z, int nbytes) |
Inflate the data until nbytes of uncompressed data has been inflated. | |
int | InflateSkip2 (mat_t *mat, matvar_t *matvar, int nbytes) |
Inflate the data until nbytes of compressed data has been inflated. | |
int | InflateSkipData (mat_t *mat, z_stream *z, int data_type, int len) |
Inflate the data until len elements of compressed data with data type data_type has been inflated. | |
int | InflateVarName (mat_t *mat, matvar_t *matvar, void *buf, int N) |
Inflates the variable name. | |
int | InflateVarNameTag (mat_t *mat, matvar_t *matvar, void *buf) |
Inflates the variable name tag. | |
int | InflateVarTag (mat_t *mat, matvar_t *matvar, void *buf) |
Inflates the variable's tag. | |
double | Mat_doubleSwap (double *a) |
swap the bytes of a 4 or 8 byte double-precision float | |
float | Mat_floatSwap (float *a) |
swap the bytes of a 4 byte single-precision float | |
mat_int16_t | Mat_int16Swap (mat_int16_t *a) |
swap the bytes of a 16-bit signed integer | |
mat_int32_t | Mat_int32Swap (mat_int32_t *a) |
swap the bytes of a 32-bit signed integer | |
mat_int64_t | Mat_int64Swap (mat_int64_t *a) |
swap the bytes of a 64-bit signed integer | |
mat_uint16_t | Mat_uint16Swap (mat_uint16_t *a) |
swap the bytes of a 16-bit unsigned integer | |
mat_uint32_t | Mat_uint32Swap (mat_uint32_t *a) |
swap the bytes of a 32-bit unsigned integer | |
mat_uint64_t | Mat_uint64Swap (mat_uint64_t *a) |
swap the bytes of a 64-bit unsigned integer | |
void | Mat_VarPrint5 (matvar_t *matvar, int printdata) |
Prints the mat variable. | |
matvar_t * | Mat_VarReadNextInfo5 (mat_t *mat) |
Reads the header information for the next MAT variable. | |
void | Read5 (mat_t *mat, matvar_t *matvar) |
Reads the data of a version 5 MAT variable. | |
int | ReadCompressedCharData (mat_t *mat, z_stream *z, char *data, int data_type, int len) |
Reads data of type data_type into a char type. | |
int | ReadCompressedDataSlab2 (mat_t *mat, z_stream *z, void *data, int class_type, int data_type, int *dims, int *start, int *stride, int *edge) |
Reads data of type data_type by user-defined dimensions for 2-D data. | |
int | ReadCompressedDataSlabN (mat_t *mat, z_stream *z, void *data, int class_type, int data_type, int rank, int *dims, int *start, int *stride, int *edge) |
Reads data of type data_type by user-defined dimensions. | |
int | ReadCompressedDoubleData (mat_t *mat, z_stream *z, double *data, int data_type, int len) |
Reads data of type data_type into a double type. | |
int | ReadCompressedInt16Data (mat_t *mat, z_stream *z, mat_int16_t *data, int data_type, int len) |
Reads data of type data_type into a signed 16-bit integer type. | |
int | ReadCompressedInt32Data (mat_t *mat, z_stream *z, mat_int32_t *data, int data_type, int len) |
Reads data of type data_type into a signed 32-bit integer type. | |
int | ReadCompressedInt64Data (mat_t *mat, z_stream *z, mat_int64_t *data, int data_type, int len) |
Reads data of type data_type into a signed 64-bit integer type. | |
int | ReadCompressedInt8Data (mat_t *mat, z_stream *z, mat_int8_t *data, int data_type, int len) |
Reads data of type data_type into a signed 8-bit integer type. | |
int | ReadCompressedSingleData (mat_t *mat, z_stream *z, float *data, int data_type, int len) |
Reads data of type data_type into a float type. | |
int | ReadCompressedUInt16Data (mat_t *mat, z_stream *z, mat_uint16_t *data, int data_type, int len) |
Reads data of type data_type into an unsigned 16-bit integer type. | |
int | ReadCompressedUInt32Data (mat_t *mat, z_stream *z, mat_uint32_t *data, int data_type, int len) |
Reads data of type data_type into an unsigned 32-bit integer type. | |
int | ReadCompressedUInt64Data (mat_t *mat, z_stream *z, mat_uint64_t *data, int data_type, int len) |
Reads data of type data_type into an unsigned 64-bit integer type. | |
int | ReadCompressedUInt8Data (mat_t *mat, z_stream *z, mat_uint8_t *data, int data_type, int len) |
Reads data of type data_type into an unsigned 8-bit integer type. | |
int | ReadData5 (mat_t *mat, matvar_t *matvar, void *data, int *start, int *stride, int *edge) |
Reads a slab of data from the mat variable matvar . | |
int | ReadDataSlab2 (mat_t *mat, void *data, int class_type, int data_type, int *dims, int *start, int *stride, int *edge) |
Reads data of type data_type by user-defined dimensions for 2-D data. | |
int | ReadDataSlabN (mat_t *mat, void *data, int class_type, int data_type, int rank, int *dims, int *start, int *stride, int *edge) |
Reads data of type data_type by user-defined dimensions. | |
int | ReadDoubleData (mat_t *mat, double *data, int data_type, int len) |
Reads data of type data_type into a double type. | |
int | ReadInt16Data (mat_t *mat, mat_int16_t *data, int data_type, int len) |
Reads data of type data_type into a signed 16-bit integer type. | |
int | ReadInt32Data (mat_t *mat, mat_int32_t *data, int data_type, int len) |
Reads data of type data_type into a signed 32-bit integer type. | |
int | ReadInt64Data (mat_t *mat, mat_int64_t *data, int data_type, int len) |
Reads data of type data_type into a signed 64-bit integer type. | |
int | ReadInt8Data (mat_t *mat, mat_int8_t *data, int data_type, int len) |
Reads data of type data_type into a signed 8-bit integer type. | |
int | ReadNextCell (mat_t *mat, matvar_t *matvar) |
Reads the next cell of the cell array in matvar . | |
int | ReadNextFunctionHandle (mat_t *mat, matvar_t *matvar) |
Reads the function handle data of the function handle in matvar . | |
int | ReadNextStructField (mat_t *mat, matvar_t *matvar) |
Reads the next struct field of the structure in matvar . | |
int | ReadSingleData (mat_t *mat, float *data, int data_type, int len) |
Reads data of type data_type into a float type. | |
int | ReadUInt16Data (mat_t *mat, mat_uint16_t *data, int data_type, int len) |
Reads data of type data_type into an unsigned 16-bit integer type. | |
int | ReadUInt32Data (mat_t *mat, mat_uint32_t *data, int data_type, int len) |
Reads data of type data_type into an unsigned 32-bit integer type. | |
int | ReadUInt64Data (mat_t *mat, mat_uint64_t *data, int data_type, int len) |
Reads data of type data_type into an unsigned 64-bit integer type. | |
int | ReadUInt8Data (mat_t *mat, mat_uint8_t *data, int data_type, int len) |
Reads data of type data_type into an unsigned 8-bit integer type. | |
int | Write5 (mat_t *mat, matvar_t *matvar, int compress) |
Writes a matlab variable to a version 5 matlab file. | |
int | WriteCellArrayField (mat_t *mat, matvar_t *matvar) |
Writes the header and data for an element of a cell array. | |
int | WriteCellArrayFieldInfo (mat_t *mat, matvar_t *matvar) |
Writes the header and blank data for a cell array. | |
int | WriteCharData (mat_t *mat, void *data, int N, int data_type) |
Writes data as character data. | |
int | WriteCharDataSlab2 (mat_t *mat, void *data, int data_type, int *dims, int *start, int *stride, int *edge) |
size_t | WriteCompressedCellArrayField (mat_t *mat, matvar_t *matvar, z_stream *z) |
Writes the header and data for a field of a compressed cell array. | |
size_t | WriteCompressedCharData (mat_t *mat, z_stream *z, void *data, int N, int data_type) |
Writes data as compressed character data. | |
size_t | WriteCompressedStructField (mat_t *mat, matvar_t *matvar, z_stream *z) |
Writes the header and data for a field of a compressed struct array. | |
int | WriteDataSlab2 (mat_t *mat, void *data, int data_type, int *dims, int *start, int *stride, int *edge) |
int | WriteEmptyCharData (mat_t *mat, int N, int data_type) |
Writes empty characters to the MAT file. | |
void | WriteInfo5 (mat_t *mat, matvar_t *matvar) |
Writes the variable information and empty data. | |
int | WriteStructField (mat_t *mat, matvar_t *matvar) |
Writes the header and data for a field of a struct array. |
buf
must hold at least 16 bytes
mat | Pointer to the MAT file | |
matvar | Pointer to the MAT variable | |
buf | Pointer to store the 16-byte array flags tag and data |
References mat_t::fp, and matvar_t::z.
Referenced by Mat_VarReadNextInfo5(), ReadNextCell(), and ReadNextStructField().
int InflateData | ( | mat_t * | mat, | |
z_stream * | z, | |||
void * | buf, | |||
int | nBytes | |||
) |
buf must hold at least nBytes
bytes
mat | Pointer to the MAT file | |
z | zlib compression stream | |
buf | Pointer to store the data type | |
nBytes | Number of bytes to inflate |
References mat_t::fp.
Referenced by ReadCompressedCharData(), ReadCompressedDoubleData(), ReadCompressedInt16Data(), ReadCompressedInt32Data(), ReadCompressedInt64Data(), ReadCompressedInt8Data(), ReadCompressedSingleData(), ReadCompressedUInt16Data(), ReadCompressedUInt32Data(), ReadCompressedUInt64Data(), and ReadCompressedUInt8Data().
buf must hold at least 8 bytes
mat | Pointer to the MAT file | |
matvar | Pointer to the MAT variable | |
buf | Pointer to store the data tag |
References mat_t::fp, matvar_t::name, and matvar_t::z.
int InflateDataType | ( | mat_t * | mat, | |
z_stream * | z, | |||
void * | buf | |||
) |
buf must hold at least 4 bytes
mat | Pointer to the MAT file | |
matvar | Pointer to the MAT variable | |
buf | Pointer to store the data type |
References mat_t::fp.
Referenced by Mat_VarReadDataLinear(), Read5(), and ReadData5().
buf
must hold at least (8+4*rank) bytes where rank is the number of dimensions. If the end of the dimensions data is not aligned on an 8-byte boundary, this function eats up those bytes and stores then in buf
.
mat | Pointer to the MAT file | |
matvar | Pointer to the MAT variable | |
buf | Pointer to store the dimensions flag and data |
References mat_t::byteswap, mat_t::fp, Mat_int32Swap(), MAT_T_INT32, and matvar_t::z.
Referenced by Mat_VarReadNextInfo5(), ReadNextCell(), and ReadNextStructField().
buf must hold at least 8 bytes
mat | Pointer to the MAT file | |
matvar | Pointer to the MAT variable | |
buf | Pointer to store the fieldname length |
References mat_t::fp, and matvar_t::z.
Referenced by ReadNextStructField().
int InflateFieldNames | ( | mat_t * | mat, | |
matvar_t * | matvar, | |||
void * | buf, | |||
int | nfields, | |||
int | fieldname_length, | |||
int | padding | |||
) |
buf must hold at least nfields
* fieldname_length
bytes
mat | Pointer to the MAT file | |
matvar | Pointer to the MAT variable | |
buf | Pointer to store the fieldnames | |
nfields | Number of fields | |
fieldname_length | Maximum length in bytes of each field | |
padding | Number of padding bytes |
References mat_t::fp, and matvar_t::z.
Referenced by ReadNextStructField().
buf must hold at least 8 bytes
mat | Pointer to the MAT file | |
matvar | Pointer to the MAT variable | |
buf | Pointer to store the fieldname tag |
References mat_t::fp, and matvar_t::z.
Referenced by ReadNextStructField().
int InflateSkip | ( | mat_t * | mat, | |
z_stream * | z, | |||
int | nbytes | |||
) |
mat | Pointer to the MAT file | |
z | zlib compression stream | |
nbytes | Number of uncompressed bytes to skip |
References mat_t::fp.
Referenced by InflateSkipData(), Mat_VarReadDataLinear(), Read5(), ReadData5(), ReadNextCell(), and ReadNextStructField().
mat | Pointer to the MAT file | |
z | zlib compression stream | |
nbytes | Number of uncompressed bytes to skip |
References mat_t::fp, matvar_t::name, and matvar_t::z.
int InflateSkipData | ( | mat_t * | mat, | |
z_stream * | z, | |||
int | data_type, | |||
int | len | |||
) |
mat | Pointer to the MAT file | |
z | zlib compression stream | |
data_type | Data type (matio_types enumerations) | |
len | Number of elements of datatype data_type to skip |
References InflateSkip(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT64, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT64, and MAT_T_UINT8.
Referenced by Mat_VarReadDataLinear(), ReadCompressedDataSlab2(), and ReadCompressedDataSlabN().
mat | Pointer to the MAT file | |
matvar | Pointer to the MAT variable | |
buf | Pointer to store the variables name | |
N | Number of characters in the name |
References mat_t::fp, and matvar_t::z.
Referenced by Mat_VarReadNextInfo5().
mat | Pointer to the MAT file | |
matvar | Pointer to the MAT variable | |
buf | Pointer to store the variables name tag |
References mat_t::fp, and matvar_t::z.
Referenced by Mat_VarReadNextInfo5(), ReadNextCell(), and ReadNextStructField().
buf
must hold at least 8 bytes
mat | Pointer to the MAT file | |
matvar | Pointer to the MAT variable | |
buf | Pointer to store the 8-byte variable tag |
References mat_t::fp, and matvar_t::z.
Referenced by Mat_VarReadNextInfo5(), ReadNextCell(), and ReadNextStructField().
double Mat_doubleSwap | ( | double * | a | ) |
a | pointer to integer to swap |
References swap.
Referenced by ReadCompressedDoubleData(), ReadCompressedInt16Data(), ReadCompressedInt32Data(), ReadCompressedInt64Data(), ReadCompressedInt8Data(), ReadCompressedSingleData(), ReadCompressedUInt16Data(), ReadCompressedUInt32Data(), ReadCompressedUInt64Data(), ReadCompressedUInt8Data(), ReadDoubleData(), ReadInt16Data(), ReadInt32Data(), ReadInt64Data(), ReadInt8Data(), ReadSingleData(), ReadUInt16Data(), ReadUInt32Data(), ReadUInt64Data(), and ReadUInt8Data().
float Mat_floatSwap | ( | float * | a | ) |
a | pointer to integer to swap |
References swap.
Referenced by ReadCompressedInt16Data(), ReadCompressedInt32Data(), ReadCompressedInt64Data(), ReadCompressedInt8Data(), ReadCompressedSingleData(), ReadCompressedUInt16Data(), ReadCompressedUInt32Data(), ReadCompressedUInt64Data(), ReadCompressedUInt8Data(), ReadDoubleData(), ReadInt16Data(), ReadInt32Data(), ReadInt64Data(), ReadInt8Data(), ReadSingleData(), ReadUInt16Data(), ReadUInt32Data(), ReadUInt64Data(), and ReadUInt8Data().
mat_int16_t Mat_int16Swap | ( | mat_int16_t * | a | ) |
a | pointer to integer to swap |
References swap.
Referenced by Mat_Open(), ReadCompressedDoubleData(), ReadCompressedInt16Data(), ReadCompressedInt32Data(), ReadCompressedInt64Data(), ReadCompressedInt8Data(), ReadCompressedSingleData(), ReadCompressedUInt16Data(), ReadCompressedUInt32Data(), ReadCompressedUInt64Data(), ReadCompressedUInt8Data(), ReadDoubleData(), ReadInt16Data(), ReadInt32Data(), ReadInt64Data(), ReadInt8Data(), ReadSingleData(), ReadUInt16Data(), ReadUInt32Data(), ReadUInt64Data(), and ReadUInt8Data().
mat_int32_t Mat_int32Swap | ( | mat_int32_t * | a | ) |
a | pointer to integer to swap |
References swap.
Referenced by InflateDimensions(), Mat_VarReadDataLinear(), Mat_VarReadInfo(), Mat_VarReadNextInfo5(), Read5(), ReadCompressedDoubleData(), ReadCompressedInt16Data(), ReadCompressedInt32Data(), ReadCompressedInt64Data(), ReadCompressedInt8Data(), ReadCompressedSingleData(), ReadCompressedUInt16Data(), ReadCompressedUInt32Data(), ReadCompressedUInt64Data(), ReadCompressedUInt8Data(), ReadData5(), ReadDoubleData(), ReadInt16Data(), ReadInt32Data(), ReadInt64Data(), ReadInt8Data(), ReadSingleData(), ReadUInt16Data(), ReadUInt32Data(), ReadUInt64Data(), ReadUInt8Data(), WriteCellArrayField(), WriteCellArrayFieldInfo(), and WriteStructField().
mat_int64_t Mat_int64Swap | ( | mat_int64_t * | a | ) |
a | pointer to integer to swap |
References swap.
Referenced by ReadCompressedInt64Data(), ReadCompressedUInt64Data(), ReadInt64Data(), and ReadUInt64Data().
mat_uint16_t Mat_uint16Swap | ( | mat_uint16_t * | a | ) |
a | pointer to integer to swap |
References swap.
Referenced by ReadCompressedCharData(), ReadCompressedDoubleData(), ReadCompressedInt16Data(), ReadCompressedInt32Data(), ReadCompressedInt64Data(), ReadCompressedInt8Data(), ReadCompressedSingleData(), ReadCompressedUInt16Data(), ReadCompressedUInt32Data(), ReadCompressedUInt64Data(), ReadCompressedUInt8Data(), ReadDoubleData(), ReadInt16Data(), ReadInt32Data(), ReadInt64Data(), ReadInt8Data(), ReadSingleData(), ReadUInt16Data(), ReadUInt32Data(), ReadUInt64Data(), and ReadUInt8Data().
mat_uint32_t Mat_uint32Swap | ( | mat_uint32_t * | a | ) |
a | pointer to integer to swap |
References swap.
Referenced by Mat_VarReadNextInfo5(), Read5(), ReadCompressedDoubleData(), ReadCompressedInt16Data(), ReadCompressedInt32Data(), ReadCompressedInt64Data(), ReadCompressedInt8Data(), ReadCompressedSingleData(), ReadCompressedUInt16Data(), ReadCompressedUInt32Data(), ReadCompressedUInt64Data(), ReadCompressedUInt8Data(), ReadDoubleData(), ReadInt16Data(), ReadInt32Data(), ReadInt64Data(), ReadInt8Data(), ReadNextCell(), ReadNextStructField(), ReadSingleData(), ReadUInt16Data(), ReadUInt32Data(), ReadUInt64Data(), and ReadUInt8Data().
mat_uint64_t Mat_uint64Swap | ( | mat_uint64_t * | a | ) |
a | pointer to integer to swap |
References swap.
Referenced by ReadCompressedInt64Data(), ReadCompressedUInt64Data(), ReadInt64Data(), and ReadUInt64Data().
void Mat_VarPrint5 | ( | matvar_t * | matvar, | |
int | printdata | |||
) |
mat | MAT file pointer | |
matvar | pointer to the mat variable |
References matvar_t::class_type, sparse_t::data, matvar_t::data, matvar_t::data_size, matvar_t::data_type, matvar_t::dims, ComplexSplit::Im, sparse_t::ir, matvar_t::isComplex, sparse_t::jc, MAT_C_CELL, MAT_C_CHAR, MAT_C_DOUBLE, MAT_C_INT16, MAT_C_INT32, MAT_C_INT64, MAT_C_INT8, MAT_C_SINGLE, MAT_C_SPARSE, MAT_C_STRUCT, MAT_C_UINT16, MAT_C_UINT32, MAT_C_UINT64, MAT_C_UINT8, MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT64, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT64, MAT_T_UINT8, Mat_VarPrint(), matvar_t::name, matvar_t::nbytes, sparse_t::ndata, sparse_t::njc, matvar_t::rank, and ComplexSplit::Re.
Referenced by Mat_VarPrint().
mat | MAT file pointer pointer to the MAT variable or NULL |
References mat_t::byteswap, matvar_t::class_type, matvar_t::compression, matvar_t::data, matvar_t::data_size, matvar_t::data_type, matvar_t::datapos, matvar_t::dims, matvar_t::fp, mat_t::fp, matvar_t::fpos, InflateArrayFlags(), InflateDimensions(), InflateVarName(), InflateVarNameTag(), InflateVarTag(), matvar_t::isComplex, matvar_t::isGlobal, matvar_t::isLogical, MAT_C_CELL, MAT_C_FUNCTION, MAT_C_SPARSE, MAT_C_STRUCT, MAT_F_CLASS_T, MAT_F_COMPLEX, MAT_F_GLOBAL, MAT_F_LOGICAL, Mat_int32Swap(), MAT_T_COMPRESSED, MAT_T_INT32, MAT_T_INT8, MAT_T_MATRIX, MAT_T_UINT32, Mat_uint32Swap(), Mat_VarCalloc(), Mat_VarFree(), matvar_t::mem_conserve, matvar_t::name, matvar_t::nbytes, matvar_t::rank, ReadNextCell(), ReadNextFunctionHandle(), ReadNextStructField(), and matvar_t::z.
Referenced by Mat_VarReadNextInfo().
mat | MAT file pointer | |
matvar | MAT variable pointer to read the data |
References mat_t::byteswap, matvar_t::class_type, matvar_t::compression, COMPRESSION_NONE, COMPRESSION_ZLIB, sparse_t::data, matvar_t::data, matvar_t::data_size, matvar_t::data_type, matvar_t::datapos, matvar_t::dims, matvar_t::fp, mat_t::fp, ComplexSplit::Im, InflateDataType(), InflateSkip(), sparse_t::ir, matvar_t::isComplex, sparse_t::jc, MAT_C_CELL, MAT_C_CHAR, MAT_C_DOUBLE, MAT_C_FUNCTION, MAT_C_INT16, MAT_C_INT32, MAT_C_INT64, MAT_C_INT8, MAT_C_SINGLE, MAT_C_SPARSE, MAT_C_STRUCT, MAT_C_UINT16, MAT_C_UINT32, MAT_C_UINT64, MAT_C_UINT8, Mat_int32Swap(), MAT_T_CELL, MAT_T_DOUBLE, MAT_T_FUNCTION, MAT_T_INT16, MAT_T_INT32, MAT_T_INT64, MAT_T_INT8, MAT_T_SINGLE, MAT_T_STRUCT, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT64, MAT_T_UINT8, Mat_uint32Swap(), matvar_t::name, matvar_t::nbytes, sparse_t::ndata, sparse_t::nir, sparse_t::njc, sparse_t::nzmax, matvar_t::rank, ComplexSplit::Re, Read5(), ReadCompressedCharData(), ReadCompressedDoubleData(), ReadCompressedInt16Data(), ReadCompressedInt32Data(), ReadCompressedInt64Data(), ReadCompressedInt8Data(), ReadCompressedSingleData(), ReadCompressedUInt16Data(), ReadCompressedUInt32Data(), ReadCompressedUInt8Data(), ReadDoubleData(), ReadInt16Data(), ReadInt32Data(), ReadInt64Data(), ReadInt8Data(), ReadSingleData(), ReadUInt16Data(), ReadUInt32Data(), ReadUInt8Data(), and matvar_t::z.
Referenced by Read5().
int ReadCompressedCharData | ( | mat_t * | mat, | |
z_stream * | z, | |||
char * | data, | |||
int | data_type, | |||
int | len | |||
) |
Reads from the MAT file len
compressed elements of data type data_type
storing them as char's in data
.
mat | MAT file pointer | |
z | Pointer to the zlib stream for inflation | |
data | Pointer to store the output char values (len*sizeof(char)) | |
data_type | one of the matio_types enumerations which is the source data type in the file | |
len | Number of elements of type data_type to read from the file |
Number | of bytes read from the file |
References mat_t::byteswap, mat_t::fp, InflateData(), MAT_T_INT16, MAT_T_INT8, MAT_T_UINT16, MAT_T_UINT8, MAT_T_UTF8, and Mat_uint16Swap().
Referenced by Read5(), and ReadCompressedDataSlab2().
int ReadCompressedDataSlab2 | ( | mat_t * | mat, | |
z_stream * | z, | |||
void * | data, | |||
int | class_type, | |||
int | data_type, | |||
int * | dims, | |||
int * | start, | |||
int * | stride, | |||
int * | edge | |||
) |
mat | MAT file pointer | |
z | zlib compression stream | |
data | Pointer to store the output data | |
class_type | Type of data class (matio_classes enumerations) | |
data_type | Datatype of the stored data (matio_types enumerations) | |
dims | Dimensions of the data | |
start | Index to start reading data in each dimension | |
stride | Read every stride elements in each dimension | |
edge | Number of elements to read in each dimension |
Number | of bytes read from the file, or -1 on error |
References mat_t::fp, InflateSkipData(), MAT_C_CHAR, MAT_C_DOUBLE, MAT_C_INT16, MAT_C_INT32, MAT_C_INT64, MAT_C_INT8, MAT_C_SINGLE, MAT_C_UINT16, MAT_C_UINT32, MAT_C_UINT64, MAT_C_UINT8, ReadCompressedCharData(), ReadCompressedDoubleData(), ReadCompressedInt16Data(), ReadCompressedInt32Data(), ReadCompressedInt64Data(), ReadCompressedInt8Data(), ReadCompressedSingleData(), ReadCompressedUInt16Data(), ReadCompressedUInt32Data(), ReadCompressedUInt64Data(), and ReadCompressedUInt8Data().
Referenced by ReadData5().
int ReadCompressedDataSlabN | ( | mat_t * | mat, | |
z_stream * | z, | |||
void * | data, | |||
int | class_type, | |||
int | data_type, | |||
int | rank, | |||
int * | dims, | |||
int * | start, | |||
int * | stride, | |||
int * | edge | |||
) |
mat | MAT file pointer | |
z | zlib compression stream | |
data | Pointer to store the output data | |
class_type | Type of data class (matio_classes enumerations) | |
data_type | Datatype of the stored data (matio_types enumerations) | |
rank | Number of dimensions in the data | |
dims | Dimensions of the data | |
start | Index to start reading data in each dimension | |
stride | Read every stride elements in each dimension | |
edge | Number of elements to read in each dimension |
Number | of bytes read from the file, or -1 on error |
References mat_t::fp, InflateSkipData(), MAT_C_DOUBLE, MAT_C_INT16, MAT_C_INT32, MAT_C_INT64, MAT_C_INT8, MAT_C_SINGLE, MAT_C_UINT16, MAT_C_UINT32, MAT_C_UINT64, MAT_C_UINT8, ReadCompressedDoubleData(), ReadCompressedInt16Data(), ReadCompressedInt32Data(), ReadCompressedInt64Data(), ReadCompressedInt8Data(), ReadCompressedSingleData(), ReadCompressedUInt16Data(), ReadCompressedUInt32Data(), ReadCompressedUInt64Data(), and ReadCompressedUInt8Data().
Referenced by ReadData5().
int ReadCompressedDoubleData | ( | mat_t * | mat, | |
z_stream * | z, | |||
double * | data, | |||
int | data_type, | |||
int | len | |||
) |
Reads from the MAT file len
compressed elements of data type data_type
storing them as double's in data
.
mat | MAT file pointer | |
z | Pointer to the zlib stream for inflation | |
data | Pointer to store the output double values (len*sizeof(double)) | |
data_type | one of the matio_types enumerations which is the source data type in the file | |
len | Number of elements of type data_type to read from the file |
Number | of bytes read from the file |
References mat_t::byteswap, InflateData(), Mat_doubleSwap(), Mat_int16Swap(), Mat_int32Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT8, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT8, Mat_uint16Swap(), and Mat_uint32Swap().
Referenced by Mat_VarReadDataLinear(), Read5(), ReadCompressedDataSlab2(), and ReadCompressedDataSlabN().
int ReadCompressedInt16Data | ( | mat_t * | mat, | |
z_stream * | z, | |||
mat_int16_t * | data, | |||
int | data_type, | |||
int | len | |||
) |
Reads from the MAT file len
compressed elements of data type data_type
storing them as signed 16-bit integers in data
.
mat | MAT file pointer | |
z | Pointer to the zlib stream for inflation | |
data | Pointer to store the output signed 16-bit integer values (len*sizeof(mat_int16_t)) | |
data_type | one of the matio_types enumerations which is the source data type in the file | |
len | Number of elements of type data_type to read from the file |
Number | of bytes read from the file |
References mat_t::byteswap, InflateData(), Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT8, Mat_uint16Swap(), and Mat_uint32Swap().
Referenced by Mat_VarReadDataLinear(), Read5(), ReadCompressedDataSlab2(), and ReadCompressedDataSlabN().
int ReadCompressedInt32Data | ( | mat_t * | mat, | |
z_stream * | z, | |||
mat_int32_t * | data, | |||
int | data_type, | |||
int | len | |||
) |
Reads from the MAT file len
compressed elements of data type data_type
storing them as signed 32-bit integers in data
.
mat | MAT file pointer | |
z | Pointer to the zlib stream for inflation | |
data | Pointer to store the output signed 32-bit integer values (len*sizeof(mat_int32_t)) | |
data_type | one of the matio_types enumerations which is the source data type in the file | |
len | Number of elements of type data_type to read from the file |
Number | of bytes read from the file |
References mat_t::byteswap, InflateData(), Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT8, Mat_uint16Swap(), and Mat_uint32Swap().
Referenced by Mat_VarReadDataLinear(), Read5(), ReadCompressedDataSlab2(), and ReadCompressedDataSlabN().
int ReadCompressedInt64Data | ( | mat_t * | mat, | |
z_stream * | z, | |||
mat_int64_t * | data, | |||
int | data_type, | |||
int | len | |||
) |
Reads from the MAT file len
compressed elements of data type data_type
storing them as signed 64-bit integers in data
.
mat | MAT file pointer | |
z | Pointer to the zlib stream for inflation | |
data | Pointer to store the output signed 64-bit integer values (len*sizeof(mat_int64_t)) | |
data_type | one of the matio_types enumerations which is the source data type in the file | |
len | Number of elements of type data_type to read from the file |
Number | of bytes read from the file |
References mat_t::byteswap, InflateData(), Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), Mat_int64Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT64, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT64, MAT_T_UINT8, Mat_uint16Swap(), Mat_uint32Swap(), and Mat_uint64Swap().
Referenced by Mat_VarReadDataLinear(), Read5(), ReadCompressedDataSlab2(), and ReadCompressedDataSlabN().
int ReadCompressedInt8Data | ( | mat_t * | mat, | |
z_stream * | z, | |||
mat_int8_t * | data, | |||
int | data_type, | |||
int | len | |||
) |
Reads from the MAT file len
compressed elements of data type data_type
storing them as signed 8-bit integers in data
.
mat | MAT file pointer | |
z | Pointer to the zlib stream for inflation | |
data | Pointer to store the output signed 8-bit integer values (len*sizeof(mat_int8_t)) | |
data_type | one of the matio_types enumerations which is the source data type in the file | |
len | Number of elements of type data_type to read from the file |
Number | of bytes read from the file |
References mat_t::byteswap, InflateData(), Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT8, Mat_uint16Swap(), and Mat_uint32Swap().
Referenced by Mat_VarReadDataLinear(), Read5(), ReadCompressedDataSlab2(), and ReadCompressedDataSlabN().
int ReadCompressedSingleData | ( | mat_t * | mat, | |
z_stream * | z, | |||
float * | data, | |||
int | data_type, | |||
int | len | |||
) |
Reads from the MAT file len
compressed elements of data type data_type
storing them as float's in data
.
mat | MAT file pointer | |
z | Pointer to the zlib stream for inflation | |
data | Pointer to store the output float values (len*sizeof(float)) | |
data_type | one of the matio_types enumerations which is the source data type in the file | |
len | Number of elements of type data_type to read from the file |
Number | of bytes read from the file |
References mat_t::byteswap, InflateData(), Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT8, Mat_uint16Swap(), and Mat_uint32Swap().
Referenced by Mat_VarReadDataLinear(), Read5(), ReadCompressedDataSlab2(), and ReadCompressedDataSlabN().
int ReadCompressedUInt16Data | ( | mat_t * | mat, | |
z_stream * | z, | |||
mat_uint16_t * | data, | |||
int | data_type, | |||
int | len | |||
) |
Reads from the MAT file len
compressed elements of data type data_type
storing them as unsigned 16-bit integers in data
.
mat | MAT file pointer | |
z | Pointer to the zlib stream for inflation | |
data | Pointer to store the output n unsigned 16-bit integer values (len*sizeof(mat_uint16_t)) | |
data_type | one of the matio_types enumerations which is the source data type in the file | |
len | Number of elements of type data_type to read from the file |
Number | of bytes read from the file |
References mat_t::byteswap, InflateData(), Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT8, Mat_uint16Swap(), and Mat_uint32Swap().
Referenced by Read5(), ReadCompressedDataSlab2(), and ReadCompressedDataSlabN().
int ReadCompressedUInt32Data | ( | mat_t * | mat, | |
z_stream * | z, | |||
mat_uint32_t * | data, | |||
int | data_type, | |||
int | len | |||
) |
Reads from the MAT file len
compressed elements of data type data_type
storing them as unsigned 32-bit integers in data
.
mat | MAT file pointer | |
z | Pointer to the zlib stream for inflation | |
data | Pointer to store the output unsigned 32-bit integer values (len*sizeof(mat_uint32_t)) | |
data_type | one of the matio_types enumerations which is the source data type in the file | |
len | Number of elements of type data_type to read from the file |
Number | of bytes read from the file |
References mat_t::byteswap, InflateData(), Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT8, Mat_uint16Swap(), and Mat_uint32Swap().
Referenced by Read5(), ReadCompressedDataSlab2(), and ReadCompressedDataSlabN().
int ReadCompressedUInt64Data | ( | mat_t * | mat, | |
z_stream * | z, | |||
mat_uint64_t * | data, | |||
int | data_type, | |||
int | len | |||
) |
Reads from the MAT file len
compressed elements of data type data_type
storing them as unsigned 64-bit integers in data
.
mat | MAT file pointer | |
z | Pointer to the zlib stream for inflation | |
data | Pointer to store the output unsigned 64-bit integer values (len*sizeof(mat_uint64_t)) | |
data_type | one of the matio_types enumerations which is the source data type in the file | |
len | Number of elements of type data_type to read from the file |
Number | of bytes read from the file |
References mat_t::byteswap, InflateData(), Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), Mat_int64Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT64, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT64, MAT_T_UINT8, Mat_uint16Swap(), Mat_uint32Swap(), and Mat_uint64Swap().
Referenced by ReadCompressedDataSlab2(), and ReadCompressedDataSlabN().
int ReadCompressedUInt8Data | ( | mat_t * | mat, | |
z_stream * | z, | |||
mat_uint8_t * | data, | |||
int | data_type, | |||
int | len | |||
) |
Reads from the MAT file len
compressed elements of data type data_type
storing them as unsigned 8-bit integers in data
.
mat | MAT file pointer | |
z | Pointer to the zlib stream for inflation | |
data | Pointer to store the output 8-bit integer values (len*sizeof(mat_uint8_t)) | |
data_type | one of the matio_types enumerations which is the source data type in the file | |
len | Number of elements of type data_type to read from the file |
Number | of bytes read from the file |
References mat_t::byteswap, InflateData(), Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT8, Mat_uint16Swap(), and Mat_uint32Swap().
Referenced by Read5(), ReadCompressedDataSlab2(), and ReadCompressedDataSlabN().
int ReadData5 | ( | mat_t * | mat, | |
matvar_t * | matvar, | |||
void * | data, | |||
int * | start, | |||
int * | stride, | |||
int * | edge | |||
) |
mat | MAT file pointer | |
matvar | pointer to the mat variable | |
data | pointer to store the read data in (must be of size edge[0]*...edge[rank-1]*Mat_SizeOfClass(matvar->class_type)) | |
start | index to start reading data in each dimension | |
stride | write data every stride elements in each dimension | |
edge | number of elements to read in each dimension |
0 | on success |
References mat_t::byteswap, matvar_t::class_type, matvar_t::compression, COMPRESSION_NONE, COMPRESSION_ZLIB, matvar_t::data_size, matvar_t::data_type, matvar_t::datapos, matvar_t::dims, mat_t::fp, ComplexSplit::Im, InflateDataType(), InflateSkip(), matvar_t::isComplex, MAT_C_DOUBLE, MAT_C_INT16, MAT_C_INT32, MAT_C_INT64, MAT_C_INT8, MAT_C_SINGLE, MAT_C_UINT16, MAT_C_UINT32, MAT_C_UINT64, MAT_C_UINT8, Mat_int32Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT64, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT64, MAT_T_UINT8, matvar_t::rank, ComplexSplit::Re, ReadCompressedDataSlab2(), ReadCompressedDataSlabN(), ReadDataSlab2(), ReadDataSlabN(), and matvar_t::z.
Referenced by Mat_VarReadData().
int ReadDataSlab2 | ( | mat_t * | mat, | |
void * | data, | |||
int | class_type, | |||
int | data_type, | |||
int * | dims, | |||
int * | start, | |||
int * | stride, | |||
int * | edge | |||
) |
mat | MAT file pointer | |
data | Pointer to store the output data | |
class_type | Type of data class (matio_classes enumerations) | |
data_type | Datatype of the stored data (matio_types enumerations) | |
dims | Dimensions of the data | |
start | Index to start reading data in each dimension | |
stride | Read every stride elements in each dimension | |
edge | Number of elements to read in each dimension |
Number | of bytes read from the file, or -1 on error |
References mat_t::fp, MAT_C_DOUBLE, MAT_C_INT16, MAT_C_INT32, MAT_C_INT64, MAT_C_INT8, MAT_C_SINGLE, MAT_C_UINT16, MAT_C_UINT32, MAT_C_UINT64, MAT_C_UINT8, ReadDoubleData(), ReadInt16Data(), ReadInt32Data(), ReadInt64Data(), ReadInt8Data(), ReadSingleData(), ReadUInt16Data(), ReadUInt32Data(), ReadUInt64Data(), and ReadUInt8Data().
Referenced by ReadData5().
int ReadDataSlabN | ( | mat_t * | mat, | |
void * | data, | |||
int | class_type, | |||
int | data_type, | |||
int | rank, | |||
int * | dims, | |||
int * | start, | |||
int * | stride, | |||
int * | edge | |||
) |
mat | MAT file pointer | |
data | Pointer to store the output data | |
class_type | Type of data class (matio_classes enumerations) | |
data_type | Datatype of the stored data (matio_types enumerations) | |
rank | Number of dimensions in the data | |
dims | Dimensions of the data | |
start | Index to start reading data in each dimension | |
stride | Read every stride elements in each dimension | |
edge | Number of elements to read in each dimension |
Number | of bytes read from the file, or -1 on error |
References mat_t::fp, MAT_C_DOUBLE, MAT_C_INT16, MAT_C_INT32, MAT_C_INT64, MAT_C_INT8, MAT_C_SINGLE, MAT_C_UINT16, MAT_C_UINT32, MAT_C_UINT64, MAT_C_UINT8, ReadDoubleData(), ReadInt16Data(), ReadInt32Data(), ReadInt64Data(), ReadInt8Data(), ReadSingleData(), ReadUInt16Data(), ReadUInt32Data(), ReadUInt64Data(), and ReadUInt8Data().
Referenced by ReadData5().
int ReadDoubleData | ( | mat_t * | mat, | |
double * | data, | |||
int | data_type, | |||
int | len | |||
) |
Reads from the MAT file len
elements of data type data_type
storing them as double's in data
.
mat | MAT file pointer | |
data | Pointer to store the output double values (len*sizeof(double)) | |
data_type | one of the matio_types enumerations which is the source data type in the file | |
len | Number of elements of type data_type to read from the file |
Number | of bytes read from the file |
References mat_t::byteswap, mat_t::fp, Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT8, Mat_uint16Swap(), and Mat_uint32Swap().
Referenced by Mat_VarReadDataLinear(), Read5(), ReadDataSlab2(), and ReadDataSlabN().
int ReadInt16Data | ( | mat_t * | mat, | |
mat_int16_t * | data, | |||
int | data_type, | |||
int | len | |||
) |
Reads from the MAT file len
elements of data type data_type
storing them as signed 16-bit integers in data
.
mat | MAT file pointer | |
data | Pointer to store the output signed 16-bit integer values (len*sizeof(mat_int16_t)) | |
data_type | one of the matio_types enumerations which is the source data type in the file | |
len | Number of elements of type data_type to read from the file |
Number | of bytes read from the file |
References mat_t::byteswap, mat_t::fp, Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT8, Mat_uint16Swap(), and Mat_uint32Swap().
Referenced by Mat_VarReadDataLinear(), Read5(), ReadDataSlab2(), and ReadDataSlabN().
int ReadInt32Data | ( | mat_t * | mat, | |
mat_int32_t * | data, | |||
int | data_type, | |||
int | len | |||
) |
Reads from the MAT file len
elements of data type data_type
storing them as signed 32-bit integers in data
.
mat | MAT file pointer | |
data | Pointer to store the output signed 32-bit integer values (len*sizeof(mat_int32_t)) | |
data_type | one of the matio_types enumerations which is the source data type in the file | |
len | Number of elements of type data_type to read from the file |
Number | of bytes read from the file |
References mat_t::byteswap, mat_t::fp, Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT8, Mat_uint16Swap(), and Mat_uint32Swap().
Referenced by Mat_VarReadDataLinear(), Read5(), ReadDataSlab2(), and ReadDataSlabN().
int ReadInt64Data | ( | mat_t * | mat, | |
mat_int64_t * | data, | |||
int | data_type, | |||
int | len | |||
) |
Reads from the MAT file len
elements of data type data_type
storing them as signed 64-bit integers in data
.
mat | MAT file pointer | |
data | Pointer to store the output signed 64-bit integer values (len*sizeof(mat_int64_t)) | |
data_type | one of the matio_types enumerations which is the source data type in the file | |
len | Number of elements of type data_type to read from the file |
Number | of bytes read from the file |
References mat_t::byteswap, mat_t::fp, Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), Mat_int64Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT64, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT64, MAT_T_UINT8, Mat_uint16Swap(), Mat_uint32Swap(), and Mat_uint64Swap().
Referenced by Mat_VarReadDataLinear(), Read5(), ReadDataSlab2(), and ReadDataSlabN().
int ReadInt8Data | ( | mat_t * | mat, | |
mat_int8_t * | data, | |||
int | data_type, | |||
int | len | |||
) |
Reads from the MAT file len
elements of data type data_type
storing them as signed 8-bit integers in data
.
mat | MAT file pointer | |
data | Pointer to store the output signed 8-bit integer values (len*sizeof(mat_int8_t)) | |
data_type | one of the matio_types enumerations which is the source data type in the file | |
len | Number of elements of type data_type to read from the file |
Number | of bytes read from the file |
References mat_t::byteswap, mat_t::fp, Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT8, Mat_uint16Swap(), and Mat_uint32Swap().
Referenced by Mat_VarReadDataLinear(), Read5(), ReadDataSlab2(), and ReadDataSlabN().
mat | MAT file pointer | |
matvar | MAT variable pointer |
References mat_t::byteswap, matvar_t::class_type, matvar_t::compression, matvar_t::data, matvar_t::data_size, matvar_t::datapos, matvar_t::dims, mat_t::fp, matvar_t::fpos, InflateArrayFlags(), InflateDimensions(), InflateSkip(), InflateVarNameTag(), InflateVarTag(), matvar_t::isComplex, matvar_t::isGlobal, matvar_t::isLogical, MAT_C_CELL, MAT_C_SPARSE, MAT_C_STRUCT, MAT_F_CLASS_T, MAT_F_COMPLEX, MAT_F_GLOBAL, MAT_F_LOGICAL, MAT_T_INT32, MAT_T_MATRIX, MAT_T_UINT32, Mat_uint32Swap(), Mat_VarCalloc(), Mat_VarFree(), matvar_t::name, matvar_t::nbytes, matvar_t::rank, ReadNextCell(), ReadNextStructField(), and matvar_t::z.
Referenced by Mat_VarReadNextInfo5(), ReadNextCell(), and ReadNextStructField().
mat | MAT file pointer | |
matvar | MAT variable pointer |
References matvar_t::data, matvar_t::data_size, matvar_t::dims, Mat_VarReadNextInfo(), matvar_t::nbytes, and matvar_t::rank.
Referenced by Mat_VarReadNextInfo5().
Reads the next struct fields (fieldname length,names,data headers for all the fields
mat | MAT file pointer | |
matvar | MAT variable pointer |
References mat_t::byteswap, matvar_t::class_type, matvar_t::compression, COMPRESSION_ZLIB, matvar_t::data, matvar_t::data_size, matvar_t::datapos, matvar_t::dims, mat_t::fp, matvar_t::fpos, InflateArrayFlags(), InflateDimensions(), InflateFieldNameLength(), InflateFieldNames(), InflateFieldNamesTag(), InflateSkip(), InflateVarNameTag(), InflateVarTag(), matvar_t::isComplex, matvar_t::isGlobal, matvar_t::isLogical, MAT_C_CELL, MAT_C_SPARSE, MAT_C_STRUCT, MAT_F_CLASS_T, MAT_F_COMPLEX, MAT_F_GLOBAL, MAT_F_LOGICAL, MAT_T_INT32, MAT_T_MATRIX, MAT_T_UINT32, Mat_uint32Swap(), Mat_VarFree(), matvar_t::name, matvar_t::nbytes, matvar_t::rank, ReadNextCell(), ReadNextStructField(), and matvar_t::z.
Referenced by Mat_VarReadNextInfo5(), ReadNextCell(), and ReadNextStructField().
int ReadSingleData | ( | mat_t * | mat, | |
float * | data, | |||
int | data_type, | |||
int | len | |||
) |
Reads from the MAT file len
elements of data type data_type
storing them as float's in data
.
mat | MAT file pointer | |
data | Pointer to store the output float values (len*sizeof(float)) | |
data_type | one of the matio_types enumerations which is the source data type in the file | |
len | Number of elements of type data_type to read from the file |
Number | of bytes read from the file |
References mat_t::byteswap, mat_t::fp, Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT8, Mat_uint16Swap(), and Mat_uint32Swap().
Referenced by Mat_VarReadDataLinear(), Read5(), ReadDataSlab2(), and ReadDataSlabN().
int ReadUInt16Data | ( | mat_t * | mat, | |
mat_uint16_t * | data, | |||
int | data_type, | |||
int | len | |||
) |
Reads from the MAT file len
elements of data type data_type
storing them as unsigned 16-bit integers in data
.
mat | MAT file pointer | |
data | Pointer to store the output unsigned 16-bit integer values (len*sizeof(mat_uint16_t)) | |
data_type | one of the matio_types enumerations which is the source data type in the file | |
len | Number of elements of type data_type to read from the file |
Number | of bytes read from the file |
References mat_t::byteswap, mat_t::fp, Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT8, Mat_uint16Swap(), and Mat_uint32Swap().
Referenced by Read5(), ReadDataSlab2(), and ReadDataSlabN().
int ReadUInt32Data | ( | mat_t * | mat, | |
mat_uint32_t * | data, | |||
int | data_type, | |||
int | len | |||
) |
Reads from the MAT file len
elements of data type data_type
storing them as unsigned 32-bit integers in data
.
mat | MAT file pointer | |
data | Pointer to store the output unsigned 32-bit integer values (len*sizeof(mat_uint32_t)) | |
data_type | one of the matio_types enumerations which is the source data type in the file | |
len | Number of elements of type data_type to read from the file |
Number | of bytes read from the file |
References mat_t::byteswap, mat_t::fp, Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT8, Mat_uint16Swap(), and Mat_uint32Swap().
Referenced by Read5(), ReadDataSlab2(), and ReadDataSlabN().
int ReadUInt64Data | ( | mat_t * | mat, | |
mat_uint64_t * | data, | |||
int | data_type, | |||
int | len | |||
) |
Reads from the MAT file len
elements of data type data_type
storing them as unsigned 64-bit integers in data
.
mat | MAT file pointer | |
data | Pointer to store the output unsigned 64-bit integer values (len*sizeof(mat_uint64_t)) | |
data_type | one of the matio_types enumerations which is the source data type in the file | |
len | Number of elements of type data_type to read from the file |
Number | of bytes read from the file |
References mat_t::byteswap, mat_t::fp, Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), Mat_int64Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT64, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT64, MAT_T_UINT8, Mat_uint16Swap(), Mat_uint32Swap(), and Mat_uint64Swap().
Referenced by ReadDataSlab2(), and ReadDataSlabN().
int ReadUInt8Data | ( | mat_t * | mat, | |
mat_uint8_t * | data, | |||
int | data_type, | |||
int | len | |||
) |
Reads from the MAT file len
elements of data type data_type
storing them as unsigned 8-bit integers in data
.
mat | MAT file pointer | |
data | Pointer to store the output unsigned 8-bit integer values (len*sizeof(mat_uint8_t)) | |
data_type | one of the matio_types enumerations which is the source data type in the file | |
len | Number of elements of type data_type to read from the file |
Number | of bytes read from the file |
References mat_t::byteswap, mat_t::fp, Mat_doubleSwap(), Mat_floatSwap(), Mat_int16Swap(), Mat_int32Swap(), MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT8, Mat_uint16Swap(), and Mat_uint32Swap().
Referenced by Read5(), ReadDataSlab2(), and ReadDataSlabN().
mat | MAT file pointer | |
matvar | pointer to the mat variable | |
compress | option to compress the variable (only works for numeric types) |
0 | on success |
References matvar_t::class_type, COMPRESSION_NONE, COMPRESSION_ZLIB, sparse_t::data, matvar_t::data, matvar_t::data_size, matvar_t::data_type, matvar_t::datapos, matvar_t::dims, mat_t::fp, ComplexSplit::Im, sparse_t::ir, matvar_t::isComplex, matvar_t::isGlobal, matvar_t::isLogical, sparse_t::jc, MAT_C_CELL, MAT_C_CHAR, MAT_C_DOUBLE, MAT_C_INT16, MAT_C_INT32, MAT_C_INT64, MAT_C_INT8, MAT_C_SINGLE, MAT_C_SPARSE, MAT_C_STRUCT, MAT_C_UINT16, MAT_C_UINT32, MAT_C_UINT64, MAT_C_UINT8, MAT_F_CLASS_T, MAT_F_COMPLEX, MAT_F_GLOBAL, MAT_F_LOGICAL, MAT_T_COMPRESSED, MAT_T_INT32, MAT_T_INT8, MAT_T_MATRIX, MAT_T_UINT32, matvar_t::name, matvar_t::nbytes, sparse_t::ndata, sparse_t::nir, sparse_t::njc, matvar_t::rank, ComplexSplit::Re, WriteCellArrayField(), WriteCharData(), WriteCompressedCellArrayField(), WriteCompressedCharData(), WriteCompressedStructField(), WriteData(), WriteStructField(), and matvar_t::z.
Referenced by Mat_VarWrite().
mat | MAT file pointer | |
matvar | pointer to the mat variable |
0 | on success |
References mat_t::byteswap, matvar_t::class_type, sparse_t::data, matvar_t::data, matvar_t::data_size, matvar_t::data_type, matvar_t::dims, mat_t::fp, ComplexSplit::Im, sparse_t::ir, matvar_t::isComplex, matvar_t::isGlobal, matvar_t::isLogical, sparse_t::jc, MAT_C_CELL, MAT_C_CHAR, MAT_C_DOUBLE, MAT_C_INT16, MAT_C_INT32, MAT_C_INT64, MAT_C_INT8, MAT_C_SINGLE, MAT_C_SPARSE, MAT_C_STRUCT, MAT_C_UINT16, MAT_C_UINT32, MAT_C_UINT64, MAT_C_UINT8, MAT_F_CLASS_T, MAT_F_COMPLEX, MAT_F_GLOBAL, MAT_F_LOGICAL, Mat_int32Swap(), MAT_T_INT32, MAT_T_INT8, MAT_T_MATRIX, MAT_T_UINT32, matvar_t::name, matvar_t::nbytes, sparse_t::ndata, sparse_t::nir, sparse_t::njc, matvar_t::rank, ComplexSplit::Re, WriteCellArrayField(), WriteCharData(), WriteData(), and WriteStructField().
Referenced by Write5(), WriteCellArrayField(), and WriteStructField().
mat | MAT file pointer | |
matvar | pointer to the mat variable |
References mat_t::byteswap, matvar_t::class_type, matvar_t::data, matvar_t::data_size, matvar_t::data_type, matvar_t::datapos, matvar_t::dims, mat_t::fp, matvar_t::isComplex, matvar_t::isGlobal, matvar_t::isLogical, MAT_C_CELL, MAT_C_CHAR, MAT_C_DOUBLE, MAT_C_INT16, MAT_C_INT32, MAT_C_INT64, MAT_C_INT8, MAT_C_SINGLE, MAT_C_UINT16, MAT_C_UINT32, MAT_C_UINT64, MAT_C_UINT8, MAT_F_CLASS_T, MAT_F_COMPLEX, MAT_F_GLOBAL, MAT_F_LOGICAL, Mat_int32Swap(), MAT_T_INT32, MAT_T_INT8, MAT_T_MATRIX, MAT_T_UINT32, matvar_t::name, matvar_t::nbytes, matvar_t::rank, WriteCellArrayFieldInfo(), and WriteEmptyCharData().
Referenced by WriteCellArrayFieldInfo(), and WriteInfo5().
int WriteCharData | ( | mat_t * | mat, | |
void * | data, | |||
int | N, | |||
int | data_type | |||
) |
This function uses the knowledge that the data is part of a character class to avoid some pitfalls with Matlab listed below.
mat | MAT file pointer | |
data | character data to write | |
N | Number of elements to write | |
data_type | character data type (enum matio_types) |
References mat_t::fp, MAT_T_INT8, MAT_T_UINT16, MAT_T_UINT8, and MAT_T_UTF8.
Referenced by Write5(), WriteCellArrayField(), and WriteStructField().
int WriteCharDataSlab2 | ( | mat_t * | mat, | |
void * | data, | |||
int | data_type, | |||
int * | dims, | |||
int * | start, | |||
int * | stride, | |||
int * | edge | |||
) |
Writes | a 2-D slab of character data to the MAT file |
This function uses the knowledge that the data is part of a character class to avoid some pitfalls with Matlab listed below.
should return the number of bytes written, but currently returns 0
mat | MAT file pointer | |
data | pointer to the slab of data | |
data_type | data type of the data (enum matio_types) | |
dims | dimensions of the dataset | |
start | index to start writing the data in each dimension | |
stride | write data every stride elements | |
edge | number of elements to write in each dimension |
References mat_t::fp, MAT_T_INT8, MAT_T_UINT16, MAT_T_UINT8, and MAT_T_UTF8.
Referenced by Mat_VarWriteData().
mat | MAT file pointer | |
matvar | pointer to the mat variable |
References matvar_t::class_type, sparse_t::data, matvar_t::data, matvar_t::data_size, matvar_t::data_type, matvar_t::datapos, matvar_t::dims, mat_t::fp, ComplexSplit::Im, sparse_t::ir, matvar_t::isComplex, matvar_t::isGlobal, matvar_t::isLogical, sparse_t::jc, MAT_C_CELL, MAT_C_CHAR, MAT_C_DOUBLE, MAT_C_INT16, MAT_C_INT32, MAT_C_INT64, MAT_C_INT8, MAT_C_SINGLE, MAT_C_SPARSE, MAT_C_STRUCT, MAT_C_UINT16, MAT_C_UINT32, MAT_C_UINT64, MAT_C_UINT8, MAT_F_CLASS_T, MAT_F_COMPLEX, MAT_F_GLOBAL, MAT_F_LOGICAL, MAT_T_INT32, MAT_T_INT8, MAT_T_MATRIX, MAT_T_UINT32, matvar_t::name, matvar_t::nbytes, sparse_t::ndata, sparse_t::nir, sparse_t::njc, matvar_t::rank, ComplexSplit::Re, WriteCompressedCellArrayField(), WriteCompressedCharData(), and WriteCompressedStructField().
Referenced by Write5(), WriteCompressedCellArrayField(), and WriteCompressedStructField().
size_t WriteCompressedCharData | ( | mat_t * | mat, | |
z_stream * | z, | |||
void * | data, | |||
int | N, | |||
int | data_type | |||
) |
This function uses the knowledge that the data is part of a character class to avoid some pitfalls with Matlab listed below.
mat | MAT file pointer | |
z | pointer to the zlib compression stream | |
data | character data to write | |
N | Number of elements to write | |
data_type | character data type (enum matio_types) |
References mat_t::fp, MAT_T_INT8, MAT_T_UINT16, MAT_T_UINT8, and MAT_T_UTF8.
Referenced by Write5(), WriteCompressedCellArrayField(), and WriteCompressedStructField().
Currently does not work for cell arrays or sparse data
mat | MAT file pointer | |
matvar | pointer to the mat variable |
References matvar_t::class_type, sparse_t::data, matvar_t::data, matvar_t::data_size, matvar_t::data_type, matvar_t::datapos, matvar_t::dims, mat_t::fp, ComplexSplit::Im, sparse_t::ir, matvar_t::isComplex, matvar_t::isGlobal, matvar_t::isLogical, sparse_t::jc, MAT_C_CELL, MAT_C_CHAR, MAT_C_DOUBLE, MAT_C_INT16, MAT_C_INT32, MAT_C_INT64, MAT_C_INT8, MAT_C_SINGLE, MAT_C_SPARSE, MAT_C_STRUCT, MAT_C_UINT16, MAT_C_UINT32, MAT_C_UINT64, MAT_C_UINT8, MAT_F_CLASS_T, MAT_F_COMPLEX, MAT_F_GLOBAL, MAT_F_LOGICAL, MAT_T_INT32, MAT_T_INT8, MAT_T_MATRIX, MAT_T_UINT32, matvar_t::name, matvar_t::nbytes, sparse_t::ndata, sparse_t::nir, sparse_t::njc, matvar_t::rank, ComplexSplit::Re, WriteCompressedCellArrayField(), WriteCompressedCharData(), and WriteCompressedStructField().
Referenced by Write5(), WriteCompressedCellArrayField(), and WriteCompressedStructField().
int WriteDataSlab2 | ( | mat_t * | mat, | |
void * | data, | |||
int | data_type, | |||
int * | dims, | |||
int * | start, | |||
int * | stride, | |||
int * | edge | |||
) |
Writes | a 2-D slab of data to the MAT file |
should return the number of bytes written, but currently returns 0
mat | MAT file pointer | |
data | pointer to the slab of data | |
data_type | data type of the data (enum matio_types) | |
dims | dimensions of the dataset | |
start | index to start writing the data in each dimension | |
stride | write data every stride elements | |
edge | number of elements to write in each dimension |
References mat_t::fp, MAT_T_DOUBLE, MAT_T_INT16, MAT_T_INT32, MAT_T_INT64, MAT_T_INT8, MAT_T_SINGLE, MAT_T_UINT16, MAT_T_UINT32, MAT_T_UINT64, and MAT_T_UINT8.
Referenced by Mat_VarWriteData().
int WriteEmptyCharData | ( | mat_t * | mat, | |
int | N, | |||
int | data_type | |||
) |
This function uses the knowledge that the data is part of a character class to avoid some pitfalls with Matlab listed below.
mat | MAT file pointer | |
data | character data to write | |
N | Number of elements to write | |
data_type | character data type (enum matio_types) |
References mat_t::fp, MAT_T_INT8, MAT_T_UINT16, MAT_T_UINT8, and MAT_T_UTF8.
Referenced by WriteCellArrayFieldInfo(), and WriteInfo5().
mat | MAT file pointer | |
matvar | pointer to the mat variable |
References matvar_t::class_type, matvar_t::compression, COMPRESSION_NONE, COMPRESSION_ZLIB, matvar_t::data, matvar_t::data_size, matvar_t::data_type, matvar_t::datapos, matvar_t::dims, mat_t::fp, matvar_t::isComplex, matvar_t::isGlobal, matvar_t::isLogical, MAT_C_CELL, MAT_C_CHAR, MAT_C_DOUBLE, MAT_C_INT16, MAT_C_INT32, MAT_C_INT64, MAT_C_INT8, MAT_C_SINGLE, MAT_C_SPARSE, MAT_C_STRUCT, MAT_C_UINT16, MAT_C_UINT32, MAT_C_UINT64, MAT_C_UINT8, MAT_F_CLASS_T, MAT_F_COMPLEX, MAT_F_GLOBAL, MAT_F_LOGICAL, MAT_T_COMPRESSED, MAT_T_INT32, MAT_T_INT8, MAT_T_MATRIX, MAT_T_UINT32, matvar_t::name, matvar_t::nbytes, matvar_t::rank, WriteCellArrayFieldInfo(), WriteEmptyCharData(), WriteInfo5(), and matvar_t::z.
Referenced by Mat_VarWriteInfo(), and WriteInfo5().
mat | MAT file pointer | |
matvar | pointer to the mat variable |
0 | on success |
References mat_t::byteswap, matvar_t::class_type, sparse_t::data, matvar_t::data, matvar_t::data_size, matvar_t::data_type, matvar_t::dims, mat_t::fp, ComplexSplit::Im, sparse_t::ir, matvar_t::isComplex, matvar_t::isGlobal, matvar_t::isLogical, sparse_t::jc, MAT_C_CELL, MAT_C_CHAR, MAT_C_DOUBLE, MAT_C_INT16, MAT_C_INT32, MAT_C_INT64, MAT_C_INT8, MAT_C_SINGLE, MAT_C_SPARSE, MAT_C_STRUCT, MAT_C_UINT16, MAT_C_UINT32, MAT_C_UINT64, MAT_C_UINT8, MAT_F_CLASS_T, MAT_F_COMPLEX, MAT_F_GLOBAL, MAT_F_LOGICAL, Mat_int32Swap(), MAT_T_INT32, MAT_T_INT8, MAT_T_MATRIX, MAT_T_UINT32, matvar_t::name, matvar_t::nbytes, sparse_t::ndata, sparse_t::nir, sparse_t::njc, matvar_t::rank, ComplexSplit::Re, WriteCellArrayField(), WriteCharData(), WriteData(), and WriteStructField().
Referenced by Write5(), WriteCellArrayField(), and WriteStructField().