GNU Octave  4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Enumerations | Functions
data-conv.h File Reference
#include "octave-config.h"
#include <limits>
#include "mach-info.h"
#include "oct-inttypes-fwd.h"
Include dependency graph for data-conv.h:
This graph shows which files directly or indirectly include this file:

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, octave::mach_info::float_format from_fmt, octave::mach_info::float_format to_fmt=octave::mach_info::native_float_format())
 
OCTAVE_API void do_float_format_conversion (void *data, octave_idx_type len, octave::mach_info::float_format from_fmt, octave::mach_info::float_format to_fmt=octave::mach_info::native_float_format())
 
OCTAVE_API void do_float_format_conversion (void *data, size_t sz, octave_idx_type len, octave::mach_info::float_format from_fmt, octave::mach_info::float_format to_fmt=octave::mach_info::native_float_format())
 
template<typename T >
bool is_equivalent_type (oct_data_conv::data_type)
 
template<>
bool is_equivalent_type< double > (oct_data_conv::data_type t)
 
template<>
bool is_equivalent_type< float > (oct_data_conv::data_type t)
 
template<>
bool is_equivalent_type< int16_t > (oct_data_conv::data_type t)
 
template<>
bool is_equivalent_type< int32_t > (oct_data_conv::data_type t)
 
template<>
bool is_equivalent_type< int64_t > (oct_data_conv::data_type t)
 
template<>
bool is_equivalent_type< int8_t > (oct_data_conv::data_type t)
 
template<>
bool is_equivalent_type< octave_int16 > (oct_data_conv::data_type t)
 
template<>
bool is_equivalent_type< octave_int32 > (oct_data_conv::data_type t)
 
template<>
bool is_equivalent_type< octave_int64 > (oct_data_conv::data_type t)
 
template<>
bool is_equivalent_type< octave_int8 > (oct_data_conv::data_type t)
 
template<>
bool is_equivalent_type< octave_uint16 > (oct_data_conv::data_type t)
 
template<>
bool is_equivalent_type< octave_uint32 > (oct_data_conv::data_type t)
 
template<>
bool is_equivalent_type< octave_uint64 > (oct_data_conv::data_type t)
 
template<>
bool is_equivalent_type< octave_uint8 > (oct_data_conv::data_type t)
 
template<>
bool is_equivalent_type< uint16_t > (oct_data_conv::data_type t)
 
template<>
bool is_equivalent_type< uint32_t > (oct_data_conv::data_type t)
 
template<>
bool is_equivalent_type< uint64_t > (oct_data_conv::data_type t)
 
template<>
bool is_equivalent_type< uint8_t > (oct_data_conv::data_type t)
 
OCTAVE_API void read_doubles (std::istream &is, double *data, save_type type, octave_idx_type len, bool swap, octave::mach_info::float_format fmt)
 
OCTAVE_API void read_floats (std::istream &is, float *data, save_type type, octave_idx_type len, bool swap, octave::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)
 

Enumeration Type Documentation

enum save_type
Enumerator
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 85 of file data-conv.h.

Function Documentation

OCTAVE_API void do_double_format_conversion ( void *  data,
octave_idx_type  len,
octave::mach_info::float_format  from_fmt,
octave::mach_info::float_format  to_fmt = octave::mach_info::native_float_format() 
)
OCTAVE_API void do_float_format_conversion ( void *  data,
octave_idx_type  len,
octave::mach_info::float_format  from_fmt,
octave::mach_info::float_format  to_fmt = octave::mach_info::native_float_format() 
)
OCTAVE_API void do_float_format_conversion ( void *  data,
size_t  sz,
octave_idx_type  len,
octave::mach_info::float_format  from_fmt,
octave::mach_info::float_format  to_fmt = octave::mach_info::native_float_format() 
)

Definition at line 748 of file data-conv.cc.

References do_double_format_conversion(), do_float_format_conversion(), and double.

template<typename T >
bool is_equivalent_type ( oct_data_conv::data_type  )
inline

Definition at line 135 of file data-conv.h.

Definition at line 254 of file data-conv.h.

References oct_data_conv::dt_double, and t.

template<>
bool is_equivalent_type< float > ( oct_data_conv::data_type  t)
inline

Definition at line 261 of file data-conv.h.

References oct_data_conv::dt_float, oct_data_conv::dt_single, and t.

template<>
bool is_equivalent_type< int16_t > ( oct_data_conv::data_type  t)
inline

Definition at line 149 of file data-conv.h.

References oct_data_conv::dt_int16, and t.

template<>
bool is_equivalent_type< int32_t > ( oct_data_conv::data_type  t)
inline

Definition at line 156 of file data-conv.h.

References oct_data_conv::dt_int32, and t.

template<>
bool is_equivalent_type< int64_t > ( oct_data_conv::data_type  t)
inline

Definition at line 163 of file data-conv.h.

References oct_data_conv::dt_int64, and t.

template<>
bool is_equivalent_type< int8_t > ( oct_data_conv::data_type  t)
inline

Definition at line 142 of file data-conv.h.

References oct_data_conv::dt_int8, and t.

Definition at line 205 of file data-conv.h.

References oct_data_conv::dt_int16, and t.

Definition at line 212 of file data-conv.h.

References oct_data_conv::dt_int32, and t.

Definition at line 219 of file data-conv.h.

References oct_data_conv::dt_int64, and t.

Definition at line 198 of file data-conv.h.

References oct_data_conv::dt_int8, and t.

Definition at line 233 of file data-conv.h.

References oct_data_conv::dt_uint16, and t.

Definition at line 240 of file data-conv.h.

References oct_data_conv::dt_uint32, and t.

Definition at line 247 of file data-conv.h.

References oct_data_conv::dt_uint64, and t.

Definition at line 226 of file data-conv.h.

References oct_data_conv::dt_uint8, and t.

template<>
bool is_equivalent_type< uint16_t > ( oct_data_conv::data_type  t)
inline

Definition at line 177 of file data-conv.h.

References oct_data_conv::dt_uint16, and t.

template<>
bool is_equivalent_type< uint32_t > ( oct_data_conv::data_type  t)
inline

Definition at line 184 of file data-conv.h.

References oct_data_conv::dt_uint32, and t.

template<>
bool is_equivalent_type< uint64_t > ( oct_data_conv::data_type  t)
inline

Definition at line 191 of file data-conv.h.

References oct_data_conv::dt_uint64, and t.

template<>
bool is_equivalent_type< uint8_t > ( oct_data_conv::data_type  t)
inline

Definition at line 170 of file data-conv.h.

References oct_data_conv::dt_uint8, and t.

OCTAVE_API void read_doubles ( std::istream &  is,
double data,
save_type  type,
octave_idx_type  len,
bool  swap,
octave::mach_info::float_format  fmt 
)
OCTAVE_API void read_floats ( std::istream &  is,
float *  data,
save_type  type,
octave_idx_type  len,
bool  swap,
octave::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 
)