125 ::warning (
"range error for conversion to character value");
128 retval =
octave_value (std::string (1, static_cast<char> (ival)), type);
149 scalar = octave_read_value<float> (is);
152 error (
"load: failed to load scalar constant");
163 os.write (reinterpret_cast<char *> (&tmp), 1);
165 os.write (reinterpret_cast<char *> (&dtmp), 4);
175 if (! is.read (reinterpret_cast<char *> (&tmp), 1))
179 read_floats (is, &dtmp, static_cast<save_type> (tmp), 1, swap, fmt);
187 #if defined (HAVE_HDF5)
194 hid_t space_hid = -1, data_hid = -1;
197 space_hid = H5Screate_simple (0, dimens, 0);
198 if (space_hid < 0)
return false;
200 data_hid = H5Dcreate (loc_id, name, H5T_NATIVE_FLOAT, space_hid,
201 H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
203 data_hid = H5Dcreate (loc_id, name, H5T_NATIVE_FLOAT, space_hid,
208 H5Sclose (space_hid);
213 retval = H5Dwrite (data_hid, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL,
214 H5P_DEFAULT, &tmp) >= 0;
217 H5Sclose (space_hid);
226 hid_t data_hid = H5Dopen (loc_id, name, H5P_DEFAULT);
228 hid_t data_hid = H5Dopen (loc_id, name);
230 hid_t space_id = H5Dget_space (data_hid);
232 hsize_t rank = H5Sget_simple_extent_ndims (space_id);
241 if (H5Dread (data_hid, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL,
242 H5P_DEFAULT, &dtmp) < 0)
262 float *pr =
static_cast<float *
> (retval->
get_data ());
281 #define SCALAR_MAPPER(UMAP, FCN) \
282 case umap_ ## UMAP: \
283 return octave_value (FCN (scalar))
342 *(
reinterpret_cast<float *
>(where)) =
scalar;