#include <climits>
#include "mach-info.h"
Go to the source code of this file.
Classes | |
class | oct_data_conv |
Enumerations | |
enum | save_type { LS_U_CHAR = 0, LS_U_SHORT = 1, LS_U_INT = 2, LS_CHAR = 3, LS_SHORT = 4, LS_INT = 5, LS_FLOAT = 6, LS_DOUBLE = 7, LS_U_LONG = 8, LS_LONG = 9 } |
Functions | |
OCTAVE_API void | do_double_format_conversion (void *data, octave_idx_type len, oct_mach_info::float_format from_fmt, oct_mach_info::float_format to_fmt=oct_mach_info::native_float_format()) |
OCTAVE_API void | do_float_format_conversion (void *data, octave_idx_type len, oct_mach_info::float_format from_fmt, oct_mach_info::float_format to_fmt=oct_mach_info::native_float_format()) |
OCTAVE_API void | do_float_format_conversion (void *data, size_t sz, octave_idx_type len, oct_mach_info::float_format from_fmt, oct_mach_info::float_format to_fmt=oct_mach_info::native_float_format()) |
OCTAVE_API void | read_doubles (std::istream &is, double *data, save_type type, octave_idx_type len, bool swap, oct_mach_info::float_format fmt) |
OCTAVE_API void | read_floats (std::istream &is, float *data, save_type type, octave_idx_type len, bool swap, oct_mach_info::float_format fmt) |
OCTAVE_API void | write_doubles (std::ostream &os, const double *data, save_type type, octave_idx_type len) |
OCTAVE_API void | write_floats (std::ostream &os, const float *data, save_type type, octave_idx_type len) |
enum save_type |
LS_U_CHAR | |
LS_U_SHORT | |
LS_U_INT | |
LS_CHAR | |
LS_SHORT | |
LS_INT | |
LS_FLOAT | |
LS_DOUBLE | |
LS_U_LONG | |
LS_LONG |
Definition at line 80 of file data-conv.h.
OCTAVE_API void do_double_format_conversion | ( | void * | data, | |
octave_idx_type | len, | |||
oct_mach_info::float_format | from_fmt, | |||
oct_mach_info::float_format | to_fmt = oct_mach_info::native_float_format() | |||
) |
Definition at line 734 of file data-conv.cc.
References Cray_to_IEEE_big_double(), Cray_to_IEEE_little_double(), Cray_to_VAX_D_double(), Cray_to_VAX_G_double(), oct_mach_info::flt_fmt_cray, oct_mach_info::flt_fmt_ieee_big_endian, oct_mach_info::flt_fmt_ieee_little_endian, oct_mach_info::flt_fmt_vax_d, oct_mach_info::flt_fmt_vax_g, gripe_unrecognized_float_fmt(), IEEE_big_double_to_IEEE_little_double(), IEEE_big_double_to_VAX_D_double(), IEEE_big_double_to_VAX_G_double(), IEEE_little_double_to_IEEE_big_double(), IEEE_little_double_to_VAX_D_double(), IEEE_little_double_to_VAX_G_double(), VAX_D_double_to_IEEE_big_double(), VAX_D_double_to_IEEE_little_double(), VAX_D_double_to_VAX_G_double(), VAX_G_double_to_IEEE_big_double(), VAX_G_double_to_IEEE_little_double(), and VAX_G_double_to_VAX_D_double().
Referenced by do_float_format_conversion(), do_write(), read_doubles(), and read_floats().
OCTAVE_API void do_float_format_conversion | ( | void * | data, | |
octave_idx_type | len, | |||
oct_mach_info::float_format | from_fmt, | |||
oct_mach_info::float_format | to_fmt = oct_mach_info::native_float_format() | |||
) |
Definition at line 861 of file data-conv.cc.
References Cray_to_IEEE_big_float(), Cray_to_IEEE_little_float(), Cray_to_VAX_D_float(), Cray_to_VAX_G_float(), oct_mach_info::flt_fmt_cray, oct_mach_info::flt_fmt_ieee_big_endian, oct_mach_info::flt_fmt_ieee_little_endian, oct_mach_info::flt_fmt_vax_d, oct_mach_info::flt_fmt_vax_g, gripe_unrecognized_float_fmt(), IEEE_big_float_to_IEEE_little_float(), IEEE_big_float_to_VAX_D_float(), IEEE_big_float_to_VAX_G_float(), IEEE_little_float_to_IEEE_big_float(), IEEE_little_float_to_VAX_D_float(), IEEE_little_float_to_VAX_G_float(), VAX_D_float_to_IEEE_big_float(), VAX_D_float_to_IEEE_little_float(), VAX_D_float_to_VAX_G_float(), VAX_G_float_to_IEEE_big_float(), VAX_G_float_to_IEEE_little_float(), and VAX_G_float_to_VAX_D_float().
Referenced by do_float_format_conversion(), do_read(), do_write(), read_doubles(), and read_floats().
OCTAVE_API void do_float_format_conversion | ( | void * | data, | |
size_t | sz, | |||
octave_idx_type | len, | |||
oct_mach_info::float_format | from_fmt, | |||
oct_mach_info::float_format | to_fmt = oct_mach_info::native_float_format() | |||
) |
Definition at line 988 of file data-conv.cc.
References do_double_format_conversion(), and do_float_format_conversion().
OCTAVE_API void read_doubles | ( | std::istream & | is, | |
double * | data, | |||
save_type | type, | |||
octave_idx_type | len, | |||
bool | swap, | |||
oct_mach_info::float_format | fmt | |||
) |
Definition at line 1012 of file data-conv.cc.
References __lo_ieee_replace_old_NA(), do_double_format_conversion(), do_float_format_conversion(), LS_CHAR, LS_DO_READ, LS_DOUBLE, LS_FLOAT, LS_INT, LS_SHORT, LS_U_CHAR, LS_U_INT, LS_U_SHORT, and OCTAVE_LOCAL_BUFFER.
Referenced by octave_scalar::load_binary(), octave_sparse_matrix::load_binary(), octave_matrix::load_binary(), octave_diag_matrix::load_binary(), octave_sparse_complex_matrix::load_binary(), octave_complex_matrix::load_binary(), octave_complex_diag_matrix::load_binary(), octave_complex::load_binary(), read_mat5_binary_data(), and read_mat_binary_data().
OCTAVE_API void read_floats | ( | std::istream & | is, | |
float * | data, | |||
save_type | type, | |||
octave_idx_type | len, | |||
bool | swap, | |||
oct_mach_info::float_format | fmt | |||
) |
Definition at line 1069 of file data-conv.cc.
References do_double_format_conversion(), do_float_format_conversion(), LS_CHAR, LS_DO_READ, LS_DOUBLE, LS_FLOAT, LS_INT, LS_SHORT, LS_U_CHAR, LS_U_INT, LS_U_SHORT, and OCTAVE_LOCAL_BUFFER.
Referenced by octave_float_matrix::load_binary(), octave_float_diag_matrix::load_binary(), octave_float_complex_matrix::load_binary(), octave_float_complex_diag_matrix::load_binary(), octave_float_complex::load_binary(), octave_float_scalar::load_binary(), and read_mat5_binary_data().
OCTAVE_API void write_doubles | ( | std::ostream & | os, | |
const double * | data, | |||
save_type | type, | |||
octave_idx_type | len | |||
) |
Definition at line 1121 of file data-conv.cc.
References LS_CHAR, LS_DO_WRITE, LS_DOUBLE, LS_FLOAT, LS_INT, LS_SHORT, LS_U_CHAR, LS_U_INT, and LS_U_SHORT.
Referenced by octave_sparse_matrix::save_binary(), octave_matrix::save_binary(), octave_diag_matrix::save_binary(), octave_sparse_complex_matrix::save_binary(), octave_complex_matrix::save_binary(), and octave_complex_diag_matrix::save_binary().
OCTAVE_API void write_floats | ( | std::ostream & | os, | |
const float * | data, | |||
save_type | type, | |||
octave_idx_type | len | |||
) |
Definition at line 1170 of file data-conv.cc.
References LS_CHAR, LS_DO_WRITE, LS_DOUBLE, LS_FLOAT, LS_INT, LS_SHORT, LS_U_CHAR, LS_U_INT, and LS_U_SHORT.
Referenced by octave_float_matrix::save_binary(), octave_float_diag_matrix::save_binary(), octave_float_complex_matrix::save_binary(), and octave_float_complex_diag_matrix::save_binary().