GNU Octave  4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
typecast.cc
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 2007-2017 David Bateman
4 Copyright (C) 2009 VZLU Prague
5 
6 This file is part of Octave.
7 
8 Octave is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published by the
10 Free Software Foundation; either version 3 of the License, or (at your
11 option) any later version.
12 
13 Octave is distributed in the hope that it will be useful, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 for more details.
17 
18 You should have received a copy of the GNU General Public License
19 along with Octave; see the file COPYING. If not, see
20 <http://www.gnu.org/licenses/>.
21 
22 */
23 
24 #if defined (HAVE_CONFIG_H)
25 # include "config.h"
26 #endif
27 
28 #include <limits>
29 
30 #include "mx-base.h"
31 
32 #include "defun.h"
33 #include "error.h"
34 #include "errwarn.h"
35 #include "ovl.h"
36 #include "unwind-prot.h"
37 
38 static dim_vector
40 {
41  if (old_dims.ndims () == 2 && old_dims(0) == 1)
42  return dim_vector (1, n);
43  else if (old_dims.ndims () == 2 && old_dims(0) == 0 && old_dims(1) == 0)
44  return dim_vector ();
45  else
46  return dim_vector (n, 1);
47 }
48 
49 template <typename ArrayType>
50 static void
51 get_data_and_bytesize (const ArrayType& array,
52  const void *& data,
53  octave_idx_type& byte_size,
54  dim_vector& old_dims,
56 {
57  // The array given may be a temporary, constructed from a scalar or sparse
58  // array. This will ensure the data will be deallocated after we exit.
59  frame.add_delete (new ArrayType (array));
60 
61  data = reinterpret_cast<const void *> (array.data ());
62  byte_size = array.byte_size ();
63 
64  old_dims = array.dims ();
65 }
66 
67 template <typename ArrayType>
68 static ArrayType
69 reinterpret_copy (const void *data, octave_idx_type byte_size,
70  const dim_vector& old_dims)
71 {
72  typedef typename ArrayType::element_type T;
73  octave_idx_type n = byte_size / sizeof (T);
74 
75  if (n * static_cast<int> (sizeof (T)) != byte_size)
76  error ("typecast: incorrect number of input values to make output value");
77 
78  ArrayType retval (get_vec_dims (old_dims, n));
79  T *dest = retval.fortran_vec ();
80  std::memcpy (dest, data, n * sizeof (T));
81 
82  return retval;
83 }
84 
85 DEFUN (typecast, args, ,
86  doc: /* -*- texinfo -*-
87 @deftypefn {} {@var{y} =} typecast (@var{x}, "@var{class}")
88 Return a new array @var{y} resulting from interpreting the data of @var{x}
89 in memory as data of the numeric class @var{class}.
90 
91 Both the class of @var{x} and @var{class} must be one of the built-in
92 numeric classes:
93 
94 @example
95 @group
96 "logical"
97 "char"
98 "int8"
99 "int16"
100 "int32"
101 "int64"
102 "uint8"
103 "uint16"
104 "uint32"
105 "uint64"
106 "double"
107 "single"
108 "double complex"
109 "single complex"
110 @end group
111 @end example
112 
113 @noindent
114 the last two are only used with @var{class}; they indicate that a
115 complex-valued result is requested. Complex arrays are stored in memory as
116 consecutive pairs of real numbers. The sizes of integer types are given by
117 their bit counts. Both logical and char are typically one byte wide;
118 however, this is not guaranteed by C++. If your system is IEEE conformant,
119 single and double will be 4 bytes and 8 bytes wide, respectively.
120 @qcode{"logical"} is not allowed for @var{class}.
121 
122 If the input is a row vector, the return value is a row vector, otherwise it
123 is a column vector.
124 
125 If the bit length of @var{x} is not divisible by that of @var{class}, an
126 error occurs.
127 
128 An example of the use of typecast on a little-endian machine is
129 
130 @example
131 @group
132 @var{x} = uint16 ([1, 65535]);
133 typecast (@var{x}, "uint8")
134 @result{} [ 1, 0, 255, 255]
135 @end group
136 @end example
137 @seealso{cast, bitpack, bitunpack, swapbytes}
138 @end deftypefn */)
139 {
140  if (args.length () != 2)
141  print_usage ();
142 
144 
146 
147  const void *data = 0;
148  octave_idx_type byte_size = 0;
149  dim_vector old_dims;
150 
151  octave_value array = args(0);
152 
153  if (array.is_bool_type ())
154  get_data_and_bytesize (array.bool_array_value (), data, byte_size,
155  old_dims, frame);
156  else if (array.is_string ())
157  get_data_and_bytesize (array.char_array_value (), data, byte_size,
158  old_dims, frame);
159  else if (array.is_integer_type ())
160  {
161  if (array.is_int8_type ())
162  get_data_and_bytesize (array.int8_array_value (), data, byte_size,
163  old_dims, frame);
164  else if (array.is_int16_type ())
165  get_data_and_bytesize (array.int16_array_value (), data, byte_size,
166  old_dims, frame);
167  else if (array.is_int32_type ())
168  get_data_and_bytesize (array.int32_array_value (), data, byte_size,
169  old_dims, frame);
170  else if (array.is_int64_type ())
171  get_data_and_bytesize (array.int64_array_value (), data, byte_size,
172  old_dims, frame);
173  else if (array.is_uint8_type ())
174  get_data_and_bytesize (array.uint8_array_value (), data, byte_size,
175  old_dims, frame);
176  else if (array.is_uint16_type ())
177  get_data_and_bytesize (array.uint16_array_value (), data, byte_size,
178  old_dims, frame);
179  else if (array.is_uint32_type ())
180  get_data_and_bytesize (array.uint32_array_value (), data, byte_size,
181  old_dims, frame);
182  else if (array.is_uint64_type ())
183  get_data_and_bytesize (array.uint64_array_value (), data, byte_size,
184  old_dims, frame);
185  else
186  assert (0);
187  }
188  else if (array.is_complex_type ())
189  {
190  if (array.is_single_type ())
192  byte_size, old_dims, frame);
193  else
195  byte_size, old_dims, frame);
196  }
197  else if (array.is_real_type ())
198  {
199  if (array.is_single_type ())
200  get_data_and_bytesize (array.float_array_value (), data, byte_size,
201  old_dims, frame);
202  else
203  get_data_and_bytesize (array.array_value (), data, byte_size,
204  old_dims, frame);
205  }
206  else
207  error ("typecast: invalid input class: %s",
208  array.class_name ().c_str ());
209 
210  std::string numclass = args(1).string_value ();
211 
212  if (numclass.size () == 0)
213  ;
214  else if (numclass == "char")
215  retval = octave_value (reinterpret_copy<charNDArray>
216  (data, byte_size, old_dims), array.is_dq_string () ? '"'
217  : '\'');
218  else if (numclass[0] == 'i')
219  {
220  if (numclass == "int8")
221  retval = reinterpret_copy<int8NDArray> (data, byte_size, old_dims);
222  else if (numclass == "int16")
223  retval = reinterpret_copy<int16NDArray> (data, byte_size, old_dims);
224  else if (numclass == "int32")
225  retval = reinterpret_copy<int32NDArray> (data, byte_size, old_dims);
226  else if (numclass == "int64")
227  retval = reinterpret_copy<int64NDArray> (data, byte_size, old_dims);
228  }
229  else if (numclass[0] == 'u')
230  {
231  if (numclass == "uint8")
232  retval = reinterpret_copy<uint8NDArray> (data, byte_size, old_dims);
233  else if (numclass == "uint16")
234  retval = reinterpret_copy<uint16NDArray> (data, byte_size,
235  old_dims);
236  else if (numclass == "uint32")
237  retval = reinterpret_copy<uint32NDArray> (data, byte_size,
238  old_dims);
239  else if (numclass == "uint64")
240  retval = reinterpret_copy<uint64NDArray> (data, byte_size,
241  old_dims);
242  }
243  else if (numclass == "single")
244  retval = reinterpret_copy<FloatNDArray> (data, byte_size, old_dims);
245  else if (numclass == "double")
246  retval = reinterpret_copy<NDArray> (data, byte_size, old_dims);
247  else if (numclass == "single complex")
248  retval = reinterpret_copy<FloatComplexNDArray> (data, byte_size,
249  old_dims);
250  else if (numclass == "double complex")
251  retval = reinterpret_copy<ComplexNDArray> (data, byte_size, old_dims);
252 
253  if (retval.is_undefined ())
254  error ("typecast: cannot convert to %s class", numclass.c_str ());
255 
256  return retval;
257 }
258 
259 /*
260 %!assert (typecast (int64 (0), "char"), char (zeros (1, 8)))
261 %!assert (typecast (int64 (0), "int8"), zeros (1, 8, "int8"))
262 %!assert (typecast (int64 (0), "uint8"), zeros (1, 8, "uint8"))
263 %!assert (typecast (int64 (0), "int16"), zeros (1, 4, "int16"))
264 %!assert (typecast (int64 (0), "uint16"), zeros (1, 4, "uint16"))
265 %!assert (typecast (int64 (0), "int32"), zeros (1, 2, "int32"))
266 %!assert (typecast (int64 (0), "uint32"), zeros (1, 2, "uint32"))
267 %!assert (typecast (int64 (0), "int64"), zeros (1, 1, "int64"))
268 %!assert (typecast (int64 (0), "uint64"), zeros (1, 1, "uint64"))
269 %!assert (typecast (int64 (0), "single"), zeros (1, 2, "single"))
270 %!assert (typecast (int64 (0), "double"), 0)
271 %!assert (typecast (int64 (0), "single complex"), single (0))
272 %!assert (typecast (int64 ([0 0]), "double complex"), 0)
273 
274 %!assert (typecast ([], "double"), [])
275 %!assert (typecast (0, "double"), 0)
276 %!assert (typecast (inf, "double"), inf)
277 %!assert (typecast (-inf, "double"), -inf)
278 %!assert (typecast (nan, "double"), nan)
279 
280 %!error typecast ()
281 %!error typecast (1)
282 %!error typecast (1, 2, 3)
283 %!error typecast (1, "invalid")
284 %!error typecast (int8 (0), "double")
285 */
286 
287 template <typename ArrayType>
288 ArrayType
289 do_bitpack (const boolNDArray& bitp)
290 {
291  typedef typename ArrayType::element_type T;
293  = bitp.numel () / (sizeof (T) * std::numeric_limits<unsigned char>::digits);
294 
295  if (n * static_cast<int> (sizeof (T)) *
296  std::numeric_limits<unsigned char>::digits != bitp.numel ())
297  error ("bitpack: incorrect number of bits to make up output value");
298 
299  ArrayType retval (get_vec_dims (bitp.dims (), n));
300 
301  const bool *bits = bitp.fortran_vec ();
302  char *packed = reinterpret_cast<char *> (retval.fortran_vec ());
303 
304  octave_idx_type m = n * sizeof (T);
305 
306  for (octave_idx_type i = 0; i < m; i++)
307  {
308  char c = bits[0];
309  for (int j = 1; j < std::numeric_limits<unsigned char>::digits; j++)
310  c |= bits[j] << j;
311 
312  packed[i] = c;
313  bits += std::numeric_limits<unsigned char>::digits;
314  }
315 
316  return retval;
317 }
318 
319 DEFUN (bitpack, args, ,
320  doc: /* -*- texinfo -*-
321 @deftypefn {} {@var{y} =} bitpack (@var{x}, @var{class})
322 Return a new array @var{y} resulting from interpreting the logical array
323 @var{x} as raw bit patterns for data of the numeric class @var{class}.
324 
325 @var{class} must be one of the built-in numeric classes:
326 
327 @example
328 @group
329 "double"
330 "single"
331 "double complex"
332 "single complex"
333 "char"
334 "int8"
335 "int16"
336 "int32"
337 "int64"
338 "uint8"
339 "uint16"
340 "uint32"
341 "uint64"
342 @end group
343 @end example
344 
345 The number of elements of @var{x} should be divisible by the bit length of
346 @var{class}. If it is not, excess bits are discarded. Bits come in
347 increasing order of significance, i.e., @code{x(1)} is bit 0, @code{x(2)} is
348 bit 1, etc.
349 
350 The result is a row vector if @var{x} is a row vector, otherwise it is a
351 column vector.
352 @seealso{bitunpack, typecast}
353 @end deftypefn */)
354 {
355  if (args.length () != 2)
356  print_usage ();
357 
358  if (! args(0).is_bool_type ())
359  error ("bitpack: X must be a logical array");
360 
362 
363  boolNDArray bitp = args(0).bool_array_value ();
364 
365  std::string numclass = args(1).string_value ();
366 
367  if (numclass.size () == 0)
368  ;
369  else if (numclass == "char")
370  retval = octave_value (do_bitpack<charNDArray> (bitp), '\'');
371  else if (numclass[0] == 'i')
372  {
373  if (numclass == "int8")
374  retval = do_bitpack<int8NDArray> (bitp);
375  else if (numclass == "int16")
376  retval = do_bitpack<int16NDArray> (bitp);
377  else if (numclass == "int32")
378  retval = do_bitpack<int32NDArray> (bitp);
379  else if (numclass == "int64")
380  retval = do_bitpack<int64NDArray> (bitp);
381  }
382  else if (numclass[0] == 'u')
383  {
384  if (numclass == "uint8")
385  retval = do_bitpack<uint8NDArray> (bitp);
386  else if (numclass == "uint16")
387  retval = do_bitpack<uint16NDArray> (bitp);
388  else if (numclass == "uint32")
389  retval = do_bitpack<uint32NDArray> (bitp);
390  else if (numclass == "uint64")
391  retval = do_bitpack<uint64NDArray> (bitp);
392  }
393  else if (numclass == "single")
394  retval = do_bitpack<FloatNDArray> (bitp);
395  else if (numclass == "double")
396  retval = do_bitpack<NDArray> (bitp);
397  else if (numclass == "single complex")
398  retval = do_bitpack<FloatComplexNDArray> (bitp);
399  else if (numclass == "double complex")
400  retval = do_bitpack<ComplexNDArray> (bitp);
401 
402  if (retval.is_undefined ())
403  error ("bitpack: cannot pack to %s class", numclass.c_str ());
404 
405  return retval;
406 }
407 
408 /*
409 %!assert (bitpack (zeros (1, 8, "logical"), "char"), "\0")
410 %!assert (bitpack (zeros (1, 8, "logical"), "int8"), int8 (0))
411 %!assert (bitpack (zeros (1, 8, "logical"), "uint8"), uint8 (0))
412 %!assert (bitpack (zeros (1, 16, "logical"), "int16"), int16 (0))
413 %!assert (bitpack (zeros (1, 16, "logical"), "uint16"), uint16 (0))
414 %!assert (bitpack (zeros (1, 32, "logical"), "int32"), int32 (0))
415 %!assert (bitpack (zeros (1, 32, "logical"), "uint32"), uint32 (0))
416 %!assert (bitpack (zeros (1, 64, "logical"), "int64"), int64 (0))
417 %!assert (bitpack (zeros (1, 64, "logical"), "uint64"), uint64 (0))
418 %!assert (bitpack (zeros (1, 32, "logical"), "single"), single (0))
419 %!assert (bitpack (zeros (1, 64, "logical"), "double"), double (0))
420 %!assert (bitpack (zeros (1, 64, "logical"), "single complex"), single (0))
421 %!assert (bitpack (zeros (1, 128, "logical"), "double complex"), double (0))
422 
423 %!error bitpack ()
424 %!error bitpack (1)
425 %!error bitpack (1, 2, 3)
426 %!error bitpack (1, "invalid")
427 %!error bitpack (1, "double")
428 %!error bitpack (false, "invalid")
429 %!error bitpack (false, "double")
430 */
431 
432 template <typename ArrayType>
434 do_bitunpack (const ArrayType& array)
435 {
436  typedef typename ArrayType::element_type T;
437  octave_idx_type n = array.numel () * sizeof (T)
438  * std::numeric_limits<unsigned char>::digits;
439 
440  boolNDArray retval (get_vec_dims (array.dims (), n));
441 
442  const char *packed = reinterpret_cast<const char *> (array.fortran_vec ());
443  bool *bits = retval.fortran_vec ();
444 
445  octave_idx_type m = n / std::numeric_limits<unsigned char>::digits;
446 
447  for (octave_idx_type i = 0; i < m; i++)
448  {
449  char c = packed[i];
450  bits[0] = c & 1;
451  for (int j = 1; j < std::numeric_limits<unsigned char>::digits; j++)
452  bits[j] = (c >>= 1) & 1;
453  bits += std::numeric_limits<unsigned char>::digits;
454  }
455 
456  return retval;
457 }
458 
459 DEFUN (bitunpack, args, ,
460  doc: /* -*- texinfo -*-
461 @deftypefn {} {@var{y} =} bitunpack (@var{x})
462 Return a logical array @var{y} corresponding to the raw bit patterns of
463 @var{x}.
464 
465 @var{x} must belong to one of the built-in numeric classes:
466 
467 @example
468 @group
469 "double"
470 "single"
471 "char"
472 "int8"
473 "int16"
474 "int32"
475 "int64"
476 "uint8"
477 "uint16"
478 "uint32"
479 "uint64"
480 @end group
481 @end example
482 
483 The result is a row vector if @var{x} is a row vector; otherwise, it is a
484 column vector.
485 @seealso{bitpack, typecast}
486 @end deftypefn */)
487 {
488  if (args.length () != 1)
489  print_usage ();
490 
491  if (! (args(0).is_numeric_type () || args(0).is_string ()))
492  error ("bitunpack: argument must be a number or a string");
493 
495 
496  octave_value array = args(0);
497 
498  if (array.is_string ())
499  retval = do_bitunpack (array.char_array_value ());
500  else if (array.is_integer_type ())
501  {
502  if (array.is_int8_type ())
503  retval = do_bitunpack (array.int8_array_value ());
504  else if (array.is_int16_type ())
505  retval = do_bitunpack (array.int16_array_value ());
506  else if (array.is_int32_type ())
507  retval = do_bitunpack (array.int32_array_value ());
508  else if (array.is_int64_type ())
509  retval = do_bitunpack (array.int64_array_value ());
510  else if (array.is_uint8_type ())
511  retval = do_bitunpack (array.uint8_array_value ());
512  else if (array.is_uint16_type ())
513  retval = do_bitunpack (array.uint16_array_value ());
514  else if (array.is_uint32_type ())
515  retval = do_bitunpack (array.uint32_array_value ());
516  else if (array.is_uint64_type ())
517  retval = do_bitunpack (array.uint64_array_value ());
518  else
519  assert (0);
520  }
521  else if (array.is_complex_type ())
522  {
523  if (array.is_single_type ())
524  retval = do_bitunpack (array.float_complex_array_value ());
525  else
526  retval = do_bitunpack (array.complex_array_value ());
527  }
528  else if (array.is_real_type ())
529  {
530  if (array.is_single_type ())
531  retval = do_bitunpack (array.float_array_value ());
532  else
533  retval = do_bitunpack (array.array_value ());
534  }
535  else
536  error ("bitunpack: invalid input class: %s",
537  array.class_name ().c_str ());
538 
539  return retval;
540 }
541 
542 /*
543 %!assert (bitunpack ("\0"), zeros (1, 8, "logical"))
544 %!assert (bitunpack (int8 (0)), zeros (1, 8, "logical"))
545 %!assert (bitunpack (uint8 (0)), zeros (1, 8, "logical"))
546 %!assert (bitunpack (int16 (0)), zeros (1, 16, "logical"))
547 %!assert (bitunpack (uint16 (0)), zeros (1, 16, "logical"))
548 %!assert (bitunpack (int32 (0)), zeros (1, 32, "logical"))
549 %!assert (bitunpack (uint32 (0)), zeros (1, 32, "logical"))
550 %!assert (bitunpack (int64 (0)), zeros (1, 64, "logical"))
551 %!assert (bitunpack (uint64 (0)), zeros (1, 64, "logical"))
552 %!assert (bitunpack (single (0)), zeros (1, 32, "logical"))
553 %!assert (bitunpack (double (0)), zeros (1, 64, "logical"))
554 %!assert (bitunpack (complex (single (0))), zeros (1, 64, "logical"))
555 %!assert (bitunpack (complex (double (0))), zeros (1, 128, "logical"))
556 
557 %!error bitunpack ()
558 %!error bitunpack (1, 2)
559 %!error bitunpack ({})
560 */
uint8NDArray uint8_array_value(void) const
Definition: ov.h:896
ComplexNDArray complex_array_value(bool frc_str_conv=false) const
Definition: ov.h:812
charNDArray char_array_value(bool frc_str_conv=false) const
Definition: ov.h:831
bool is_real_type(void) const
Definition: ov.h:667
int8NDArray int8_array_value(void) const
Definition: ov.h:884
bool is_uint16_type(void) const
Definition: ov.h:650
OCTINTERP_API void print_usage(void)
Definition: defun.cc:52
octave_idx_type numel(void) const
Number of elements in the array.
Definition: Array.h:363
int16NDArray int16_array_value(void) const
Definition: ov.h:887
uint64NDArray uint64_array_value(void) const
Definition: ov.h:905
#define DEFUN(name, args_name, nargout_name, doc)
Definition: defun.h:46
void error(const char *fmt,...)
Definition: error.cc:570
int32NDArray int32_array_value(void) const
Definition: ov.h:890
bool is_int8_type(void) const
Definition: ov.h:635
static void get_data_and_bytesize(const ArrayType &array, const void *&data, octave_idx_type &byte_size, dim_vector &old_dims, octave::unwind_protect &frame)
Definition: typecast.cc:51
bool is_int32_type(void) const
Definition: ov.h:641
typecast(ar{x},"uint8") esult
Definition: typecast.cc:138
boolNDArray bool_array_value(bool warn=false) const
Definition: ov.h:825
int64NDArray int64_array_value(void) const
Definition: ov.h:893
JNIEnv void * args
Definition: ov-java.cc:67
const dim_vector & dims(void) const
Return a const-reference so that dims ()(i) works efficiently.
Definition: Array.h:439
void add_delete(T *obj)
FloatNDArray float_array_value(bool frc_str_conv=false) const
Definition: ov.h:796
bool is_bool_type(void) const
Definition: ov.h:661
nd deftypefn *octave_map m
Definition: ov-struct.cc:2058
then the function must return scalars which will be concatenated into the return array(s).If code
Definition: cellfun.cc:398
FloatComplexNDArray float_complex_array_value(bool frc_str_conv=false) const
Definition: ov.h:816
bool is_string(void) const
Definition: ov.h:578
bool is_complex_type(void) const
Definition: ov.h:670
bool is_int64_type(void) const
Definition: ov.h:644
octave_value retval
Definition: data.cc:6294
the sparsity preserving column transformation such that that defines the pivoting threshold can be given in which case it defines the c
Definition: lu.cc:138
bool is_int16_type(void) const
Definition: ov.h:638
octave::unwind_protect frame
Definition: graphics.cc:11584
NDArray array_value(bool frc_str_conv=false) const
Definition: ov.h:793
static ArrayType reinterpret_copy(const void *data, octave_idx_type byte_size, const dim_vector &old_dims)
Definition: typecast.cc:69
bool is_dq_string(void) const
Definition: ov.h:584
=val(i)}if ode{val(i)}occurs in table i
Definition: lookup.cc:239
bool is_uint8_type(void) const
Definition: ov.h:647
octave_idx_type ndims(void) const
Number of dimensions.
Definition: dim-vector.h:301
std::string class_name(void) const
Definition: ov.h:1234
static dim_vector get_vec_dims(const dim_vector &old_dims, octave_idx_type n)
Definition: typecast.cc:39
bool is_undefined(void) const
Definition: ov.h:539
bool is_uint64_type(void) const
Definition: ov.h:656
const T * fortran_vec(void) const
Definition: Array.h:584
bool is_single_type(void) const
Definition: ov.h:627
bool is_uint32_type(void) const
Definition: ov.h:653
Vector representing the dimensions (size) of an Array.
Definition: dim-vector.h:87
uint32NDArray uint32_array_value(void) const
Definition: ov.h:902
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
Definition: utils.cc:854
uint16NDArray uint16_array_value(void) const
Definition: ov.h:899
return octave_value(v1.char_array_value().concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string())? '\'': '"'))
bool is_integer_type(void) const
Definition: ov.h:664