~ubuntu-branches/debian/sid/octave3.0/sid

« back to all changes in this revision

Viewing changes to src/OPERATORS/op-int-concat.cc

  • Committer: Bazaar Package Importer
  • Author(s): Rafael Laboissiere
  • Date: 2007-12-23 16:04:15 UTC
  • Revision ID: james.westby@ubuntu.com-20071223160415-n4gk468dihy22e9v
Tags: upstream-3.0.0
ImportĀ upstreamĀ versionĀ 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 
 
3
Copyright (C) 2004, 2005, 2007 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 3 of the License, or (at your
 
10
option) any 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, see
 
19
<http://www.gnu.org/licenses/>.
 
20
 
 
21
*/
 
22
 
 
23
#ifdef HAVE_CONFIG_H
 
24
#include <config.h>
 
25
#endif
 
26
 
 
27
#include "gripes.h"
 
28
#include "oct-obj.h"
 
29
#include "ov.h"
 
30
#include "ov-int8.h"
 
31
#include "ov-int16.h"
 
32
#include "ov-int32.h"
 
33
#include "ov-int64.h"
 
34
#include "ov-uint8.h"
 
35
#include "ov-uint16.h"
 
36
#include "ov-uint32.h"
 
37
#include "ov-uint64.h"
 
38
#include "ov-range.h"
 
39
#include "ov-bool.h"
 
40
#include "ov-bool-mat.h"
 
41
#include "ov-scalar.h"
 
42
#include "ov-re-mat.h"
 
43
#include "ov-str-mat.h"
 
44
#include "ov-typeinfo.h"
 
45
#include "op-int.h"
 
46
#include "ops.h"
 
47
 
 
48
// Concatentation of mixed integer types:
 
49
 
 
50
OCTAVE_CONCAT_FN2 (int8, int16)
 
51
OCTAVE_CONCAT_FN2 (int8, int32)
 
52
OCTAVE_CONCAT_FN2 (int8, int64)
 
53
 
 
54
OCTAVE_CONCAT_FN2 (int8, uint8)
 
55
OCTAVE_CONCAT_FN2 (int8, uint16)
 
56
OCTAVE_CONCAT_FN2 (int8, uint32)
 
57
OCTAVE_CONCAT_FN2 (int8, uint64)
 
58
 
 
59
OCTAVE_CONCAT_FN2 (int16, int8)
 
60
OCTAVE_CONCAT_FN2 (int16, int32)
 
61
OCTAVE_CONCAT_FN2 (int16, int64)
 
62
 
 
63
OCTAVE_CONCAT_FN2 (int16, uint8)
 
64
OCTAVE_CONCAT_FN2 (int16, uint16)
 
65
OCTAVE_CONCAT_FN2 (int16, uint32)
 
66
OCTAVE_CONCAT_FN2 (int16, uint64)
 
67
 
 
68
OCTAVE_CONCAT_FN2 (int32, int8)
 
69
OCTAVE_CONCAT_FN2 (int32, int16)
 
70
OCTAVE_CONCAT_FN2 (int32, int64)
 
71
 
 
72
OCTAVE_CONCAT_FN2 (int32, uint8)
 
73
OCTAVE_CONCAT_FN2 (int32, uint16)
 
74
OCTAVE_CONCAT_FN2 (int32, uint32)
 
75
OCTAVE_CONCAT_FN2 (int32, uint64)
 
76
 
 
77
OCTAVE_CONCAT_FN2 (int64, int8)
 
78
OCTAVE_CONCAT_FN2 (int64, int16)
 
79
OCTAVE_CONCAT_FN2 (int64, int32)
 
80
 
 
81
OCTAVE_CONCAT_FN2 (int64, uint8)
 
82
OCTAVE_CONCAT_FN2 (int64, uint16)
 
83
OCTAVE_CONCAT_FN2 (int64, uint32)
 
84
OCTAVE_CONCAT_FN2 (int64, uint64)
 
85
 
 
86
OCTAVE_CONCAT_FN2 (uint8, int8)
 
87
OCTAVE_CONCAT_FN2 (uint8, int16)
 
88
OCTAVE_CONCAT_FN2 (uint8, int32)
 
89
OCTAVE_CONCAT_FN2 (uint8, int64)
 
90
 
 
91
OCTAVE_CONCAT_FN2 (uint8, uint16)
 
92
OCTAVE_CONCAT_FN2 (uint8, uint32)
 
93
OCTAVE_CONCAT_FN2 (uint8, uint64)
 
