2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2014 - Scilab Enterprises - Antoine ELIAS
5 * This file must be used under the terms of the CeCILL.
6 * This source file is licensed as described in the file COPYING, which
7 * you should have received as part of this distribution. The terms
8 * are also available at
9 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
13 #include "types_dotmultiplication.hxx"
17 #include "polynom.hxx"
22 #include "localization.h"
26 using namespace types;
27 //define arrays on operation functions
28 static dotmul_function pDotMulfunction[types::InternalType::IdLast][types::InternalType::IdLast] = {NULL};
30 void fillDotMulFunction()
32 #define scilab_fill_dotmul(id1, id2, func, typeIn1, typeIn2, typeOut) \
33 pDotMulfunction[types::InternalType::Id ## id1][types::InternalType::Id ## id2] = (dotmul_function)&dotmul_##func<typeIn1, typeIn2, typeOut>
37 scilab_fill_dotmul(Double, Double, M_M, Double, Double, Double);
38 scilab_fill_dotmul(Double, Int8, M_M, Double, Int8, Int8);
39 scilab_fill_dotmul(Double, UInt8, M_M, Double, UInt8, UInt8);
40 scilab_fill_dotmul(Double, Int16, M_M, Double, Int16, Int16);
41 scilab_fill_dotmul(Double, UInt16, M_M, Double, UInt16, UInt16);
42 scilab_fill_dotmul(Double, Int32, M_M, Double, Int32, Int32);
43 scilab_fill_dotmul(Double, UInt32, M_M, Double, UInt32, UInt32);
44 scilab_fill_dotmul(Double, Int64, M_M, Double, Int64, Int64);
45 scilab_fill_dotmul(Double, UInt64, M_M, Double, UInt64, UInt64);
46 scilab_fill_dotmul(Double, Bool, M_M, Double, Bool, Double);
47 scilab_fill_dotmul(Double, Polynom, M_M, Double, Polynom, Polynom);
48 scilab_fill_dotmul(Double, Sparse, M_M, Double, Sparse, Sparse);
50 //Matrix .* Matrix Complex
51 scilab_fill_dotmul(Double, DoubleComplex, M_MC, Double, Double, Double);
52 scilab_fill_dotmul(Double, PolynomComplex, M_M, Double, Polynom, Polynom);
53 scilab_fill_dotmul(Double, SparseComplex, M_M, Double, Sparse, Sparse);
56 scilab_fill_dotmul(Double, ScalarDouble, M_S, Double, Double, Double);
57 scilab_fill_dotmul(Double, ScalarInt8, M_S, Double, Int8, Int8);
58 scilab_fill_dotmul(Double, ScalarUInt8, M_S, Double, UInt8, UInt8);
59 scilab_fill_dotmul(Double, ScalarInt16, M_S, Double, Int16, Int16);
60 scilab_fill_dotmul(Double, ScalarUInt16, M_S, Double, UInt16, UInt16);
61 scilab_fill_dotmul(Double, ScalarInt32, M_S, Double, Int32, Int32);
62 scilab_fill_dotmul(Double, ScalarUInt32, M_S, Double, UInt32, UInt32);
63 scilab_fill_dotmul(Double, ScalarInt64, M_S, Double, Int64, Int64);
64 scilab_fill_dotmul(Double, ScalarUInt64, M_S, Double, UInt64, UInt64);
65 scilab_fill_dotmul(Double, ScalarBool, M_S, Double, Bool, Double);
66 scilab_fill_dotmul(Double, ScalarPolynom, M_M, Double, Polynom, Polynom);
68 //Matrix .* Scalar Complex
69 scilab_fill_dotmul(Double, ScalarDoubleComplex, M_SC, Double, Double, Double);
70 scilab_fill_dotmul(Double, ScalarPolynomComplex, M_M, Double, Polynom, Polynom);
72 scilab_fill_dotmul(Double, Empty, M_E, Double, Double, Double);
75 //Matrix Complex .* Matrix
76 scilab_fill_dotmul(DoubleComplex, Double, MC_M, Double, Double, Double);
77 scilab_fill_dotmul(DoubleComplex, DoubleComplex, MC_MC, Double, Double, Double);
78 scilab_fill_dotmul(DoubleComplex, ScalarDouble, MC_S, Double, Double, Double);
79 scilab_fill_dotmul(DoubleComplex, ScalarDoubleComplex, MC_SC, Double, Double, Double);
80 scilab_fill_dotmul(DoubleComplex, Empty, M_E, Double, Double, Double);
81 scilab_fill_dotmul(DoubleComplex, Polynom, M_M, Double, Polynom, Polynom);
82 scilab_fill_dotmul(DoubleComplex, PolynomComplex, M_M, Double, Polynom, Polynom);
83 scilab_fill_dotmul(DoubleComplex, ScalarPolynom, M_M, Double, Polynom, Polynom);
84 scilab_fill_dotmul(DoubleComplex, ScalarPolynomComplex, M_M, Double, Polynom, Polynom);
85 scilab_fill_dotmul(DoubleComplex, Sparse, M_M, Double, Sparse, Sparse);
86 scilab_fill_dotmul(DoubleComplex, SparseComplex, M_M, Double, Sparse, Sparse);
89 scilab_fill_dotmul(ScalarDouble, Double, S_M, Double, Double, Double);
90 scilab_fill_dotmul(ScalarDouble, Int8, S_M, Double, Int8, Int8);
91 scilab_fill_dotmul(ScalarDouble, UInt8, S_M, Double, UInt8, UInt8);
92 scilab_fill_dotmul(ScalarDouble, Int16, S_M, Double, Int16, Int16);
93 scilab_fill_dotmul(ScalarDouble, UInt16, S_M, Double, UInt16, UInt16);
94 scilab_fill_dotmul(ScalarDouble, Int32, S_M, Double, Int32, Int32);
95 scilab_fill_dotmul(ScalarDouble, UInt32, S_M, Double, UInt32, UInt32);
96 scilab_fill_dotmul(ScalarDouble, Int64, S_M, Double, Int64, Int64);
97 scilab_fill_dotmul(ScalarDouble, UInt64, S_M, Double, UInt64, UInt64);
98 scilab_fill_dotmul(ScalarDouble, Bool, S_M, Double, Bool, Double);
99 scilab_fill_dotmul(ScalarDouble, Polynom, M_M, Double, Polynom, Polynom);
100 scilab_fill_dotmul(ScalarDouble, Sparse, M_M, Double, Sparse, Sparse);
102 //Scalar .* Matrix Complex
103 scilab_fill_dotmul(ScalarDouble, DoubleComplex, S_MC, Double, Double, Double);
104 scilab_fill_dotmul(ScalarDouble, PolynomComplex, M_M, Double, Polynom, Polynom);
105 scilab_fill_dotmul(ScalarDouble, SparseComplex, M_M, Double, Sparse, Sparse);
108 scilab_fill_dotmul(ScalarDouble, ScalarDouble, S_S, Double, Double, Double);
109 scilab_fill_dotmul(ScalarDouble, ScalarInt8, S_S, Double, Int8, Int8);
110 scilab_fill_dotmul(ScalarDouble, ScalarUInt8, S_S, Double, UInt8, UInt8);
111 scilab_fill_dotmul(ScalarDouble, ScalarInt16, S_S, Double, Int16, Int16);
112 scilab_fill_dotmul(ScalarDouble, ScalarUInt16, S_S, Double, UInt16, UInt16);
113 scilab_fill_dotmul(ScalarDouble, ScalarInt32, S_S, Double, Int32, Int32);
114 scilab_fill_dotmul(ScalarDouble, ScalarUInt32, S_S, Double, UInt32, UInt32);
115 scilab_fill_dotmul(ScalarDouble, ScalarInt64, S_S, Double, Int64, Int64);
116 scilab_fill_dotmul(ScalarDouble, ScalarUInt64, S_S, Double, UInt64, UInt64);
117 scilab_fill_dotmul(ScalarDouble, ScalarBool, S_S, Double, Bool, Double);
118 scilab_fill_dotmul(ScalarDouble, ScalarPolynom, M_M, Double, Polynom, Polynom);
120 //Scalar .* Scalar Complex
121 scilab_fill_dotmul(ScalarDouble, ScalarDoubleComplex, S_SC, Double, Double, Double);
122 scilab_fill_dotmul(ScalarDouble, PolynomComplex, M_M, Double, Polynom, Polynom);
123 scilab_fill_dotmul(ScalarDouble, ScalarPolynomComplex, M_M, Double, Polynom, Polynom);
126 scilab_fill_dotmul(ScalarDouble, Empty, M_E, Double, Double, Double);
128 //Scalar Complex .* Matrix
129 scilab_fill_dotmul(ScalarDoubleComplex, Double, SC_M, Double, Double, Double);
130 scilab_fill_dotmul(ScalarDoubleComplex, Polynom, M_M, Double, Polynom, Polynom);
131 scilab_fill_dotmul(ScalarDoubleComplex, Sparse, M_M, Double, Sparse, Sparse);
132 //Scalar Complex .* Matrix Complex
133 scilab_fill_dotmul(ScalarDoubleComplex, DoubleComplex, SC_MC, Double, Double, Double);
134 scilab_fill_dotmul(ScalarDoubleComplex, PolynomComplex, M_M, Double, Polynom, Polynom);
135 scilab_fill_dotmul(ScalarDoubleComplex, SparseComplex, M_M, Double, Sparse, Sparse);
136 //Scalar Complex .* Scalar
137 scilab_fill_dotmul(ScalarDoubleComplex, ScalarDouble, SC_S, Double, Double, Double);
138 scilab_fill_dotmul(ScalarDoubleComplex, ScalarPolynom, M_M, Double, Polynom, Polynom);
139 //Scalar Complex .* Scalar Complex
140 scilab_fill_dotmul(ScalarDoubleComplex, ScalarDoubleComplex, SC_SC, Double, Double, Double);
141 scilab_fill_dotmul(ScalarDoubleComplex, ScalarPolynomComplex, M_M, Double, Polynom, Polynom);
142 //Scalar Complex .* Empty
143 scilab_fill_dotmul(ScalarDoubleComplex, Empty, M_E, Double, Double, Double);
146 scilab_fill_dotmul(Empty, Double, E_M, Double, Double, Double);
147 scilab_fill_dotmul(Empty, Int8, E_M, Double, Int8, Double);
148 scilab_fill_dotmul(Empty, UInt8, E_M, Double, UInt8, Double);
149 scilab_fill_dotmul(Empty, Int16, E_M, Double, Int16, Double);
150 scilab_fill_dotmul(Empty, UInt16, E_M, Double, UInt16, Double);
151 scilab_fill_dotmul(Empty, Int32, E_M, Double, Int32, Double);
152 scilab_fill_dotmul(Empty, UInt32, E_M, Double, UInt32, Double);
153 scilab_fill_dotmul(Empty, Int64, E_M, Double, Int64, Double);
154 scilab_fill_dotmul(Empty, UInt64, E_M, Double, UInt64, Double);
155 scilab_fill_dotmul(Empty, Polynom, E_M, Double, Polynom, Double);
156 scilab_fill_dotmul(Empty, PolynomComplex, E_M, Double, Polynom, Double);
157 scilab_fill_dotmul(Empty, Sparse, E_M, Double, Sparse, Double);
158 scilab_fill_dotmul(Empty, SparseComplex, E_M, Double, Sparse, Double);
160 //Empty .* Matrix Complex
161 scilab_fill_dotmul(Empty, DoubleComplex, E_M, Double, Double, Double);
163 scilab_fill_dotmul(Empty, ScalarDouble, E_M, Double, Double, Double);
164 scilab_fill_dotmul(Empty, ScalarInt8, E_M, Double, Int8, Double);
165 scilab_fill_dotmul(Empty, ScalarUInt8, E_M, Double, UInt8, Double);
166 scilab_fill_dotmul(Empty, ScalarInt16, E_M, Double, Int16, Double);
167 scilab_fill_dotmul(Empty, ScalarUInt16, E_M, Double, UInt16, Double);
168 scilab_fill_dotmul(Empty, ScalarInt32, E_M, Double, Int32, Double);
169 scilab_fill_dotmul(Empty, ScalarUInt32, E_M, Double, UInt32, Double);
170 scilab_fill_dotmul(Empty, ScalarInt64, E_M, Double, Int64, Double);
171 scilab_fill_dotmul(Empty, ScalarUInt64, E_M, Double, UInt64, Double);
172 scilab_fill_dotmul(Empty, ScalarBool, E_M, Double, Bool, Double);
173 scilab_fill_dotmul(Empty, ScalarPolynom, E_M, Double, Polynom, Double);
175 //Empty .* Scalar Complex
176 scilab_fill_dotmul(Empty, ScalarDoubleComplex, E_M, Double, Double, Double);
177 scilab_fill_dotmul(Empty, ScalarPolynomComplex, E_M, Double, Polynom, Double);
179 scilab_fill_dotmul(Empty, Empty, E_M, Double, Double, Double);
181 scilab_fill_dotmul(Empty, Identity, E_M, Double, Double, Double);
182 scilab_fill_dotmul(Empty, IdentityComplex, E_M, Double, Double, Double);
185 scilab_fill_dotmul(Double, Identity, M_I, Double, Double, Double);
186 scilab_fill_dotmul(Double, IdentityComplex, M_IC, Double, Double, Double);
187 scilab_fill_dotmul(DoubleComplex, Identity, MC_I, Double, Double, Double);
188 scilab_fill_dotmul(DoubleComplex, IdentityComplex, MC_IC, Double, Double, Double);
189 scilab_fill_dotmul(ScalarDouble, Identity, S_I, Double, Double, Double);
190 scilab_fill_dotmul(ScalarDouble, IdentityComplex, S_IC, Double, Double, Double);
191 scilab_fill_dotmul(ScalarDoubleComplex, Identity, SC_I, Double, Double, Double);
192 scilab_fill_dotmul(ScalarDoubleComplex, IdentityComplex, SC_IC, Double, Double, Double);
196 scilab_fill_dotmul(Int8, Double, M_M, Int8, Double, Int8);
197 scilab_fill_dotmul(Int8, Int8, M_M, Int8, Int8, Int8);
198 scilab_fill_dotmul(Int8, UInt8, M_M, Int8, UInt8, UInt8);
199 scilab_fill_dotmul(Int8, Int16, M_M, Int8, Int16, Int16);
200 scilab_fill_dotmul(Int8, UInt16, M_M, Int8, UInt16, UInt16);
201 scilab_fill_dotmul(Int8, Int32, M_M, Int8, Int32, Int32);
202 scilab_fill_dotmul(Int8, UInt32, M_M, Int8, UInt32, UInt32);
203 scilab_fill_dotmul(Int8, Int64, M_M, Int8, Int64, Int64);
204 scilab_fill_dotmul(Int8, UInt64, M_M, Int8, UInt64, UInt64);
205 scilab_fill_dotmul(Int8, Bool, M_M, Int8, Bool, Int8);
206 scilab_fill_dotmul(Int8, Empty, M_E, Int8, Double, Double);
209 scilab_fill_dotmul(Int8, ScalarDouble, M_S, Int8, Double, Int8);
210 scilab_fill_dotmul(Int8, ScalarInt8, M_S, Int8, Int8, Int8);
211 scilab_fill_dotmul(Int8, ScalarUInt8, M_S, Int8, UInt8, UInt8);
212 scilab_fill_dotmul(Int8, ScalarInt16, M_S, Int8, Int16, Int16);
213 scilab_fill_dotmul(Int8, ScalarUInt16, M_S, Int8, UInt16, UInt16);
214 scilab_fill_dotmul(Int8, ScalarInt32, M_S, Int8, Int32, Int32);
215 scilab_fill_dotmul(Int8, ScalarUInt32, M_S, Int8, UInt32, UInt32);
216 scilab_fill_dotmul(Int8, ScalarInt64, M_S, Int8, Int64, Int64);
217 scilab_fill_dotmul(Int8, ScalarUInt64, M_S, Int8, UInt64, UInt64);
218 scilab_fill_dotmul(Int8, ScalarBool, M_S, Int8, Bool, Int8);
221 scilab_fill_dotmul(ScalarInt8, Double, S_M, Int8, Double, Int8);
222 scilab_fill_dotmul(ScalarInt8, Int8, S_M, Int8, Int8, Int8);
223 scilab_fill_dotmul(ScalarInt8, UInt8, S_M, Int8, UInt8, UInt8);
224 scilab_fill_dotmul(ScalarInt8, Int16, S_M, Int8, Int16, Int16);
225 scilab_fill_dotmul(ScalarInt8, UInt16, S_M, Int8, UInt16, UInt16);
226 scilab_fill_dotmul(ScalarInt8, Int32, S_M, Int8, Int32, Int32);
227 scilab_fill_dotmul(ScalarInt8, UInt32, S_M, Int8, UInt32, UInt32);
228 scilab_fill_dotmul(ScalarInt8, Int64, S_M, Int8, Int64, Int64);
229 scilab_fill_dotmul(ScalarInt8, UInt64, S_M, Int8, UInt64, UInt64);
230 scilab_fill_dotmul(ScalarInt8, Bool, S_M, Int8, Bool, Int8);
231 scilab_fill_dotmul(ScalarInt8, Empty, M_E, Int8, Double, Double);
234 scilab_fill_dotmul(ScalarInt8, ScalarDouble, S_S, Int8, Double, Int8);
235 scilab_fill_dotmul(ScalarInt8, ScalarInt8, S_S, Int8, Int8, Int8);
236 scilab_fill_dotmul(ScalarInt8, ScalarUInt8, S_S, Int8, UInt8, UInt8);
237 scilab_fill_dotmul(ScalarInt8, ScalarInt16, S_S, Int8, Int16, Int16);
238 scilab_fill_dotmul(ScalarInt8, ScalarUInt16, S_S, Int8, UInt16, UInt16);
239 scilab_fill_dotmul(ScalarInt8, ScalarInt32, S_S, Int8, Int32, Int32);
240 scilab_fill_dotmul(ScalarInt8, ScalarUInt32, S_S, Int8, UInt32, UInt32);
241 scilab_fill_dotmul(ScalarInt8, ScalarInt64, S_S, Int8, Int64, Int64);
242 scilab_fill_dotmul(ScalarInt8, ScalarUInt64, S_S, Int8, UInt64, UInt64);
243 scilab_fill_dotmul(ScalarInt8, ScalarBool, S_S, Int8, Bool, Int8);
247 scilab_fill_dotmul(UInt8, Double, M_M, UInt8, Double, UInt8);
248 scilab_fill_dotmul(UInt8, Int8, M_M, UInt8, Int8, UInt8);
249 scilab_fill_dotmul(UInt8, UInt8, M_M, UInt8, UInt8, UInt8);
250 scilab_fill_dotmul(UInt8, Int16, M_M, UInt8, Int16, UInt16);
251 scilab_fill_dotmul(UInt8, UInt16, M_M, UInt8, UInt16, UInt16);
252 scilab_fill_dotmul(UInt8, Int32, M_M, UInt8, Int32, UInt32);
253 scilab_fill_dotmul(UInt8, UInt32, M_M, UInt8, UInt32, UInt32);
254 scilab_fill_dotmul(UInt8, Int64, M_M, UInt8, Int64, UInt64);
255 scilab_fill_dotmul(UInt8, UInt64, M_M, UInt8, UInt64, UInt64);
256 scilab_fill_dotmul(UInt8, Bool, M_M, UInt8, Bool, UInt8);
257 scilab_fill_dotmul(UInt8, Empty, M_E, UInt8, Double, Double);
260 scilab_fill_dotmul(UInt8, ScalarDouble, M_S, UInt8, Double, UInt8);
261 scilab_fill_dotmul(UInt8, ScalarInt8, M_S, UInt8, Int8, UInt8);
262 scilab_fill_dotmul(UInt8, ScalarUInt8, M_S, UInt8, UInt8, UInt8);
263 scilab_fill_dotmul(UInt8, ScalarInt16, M_S, UInt8, Int16, UInt16);
264 scilab_fill_dotmul(UInt8, ScalarUInt16, M_S, UInt8, UInt16, UInt16);
265 scilab_fill_dotmul(UInt8, ScalarInt32, M_S, UInt8, Int32, UInt32);
266 scilab_fill_dotmul(UInt8, ScalarUInt32, M_S, UInt8, UInt32, UInt32);
267 scilab_fill_dotmul(UInt8, ScalarInt64, M_S, UInt8, Int64, UInt64);
268 scilab_fill_dotmul(UInt8, ScalarUInt64, M_S, UInt8, UInt64, UInt64);
269 scilab_fill_dotmul(UInt8, ScalarBool, M_S, UInt8, Bool, UInt8);
272 scilab_fill_dotmul(ScalarUInt8, Double, S_M, UInt8, Double, UInt8);
273 scilab_fill_dotmul(ScalarUInt8, Int8, S_M, UInt8, Int8, UInt8);
274 scilab_fill_dotmul(ScalarUInt8, UInt8, S_M, UInt8, UInt8, UInt8);
275 scilab_fill_dotmul(ScalarUInt8, Int16, S_M, UInt8, Int16, UInt16);
276 scilab_fill_dotmul(ScalarUInt8, UInt16, S_M, UInt8, UInt16, UInt16);
277 scilab_fill_dotmul(ScalarUInt8, Int32, S_M, UInt8, Int32, UInt32);
278 scilab_fill_dotmul(ScalarUInt8, UInt32, S_M, UInt8, UInt32, UInt32);
279 scilab_fill_dotmul(ScalarUInt8, Int64, S_M, UInt8, Int64, UInt64);
280 scilab_fill_dotmul(ScalarUInt8, UInt64, S_M, UInt8, UInt64, UInt64);
281 scilab_fill_dotmul(ScalarUInt8, Bool, S_M, UInt8, Bool, UInt8);
282 scilab_fill_dotmul(ScalarUInt8, Empty, M_E, UInt8, Double, Double);
285 scilab_fill_dotmul(ScalarUInt8, ScalarDouble, S_S, UInt8, Double, UInt8);
286 scilab_fill_dotmul(ScalarUInt8, ScalarInt8, S_S, UInt8, Int8, UInt8);
287 scilab_fill_dotmul(ScalarUInt8, ScalarUInt8, S_S, UInt8, UInt8, UInt8);
288 scilab_fill_dotmul(ScalarUInt8, ScalarInt16, S_S, UInt8, Int16, UInt16);
289 scilab_fill_dotmul(ScalarUInt8, ScalarUInt16, S_S, UInt8, UInt16, UInt16);
290 scilab_fill_dotmul(ScalarUInt8, ScalarInt32, S_S, UInt8, Int32, UInt32);
291 scilab_fill_dotmul(ScalarUInt8, ScalarUInt32, S_S, UInt8, UInt32, UInt32);
292 scilab_fill_dotmul(ScalarUInt8, ScalarInt64, S_S, UInt8, Int64, UInt64);
293 scilab_fill_dotmul(ScalarUInt8, ScalarUInt64, S_S, UInt8, UInt64, UInt64);
294 scilab_fill_dotmul(ScalarUInt8, ScalarBool, S_S, UInt8, Bool, UInt8);
298 scilab_fill_dotmul(Int16, Double, M_M, Int16, Double, Int16);
299 scilab_fill_dotmul(Int16, Int8, M_M, Int16, Int8, Int16);
300 scilab_fill_dotmul(Int16, UInt8, M_M, Int16, UInt8, UInt16);
301 scilab_fill_dotmul(Int16, Int16, M_M, Int16, Int16, Int16);
302 scilab_fill_dotmul(Int16, UInt16, M_M, Int16, UInt16, UInt16);
303 scilab_fill_dotmul(Int16, Int32, M_M, Int16, Int32, Int32);
304 scilab_fill_dotmul(Int16, UInt32, M_M, Int16, UInt32, UInt32);
305 scilab_fill_dotmul(Int16, Int64, M_M, Int16, Int64, Int64);
306 scilab_fill_dotmul(Int16, UInt64, M_M, Int16, UInt64, UInt64);
307 scilab_fill_dotmul(Int16, Bool, M_M, Int16, Bool, Int16);
308 scilab_fill_dotmul(Int16, Empty, M_E, Int16, Double, Double);
311 scilab_fill_dotmul(Int16, ScalarDouble, M_S, Int16, Double, Int16);
312 scilab_fill_dotmul(Int16, ScalarInt8, M_S, Int16, Int8, Int16);
313 scilab_fill_dotmul(Int16, ScalarUInt8, M_S, Int16, UInt8, UInt16);
314 scilab_fill_dotmul(Int16, ScalarInt16, M_S, Int16, Int16, Int16);
315 scilab_fill_dotmul(Int16, ScalarUInt16, M_S, Int16, UInt16, UInt16);
316 scilab_fill_dotmul(Int16, ScalarInt32, M_S, Int16, Int32, Int32);
317 scilab_fill_dotmul(Int16, ScalarUInt32, M_S, Int16, UInt32, UInt32);
318 scilab_fill_dotmul(Int16, ScalarInt64, M_S, Int16, Int64, Int64);
319 scilab_fill_dotmul(Int16, ScalarUInt64, M_S, Int16, UInt64, UInt64);
320 scilab_fill_dotmul(Int16, ScalarBool, M_E, Int16, Bool, Int16);
323 scilab_fill_dotmul(ScalarInt16, Double, S_M, Int16, Double, Int16);
324 scilab_fill_dotmul(ScalarInt16, Int8, S_M, Int16, Int8, Int16);
325 scilab_fill_dotmul(ScalarInt16, UInt8, S_M, Int16, UInt8, UInt16);
326 scilab_fill_dotmul(ScalarInt16, Int16, S_M, Int16, Int16, Int16);
327 scilab_fill_dotmul(ScalarInt16, UInt16, S_M, Int16, UInt16, UInt16);
328 scilab_fill_dotmul(ScalarInt16, Int32, S_M, Int16, Int32, Int32);
329 scilab_fill_dotmul(ScalarInt16, UInt32, S_M, Int16, UInt32, UInt32);
330 scilab_fill_dotmul(ScalarInt16, Int64, S_M, Int16, Int64, Int64);
331 scilab_fill_dotmul(ScalarInt16, UInt64, S_M, Int16, UInt64, UInt64);
332 scilab_fill_dotmul(ScalarInt16, Bool, S_M, Int16, Bool, Int16);
333 scilab_fill_dotmul(ScalarInt16, Empty, M_E, Int16, Double, Double);
336 scilab_fill_dotmul(ScalarInt16, ScalarDouble, S_S, Int16, Double, Int16);
337 scilab_fill_dotmul(ScalarInt16, ScalarInt8, S_S, Int16, Int8, Int16);
338 scilab_fill_dotmul(ScalarInt16, ScalarUInt8, S_S, Int16, UInt8, UInt16);
339 scilab_fill_dotmul(ScalarInt16, ScalarInt16, S_S, Int16, Int16, Int16);
340 scilab_fill_dotmul(ScalarInt16, ScalarUInt16, S_S, Int16, UInt16, UInt16);
341 scilab_fill_dotmul(ScalarInt16, ScalarInt32, S_S, Int16, Int32, Int32);
342 scilab_fill_dotmul(ScalarInt16, ScalarUInt32, S_S, Int16, UInt32, UInt32);
343 scilab_fill_dotmul(ScalarInt16, ScalarInt64, S_S, Int16, Int64, Int64);
344 scilab_fill_dotmul(ScalarInt16, ScalarUInt64, S_S, Int16, UInt64, UInt64);
345 scilab_fill_dotmul(ScalarInt16, ScalarBool, S_S, Int16, Bool, Int16);
349 scilab_fill_dotmul(UInt16, Double, M_M, UInt16, Double, UInt16);
350 scilab_fill_dotmul(UInt16, Int8, M_M, UInt16, Int8, UInt16);
351 scilab_fill_dotmul(UInt16, UInt8, M_M, UInt16, UInt8, UInt16);
352 scilab_fill_dotmul(UInt16, Int16, M_M, UInt16, Int16, UInt16);
353 scilab_fill_dotmul(UInt16, UInt16, M_M, UInt16, UInt16, UInt16);
354 scilab_fill_dotmul(UInt16, Int32, M_M, UInt16, Int32, UInt32);
355 scilab_fill_dotmul(UInt16, UInt32, M_M, UInt16, UInt32, UInt32);
356 scilab_fill_dotmul(UInt16, Int64, M_M, UInt16, Int64, UInt64);
357 scilab_fill_dotmul(UInt16, UInt64, M_M, UInt16, UInt64, UInt64);
358 scilab_fill_dotmul(UInt16, Bool, M_M, UInt16, Bool, UInt16);
359 scilab_fill_dotmul(UInt16, Empty, M_E, UInt16, Double, Double);
362 scilab_fill_dotmul(UInt16, ScalarDouble, M_S, UInt16, Double, UInt16);
363 scilab_fill_dotmul(UInt16, ScalarInt8, M_S, UInt16, Int8, UInt16);
364 scilab_fill_dotmul(UInt16, ScalarUInt8, M_S, UInt16, UInt8, UInt16);
365 scilab_fill_dotmul(UInt16, ScalarInt16, M_S, UInt16, Int16, UInt16);
366 scilab_fill_dotmul(UInt16, ScalarUInt16, M_S, UInt16, UInt16, UInt16);
367 scilab_fill_dotmul(UInt16, ScalarInt32, M_S, UInt16, Int32, UInt32);
368 scilab_fill_dotmul(UInt16, ScalarUInt32, M_S, UInt16, UInt32, UInt32);
369 scilab_fill_dotmul(UInt16, ScalarInt64, M_S, UInt16, Int64, UInt64);
370 scilab_fill_dotmul(UInt16, ScalarUInt64, M_S, UInt16, UInt64, UInt64);
371 scilab_fill_dotmul(UInt16, ScalarBool, M_S, UInt16, Bool, UInt16);
374 scilab_fill_dotmul(ScalarUInt16, Double, S_M, UInt16, Double, UInt16);
375 scilab_fill_dotmul(ScalarUInt16, Int8, S_M, UInt16, Int8, UInt16);
376 scilab_fill_dotmul(ScalarUInt16, UInt8, S_M, UInt16, UInt8, UInt16);
377 scilab_fill_dotmul(ScalarUInt16, Int16, S_M, UInt16, Int16, UInt16);
378 scilab_fill_dotmul(ScalarUInt16, UInt16, S_M, UInt16, UInt16, UInt16);
379 scilab_fill_dotmul(ScalarUInt16, Int32, S_M, UInt16, Int32, UInt32);
380 scilab_fill_dotmul(ScalarUInt16, UInt32, S_M, UInt16, UInt32, UInt32);
381 scilab_fill_dotmul(ScalarUInt16, Int64, S_M, UInt16, Int64, UInt64);
382 scilab_fill_dotmul(ScalarUInt16, UInt64, S_M, UInt16, UInt64, UInt64);
383 scilab_fill_dotmul(ScalarUInt16, Bool, S_M, UInt16, Bool, UInt16);
384 scilab_fill_dotmul(ScalarUInt16, Empty, S_M, UInt16, Double, UInt16);
387 scilab_fill_dotmul(ScalarUInt16, ScalarDouble, S_S, UInt16, Double, UInt16);
388 scilab_fill_dotmul(ScalarUInt16, ScalarInt8, S_S, UInt16, Int8, UInt16);
389 scilab_fill_dotmul(ScalarUInt16, ScalarUInt8, S_S, UInt16, UInt8, UInt16);
390 scilab_fill_dotmul(ScalarUInt16, ScalarInt16, S_S, UInt16, Int16, UInt16);
391 scilab_fill_dotmul(ScalarUInt16, ScalarUInt16, S_S, UInt16, UInt16, UInt16);
392 scilab_fill_dotmul(ScalarUInt16, ScalarInt32, S_S, UInt16, Int32, UInt32);
393 scilab_fill_dotmul(ScalarUInt16, ScalarUInt32, S_S, UInt16, UInt32, UInt32);
394 scilab_fill_dotmul(ScalarUInt16, ScalarInt64, S_S, UInt16, Int64, UInt64);
395 scilab_fill_dotmul(ScalarUInt16, ScalarUInt64, S_S, UInt16, UInt64, UInt64);
396 scilab_fill_dotmul(ScalarUInt16, ScalarBool, S_S, UInt16, Bool, UInt16);
400 scilab_fill_dotmul(Int32, Double, M_M, Int32, Double, Int32);
401 scilab_fill_dotmul(Int32, Int8, M_M, Int32, Int8, Int32);
402 scilab_fill_dotmul(Int32, UInt8, M_M, Int32, UInt8, UInt32);
403 scilab_fill_dotmul(Int32, Int16, M_M, Int32, Int16, Int32);
404 scilab_fill_dotmul(Int32, UInt16, M_M, Int32, UInt16, UInt32);
405 scilab_fill_dotmul(Int32, Int32, M_M, Int32, Int32, Int32);
406 scilab_fill_dotmul(Int32, UInt32, M_M, Int32, UInt32, UInt32);
407 scilab_fill_dotmul(Int32, Int64, M_M, Int32, Int64, Int64);
408 scilab_fill_dotmul(Int32, UInt64, M_M, Int32, UInt64, UInt64);
409 scilab_fill_dotmul(Int32, Bool, M_M, Int32, Bool, Int32);
410 scilab_fill_dotmul(Int32, Empty, M_E, Int32, Double, Double);
413 scilab_fill_dotmul(Int32, ScalarDouble, M_S, Int32, Double, Int32);
414 scilab_fill_dotmul(Int32, ScalarInt8, M_S, Int32, Int8, Int32);
415 scilab_fill_dotmul(Int32, ScalarUInt8, M_S, Int32, UInt8, UInt32);
416 scilab_fill_dotmul(Int32, ScalarInt16, M_S, Int32, Int16, Int32);
417 scilab_fill_dotmul(Int32, ScalarUInt16, M_S, Int32, UInt16, UInt32);
418 scilab_fill_dotmul(Int32, ScalarInt32, M_S, Int32, Int32, Int32);
419 scilab_fill_dotmul(Int32, ScalarUInt32, M_S, Int32, UInt32, UInt32);
420 scilab_fill_dotmul(Int32, ScalarInt64, M_S, Int32, Int64, Int64);
421 scilab_fill_dotmul(Int32, ScalarUInt64, M_S, Int32, UInt64, UInt64);
422 scilab_fill_dotmul(Int32, ScalarBool, M_S, Int32, Bool, Int32);
425 scilab_fill_dotmul(ScalarInt32, Double, S_M, Int32, Double, Int32);
426 scilab_fill_dotmul(ScalarInt32, Int8, S_M, Int32, Int8, Int32);
427 scilab_fill_dotmul(ScalarInt32, UInt8, S_M, Int32, UInt8, UInt32);
428 scilab_fill_dotmul(ScalarInt32, Int16, S_M, Int32, Int16, Int32);
429 scilab_fill_dotmul(ScalarInt32, UInt16, S_M, Int32, UInt16, UInt32);
430 scilab_fill_dotmul(ScalarInt32, Int32, S_M, Int32, Int32, Int32);
431 scilab_fill_dotmul(ScalarInt32, UInt32, S_M, Int32, UInt32, UInt32);
432 scilab_fill_dotmul(ScalarInt32, Int64, S_M, Int32, Int64, Int64);
433 scilab_fill_dotmul(ScalarInt32, UInt64, S_M, Int32, UInt64, UInt64);
434 scilab_fill_dotmul(ScalarInt32, Bool, S_M, Int32, Bool, Int32);
435 scilab_fill_dotmul(ScalarInt32, Empty, M_E, Int32, Double, Double);
438 scilab_fill_dotmul(ScalarInt32, ScalarDouble, S_S, Int32, Double, Int32);
439 scilab_fill_dotmul(ScalarInt32, ScalarInt8, S_S, Int32, Int8, Int32);
440 scilab_fill_dotmul(ScalarInt32, ScalarUInt8, S_S, Int32, UInt8, UInt32);
441 scilab_fill_dotmul(ScalarInt32, ScalarInt16, S_S, Int32, Int16, Int32);
442 scilab_fill_dotmul(ScalarInt32, ScalarUInt16, S_S, Int32, UInt16, UInt32);
443 scilab_fill_dotmul(ScalarInt32, ScalarInt32, S_S, Int32, Int32, Int32);
444 scilab_fill_dotmul(ScalarInt32, ScalarUInt32, S_S, Int32, UInt32, UInt32);
445 scilab_fill_dotmul(ScalarInt32, ScalarInt64, S_S, Int32, Int64, Int64);
446 scilab_fill_dotmul(ScalarInt32, ScalarUInt64, S_S, Int32, UInt64, UInt64);
447 scilab_fill_dotmul(ScalarInt32, ScalarBool, S_S, Int32, Bool, Int32);
451 scilab_fill_dotmul(UInt32, Double, M_M, UInt32, Double, UInt32);
452 scilab_fill_dotmul(UInt32, Int8, M_M, UInt32, Int8, UInt32);
453 scilab_fill_dotmul(UInt32, UInt8, M_M, UInt32, UInt8, UInt32);
454 scilab_fill_dotmul(UInt32, Int16, M_M, UInt32, Int16, UInt32);
455 scilab_fill_dotmul(UInt32, UInt16, M_M, UInt32, UInt16, UInt32);
456 scilab_fill_dotmul(UInt32, Int32, M_M, UInt32, Int32, UInt32);
457 scilab_fill_dotmul(UInt32, UInt32, M_M, UInt32, UInt32, UInt32);
458 scilab_fill_dotmul(UInt32, Int64, M_M, UInt32, Int64, UInt64);
459 scilab_fill_dotmul(UInt32, UInt64, M_M, UInt32, UInt64, UInt64);
460 scilab_fill_dotmul(UInt32, Bool, M_M, UInt32, Bool, UInt32);
461 scilab_fill_dotmul(UInt32, Empty, M_E, UInt32, Double, Double);
464 scilab_fill_dotmul(UInt32, ScalarDouble, M_S, UInt32, Double, UInt32);
465 scilab_fill_dotmul(UInt32, ScalarInt8, M_S, UInt32, Int8, UInt32);
466 scilab_fill_dotmul(UInt32, ScalarUInt8, M_S, UInt32, UInt8, UInt32);
467 scilab_fill_dotmul(UInt32, ScalarInt16, M_S, UInt32, Int16, UInt32);
468 scilab_fill_dotmul(UInt32, ScalarUInt16, M_S, UInt32, UInt16, UInt32);
469 scilab_fill_dotmul(UInt32, ScalarInt32, M_S, UInt32, Int32, UInt32);
470 scilab_fill_dotmul(UInt32, ScalarUInt32, M_S, UInt32, UInt32, UInt32);
471 scilab_fill_dotmul(UInt32, ScalarInt64, M_S, UInt32, Int64, UInt64);
472 scilab_fill_dotmul(UInt32, ScalarUInt64, M_S, UInt32, UInt64, UInt64);
473 scilab_fill_dotmul(UInt32, ScalarBool, M_S, UInt32, Bool, UInt32);
476 scilab_fill_dotmul(ScalarUInt32, Double, S_M, UInt32, Double, UInt32);
477 scilab_fill_dotmul(ScalarUInt32, Int8, S_M, UInt32, Int8, UInt32);
478 scilab_fill_dotmul(ScalarUInt32, UInt8, S_M, UInt32, UInt8, UInt32);
479 scilab_fill_dotmul(ScalarUInt32, Int16, S_M, UInt32, Int16, UInt32);
480 scilab_fill_dotmul(ScalarUInt32, UInt16, S_M, UInt32, UInt16, UInt32);
481 scilab_fill_dotmul(ScalarUInt32, Int32, S_M, UInt32, Int32, UInt32);
482 scilab_fill_dotmul(ScalarUInt32, UInt32, S_M, UInt32, UInt32, UInt32);
483 scilab_fill_dotmul(ScalarUInt32, Int64, S_M, UInt32, Int64, UInt64);
484 scilab_fill_dotmul(ScalarUInt32, UInt64, S_M, UInt32, UInt64, UInt64);
485 scilab_fill_dotmul(ScalarUInt32, Bool, S_M, UInt32, Bool, UInt32);
486 scilab_fill_dotmul(ScalarUInt32, Empty, S_M, UInt32, Double, UInt32);
489 scilab_fill_dotmul(ScalarUInt32, ScalarDouble, S_S, UInt32, Double, UInt32);
490 scilab_fill_dotmul(ScalarUInt32, ScalarInt8, S_S, UInt32, Int8, UInt32);
491 scilab_fill_dotmul(ScalarUInt32, ScalarUInt8, S_S, UInt32, UInt8, UInt32);
492 scilab_fill_dotmul(ScalarUInt32, ScalarInt16, S_S, UInt32, Int16, UInt32);
493 scilab_fill_dotmul(ScalarUInt32, ScalarUInt16, S_S, UInt32, UInt16, UInt32);
494 scilab_fill_dotmul(ScalarUInt32, ScalarInt32, S_S, UInt32, Int32, UInt32);
495 scilab_fill_dotmul(ScalarUInt32, ScalarUInt32, S_S, UInt32, UInt32, UInt32);
496 scilab_fill_dotmul(ScalarUInt32, ScalarInt64, S_S, UInt32, Int64, UInt64);
497 scilab_fill_dotmul(ScalarUInt32, ScalarUInt64, S_S, UInt32, UInt64, UInt64);
498 scilab_fill_dotmul(ScalarUInt32, ScalarBool, S_S, UInt32, Bool, UInt32);
502 scilab_fill_dotmul(Int64, Double, M_M, Int64, Double, Int64);
503 scilab_fill_dotmul(Int64, Int8, M_M, Int64, Int8, Int64);
504 scilab_fill_dotmul(Int64, UInt8, M_M, Int64, UInt8, UInt64);
505 scilab_fill_dotmul(Int64, Int16, M_M, Int64, Int16, Int64);
506 scilab_fill_dotmul(Int64, UInt16, M_M, Int64, UInt16, UInt64);
507 scilab_fill_dotmul(Int64, Int32, M_M, Int64, Int32, Int64);
508 scilab_fill_dotmul(Int64, UInt32, M_M, Int64, UInt32, UInt64);
509 scilab_fill_dotmul(Int64, Int64, M_M, Int64, Int64, Int64);
510 scilab_fill_dotmul(Int64, UInt64, M_M, Int64, UInt64, UInt64);
511 scilab_fill_dotmul(Int64, Bool, M_M, Int64, Bool, Int64);
512 scilab_fill_dotmul(Int64, Empty, M_E, Int64, Double, Double);
515 scilab_fill_dotmul(Int64, ScalarDouble, M_S, Int64, Double, Int64);
516 scilab_fill_dotmul(Int64, ScalarInt8, M_S, Int64, Int8, Int64);
517 scilab_fill_dotmul(Int64, ScalarUInt8, M_S, Int64, UInt8, UInt64);
518 scilab_fill_dotmul(Int64, ScalarInt16, M_S, Int64, Int16, Int64);
519 scilab_fill_dotmul(Int64, ScalarUInt16, M_S, Int64, UInt16, UInt64);
520 scilab_fill_dotmul(Int64, ScalarInt32, M_S, Int64, Int32, Int64);
521 scilab_fill_dotmul(Int64, ScalarUInt32, M_S, Int64, UInt32, UInt64);
522 scilab_fill_dotmul(Int64, ScalarInt64, M_S, Int64, Int64, Int64);
523 scilab_fill_dotmul(Int64, ScalarUInt64, M_S, Int64, UInt64, UInt64);
524 scilab_fill_dotmul(Int64, ScalarBool, M_S, Int64, Bool, Int64);
527 scilab_fill_dotmul(ScalarInt64, Double, S_M, Int64, Double, Int64);
528 scilab_fill_dotmul(ScalarInt64, Int8, S_M, Int64, Int8, Int64);
529 scilab_fill_dotmul(ScalarInt64, UInt8, S_M, Int64, UInt8, UInt64);
530 scilab_fill_dotmul(ScalarInt64, Int16, S_M, Int64, Int16, Int64);
531 scilab_fill_dotmul(ScalarInt64, UInt16, S_M, Int64, UInt16, UInt64);
532 scilab_fill_dotmul(ScalarInt64, Int32, S_M, Int64, Int32, Int64);
533 scilab_fill_dotmul(ScalarInt64, UInt32, S_M, Int64, UInt32, UInt64);
534 scilab_fill_dotmul(ScalarInt64, Int64, S_M, Int64, Int64, Int64);
535 scilab_fill_dotmul(ScalarInt64, UInt64, S_M, Int64, UInt64, UInt64);
536 scilab_fill_dotmul(ScalarInt64, Bool, S_M, Int64, Bool, Int64);
537 scilab_fill_dotmul(ScalarInt64, Empty, M_E, Int64, Double, Double);
540 scilab_fill_dotmul(ScalarInt64, ScalarDouble, S_S, Int64, Double, Int64);
541 scilab_fill_dotmul(ScalarInt64, ScalarInt8, S_S, Int64, Int8, Int64);
542 scilab_fill_dotmul(ScalarInt64, ScalarUInt8, S_S, Int64, UInt8, UInt64);
543 scilab_fill_dotmul(ScalarInt64, ScalarInt16, S_S, Int64, Int16, Int64);
544 scilab_fill_dotmul(ScalarInt64, ScalarUInt16, S_S, Int64, UInt16, UInt64);
545 scilab_fill_dotmul(ScalarInt64, ScalarInt32, S_S, Int64, Int32, Int64);
546 scilab_fill_dotmul(ScalarInt64, ScalarUInt32, S_S, Int64, UInt32, UInt64);
547 scilab_fill_dotmul(ScalarInt64, ScalarInt64, S_S, Int64, Int64, Int64);
548 scilab_fill_dotmul(ScalarInt64, ScalarUInt64, S_S, Int64, UInt64, UInt64);
549 scilab_fill_dotmul(ScalarInt64, ScalarBool, S_S, Int64, Bool, Int64);
553 scilab_fill_dotmul(UInt64, Double, M_M, UInt64, Double, UInt64);
554 scilab_fill_dotmul(UInt64, Int8, M_M, UInt64, Int8, UInt64);
555 scilab_fill_dotmul(UInt64, UInt8, M_M, UInt64, UInt8, UInt64);
556 scilab_fill_dotmul(UInt64, Int16, M_M, UInt64, Int16, UInt64);
557 scilab_fill_dotmul(UInt64, UInt16, M_M, UInt64, UInt16, UInt64);
558 scilab_fill_dotmul(UInt64, Int32, M_M, UInt64, Int32, UInt64);
559 scilab_fill_dotmul(UInt64, UInt32, M_M, UInt64, UInt32, UInt64);
560 scilab_fill_dotmul(UInt64, Int64, M_M, UInt64, Int64, UInt64);
561 scilab_fill_dotmul(UInt64, UInt64, M_M, UInt64, UInt64, UInt64);
562 scilab_fill_dotmul(UInt64, Bool, M_M, UInt64, Bool, UInt64);
563 scilab_fill_dotmul(UInt64, Empty, M_E, UInt64, Double, Double);
566 scilab_fill_dotmul(UInt64, ScalarDouble, M_S, UInt64, Double, UInt64);
567 scilab_fill_dotmul(UInt64, ScalarInt8, M_S, UInt64, Int8, UInt64);
568 scilab_fill_dotmul(UInt64, ScalarUInt8, M_S, UInt64, UInt8, UInt64);
569 scilab_fill_dotmul(UInt64, ScalarInt16, M_S, UInt64, Int16, UInt64);
570 scilab_fill_dotmul(UInt64, ScalarUInt16, M_S, UInt64, UInt16, UInt64);
571 scilab_fill_dotmul(UInt64, ScalarInt32, M_S, UInt64, Int32, UInt64);
572 scilab_fill_dotmul(UInt64, ScalarUInt32, M_S, UInt64, UInt32, UInt64);
573 scilab_fill_dotmul(UInt64, ScalarInt64, M_S, UInt64, Int64, UInt64);
574 scilab_fill_dotmul(UInt64, ScalarUInt64, M_S, UInt64, UInt64, UInt64);
575 scilab_fill_dotmul(UInt64, ScalarBool, M_S, UInt64, Bool, UInt64);
578 scilab_fill_dotmul(ScalarUInt64, Double, S_M, UInt64, Double, UInt64);
579 scilab_fill_dotmul(ScalarUInt64, Int8, S_M, UInt64, Int8, UInt64);
580 scilab_fill_dotmul(ScalarUInt64, UInt8, S_M, UInt64, UInt8, UInt64);
581 scilab_fill_dotmul(ScalarUInt64, Int16, S_M, UInt64, Int16, UInt64);
582 scilab_fill_dotmul(ScalarUInt64, UInt16, S_M, UInt64, UInt16, UInt64);
583 scilab_fill_dotmul(ScalarUInt64, Int32, S_M, UInt64, Int32, UInt64);
584 scilab_fill_dotmul(ScalarUInt64, UInt32, S_M, UInt64, UInt32, UInt64);
585 scilab_fill_dotmul(ScalarUInt64, Int64, S_M, UInt64, Int64, UInt64);
586 scilab_fill_dotmul(ScalarUInt64, UInt64, S_M, UInt64, UInt64, UInt64);
587 scilab_fill_dotmul(ScalarUInt64, Bool, S_M, UInt64, Bool, UInt64);
588 scilab_fill_dotmul(ScalarUInt64, Empty, S_M, UInt64, Double, UInt64);
591 scilab_fill_dotmul(ScalarUInt64, ScalarDouble, S_S, UInt64, Double, UInt64);
592 scilab_fill_dotmul(ScalarUInt64, ScalarInt8, S_S, UInt64, Int8, UInt64);
593 scilab_fill_dotmul(ScalarUInt64, ScalarUInt8, S_S, UInt64, UInt8, UInt64);
594 scilab_fill_dotmul(ScalarUInt64, ScalarInt16, S_S, UInt64, Int16, UInt64);
595 scilab_fill_dotmul(ScalarUInt64, ScalarUInt16, S_S, UInt64, UInt16, UInt64);
596 scilab_fill_dotmul(ScalarUInt64, ScalarInt32, S_S, UInt64, Int32, UInt64);
597 scilab_fill_dotmul(ScalarUInt64, ScalarUInt32, S_S, UInt64, UInt32, UInt64);
598 scilab_fill_dotmul(ScalarUInt64, ScalarInt64, S_S, UInt64, Int64, UInt64);
599 scilab_fill_dotmul(ScalarUInt64, ScalarUInt64, S_S, UInt64, UInt64, UInt64);
600 scilab_fill_dotmul(ScalarUInt64, ScalarBool, S_S, UInt64, Bool, UInt64);
604 scilab_fill_dotmul(Bool, Double, M_M, Bool, Double, Double);
605 scilab_fill_dotmul(Bool, Int8, M_M, Bool, Int8, Int8);
606 scilab_fill_dotmul(Bool, UInt8, M_M, Bool, UInt8, UInt8);
607 scilab_fill_dotmul(Bool, Int16, M_M, Bool, Int16, Int16);
608 scilab_fill_dotmul(Bool, UInt16, M_M, Bool, UInt16, UInt16);
609 scilab_fill_dotmul(Bool, Int32, M_M, Bool, Int32, Int32);
610 scilab_fill_dotmul(Bool, UInt32, M_M, Bool, UInt32, UInt32);
611 scilab_fill_dotmul(Bool, Int64, M_M, Bool, Int64, Int64);
612 scilab_fill_dotmul(Bool, UInt64, M_M, Bool, UInt64, UInt64);
613 scilab_fill_dotmul(Bool, Bool, M_M, Bool, Bool, Double);
614 scilab_fill_dotmul(Bool, Empty, M_E, Bool, Double, Double);
617 scilab_fill_dotmul(Bool, ScalarDouble, M_S, Bool, Double, Double);
618 scilab_fill_dotmul(Bool, ScalarInt8, M_S, Bool, Int8, Int8);
619 scilab_fill_dotmul(Bool, ScalarUInt8, M_S, Bool, UInt8, UInt8);
620 scilab_fill_dotmul(Bool, ScalarInt16, M_S, Bool, Int16, Int16);
621 scilab_fill_dotmul(Bool, ScalarUInt16, M_S, Bool, UInt16, UInt16);
622 scilab_fill_dotmul(Bool, ScalarInt32, M_S, Bool, Int32, Int32);
623 scilab_fill_dotmul(Bool, ScalarUInt32, M_S, Bool, UInt32, UInt32);
624 scilab_fill_dotmul(Bool, ScalarInt64, M_S, Bool, Int64, Int64);
625 scilab_fill_dotmul(Bool, ScalarUInt64, M_S, Bool, UInt64, UInt64);
626 scilab_fill_dotmul(Bool, ScalarBool, M_S, Bool, Bool, Double);
629 scilab_fill_dotmul(ScalarBool, Double, S_M, Bool, Double, Double);
630 scilab_fill_dotmul(ScalarBool, Int8, S_M, Bool, Int8, Int8);
631 scilab_fill_dotmul(ScalarBool, UInt8, S_M, Bool, UInt8, UInt8);
632 scilab_fill_dotmul(ScalarBool, Int16, S_M, Bool, Int16, Int16);
633 scilab_fill_dotmul(ScalarBool, UInt16, S_M, Bool, UInt16, UInt16);
634 scilab_fill_dotmul(ScalarBool, Int32, S_M, Bool, Int32, Int32);
635 scilab_fill_dotmul(ScalarBool, UInt32, S_M, Bool, UInt32, UInt32);
636 scilab_fill_dotmul(ScalarBool, Int64, S_M, Bool, Int64, Int64);
637 scilab_fill_dotmul(ScalarBool, UInt64, S_M, Bool, UInt64, UInt64);
638 scilab_fill_dotmul(ScalarBool, Bool, S_M, Bool, Bool, Double);
639 scilab_fill_dotmul(ScalarBool, Empty, M_E, Bool, Double, Double);
642 scilab_fill_dotmul(ScalarBool, ScalarDouble, S_S, Bool, Double, Double);
643 scilab_fill_dotmul(ScalarBool, ScalarInt8, S_S, Bool, Int8, Int8);
644 scilab_fill_dotmul(ScalarBool, ScalarUInt8, S_S, Bool, UInt8, UInt8);
645 scilab_fill_dotmul(ScalarBool, ScalarInt16, S_S, Bool, Int16, Int16);
646 scilab_fill_dotmul(ScalarBool, ScalarUInt16, S_S, Bool, UInt16, UInt16);
647 scilab_fill_dotmul(ScalarBool, ScalarInt32, S_S, Bool, Int32, Int32);
648 scilab_fill_dotmul(ScalarBool, ScalarUInt32, S_S, Bool, UInt32, UInt32);
649 scilab_fill_dotmul(ScalarBool, ScalarInt64, S_S, Bool, Int64, Int64);
650 scilab_fill_dotmul(ScalarBool, ScalarUInt64, S_S, Bool, UInt64, UInt64);
651 scilab_fill_dotmul(ScalarBool, ScalarBool, S_S, Bool, Bool, Double);
654 scilab_fill_dotmul(Identity, Double, I_M, Double, Double, Double);
655 scilab_fill_dotmul(Identity, DoubleComplex, I_MC, Double, Double, Double);
656 scilab_fill_dotmul(Identity, ScalarDouble, I_S, Double, Double, Double);
657 scilab_fill_dotmul(Identity, ScalarDoubleComplex, I_SC, Double, Double, Double);
658 scilab_fill_dotmul(Identity, Identity, I_I, Double, Double, Double);
659 scilab_fill_dotmul(Identity, IdentityComplex, I_IC, Double, Double, Double);
660 scilab_fill_dotmul(Identity, Empty, M_E, Double, Double, Double);
662 scilab_fill_dotmul(Identity, Polynom, M_M, Double, Polynom, Polynom);
663 scilab_fill_dotmul(Identity, PolynomComplex, M_M, Double, Polynom, Polynom);
664 scilab_fill_dotmul(Identity, ScalarPolynom, M_M, Double, Polynom, Polynom);
665 scilab_fill_dotmul(Identity, ScalarPolynomComplex, M_M, Double, Polynom, Polynom);
666 //scilab_fill_dotmul(Identity, Sparse, M_M, Double, Sparse, Sparse);
667 //scilab_fill_dotmul(Identity, SparseComplex, M_M, Double, Sparse, Sparse);
669 scilab_fill_dotmul(IdentityComplex, Double, IC_M, Double, Double, Double);
670 scilab_fill_dotmul(IdentityComplex, DoubleComplex, IC_MC, Double, Double, Double);
671 scilab_fill_dotmul(IdentityComplex, ScalarDouble, IC_S, Double, Double, Double);
672 scilab_fill_dotmul(IdentityComplex, ScalarDoubleComplex, IC_SC, Double, Double, Double);
673 scilab_fill_dotmul(IdentityComplex, Identity, IC_I, Double, Double, Double);
674 scilab_fill_dotmul(IdentityComplex, IdentityComplex, IC_IC, Double, Double, Double);
675 scilab_fill_dotmul(IdentityComplex, Empty, M_E, Double, Double, Double);
677 scilab_fill_dotmul(IdentityComplex, Polynom, M_M, Double, Polynom, Polynom);
678 scilab_fill_dotmul(IdentityComplex, PolynomComplex, M_M, Double, Polynom, Polynom);
679 scilab_fill_dotmul(IdentityComplex, ScalarPolynom, M_M, Double, Polynom, Polynom);
680 scilab_fill_dotmul(IdentityComplex, ScalarPolynomComplex, M_M, Double, Polynom, Polynom);
681 //scilab_fill_dotmul(IdentityComplex, Sparse, M_M, Double, Sparse, Sparse);
682 //scilab_fill_dotmul(IdentityComplex, SparseComplex, M_M, Double, Sparse, Sparse);
687 scilab_fill_dotmul(Polynom, Polynom, M_M, Polynom, Polynom, Polynom);
688 scilab_fill_dotmul(Polynom, PolynomComplex, M_M, Polynom, Polynom, Polynom);
689 scilab_fill_dotmul(PolynomComplex, Polynom, M_M, Polynom, Polynom, Polynom);
690 scilab_fill_dotmul(PolynomComplex, PolynomComplex, M_M, Polynom, Polynom, Polynom);
693 scilab_fill_dotmul(Polynom, ScalarPolynom, M_M, Polynom, Polynom, Polynom);
694 scilab_fill_dotmul(Polynom, ScalarPolynomComplex, M_M, Polynom, Polynom, Polynom);
695 scilab_fill_dotmul(PolynomComplex, ScalarPolynom, M_M, Polynom, Polynom, Polynom);
696 scilab_fill_dotmul(PolynomComplex, ScalarPolynomComplex, M_M, Polynom, Polynom, Polynom);
699 scilab_fill_dotmul(Polynom, Double, M_M, Polynom, Double, Polynom);
700 scilab_fill_dotmul(Polynom, DoubleComplex, M_M, Polynom, Double, Polynom);
701 scilab_fill_dotmul(PolynomComplex, Double, M_M, Polynom, Double, Polynom);
702 scilab_fill_dotmul(PolynomComplex, DoubleComplex, M_M, Polynom, Double, Polynom);
704 //poly + scalar double
705 scilab_fill_dotmul(Polynom, ScalarDouble, M_M, Polynom, Double, Polynom);
706 scilab_fill_dotmul(Polynom, ScalarDoubleComplex, M_M, Polynom, Double, Polynom);
707 scilab_fill_dotmul(PolynomComplex, ScalarDouble, M_M, Polynom, Double, Polynom);
708 scilab_fill_dotmul(PolynomComplex, ScalarDoubleComplex, M_M, Polynom, Double, Polynom);
711 scilab_fill_dotmul(Polynom, Empty, M_E, Polynom, Double, Double);
712 scilab_fill_dotmul(PolynomComplex, Empty, M_E, Polynom, Double, Double);
715 scilab_fill_dotmul(Polynom, Identity, M_M, Polynom, Double, Polynom);
716 scilab_fill_dotmul(Polynom, IdentityComplex, M_M, Polynom, Double, Polynom);
717 scilab_fill_dotmul(PolynomComplex, Identity, M_M, Polynom, Double, Polynom);
718 scilab_fill_dotmul(PolynomComplex, IdentityComplex, M_M, Polynom, Double, Polynom);
721 scilab_fill_dotmul(ScalarPolynom, Polynom, M_M, Polynom, Polynom, Polynom);
722 scilab_fill_dotmul(ScalarPolynom, PolynomComplex, M_M, Polynom, Polynom, Polynom);
723 scilab_fill_dotmul(ScalarPolynomComplex, Polynom, M_M, Polynom, Polynom, Polynom);
724 scilab_fill_dotmul(ScalarPolynomComplex, PolynomComplex, M_M, Polynom, Polynom, Polynom);
726 //scalar poly + scalar poly
727 scilab_fill_dotmul(ScalarPolynom, ScalarPolynom, M_M, Polynom, Polynom, Polynom);
728 scilab_fill_dotmul(ScalarPolynom, ScalarPolynomComplex, M_M, Polynom, Polynom, Polynom);
729 scilab_fill_dotmul(ScalarPolynomComplex, ScalarPolynom, M_M, Polynom, Polynom, Polynom);
730 scilab_fill_dotmul(ScalarPolynomComplex, ScalarPolynomComplex, M_M, Polynom, Polynom, Polynom);
732 //scalar poly + double
733 scilab_fill_dotmul(ScalarPolynom, Double, M_M, Polynom, Double, Polynom);
734 scilab_fill_dotmul(ScalarPolynom, DoubleComplex, M_M, Polynom, Double, Polynom);
735 scilab_fill_dotmul(ScalarPolynomComplex, Double, M_M, Polynom, Double, Polynom);
736 scilab_fill_dotmul(ScalarPolynomComplex, DoubleComplex, M_M, Polynom, Double, Polynom);
738 //scalar poly + scalar double
739 scilab_fill_dotmul(ScalarPolynom, ScalarDouble, M_M, Polynom, Double, Polynom);
740 scilab_fill_dotmul(ScalarPolynom, ScalarDoubleComplex, M_M, Polynom, Double, Polynom);
741 scilab_fill_dotmul(ScalarPolynomComplex, ScalarDouble, M_M, Polynom, Double, Polynom);
742 scilab_fill_dotmul(ScalarPolynomComplex, ScalarDoubleComplex, M_M, Polynom, Double, Polynom);
745 scilab_fill_dotmul(ScalarPolynom, Empty, M_E, Polynom, Double, Double);
746 scilab_fill_dotmul(ScalarPolynomComplex, Empty, M_E, Polynom, Double, Double);
749 scilab_fill_dotmul(ScalarPolynom, Identity, M_M, Polynom, Double, Polynom);
750 scilab_fill_dotmul(ScalarPolynom, IdentityComplex, M_M, Polynom, Double, Polynom);
751 scilab_fill_dotmul(ScalarPolynomComplex, Identity, M_M, Polynom, Double, Polynom);
752 scilab_fill_dotmul(ScalarPolynomComplex, IdentityComplex, M_M, Polynom, Double, Polynom);
755 scilab_fill_dotmul(Sparse, Sparse, M_M, Sparse, Sparse, Sparse);
756 scilab_fill_dotmul(Sparse, SparseComplex, M_M, Sparse, Sparse, Sparse);
757 scilab_fill_dotmul(Sparse, Double, M_M, Sparse, Double, Sparse);
758 scilab_fill_dotmul(Sparse, DoubleComplex, M_M, Sparse, Double, Sparse);
759 scilab_fill_dotmul(Sparse, ScalarDouble, M_M, Sparse, Double, Sparse);
760 scilab_fill_dotmul(Sparse, ScalarDoubleComplex, M_M, Sparse, Double, Sparse);
762 scilab_fill_dotmul(Sparse, Empty, M_E, Sparse, Double, Double);
763 //scilab_fill_dotmul(Sparse, Identity, M_M, Sparse, Double, Sparse);
764 //scilab_fill_dotmul(Sparse, IdentityComplex, M_M, Sparse, Double, Sparse);
766 scilab_fill_dotmul(SparseComplex, Sparse, M_M, Sparse, Sparse, Sparse);
767 scilab_fill_dotmul(SparseComplex, SparseComplex, M_M, Sparse, Sparse, Sparse);
768 scilab_fill_dotmul(SparseComplex, Double, M_M, Sparse, Double, Sparse);
769 scilab_fill_dotmul(SparseComplex, DoubleComplex, M_M, Sparse, Double, Sparse);
770 scilab_fill_dotmul(SparseComplex, ScalarDouble, M_M, Sparse, Double, Sparse);
771 scilab_fill_dotmul(SparseComplex, ScalarDoubleComplex, M_M, Sparse, Double, Sparse);
773 scilab_fill_dotmul(SparseComplex, Empty, M_E, Sparse, Double, Double);
774 //scilab_fill_dotmul(SparseComplex, Identity, M_M, Sparse, Double, Sparse);
775 //scilab_fill_dotmul(SparseComplex, IdentityComplex, M_M, Sparse, Double, Sparse);
777 #undef scilab_fill_dotmul
780 InternalType *GenericDotTimes(InternalType *_pLeftOperand, InternalType *_pRightOperand)
782 InternalType *pResult = NULL;
784 dotmul_function dotmul = pDotMulfunction[_pLeftOperand->getId()][_pRightOperand->getId()];
787 pResult = dotmul(_pLeftOperand, _pRightOperand);
795 ** Default case : Return NULL will Call Overloading.
801 template<class T, class U, class O>
802 InternalType* dotmul_M_M(T *_pL, U *_pR)
805 int iDimsL = _pL->getDims();
806 int iDimsR = _pR->getDims();
808 if (iDimsL != iDimsR)
810 throw ast::InternalError(_W("Inconsistent row/column dimensions.\n"));
813 int* piDimsL = _pL->getDimsArray();
814 int* piDimsR = _pR->getDimsArray();
816 for (int i = 0 ; i < iDimsL ; ++i)
818 if (piDimsL[i] != piDimsR[i])
820 throw ast::InternalError(_W("Inconsistent row/column dimensions.\n"));
824 O* pOut = new O(iDimsL, piDimsL);
825 int iSize = pOut->getSize();
827 dotmul(_pL->get(), iSize, _pR->get(), pOut->get());
831 template<class T, class U, class O>
832 InternalType* dotmul_M_MC(T *_pL, U *_pR)
835 int iDimsL = _pL->getDims();
836 int iDimsR = _pR->getDims();
838 if (iDimsL != iDimsR)
840 throw ast::InternalError(_W("Inconsistent row/column dimensions.\n"));
843 int* piDimsL = _pL->getDimsArray();
844 int* piDimsR = _pR->getDimsArray();
846 for (int i = 0 ; i < iDimsL ; ++i)
848 if (piDimsL[i] != piDimsR[i])
850 throw ast::InternalError(_W("Inconsistent row/column dimensions.\n"));
854 O* pOut = new O(iDimsL, piDimsL, true);
855 int iSize = pOut->getSize();
857 dotmul(_pL->get(), iSize, _pR->get(), _pR->getImg(), pOut->get(), pOut->getImg());
861 template<class T, class U, class O>
862 InternalType* dotmul_M_S(T *_pL, U *_pR)
864 O* pOut = new O(_pL->getDims(), _pL->getDimsArray());
865 dotmul(_pL->get(), (size_t)pOut->getSize(), _pR->get(0), pOut->get());
869 template<class T, class U, class O>
870 InternalType* dotmul_M_SC(T *_pL, U *_pR)
872 O* pOut = new O(_pL->getDims(), _pL->getDimsArray(), true);
873 dotmul(_pL->get(), pOut->getSize(), _pR->get(0), _pR->getImg(0), pOut->get(), pOut->getImg());
877 template<class T, class U, class O>
878 InternalType* dotmul_M_I(T * /*_pL*/, U * /*_pR*/)
883 template<class T, class U, class O>
884 InternalType* dotmul_M_IC(T * /*_pL*/, U * /*_pR*/)
889 template<class T, class U, class O>
890 InternalType* dotmul_M_E(T * /*_pL*/, U *_pR)
895 //Matrix complex .* x
896 template<class T, class U, class O>
897 InternalType* dotmul_MC_M(T *_pL, U *_pR)
900 int iDimsL = _pL->getDims();
901 int iDimsR = _pR->getDims();
903 if (iDimsL != iDimsR)
905 throw ast::InternalError(_W("Inconsistent row/column dimensions.\n"));
908 int* piDimsL = _pL->getDimsArray();
909 int* piDimsR = _pR->getDimsArray();
911 for (int i = 0 ; i < iDimsL ; ++i)
913 if (piDimsL[i] != piDimsR[i])
915 throw ast::InternalError(_W("Inconsistent row/column dimensions.\n"));
919 O* pOut = new O(iDimsL, piDimsL, true);
920 int iSize = pOut->getSize();
922 dotmul(_pL->get(), _pL->getImg(), iSize, _pR->get(), pOut->get(), pOut->getImg());
926 template<class T, class U, class O>
927 InternalType* dotmul_MC_MC(T *_pL, U *_pR)
930 int iDimsL = _pL->getDims();
931 int iDimsR = _pR->getDims();
933 if (iDimsL != iDimsR)
935 throw ast::InternalError(_W("Inconsistent row/column dimensions.\n"));
938 int* piDimsL = _pL->getDimsArray();
939 int* piDimsR = _pR->getDimsArray();
941 for (int i = 0 ; i < iDimsL ; ++i)
943 if (piDimsL[i] != piDimsR[i])
945 throw ast::InternalError(_W("Inconsistent row/column dimensions.\n"));
949 O* pOut = new O(iDimsL, piDimsL, true);
950 int iSize = pOut->getSize();
952 dotmul(_pL->get(), _pL->getImg(), iSize, _pR->get(), _pR->getImg(), pOut->get(), pOut->getImg());
956 template<class T, class U, class O>
957 InternalType* dotmul_MC_S(T *_pL, U *_pR)
959 O* pOut = new O(_pL->getDims(), _pL->getDimsArray(), true);
960 dotmul(_pL->get(), _pL->getImg(), pOut->getSize(), _pR->get(0), pOut->get(), pOut->getImg());
964 template<class T, class U, class O>
965 InternalType* dotmul_MC_SC(T *_pL, U *_pR)
967 O* pOut = new O(_pL->getDims(), _pL->getDimsArray(), true);
968 dotmul(_pL->get(), _pL->getImg(), pOut->getSize(), _pR->get(0), _pR->getImg(0), pOut->get(), pOut->getImg());
972 template<class T, class U, class O>
973 InternalType* dotmul_MC_I(T * /*_pL*/, U * /*_pR*/)
978 template<class T, class U, class O>
979 InternalType* dotmul_MC_IC(T * /*_pL*/, U * /*_pR*/)
985 template<class T, class U, class O>
986 InternalType* dotmul_S_M(T *_pL, U *_pR)
988 return dotmul_M_S<U, T, O>(_pR, _pL);
991 template<class T, class U, class O>
992 InternalType* dotmul_S_MC(T *_pL, U *_pR)
994 return dotmul_MC_S<U, T, O>(_pR, _pL);
997 template<class T, class U, class O>
998 InternalType* dotmul_S_S(T *_pL, U *_pR)
1001 dotmul(_pL->get(0), _pR->get(0), pOut->get());
1005 template<class T, class U, class O>
1006 InternalType* dotmul_S_SC(T *_pL, U *_pR)
1008 O* pOut = new O(0.0, 0.0);
1009 dotmul(_pL->get(), 1, _pR->get(0), _pR->getImg(0), pOut->get(), pOut->getImg());
1013 template<class T, class U, class O>
1014 InternalType* dotmul_S_I(T *_pL, U *_pR)
1016 O* pOut = (O*)_pR->clone();
1017 dotmul(_pL->get(0), _pR->get(0), pOut->get());
1021 template<class T, class U, class O>
1022 InternalType* dotmul_S_IC(T *_pL, U *_pR)
1024 O* pOut = (O*)_pR->clone();
1025 dotmul(_pL->get(0), 1, _pR->get(0), _pR->getImg(0), pOut->get(), pOut->getImg());
1029 //Scalar complex .* x
1030 template<class T, class U, class O>
1031 InternalType* dotmul_SC_M(T *_pL, U *_pR)
1033 return dotmul_M_SC<U, T, O>(_pR, _pL);
1036 template<class T, class U, class O>
1037 InternalType* dotmul_SC_MC(T *_pL, U *_pR)
1039 return dotmul_MC_SC<U, T, O>(_pR, _pL);
1042 template<class T, class U, class O>
1043 InternalType* dotmul_SC_S(T *_pL, U *_pR)
1045 return dotmul_S_SC<U, T, O>(_pR, _pL);
1048 template<class T, class U, class O>
1049 InternalType* dotmul_SC_SC(T *_pL, U *_pR)
1051 O* pOut = new O(0.0, 0.0);
1052 dotmul(_pL->get(0), _pL->getImg(0), 1, _pR->get(0), _pR->getImg(0), pOut->get(), pOut->getImg());
1056 template<class T, class U, class O>
1057 InternalType* dotmul_SC_I(T *_pL, U *_pR)
1059 O* pOut = (O*)_pR->clone();
1060 pOut->setComplex(true);
1061 dotmul(_pL->get(0), _pL->getImg(0), 1, _pR->get(0), pOut->get(), pOut->getImg());
1065 template<class T, class U, class O>
1066 InternalType* dotmul_SC_IC(T *_pL, U *_pR)
1068 O* pOut = (O*)_pR->clone();
1069 dotmul(_pL->get(0), _pL->getImg(0), 1, _pR->get(0), _pR->getImg(0), pOut->get(), pOut->getImg());
1074 template<class T, class U, class O>
1075 InternalType* dotmul_I_M(T * /*_pL*/, U * /*_pR*/)
1080 template<class T, class U, class O>
1081 InternalType* dotmul_I_MC(T * /*_pL*/, U * /*_pR*/)
1086 template<class T, class U, class O>
1087 InternalType* dotmul_I_S(T *_pL, U *_pR)
1089 return dotmul_S_I<U, T, O>(_pR, _pL);
1092 template<class T, class U, class O>
1093 InternalType* dotmul_I_SC(T *_pL, U *_pR)
1095 return dotmul_SC_I<U, T, O>(_pR, _pL);
1098 template<class T, class U, class O>
1099 InternalType* dotmul_I_I(T *_pL, U *_pR)
1101 O* pOut = (O*)_pL->clone();
1102 dotmul(_pL->get(0), _pR->get(0), pOut->get());
1106 template<class T, class U, class O>
1107 InternalType* dotmul_I_IC(T *_pL, U *_pR)
1109 O* pOut = (O*)_pR->clone();
1110 dotmul(_pL->get(0), 1, _pR->get(0), _pR->getImg(0), pOut->get(), pOut->getImg());
1114 //Identity complex .* x
1115 template<class T, class U, class O>
1116 InternalType* dotmul_IC_M(T * /*_pL*/, U * /*_pR*/)
1121 template<class T, class U, class O>
1122 InternalType* dotmul_IC_MC(T * /*_pL*/, U * /*_pR*/)
1127 template<class T, class U, class O>
1128 InternalType* dotmul_IC_S(T *_pL, U *_pR)
1130 return dotmul_S_IC<U, T, O>(_pR, _pL);
1133 template<class T, class U, class O>
1134 InternalType* dotmul_IC_SC(T *_pL, U *_pR)
1136 return dotmul_SC_IC<U, T, O>(_pR, _pL);
1139 template<class T, class U, class O>
1140 InternalType* dotmul_IC_I(T *_pL, U *_pR)
1142 O* pOut = (O*)_pL->clone();
1143 dotmul(_pL->get(0), _pL->getImg(0), 1, _pR->get(0), pOut->get(), pOut->getImg());
1147 template<class T, class U, class O>
1148 InternalType* dotmul_IC_IC(T *_pL, U *_pR)
1150 O* pOut = (O*)_pL->clone();
1151 dotmul(_pL->get(0), _pL->getImg(0), 1, _pR->get(0), _pR->getImg(0), pOut->get(), pOut->getImg());
1156 template<class T, class U, class O>
1157 InternalType* dotmul_E_M(T *_pL, U * /*_pR*/)
1163 InternalType* dotmul_M_M<Sparse, Sparse, Sparse>(Sparse* _pL, Sparse* _pR)
1166 if (_pL->isScalar())
1168 Sparse* pOut = NULL;
1169 std::complex<double> c(_pL->getImg(0, 0));
1173 pL = new Double(c.real(), c.imag());
1177 pL = new Double(c.real());
1179 pOut = (Sparse*)dotmul_M_M<Double, Sparse, Sparse>(pL, _pR);
1184 if (_pR->isScalar())
1186 Sparse* pOut = NULL;
1187 std::complex<double> c(_pR->getImg(0, 0));
1191 pR = new Double(c.real(), c.imag());
1195 pR = new Double(c.real());
1197 pOut = (Sparse*)dotmul_M_M<Sparse, Double, Sparse>(_pL, pR);
1203 if (_pL->getRows() != _pR->getRows() || _pL->getCols() != _pR->getCols())
1205 throw ast::InternalError(_W("Inconsistent row/column dimensions.\n"));
1208 return _pL->dotMultiply(*_pR);
1213 InternalType* dotmul_M_M<Double, Sparse, Double>(Double* _pL, Sparse* /*_pR*/)
1220 InternalType* dotmul_M_M<Sparse, Double, Double>(Sparse* /*_pL*/, Double* _pR)
1226 InternalType* dotmul_M_M<Double, Sparse, Sparse>(Double* _pL, Sparse* _pR)
1229 if (_pL->isScalar())
1232 if (_pL->isComplex())
1234 std::complex<double> dbl(_pL->get(0), _pL->getImg(0));
1235 return _pR->multiply(dbl);
1239 return _pR->multiply(_pL->get(0));
1243 if (_pR->isScalar())
1248 if (_pR->isComplex())
1250 std::complex<double> dbl(_pR->getImg(0, 0));
1251 pD = new Double(dbl.real(), dbl.imag());
1255 pD = new Double(_pR->get(0, 0));
1258 InternalType* pIT = GenericDotTimes(_pL, pD);
1265 if (_pL->getDims() != 2 || _pL->getRows() != _pR->getRows() || _pL->getCols() != _pR->getCols())
1267 throw ast::InternalError(_W("Inconsistent row/column dimensions.\n"));
1270 //get some information
1271 int iNonZeros = static_cast<int>(_pR->nonZeros());
1272 int* pRows = new int[iNonZeros * 2];
1273 _pR->outputRowCol(pRows);
1274 int* pCols = pRows + iNonZeros;
1275 double* pValR = new double[iNonZeros];
1276 double* pValI = new double[iNonZeros];
1277 _pR->outputValues(pValR, pValI);
1278 double* pdblR = _pL->get();
1279 int iRows = _pL->getRows();
1281 Sparse* pOut = new Sparse(_pL->getRows(), _pL->getCols(), _pL->isComplex() || _pR->isComplex());
1283 if (_pL->isComplex() == false)
1285 if (_pR->isComplex() == false)
1287 for (int i = 0 ; i < iNonZeros ; i++)
1289 int iRow = static_cast<int>(pRows[i]) - 1;
1290 int iCol = static_cast<int>(pCols[i]) - 1;
1291 int index = iCol * iRows + iRow;
1293 pOut->set(iRow, iCol, pdblR[index] * pValR[i]);
1298 for (int i = 0 ; i < iNonZeros ; i++)
1300 int iRow = static_cast<int>(pRows[i]) - 1;
1301 int iCol = static_cast<int>(pCols[i]) - 1;
1302 int index = iCol * iRows + iRow;
1304 std::complex<double> c;
1305 c.real(pdblR[index] * pValR[i]);
1306 c.imag(pdblR[index] * pValI[i]);
1307 pOut->set(iRow, iCol, c);
1313 double* pdblI = _pL->getImg();
1314 if (_pR->isComplex() == false)
1316 for (int i = 0 ; i < iNonZeros ; i++)
1318 int iRow = static_cast<int>(pRows[i]) - 1;
1319 int iCol = static_cast<int>(pCols[i]) - 1;
1320 int index = iCol * iRows + iRow;
1322 std::complex<double> c;
1323 c.real(pdblR[index] * pValR[i]);
1324 c.imag(pdblI[index] * pValR[i]);
1325 pOut->set(iRow, iCol, c);
1330 for (int i = 0 ; i < iNonZeros ; i++)
1332 int iRow = static_cast<int>(pRows[i]) - 1;
1333 int iCol = static_cast<int>(pCols[i]) - 1;
1334 int index = iCol * iRows + iRow;
1336 std::complex<double> c;
1337 c.real(pdblR[index] * pValR[i] - pdblI[index] * pValI[i]);
1338 c.imag(pdblR[index] * pValI[i] + pdblI[index] * pValR[i]);
1339 pOut->set(iRow, iCol, c);
1352 InternalType* dotmul_M_M<Sparse, Double, Sparse>(Sparse* _pL, Double* _pR)
1354 return dotmul_M_M<Double, Sparse, Sparse>(_pR, _pL);
1359 InternalType* dotmul_M_M<Polynom, Polynom, Polynom>(Polynom* _pL, Polynom* _pR)
1362 if (_pL->getVariableName() != _pR->getVariableName())
1368 int iDimsL = _pL->getDims();
1369 int iDimsR = _pR->getDims();
1370 int* piDimsL = _pL->getDimsArray();
1371 int* piDimsR = _pR->getDimsArray();
1373 if (_pL->isScalar())
1375 Polynom* pOut = new Polynom(_pL->getVariableName(), iDimsR, piDimsR);
1376 int iSize = pOut->getSize();
1377 SinglePoly** pSPOut = pOut->get();
1378 SinglePoly* pSPL = _pL->get(0);
1379 SinglePoly** pSPR = _pR->get();
1381 for (int i = 0 ; i < iSize ; ++i)
1383 pSPOut[i] = *pSPL **pSPR[i];
1389 if (_pR->isScalar())
1391 Polynom* pOut = new Polynom(_pL->getVariableName(), iDimsL, piDimsL);
1392 int iSize = pOut->getSize();
1393 SinglePoly** pSPOut = pOut->get();
1394 SinglePoly** pSPL = _pL->get();
1395 SinglePoly* pSPR = _pR->get(0);
1397 for (int i = 0 ; i < iSize ; ++i)
1399 pSPOut[i] = *pSPL[i] **pSPR;
1406 if (iDimsL != iDimsR)
1408 throw ast::InternalError(_W("Inconsistent row/column dimensions.\n"));
1411 for (int i = 0 ; i < iDimsL ; ++i)
1413 if (piDimsL[i] != piDimsR[i])
1415 throw ast::InternalError(_W("Inconsistent row/column dimensions.\n"));
1419 Polynom* pOut = new Polynom(_pL->getVariableName(), iDimsL, piDimsR);
1420 int iSize = pOut->getSize();
1421 SinglePoly** pSPOut = pOut->get();
1422 SinglePoly** pSPL = _pL->get();
1423 SinglePoly** pSPR = _pR->get();
1425 for (int i = 0 ; i < iSize ; ++i)
1427 pSPOut[i] = *pSPL[i] **pSPR[i];
1434 InternalType* dotmul_M_M<Polynom, Double, Polynom>(Polynom* _pL, Double* _pR)
1436 return dotmul_M_M<Double, Polynom, Polynom>(_pR, _pL);
1440 InternalType* dotmul_M_M<Double, Polynom, Polynom>(Double* _pL, Polynom* _pR)
1442 Polynom* pOut = NULL;
1444 bool isComplexL = _pL->isComplex();
1445 bool isComplexR = _pR->isComplex();
1446 bool isComplexOut = isComplexL || isComplexR;
1448 if (_pL->isScalar())
1450 pOut = (Polynom*)_pR->clone();
1451 SinglePoly** pSPR = _pR->get();
1452 SinglePoly** pSP = pOut->get();
1453 int iSize = pOut->getSize();
1455 double dblR = _pL->get(0);
1458 double dblI = _pL->getImg(0);
1459 pOut->setComplex(true);
1462 for (int i = 0 ; i < iSize ; i++)
1464 dotmul(pSPR[i]->get(), pSPR[i]->getImg(), (size_t)pSPR[i]->getSize(), dblR, dblI, pSP[i]->get(), pSP[i]->getImg());
1469 for (int i = 0 ; i < iSize ; i++)
1471 dotmul(pSP[i]->get(), (size_t)pSP[i]->getSize(), dblR, dblI, pSP[i]->get(), pSP[i]->getImg());
1479 for (int i = 0 ; i < iSize ; i++)
1481 dotmul(pSP[i]->get(), pSP[i]->getImg(), (size_t)pSP[i]->getSize(), dblR, pSP[i]->get(), pSP[i]->getImg());
1487 for (int i = 0 ; i < iSize ; i++)
1489 dotmul(pSP[i]->get(), (size_t)pSP[i]->getSize(), dblR, pSP[i]->get());
1497 if (_pR->isScalar())
1499 pOut = new Polynom(_pR->getVariableName(), _pL->getDims(), _pL->getDimsArray());
1500 SinglePoly* pSPL = _pR->get(0);
1501 SinglePoly** pSP = pOut->get();
1502 int iSize = pOut->getSize();
1503 double* pdblLR = _pL->get();
1504 double* pdblLI = NULL;
1507 pdblLI = _pL->getImg();
1510 double* pdblRR = pSPL->get();
1511 double* pdblRI = NULL;
1514 pdblRI = pSPL->getImg();
1521 for (int i = 0 ; i < iSize ; ++i)
1523 SinglePoly* pSPOut = (SinglePoly*)pSPL->clone();
1524 int iSPSize = pSPOut->getSize();
1525 pSPOut->setComplex(isComplexOut);
1527 double* pdblOutR = pSPOut->get();
1528 double* pdblOutI = pSPOut->getImg();
1530 dotmul(pdblRR, pdblRI, (size_t)iSPSize, pdblLR[i], pdblLI[i], pdblOutR, pdblOutI);
1536 for (int i = 0 ; i < iSize ; ++i)
1538 SinglePoly* pSPOut = (SinglePoly*)pSPL->clone();
1539 int iSPSize = pSPOut->getSize();
1540 pSPOut->setComplex(isComplexOut);
1542 double* pdblOutR = pSPOut->get();
1543 double* pdblOutI = pSPOut->getImg();
1544 dotmul(pdblRR, (size_t)iSPSize, pdblLR[i], pdblLI[i], pdblOutR, pdblOutI);
1553 for (int i = 0 ; i < iSize ; ++i)
1555 SinglePoly* pSPOut = (SinglePoly*)pSPL->clone();
1556 int iSPSize = pSPOut->getSize();
1557 pSPOut->setComplex(isComplexOut);
1559 double* pdblOutR = pSPOut->get();
1560 double* pdblOutI = pSPOut->getImg();
1561 dotmul(pdblRR, pdblRI, (size_t)iSPSize, pdblLR[i], pdblOutR, pdblOutI);
1567 for (int i = 0 ; i < iSize ; ++i)
1569 SinglePoly* pSPOut = (SinglePoly*)pSPL->clone();
1570 int iSPSize = pSPOut->getSize();
1571 pSPOut->setComplex(isComplexOut);
1573 double* pdblOutR = pSPOut->get();
1574 dotmul(pdblRR, (size_t)iSPSize, pdblLR[i], pdblOutR);
1585 int iDimsL = _pL->getDims();
1586 int iDimsR = _pR->getDims();
1588 if (iDimsL != iDimsR)
1590 throw ast::InternalError(_W("Inconsistent row/column dimensions.\n"));
1593 int* piDimsL = _pL->getDimsArray();
1594 int* piDimsR = _pR->getDimsArray();
1596 for (int i = 0 ; i < iDimsL ; ++i)
1598 if (piDimsL[i] != piDimsR[i])
1600 throw ast::InternalError(_W("Inconsistent row/column dimensions.\n"));
1605 pOut = (Polynom*)_pR->clone();
1606 pOut->setComplex(isComplexOut);
1607 SinglePoly** pSPR = _pR->get();
1608 SinglePoly** pSP = pOut->get();
1609 int iSize = pOut->getSize();
1611 double* pdblR = _pL->get();
1612 double* pdblI = NULL;
1615 pdblI = _pL->getImg();
1622 for (int i = 0 ; i < iSize ; i++)
1624 dotmul(pSPR[i]->get(), pSPR[i]->getImg(), (size_t)pSPR[i]->getSize(), pdblR[i], pdblI[i], pSP[i]->get(), pSP[i]->getImg());
1629 for (int i = 0 ; i < iSize ; i++)
1631 dotmul(pSPR[i]->get(), (size_t)pSPR[i]->getSize(), pdblR[i], pdblI[i], pSP[i]->get(), pSP[i]->getImg());
1639 for (int i = 0 ; i < iSize ; i++)
1641 dotmul(pSPR[i]->get(), pSPR[i]->getImg(), (size_t)pSPR[i]->getSize(), pdblR[i], pSP[i]->get(), pSP[i]->getImg());
1647 for (int i = 0 ; i < iSize ; i++)
1649 dotmul(pSPR[i]->get(), (size_t)pSPR[i]->getSize(), pdblR[i], pSP[i]->get());