#include <cstring>
#include <iomanip>
#include <istream>
#include <limits>
#include <ostream>
#include <sstream>
#include <string>
#include <vector>
#include "byte-swap.h"
#include "dMatrix.h"
#include "data-conv.h"
#include "file-ops.h"
#include "file-stat.h"
#include "glob-match.h"
#include "lo-mappers.h"
#include "lo-sysdep.h"
#include "mach-info.h"
#include "oct-env.h"
#include "oct-locbuf.h"
#include "oct-time.h"
#include "quit.h"
#include "str-vec.h"
#include "unistr-wrappers.h"
#include "Cell.h"
#include "defaults.h"
#include "defun.h"
#include "error.h"
#include "errwarn.h"
#include "interpreter-private.h"
#include "interpreter.h"
#include "load-path.h"
#include "load-save.h"
#include "ls-mat5.h"
#include "ls-utils.h"
#include "oct-map.h"
#include "ov-cell.h"
#include "ov-class.h"
#include "ov.h"
#include "ovl.h"
#include "pager.h"
#include "parse.h"
#include "pt-eval.h"
#include "stack-frame.h"
#include "sysdep.h"
#include "unwind-prot.h"
#include "utils.h"
#include "variables.h"
#include "version.h"
#include <zlib.h>
Go to the source code of this file.
Macros | |
#define | INT8(l) ((l) == miINT8 || (l) == miUINT8 || (l) == miUTF8) |
#define | INT_LEN(nel, size) |
#define | MAT5_DO_WRITE(TYPE, data, count, stream) |
#define | OCTAVE_MAT5_INTEGER_READ(TYP) |
#define | PAD(l) (((l) > 0 && (l) <= 4) ? 4 : (((l)+7)/8)*8) |
#define | READ_INTEGER_DATA(TYPE, swap, data, size, len, stream) |
#define | READ_PAD(is_small_data_element, l) ((is_small_data_element) ? 4 : (((l)+7)/8)*8) |
Functions | |
std::string | read_mat5_binary_element (std::istream &is, const std::string &filename, bool swap, bool &global, octave_value &tc) |
int | read_mat5_binary_file_header (std::istream &is, bool &swap, bool quiet, const std::string &filename) |
template void | read_mat5_integer_data (std::istream &is, int *m, octave_idx_type count, bool swap, mat5_data_type type) |
template void | read_mat5_integer_data (std::istream &is, octave_int16 *m, octave_idx_type count, bool swap, mat5_data_type type) |
template void | read_mat5_integer_data (std::istream &is, octave_int32 *m, octave_idx_type count, bool swap, mat5_data_type type) |
template void | read_mat5_integer_data (std::istream &is, octave_int64 *m, octave_idx_type count, bool swap, mat5_data_type type) |
template void | read_mat5_integer_data (std::istream &is, octave_int8 *m, octave_idx_type count, bool swap, mat5_data_type type) |
template void | read_mat5_integer_data (std::istream &is, octave_uint16 *m, octave_idx_type count, bool swap, mat5_data_type type) |
template void | read_mat5_integer_data (std::istream &is, octave_uint32 *m, octave_idx_type count, bool swap, mat5_data_type type) |
template void | read_mat5_integer_data (std::istream &is, octave_uint64 *m, octave_idx_type count, bool swap, mat5_data_type type) |
template void | read_mat5_integer_data (std::istream &is, octave_uint8 *m, octave_idx_type count, bool swap, mat5_data_type type) |
template<typename T > | |
void | read_mat5_integer_data (std::istream &is, T *m, octave_idx_type count, bool swap, mat5_data_type type) |
int | save_mat5_array_length (const Complex *val, octave_idx_type nel, bool save_as_floats) |
int | save_mat5_array_length (const double *val, octave_idx_type nel, bool save_as_floats) |
int | save_mat5_array_length (const float *, octave_idx_type nel, bool) |
int | save_mat5_array_length (const FloatComplex *val, octave_idx_type nel, bool save_as_floats) |
bool | save_mat5_binary_element (std::ostream &os, const octave_value &tc, const std::string &name, bool mark_global, bool mat7_format, bool save_as_floats, bool compressing) |
int | save_mat5_element_length (const octave_value &tc, const std::string &name, bool save_as_floats, bool mat7_format) |
template void | write_mat5_integer_data (std::ostream &os, const int *m, int size, octave_idx_type nel) |
template void | write_mat5_integer_data (std::ostream &os, const octave_int16 *m, int size, octave_idx_type nel) |
template void | write_mat5_integer_data (std::ostream &os, const octave_int32 *m, int size, octave_idx_type nel) |
template void | write_mat5_integer_data (std::ostream &os, const octave_int64 *m, int size, octave_idx_type nel) |
template void | write_mat5_integer_data (std::ostream &os, const octave_int8 *m, int size, octave_idx_type nel) |
template void | write_mat5_integer_data (std::ostream &os, const octave_uint16 *m, int size, octave_idx_type nel) |
template void | write_mat5_integer_data (std::ostream &os, const octave_uint32 *m, int size, octave_idx_type nel) |
template void | write_mat5_integer_data (std::ostream &os, const octave_uint64 *m, int size, octave_idx_type nel) |
template void | write_mat5_integer_data (std::ostream &os, const octave_uint8 *m, int size, octave_idx_type nel) |
template<typename T > | |
void | write_mat5_integer_data (std::ostream &os, const T *m, int size, octave_idx_type nel) |
Definition at line 88 of file ls-mat5.cc.
#define INT_LEN | ( | nel, | |
size | |||
) |
#define MAT5_DO_WRITE | ( | TYPE, | |
data, | |||
count, | |||
stream | |||
) |
Definition at line 1637 of file ls-mat5.cc.
#define OCTAVE_MAT5_INTEGER_READ | ( | TYP | ) |
Definition at line 374 of file ls-mat5.cc.
#define PAD | ( | l | ) | (((l) > 0 && (l) <= 4) ? 4 : (((l)+7)/8)*8) |
Definition at line 87 of file ls-mat5.cc.
#define READ_PAD | ( | is_small_data_element, | |
l | |||
) | ((is_small_data_element) ? 4 : (((l)+7)/8)*8) |
Definition at line 86 of file ls-mat5.cc.
enum arrayclasstype |
Definition at line 101 of file ls-mat5.cc.
std::string read_mat5_binary_element | ( | std::istream & | is, |
const std::string & | filename, | ||
bool | swap, | ||
bool & | global, | ||
octave_value & | tc | ||
) |
Definition at line 479 of file ls-mat5.cc.
References flt_fmt_ieee_big_endian, flt_fmt_ieee_little_endian, flt_fmt_unknown, imag(), and native_float_format().
Referenced by read_mat5_binary_file_header().
int read_mat5_binary_file_header | ( | std::istream & | is, |
bool & | swap, | ||
bool | quiet, | ||
const std::string & | filename | ||
) |
Definition at line 1533 of file ls-mat5.cc.
References error(), octave_value::is_uint8_type(), Array< T, Alloc >::numel(), read_mat5_binary_element(), swap_bytes< 8 >(), octave_value::uint8_array_value(), and warning_with_id().
template void read_mat5_integer_data | ( | std::istream & | is, |
int * | m, | ||
octave_idx_type | count, | ||
bool | swap, | ||
mat5_data_type | type | ||
) |
template void read_mat5_integer_data | ( | std::istream & | is, |
octave_int16 * | m, | ||
octave_idx_type | count, | ||
bool | swap, | ||
mat5_data_type | type | ||
) |
template void read_mat5_integer_data | ( | std::istream & | is, |
octave_int32 * | m, | ||
octave_idx_type | count, | ||
bool | swap, | ||
mat5_data_type | type | ||
) |
template void read_mat5_integer_data | ( | std::istream & | is, |
octave_int64 * | m, | ||
octave_idx_type | count, | ||
bool | swap, | ||
mat5_data_type | type | ||
) |
template void read_mat5_integer_data | ( | std::istream & | is, |
octave_int8 * | m, | ||
octave_idx_type | count, | ||
bool | swap, | ||
mat5_data_type | type | ||
) |
template void read_mat5_integer_data | ( | std::istream & | is, |
octave_uint16 * | m, | ||
octave_idx_type | count, | ||
bool | swap, | ||
mat5_data_type | type | ||
) |
template void read_mat5_integer_data | ( | std::istream & | is, |
octave_uint32 * | m, | ||
octave_idx_type | count, | ||
bool | swap, | ||
mat5_data_type | type | ||
) |
template void read_mat5_integer_data | ( | std::istream & | is, |
octave_uint64 * | m, | ||
octave_idx_type | count, | ||
bool | swap, | ||
mat5_data_type | type | ||
) |
template void read_mat5_integer_data | ( | std::istream & | is, |
octave_uint8 * | m, | ||
octave_idx_type | count, | ||
bool | swap, | ||
mat5_data_type | type | ||
) |
void read_mat5_integer_data | ( | std::istream & | is, |
T * | m, | ||
octave_idx_type | count, | ||
bool | swap, | ||
mat5_data_type | type | ||
) |
Definition at line 259 of file ls-mat5.cc.
References m, miDOUBLE, miINT16, miINT32, miINT64, miINT8, miMATRIX, miRESERVE1, miRESERVE2, miRESERVE3, miSINGLE, miUINT16, miUINT32, miUINT64, miUINT8, and READ_INTEGER_DATA.
int save_mat5_array_length | ( | const Complex * | val, |
octave_idx_type | nel, | ||
bool | save_as_floats | ||
) |
Definition at line 2072 of file ls-mat5.cc.
References imag(), OCTAVE_LOCAL_BUFFER, real(), and save_mat5_array_length().
int save_mat5_array_length | ( | const double * | val, |
octave_idx_type | nel, | ||
bool | save_as_floats | ||
) |
Definition at line 1942 of file ls-mat5.cc.
References isfinite(), max(), and too_large_for_float().
Referenced by save_mat5_array_length().
int save_mat5_array_length | ( | const float * | , |
octave_idx_type | nel, | ||
bool | |||
) |
Definition at line 2016 of file ls-mat5.cc.
References PAD.
int save_mat5_array_length | ( | const FloatComplex * | val, |
octave_idx_type | nel, | ||
bool | save_as_floats | ||
) |
Definition at line 2093 of file ls-mat5.cc.
References imag(), OCTAVE_LOCAL_BUFFER, real(), and save_mat5_array_length().
bool save_mat5_binary_element | ( | std::ostream & | os, |
const octave_value & | tc, | ||
const std::string & | name, | ||
bool | mark_global, | ||
bool | mat7_format, | ||
bool | save_as_floats, | ||
bool | compressing | ||
) |
Definition at line 2321 of file ls-mat5.cc.
References octave_value::class_name(), octave_value::dims(), max(), and octave_value::ndims().
int save_mat5_element_length | ( | const octave_value & | tc, |
const std::string & | name, | ||
bool | save_as_floats, | ||
bool | mat7_format | ||
) |
Definition at line 2132 of file ls-mat5.cc.
References octave_value::char_array_value(), octave_value::class_name(), octave_value::is_string(), len, octave_value::ndims(), and PAD.
template void write_mat5_integer_data | ( | std::ostream & | os, |
const int * | m, | ||
int | size, | ||
octave_idx_type | nel | ||
) |
template void write_mat5_integer_data | ( | std::ostream & | os, |
const octave_int16 * | m, | ||
int | size, | ||
octave_idx_type | nel | ||
) |
template void write_mat5_integer_data | ( | std::ostream & | os, |
const octave_int32 * | m, | ||
int | size, | ||
octave_idx_type | nel | ||
) |
template void write_mat5_integer_data | ( | std::ostream & | os, |
const octave_int64 * | m, | ||
int | size, | ||
octave_idx_type | nel | ||
) |
template void write_mat5_integer_data | ( | std::ostream & | os, |
const octave_int8 * | m, | ||
int | size, | ||
octave_idx_type | nel | ||
) |
template void write_mat5_integer_data | ( | std::ostream & | os, |
const octave_uint16 * | m, | ||
int | size, | ||
octave_idx_type | nel | ||
) |
template void write_mat5_integer_data | ( | std::ostream & | os, |
const octave_uint32 * | m, | ||
int | size, | ||
octave_idx_type | nel | ||
) |
template void write_mat5_integer_data | ( | std::ostream & | os, |
const octave_uint64 * | m, | ||
int | size, | ||
octave_idx_type | nel | ||
) |
template void write_mat5_integer_data | ( | std::ostream & | os, |
const octave_uint8 * | m, | ||
int | size, | ||
octave_idx_type | nel | ||
) |