26 #if defined (HAVE_CONFIG_H)
52 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
53 # pragma GCC diagnostic push
54 # pragma GCC diagnostic ignored "-Wdeprecated-declarations"
66 error (
"invalid range");
126 if (c ==
' ' || c ==
'\t' || c ==
'\n')
141 double base, limit, inc;
142 is >> base >> limit >> inc;
145 error (
"load: failed to load range constant");
160 if (! is.read (
reinterpret_cast<char *
> (&tmp), 1))
162 double bas, lim, inc;
163 if (! is.read (
reinterpret_cast<char *
> (&bas), 8))
167 if (! is.read (
reinterpret_cast<char *
> (&lim), 8))
171 if (! is.read (
reinterpret_cast<char *
> (&inc), 8))
183 #if defined (HAVE_HDF5)
194 hid_t type_id = H5Tcreate (H5T_COMPOUND,
sizeof (
double) * 3);
196 H5Tinsert (type_id,
"base", 0 *
sizeof (
double), num_type);
197 H5Tinsert (type_id,
"limit", 1 *
sizeof (
double), num_type);
198 H5Tinsert (type_id,
"increment", 2 *
sizeof (
double), num_type);
210 #if defined (HAVE_HDF5)
212 #if defined (HAVE_HDF5_18)
215 hid_t data_hid = H5Dopen (loc_id, name);
217 hid_t type_hid = H5Dget_type (data_hid);
223 H5Tclose (range_type);
228 hid_t space_hid = H5Dget_space (data_hid);
229 hsize_t rank = H5Sget_simple_extent_ndims (space_hid);
233 H5Tclose (range_type);
234 H5Sclose (space_hid);
247 "OCTAVE_RANGE_NELEM", &nel))
248 range =
Range (rangevals[0], rangevals[2], nel);
251 if (rangevals[2] != 0)
252 range =
Range (rangevals[0], rangevals[1], rangevals[2]);
259 H5Tclose (range_type);
260 H5Sclose (space_hid);
264 octave_unused_parameter (loc_id);
265 octave_unused_parameter (name);
273 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
274 # pragma GCC diagnostic pop
void swap_bytes< 8 >(void *ptr)
double increment(void) const
OCTAVE_API Matrix matrix_value(void) const
octave_idx_type numel(void) const
OCTINTERP_API void warn_load(const char *type) const
virtual Matrix matrix_value(bool=false) const
bool load_ascii(std::istream &is)
octave_legacy_range(void)
bool load_binary(std::istream &is, bool swap, octave::mach_info::float_format fmt)
bool load_hdf5(octave_hdf5_id loc_id, const char *name)
type_conv_info numeric_conversion_function(void) const
octave_base_value * try_narrowing_conversion(void)
static int static_type_id(void)
const octave_hdf5_id octave_H5P_DEFAULT
const octave_hdf5_id octave_H5S_ALL
void error(const char *fmt,...)
void skip_until_newline(std::istream &is, bool keep_newline)
bool hdf5_get_scalar_attr(octave_hdf5_id loc_id, octave_hdf5_id type_id, const char *attr_name, void *buf)
bool hdf5_types_compatible(octave_hdf5_id t1, octave_hdf5_id t2)
#define DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(t, n, c)
static octave_base_value * default_numeric_conversion_function(const octave_base_value &a)
static void skip_comments(std::istream &is)
static hid_t hdf5_make_range_type(hid_t num_type)
octave_double_range octave_range