#include <cstdlib>
#include <cstring>
#include <complex>
#include <istream>
#include <limits>
#include <ostream>
#include <string>
#include "quit.h"
#include "intprops-wrappers.h"
#include "lo-error.h"
#include "lo-ieee.h"
#include "lo-mappers.h"
#include "lo-utils.h"
#include "oct-inttypes.h"
Go to the source code of this file.
Functions | |
std::string | fgetl (FILE *f) |
std::string | fgetl (FILE *f, bool &eof) |
std::string | fgets (FILE *f) |
std::string | fgets (FILE *f, bool &eof) |
bool | int_multiply_overflow (int a, int b, int *r) |
bool | int_multiply_overflow (long int a, long int b, long int *r) |
bool | int_multiply_overflow (unsigned int a, unsigned int b, unsigned int *r) |
bool | int_multiply_overflow (unsigned long int a, unsigned long int b, unsigned long int *r) |
bool | is_int_or_inf_or_nan (double x) |
bool | is_int_or_inf_or_nan (float x) |
template<typename T > | |
std::complex< T > | read_cx_fp_value (std::istream &is) |
template<typename T > | |
double | read_fp_value (std::istream &is) |
template<typename T > | |
T | read_inf_nan_na (std::istream &is, char c0) |
template<typename T > | |
T | read_value (std::istream &is) |
template<> | |
double | read_value (std::istream &is) |
template bool | read_value< bool > (std::istream &is) |
template octave_int16 | read_value< octave_int16 > (std::istream &is) |
template octave_int32 | read_value< octave_int32 > (std::istream &is) |
template octave_int64 | read_value< octave_int64 > (std::istream &is) |
template octave_int8 | read_value< octave_int8 > (std::istream &is) |
template octave_uint16 | read_value< octave_uint16 > (std::istream &is) |
template octave_uint32 | read_value< octave_uint32 > (std::istream &is) |
template octave_uint64 | read_value< octave_uint64 > (std::istream &is) |
template octave_uint8 | read_value< octave_uint8 > (std::istream &is) |
char * | strsave (const char *s) |
bool | too_large_for_float (const Complex &x) |
bool | too_large_for_float (double x) |
template<> | |
void | write_value (std::ostream &os, const Complex &value) |
template<> | |
void | write_value (std::ostream &os, const double &value) |
template<> | |
void | write_value (std::ostream &os, const float &value) |
template<> | |
void | write_value (std::ostream &os, const FloatComplex &value) |
template<typename T > | |
void | write_value (std::ostream &os, const T &value) |
template void | write_value< bool > (std::ostream &os, const bool &value) |
template void | write_value< octave_int16 > (std::ostream &os, const octave_int16 &value) |
template void | write_value< octave_int32 > (std::ostream &os, const octave_int32 &value) |
template void | write_value< octave_int64 > (std::ostream &os, const octave_int64 &value) |
template void | write_value< octave_int8 > (std::ostream &os, const octave_int8 &value) |
template void | write_value< octave_uint16 > (std::ostream &os, const octave_uint16 &value) |
template void | write_value< octave_uint32 > (std::ostream &os, const octave_uint32 &value) |
template void | write_value< octave_uint64 > (std::ostream &os, const octave_uint64 &value) |
template void | write_value< octave_uint8 > (std::ostream &os, const octave_uint8 &value) |
std::string fgetl | ( | FILE * | f | ) |
Definition at line 172 of file lo-utils.cc.
References f.
std::string fgetl | ( | FILE * | f, |
bool & | eof | ||
) |
Definition at line 179 of file lo-utils.cc.
std::string fgets | ( | FILE * | f | ) |
Definition at line 90 of file lo-utils.cc.
References f.
Referenced by fgetl(), fgets(), and load_path::read_dir_config().
std::string fgets | ( | FILE * | f, |
bool & | eof | ||
) |
bool int_multiply_overflow | ( | int | a, |
int | b, | ||
int * | r | ||
) |
Definition at line 499 of file lo-utils.cc.
References octave_i_multiply_overflow_wrapper(), and r.
bool int_multiply_overflow | ( | long int | a, |
long int | b, | ||
long int * | r | ||
) |
Definition at line 505 of file lo-utils.cc.
References octave_li_multiply_overflow_wrapper(), and r.
bool int_multiply_overflow | ( | unsigned int | a, |
unsigned int | b, | ||
unsigned int * | r | ||
) |
Definition at line 519 of file lo-utils.cc.
References octave_ui_multiply_overflow_wrapper(), and r.
bool int_multiply_overflow | ( | unsigned long int | a, |
unsigned long int | b, | ||
unsigned long int * | r | ||
) |
Definition at line 525 of file lo-utils.cc.
References octave_uli_multiply_overflow_wrapper(), and r.
bool is_int_or_inf_or_nan | ( | double | x | ) |
Definition at line 50 of file lo-utils.cc.
References isnan(), x, and x_nint().
Referenced by NDArray::all_elements_are_int_or_inf_or_nan(), and FloatNDArray::all_elements_are_int_or_inf_or_nan().
bool is_int_or_inf_or_nan | ( | float | x | ) |
Definition at line 70 of file lo-utils.cc.
std::complex<T> read_cx_fp_value | ( | std::istream & | is | ) |
Definition at line 350 of file lo-utils.cc.
double read_fp_value | ( | std::istream & | is | ) |
Definition at line 275 of file lo-utils.cc.
T read_inf_nan_na | ( | std::istream & | is, |
char | c0 | ||
) |
Definition at line 213 of file lo-utils.cc.
T read_value | ( | std::istream & | is | ) |
Definition at line 191 of file lo-utils.cc.
FloatComplex read_value | ( | std::istream & | is | ) |
Definition at line 394 of file lo-utils.cc.
template bool read_value< bool > | ( | std::istream & | is | ) |
template octave_int16 read_value< octave_int16 > | ( | std::istream & | is | ) |
template octave_int32 read_value< octave_int32 > | ( | std::istream & | is | ) |
template octave_int64 read_value< octave_int64 > | ( | std::istream & | is | ) |
template octave_int8 read_value< octave_int8 > | ( | std::istream & | is | ) |
template octave_uint16 read_value< octave_uint16 > | ( | std::istream & | is | ) |
template octave_uint32 read_value< octave_uint32 > | ( | std::istream & | is | ) |
template octave_uint64 read_value< octave_uint64 > | ( | std::istream & | is | ) |
template octave_uint8 read_value< octave_uint8 > | ( | std::istream & | is | ) |
char* strsave | ( | const char * | s | ) |
Definition at line 78 of file lo-utils.cc.
bool too_large_for_float | ( | const Complex & | x | ) |
Definition at line 63 of file lo-utils.cc.
References too_large_for_float(), and x.
bool too_large_for_float | ( | double | x | ) |
Definition at line 56 of file lo-utils.cc.
References isfinite(), max(), and x.
Referenced by save_mat5_array_length(), ComplexNDArray::too_large_for_float(), SparseComplexMatrix::too_large_for_float(), NDArray::too_large_for_float(), SparseMatrix::too_large_for_float(), and too_large_for_float().
void write_value | ( | std::ostream & | os, |
const Complex & | value | ||
) |
Definition at line 459 of file lo-utils.cc.
void write_value | ( | std::ostream & | os, |
const double & | value | ||
) |
Definition at line 445 of file lo-utils.cc.
References lo_ieee_is_NA, lo_ieee_isinf, and lo_ieee_isnan.
void write_value | ( | std::ostream & | os, |
const float & | value | ||
) |
Definition at line 473 of file lo-utils.cc.
References lo_ieee_is_NA, lo_ieee_isinf, and lo_ieee_isnan.
void write_value | ( | std::ostream & | os, |
const FloatComplex & | value | ||
) |
Definition at line 487 of file lo-utils.cc.
void write_value | ( | std::ostream & | os, |
const T & | value | ||
) |
Definition at line 416 of file lo-utils.cc.
template void write_value< bool > | ( | std::ostream & | os, |
const bool & | value | ||
) |
template void write_value< octave_int16 > | ( | std::ostream & | os, |
const octave_int16 & | value | ||
) |
template void write_value< octave_int32 > | ( | std::ostream & | os, |
const octave_int32 & | value | ||
) |
template void write_value< octave_int64 > | ( | std::ostream & | os, |
const octave_int64 & | value | ||
) |
template void write_value< octave_int8 > | ( | std::ostream & | os, |
const octave_int8 & | value | ||
) |
template void write_value< octave_uint16 > | ( | std::ostream & | os, |
const octave_uint16 & | value | ||
) |
template void write_value< octave_uint32 > | ( | std::ostream & | os, |
const octave_uint32 & | value | ||
) |
template void write_value< octave_uint64 > | ( | std::ostream & | os, |
const octave_uint64 & | value | ||
) |
template void write_value< octave_uint8 > | ( | std::ostream & | os, |
const octave_uint8 & | value | ||
) |