26 #if defined (HAVE_CONFIG_H)
100 return static_cast<double> (
scalar);
106 return static_cast<float> (
scalar);
180 s[0] =
static_cast<char> (
scalar);
200 scalar = (octave_read_value<double> (is) != 0.0);
203 error (
"load: failed to load scalar constant");
211 char tmp = (
scalar ? 1 : 0);
212 os.write (
reinterpret_cast<char *
> (&tmp), 1);
222 if (! is.read (
reinterpret_cast<char *
> (&tmp), 1))
234 #if defined (HAVE_HDF5)
237 hid_t space_hid, data_hid;
238 space_hid = data_hid = -1;
240 space_hid = H5Screate_simple (0, dimens,
nullptr);
241 if (space_hid < 0)
return false;
242 #if defined (HAVE_HDF5_18)
243 data_hid = H5Dcreate (loc_id,
name, H5T_NATIVE_DOUBLE, space_hid,
246 data_hid = H5Dcreate (loc_id,
name, H5T_NATIVE_DOUBLE, space_hid,
251 H5Sclose (space_hid);
260 H5Sclose (space_hid);
263 octave_unused_parameter (loc_id);
264 octave_unused_parameter (
name);
275 #if defined (HAVE_HDF5)
277 #if defined (HAVE_HDF5_18)
280 hid_t data_hid = H5Dopen (loc_id,
name);
282 hid_t space_id = H5Dget_space (data_hid);
284 hsize_t rank = H5Sget_simple_extent_ndims (space_id);
305 octave_unused_parameter (loc_id);
306 octave_unused_parameter (
name);
319 bool *pr =
static_cast<bool *
> (
retval->get_data ());
Vector representing the dimensions (size) of an Array.
octave_idx_type numel(int n=0) const
Number of elements that a matrix with this dimensions would have.
void warn_load(const char *type) const
friend class octave_value
void warn_save(const char *type) const
octave_value as_uint8(void) const
octave_value convert_to_str_internal(bool pad, bool force, char type) const
octave_value as_int32(void) const
octave_value as_single(void) const
boolMatrix bool_matrix_value(bool=false) const
mxArray * as_mxArray(void) const
octave_value as_uint64(void) const
double double_value(bool=false) const
bool load_ascii(std::istream &is)
octave_value as_int8(void) const
octave_value as_double(void) const
bool bool_value(bool=false) const
bool load_binary(std::istream &is, bool swap, octave::mach_info::float_format fmt)
octave_value resize(const dim_vector &dv, bool fill=false) const
octave_value as_int16(void) const
bool save_hdf5(octave_hdf5_id loc_id, const char *name, bool save_as_floats)
octave_value as_int64(void) const
bool load_hdf5(octave_hdf5_id loc_id, const char *name)
octave_value as_uint16(void) const
bool save_ascii(std::ostream &os)
type_conv_info numeric_conversion_function(void) const
octave_value as_uint32(void) const
bool save_binary(std::ostream &os, bool save_as_floats)
octave_value do_index_op(const octave_value_list &idx, bool resize_ok=false)
static int static_type_id(void)
octave_value do_index_op(const octave_value_list &idx, bool resize_ok=false)
const octave_hdf5_id octave_H5P_DEFAULT
const octave_hdf5_id octave_H5S_ALL
void error(const char *fmt,...)
F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE * d
void octave_write_double(std::ostream &os, double d)
octave_int< uint32_t > octave_uint32
octave_int< int32_t > octave_int32
octave_int< int16_t > octave_int16
octave_int< int8_t > octave_int8
octave_int< int64_t > octave_int64
octave_int< uint64_t > octave_uint64
octave_int< uint16_t > octave_uint16
octave_int< uint8_t > octave_uint8
#define DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(t, n, c)
static octave_base_value * default_numeric_conversion_function(const octave_base_value &a)
octave_value::octave_value(const Array< char > &chm, char type) return retval