GNU Octave  3.8.0
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 <limits>
#include "mach-info.h"
#include "oct-inttypes.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, 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())
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, 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)

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 83 of file data-conv.h.

Function Documentation

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() 
)

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

References do_double_format_conversion(), and do_float_format_conversion().

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

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

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

References oct_data_conv::dt_double.

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

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

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

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

References oct_data_conv::dt_int16.

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

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

References oct_data_conv::dt_int32.

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

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

References oct_data_conv::dt_int64.

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

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

References oct_data_conv::dt_int8.

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

References oct_data_conv::dt_int16.

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

References oct_data_conv::dt_int32.

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

References oct_data_conv::dt_int64.

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

References oct_data_conv::dt_int8.

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

References oct_data_conv::dt_uint16.

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

References oct_data_conv::dt_uint32.

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

References oct_data_conv::dt_uint64.

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

References oct_data_conv::dt_uint8.

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

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

References oct_data_conv::dt_uint16.

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

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

References oct_data_conv::dt_uint32.

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

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

References oct_data_conv::dt_uint64.

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

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

References oct_data_conv::dt_uint8.

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 
)