23 #if defined (HAVE_CONFIG_H) 90 return tmp.do_index_op (idx, resize_ok);
96 return static_cast<double> (
scalar);
102 return static_cast<float> (
scalar);
176 s[0] =
static_cast<char> (
scalar);
196 scalar = (octave_read_value<double> (
is) != 0.);
199 error (
"load: failed to load scalar constant");
208 os.
write (reinterpret_cast<char *> (&
tmp), 1);
218 if (!
is.read (reinterpret_cast<char *> (&
tmp), 1))
230 #if defined (HAVE_HDF5) 233 hid_t space_hid, data_hid;
234 space_hid = data_hid = -1;
236 space_hid = H5Screate_simple (0, dimens,
nullptr);
237 if (space_hid < 0)
return false;
238 #if defined (HAVE_HDF5_18) 239 data_hid = H5Dcreate (loc_id,
name, H5T_NATIVE_DOUBLE, space_hid,
242 data_hid = H5Dcreate (loc_id,
name, H5T_NATIVE_DOUBLE, space_hid,
247 H5Sclose (space_hid);
256 H5Sclose (space_hid);
259 octave_unused_parameter (loc_id);
260 octave_unused_parameter (
name);
271 #if defined (HAVE_HDF5) 273 #if defined (HAVE_HDF5_18) 276 hid_t data_hid = H5Dopen (loc_id,
name);
278 hid_t space_id = H5Dget_space (data_hid);
280 hsize_t rank = H5Sget_simple_extent_ndims (space_id);
301 octave_unused_parameter (loc_id);
302 octave_unused_parameter (
name);
315 bool *pr =
static_cast<bool *
> (
retval->get_data ());
octave_idx_type write(const octave_value &data, octave_idx_type block_size, oct_data_conv::data_type output_type, octave_idx_type skip, mach_info::float_format flt_fmt)
void octave_write_double(std::ostream &os, double d)
octave_value as_uint32(void) const
octave_value as_int64(void) const
octave_value as_uint16(void) const
octave_int< uint64_t > octave_uint64
bool load_ascii(std::istream &is)
octave_value resize(const dim_vector &dv, bool fill=false) const
const octave_hdf5_id octave_H5S_ALL
octave_int< uint16_t > octave_uint16
void error(const char *fmt,...)
#define DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(t, n, c)
octave_value do_index_op(const octave_value_list &idx, bool resize_ok=false)
octave_value convert_to_str_internal(bool pad, bool force, char type) const
octave_value as_uint8(void) const
bool load_hdf5(octave_hdf5_id loc_id, const char *name)
F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE * d
void warn_load(const char *type) const
bool save_binary(std::ostream &os, bool &save_as_floats)
calling an anonymous function involves an overhead quite comparable to the overhead of an m file function Passing a handle to a built in function is because the interpreter is not involved in the internal loop For a
bool bool_value(bool=false) const
nd deftypefn *std::string name
type_conv_info numeric_conversion_function(void) const
void warn_save(const char *type) const
bool load_binary(std::istream &is, bool swap, octave::mach_info::float_format fmt)
octave_value as_int32(void) const
static octave_base_value * default_numeric_conversion_function(const octave_base_value &a)
octave_int< uint32_t > octave_uint32
friend class octave_value
octave_value as_single(void) const
mxArray * as_mxArray(void) const
octave_idx_type numel(int n=0) const
Number of elements that a matrix with this dimensions would have.
octave_int< int64_t > octave_int64
bool save_hdf5(octave_hdf5_id loc_id, const char *name, bool save_as_floats)
bool save_ascii(std::ostream &os)
const octave_hdf5_id octave_H5P_DEFAULT
octave_int< int16_t > octave_int16
write the output to stdout if nargout is
octave_int< uint8_t > octave_uint8
octave_value as_int16(void) const
static int static_type_id(void)
Vector representing the dimensions (size) of an Array.
octave_int< int32_t > octave_int32
double double_value(bool=false) const
octave_value as_int8(void) const
boolMatrix bool_matrix_value(bool=false) const
octave_int< int8_t > octave_int8
octave_value as_uint64(void) const
octave_value as_double(void) const