op-int-concat.cc

Go to the documentation of this file.
00001 /*
00002 
00003 Copyright (C) 2004-2012 John W. Eaton
00004 
00005 This file is part of Octave.
00006 
00007 Octave is free software; you can redistribute it and/or modify it
00008 under the terms of the GNU General Public License as published by the
00009 Free Software Foundation; either version 3 of the License, or (at your
00010 option) any later version.
00011 
00012 Octave is distributed in the hope that it will be useful, but WITHOUT
00013 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00014 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00015 for more details.
00016 
00017 You should have received a copy of the GNU General Public License
00018 along with Octave; see the file COPYING.  If not, see
00019 <http://www.gnu.org/licenses/>.
00020 
00021 */
00022 
00023 #ifdef HAVE_CONFIG_H
00024 #include <config.h>
00025 #endif
00026 
00027 #include "gripes.h"
00028 #include "oct-obj.h"
00029 #include "ov.h"
00030 #include "ov-int8.h"
00031 #include "ov-int16.h"
00032 #include "ov-int32.h"
00033 #include "ov-int64.h"
00034 #include "ov-uint8.h"
00035 #include "ov-uint16.h"
00036 #include "ov-uint32.h"
00037 #include "ov-uint64.h"
00038 #include "ov-range.h"
00039 #include "ov-bool.h"
00040 #include "ov-bool-mat.h"
00041 #include "ov-scalar.h"
00042 #include "ov-float.h"
00043 #include "ov-re-mat.h"
00044 #include "ov-flt-re-mat.h"
00045 #include "ov-str-mat.h"
00046 #include "ov-typeinfo.h"
00047 #include "op-int.h"
00048 #include "ops.h"
00049 
00050 // Concatentation of mixed integer types:
00051 
00052 OCTAVE_CONCAT_FN2 (int8, int16)
00053 OCTAVE_CONCAT_FN2 (int8, int32)
00054 OCTAVE_CONCAT_FN2 (int8, int64)
00055 
00056 OCTAVE_CONCAT_FN2 (int8, uint8)
00057 OCTAVE_CONCAT_FN2 (int8, uint16)
00058 OCTAVE_CONCAT_FN2 (int8, uint32)
00059 OCTAVE_CONCAT_FN2 (int8, uint64)
00060 
00061 OCTAVE_CONCAT_FN2 (int16, int8)
00062 OCTAVE_CONCAT_FN2 (int16, int32)
00063 OCTAVE_CONCAT_FN2 (int16, int64)
00064 
00065 OCTAVE_CONCAT_FN2 (int16, uint8)
00066 OCTAVE_CONCAT_FN2 (int16, uint16)
00067 OCTAVE_CONCAT_FN2 (int16, uint32)
00068 OCTAVE_CONCAT_FN2 (int16, uint64)
00069 
00070 OCTAVE_CONCAT_FN2 (int32, int8)
00071 OCTAVE_CONCAT_FN2 (int32, int16)
00072 OCTAVE_CONCAT_FN2 (int32, int64)
00073 
00074 OCTAVE_CONCAT_FN2 (int32, uint8)
00075 OCTAVE_CONCAT_FN2 (int32, uint16)
00076 OCTAVE_CONCAT_FN2 (int32, uint32)
00077 OCTAVE_CONCAT_FN2 (int32, uint64)
00078 
00079 OCTAVE_CONCAT_FN2 (int64, int8)
00080 OCTAVE_CONCAT_FN2 (int64, int16)
00081 OCTAVE_CONCAT_FN2 (int64, int32)
00082 
00083 OCTAVE_CONCAT_FN2 (int64, uint8)
00084 OCTAVE_CONCAT_FN2 (int64, uint16)
00085 OCTAVE_CONCAT_FN2 (int64, uint32)
00086 OCTAVE_CONCAT_FN2 (int64, uint64)
00087 
00088 OCTAVE_CONCAT_FN2 (uint8, int8)
00089 OCTAVE_CONCAT_FN2 (uint8, int16)
00090 OCTAVE_CONCAT_FN2 (uint8, int32)
00091 OCTAVE_CONCAT_FN2 (uint8, int64)
00092 
00093 OCTAVE_CONCAT_FN2 (uint8, uint16)
00094 OCTAVE_CONCAT_FN2 (uint8, uint32)
00095 OCTAVE_CONCAT_FN2 (uint8, uint64)
00096 
00097 OCTAVE_CONCAT_FN2 (uint16, int8)
00098 OCTAVE_CONCAT_FN2 (uint16, int16)
00099 OCTAVE_CONCAT_FN2 (uint16, int32)
00100 OCTAVE_CONCAT_FN2 (uint16, int64)
00101 
00102 OCTAVE_CONCAT_FN2 (uint16, uint8)
00103 OCTAVE_CONCAT_FN2 (uint16, uint32)
00104 OCTAVE_CONCAT_FN2 (uint16, uint64)
00105 
00106 OCTAVE_CONCAT_FN2 (uint32, int8)
00107 OCTAVE_CONCAT_FN2 (uint32, int16)
00108 OCTAVE_CONCAT_FN2 (uint32, int32)
00109 OCTAVE_CONCAT_FN2 (uint32, int64)
00110 
00111 OCTAVE_CONCAT_FN2 (uint32, uint8)
00112 OCTAVE_CONCAT_FN2 (uint32, uint16)
00113 OCTAVE_CONCAT_FN2 (uint32, uint64)
00114 
00115 OCTAVE_CONCAT_FN2 (uint64, int8)
00116 OCTAVE_CONCAT_FN2 (uint64, int16)
00117 OCTAVE_CONCAT_FN2 (uint64, int32)
00118 OCTAVE_CONCAT_FN2 (uint64, int64)
00119 
00120 OCTAVE_CONCAT_FN2 (uint64, uint8)
00121 OCTAVE_CONCAT_FN2 (uint64, uint16)
00122 OCTAVE_CONCAT_FN2 (uint64, uint32)
00123 
00124 OCTAVE_INT_DOUBLE_CONCAT_FN (int8)
00125 OCTAVE_INT_DOUBLE_CONCAT_FN (int16)
00126 OCTAVE_INT_DOUBLE_CONCAT_FN (int32)
00127 OCTAVE_INT_DOUBLE_CONCAT_FN (int64)
00128 
00129 OCTAVE_INT_DOUBLE_CONCAT_FN (uint8)
00130 OCTAVE_INT_DOUBLE_CONCAT_FN (uint16)
00131 OCTAVE_INT_DOUBLE_CONCAT_FN (uint32)
00132 OCTAVE_INT_DOUBLE_CONCAT_FN (uint64)
00133 
00134 OCTAVE_DOUBLE_INT_CONCAT_FN (int8)
00135 OCTAVE_DOUBLE_INT_CONCAT_FN (int16)
00136 OCTAVE_DOUBLE_INT_CONCAT_FN (int32)
00137 OCTAVE_DOUBLE_INT_CONCAT_FN (int64)
00138 
00139 OCTAVE_DOUBLE_INT_CONCAT_FN (uint8)
00140 OCTAVE_DOUBLE_INT_CONCAT_FN (uint16)
00141 OCTAVE_DOUBLE_INT_CONCAT_FN (uint32)
00142 OCTAVE_DOUBLE_INT_CONCAT_FN (uint64)
00143 
00144 OCTAVE_INT_FLOAT_CONCAT_FN (int8)
00145 OCTAVE_INT_FLOAT_CONCAT_FN (int16)
00146 OCTAVE_INT_FLOAT_CONCAT_FN (int32)
00147 OCTAVE_INT_FLOAT_CONCAT_FN (int64)
00148 
00149 OCTAVE_INT_FLOAT_CONCAT_FN (uint8)
00150 OCTAVE_INT_FLOAT_CONCAT_FN (uint16)
00151 OCTAVE_INT_FLOAT_CONCAT_FN (uint32)
00152 OCTAVE_INT_FLOAT_CONCAT_FN (uint64)
00153 
00154 OCTAVE_FLOAT_INT_CONCAT_FN (int8)
00155 OCTAVE_FLOAT_INT_CONCAT_FN (int16)
00156 OCTAVE_FLOAT_INT_CONCAT_FN (int32)
00157 OCTAVE_FLOAT_INT_CONCAT_FN (int64)
00158 
00159 OCTAVE_FLOAT_INT_CONCAT_FN (uint8)
00160 OCTAVE_FLOAT_INT_CONCAT_FN (uint16)
00161 OCTAVE_FLOAT_INT_CONCAT_FN (uint32)
00162 OCTAVE_FLOAT_INT_CONCAT_FN (uint64)
00163 
00164 OCTAVE_INT_CHAR_CONCAT_FN (int8)
00165 OCTAVE_INT_CHAR_CONCAT_FN (int16)
00166 OCTAVE_INT_CHAR_CONCAT_FN (int32)
00167 OCTAVE_INT_CHAR_CONCAT_FN (int64)
00168 
00169 OCTAVE_INT_CHAR_CONCAT_FN (uint8)
00170 OCTAVE_INT_CHAR_CONCAT_FN (uint16)
00171 OCTAVE_INT_CHAR_CONCAT_FN (uint32)
00172 OCTAVE_INT_CHAR_CONCAT_FN (uint64)
00173 
00174 OCTAVE_CHAR_INT_CONCAT_FN (int8)
00175 OCTAVE_CHAR_INT_CONCAT_FN (int16)
00176 OCTAVE_CHAR_INT_CONCAT_FN (int32)
00177 OCTAVE_CHAR_INT_CONCAT_FN (int64)
00178 
00179 OCTAVE_CHAR_INT_CONCAT_FN (uint8)
00180 OCTAVE_CHAR_INT_CONCAT_FN (uint16)
00181 OCTAVE_CHAR_INT_CONCAT_FN (uint32)
00182 OCTAVE_CHAR_INT_CONCAT_FN (uint64)
00183 
00184 void
00185 install_int_concat_ops (void)
00186 {
00187   OCTAVE_INSTALL_CONCAT_FN2 (int8, int16);
00188   OCTAVE_INSTALL_CONCAT_FN2 (int8, int32);
00189   OCTAVE_INSTALL_CONCAT_FN2 (int8, int64);
00190 
00191   OCTAVE_INSTALL_CONCAT_FN2 (int8, uint8);
00192   OCTAVE_INSTALL_CONCAT_FN2 (int8, uint16);
00193   OCTAVE_INSTALL_CONCAT_FN2 (int8, uint32);
00194   OCTAVE_INSTALL_CONCAT_FN2 (int8, uint64);
00195 
00196   OCTAVE_INSTALL_CONCAT_FN2 (int16, int8);
00197   OCTAVE_INSTALL_CONCAT_FN2 (int16, int32);
00198   OCTAVE_INSTALL_CONCAT_FN2 (int16, int64);
00199 
00200   OCTAVE_INSTALL_CONCAT_FN2 (int16, uint8);
00201   OCTAVE_INSTALL_CONCAT_FN2 (int16, uint16);
00202   OCTAVE_INSTALL_CONCAT_FN2 (int16, uint32);
00203   OCTAVE_INSTALL_CONCAT_FN2 (int16, uint64);
00204 
00205   OCTAVE_INSTALL_CONCAT_FN2 (int32, int8);
00206   OCTAVE_INSTALL_CONCAT_FN2 (int32, int16);
00207   OCTAVE_INSTALL_CONCAT_FN2 (int32, int64);
00208 
00209   OCTAVE_INSTALL_CONCAT_FN2 (int32, uint8);
00210   OCTAVE_INSTALL_CONCAT_FN2 (int32, uint16);
00211   OCTAVE_INSTALL_CONCAT_FN2 (int32, uint32);
00212   OCTAVE_INSTALL_CONCAT_FN2 (int32, uint64);
00213 
00214   OCTAVE_INSTALL_CONCAT_FN2 (int64, int8);
00215   OCTAVE_INSTALL_CONCAT_FN2 (int64, int16);
00216   OCTAVE_INSTALL_CONCAT_FN2 (int64, int32);
00217 
00218   OCTAVE_INSTALL_CONCAT_FN2 (int64, uint8);
00219   OCTAVE_INSTALL_CONCAT_FN2 (int64, uint16);
00220   OCTAVE_INSTALL_CONCAT_FN2 (int64, uint32);
00221   OCTAVE_INSTALL_CONCAT_FN2 (int64, uint64);
00222 
00223   OCTAVE_INSTALL_CONCAT_FN2 (uint8, int8);
00224   OCTAVE_INSTALL_CONCAT_FN2 (uint8, int16);
00225   OCTAVE_INSTALL_CONCAT_FN2 (uint8, int32);
00226   OCTAVE_INSTALL_CONCAT_FN2 (uint8, int64);
00227 
00228   OCTAVE_INSTALL_CONCAT_FN2 (uint8, uint16);
00229   OCTAVE_INSTALL_CONCAT_FN2 (uint8, uint32);
00230   OCTAVE_INSTALL_CONCAT_FN2 (uint8, uint64);
00231 
00232   OCTAVE_INSTALL_CONCAT_FN2 (uint16, int8);
00233   OCTAVE_INSTALL_CONCAT_FN2 (uint16, int16);
00234   OCTAVE_INSTALL_CONCAT_FN2 (uint16, int32);
00235   OCTAVE_INSTALL_CONCAT_FN2 (uint16, int64);
00236 
00237   OCTAVE_INSTALL_CONCAT_FN2 (uint16, uint8);
00238   OCTAVE_INSTALL_CONCAT_FN2 (uint16, uint32);
00239   OCTAVE_INSTALL_CONCAT_FN2 (uint16, uint64);
00240 
00241   OCTAVE_INSTALL_CONCAT_FN2 (uint32, int8);
00242   OCTAVE_INSTALL_CONCAT_FN2 (uint32, int16);
00243   OCTAVE_INSTALL_CONCAT_FN2 (uint32, int32);
00244   OCTAVE_INSTALL_CONCAT_FN2 (uint32, int64);
00245 
00246   OCTAVE_INSTALL_CONCAT_FN2 (uint32, uint8);
00247   OCTAVE_INSTALL_CONCAT_FN2 (uint32, uint16);
00248   OCTAVE_INSTALL_CONCAT_FN2 (uint32, uint64);
00249 
00250   OCTAVE_INSTALL_CONCAT_FN2 (uint64, int8);
00251   OCTAVE_INSTALL_CONCAT_FN2 (uint64, int16);
00252   OCTAVE_INSTALL_CONCAT_FN2 (uint64, int32);
00253   OCTAVE_INSTALL_CONCAT_FN2 (uint64, int64);
00254 
00255   OCTAVE_INSTALL_CONCAT_FN2 (uint64, uint8);
00256   OCTAVE_INSTALL_CONCAT_FN2 (uint64, uint16);
00257   OCTAVE_INSTALL_CONCAT_FN2 (uint64, uint32);
00258 
00259   OCTAVE_INSTALL_INT_DOUBLE_CONCAT_FN (int8);
00260   OCTAVE_INSTALL_INT_DOUBLE_CONCAT_FN (int16);
00261   OCTAVE_INSTALL_INT_DOUBLE_CONCAT_FN (int32);
00262   OCTAVE_INSTALL_INT_DOUBLE_CONCAT_FN (int64);
00263 
00264   OCTAVE_INSTALL_INT_DOUBLE_CONCAT_FN (uint8);
00265   OCTAVE_INSTALL_INT_DOUBLE_CONCAT_FN (uint16);
00266   OCTAVE_INSTALL_INT_DOUBLE_CONCAT_FN (uint32);
00267   OCTAVE_INSTALL_INT_DOUBLE_CONCAT_FN (uint64);
00268 
00269   OCTAVE_INSTALL_DOUBLE_INT_CONCAT_FN (int8);
00270   OCTAVE_INSTALL_DOUBLE_INT_CONCAT_FN (int16);
00271   OCTAVE_INSTALL_DOUBLE_INT_CONCAT_FN (int32);
00272   OCTAVE_INSTALL_DOUBLE_INT_CONCAT_FN (int64);
00273 
00274   OCTAVE_INSTALL_DOUBLE_INT_CONCAT_FN (uint8);
00275   OCTAVE_INSTALL_DOUBLE_INT_CONCAT_FN (uint16);
00276   OCTAVE_INSTALL_DOUBLE_INT_CONCAT_FN (uint32);
00277   OCTAVE_INSTALL_DOUBLE_INT_CONCAT_FN (uint64);
00278 
00279   OCTAVE_INSTALL_INT_FLOAT_CONCAT_FN (int8);
00280   OCTAVE_INSTALL_INT_FLOAT_CONCAT_FN (int16);
00281   OCTAVE_INSTALL_INT_FLOAT_CONCAT_FN (int32);
00282   OCTAVE_INSTALL_INT_FLOAT_CONCAT_FN (int64);
00283 
00284   OCTAVE_INSTALL_INT_FLOAT_CONCAT_FN (uint8);
00285   OCTAVE_INSTALL_INT_FLOAT_CONCAT_FN (uint16);
00286   OCTAVE_INSTALL_INT_FLOAT_CONCAT_FN (uint32);
00287   OCTAVE_INSTALL_INT_FLOAT_CONCAT_FN (uint64);
00288 
00289   OCTAVE_INSTALL_FLOAT_INT_CONCAT_FN (int8);
00290   OCTAVE_INSTALL_FLOAT_INT_CONCAT_FN (int16);
00291   OCTAVE_INSTALL_FLOAT_INT_CONCAT_FN (int32);
00292   OCTAVE_INSTALL_FLOAT_INT_CONCAT_FN (int64);
00293 
00294   OCTAVE_INSTALL_FLOAT_INT_CONCAT_FN (uint8);
00295   OCTAVE_INSTALL_FLOAT_INT_CONCAT_FN (uint16);
00296   OCTAVE_INSTALL_FLOAT_INT_CONCAT_FN (uint32);
00297   OCTAVE_INSTALL_FLOAT_INT_CONCAT_FN (uint64);
00298 
00299   OCTAVE_INSTALL_INT_CHAR_CONCAT_FN (int8);
00300   OCTAVE_INSTALL_INT_CHAR_CONCAT_FN (int16);
00301   OCTAVE_INSTALL_INT_CHAR_CONCAT_FN (int32);
00302   OCTAVE_INSTALL_INT_CHAR_CONCAT_FN (int64);
00303 
00304   OCTAVE_INSTALL_INT_CHAR_CONCAT_FN (uint8);
00305   OCTAVE_INSTALL_INT_CHAR_CONCAT_FN (uint16);
00306   OCTAVE_INSTALL_INT_CHAR_CONCAT_FN (uint32);
00307   OCTAVE_INSTALL_INT_CHAR_CONCAT_FN (uint64);
00308 
00309   OCTAVE_INSTALL_CHAR_INT_CONCAT_FN (int8);
00310   OCTAVE_INSTALL_CHAR_INT_CONCAT_FN (int16);
00311   OCTAVE_INSTALL_CHAR_INT_CONCAT_FN (int32);
00312   OCTAVE_INSTALL_CHAR_INT_CONCAT_FN (int64);
00313 
00314   OCTAVE_INSTALL_CHAR_INT_CONCAT_FN (uint8);
00315   OCTAVE_INSTALL_CHAR_INT_CONCAT_FN (uint16);
00316   OCTAVE_INSTALL_CHAR_INT_CONCAT_FN (uint32);
00317   OCTAVE_INSTALL_CHAR_INT_CONCAT_FN (uint64);
00318 }
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines