GNU Octave  9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
ov-base-int.cc
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (C) 2004-2024 The Octave Project Developers
4 //
5 // See the file COPYRIGHT.md in the top-level directory of this
6 // distribution or <https://octave.org/copyright/>.
7 //
8 // This file is part of Octave.
9 //
10 // Octave is free software: you can redistribute it and/or modify it
11 // under the terms of the GNU General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // Octave is distributed in the hope that it will be useful, but
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU General Public License for more details.
19 //
20 // You should have received a copy of the GNU General Public License
21 // along with Octave; see the file COPYING. If not, see
22 // <https://www.gnu.org/licenses/>.
23 //
24 ////////////////////////////////////////////////////////////////////////
25 
26 // This file should not include config.h. It is only included in other
27 // C++ source files that should have included config.h before including
28 // this file.
29 
30 #include <istream>
31 #include <limits>
32 #include <ostream>
33 #include <sstream>
34 #include <vector>
35 
36 #include "dNDArray.h"
37 #include "fNDArray.h"
38 #include "int8NDArray.h"
39 #include "int16NDArray.h"
40 #include "int32NDArray.h"
41 #include "int64NDArray.h"
42 #include "uint8NDArray.h"
43 #include "uint16NDArray.h"
44 #include "uint32NDArray.h"
45 #include "uint64NDArray.h"
46 
47 #include "lo-ieee.h"
48 #include "lo-utils.h"
49 #include "mx-base.h"
50 #include "quit.h"
51 #include "oct-locbuf.h"
52 
53 #include "defun.h"
54 #include "errwarn.h"
55 #include "ovl.h"
56 #include "oct-lvalue.h"
57 #include "oct-hdf5.h"
58 #include "oct-stream.h"
59 #include "ops.h"
60 #include "ov-base.h"
61 #include "ov-base-mat.h"
62 #include "ov-base-mat.cc"
63 #include "ov-base-scalar.h"
64 #include "ov-base-scalar.cc"
65 #include "ov-base-int.h"
66 #include "ov-int-traits.h"
67 #include "pr-output.h"
68 #include "variables.h"
69 
70 #include "byte-swap.h"
71 #include "ls-oct-text.h"
72 #include "ls-utils.h"
73 #include "ls-hdf5.h"
74 
75 // We have all the machinery below (octave_base_int_helper and
76 // octave_base_int_helper_traits) to avoid a few warnings from GCC
77 // about comparisons always false due to limited range of data types.
78 // Ugh. The cure may be worse than the disease.
79 
80 template <typename T, bool is_signed = true, bool can_be_too_big = true>
81 struct octave_base_int_helper
82 {
83 public:
84  static bool
85  char_value_out_of_range (T val)
86  {
87  return val < 0 || val > std::numeric_limits<unsigned char>::max ();
88  }
89 };
90 
91 template <typename T>
92 struct octave_base_int_helper<T, false, false>
93 {
94 public:
95  static bool char_value_out_of_range (T) { return false; }
96 };
97 
98 template <typename T>
99 struct octave_base_int_helper<T, false, true>
100 {
101 public:
102  static bool char_value_out_of_range (T val)
103  {
105  }
106 };
107 
108 template <typename T>
109 struct octave_base_int_helper<T, true, false>
110 {
111 public:
112  static bool char_value_out_of_range (T val) { return val < 0; }
113 };
114 
115 // For all types other than char, signed char, and unsigned char, we
116 // assume that the upper limit for the range of allowable values is
117 // larger than the range for unsigned char. If that's not true, we
118 // are still OK, but will see the warnings again for any other types
119 // that do not meet this assumption.
120 
121 template <typename T>
122 struct octave_base_int_helper_traits
123 {
124  static const bool can_be_larger_than_uchar_max = true;
125 };
126 
127 template <>
128 struct octave_base_int_helper_traits<char>
129 {
130  static const bool can_be_larger_than_uchar_max = false;
131 };
132 
133 template <>
134 struct octave_base_int_helper_traits<signed char>
135 {
136  static const bool can_be_larger_than_uchar_max = false;
137 };
138 
139 template <>
140 struct octave_base_int_helper_traits<unsigned char>
141 {
142  static const bool can_be_larger_than_uchar_max = false;
143 };
144 
145 template <typename T>
148 {
149  octave_base_value *retval = nullptr;
150 
151  if (this->m_matrix.numel () == 1)
153  (this->m_matrix (0));
154 
155  return retval;
156 }
157 
158 template <typename T>
161 {
162  octave_value retval;
163  dim_vector dv = this->dims ();
164  octave_idx_type nel = dv.numel ();
165 
166  charNDArray chm (dv);
167 
168  bool warned = false;
169 
170  for (octave_idx_type i = 0; i < nel; i++)
171  {
172  octave_quit ();
173 
174  typename T::element_type tmp = this->m_matrix(i);
175 
176  typedef typename T::element_type::val_type val_type;
177 
178  val_type ival = tmp.value ();
179 
180  static const bool is_signed = std::numeric_limits<val_type>::is_signed;
181  static const bool can_be_larger_than_uchar_max
182  = octave_base_int_helper_traits<val_type>::can_be_larger_than_uchar_max;
183 
184  if (octave_base_int_helper<val_type, is_signed,
185  can_be_larger_than_uchar_max>::char_value_out_of_range (ival))
186  {
187  // FIXME: is there something better we could do?
188 
189  ival = 0;
190 
191  if (! warned)
192  {
193  ::warning ("range error for conversion to character value");
194  warned = true;
195  }
196  }
197  else
198  chm (i) = static_cast<char> (ival);
199  }
200 
201  retval = octave_value (chm, type);
202 
203  return retval;
204 }
205 
206 template <typename MT>
209 {
210  return NDArray (this->m_matrix);
211 }
212 
213 template <typename MT>
216 {
217  return FloatNDArray (this->m_matrix);
218 }
219 
220 template <typename MT>
223 {
224  return int8NDArray (this->m_matrix);
225 }
226 
227 template <typename MT>
230 {
231  return int16NDArray (this->m_matrix);
232 }
233 
234 template <typename MT>
237 {
238  return int32NDArray (this->m_matrix);
239 }
240 
241 template <typename MT>
244 {
245  return int64NDArray (this->m_matrix);
246 }
247 
248 template <typename MT>
251 {
252  return uint8NDArray (this->m_matrix);
253 }
254 
255 template <typename MT>
258 {
259  return uint16NDArray (this->m_matrix);
260 }
261 
262 template <typename MT>
265 {
266  return uint32NDArray (this->m_matrix);
267 }
268 
269 template <typename MT>
272 {
273  return uint64NDArray (this->m_matrix);
274 }
275 
276 template <typename T>
277 std::string
279  octave_idx_type i,
280  octave_idx_type j) const
281 {
282  std::ostringstream buf;
283  octave_print_internal (buf, fmt, this->m_matrix(i, j));
284  return buf.str ();
285 }
286 
287 template <typename T>
288 bool
290 {
291  dim_vector dv = this->dims ();
292 
293  os << "# ndims: " << dv.ndims () << "\n";
294 
295  for (int i = 0; i < dv.ndims (); i++)
296  os << ' ' << dv(i);
297 
298  os << "\n" << this->m_matrix;
299 
300  return true;
301 }
302 
303 template <typename T>
304 bool
306 {
307  int mdims = 0;
308 
309  if (! extract_keyword (is, "ndims", mdims, true))
310  error ("load: failed to extract number of dimensions");
311 
312  if (mdims < 0)
313  error ("load: failed to extract number of rows and columns");
314 
315  dim_vector dv;
316  dv.resize (mdims);
317 
318  for (int i = 0; i < mdims; i++)
319  is >> dv(i);
320 
321  T tmp(dv);
322 
323  is >> tmp;
324 
325  if (! is)
326  error ("load: failed to load matrix constant");
327 
328  this->m_matrix = tmp;
329 
330  return true;
331 }
332 
333 template <typename T>
334 bool
336 {
337  dim_vector dv = this->dims ();
338  if (dv.ndims () < 1)
339  return false;
340 
341  // Use negative value for ndims to differentiate with old format!!
342  int32_t tmp = - dv.ndims ();
343  os.write (reinterpret_cast<char *> (&tmp), 4);
344  for (int i=0; i < dv.ndims (); i++)
345  {
346  tmp = dv(i);
347  os.write (reinterpret_cast<char *> (&tmp), 4);
348  }
349 
350  os.write (reinterpret_cast<const char *> (this->m_matrix.data ()),
351  this->byte_size ());
352 
353  return true;
354 }
355 
356 template <typename T>
357 bool
358 octave_base_int_matrix<T>::load_binary (std::istream& is, bool swap,
360 {
361  int32_t mdims;
362  if (! is.read (reinterpret_cast<char *> (&mdims), 4))
363  return false;
364  if (swap)
365  swap_bytes<4> (&mdims);
366  if (mdims >= 0)
367  return false;
368 
369  mdims = - mdims;
370  int32_t di;
371  dim_vector dv;
372  dv.resize (mdims);
373 
374  for (int i = 0; i < mdims; i++)
375  {
376  if (! is.read (reinterpret_cast<char *> (&di), 4))
377  return false;
378  if (swap)
379  swap_bytes<4> (&di);
380  dv(i) = di;
381  }
382 
383  // Convert an array with a single dimension to be a row vector.
384  // Octave should never write files like this, other software
385  // might.
386 
387  if (mdims == 1)
388  {
389  mdims = 2;
390  dv.resize (mdims);
391  dv(1) = dv(0);
392  dv(0) = 1;
393  }
394 
395  T m (dv);
396 
397  if (! is.read (reinterpret_cast<char *> (m.fortran_vec ()), m.byte_size ()))
398  return false;
399 
400  if (swap)
401  {
402  int nel = dv.numel ();
403  int bytes = nel / m.byte_size ();
404  for (int i = 0; i < nel; i++)
405  switch (bytes)
406  {
407  case 8:
408  swap_bytes<8> (&m(i));
409  break;
410  case 4:
411  swap_bytes<4> (&m(i));
412  break;
413  case 2:
414  swap_bytes<2> (&m(i));
415  break;
416  case 1:
417  default:
418  break;
419  }
420  }
421 
422  this->m_matrix = m;
423  return true;
424 }
425 
426 template <typename T>
427 bool
430  const char *name, bool)
431 {
432  bool retval = false;
433 
434 #if defined (HAVE_HDF5)
435 
436  hid_t save_type_hid = save_type;
437  dim_vector dv = this->dims ();
438  int empty = save_hdf5_empty (loc_id, name, dv);
439  if (empty)
440  return (empty > 0);
441 
442  int rank = dv.ndims ();
443  hid_t space_hid, data_hid;
444  space_hid = data_hid = -1;
445  OCTAVE_LOCAL_BUFFER (hsize_t, hdims, rank);
446 
447  // Octave uses column-major, while HDF5 uses row-major ordering
448  for (int i = 0; i < rank; i++)
449  hdims[i] = dv(rank-i-1);
450 
451  space_hid = H5Screate_simple (rank, hdims, nullptr);
452 
453  if (space_hid < 0) return false;
454 #if defined (HAVE_HDF5_18)
455  data_hid = H5Dcreate (loc_id, name, save_type_hid, space_hid,
458 #else
459  data_hid = H5Dcreate (loc_id, name, save_type_hid, space_hid,
461 #endif
462  if (data_hid < 0)
463  {
464  H5Sclose (space_hid);
465  return false;
466  }
467 
468  retval = H5Dwrite (data_hid, save_type_hid, octave_H5S_ALL, octave_H5S_ALL,
469  octave_H5P_DEFAULT, this->m_matrix.data ()) >= 0;
470 
471  H5Dclose (data_hid);
472  H5Sclose (space_hid);
473 
474 #else
475  octave_unused_parameter (loc_id);
476  octave_unused_parameter (save_type);
477  octave_unused_parameter (name);
478 
479  this->warn_save ("hdf5");
480 #endif
481 
482  return retval;
483 }
484 
485 template <typename T>
486 bool
489  const char *name)
490 {
491  bool retval = false;
492 
493 #if defined (HAVE_HDF5)
494 
495  hid_t save_type_hid = save_type;
496  dim_vector dv;
497  int empty = load_hdf5_empty (loc_id, name, dv);
498  if (empty > 0)
499  this->m_matrix.resize (dv);
500  if (empty)
501  return (empty > 0);
502 
503 #if defined (HAVE_HDF5_18)
504  hid_t data_hid = H5Dopen (loc_id, name, octave_H5P_DEFAULT);
505 #else
506  hid_t data_hid = H5Dopen (loc_id, name);
507 #endif
508  hid_t space_id = H5Dget_space (data_hid);
509 
510  hsize_t rank = H5Sget_simple_extent_ndims (space_id);
511 
512  if (rank < 1)
513  {
514  H5Sclose (space_id);
515  H5Dclose (data_hid);
516  return false;
517  }
518 
519  OCTAVE_LOCAL_BUFFER (hsize_t, hdims, rank);
520  OCTAVE_LOCAL_BUFFER (hsize_t, maxdims, rank);
521 
522  H5Sget_simple_extent_dims (space_id, hdims, maxdims);
523 
524  // Octave uses column-major, while HDF5 uses row-major ordering
525  if (rank == 1)
526  {
527  dv.resize (2);
528  dv(0) = 1;
529  dv(1) = hdims[0];
530  }
531  else
532  {
533  dv.resize (rank);
534  for (hsize_t i = 0, j = rank - 1; i < rank; i++, j--)
535  dv(j) = hdims[i];
536  }
537 
538  T m (dv);
539  if (H5Dread (data_hid, save_type_hid, octave_H5S_ALL, octave_H5S_ALL,
540  octave_H5P_DEFAULT, m.fortran_vec ()) >= 0)
541  {
542  retval = true;
543  this->m_matrix = m;
544  }
545 
546  H5Sclose (space_id);
547  H5Dclose (data_hid);
548 
549 #else
550  octave_unused_parameter (loc_id);
551  octave_unused_parameter (save_type);
552  octave_unused_parameter (name);
553 
554  this->warn_load ("hdf5");
555 #endif
556 
557  return retval;
558 }
559 
560 template <typename T>
561 void
563  bool pr_as_read_syntax) const
564 {
565  octave_print_internal (os, this->m_matrix, pr_as_read_syntax,
566  this->current_print_indent_level ());
567 }
568 
569 template <typename T>
572 {
573  octave_value retval;
574 
575  T tmp = this->scalar;
576 
577  typedef typename T::val_type val_type;
578 
579  val_type ival = tmp.value ();
580 
581  static const bool is_signed = std::numeric_limits<val_type>::is_signed;
582  static const bool can_be_larger_than_uchar_max
583  = octave_base_int_helper_traits<val_type>::can_be_larger_than_uchar_max;
584 
585  if (octave_base_int_helper<val_type, is_signed,
586  can_be_larger_than_uchar_max>::char_value_out_of_range (ival))
587  {
588  // FIXME: is there something better we could do?
589 
590  ival = 0;
591 
592  ::warning ("range error for conversion to character value");
593  }
594  else
595  retval = octave_value (std::string (1, static_cast<char> (ival)), type);
596 
597  return retval;
598 }
599 
600 template <typename T>
603 {
604  return static_cast<double> (this->scalar);
605 }
606 
607 template <typename T>
610 {
611  return static_cast<float> (this->scalar);
612 }
613 
614 template <typename T>
617 {
618  return octave_int8 (this->scalar);
619 }
620 
621 template <typename T>
624 {
625  return octave_int16 (this->scalar);
626 }
627 
628 template <typename T>
631 {
632  return octave_int32 (this->scalar);
633 }
634 
635 template <typename T>
638 {
639  return octave_int64 (this->scalar);
640 }
641 
642 template <typename T>
645 {
646  return octave_uint8 (this->scalar);
647 }
648 
649 template <typename T>
652 {
653  return octave_uint16 (this->scalar);
654 }
655 
656 template <typename T>
659 {
660  return octave_uint32 (this->scalar);
661 }
662 
663 template <typename T>
666 {
667  return octave_uint64 (this->scalar);
668 }
669 
670 template <typename ST>
671 std::string
674  octave_idx_type) const
675 {
676  std::ostringstream buf;
677  octave_print_internal (buf, fmt, this->scalar);
678  return buf.str ();
679 }
680 
681 template <typename T>
682 bool
684 {
685  os << this->scalar << "\n";
686  return true;
687 }
688 
689 template <typename T>
690 bool
692 {
693  is >> this->scalar;
694  if (! is)
695  error ("load: failed to load scalar constant");
696 
697  return true;
698 }
699 
700 template <typename T>
701 bool
703 {
704  os.write (reinterpret_cast<char *> (&(this->scalar)), this->byte_size ());
705  return true;
706 }
707 
708 template <typename T>
709 bool
710 octave_base_int_scalar<T>::load_binary (std::istream& is, bool swap,
712 {
713  T tmp;
714 
715  if (! is.read (reinterpret_cast<char *> (&tmp), this->byte_size ()))
716  return false;
717 
718  if (swap)
719  swap_bytes<sizeof (T)> (&tmp);
720 
721  this->scalar = tmp;
722 
723  return true;
724 }
725 
726 template <typename T>
727 bool
730  const char *name, bool)
731 {
732  bool retval = false;
733 
734 #if defined (HAVE_HDF5)
735 
736  hid_t save_type_hid = save_type;
737  hsize_t dimens[3] = {0};
738  hid_t space_hid, data_hid;
739  space_hid = data_hid = -1;
740 
741  space_hid = H5Screate_simple (0, dimens, nullptr);
742  if (space_hid < 0) return false;
743 
744 #if defined (HAVE_HDF5_18)
745  data_hid = H5Dcreate (loc_id, name, save_type_hid, space_hid,
748 #else
749  data_hid = H5Dcreate (loc_id, name, save_type_hid, space_hid,
751 #endif
752  if (data_hid < 0)
753  {
754  H5Sclose (space_hid);
755  return false;
756  }
757 
758  retval = H5Dwrite (data_hid, save_type_hid, octave_H5S_ALL, octave_H5S_ALL,
759  octave_H5P_DEFAULT, &(this->scalar)) >= 0;
760 
761  H5Dclose (data_hid);
762  H5Sclose (space_hid);
763 
764 #else
765  octave_unused_parameter (loc_id);
766  octave_unused_parameter (save_type);
767  octave_unused_parameter (name);
768 
769  this->warn_save ("hdf5");
770 #endif
771 
772  return retval;
773 }
774 
775 template <typename T>
776 bool
779  const char *name)
780 {
781 #if defined (HAVE_HDF5)
782 
783  hid_t save_type_hid = save_type;
784 #if defined (HAVE_HDF5_18)
785  hid_t data_hid = H5Dopen (loc_id, name, octave_H5P_DEFAULT);
786 #else
787  hid_t data_hid = H5Dopen (loc_id, name);
788 #endif
789  hid_t space_id = H5Dget_space (data_hid);
790 
791  hsize_t rank = H5Sget_simple_extent_ndims (space_id);
792 
793  if (rank != 0)
794  {
795  H5Dclose (data_hid);
796  return false;
797  }
798 
799  T tmp;
800  if (H5Dread (data_hid, save_type_hid, octave_H5S_ALL, octave_H5S_ALL,
801  octave_H5P_DEFAULT, &tmp) < 0)
802  {
803  H5Dclose (data_hid);
804  return false;
805  }
806 
807  this->scalar = tmp;
808 
809  H5Dclose (data_hid);
810 
811  return true;
812 
813 #else
814  octave_unused_parameter (loc_id);
815  octave_unused_parameter (save_type);
816  octave_unused_parameter (name);
817 
818  this->warn_load ("hdf5");
819 
820  return false;
821 #endif
822 }
void swap_bytes< 2 >(void *ptr)
Definition: byte-swap.h:56
void swap_bytes< 8 >(void *ptr)
Definition: byte-swap.h:71
void swap_bytes< 4 >(void *ptr)
Definition: byte-swap.h:63
charNDArray max(char d, const charNDArray &m)
Definition: chNDArray.cc:230
Vector representing the dimensions (size) of an Array.
Definition: dim-vector.h:94
octave_idx_type numel(int n=0) const
Number of elements that a matrix with this dimensions would have.
Definition: dim-vector.h:335
void resize(int n, int fill_value=0)
Definition: dim-vector.h:272
octave_idx_type ndims() const
Number of dimensions.
Definition: dim-vector.h:257
octave_value as_uint64() const
Definition: ov-base-int.cc:271
octave_value as_int64() const
Definition: ov-base-int.cc:243
void print_raw(std::ostream &os, bool pr_as_read_syntax=false) const
Definition: ov-base-int.cc:562
octave_value as_int8() const
Definition: ov-base-int.cc:222
octave_value as_int16() const
Definition: ov-base-int.cc:229
octave_base_value * try_narrowing_conversion()
Definition: ov-base-int.cc:147
octave_value as_uint16() const
Definition: ov-base-int.cc:257
octave_value as_single() const
Definition: ov-base-int.cc:215
bool save_ascii(std::ostream &os)
Definition: ov-base-int.cc:289
bool load_ascii(std::istream &is)
Definition: ov-base-int.cc:305
std::string edit_display(const float_display_format &fmt, octave_idx_type i, octave_idx_type j) const
Definition: ov-base-int.cc:278
bool save_hdf5_internal(octave_hdf5_id loc_id, octave_hdf5_id save_type, const char *name, bool)
Definition: ov-base-int.cc:428
bool load_binary(std::istream &is, bool swap, octave::mach_info::float_format)
Definition: ov-base-int.cc:358
octave_value as_uint8() const
Definition: ov-base-int.cc:250
octave_value as_uint32() const
Definition: ov-base-int.cc:264
octave_value convert_to_str_internal(bool, bool, char type) const
Definition: ov-base-int.cc:160
bool save_binary(std::ostream &os, bool)
Definition: ov-base-int.cc:335
octave_value as_double() const
Definition: ov-base-int.cc:208
octave_value as_int32() const
Definition: ov-base-int.cc:236
bool load_hdf5_internal(octave_hdf5_id loc_id, octave_hdf5_id save_type, const char *name)
Definition: ov-base-int.cc:487
octave_value as_int8() const
Definition: ov-base-int.cc:616
octave_value as_double() const
Definition: ov-base-int.cc:602
octave_value as_single() const
Definition: ov-base-int.cc:609
bool load_ascii(std::istream &is)
Definition: ov-base-int.cc:691
octave_value as_int16() const
Definition: ov-base-int.cc:623
bool save_hdf5_internal(octave_hdf5_id loc_id, octave_hdf5_id save_type, const char *name, bool)
Definition: ov-base-int.cc:728
bool load_hdf5_internal(octave_hdf5_id loc_id, octave_hdf5_id save_type, const char *name)
Definition: ov-base-int.cc:777
octave_value convert_to_str_internal(bool, bool, char type) const
Definition: ov-base-int.cc:571
octave_value as_int32() const
Definition: ov-base-int.cc:630
octave_value as_int64() const
Definition: ov-base-int.cc:637
octave_value as_uint16() const
Definition: ov-base-int.cc:651
std::string edit_display(const float_display_format &fmt, octave_idx_type i, octave_idx_type j) const
Definition: ov-base-int.cc:672
octave_value as_uint8() const
Definition: ov-base-int.cc:644
octave_value as_uint64() const
Definition: ov-base-int.cc:665
bool load_binary(std::istream &is, bool swap, octave::mach_info::float_format)
Definition: ov-base-int.cc:710
octave_value as_uint32() const
Definition: ov-base-int.cc:658
bool save_ascii(std::ostream &os)
Definition: ov-base-int.cc:683
bool save_binary(std::ostream &os, bool)
Definition: ov-base-int.cc:702
const octave_hdf5_id octave_H5P_DEFAULT
const octave_hdf5_id octave_H5S_ALL
save_type
Definition: data-conv.h:87
void warning(const char *fmt,...)
Definition: error.cc:1063
void() error(const char *fmt,...)
Definition: error.cc:988
intNDArray< octave_int16 > int16NDArray
Definition: int16NDArray.h:36
intNDArray< octave_int32 > int32NDArray
Definition: int32NDArray.h:36
intNDArray< octave_int64 > int64NDArray
Definition: int64NDArray.h:36
intNDArray< octave_int8 > int8NDArray
Definition: int8NDArray.h:36
int save_hdf5_empty(octave_hdf5_id loc_id, const char *name, const dim_vector &d)
Definition: ls-hdf5.cc:1249
int load_hdf5_empty(octave_hdf5_id loc_id, const char *name, dim_vector &d)
Definition: ls-hdf5.cc:1306
std::string extract_keyword(std::istream &is, const char *keyword, const bool next_only)
Definition: ls-oct-text.cc:84
float_format
Definition: mach-info.h:38
T octave_idx_type m
Definition: mx-inlines.cc:781
int64_t octave_hdf5_id
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 OCTAVE_LOCAL_BUFFER(T, buf, size)
Definition: oct-locbuf.h:44
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))
void octave_print_internal(std::ostream &os, const float_display_format &fmt, bool d, bool pr_as_read_syntax)
Definition: pr-output.cc:1761
intNDArray< octave_uint16 > uint16NDArray
Definition: uint16NDArray.h:36
intNDArray< octave_uint32 > uint32NDArray
Definition: uint32NDArray.h:36
intNDArray< octave_uint64 > uint64NDArray
Definition: uint64NDArray.h:36
intNDArray< octave_uint8 > uint8NDArray
Definition: uint8NDArray.h:36