4901
|
1 /* |
|
2 |
|
3 Copyright (C) 2004 John W. Eaton |
|
4 |
|
5 This file is part of Octave. |
|
6 |
|
7 Octave is free software; you can redistribute it and/or modify it |
|
8 under the terms of the GNU General Public License as published by the |
|
9 Free Software Foundation; either version 2, or (at your option) any |
|
10 later version. |
|
11 |
|
12 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
15 for more details. |
|
16 |
|
17 You should have received a copy of the GNU General Public License |
|
18 along with Octave; see the file COPYING. If not, write to the Free |
|
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|
20 |
|
21 */ |
|
22 |
|
23 #if defined (__GNUG__) && defined (USE_PRAGMA_INTERFACE_IMPLEMENTATION) |
|
24 #pragma implementation |
|
25 #endif |
|
26 |
|
27 #ifdef HAVE_CONFIG_H |
|
28 #include <config.h> |
|
29 #endif |
|
30 |
|
31 #include <climits> |
|
32 |
|
33 #include <iostream> |
|
34 #include <vector> |
|
35 |
|
36 #include "lo-ieee.h" |
|
37 #include "lo-utils.h" |
|
38 #include "mx-base.h" |
|
39 #include "quit.h" |
|
40 |
|
41 #include "defun.h" |
|
42 #include "gripes.h" |
|
43 #include "oct-obj.h" |
|
44 #include "oct-lvalue.h" |
|
45 #include "ops.h" |
|
46 #include "ov-base.h" |
|
47 #include "ov-base-int.h" |
|
48 #include "ov-base-int.cc" |
|
49 #include "ov-int8.h" |
|
50 #include "ov-type-conv.h" |
|
51 #include "pr-output.h" |
|
52 #include "variables.h" |
|
53 |
|
54 #include "byte-swap.h" |
|
55 #include "ls-oct-ascii.h" |
|
56 #include "ls-utils.h" |
|
57 #include "ls-hdf5.h" |
|
58 |
|
59 template class octave_base_matrix<int8NDArray>; |
|
60 |
|
61 template class octave_base_int_matrix<int8NDArray>; |
|
62 |
|
63 DEFINE_OCTAVE_ALLOCATOR (octave_int8_matrix); |
|
64 |
|
65 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_int8_matrix, |
|
66 "int8 matrix", "int8"); |
|
67 |
|
68 template class octave_base_scalar<octave_int8>; |
|
69 |
|
70 template class octave_base_int_scalar<octave_int8>; |
|
71 |
|
72 DEFINE_OCTAVE_ALLOCATOR (octave_int8_scalar); |
|
73 |
|
74 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_int8_scalar, |
|
75 "int8 scalar", "int8"); |
|
76 |
|
77 DEFUN (int8, args, , |
|
78 "-*- texinfo -*-\n\ |
|
79 @deftypefn {Built-in Function} {} int8 (@var{x})\n\ |
|
80 Convert @var{x} to 8-bit integer type.\n\ |
|
81 @end deftypefn") |
|
82 { |
|
83 OCTAVE_TYPE_CONV_BODY (int8); |
|
84 } |
|
85 |
|
86 /* |
|
87 ;;; Local Variables: *** |
|
88 ;;; mode: C++ *** |
|
89 ;;; End: *** |
|
90 */ |