GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
op-int-concat.cc
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (C) 2004-2021 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 #if defined (HAVE_CONFIG_H)
27 # include "config.h"
28 #endif
29 
30 #include "errwarn.h"
31 #include "ovl.h"
32 #include "ov.h"
33 #include "ov-int8.h"
34 #include "ov-int16.h"
35 #include "ov-int32.h"
36 #include "ov-int64.h"
37 #include "ov-uint8.h"
38 #include "ov-uint16.h"
39 #include "ov-uint32.h"
40 #include "ov-uint64.h"
41 #include "ov-range.h"
42 #include "ov-bool.h"
43 #include "ov-bool-mat.h"
44 #include "ov-scalar.h"
45 #include "ov-float.h"
46 #include "ov-re-mat.h"
47 #include "ov-flt-re-mat.h"
48 #include "ov-str-mat.h"
49 #include "ov-typeinfo.h"
50 #include "op-int.h"
51 #include "ops.h"
52 
53 // Concatenation of mixed integer types:
54 
55 OCTAVE_CONCAT_FN2 (int8, int16)
56 OCTAVE_CONCAT_FN2 (int8, int32)
57 OCTAVE_CONCAT_FN2 (int8, int64)
58 
59 OCTAVE_CONCAT_FN2 (int8, uint8)
60 OCTAVE_CONCAT_FN2 (int8, uint16)
61 OCTAVE_CONCAT_FN2 (int8, uint32)
62 OCTAVE_CONCAT_FN2 (int8, uint64)
63 
64 OCTAVE_CONCAT_FN2 (int16, int8)
65 OCTAVE_CONCAT_FN2 (int16, int32)
66 OCTAVE_CONCAT_FN2 (int16, int64)
67 
68 OCTAVE_CONCAT_FN2 (int16, uint8)
69 OCTAVE_CONCAT_FN2 (int16, uint16)
70 OCTAVE_CONCAT_FN2 (int16, uint32)
71 OCTAVE_CONCAT_FN2 (int16, uint64)
72 
73 OCTAVE_CONCAT_FN2 (int32, int8)
74 OCTAVE_CONCAT_FN2 (int32, int16)
75 OCTAVE_CONCAT_FN2 (int32, int64)
76 
77 OCTAVE_CONCAT_FN2 (int32, uint8)
78 OCTAVE_CONCAT_FN2 (int32, uint16)
79 OCTAVE_CONCAT_FN2 (int32, uint32)
80 OCTAVE_CONCAT_FN2 (int32, uint64)
81 
82 OCTAVE_CONCAT_FN2 (int64, int8)
83 OCTAVE_CONCAT_FN2 (int64, int16)
84 OCTAVE_CONCAT_FN2 (int64, int32)
85 
86 OCTAVE_CONCAT_FN2 (int64, uint8)
87 OCTAVE_CONCAT_FN2 (int64, uint16)
88 OCTAVE_CONCAT_FN2 (int64, uint32)
89 OCTAVE_CONCAT_FN2 (int64, uint64)
90 
91 OCTAVE_CONCAT_FN2 (uint8, int8)
92 OCTAVE_CONCAT_FN2 (uint8, int16)
93 OCTAVE_CONCAT_FN2 (uint8, int32)
94 OCTAVE_CONCAT_FN2 (uint8, int64)
95 
96 OCTAVE_CONCAT_FN2 (uint8, uint16)
97 OCTAVE_CONCAT_FN2 (uint8, uint32)
98 OCTAVE_CONCAT_FN2 (uint8, uint64)
99 
100 OCTAVE_CONCAT_FN2 (uint16, int8)
101 OCTAVE_CONCAT_FN2 (uint16, int16)
102 OCTAVE_CONCAT_FN2 (uint16, int32)
103 OCTAVE_CONCAT_FN2 (uint16, int64)
104 
105 OCTAVE_CONCAT_FN2 (uint16, uint8)
106 OCTAVE_CONCAT_FN2 (uint16, uint32)
107 OCTAVE_CONCAT_FN2 (uint16, uint64)
108 
109 OCTAVE_CONCAT_FN2 (uint32, int8)
110 OCTAVE_CONCAT_FN2 (uint32, int16)
111 OCTAVE_CONCAT_FN2 (uint32, int32)
112 OCTAVE_CONCAT_FN2 (uint32, int64)
113 
114 OCTAVE_CONCAT_FN2 (uint32, uint8)
115 OCTAVE_CONCAT_FN2 (uint32, uint16)
116 OCTAVE_CONCAT_FN2 (uint32, uint64)
117 
118 OCTAVE_CONCAT_FN2 (uint64, int8)
119 OCTAVE_CONCAT_FN2 (uint64, int16)
120 OCTAVE_CONCAT_FN2 (uint64, int32)
121 OCTAVE_CONCAT_FN2 (uint64, int64)
122 
123 OCTAVE_CONCAT_FN2 (uint64, uint8)
124 OCTAVE_CONCAT_FN2 (uint64, uint16)
125 OCTAVE_CONCAT_FN2 (uint64, uint32)
126 
131 
136 
141 
146 
151 
156 
161 
166 
171 
176 
181 
186 
187 void
188 install_int_concat_ops (octave::type_info& ti)
189 {
190  OCTAVE_INSTALL_CONCAT_FN2 (int8, int16);
191  OCTAVE_INSTALL_CONCAT_FN2 (int8, int32);
192  OCTAVE_INSTALL_CONCAT_FN2 (int8, int64);
193 
194  OCTAVE_INSTALL_CONCAT_FN2 (int8, uint8);
195  OCTAVE_INSTALL_CONCAT_FN2 (int8, uint16);
196  OCTAVE_INSTALL_CONCAT_FN2 (int8, uint32);
197  OCTAVE_INSTALL_CONCAT_FN2 (int8, uint64);
198 
199  OCTAVE_INSTALL_CONCAT_FN2 (int16, int8);
200  OCTAVE_INSTALL_CONCAT_FN2 (int16, int32);
201  OCTAVE_INSTALL_CONCAT_FN2 (int16, int64);
202 
203  OCTAVE_INSTALL_CONCAT_FN2 (int16, uint8);
204  OCTAVE_INSTALL_CONCAT_FN2 (int16, uint16);
205  OCTAVE_INSTALL_CONCAT_FN2 (int16, uint32);
206  OCTAVE_INSTALL_CONCAT_FN2 (int16, uint64);
207 
208  OCTAVE_INSTALL_CONCAT_FN2 (int32, int8);
209  OCTAVE_INSTALL_CONCAT_FN2 (int32, int16);
210  OCTAVE_INSTALL_CONCAT_FN2 (int32, int64);
211 
212  OCTAVE_INSTALL_CONCAT_FN2 (int32, uint8);
213  OCTAVE_INSTALL_CONCAT_FN2 (int32, uint16);
214  OCTAVE_INSTALL_CONCAT_FN2 (int32, uint32);
215  OCTAVE_INSTALL_CONCAT_FN2 (int32, uint64);
216 
217  OCTAVE_INSTALL_CONCAT_FN2 (int64, int8);
218  OCTAVE_INSTALL_CONCAT_FN2 (int64, int16);
219  OCTAVE_INSTALL_CONCAT_FN2 (int64, int32);
220 
221  OCTAVE_INSTALL_CONCAT_FN2 (int64, uint8);
222  OCTAVE_INSTALL_CONCAT_FN2 (int64, uint16);
223  OCTAVE_INSTALL_CONCAT_FN2 (int64, uint32);
224  OCTAVE_INSTALL_CONCAT_FN2 (int64, uint64);
225 
226  OCTAVE_INSTALL_CONCAT_FN2 (uint8, int8);
227  OCTAVE_INSTALL_CONCAT_FN2 (uint8, int16);
228  OCTAVE_INSTALL_CONCAT_FN2 (uint8, int32);
229  OCTAVE_INSTALL_CONCAT_FN2 (uint8, int64);
230 
231  OCTAVE_INSTALL_CONCAT_FN2 (uint8, uint16);
232  OCTAVE_INSTALL_CONCAT_FN2 (uint8, uint32);
233  OCTAVE_INSTALL_CONCAT_FN2 (uint8, uint64);
234 
235  OCTAVE_INSTALL_CONCAT_FN2 (uint16, int8);
236  OCTAVE_INSTALL_CONCAT_FN2 (uint16, int16);
237  OCTAVE_INSTALL_CONCAT_FN2 (uint16, int32);
238  OCTAVE_INSTALL_CONCAT_FN2 (uint16, int64);
239 
240  OCTAVE_INSTALL_CONCAT_FN2 (uint16, uint8);
241  OCTAVE_INSTALL_CONCAT_FN2 (uint16, uint32);
242  OCTAVE_INSTALL_CONCAT_FN2 (uint16, uint64);
243 
244  OCTAVE_INSTALL_CONCAT_FN2 (uint32, int8);
245  OCTAVE_INSTALL_CONCAT_FN2 (uint32, int16);
246  OCTAVE_INSTALL_CONCAT_FN2 (uint32, int32);
247  OCTAVE_INSTALL_CONCAT_FN2 (uint32, int64);
248 
249  OCTAVE_INSTALL_CONCAT_FN2 (uint32, uint8);
250  OCTAVE_INSTALL_CONCAT_FN2 (uint32, uint16);
251  OCTAVE_INSTALL_CONCAT_FN2 (uint32, uint64);
252 
253  OCTAVE_INSTALL_CONCAT_FN2 (uint64, int8);
254  OCTAVE_INSTALL_CONCAT_FN2 (uint64, int16);
255  OCTAVE_INSTALL_CONCAT_FN2 (uint64, int32);
256  OCTAVE_INSTALL_CONCAT_FN2 (uint64, int64);
257 
258  OCTAVE_INSTALL_CONCAT_FN2 (uint64, uint8);
259  OCTAVE_INSTALL_CONCAT_FN2 (uint64, uint16);
260  OCTAVE_INSTALL_CONCAT_FN2 (uint64, uint32);
261 
266 
271 
276 
281 
286 
291 
296 
301 
306 
311 
316 
321 }
#define OCTAVE_DOUBLE_INT_CONCAT_FN(TYPE)
Definition: op-int.h:92
#define OCTAVE_INSTALL_INT_DOUBLE_CONCAT_FN(TYPE)
Definition: op-int.h:110
#define OCTAVE_INT_CHAR_CONCAT_FN(TYPE)
Definition: op-int.h:153
#define OCTAVE_INSTALL_DOUBLE_INT_CONCAT_FN(TYPE)
Definition: op-int.h:98
#define OCTAVE_INT_DOUBLE_CONCAT_FN(TYPE)
Definition: op-int.h:104
#define OCTAVE_CHAR_INT_CONCAT_FN(TYPE)
Definition: op-int.h:143
#define OCTAVE_CONCAT_FN2(T1, T2)
Definition: op-int.h:80
#define OCTAVE_INT_FLOAT_CONCAT_FN(TYPE)
Definition: op-int.h:128
#define OCTAVE_INSTALL_INT_CHAR_CONCAT_FN(TYPE)
Definition: op-int.h:157
#define OCTAVE_INSTALL_CONCAT_FN2(T1, T2)
Definition: op-int.h:86
#define OCTAVE_FLOAT_INT_CONCAT_FN(TYPE)
Definition: op-int.h:116
#define OCTAVE_INSTALL_FLOAT_INT_CONCAT_FN(TYPE)
Definition: op-int.h:122
#define OCTAVE_INSTALL_INT_FLOAT_CONCAT_FN(TYPE)
Definition: op-int.h:134
#define OCTAVE_INSTALL_CHAR_INT_CONCAT_FN(TYPE)
Definition: op-int.h:147