94
 
 
95
OCTAVE_CONCAT_FN2 (uint16, int8)
 
96
OCTAVE_CONCAT_FN2 (uint16, int16)
 
97
OCTAVE_CONCAT_FN2 (uint16, int32)
 
98
OCTAVE_CONCAT_FN2 (uint16, int64)
 
99
 
 
100
OCTAVE_CONCAT_FN2 (uint16, uint8)
 
101
OCTAVE_CONCAT_FN2 (uint16, uint32)
 
102
OCTAVE_CONCAT_FN2 (uint16, uint64)
 
103
 
 
104
OCTAVE_CONCAT_FN2 (uint32, int8)
 
105
OCTAVE_CONCAT_FN2 (uint32, int16)
 
106
OCTAVE_CONCAT_FN2 (uint32, int32)
 
107
OCTAVE_CONCAT_FN2 (uint32, int64)
 
108
 
 
109
OCTAVE_CONCAT_FN2 (uint32, uint8)
 
110
OCTAVE_CONCAT_FN2 (uint32, uint16)
 
111
OCTAVE_CONCAT_FN2 (uint32, uint64)
 
112
 
 
113
OCTAVE_CONCAT_FN2 (uint64, int8)
 
114
OCTAVE_CONCAT_FN2 (uint64, int16)
 
115
OCTAVE_CONCAT_FN2 (uint64, int32)
 
116
OCTAVE_CONCAT_FN2 (uint64, int64)
 
117
 
 
118
OCTAVE_CONCAT_FN2 (uint64, uint8)
 
119
OCTAVE_CONCAT_FN2 (uint64, uint16)
 
120
OCTAVE_CONCAT_FN2 (uint64, uint32)
 
121
 
 
122
OCTAVE_INT_DOUBLE_CONCAT_FN (int8)
 
123
OCTAVE_INT_DOUBLE_CONCAT_FN (int16)
 
124
OCTAVE_INT_DOUBLE_CONCAT_FN (int32)
 
125
OCTAVE_INT_DOUBLE_CONCAT_FN (int64)
 
126
 
 
127
OCTAVE_INT_DOUBLE_CONCAT_FN (uint8)
 
128
OCTAVE_INT_DOUBLE_CONCAT_FN (uint16)
 
129
OCTAVE_INT_DOUBLE_CONCAT_FN (uint32)
 
130
OCTAVE_INT_DOUBLE_CONCAT_FN (uint64)
 
131
 
 
132
OCTAVE_DOUBLE_INT_CONCAT_FN (int8)
 
133
OCTAVE_DOUBLE_INT_CONCAT_FN (int16)
 
134
OCTAVE_DOUBLE_INT_CONCAT_FN (int32)
 
135
OCTAVE_DOUBLE_INT_CONCAT_FN (int64)
 
136
                   
 
137
OCTAVE_DOUBLE_INT_CONCAT_FN (uint8)
 
138
OCTAVE_DOUBLE_INT_CONCAT_FN (uint16)
 
139
OCTAVE_DOUBLE_INT_CONCAT_FN (uint32)
 
140
OCTAVE_DOUBLE_INT_CONCAT_FN (uint64)
 
141
 
 
142
OCTAVE_INT_CHAR_CONCAT_FN (int8)
 
143
OCTAVE_INT_CHAR_CONCAT_FN (int16)
 
144
OCTAVE_INT_CHAR_CONCAT_FN (int32)
 
145
OCTAVE_INT_CHAR_CONCAT_FN (int64)
 
146
 
 
147
OCTAVE_INT_CHAR_CONCAT_FN (uint8)
 
148
OCTAVE_INT_CHAR_CONCAT_FN (uint16)
 
149
OCTAVE_INT_CHAR_CONCAT_FN (uint32)
 
150
OCTAVE_INT_CHAR_CONCAT_FN (uint64)
 
151
 
 
152
OCTAVE_CHAR_INT_CONCAT_FN (int8)
 
153
OCTAVE_CHAR_INT_CONCAT_FN (int16)
 
154
OCTAVE_CHAR_INT_CONCAT_FN (int32)
 
155
OCTAVE_CHAR_INT_CONCAT_FN (int64)
 
156
                   
 
157
OCTAVE_CHAR_INT_CONCAT_FN (uint8)
 
158
OCTAVE_CHAR_INT_CONCAT_FN (uint16)
 
159
OCTAVE_CHAR_INT_CONCAT_FN (uint32)
 
160
OCTAVE_CHAR_INT_CONCAT_FN (uint64)
 
161
 
 
162
void
 
163
install_int_concat_ops (void)
 
164
{
 
165
  OCTAVE_INSTALL_CONCAT_FN2 (int8, int16);
 
166
  OCTAVE_INSTALL_CONCAT_FN2 (int8, int32);
 
167
  OCTAVE_INSTALL_CONCAT_FN2 (int8, int64);
 
168
 
 
169
  OCTAVE_INSTALL_CONCAT_FN2 (int8, uint8);
 
170
  OCTAVE_INSTALL_CONCAT_FN2 (int8, uint16);
 
171
  OCTAVE_INSTALL_CONCAT_FN2 (int8, uint32);
 
172
  OCTAVE_INSTALL_CONCAT_FN2 (int8, uint64);
 
173
 
 
174
  OCTAVE_INSTALL_CONCAT_FN2 (int16, int8);
 
175
  OCTAVE_INSTALL_CONCAT_FN2 (int16, int32);
 
176
  OCTAVE_INSTALL_CONCAT_FN2 (int16, int64);
 
177
 
 
178
  OCTAVE_INSTALL_CONCAT_FN2 (int16, uint8);
 
179
  OCTAVE_INSTALL_CONCAT_FN2 (int16, uint16);
 
180
  OCTAVE_INSTALL_CONCAT_FN2 (int16, uint32);
 
181
  OCTAVE_INSTALL_CONCAT_FN2 (int16, uint64);
 
182
 
 
183
  OCTAVE_INSTALL_CONCAT_FN2 (int32, int8);
 
184
  OCTAVE_INSTALL_CONCAT_FN2 (int32, int16);
 
185
  OCTAVE_INSTALL_CONCAT_FN2 (int32, int64);
 
186
 
 
187
  OCTAVE_INSTALL_CONCAT_FN2 (int32, uint8);
 
188
  OCTAVE_INSTALL_CONCAT_FN2 (int32, uint16);
 
189
  OCTAVE_INSTALL_CONCAT_FN2 (int32, uint32);
 
190
  OCTAVE_INSTALL_CONCAT_FN2 (int32, uint64);
 
191
 
 
192
  OCTAVE_INSTALL_CONCAT_FN2 (int64, int8);
 
193
  OCTAVE_INSTALL_CONCAT_FN2 (int64, int16);
 
194
  OCTAVE_INSTALL_CONCAT_FN2 (int64, int32);
 
195
 
 
196
  OCTAVE_INSTALL_CONCAT_FN2 (int64, uint8);
 
197
  OCTAVE_INSTALL_CONCAT_FN2 (int64, uint16);
 
198
  OCTAVE_INSTALL_CONCAT_FN2 (int64, uint32);
 
199
  OCTAVE_INSTALL_CONCAT_FN2 (int64, uint64);
 
200
 
 
201
  OCTAVE_INSTALL_CONCAT_FN2 (uint8, int8);
 
202
  OCTAVE_INSTALL_CONCAT_FN2 (uint8, int16);
 
203
  OCTAVE_INSTALL_CONCAT_FN2 (uint8, int32);
 
204
  OCTAVE_INSTALL_CONCAT_FN2 (uint8, int64);
 
205
 
 
206
  OCTAVE_INSTALL_CONCAT_FN2 (uint8, uint16);
 
207
  OCTAVE_INSTALL_CONCAT_FN2 (uint8, uint32);
 
208
  OCTAVE_INSTALL_CONCAT_FN2 (uint8, uint64);
 
209
 
 
210
  OCTAVE_INSTALL_CONCAT_FN2 (uint16, int8);
 
211
  OCTAVE_INSTALL_CONCAT_FN2 (uint16, int16);
 
212
  OCTAVE_INSTALL_CONCAT_FN2 (uint16, int32);
 
213
  OCTAVE_INSTALL_CONCAT_FN2 (uint16, int64);
 
214
 
 
215
  OCTAVE_INSTALL_CONCAT_FN2 (uint16, uint8);
 
216
  OCTAVE_INSTALL_CONCAT_FN2 (uint16, uint32);
 
217
  OCTAVE_INSTALL_CONCAT_FN2 (uint16, uint64);
 
218
 
 
219
  OCTAVE_INSTALL_CONCAT_FN2 (uint32, int8);
 
220
  OCTAVE_INSTALL_CONCAT_FN2 (uint32, int16);
 
221
  OCTAVE_INSTALL_CONCAT_FN2 (uint32, int32);
 
222
  OCTAVE_INSTALL_CONCAT_FN2 (uint32, int64);
 
223
 
 
224
  OCTAVE_INSTALL_CONCAT_FN2 (uint32, uint8);
 
225
  OCTAVE_INSTALL_CONCAT_FN2 (uint32, uint16);
 
226
  OCTAVE_INSTALL_CONCAT_FN2 (uint32, uint64);
 
227
 
 
228
  OCTAVE_INSTALL_CONCAT_FN2 (uint64, int8);
 
229
  OCTAVE_INSTALL_CONCAT_FN2 (uint64, int16);
 
230
  OCTAVE_INSTALL_CONCAT_FN2 (uint64, int32);
 
231
  OCTAVE_INSTALL_CONCAT_FN2 (uint64, int64);
 
232
 
 
233
  OCTAVE_INSTALL_CONCAT_FN2 (uint64, uint8);
 
234
  OCTAVE_INSTALL_CONCAT_FN2 (uint64, uint16);
 
235
  OCTAVE_INSTALL_CONCAT_FN2 (uint64, uint32);
 
236
 
 
237
  OCTAVE_INSTALL_INT_DOUBLE_CONCAT_FN (int8);
 
238
  OCTAVE_INSTALL_INT_DOUBLE_CONCAT_FN (int16);
 
239
  OCTAVE_INSTALL_INT_DOUBLE_CONCAT_FN (int32);
 
240
  OCTAVE_INSTALL_INT_DOUBLE_CONCAT_FN (int64);
 
241
 
 
242
  OCTAVE_INSTALL_INT_DOUBLE_CONCAT_FN (uint8);
 
243
  OCTAVE_INSTALL_INT_DOUBLE_CONCAT_FN (uint16);
 
244
  OCTAVE_INSTALL_INT_DOUBLE_CONCAT_FN (uint32);
 
245
  OCTAVE_INSTALL_INT_DOUBLE_CONCAT_FN (uint64);
 
246
 
 
247
  OCTAVE_INSTALL_DOUBLE_INT_CONCAT_FN (int8);
 
248
  OCTAVE_INSTALL_DOUBLE_INT_CONCAT_FN (int16);
 
249
  OCTAVE_INSTALL_DOUBLE_INT_CONCAT_FN (int32);
 
250
  OCTAVE_INSTALL_DOUBLE_INT_CONCAT_FN (int64);
 
251
 
 
252
  OCTAVE_INSTALL_DOUBLE_INT_CONCAT_FN (uint8);
 
253
  OCTAVE_INSTALL_DOUBLE_INT_CONCAT_FN (uint16);
 
254
  OCTAVE_INSTALL_DOUBLE_INT_CONCAT_FN (uint32);
 
255
  OCTAVE_INSTALL_DOUBLE_INT_CONCAT_FN (uint64);
 
256
 
 
257
  OCTAVE_INSTALL_INT_CHAR_CONCAT_FN (int8);
 
258
  OCTAVE_INSTALL_INT_CHAR_CONCAT_FN (int16);
 
259
  OCTAVE_INSTALL_INT_CHAR_CONCAT_FN (int32);
 
260
  OCTAVE_INSTALL_INT_CHAR_CONCAT_FN (int64);
 
261
 
 
262
  OCTAVE_INSTALL_INT_CHAR_CONCAT_FN (uint8);
 
263
  OCTAVE_INSTALL_INT_CHAR_CONCAT_FN (uint16);
 
264
  OCTAVE_INSTALL_INT_CHAR_CONCAT_FN (uint32);
 
265
  OCTAVE_INSTALL_INT_CHAR_CONCAT_FN (uint64);
 
266
 
 
267
  OCTAVE_INSTALL_CHAR_INT_CONCAT_FN (int8);
 
268
  OCTAVE_INSTALL_CHAR_INT_CONCAT_FN (int16);
 
269
  OCTAVE_INSTALL_CHAR_INT_CONCAT_FN (int32);
 
270
  OCTAVE_INSTALL_CHAR_INT_CONCAT_FN (int64);
 
271
 
 
272
  OCTAVE_INSTALL_CHAR_INT_CONCAT_FN (uint8);
 
273
  OCTAVE_INSTALL_CHAR_INT_CONCAT_FN (uint16);
 
274
  OCTAVE_INSTALL_CHAR_INT_CONCAT_FN (uint32);
 
275
  OCTAVE_INSTALL_CHAR_INT_CONCAT_FN (uint64);
 
276
}
 
277
 
 
278
/*
 
279
;;; Local Variables: ***
 
280
;;; mode: C++ ***
 
281
;;; End: ***
 
282
*/