Blas_3.cxx
1 // Copyright (C) 2001-2009 Vivien Mallet
2 //
3 // This file is part of the linear-algebra library Seldon,
4 // http://seldon.sourceforge.net/.
5 //
6 // Seldon is free software; you can redistribute it and/or modify it under the
7 // terms of the GNU Lesser General Public License as published by the Free
8 // Software Foundation; either version 2.1 of the License, or (at your option)
9 // any later version.
10 //
11 // Seldon is distributed in the hope that it will be useful, but WITHOUT ANY
12 // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
14 // more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public License
17 // along with Seldon. If not, see http://www.gnu.org/licenses/.
18 
19 
20 #ifndef SELDON_FILE_BLAS_3_CXX
21 
22 
23 #include "Blas_3.hxx"
24 
25 
26 namespace Seldon
27 {
28 
29 
31  // MltAdd //
32 
33 
34  /*** ColMajor and NoTrans ***/
35 
36 
37  template <class Prop0, class Allocator0,
38  class Prop1, class Allocator1,
39  class Prop2, class Allocator2>
40  void MltAddMatrix(const float& alpha,
41  const Matrix<float, Prop0, ColMajor, Allocator0>& A,
42  const Matrix<float, Prop1, ColMajor, Allocator1>& B,
43  const float& beta,
44  Matrix<float, Prop2, ColMajor, Allocator2>& C)
45  {
46 
47 #ifdef SELDON_CHECK_DIMENSIONS
48  CheckDim(A, B, C, "MltAdd(alpha, A, B, beta, C)");
49 #endif
50 
51  cblas_sgemm(CblasColMajor, CblasNoTrans, CblasNoTrans,
52  C.GetM(), C.GetN(), A.GetN(),
53  alpha, A.GetData(), A.GetLD(), B.GetData(), B.GetLD(),
54  beta, C.GetData(), C.GetLD());
55  }
56 
57 
58  template <class Prop0, class Allocator0,
59  class Prop1, class Allocator1,
60  class Prop2, class Allocator2>
61  void MltAddMatrix(const double& alpha,
62  const Matrix<double, Prop0, ColMajor, Allocator0>& A,
63  const Matrix<double, Prop1, ColMajor, Allocator1>& B,
64  const double& beta,
65  Matrix<double, Prop2, ColMajor, Allocator2>& C)
66  {
67 
68 #ifdef SELDON_CHECK_DIMENSIONS
69  CheckDim(A, B, C, "MltAdd(alpha, A, B, beta, C)");
70 #endif
71 
72  cblas_dgemm(CblasColMajor, CblasNoTrans, CblasNoTrans,
73  C.GetM(), C.GetN(), A.GetN(),
74  alpha, A.GetData(), A.GetLD(), B.GetData(), B.GetLD(),
75  beta, C.GetData(), C.GetLD());
76  }
77 
78 
79  template <class Prop0, class Allocator0,
80  class Prop1, class Allocator1,
81  class Prop2, class Allocator2>
82  void MltAddMatrix(const complex<float>& alpha,
83  const Matrix<complex<float>, Prop0, ColMajor, Allocator0>& A,
84  const Matrix<complex<float>, Prop1, ColMajor, Allocator1>& B,
85  const complex<float>& beta,
86  Matrix<complex<float>, Prop2, ColMajor, Allocator2>& C)
87  {
88 
89 #ifdef SELDON_CHECK_DIMENSIONS
90  CheckDim(A, B, C, "MltAdd(alpha, A, B, beta, C)");
91 #endif
92 
93  cblas_cgemm(CblasColMajor, CblasNoTrans, CblasNoTrans,
94  C.GetM(), C.GetN(), A.GetN(),
95  reinterpret_cast<const void*>(&alpha),
96  reinterpret_cast<const void*>(A.GetData()), A.GetLD(),
97  reinterpret_cast<const void*>(B.GetData()), B.GetLD(),
98  reinterpret_cast<const void*>(&beta),
99  reinterpret_cast<void*>(C.GetData()), C.GetLD());
100  }
101 
102 
103  template <class Prop0, class Allocator0,
104  class Prop1, class Allocator1,
105  class Prop2, class Allocator2>
106  void MltAddMatrix(const complex<double>& alpha,
107  const Matrix<complex<double>, Prop0, ColMajor, Allocator0>& A,
108  const Matrix<complex<double>, Prop1, ColMajor, Allocator1>& B,
109  const complex<double>& beta,
110  Matrix<complex<double>, Prop2, ColMajor, Allocator2>& C)
111  {
112 
113 #ifdef SELDON_CHECK_DIMENSIONS
114  CheckDim(A, B, C, "MltAdd(alpha, A, B, beta, C)");
115 #endif
116 
117  cblas_zgemm(CblasColMajor, CblasNoTrans, CblasNoTrans,
118  C.GetM(), C.GetN(), A.GetN(),
119  reinterpret_cast<const void*>(&alpha),
120  reinterpret_cast<const void*>(A.GetData()), A.GetLD(),
121  reinterpret_cast<const void*>(B.GetData()), B.GetLD(),
122  reinterpret_cast<const void*>(&beta),
123  reinterpret_cast<void*>(C.GetData()), C.GetLD());
124  }
125 
126 
127  /*** ColMajor and TransA, TransB ***/
128 
129 
130  template <class Prop0, class Allocator0,
131  class Prop1, class Allocator1,
132  class Prop2, class Allocator2>
133  void MltAddMatrix(const float& alpha,
134  const SeldonTranspose& TransA,
135  const Matrix<float, Prop0, ColMajor, Allocator0>& A,
136  const SeldonTranspose& TransB,
137  const Matrix<float, Prop1, ColMajor, Allocator1>& B,
138  const float& beta,
139  Matrix<float, Prop2, ColMajor, Allocator2>& C)
140  {
141 
142 #ifdef SELDON_CHECK_DIMENSIONS
143  CheckDim(TransA, A, TransB, B, C,
144  "MltAdd(alpha, TransA, A, TransB, B, beta, C)");
145 #endif
146 
147  cblas_sgemm(CblasColMajor, TransA.Cblas(), TransB.Cblas(), C.GetM(), C.GetN(),
148  A.GetN(TransA), alpha, A.GetData(), A.GetLD(),
149  B.GetData(), B.GetLD(), beta, C.GetData(), C.GetLD());
150  }
151 
152 
153  template <class Prop0, class Allocator0,
154  class Prop1, class Allocator1,
155  class Prop2, class Allocator2>
156  void MltAddMatrix(const double& alpha,
157  const SeldonTranspose& TransA,
158  const Matrix<double, Prop0, ColMajor, Allocator0>& A,
159  const SeldonTranspose& TransB,
160  const Matrix<double, Prop1, ColMajor, Allocator1>& B,
161  const double& beta,
162  Matrix<double, Prop2, ColMajor, Allocator2>& C)
163  {
164 
165 #ifdef SELDON_CHECK_DIMENSIONS
166  CheckDim(TransA, A, TransB, B, C,
167  "MltAdd(alpha, TransA, A, TransB, B, beta, C)");
168 #endif
169 
170  cblas_dgemm(CblasColMajor, TransA.Cblas(), TransB.Cblas(), C.GetM(), C.GetN(),
171  A.GetN(TransA), alpha, A.GetData(), A.GetLD(),
172  B.GetData(), B.GetLD(), beta, C.GetData(), C.GetLD());
173  }
174 
175 
176  template <class Prop0, class Allocator0,
177  class Prop1, class Allocator1,
178  class Prop2, class Allocator2>
179  void MltAddMatrix(const complex<float>& alpha,
180  const SeldonTranspose& TransA,
181  const Matrix<complex<float>, Prop0, ColMajor, Allocator0>& A,
182  const SeldonTranspose& TransB,
183  const Matrix<complex<float>, Prop1, ColMajor, Allocator1>& B,
184  const complex<float>& beta,
185  Matrix<complex<float>, Prop2, ColMajor, Allocator2>& C)
186  {
187 
188 #ifdef SELDON_CHECK_DIMENSIONS
189  CheckDim(TransA, A, TransB, B, C,
190  "MltAdd(alpha, TransA, A, TransB, B, beta, C)");
191 #endif
192 
193  cblas_cgemm(CblasColMajor, TransA.Cblas(), TransB.Cblas(), C.GetM(), C.GetN(),
194  A.GetN(TransA), reinterpret_cast<const void*>(&alpha),
195  reinterpret_cast<const void*>(A.GetData()), A.GetLD(),
196  reinterpret_cast<const void*>(B.GetData()), B.GetLD(),
197  reinterpret_cast<const void*>(&beta),
198  reinterpret_cast<void*>(C.GetData()), C.GetLD());
199  }
200 
201 
202  template <class Prop0, class Allocator0,
203  class Prop1, class Allocator1,
204  class Prop2, class Allocator2>
205  void MltAddMatrix(const complex<double>& alpha,
206  const SeldonTranspose& TransA,
207  const Matrix<complex<double>, Prop0, ColMajor, Allocator0>& A,
208  const SeldonTranspose& TransB,
209  const Matrix<complex<double>, Prop1, ColMajor, Allocator1>& B,
210  const complex<double>& beta,
211  Matrix<complex<double>, Prop2, ColMajor, Allocator2>& C)
212  {
213 
214 #ifdef SELDON_CHECK_DIMENSIONS
215  CheckDim(TransA, A, TransB, B, C,
216  "MltAdd(alpha, TransA, A, TransB, B, beta, C)");
217 #endif
218 
219  cblas_zgemm(CblasColMajor, TransA.Cblas(), TransB.Cblas(), C.GetM(), C.GetN(),
220  A.GetN(TransA), reinterpret_cast<const void*>(&alpha),
221  reinterpret_cast<const void*>(A.GetData()), A.GetLD(),
222  reinterpret_cast<const void*>(B.GetData()), B.GetLD(),
223  reinterpret_cast<const void*>(&beta),
224  reinterpret_cast<void*>(C.GetData()), C.GetLD());
225  }
226 
227 
228  /*** RowMajor and NoTrans ***/
229 
230 
231  template <class Prop0, class Allocator0,
232  class Prop1, class Allocator1,
233  class Prop2, class Allocator2>
234  void MltAddMatrix(const float& alpha,
235  const Matrix<float, Prop0, RowMajor, Allocator0>& A,
236  const Matrix<float, Prop1, RowMajor, Allocator1>& B,
237  const float& beta,
238  Matrix<float, Prop2, RowMajor, Allocator2>& C)
239  {
240 
241 #ifdef SELDON_CHECK_DIMENSIONS
242  CheckDim(A, B, C, "MltAdd(alpha, A, B, beta, C)");
243 #endif
244 
245  cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans,
246  C.GetM(), C.GetN(), A.GetN(),
247  alpha, A.GetData(), A.GetLD(), B.GetData(), B.GetLD(),
248  beta, C.GetData(), C.GetLD());
249  }
250 
251 
252  template <class Prop0, class Allocator0,
253  class Prop1, class Allocator1,
254  class Prop2, class Allocator2>
255  void MltAddMatrix(const double& alpha,
256  const Matrix<double, Prop0, RowMajor, Allocator0>& A,
257  const Matrix<double, Prop1, RowMajor, Allocator1>& B,
258  const double& beta,
259  Matrix<double, Prop2, RowMajor, Allocator2>& C)
260  {
261 
262 #ifdef SELDON_CHECK_DIMENSIONS
263  CheckDim(A, B, C, "MltAdd(alpha, A, B, beta, C)");
264 #endif
265 
266  cblas_dgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans,
267  C.GetM(), C.GetN(), A.GetN(),
268  alpha, A.GetData(), A.GetLD(), B.GetData(), B.GetLD(),
269  beta, C.GetData(), C.GetLD());
270  }
271 
272 
273  template <class Prop0, class Allocator0,
274  class Prop1, class Allocator1,
275  class Prop2, class Allocator2>
276  void MltAddMatrix(const complex<float>& alpha,
277  const Matrix<complex<float>, Prop0, RowMajor, Allocator0>& A,
278  const Matrix<complex<float>, Prop1, RowMajor, Allocator1>& B,
279  const complex<float>& beta,
280  Matrix<complex<float>, Prop2, RowMajor, Allocator2>& C)
281  {
282 
283 #ifdef SELDON_CHECK_DIMENSIONS
284  CheckDim(A, B, C, "MltAdd(alpha, A, B, beta, C)");
285 #endif
286 
287  cblas_cgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans,
288  C.GetM(), C.GetN(), A.GetN(),
289  reinterpret_cast<const void*>(&alpha),
290  reinterpret_cast<const void*>(A.GetData()), A.GetLD(),
291  reinterpret_cast<const void*>(B.GetData()), B.GetLD(),
292  reinterpret_cast<const void*>(&beta),
293  reinterpret_cast<void*>(C.GetData()), C.GetLD());
294  }
295 
296 
297  template <class Prop0, class Allocator0,
298  class Prop1, class Allocator1,
299  class Prop2, class Allocator2>
300  void MltAddMatrix(const complex<double>& alpha,
301  const Matrix<complex<double>, Prop0, RowMajor, Allocator0>& A,
302  const Matrix<complex<double>, Prop1, RowMajor, Allocator1>& B,
303  const complex<double>& beta,
304  Matrix<complex<double>, Prop2, RowMajor, Allocator2>& C)
305  {
306 
307 #ifdef SELDON_CHECK_DIMENSIONS
308  CheckDim(A, B, C, "MltAdd(alpha, A, B, beta, C)");
309 #endif
310 
311  cblas_zgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans,
312  C.GetM(), C.GetN(), A.GetN(),
313  reinterpret_cast<const void*>(&alpha),
314  reinterpret_cast<const void*>(A.GetData()), A.GetLD(),
315  reinterpret_cast<const void*>(B.GetData()), B.GetLD(),
316  reinterpret_cast<const void*>(&beta),
317  reinterpret_cast<void*>(C.GetData()), C.GetLD());
318  }
319 
320 
321  /*** RowMajor and TransA, TransB ***/
322 
323 
324  template <class Prop0, class Allocator0,
325  class Prop1, class Allocator1,
326  class Prop2, class Allocator2>
327  void MltAddMatrix(const float& alpha,
328  const SeldonTranspose& TransA,
329  const Matrix<float, Prop0, RowMajor, Allocator0>& A,
330  const SeldonTranspose& TransB,
331  const Matrix<float, Prop1, RowMajor, Allocator1>& B,
332  const float& beta,
333  Matrix<float, Prop2, RowMajor, Allocator2>& C)
334  {
335 
336 #ifdef SELDON_CHECK_DIMENSIONS
337  CheckDim(TransA, A, TransB, B, C,
338  "MltAdd(alpha, TransA, A, TransB, B, beta, C)");
339 #endif
340 
341  cblas_sgemm(CblasRowMajor, TransA.Cblas(), TransB.Cblas(), C.GetM(), C.GetN(),
342  A.GetN(TransA), alpha, A.GetData(), A.GetLD(),
343  B.GetData(), B.GetLD(), beta, C.GetData(), C.GetLD());
344  }
345 
346 
347  template <class Prop0, class Allocator0,
348  class Prop1, class Allocator1,
349  class Prop2, class Allocator2>
350  void MltAddMatrix(const double& alpha,
351  const SeldonTranspose& TransA,
352  const Matrix<double, Prop0, RowMajor, Allocator0>& A,
353  const SeldonTranspose& TransB,
354  const Matrix<double, Prop1, RowMajor, Allocator1>& B,
355  const double& beta,
356  Matrix<double, Prop2, RowMajor, Allocator2>& C)
357  {
358 
359 #ifdef SELDON_CHECK_DIMENSIONS
360  CheckDim(TransA, A, TransB, B, C,
361  "MltAdd(alpha, TransA, A, TransB, B, beta, C)");
362 #endif
363 
364  cblas_dgemm(CblasRowMajor, TransA.Cblas(), TransB.Cblas(), C.GetM(), C.GetN(),
365  A.GetN(TransA), alpha, A.GetData(), A.GetLD(),
366  B.GetData(), B.GetLD(), beta, C.GetData(), C.GetLD());
367  }
368 
369 
370  template <class Prop0, class Allocator0,
371  class Prop1, class Allocator1,
372  class Prop2, class Allocator2>
373  void MltAddMatrix(const complex<float>& alpha,
374  const SeldonTranspose& TransA,
375  const Matrix<complex<float>, Prop0, RowMajor, Allocator0>& A,
376  const SeldonTranspose& TransB,
377  const Matrix<complex<float>, Prop1, RowMajor, Allocator1>& B,
378  const complex<float>& beta,
379  Matrix<complex<float>, Prop2, RowMajor, Allocator2>& C)
380  {
381 
382 #ifdef SELDON_CHECK_DIMENSIONS
383  CheckDim(TransA, A, TransB, B, C,
384  "MltAdd(alpha, TransA, A, TransB, B, beta, C)");
385 #endif
386 
387  cblas_cgemm(CblasRowMajor, TransA.Cblas(), TransB.Cblas(), C.GetM(), C.GetN(),
388  A.GetN(TransA), reinterpret_cast<const void*>(&alpha),
389  reinterpret_cast<const void*>(A.GetData()), A.GetLD(),
390  reinterpret_cast<const void*>(B.GetData()), B.GetLD(),
391  reinterpret_cast<const void*>(&beta),
392  reinterpret_cast<void*>(C.GetData()), C.GetLD());
393  }
394 
395 
396  template <class Prop0, class Allocator0,
397  class Prop1, class Allocator1,
398  class Prop2, class Allocator2>
399  void MltAddMatrix(const complex<double>& alpha,
400  const SeldonTranspose& TransA,
401  const Matrix<complex<double>, Prop0, RowMajor, Allocator0>& A,
402  const SeldonTranspose& TransB,
403  const Matrix<complex<double>, Prop1, RowMajor, Allocator1>& B,
404  const complex<double>& beta,
405  Matrix<complex<double>, Prop2, RowMajor, Allocator2>& C)
406  {
407 
408 #ifdef SELDON_CHECK_DIMENSIONS
409  CheckDim(TransA, A, TransB, B, C,
410  "MltAdd(alpha, TransA, A, TransB, B, beta, C)");
411 #endif
412 
413  cblas_zgemm(CblasRowMajor, TransA.Cblas(), TransB.Cblas(), C.GetM(), C.GetN(),
414  A.GetN(TransA), reinterpret_cast<const void*>(&alpha),
415  reinterpret_cast<const void*>(A.GetData()), A.GetLD(),
416  reinterpret_cast<const void*>(B.GetData()), B.GetLD(),
417  reinterpret_cast<const void*>(&beta),
418  reinterpret_cast<void*>(C.GetData()), C.GetLD());
419  }
420 
421 
422  // MltAdd //
424 
425 
426 
428  // MltAdd //
429 
430 
431  /*** ColSym and Upper ***/
432 
433 
434  template <class Prop0, class Allocator0,
435  class Prop1, class Allocator1,
436  class Prop2, class Allocator2>
437  void MltAdd(const SeldonSide& Side,
438  const float& alpha,
439  const Matrix<float, Prop0, ColSym, Allocator0>& A,
440  const Matrix<float, Prop1, ColMajor, Allocator1>& B,
441  const float& beta,
442  Matrix<float, Prop2, ColMajor, Allocator2>& C)
443  {
444 
445 #ifdef SELDON_CHECK_DIMENSIONS
446  CheckDim(Side, A, B, C, "MltAdd(side, alpha, A, B, beta, C)");
447 #endif
448 
449  cblas_ssymm(CblasColMajor, Side.Cblas(), CblasUpper,
450  C.GetM(), C.GetN(),
451  alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM(),
452  beta, C.GetData(), C.GetM());
453  }
454 
455 
456  template <class Prop0, class Allocator0,
457  class Prop1, class Allocator1,
458  class Prop2, class Allocator2>
459  void MltAdd(const SeldonSide& Side,
460  const double& alpha,
461  const Matrix<double, Prop0, ColSym, Allocator0>& A,
462  const Matrix<double, Prop1, ColMajor, Allocator1>& B,
463  const double& beta,
464  Matrix<double, Prop2, ColMajor, Allocator2>& C)
465  {
466 
467 #ifdef SELDON_CHECK_DIMENSIONS
468  CheckDim(Side, A, B, C, "MltAdd(side, alpha, A, B, beta, C)");
469 #endif
470 
471  cblas_dsymm(CblasColMajor, Side.Cblas(), CblasUpper,
472  C.GetM(), C.GetN(),
473  alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM(),
474  beta, C.GetData(), C.GetM());
475  }
476 
477 
478  template <class Prop0, class Allocator0,
479  class Prop1, class Allocator1,
480  class Prop2, class Allocator2>
481  void MltAdd(const SeldonSide& Side,
482  const complex<float>& alpha,
483  const Matrix<complex<float>, Prop0, ColSym, Allocator0>& A,
484  const Matrix<complex<float>, Prop1, ColMajor, Allocator1>& B,
485  const complex<float>& beta,
486  Matrix<complex<float>, Prop2, ColMajor, Allocator2>& C)
487  {
488 
489 #ifdef SELDON_CHECK_DIMENSIONS
490  CheckDim(Side, A, B, C, "MltAdd(side, alpha, A, B, beta, C)");
491 #endif
492 
493  cblas_csymm(CblasColMajor, Side.Cblas(), CblasUpper,
494  C.GetM(), C.GetN(),
495  reinterpret_cast<const void*>(&alpha),
496  reinterpret_cast<const void*>(A.GetData()), A.GetM(),
497  reinterpret_cast<const void*>(B.GetData()), B.GetM(),
498  reinterpret_cast<const void*>(&beta),
499  reinterpret_cast<void*>(C.GetData()), C.GetM());
500  }
501 
502 
503  template <class Prop0, class Allocator0,
504  class Prop1, class Allocator1,
505  class Prop2, class Allocator2>
506  void MltAdd(const SeldonSide& Side,
507  const complex<double>& alpha,
508  const Matrix<complex<double>, Prop0, ColSym, Allocator0>& A,
509  const Matrix<complex<double>, Prop1, ColMajor, Allocator1>& B,
510  const complex<double>& beta,
511  Matrix<complex<double>, Prop2, ColMajor, Allocator2>& C)
512  {
513 
514 #ifdef SELDON_CHECK_DIMENSIONS
515  CheckDim(Side, A, B, C, "MltAdd(side, alpha, A, B, beta, C)");
516 #endif
517 
518  cblas_zsymm(CblasColMajor, Side.Cblas(), CblasUpper,
519  C.GetM(), C.GetN(),
520  reinterpret_cast<const void*>(&alpha),
521  reinterpret_cast<const void*>(A.GetData()), A.GetM(),
522  reinterpret_cast<const void*>(B.GetData()), B.GetM(),
523  reinterpret_cast<const void*>(&beta),
524  reinterpret_cast<void*>(C.GetData()), C.GetM());
525  }
526 
527 
528  /*** ColSym and UpLo ***/
529 
530 
531  template <class Prop0, class Allocator0,
532  class Prop1, class Allocator1,
533  class Prop2, class Allocator2>
534  void MltAdd(const SeldonSide& Side,
535  const float& alpha,
536  const SeldonUplo& Uplo,
537  const Matrix<float, Prop0, ColSym, Allocator0>& A,
538  const Matrix<float, Prop1, ColMajor, Allocator1>& B,
539  const float& beta,
540  Matrix<float, Prop2, ColMajor, Allocator2>& C)
541  {
542 
543 #ifdef SELDON_CHECK_DIMENSIONS
544  CheckDim(Side, A, B, C, "MltAdd(side, alpha, uplo, A, B, beta, C)");
545 #endif
546 
547  cblas_ssymm(CblasColMajor, Side.Cblas(), Uplo.Cblas(),
548  C.GetM(), C.GetN(),
549  alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM(),
550  beta, C.GetData(), C.GetM());
551  }
552 
553 
554  template <class Prop0, class Allocator0,
555  class Prop1, class Allocator1,
556  class Prop2, class Allocator2>
557  void MltAdd(const SeldonSide& Side,
558  const double& alpha,
559  const SeldonUplo& Uplo,
560  const Matrix<double, Prop0, ColSym, Allocator0>& A,
561  const Matrix<double, Prop1, ColMajor, Allocator1>& B,
562  const double& beta,
563  Matrix<double, Prop2, ColMajor, Allocator2>& C)
564  {
565 
566 #ifdef SELDON_CHECK_DIMENSIONS
567  CheckDim(Side, A, B, C, "MltAdd(side, alpha, uplo, A, B, beta, C)");
568 #endif
569 
570  cblas_dsymm(CblasColMajor, Side.Cblas(), Uplo.Cblas(),
571  C.GetM(), C.GetN(),
572  alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM(),
573  beta, C.GetData(), C.GetM());
574  }
575 
576 
577  template <class Prop0, class Allocator0,
578  class Prop1, class Allocator1,
579  class Prop2, class Allocator2>
580  void MltAdd(const SeldonSide& Side,
581  const complex<float>& alpha,
582  const SeldonUplo& Uplo,
583  const Matrix<complex<float>, Prop0, ColSym, Allocator0>& A,
584  const Matrix<complex<float>, Prop1, ColMajor, Allocator1>& B,
585  const complex<float>& beta,
586  Matrix<complex<float>, Prop2, ColMajor, Allocator2>& C)
587  {
588 
589 #ifdef SELDON_CHECK_DIMENSIONS
590  CheckDim(Side, A, B, C, "MltAdd(side, alpha, uplo, A, B, beta, C)");
591 #endif
592 
593  cblas_csymm(CblasColMajor, Side.Cblas(), Uplo.Cblas(),
594  C.GetM(), C.GetN(),
595  reinterpret_cast<const void*>(&alpha),
596  reinterpret_cast<const void*>(A.GetData()), A.GetM(),
597  reinterpret_cast<const void*>(B.GetData()), B.GetM(),
598  reinterpret_cast<const void*>(&beta),
599  reinterpret_cast<void*>(C.GetData()), C.GetM());
600  }
601 
602 
603  template <class Prop0, class Allocator0,
604  class Prop1, class Allocator1,
605  class Prop2, class Allocator2>
606  void MltAdd(const SeldonSide& Side,
607  const complex<double>& alpha,
608  const SeldonUplo& Uplo,
609  const Matrix<complex<double>, Prop0, ColSym, Allocator0>& A,
610  const Matrix<complex<double>, Prop1, ColMajor, Allocator1>& B,
611  const complex<double>& beta,
612  Matrix<complex<double>, Prop2, ColMajor, Allocator2>& C)
613  {
614 
615 #ifdef SELDON_CHECK_DIMENSIONS
616  CheckDim(Side, A, B, C, "MltAdd(side, alpha, uplo, A, B, beta, C)");
617 #endif
618 
619  cblas_zsymm(CblasColMajor, Side.Cblas(), Uplo.Cblas(),
620  C.GetM(), C.GetN(),
621  reinterpret_cast<const void*>(&alpha),
622  reinterpret_cast<const void*>(A.GetData()), A.GetM(),
623  reinterpret_cast<const void*>(B.GetData()), B.GetM(),
624  reinterpret_cast<const void*>(&beta),
625  reinterpret_cast<void*>(C.GetData()), C.GetM());
626  }
627 
628 
629  /*** RowSym and Upper ***/
630 
631 
632  template <class Prop0, class Allocator0,
633  class Prop1, class Allocator1,
634  class Prop2, class Allocator2>
635  void MltAdd(const SeldonSide& Side,
636  const float& alpha,
637  const Matrix<float, Prop0, RowSym, Allocator0>& A,
638  const Matrix<float, Prop1, RowMajor, Allocator1>& B,
639  const float& beta,
640  Matrix<float, Prop2, RowMajor, Allocator2>& C)
641  {
642 
643 #ifdef SELDON_CHECK_DIMENSIONS
644  CheckDim(Side, A, B, C, "MltAdd(side, alpha, A, B, beta, C)");
645 #endif
646 
647  cblas_ssymm(CblasRowMajor, Side.Cblas(), CblasUpper,
648  C.GetM(), C.GetN(),
649  alpha, A.GetData(), A.GetM(), B.GetData(), B.GetN(),
650  beta, C.GetData(), C.GetN());
651  }
652 
653 
654  template <class Prop0, class Allocator0,
655  class Prop1, class Allocator1,
656  class Prop2, class Allocator2>
657  void MltAdd(const SeldonSide& Side,
658  const double& alpha,
659  const Matrix<double, Prop0, RowSym, Allocator0>& A,
660  const Matrix<double, Prop1, RowMajor, Allocator1>& B,
661  const double& beta,
662  Matrix<double, Prop2, RowMajor, Allocator2>& C)
663  {
664 
665 #ifdef SELDON_CHECK_DIMENSIONS
666  CheckDim(Side, A, B, C, "MltAdd(side, alpha, A, B, beta, C)");
667 #endif
668 
669  cblas_dsymm(CblasRowMajor, Side.Cblas(), CblasUpper,
670  C.GetM(), C.GetN(),
671  alpha, A.GetData(), A.GetM(), B.GetData(), B.GetN(),
672  beta, C.GetData(), C.GetN());
673  }
674 
675 
676  template <class Prop0, class Allocator0,
677  class Prop1, class Allocator1,
678  class Prop2, class Allocator2>
679  void MltAdd(const SeldonSide& Side,
680  const complex<float>& alpha,
681  const Matrix<complex<float>, Prop0, RowSym, Allocator0>& A,
682  const Matrix<complex<float>, Prop1, RowMajor, Allocator1>& B,
683  const complex<float>& beta,
684  Matrix<complex<float>, Prop2, RowMajor, Allocator2>& C)
685  {
686 
687 #ifdef SELDON_CHECK_DIMENSIONS
688  CheckDim(Side, A, B, C, "MltAdd(side, alpha, A, B, beta, C)");
689 #endif
690 
691  cblas_csymm(CblasRowMajor, Side.Cblas(), CblasUpper,
692  C.GetM(), C.GetN(),
693  reinterpret_cast<const void*>(&alpha),
694  reinterpret_cast<const void*>(A.GetData()), A.GetM(),
695  reinterpret_cast<const void*>(B.GetData()), B.GetN(),
696  reinterpret_cast<const void*>(&beta),
697  reinterpret_cast<void*>(C.GetData()), C.GetN());
698  }
699 
700 
701  template <class Prop0, class Allocator0,
702  class Prop1, class Allocator1,
703  class Prop2, class Allocator2>
704  void MltAdd(const SeldonSide& Side,
705  const complex<double>& alpha,
706  const Matrix<complex<double>, Prop0, RowSym, Allocator0>& A,
707  const Matrix<complex<double>, Prop1, RowMajor, Allocator1>& B,
708  const complex<double>& beta,
709  Matrix<complex<double>, Prop2, RowMajor, Allocator2>& C)
710  {
711 
712 #ifdef SELDON_CHECK_DIMENSIONS
713  CheckDim(Side, A, B, C, "MltAdd(side, alpha, A, B, beta, C)");
714 #endif
715 
716  cblas_zsymm(CblasRowMajor, Side.Cblas(), CblasUpper,
717  C.GetM(), C.GetN(),
718  reinterpret_cast<const void*>(&alpha),
719  reinterpret_cast<const void*>(A.GetData()), A.GetM(),
720  reinterpret_cast<const void*>(B.GetData()), B.GetN(),
721  reinterpret_cast<const void*>(&beta),
722  reinterpret_cast<void*>(C.GetData()), C.GetN());
723  }
724 
725 
726  /*** RowSym and UpLo ***/
727 
728 
729  template <class Prop0, class Allocator0,
730  class Prop1, class Allocator1,
731  class Prop2, class Allocator2>
732  void MltAdd(const SeldonSide& Side,
733  const float& alpha,
734  const SeldonUplo& Uplo,
735  const Matrix<float, Prop0, RowSym, Allocator0>& A,
736  const Matrix<float, Prop1, RowMajor, Allocator1>& B,
737  const float& beta,
738  Matrix<float, Prop2, RowMajor, Allocator2>& C)
739  {
740 
741 #ifdef SELDON_CHECK_DIMENSIONS
742  CheckDim(Side, A, B, C, "MltAdd(side, alpha, uplo, A, B, beta, C)");
743 #endif
744 
745  cblas_ssymm(CblasRowMajor, Side.Cblas(), Uplo.Cblas(),
746  C.GetM(), C.GetN(),
747  alpha, A.GetData(), A.GetM(), B.GetData(), B.GetN(),
748  beta, C.GetData(), C.GetN());
749  }
750 
751 
752  template <class Prop0, class Allocator0,
753  class Prop1, class Allocator1,
754  class Prop2, class Allocator2>
755  void MltAdd(const SeldonSide& Side,
756  const double& alpha,
757  const SeldonUplo& Uplo,
758  const Matrix<double, Prop0, RowSym, Allocator0>& A,
759  const Matrix<double, Prop1, RowMajor, Allocator1>& B,
760  const double& beta,
761  Matrix<double, Prop2, RowMajor, Allocator2>& C)
762  {
763 
764 #ifdef SELDON_CHECK_DIMENSIONS
765  CheckDim(Side, A, B, C, "MltAdd(side, alpha, uplo, A, B, beta, C)");
766 #endif
767 
768  cblas_dsymm(CblasRowMajor, Side.Cblas(), Uplo.Cblas(),
769  C.GetM(), C.GetN(),
770  alpha, A.GetData(), A.GetM(), B.GetData(), B.GetN(),
771  beta, C.GetData(), C.GetN());
772  }
773 
774 
775  template <class Prop0, class Allocator0,
776  class Prop1, class Allocator1,
777  class Prop2, class Allocator2>
778  void MltAdd(const SeldonSide& Side,
779  const complex<float>& alpha,
780  const SeldonUplo& Uplo,
781  const Matrix<complex<float>, Prop0, RowSym, Allocator0>& A,
782  const Matrix<complex<float>, Prop1, RowMajor, Allocator1>& B,
783  const complex<float>& beta,
784  Matrix<complex<float>, Prop2, RowMajor, Allocator2>& C)
785  {
786 
787 #ifdef SELDON_CHECK_DIMENSIONS
788  CheckDim(Side, A, B, C, "MltAdd(side, alpha, uplo, A, B, beta, C)");
789 #endif
790 
791  cblas_csymm(CblasRowMajor, Side.Cblas(), Uplo.Cblas(),
792  C.GetM(), C.GetN(),
793  reinterpret_cast<const void*>(&alpha),
794  reinterpret_cast<const void*>(A.GetData()), A.GetM(),
795  reinterpret_cast<const void*>(B.GetData()), B.GetN(),
796  reinterpret_cast<const void*>(&beta),
797  reinterpret_cast<void*>(C.GetData()), C.GetN());
798  }
799 
800 
801  template <class Prop0, class Allocator0,
802  class Prop1, class Allocator1,
803  class Prop2, class Allocator2>
804  void MltAdd(const SeldonSide& Side,
805  const complex<double>& alpha,
806  const SeldonUplo& Uplo,
807  const Matrix<complex<double>, Prop0, RowSym, Allocator0>& A,
808  const Matrix<complex<double>, Prop1, RowMajor, Allocator1>& B,
809  const complex<double>& beta,
810  Matrix<complex<double>, Prop2, RowMajor, Allocator2>& C)
811  {
812 
813 #ifdef SELDON_CHECK_DIMENSIONS
814  CheckDim(Side, A, B, C, "MltAdd(side, alpha, uplo, A, B, beta, C)");
815 #endif
816 
817  cblas_zsymm(CblasRowMajor, Side.Cblas(), Uplo.Cblas(),
818  C.GetM(), C.GetN(),
819  reinterpret_cast<const void*>(&alpha),
820  reinterpret_cast<const void*>(A.GetData()), A.GetM(),
821  reinterpret_cast<const void*>(B.GetData()), B.GetN(),
822  reinterpret_cast<const void*>(&beta),
823  reinterpret_cast<void*>(C.GetData()), C.GetN());
824  }
825 
826 
827  // MltAdd //
829 
830 
831 
833  // MltAdd //
834 
835 
836  /*** ColHerm and Upper ***/
837 
838 
839  template <class Prop0, class Allocator0,
840  class Prop1, class Allocator1,
841  class Prop2, class Allocator2>
842  void MltAdd(const SeldonSide& Side,
843  const complex<float>& alpha,
844  const Matrix<complex<float>, Prop0, ColHerm, Allocator0>& A,
845  const Matrix<complex<float>, Prop1, ColMajor, Allocator1>& B,
846  const complex<float>& beta,
847  Matrix<complex<float>, Prop2, ColMajor, Allocator2>& C)
848  {
849 
850 #ifdef SELDON_CHECK_DIMENSIONS
851  CheckDim(Side, A, B, C, "MltAdd(side, alpha, A, B, beta, C)");
852 #endif
853 
854  cblas_chemm(CblasColMajor, Side.Cblas(), CblasUpper,
855  C.GetM(), C.GetN(),
856  reinterpret_cast<const void*>(&alpha),
857  reinterpret_cast<const void*>(A.GetData()), A.GetM(),
858  reinterpret_cast<const void*>(B.GetData()), B.GetM(),
859  reinterpret_cast<const void*>(&beta),
860  reinterpret_cast<void*>(C.GetData()), C.GetM());
861  }
862 
863 
864  template <class Prop0, class Allocator0,
865  class Prop1, class Allocator1,
866  class Prop2, class Allocator2>
867  void MltAdd(const SeldonSide& Side,
868  const complex<double>& alpha,
869  const Matrix<complex<double>, Prop0, ColHerm, Allocator0>& A,
870  const Matrix<complex<double>, Prop1, ColMajor, Allocator1>& B,
871  const complex<double>& beta,
872  Matrix<complex<double>, Prop2, ColMajor, Allocator2>& C)
873  {
874 
875 #ifdef SELDON_CHECK_DIMENSIONS
876  CheckDim(Side, A, B, C, "MltAdd(side, alpha, A, B, beta, C)");
877 #endif
878 
879  cblas_zhemm(CblasColMajor, Side.Cblas(), CblasUpper,
880  C.GetM(), C.GetN(),
881  reinterpret_cast<const void*>(&alpha),
882  reinterpret_cast<const void*>(A.GetData()), A.GetM(),
883  reinterpret_cast<const void*>(B.GetData()), B.GetM(),
884  reinterpret_cast<const void*>(&beta),
885  reinterpret_cast<void*>(C.GetData()), C.GetM());
886  }
887 
888 
889  /*** ColHerm and UpLo ***/
890 
891 
892  template <class Prop0, class Allocator0,
893  class Prop1, class Allocator1,
894  class Prop2, class Allocator2>
895  void MltAdd(const SeldonSide& Side,
896  const complex<float>& alpha,
897  const SeldonUplo& Uplo,
898  const Matrix<complex<float>, Prop0, ColHerm, Allocator0>& A,
899  const Matrix<complex<float>, Prop1, ColMajor, Allocator1>& B,
900  const complex<float>& beta,
901  Matrix<complex<float>, Prop2, ColMajor, Allocator2>& C)
902  {
903 
904 #ifdef SELDON_CHECK_DIMENSIONS
905  CheckDim(Side, A, B, C, "MltAdd(side, alpha, uplo, A, B, beta, C)");
906 #endif
907 
908  cblas_chemm(CblasColMajor, Side.Cblas(), Uplo.Cblas(),
909  C.GetM(), C.GetN(),
910  reinterpret_cast<const void*>(&alpha),
911  reinterpret_cast<const void*>(A.GetData()), A.GetM(),
912  reinterpret_cast<const void*>(B.GetData()), B.GetM(),
913  reinterpret_cast<const void*>(&beta),
914  reinterpret_cast<void*>(C.GetData()), C.GetM());
915  }
916 
917 
918  template <class Prop0, class Allocator0,
919  class Prop1, class Allocator1,
920  class Prop2, class Allocator2>
921  void MltAdd(const SeldonSide& Side,
922  const complex<double>& alpha,
923  const SeldonUplo& Uplo,
924  const Matrix<complex<double>, Prop0, ColHerm, Allocator0>& A,
925  const Matrix<complex<double>, Prop1, ColMajor, Allocator1>& B,
926  const complex<double>& beta,
927  Matrix<complex<double>, Prop2, ColMajor, Allocator2>& C)
928  {
929 
930 #ifdef SELDON_CHECK_DIMENSIONS
931  CheckDim(Side, A, B, C, "MltAdd(side, alpha, uplo, A, B, beta, C)");
932 #endif
933 
934  cblas_zhemm(CblasColMajor, Side.Cblas(), Uplo.Cblas(),
935  C.GetM(), C.GetN(),
936  reinterpret_cast<const void*>(&alpha),
937  reinterpret_cast<const void*>(A.GetData()), A.GetM(),
938  reinterpret_cast<const void*>(B.GetData()), B.GetM(),
939  reinterpret_cast<const void*>(&beta),
940  reinterpret_cast<void*>(C.GetData()), C.GetM());
941  }
942 
943 
944  /*** RowHerm and Upper ***/
945 
946 
947  template <class Prop0, class Allocator0,
948  class Prop1, class Allocator1,
949  class Prop2, class Allocator2>
950  void MltAdd(const SeldonSide& Side,
951  const complex<float>& alpha,
952  const Matrix<complex<float>, Prop0, RowHerm, Allocator0>& A,
953  const Matrix<complex<float>, Prop1, RowMajor, Allocator1>& B,
954  const complex<float>& beta,
955  Matrix<complex<float>, Prop2, RowMajor, Allocator2>& C)
956  {
957 
958 #ifdef SELDON_CHECK_DIMENSIONS
959  CheckDim(Side, A, B, C, "MltAdd(side, alpha, A, B, beta, C)");
960 #endif
961 
962  cblas_chemm(CblasRowMajor, Side.Cblas(), CblasUpper,
963  C.GetM(), C.GetN(),
964  reinterpret_cast<const void*>(&alpha),
965  reinterpret_cast<const void*>(A.GetData()), A.GetM(),
966  reinterpret_cast<const void*>(B.GetData()), B.GetN(),
967  reinterpret_cast<const void*>(&beta),
968  reinterpret_cast<void*>(C.GetData()), C.GetN());
969  }
970 
971 
972  template <class Prop0, class Allocator0,
973  class Prop1, class Allocator1,
974  class Prop2, class Allocator2>
975  void MltAdd(const SeldonSide& Side,
976  const complex<double>& alpha,
977  const Matrix<complex<double>, Prop0, RowHerm, Allocator0>& A,
978  const Matrix<complex<double>, Prop1, RowMajor, Allocator1>& B,
979  const complex<double>& beta,
980  Matrix<complex<double>, Prop2, RowMajor, Allocator2>& C)
981  {
982 
983 #ifdef SELDON_CHECK_DIMENSIONS
984  CheckDim(Side, A, B, C, "MltAdd(side, alpha, A, B, beta, C)");
985 #endif
986 
987  cblas_zhemm(CblasRowMajor, Side.Cblas(), CblasUpper,
988  C.GetM(), C.GetN(),
989  reinterpret_cast<const void*>(&alpha),
990  reinterpret_cast<const void*>(A.GetData()), A.GetM(),
991  reinterpret_cast<const void*>(B.GetData()), B.GetN(),
992  reinterpret_cast<const void*>(&beta),
993  reinterpret_cast<void*>(C.GetData()), C.GetN());
994  }
995 
996 
997  /*** RowHerm and UpLo ***/
998 
999 
1000  template <class Prop0, class Allocator0,
1001  class Prop1, class Allocator1,
1002  class Prop2, class Allocator2>
1003  void MltAdd(const SeldonSide& Side,
1004  const complex<float>& alpha,
1005  const SeldonUplo& Uplo,
1006  const Matrix<complex<float>, Prop0, RowHerm, Allocator0>& A,
1007  const Matrix<complex<float>, Prop1, RowMajor, Allocator1>& B,
1008  const complex<float>& beta,
1009  Matrix<complex<float>, Prop2, RowMajor, Allocator2>& C)
1010  {
1011 
1012 #ifdef SELDON_CHECK_DIMENSIONS
1013  CheckDim(Side, A, B, C, "MltAdd(side, alpha, uplo, A, B, beta, C)");
1014 #endif
1015 
1016  cblas_chemm(CblasRowMajor, Side.Cblas(), Uplo.Cblas(),
1017  C.GetM(), C.GetN(),
1018  reinterpret_cast<const void*>(&alpha),
1019  reinterpret_cast<const void*>(A.GetData()), A.GetM(),
1020  reinterpret_cast<const void*>(B.GetData()), B.GetN(),
1021  reinterpret_cast<const void*>(&beta),
1022  reinterpret_cast<void*>(C.GetData()), C.GetN());
1023  }
1024 
1025 
1026  template <class Prop0, class Allocator0,
1027  class Prop1, class Allocator1,
1028  class Prop2, class Allocator2>
1029  void MltAdd(const SeldonSide& Side,
1030  const complex<double>& alpha,
1031  const SeldonUplo& Uplo,
1032  const Matrix<complex<double>, Prop0, RowHerm, Allocator0>& A,
1033  const Matrix<complex<double>, Prop1, RowMajor, Allocator1>& B,
1034  const complex<double>& beta,
1035  Matrix<complex<double>, Prop2, RowMajor, Allocator2>& C)
1036  {
1037 
1038 #ifdef SELDON_CHECK_DIMENSIONS
1039  CheckDim(Side, A, B, C, "MltAdd(side, alpha, uplo, A, B, beta, C)");
1040 #endif
1041 
1042  cblas_zhemm(CblasRowMajor, Side.Cblas(), Uplo.Cblas(),
1043  C.GetM(), C.GetN(),
1044  reinterpret_cast<const void*>(&alpha),
1045  reinterpret_cast<const void*>(A.GetData()), A.GetM(),
1046  reinterpret_cast<const void*>(B.GetData()), B.GetN(),
1047  reinterpret_cast<const void*>(&beta),
1048  reinterpret_cast<void*>(C.GetData()), C.GetN());
1049  }
1050 
1051 
1052  // MltAdd //
1054 
1055 
1056 
1058  // Mlt //
1059 
1060 
1061  /*** ColUpTriang, NoTrans and NonUnit ***/
1062 
1063 
1064  template <class Prop0, class Allocator0,
1065  class Prop1, class Allocator1>
1066  void Mlt(const SeldonSide& Side,
1067  const float& alpha,
1068  const Matrix<float, Prop0, ColUpTriang, Allocator0>& A,
1069  Matrix<float, Prop1, ColMajor, Allocator1>& B)
1070  {
1071 
1072 #ifdef SELDON_CHECK_DIMENSIONS
1073  CheckDim(Side, A, B, "Mlt(side, alpha, A, B)");
1074 #endif
1075 
1076  cblas_strmm(CblasColMajor, Side.Cblas(), CblasUpper, CblasNoTrans, CblasNonUnit,
1077  B.GetM(), B.GetN(),
1078  alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM());
1079  }
1080 
1081 
1082  template <class Prop0, class Allocator0,
1083  class Prop1, class Allocator1>
1084  void Mlt(const SeldonSide& Side,
1085  const double& alpha,
1086  const Matrix<double, Prop0, ColUpTriang, Allocator0>& A,
1087  Matrix<double, Prop1, ColMajor, Allocator1>& B)
1088  {
1089 
1090 #ifdef SELDON_CHECK_DIMENSIONS
1091  CheckDim(Side, A, B, "Mlt(side, alpha, A, B)");
1092 #endif
1093 
1094  cblas_dtrmm(CblasColMajor, Side.Cblas(), CblasUpper, CblasNoTrans, CblasNonUnit,
1095  B.GetM(), B.GetN(),
1096  alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM());
1097  }
1098 
1099 
1100  template <class Prop0, class Allocator0,
1101  class Prop1, class Allocator1>
1102  void Mlt(const SeldonSide& Side,
1103  const complex<float>& alpha,
1104  const Matrix<complex<float>, Prop0, ColUpTriang, Allocator0>& A,
1105  Matrix<complex<float>, Prop1, ColMajor, Allocator1>& B)
1106  {
1107 
1108 #ifdef SELDON_CHECK_DIMENSIONS
1109  CheckDim(Side, A, B, "Mlt(side, alpha, A, B)");
1110 #endif
1111 
1112  cblas_ctrmm(CblasColMajor, Side.Cblas(), CblasUpper, CblasNoTrans, CblasNonUnit,
1113  B.GetM(), B.GetN(),
1114  reinterpret_cast<const void*>(&alpha),
1115  reinterpret_cast<const void*>(A.GetData()), A.GetM(),
1116  reinterpret_cast<void*>(B.GetData()), B.GetM());
1117  }
1118 
1119 
1120  template <class Prop0, class Allocator0,
1121  class Prop1, class Allocator1>
1122  void Mlt(const SeldonSide& Side,
1123  const complex<double>& alpha,
1124  const Matrix<complex<double>, Prop0, ColUpTriang, Allocator0>& A,
1125  Matrix<complex<double>, Prop1, ColMajor, Allocator1>& B)
1126  {
1127 
1128 #ifdef SELDON_CHECK_DIMENSIONS
1129  CheckDim(Side, A, B, "Mlt(side, alpha, A, B)");
1130 #endif
1131 
1132  cblas_ztrmm(CblasColMajor, Side.Cblas(), CblasUpper, CblasNoTrans, CblasNonUnit,
1133  B.GetM(), B.GetN(),
1134  reinterpret_cast<const void*>(&alpha),
1135  reinterpret_cast<const void*>(A.GetData()), A.GetM(),
1136  reinterpret_cast<void*>(B.GetData()), B.GetM());
1137  }
1138 
1139 
1140  /*** ColUpTriang ***/
1141 
1142 
1143  template <class Prop0, class Allocator0,
1144  class Prop1, class Allocator1>
1145  void Mlt(const SeldonSide& Side,
1146  const float& alpha,
1147  const SeldonTranspose& TransA,
1148  const SeldonDiag& DiagA,
1149  const Matrix<float, Prop0, ColUpTriang, Allocator0>& A,
1150  Matrix<float, Prop1, ColMajor, Allocator1>& B)
1151  {
1152 
1153 #ifdef SELDON_CHECK_DIMENSIONS
1154  CheckDim(Side, A, B, "Mlt(side, alpha, status, diag, A, B)");
1155 #endif
1156 
1157  cblas_strmm(CblasColMajor, Side.Cblas(), CblasUpper, TransA.Cblas(), DiagA.Cblas(),
1158  B.GetM(), B.GetN(),
1159  alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM());
1160  }
1161 
1162 
1163  template <class Prop0, class Allocator0,
1164  class Prop1, class Allocator1>
1165  void Mlt(const SeldonSide& Side,
1166  const double& alpha,
1167  const SeldonTranspose& TransA,
1168  const SeldonDiag& DiagA,
1169  const Matrix<double, Prop0, ColUpTriang, Allocator0>& A,
1170  Matrix<double, Prop1, ColMajor, Allocator1>& B)
1171  {
1172 
1173 #ifdef SELDON_CHECK_DIMENSIONS
1174  CheckDim(Side, A, B, "Mlt(side, alpha, status, diag, A, B)");
1175 #endif
1176 
1177  cblas_dtrmm(CblasColMajor, Side.Cblas(), CblasUpper, TransA.Cblas(), DiagA.Cblas(),
1178  B.GetM(), B.GetN(),
1179  alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM());
1180  }
1181 
1182 
1183  template <class Prop0, class Allocator0,
1184  class Prop1, class Allocator1>
1185  void Mlt(const SeldonSide& Side,
1186  const complex<float>& alpha,
1187  const SeldonTranspose& TransA,
1188  const SeldonDiag& DiagA,
1189  const Matrix<complex<float>, Prop0, ColUpTriang, Allocator0>& A,
1190  Matrix<complex<float>, Prop1, ColMajor, Allocator1>& B)
1191  {
1192 
1193 #ifdef SELDON_CHECK_DIMENSIONS
1194  CheckDim(Side, A, B, "Mlt(side, alpha, status, diag, A, B)");
1195 #endif
1196 
1197  cblas_ctrmm(CblasColMajor, Side.Cblas(), CblasUpper, TransA.Cblas(), DiagA.Cblas(),
1198  B.GetM(), B.GetN(),
1199  reinterpret_cast<const void*>(&alpha),
1200  reinterpret_cast<const void*>(A.GetData()), A.GetM(),
1201  reinterpret_cast<void*>(B.GetData()), B.GetM());
1202  }
1203 
1204 
1205  template <class Prop0, class Allocator0,
1206  class Prop1, class Allocator1>
1207  void Mlt(const SeldonSide& Side,
1208  const complex<double>& alpha,
1209  const SeldonTranspose& TransA,
1210  const SeldonDiag& DiagA,
1211  const Matrix<complex<double>, Prop0, ColUpTriang, Allocator0>& A,
1212  Matrix<complex<double>, Prop1, ColMajor, Allocator1>& B)
1213  {
1214 
1215 #ifdef SELDON_CHECK_DIMENSIONS
1216  CheckDim(Side, A, B, "Mlt(side, alpha, status, diag, A, B)");
1217 #endif
1218 
1219  cblas_ztrmm(CblasColMajor, Side.Cblas(), CblasUpper, TransA.Cblas(), DiagA.Cblas(),
1220  B.GetM(), B.GetN(),
1221  reinterpret_cast<const void*>(&alpha),
1222  reinterpret_cast<const void*>(A.GetData()), A.GetM(),
1223  reinterpret_cast<void*>(B.GetData()), B.GetM());
1224  }
1225 
1226 
1227  /*** ColLoTriang, NoTrans and NonUnit ***/
1228 
1229 
1230  template <class Prop0, class Allocator0,
1231  class Prop1, class Allocator1>
1232  void Mlt(const SeldonSide& Side,
1233  const float& alpha,
1234  const Matrix<float, Prop0, ColLoTriang, Allocator0>& A,
1235  Matrix<float, Prop1, ColMajor, Allocator1>& B)
1236  {
1237 
1238 #ifdef SELDON_CHECK_DIMENSIONS
1239  CheckDim(Side, A, B, "Mlt(side, alpha, A, B)");
1240 #endif
1241 
1242  cblas_strmm(CblasColMajor, Side.Cblas(), CblasLower, CblasNoTrans, CblasNonUnit,
1243  B.GetM(), B.GetN(),
1244  alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM());
1245  }
1246 
1247 
1248  template <class Prop0, class Allocator0,
1249  class Prop1, class Allocator1>
1250  void Mlt(const SeldonSide& Side,
1251  const double& alpha,
1252  const Matrix<double, Prop0, ColLoTriang, Allocator0>& A,
1253  Matrix<double, Prop1, ColMajor, Allocator1>& B)
1254  {
1255 
1256 #ifdef SELDON_CHECK_DIMENSIONS
1257  CheckDim(Side, A, B, "Mlt(side, alpha, A, B)");
1258 #endif
1259 
1260  cblas_dtrmm(CblasColMajor, Side.Cblas(), CblasLower, CblasNoTrans, CblasNonUnit,
1261  B.GetM(), B.GetN(),
1262  alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM());
1263  }
1264 
1265 
1266  template <class Prop0, class Allocator0,
1267  class Prop1, class Allocator1>
1268  void Mlt(const SeldonSide& Side,
1269  const complex<float>& alpha,
1270  const Matrix<complex<float>, Prop0, ColLoTriang, Allocator0>& A,
1271  Matrix<complex<float>, Prop1, ColMajor, Allocator1>& B)
1272  {
1273 
1274 #ifdef SELDON_CHECK_DIMENSIONS
1275  CheckDim(Side, A, B, "Mlt(side, alpha, A, B)");
1276 #endif
1277 
1278  cblas_ctrmm(CblasColMajor, Side.Cblas(), CblasLower, CblasNoTrans, CblasNonUnit,
1279  B.GetM(), B.GetN(),
1280  reinterpret_cast<const void*>(&alpha),
1281  reinterpret_cast<const void*>(A.GetData()), A.GetM(),
1282  reinterpret_cast<void*>(B.GetData()), B.GetM());
1283  }
1284 
1285 
1286  template <class Prop0, class Allocator0,
1287  class Prop1, class Allocator1>
1288  void Mlt(const SeldonSide& Side,
1289  const complex<double>& alpha,
1290  const Matrix<complex<double>, Prop0, ColLoTriang, Allocator0>& A,
1291  Matrix<complex<double>, Prop1, ColMajor, Allocator1>& B)
1292  {
1293 
1294 #ifdef SELDON_CHECK_DIMENSIONS
1295  CheckDim(Side, A, B, "Mlt(side, alpha, A, B)");
1296 #endif
1297 
1298  cblas_ztrmm(CblasColMajor, Side.Cblas(), CblasLower, CblasNoTrans, CblasNonUnit,
1299  B.GetM(), B.GetN(),
1300  reinterpret_cast<const void*>(&alpha),
1301  reinterpret_cast<const void*>(A.GetData()), A.GetM(),
1302  reinterpret_cast<void*>(B.GetData()), B.GetM());
1303  }
1304 
1305 
1306  /*** ColLoTriang ***/
1307 
1308 
1309  template <class Prop0, class Allocator0,
1310  class Prop1, class Allocator1>
1311  void Mlt(const SeldonSide& Side,
1312  const float& alpha,
1313  const SeldonTranspose& TransA,
1314  const SeldonDiag& DiagA,
1315  const Matrix<float, Prop0, ColLoTriang, Allocator0>& A,
1316  Matrix<float, Prop1, ColMajor, Allocator1>& B)
1317  {
1318 
1319 #ifdef SELDON_CHECK_DIMENSIONS
1320  CheckDim(Side, A, B, "Mlt(side, alpha, status, diag, A, B)");
1321 #endif
1322 
1323  cblas_strmm(CblasColMajor, Side.Cblas(), CblasLower, TransA.Cblas(), DiagA.Cblas(),
1324  B.GetM(), B.GetN(),
1325  alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM());
1326  }
1327 
1328 
1329  template <class Prop0, class Allocator0,
1330  class Prop1, class Allocator1>
1331  void Mlt(const SeldonSide& Side,
1332  const double& alpha,
1333  const SeldonTranspose& TransA,
1334  const SeldonDiag& DiagA,
1335  const Matrix<double, Prop0, ColLoTriang, Allocator0>& A,
1336  Matrix<double, Prop1, ColMajor, Allocator1>& B)
1337  {
1338 
1339 #ifdef SELDON_CHECK_DIMENSIONS
1340  CheckDim(Side, A, B, "Mlt(side, alpha, status, diag, A, B)");
1341 #endif
1342 
1343  cblas_dtrmm(CblasColMajor, Side.Cblas(), CblasLower, TransA.Cblas(), DiagA.Cblas(),
1344  B.GetM(), B.GetN(),
1345  alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM());
1346  }
1347 
1348 
1349  template <class Prop0, class Allocator0,
1350  class Prop1, class Allocator1>
1351  void Mlt(const SeldonSide& Side,
1352  const complex<float>& alpha,
1353  const SeldonTranspose& TransA,
1354  const SeldonDiag& DiagA,
1355  const Matrix<complex<float>, Prop0, ColLoTriang, Allocator0>& A,
1356  Matrix<complex<float>, Prop1, ColMajor, Allocator1>& B)
1357  {
1358 
1359 #ifdef SELDON_CHECK_DIMENSIONS
1360  CheckDim(Side, A, B, "Mlt(side, alpha, status, diag, A, B)");
1361 #endif
1362 
1363  cblas_ctrmm(CblasColMajor, Side.Cblas(), CblasLower, TransA.Cblas(), DiagA.Cblas(),
1364  B.GetM(), B.GetN(),
1365  reinterpret_cast<const void*>(&alpha),
1366  reinterpret_cast<const void*>(A.GetData()), A.GetM(),
1367  reinterpret_cast<void*>(B.GetData()), B.GetM());
1368  }
1369 
1370 
1371  template <class Prop0, class Allocator0,
1372  class Prop1, class Allocator1>
1373  void Mlt(const SeldonSide& Side,
1374  const complex<double>& alpha,
1375  const SeldonTranspose& TransA,
1376  const SeldonDiag& DiagA,
1377  const Matrix<complex<double>, Prop0, ColLoTriang, Allocator0>& A,
1378  Matrix<complex<double>, Prop1, ColMajor, Allocator1>& B)
1379  {
1380 
1381 #ifdef SELDON_CHECK_DIMENSIONS
1382  CheckDim(Side, A, B, "Mlt(side, alpha, status, diag, A, B)");
1383 #endif
1384 
1385  cblas_ztrmm(CblasColMajor, Side.Cblas(), CblasLower, TransA.Cblas(), DiagA.Cblas(),
1386  B.GetM(), B.GetN(),
1387  reinterpret_cast<const void*>(&alpha),
1388  reinterpret_cast<const void*>(A.GetData()), A.GetM(),
1389  reinterpret_cast<void*>(B.GetData()), B.GetM());
1390  }
1391 
1392 
1393  /*** RowUpTriang, NoTrans and NonUnit ***/
1394 
1395 
1396  template <class Prop0, class Allocator0,
1397  class Prop1, class Allocator1>
1398  void Mlt(const SeldonSide& Side,
1399  const float& alpha,
1400  const Matrix<float, Prop0, RowUpTriang, Allocator0>& A,
1401  Matrix<float, Prop1, RowMajor, Allocator1>& B)
1402  {
1403 
1404 #ifdef SELDON_CHECK_DIMENSIONS
1405  CheckDim(Side, A, B, "Mlt(side, alpha, A, B)");
1406 #endif
1407 
1408  cblas_strmm(CblasRowMajor, Side.Cblas(), CblasUpper, CblasNoTrans, CblasNonUnit,
1409  B.GetM(), B.GetN(),
1410  alpha, A.GetData(), A.GetN(), B.GetData(), B.GetN());
1411  }
1412 
1413 
1414  template <class Prop0, class Allocator0,
1415  class Prop1, class Allocator1>
1416  void Mlt(const SeldonSide& Side,
1417  const double& alpha,
1418  const Matrix<double, Prop0, RowUpTriang, Allocator0>& A,
1419  Matrix<double, Prop1, RowMajor, Allocator1>& B)
1420  {
1421 
1422 #ifdef SELDON_CHECK_DIMENSIONS
1423  CheckDim(Side, A, B, "Mlt(side, alpha, A, B)");
1424 #endif
1425 
1426  cblas_dtrmm(CblasRowMajor, Side.Cblas(), CblasUpper, CblasNoTrans, CblasNonUnit,
1427  B.GetM(), B.GetN(),
1428  alpha, A.GetData(), A.GetN(), B.GetData(), B.GetN());
1429  }
1430 
1431 
1432  template <class Prop0, class Allocator0,
1433  class Prop1, class Allocator1>
1434  void Mlt(const SeldonSide& Side,
1435  const complex<float>& alpha,
1436  const Matrix<complex<float>, Prop0, RowUpTriang, Allocator0>& A,
1437  Matrix<complex<float>, Prop1, RowMajor, Allocator1>& B)
1438  {
1439 
1440 #ifdef SELDON_CHECK_DIMENSIONS
1441  CheckDim(Side, A, B, "Mlt(side, alpha, A, B)");
1442 #endif
1443 
1444  cblas_ctrmm(CblasRowMajor, Side.Cblas(), CblasUpper, CblasNoTrans, CblasNonUnit,
1445  B.GetM(), B.GetN(),
1446  reinterpret_cast<const void*>(&alpha),
1447  reinterpret_cast<const void*>(A.GetData()), A.GetN(),
1448  reinterpret_cast<void*>(B.GetData()), B.GetN());
1449  }
1450 
1451 
1452  template <class Prop0, class Allocator0,
1453  class Prop1, class Allocator1>
1454  void Mlt(const SeldonSide& Side,
1455  const complex<double>& alpha,
1456  const Matrix<complex<double>, Prop0, RowUpTriang, Allocator0>& A,
1457  Matrix<complex<double>, Prop1, RowMajor, Allocator1>& B)
1458  {
1459 
1460 #ifdef SELDON_CHECK_DIMENSIONS
1461  CheckDim(Side, A, B, "Mlt(side, alpha, A, B)");
1462 #endif
1463 
1464  cblas_ztrmm(CblasRowMajor, Side.Cblas(), CblasUpper, CblasNoTrans, CblasNonUnit,
1465  B.GetM(), B.GetN(),
1466  reinterpret_cast<const void*>(&alpha),
1467  reinterpret_cast<const void*>(A.GetData()), A.GetN(),
1468  reinterpret_cast<void*>(B.GetData()), B.GetN());
1469  }
1470 
1471 
1472  /*** RowUpTriang ***/
1473 
1474 
1475  template <class Prop0, class Allocator0,
1476  class Prop1, class Allocator1>
1477  void Mlt(const SeldonSide& Side,
1478  const float& alpha,
1479  const SeldonTranspose& TransA,
1480  const SeldonDiag& DiagA,
1481  const Matrix<float, Prop0, RowUpTriang, Allocator0>& A,
1482  Matrix<float, Prop1, RowMajor, Allocator1>& B)
1483  {
1484 
1485 #ifdef SELDON_CHECK_DIMENSIONS
1486  CheckDim(Side, A, B, "Mlt(side, alpha, status, diag, A, B)");
1487 #endif
1488 
1489  cblas_strmm(CblasRowMajor, Side.Cblas(), CblasUpper, TransA.Cblas(), DiagA.Cblas(),
1490  B.GetM(), B.GetN(),
1491  alpha, A.GetData(), A.GetN(), B.GetData(), B.GetN());
1492  }
1493 
1494 
1495  template <class Prop0, class Allocator0,
1496  class Prop1, class Allocator1>
1497  void Mlt(const SeldonSide& Side,
1498  const double& alpha,
1499  const SeldonTranspose& TransA,
1500  const SeldonDiag& DiagA,
1501  const Matrix<double, Prop0, RowUpTriang, Allocator0>& A,
1502  Matrix<double, Prop1, RowMajor, Allocator1>& B)
1503  {
1504 
1505 #ifdef SELDON_CHECK_DIMENSIONS
1506  CheckDim(Side, A, B, "Mlt(side, alpha, status, diag, A, B)");
1507 #endif
1508 
1509  cblas_dtrmm(CblasRowMajor, Side.Cblas(), CblasUpper, TransA.Cblas(), DiagA.Cblas(),
1510  B.GetM(), B.GetN(),
1511  alpha, A.GetData(), A.GetN(), B.GetData(), B.GetN());
1512  }
1513 
1514 
1515  template <class Prop0, class Allocator0,
1516  class Prop1, class Allocator1>
1517  void Mlt(const SeldonSide& Side,
1518  const complex<float>& alpha,
1519  const SeldonTranspose& TransA,
1520  const SeldonDiag& DiagA,
1521  const Matrix<complex<float>, Prop0, RowUpTriang, Allocator0>& A,
1522  Matrix<complex<float>, Prop1, RowMajor, Allocator1>& B)
1523  {
1524 
1525 #ifdef SELDON_CHECK_DIMENSIONS
1526  CheckDim(Side, A, B, "Mlt(side, alpha, status, diag, A, B)");
1527 #endif
1528 
1529  cblas_ctrmm(CblasRowMajor, Side.Cblas(), CblasUpper, TransA.Cblas(), DiagA.Cblas(),
1530  B.GetM(), B.GetN(),
1531  reinterpret_cast<const void*>(&alpha),
1532  reinterpret_cast<const void*>(A.GetData()), A.GetN(),
1533  reinterpret_cast<void*>(B.GetData()), B.GetN());
1534  }
1535 
1536 
1537  template <class Prop0, class Allocator0,
1538  class Prop1, class Allocator1>
1539  void Mlt(const SeldonSide& Side,
1540  const complex<double>& alpha,
1541  const SeldonTranspose& TransA,
1542  const SeldonDiag& DiagA,
1543  const Matrix<complex<double>, Prop0, RowUpTriang, Allocator0>& A,
1544  Matrix<complex<double>, Prop1, RowMajor, Allocator1>& B)
1545  {
1546 
1547 #ifdef SELDON_CHECK_DIMENSIONS
1548  CheckDim(Side, A, B, "Mlt(side, alpha, status, diag, A, B)");
1549 #endif
1550 
1551  cblas_ztrmm(CblasRowMajor, Side.Cblas(), CblasUpper, TransA.Cblas(), DiagA.Cblas(),
1552  B.GetM(), B.GetN(),
1553  reinterpret_cast<const void*>(&alpha),
1554  reinterpret_cast<const void*>(A.GetData()), A.GetN(),
1555  reinterpret_cast<void*>(B.GetData()), B.GetN());
1556  }
1557 
1558 
1559  /*** RowLoTriang, NoTrans and NonUnit ***/
1560 
1561 
1562  template <class Prop0, class Allocator0,
1563  class Prop1, class Allocator1>
1564  void Mlt(const SeldonSide& Side,
1565  const float& alpha,
1566  const Matrix<float, Prop0, RowLoTriang, Allocator0>& A,
1567  Matrix<float, Prop1, RowMajor, Allocator1>& B)
1568  {
1569 
1570 #ifdef SELDON_CHECK_DIMENSIONS
1571  CheckDim(Side, A, B, "Mlt(side, alpha, A, B)");
1572 #endif
1573 
1574  cblas_strmm(CblasRowMajor, Side.Cblas(), CblasLower, CblasNoTrans, CblasNonUnit,
1575  B.GetM(), B.GetN(),
1576  alpha, A.GetData(), A.GetN(), B.GetData(), B.GetN());
1577  }
1578 
1579 
1580  template <class Prop0, class Allocator0,
1581  class Prop1, class Allocator1>
1582  void Mlt(const SeldonSide& Side,
1583  const double& alpha,
1584  const Matrix<double, Prop0, RowLoTriang, Allocator0>& A,
1585  Matrix<double, Prop1, RowMajor, Allocator1>& B)
1586  {
1587 
1588 #ifdef SELDON_CHECK_DIMENSIONS
1589  CheckDim(Side, A, B, "Mlt(side, alpha, A, B)");
1590 #endif
1591 
1592  cblas_dtrmm(CblasRowMajor, Side.Cblas(), CblasLower, CblasNoTrans, CblasNonUnit,
1593  B.GetM(), B.GetN(),
1594  alpha, A.GetData(), A.GetN(), B.GetData(), B.GetN());
1595  }
1596 
1597 
1598  template <class Prop0, class Allocator0,
1599  class Prop1, class Allocator1>
1600  void Mlt(const SeldonSide& Side,
1601  const complex<float>& alpha,
1602  const Matrix<complex<float>, Prop0, RowLoTriang, Allocator0>& A,
1603  Matrix<complex<float>, Prop1, RowMajor, Allocator1>& B)
1604  {
1605 
1606 #ifdef SELDON_CHECK_DIMENSIONS
1607  CheckDim(Side, A, B, "Mlt(side, alpha, A, B)");
1608 #endif
1609 
1610  cblas_ctrmm(CblasRowMajor, Side.Cblas(), CblasLower, CblasNoTrans, CblasNonUnit,
1611  B.GetM(), B.GetN(),
1612  reinterpret_cast<const void*>(&alpha),
1613  reinterpret_cast<const void*>(A.GetData()), A.GetN(),
1614  reinterpret_cast<void*>(B.GetData()), B.GetN());
1615  }
1616 
1617 
1618  template <class Prop0, class Allocator0,
1619  class Prop1, class Allocator1>
1620  void Mlt(const SeldonSide& Side,
1621  const complex<double>& alpha,
1622  const Matrix<complex<double>, Prop0, RowLoTriang, Allocator0>& A,
1623  Matrix<complex<double>, Prop1, RowMajor, Allocator1>& B)
1624  {
1625 
1626 #ifdef SELDON_CHECK_DIMENSIONS
1627  CheckDim(Side, A, B, "Mlt(side, alpha, A, B)");
1628 #endif
1629 
1630  cblas_ztrmm(CblasRowMajor, Side.Cblas(), CblasLower, CblasNoTrans, CblasNonUnit,
1631  B.GetM(), B.GetN(),
1632  reinterpret_cast<const void*>(&alpha),
1633  reinterpret_cast<const void*>(A.GetData()), A.GetN(),
1634  reinterpret_cast<void*>(B.GetData()), B.GetN());
1635  }
1636 
1637 
1638  /*** RowLoTriang ***/
1639 
1640 
1641  template <class Prop0, class Allocator0,
1642  class Prop1, class Allocator1>
1643  void Mlt(const SeldonSide& Side,
1644  const float& alpha,
1645  const SeldonTranspose& TransA,
1646  const SeldonDiag& DiagA,
1647  const Matrix<float, Prop0, RowLoTriang, Allocator0>& A,
1648  Matrix<float, Prop1, RowMajor, Allocator1>& B)
1649  {
1650 
1651 #ifdef SELDON_CHECK_DIMENSIONS
1652  CheckDim(Side, A, B, "Mlt(side, alpha, status, diag, A, B)");
1653 #endif
1654 
1655  cblas_strmm(CblasRowMajor, Side.Cblas(), CblasLower, TransA.Cblas(), DiagA.Cblas(),
1656  B.GetM(), B.GetN(),
1657  alpha, A.GetData(), A.GetN(), B.GetData(), B.GetN());
1658  }
1659 
1660 
1661  template <class Prop0, class Allocator0,
1662  class Prop1, class Allocator1>
1663  void Mlt(const SeldonSide& Side,
1664  const double& alpha,
1665  const SeldonTranspose& TransA,
1666  const SeldonDiag& DiagA,
1667  const Matrix<double, Prop0, RowLoTriang, Allocator0>& A,
1668  Matrix<double, Prop1, RowMajor, Allocator1>& B)
1669  {
1670 
1671 #ifdef SELDON_CHECK_DIMENSIONS
1672  CheckDim(Side, A, B, "Mlt(side, alpha, status, diag, A, B)");
1673 #endif
1674 
1675  cblas_dtrmm(CblasRowMajor, Side.Cblas(), CblasLower, TransA.Cblas(), DiagA.Cblas(),
1676  B.GetM(), B.GetN(),
1677  alpha, A.GetData(), A.GetN(), B.GetData(), B.GetN());
1678  }
1679 
1680 
1681  template <class Prop0, class Allocator0,
1682  class Prop1, class Allocator1>
1683  void Mlt(const SeldonSide& Side,
1684  const complex<float>& alpha,
1685  const SeldonTranspose& TransA,
1686  const SeldonDiag& DiagA,
1687  const Matrix<complex<float>, Prop0, RowLoTriang, Allocator0>& A,
1688  Matrix<complex<float>, Prop1, RowMajor, Allocator1>& B)
1689  {
1690 
1691 #ifdef SELDON_CHECK_DIMENSIONS
1692  CheckDim(Side, A, B, "Mlt(side, alpha, status, diag, A, B)");
1693 #endif
1694 
1695  cblas_ctrmm(CblasRowMajor, Side.Cblas(), CblasLower, TransA.Cblas(), DiagA.Cblas(),
1696  B.GetM(), B.GetN(),
1697  reinterpret_cast<const void*>(&alpha),
1698  reinterpret_cast<const void*>(A.GetData()), A.GetN(),
1699  reinterpret_cast<void*>(B.GetData()), B.GetN());
1700  }
1701 
1702 
1703  template <class Prop0, class Allocator0,
1704  class Prop1, class Allocator1>
1705  void Mlt(const SeldonSide& Side,
1706  const complex<double>& alpha,
1707  const SeldonTranspose& TransA,
1708  const SeldonDiag& DiagA,
1709  const Matrix<complex<double>, Prop0, RowLoTriang, Allocator0>& A,
1710  Matrix<complex<double>, Prop1, RowMajor, Allocator1>& B)
1711  {
1712 
1713 #ifdef SELDON_CHECK_DIMENSIONS
1714  CheckDim(Side, A, B, "Mlt(side, alpha, status, diag, A, B)");
1715 #endif
1716 
1717  cblas_ztrmm(CblasRowMajor, Side.Cblas(), CblasLower, TransA.Cblas(), DiagA.Cblas(),
1718  B.GetM(), B.GetN(),
1719  reinterpret_cast<const void*>(&alpha),
1720  reinterpret_cast<const void*>(A.GetData()), A.GetN(),
1721  reinterpret_cast<void*>(B.GetData()), B.GetN());
1722  }
1723 
1724 
1725  // Mlt //
1727 
1728 
1729 
1731  // Solve //
1732 
1733 
1734  /*** ColUpTriang, NoTrans and NonUnit ***/
1735 
1736 
1737  template <class Prop0, class Allocator0,
1738  class Prop1, class Allocator1>
1739  void Solve(const SeldonSide& Side,
1740  const float& alpha,
1741  const Matrix<float, Prop0, ColUpTriang, Allocator0>& A,
1742  Matrix<float, Prop1, ColMajor, Allocator1>& B)
1743  {
1744 
1745 #ifdef SELDON_CHECK_DIMENSIONS
1746  CheckDim(Side, A, B, "Solve(side, alpha, A, B)");
1747 #endif
1748 
1749  cblas_strsm(CblasColMajor, Side.Cblas(), CblasUpper, CblasNoTrans, CblasNonUnit,
1750  B.GetM(), B.GetN(),
1751  alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM());
1752  }
1753 
1754 
1755  template <class Prop0, class Allocator0,
1756  class Prop1, class Allocator1>
1757  void Solve(const SeldonSide& Side,
1758  const double& alpha,
1759  const Matrix<double, Prop0, ColUpTriang, Allocator0>& A,
1760  Matrix<double, Prop1, ColMajor, Allocator1>& B)
1761  {
1762 
1763 #ifdef SELDON_CHECK_DIMENSIONS
1764  CheckDim(Side, A, B, "Solve(side, alpha, A, B)");
1765 #endif
1766 
1767  cblas_dtrsm(CblasColMajor, Side.Cblas(), CblasUpper, CblasNoTrans, CblasNonUnit,
1768  B.GetM(), B.GetN(),
1769  alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM());
1770  }
1771 
1772 
1773  template <class Prop0, class Allocator0,
1774  class Prop1, class Allocator1>
1775  void Solve(const SeldonSide& Side,
1776  const complex<float>& alpha,
1777  const Matrix<complex<float>, Prop0, ColUpTriang, Allocator0>& A,
1778  Matrix<complex<float>, Prop1, ColMajor, Allocator1>& B)
1779  {
1780 
1781 #ifdef SELDON_CHECK_DIMENSIONS
1782  CheckDim(Side, A, B, "Solve(side, alpha, A, B)");
1783 #endif
1784 
1785  cblas_ctrsm(CblasColMajor, Side.Cblas(), CblasUpper, CblasNoTrans, CblasNonUnit,
1786  B.GetM(), B.GetN(),
1787  reinterpret_cast<const void*>(&alpha),
1788  reinterpret_cast<const void*>(A.GetData()), A.GetM(),
1789  reinterpret_cast<void*>(B.GetData()), B.GetM());
1790  }
1791 
1792 
1793  template <class Prop0, class Allocator0,
1794  class Prop1, class Allocator1>
1795  void Solve(const SeldonSide& Side,
1796  const complex<double>& alpha,
1797  const Matrix<complex<double>, Prop0, ColUpTriang, Allocator0>& A,
1798  Matrix<complex<double>, Prop1, ColMajor, Allocator1>& B)
1799  {
1800 
1801 #ifdef SELDON_CHECK_DIMENSIONS
1802  CheckDim(Side, A, B, "Solve(side, alpha, A, B)");
1803 #endif
1804 
1805  cblas_ztrsm(CblasColMajor, Side.Cblas(), CblasUpper, CblasNoTrans, CblasNonUnit,
1806  B.GetM(), B.GetN(),
1807  reinterpret_cast<const void*>(&alpha),
1808  reinterpret_cast<const void*>(A.GetData()), A.GetM(),
1809  reinterpret_cast<void*>(B.GetData()), B.GetM());
1810  }
1811 
1812 
1813  /*** ColUpTriang ***/
1814 
1815 
1816  template <class Prop0, class Allocator0,
1817  class Prop1, class Allocator1>
1818  void Solve(const SeldonSide& Side,
1819  const float& alpha,
1820  const SeldonTranspose& TransA,
1821  const SeldonDiag& DiagA,
1822  const Matrix<float, Prop0, ColUpTriang, Allocator0>& A,
1823  Matrix<float, Prop1, ColMajor, Allocator1>& B)
1824  {
1825 
1826 #ifdef SELDON_CHECK_DIMENSIONS
1827  CheckDim(Side, A, B, "Solve(side, alpha, status, diag, A, B)");
1828 #endif
1829 
1830  cblas_strsm(CblasColMajor, Side.Cblas(), CblasUpper, TransA.Cblas(), DiagA.Cblas(),
1831  B.GetM(), B.GetN(),
1832  alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM());
1833  }
1834 
1835 
1836  template <class Prop0, class Allocator0,
1837  class Prop1, class Allocator1>
1838  void Solve(const SeldonSide& Side,
1839  const double& alpha,
1840  const SeldonTranspose& TransA,
1841  const SeldonDiag& DiagA,
1842  const Matrix<double, Prop0, ColUpTriang, Allocator0>& A,
1843  Matrix<double, Prop1, ColMajor, Allocator1>& B)
1844  {
1845 
1846 #ifdef SELDON_CHECK_DIMENSIONS
1847  CheckDim(Side, A, B, "Solve(side, alpha, status, diag, A, B)");
1848 #endif
1849 
1850  cblas_dtrsm(CblasColMajor, Side.Cblas(), CblasUpper, TransA.Cblas(), DiagA.Cblas(),
1851  B.GetM(), B.GetN(),
1852  alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM());
1853  }
1854 
1855 
1856  template <class Prop0, class Allocator0,
1857  class Prop1, class Allocator1>
1858  void Solve(const SeldonSide& Side,
1859  const complex<float>& alpha,
1860  const SeldonTranspose& TransA,
1861  const SeldonDiag& DiagA,
1862  const Matrix<complex<float>, Prop0, ColUpTriang, Allocator0>& A,
1863  Matrix<complex<float>, Prop1, ColMajor, Allocator1>& B)
1864  {
1865 
1866 #ifdef SELDON_CHECK_DIMENSIONS
1867  CheckDim(Side, A, B, "Solve(side, alpha, status, diag, A, B)");
1868 #endif
1869 
1870  cblas_ctrsm(CblasColMajor, Side.Cblas(), CblasUpper, TransA.Cblas(), DiagA.Cblas(),
1871  B.GetM(), B.GetN(),
1872  reinterpret_cast<const void*>(&alpha),
1873  reinterpret_cast<const void*>(A.GetData()), A.GetM(),
1874  reinterpret_cast<void*>(B.GetData()), B.GetM());
1875  }
1876 
1877 
1878  template <class Prop0, class Allocator0,
1879  class Prop1, class Allocator1>
1880  void Solve(const SeldonSide& Side,
1881  const complex<double>& alpha,
1882  const SeldonTranspose& TransA,
1883  const SeldonDiag& DiagA,
1884  const Matrix<complex<double>, Prop0, ColUpTriang, Allocator0>& A,
1885  Matrix<complex<double>, Prop1, ColMajor, Allocator1>& B)
1886  {
1887 
1888 #ifdef SELDON_CHECK_DIMENSIONS
1889  CheckDim(Side, A, B, "Solve(side, alpha, status, diag, A, B)");
1890 #endif
1891 
1892  cblas_ztrsm(CblasColMajor, Side.Cblas(), CblasUpper, TransA.Cblas(), DiagA.Cblas(),
1893  B.GetM(), B.GetN(),
1894  reinterpret_cast<const void*>(&alpha),
1895  reinterpret_cast<const void*>(A.GetData()), A.GetM(),
1896  reinterpret_cast<void*>(B.GetData()), B.GetM());
1897  }
1898 
1899 
1900  /*** ColLoTriang, NoTrans and NonUnit ***/
1901 
1902 
1903  template <class Prop0, class Allocator0,
1904  class Prop1, class Allocator1>
1905  void Solve(const SeldonSide& Side,
1906  const float& alpha,
1907  const Matrix<float, Prop0, ColLoTriang, Allocator0>& A,
1908  Matrix<float, Prop1, ColMajor, Allocator1>& B)
1909  {
1910 
1911 #ifdef SELDON_CHECK_DIMENSIONS
1912  CheckDim(Side, A, B, "Solve(side, alpha, A, B)");
1913 #endif
1914 
1915  cblas_strsm(CblasColMajor, Side.Cblas(), CblasLower, CblasNoTrans, CblasNonUnit,
1916  B.GetM(), B.GetN(),
1917  alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM());
1918  }
1919 
1920 
1921  template <class Prop0, class Allocator0,
1922  class Prop1, class Allocator1>
1923  void Solve(const SeldonSide& Side,
1924  const double& alpha,
1925  const Matrix<double, Prop0, ColLoTriang, Allocator0>& A,
1926  Matrix<double, Prop1, ColMajor, Allocator1>& B)
1927  {
1928 
1929 #ifdef SELDON_CHECK_DIMENSIONS
1930  CheckDim(Side, A, B, "Solve(side, alpha, A, B)");
1931 #endif
1932 
1933  cblas_dtrsm(CblasColMajor, Side.Cblas(), CblasLower, CblasNoTrans, CblasNonUnit,
1934  B.GetM(), B.GetN(),
1935  alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM());
1936  }
1937 
1938 
1939  template <class Prop0, class Allocator0,
1940  class Prop1, class Allocator1>
1941  void Solve(const SeldonSide& Side,
1942  const complex<float>& alpha,
1943  const Matrix<complex<float>, Prop0, ColLoTriang, Allocator0>& A,
1944  Matrix<complex<float>, Prop1, ColMajor, Allocator1>& B)
1945  {
1946 
1947 #ifdef SELDON_CHECK_DIMENSIONS
1948  CheckDim(Side, A, B, "Solve(side, alpha, A, B)");
1949 #endif
1950 
1951  cblas_ctrsm(CblasColMajor, Side.Cblas(), CblasLower, CblasNoTrans, CblasNonUnit,
1952  B.GetM(), B.GetN(),
1953  reinterpret_cast<const void*>(&alpha),
1954  reinterpret_cast<const void*>(A.GetData()), A.GetM(),
1955  reinterpret_cast<void*>(B.GetData()), B.GetM());
1956  }
1957 
1958 
1959  template <class Prop0, class Allocator0,
1960  class Prop1, class Allocator1>
1961  void Solve(const SeldonSide& Side,
1962  const complex<double>& alpha,
1963  const Matrix<complex<double>, Prop0, ColLoTriang, Allocator0>& A,
1964  Matrix<complex<double>, Prop1, ColMajor, Allocator1>& B)
1965  {
1966 
1967 #ifdef SELDON_CHECK_DIMENSIONS
1968  CheckDim(Side, A, B, "Solve(side, alpha, A, B)");
1969 #endif
1970 
1971  cblas_ztrsm(CblasColMajor, Side.Cblas(), CblasLower, CblasNoTrans, CblasNonUnit,
1972  B.GetM(), B.GetN(),
1973  reinterpret_cast<const void*>(&alpha),
1974  reinterpret_cast<const void*>(A.GetData()), A.GetM(),
1975  reinterpret_cast<void*>(B.GetData()), B.GetM());
1976  }
1977 
1978 
1979  /*** ColLoTriang ***/
1980 
1981 
1982  template <class Prop0, class Allocator0,
1983  class Prop1, class Allocator1>
1984  void Solve(const SeldonSide& Side,
1985  const float& alpha,
1986  const SeldonTranspose& TransA,
1987  const SeldonDiag& DiagA,
1988  const Matrix<float, Prop0, ColLoTriang, Allocator0>& A,
1989  Matrix<float, Prop1, ColMajor, Allocator1>& B)
1990  {
1991 
1992 #ifdef SELDON_CHECK_DIMENSIONS
1993  CheckDim(Side, A, B, "Solve(side, alpha, status, diag, A, B)");
1994 #endif
1995 
1996  cblas_strsm(CblasColMajor, Side.Cblas(), CblasLower, TransA.Cblas(), DiagA.Cblas(),
1997  B.GetM(), B.GetN(),
1998  alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM());
1999  }
2000 
2001 
2002  template <class Prop0, class Allocator0,
2003  class Prop1, class Allocator1>
2004  void Solve(const SeldonSide& Side,
2005  const double& alpha,
2006  const SeldonTranspose& TransA,
2007  const SeldonDiag& DiagA,
2008  const Matrix<double, Prop0, ColLoTriang, Allocator0>& A,
2009  Matrix<double, Prop1, ColMajor, Allocator1>& B)
2010  {
2011 
2012 #ifdef SELDON_CHECK_DIMENSIONS
2013  CheckDim(Side, A, B, "Solve(side, alpha, status, diag, A, B)");
2014 #endif
2015 
2016  cblas_dtrsm(CblasColMajor, Side.Cblas(), CblasLower, TransA.Cblas(), DiagA.Cblas(),
2017  B.GetM(), B.GetN(),
2018  alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM());
2019  }
2020 
2021 
2022  template <class Prop0, class Allocator0,
2023  class Prop1, class Allocator1>
2024  void Solve(const SeldonSide& Side,
2025  const complex<float>& alpha,
2026  const SeldonTranspose& TransA,
2027  const SeldonDiag& DiagA,
2028  const Matrix<complex<float>, Prop0, ColLoTriang, Allocator0>& A,
2029  Matrix<complex<float>, Prop1, ColMajor, Allocator1>& B)
2030  {
2031 
2032 #ifdef SELDON_CHECK_DIMENSIONS
2033  CheckDim(Side, A, B, "Solve(side, alpha, status, diag, A, B)");
2034 #endif
2035 
2036  cblas_ctrsm(CblasColMajor, Side.Cblas(), CblasLower, TransA.Cblas(), DiagA.Cblas(),
2037  B.GetM(), B.GetN(),
2038  reinterpret_cast<const void*>(&alpha),
2039  reinterpret_cast<const void*>(A.GetData()), A.GetM(),
2040  reinterpret_cast<void*>(B.GetData()), B.GetM());
2041  }
2042 
2043 
2044  template <class Prop0, class Allocator0,
2045  class Prop1, class Allocator1>
2046  void Solve(const SeldonSide& Side,
2047  const complex<double>& alpha,
2048  const SeldonTranspose& TransA,
2049  const SeldonDiag& DiagA,
2050  const Matrix<complex<double>, Prop0, ColLoTriang, Allocator0>& A,
2051  Matrix<complex<double>, Prop1, ColMajor, Allocator1>& B)
2052  {
2053 
2054 #ifdef SELDON_CHECK_DIMENSIONS
2055  CheckDim(Side, A, B, "Solve(side, alpha, status, diag, A, B)");
2056 #endif
2057 
2058  cblas_ztrsm(CblasColMajor, Side.Cblas(), CblasLower, TransA.Cblas(), DiagA.Cblas(),
2059  B.GetM(), B.GetN(),
2060  reinterpret_cast<const void*>(&alpha),
2061  reinterpret_cast<const void*>(A.GetData()), A.GetM(),
2062  reinterpret_cast<void*>(B.GetData()), B.GetM());
2063  }
2064 
2065 
2066  /*** RowUpTriang, NoTrans and NonUnit ***/
2067 
2068 
2069  template <class Prop0, class Allocator0,
2070  class Prop1, class Allocator1>
2071  void Solve(const SeldonSide& Side,
2072  const float& alpha,
2073  const Matrix<float, Prop0, RowUpTriang, Allocator0>& A,
2074  Matrix<float, Prop1, RowMajor, Allocator1>& B)
2075  {
2076 
2077 #ifdef SELDON_CHECK_DIMENSIONS
2078  CheckDim(Side, A, B, "Solve(side, alpha, A, B)");
2079 #endif
2080 
2081  cblas_strsm(CblasRowMajor, Side.Cblas(), CblasUpper, CblasNoTrans, CblasNonUnit,
2082  B.GetM(), B.GetN(),
2083  alpha, A.GetData(), A.GetN(), B.GetData(), B.GetN());
2084  }
2085 
2086 
2087  template <class Prop0, class Allocator0,
2088  class Prop1, class Allocator1>
2089  void Solve(const SeldonSide& Side,
2090  const double& alpha,
2091  const Matrix<double, Prop0, RowUpTriang, Allocator0>& A,
2092  Matrix<double, Prop1, RowMajor, Allocator1>& B)
2093  {
2094 
2095 #ifdef SELDON_CHECK_DIMENSIONS
2096  CheckDim(Side, A, B, "Solve(side, alpha, A, B)");
2097 #endif
2098 
2099  cblas_dtrsm(CblasRowMajor, Side.Cblas(), CblasUpper, CblasNoTrans, CblasNonUnit,
2100  B.GetM(), B.GetN(),
2101  alpha, A.GetData(), A.GetN(), B.GetData(), B.GetN());
2102  }
2103 
2104 
2105  template <class Prop0, class Allocator0,
2106  class Prop1, class Allocator1>
2107  void Solve(const SeldonSide& Side,
2108  const complex<float>& alpha,
2109  const Matrix<complex<float>, Prop0, RowUpTriang, Allocator0>& A,
2110  Matrix<complex<float>, Prop1, RowMajor, Allocator1>& B)
2111  {
2112 
2113 #ifdef SELDON_CHECK_DIMENSIONS
2114  CheckDim(Side, A, B, "Solve(side, alpha, A, B)");
2115 #endif
2116 
2117  cblas_ctrsm(CblasRowMajor, Side.Cblas(), CblasUpper, CblasNoTrans, CblasNonUnit,
2118  B.GetM(), B.GetN(),
2119  reinterpret_cast<const void*>(&alpha),
2120  reinterpret_cast<const void*>(A.GetData()), A.GetN(),
2121  reinterpret_cast<void*>(B.GetData()), B.GetN());
2122  }
2123 
2124 
2125  template <class Prop0, class Allocator0,
2126  class Prop1, class Allocator1>
2127  void Solve(const SeldonSide& Side,
2128  const complex<double>& alpha,
2129  const Matrix<complex<double>, Prop0, RowUpTriang, Allocator0>& A,
2130  Matrix<complex<double>, Prop1, RowMajor, Allocator1>& B)
2131  {
2132 
2133 #ifdef SELDON_CHECK_DIMENSIONS
2134  CheckDim(Side, A, B, "Solve(side, alpha, A, B)");
2135 #endif
2136 
2137  cblas_ztrsm(CblasRowMajor, Side.Cblas(), CblasUpper, CblasNoTrans, CblasNonUnit,
2138  B.GetM(), B.GetN(),
2139  reinterpret_cast<const void*>(&alpha),
2140  reinterpret_cast<const void*>(A.GetData()), A.GetN(),
2141  reinterpret_cast<void*>(B.GetData()), B.GetN());
2142  }
2143 
2144 
2145  /*** RowUpTriang ***/
2146 
2147 
2148  template <class Prop0, class Allocator0,
2149  class Prop1, class Allocator1>
2150  void Solve(const SeldonSide& Side,
2151  const float& alpha,
2152  const SeldonTranspose& TransA,
2153  const SeldonDiag& DiagA,
2154  const Matrix<float, Prop0, RowUpTriang, Allocator0>& A,
2155  Matrix<float, Prop1, RowMajor, Allocator1>& B)
2156  {
2157 
2158 #ifdef SELDON_CHECK_DIMENSIONS
2159  CheckDim(Side, A, B, "Solve(side, alpha, status, diag, A, B)");
2160 #endif
2161 
2162  cblas_strsm(CblasRowMajor, Side.Cblas(), CblasUpper, TransA.Cblas(), DiagA.Cblas(),
2163  B.GetM(), B.GetN(),
2164  alpha, A.GetData(), A.GetN(), B.GetData(), B.GetN());
2165  }
2166 
2167 
2168  template <class Prop0, class Allocator0,
2169  class Prop1, class Allocator1>
2170  void Solve(const SeldonSide& Side,
2171  const double& alpha,
2172  const SeldonTranspose& TransA,
2173  const SeldonDiag& DiagA,
2174  const Matrix<double, Prop0, RowUpTriang, Allocator0>& A,
2175  Matrix<double, Prop1, RowMajor, Allocator1>& B)
2176  {
2177 
2178 #ifdef SELDON_CHECK_DIMENSIONS
2179  CheckDim(Side, A, B, "Solve(side, alpha, status, diag, A, B)");
2180 #endif
2181 
2182  cblas_dtrsm(CblasRowMajor, Side.Cblas(), CblasUpper, TransA.Cblas(), DiagA.Cblas(),
2183  B.GetM(), B.GetN(),
2184  alpha, A.GetData(), A.GetN(), B.GetData(), B.GetN());
2185  }
2186 
2187 
2188  template <class Prop0, class Allocator0,
2189  class Prop1, class Allocator1>
2190  void Solve(const SeldonSide& Side,
2191  const complex<float>& alpha,
2192  const SeldonTranspose& TransA,
2193  const SeldonDiag& DiagA,
2194  const Matrix<complex<float>, Prop0, RowUpTriang, Allocator0>& A,
2195  Matrix<complex<float>, Prop1, RowMajor, Allocator1>& B)
2196  {
2197 
2198 #ifdef SELDON_CHECK_DIMENSIONS
2199  CheckDim(Side, A, B, "Solve(side, alpha, status, diag, A, B)");
2200 #endif
2201 
2202  cblas_ctrsm(CblasRowMajor, Side.Cblas(), CblasUpper, TransA.Cblas(), DiagA.Cblas(),
2203  B.GetM(), B.GetN(),
2204  reinterpret_cast<const void*>(&alpha),
2205  reinterpret_cast<const void*>(A.GetData()), A.GetN(),
2206  reinterpret_cast<void*>(B.GetData()), B.GetN());
2207  }
2208 
2209 
2210  template <class Prop0, class Allocator0,
2211  class Prop1, class Allocator1>
2212  void Solve(const SeldonSide& Side,
2213  const complex<double>& alpha,
2214  const SeldonTranspose& TransA,
2215  const SeldonDiag& DiagA,
2216  const Matrix<complex<double>, Prop0, RowUpTriang, Allocator0>& A,
2217  Matrix<complex<double>, Prop1, RowMajor, Allocator1>& B)
2218  {
2219 
2220 #ifdef SELDON_CHECK_DIMENSIONS
2221  CheckDim(Side, A, B, "Solve(side, alpha, status, diag, A, B)");
2222 #endif
2223 
2224  cblas_ztrsm(CblasRowMajor, Side.Cblas(), CblasUpper, TransA.Cblas(), DiagA.Cblas(),
2225  B.GetM(), B.GetN(),
2226  reinterpret_cast<const void*>(&alpha),
2227  reinterpret_cast<const void*>(A.GetData()), A.GetN(),
2228  reinterpret_cast<void*>(B.GetData()), B.GetN());
2229  }
2230 
2231 
2232  /*** RowLoTriang, NoTrans and NonUnit ***/
2233 
2234 
2235  template <class Prop0, class Allocator0,
2236  class Prop1, class Allocator1>
2237  void Solve(const SeldonSide& Side,
2238  const float& alpha,
2239  const Matrix<float, Prop0, RowLoTriang, Allocator0>& A,
2240  Matrix<float, Prop1, RowMajor, Allocator1>& B)
2241  {
2242 
2243 #ifdef SELDON_CHECK_DIMENSIONS
2244  CheckDim(Side, A, B, "Solve(side, alpha, A, B)");
2245 #endif
2246 
2247  cblas_strsm(CblasRowMajor, Side.Cblas(), CblasLower, CblasNoTrans, CblasNonUnit,
2248  B.GetM(), B.GetN(),
2249  alpha, A.GetData(), A.GetN(), B.GetData(), B.GetN());
2250  }
2251 
2252 
2253  template <class Prop0, class Allocator0,
2254  class Prop1, class Allocator1>
2255  void Solve(const SeldonSide& Side,
2256  const double& alpha,
2257  const Matrix<double, Prop0, RowLoTriang, Allocator0>& A,
2258  Matrix<double, Prop1, RowMajor, Allocator1>& B)
2259  {
2260 
2261 #ifdef SELDON_CHECK_DIMENSIONS
2262  CheckDim(Side, A, B, "Solve(side, alpha, A, B)");
2263 #endif
2264 
2265  cblas_dtrsm(CblasRowMajor, Side.Cblas(), CblasLower, CblasNoTrans, CblasNonUnit,
2266  B.GetM(), B.GetN(),
2267  alpha, A.GetData(), A.GetN(), B.GetData(), B.GetN());
2268  }
2269 
2270 
2271  template <class Prop0, class Allocator0,
2272  class Prop1, class Allocator1>
2273  void Solve(const SeldonSide& Side,
2274  const complex<float>& alpha,
2275  const Matrix<complex<float>, Prop0, RowLoTriang, Allocator0>& A,
2276  Matrix<complex<float>, Prop1, RowMajor, Allocator1>& B)
2277  {
2278 
2279 #ifdef SELDON_CHECK_DIMENSIONS
2280  CheckDim(Side, A, B, "Solve(side, alpha, A, B)");
2281 #endif
2282 
2283  cblas_ctrsm(CblasRowMajor, Side.Cblas(), CblasLower, CblasNoTrans, CblasNonUnit,
2284  B.GetM(), B.GetN(),
2285  reinterpret_cast<const void*>(&alpha),
2286  reinterpret_cast<const void*>(A.GetData()), A.GetN(),
2287  reinterpret_cast<void*>(B.GetData()), B.GetN());
2288  }
2289 
2290 
2291  template <class Prop0, class Allocator0,
2292  class Prop1, class Allocator1>
2293  void Solve(const SeldonSide& Side,
2294  const complex<double>& alpha,
2295  const Matrix<complex<double>, Prop0, RowLoTriang, Allocator0>& A,
2296  Matrix<complex<double>, Prop1, RowMajor, Allocator1>& B)
2297  {
2298 
2299 #ifdef SELDON_CHECK_DIMENSIONS
2300  CheckDim(Side, A, B, "Solve(side, alpha, A, B)");
2301 #endif
2302 
2303  cblas_ztrsm(CblasRowMajor, Side.Cblas(), CblasLower, CblasNoTrans, CblasNonUnit,
2304  B.GetM(), B.GetN(),
2305  reinterpret_cast<const void*>(&alpha),
2306  reinterpret_cast<const void*>(A.GetData()), A.GetN(),
2307  reinterpret_cast<void*>(B.GetData()), B.GetN());
2308  }
2309 
2310 
2311  /*** RowLoTriang ***/
2312 
2313 
2314  template <class Prop0, class Allocator0,
2315  class Prop1, class Allocator1>
2316  void Solve(const SeldonSide& Side,
2317  const float& alpha,
2318  const SeldonTranspose& TransA,
2319  const SeldonDiag& DiagA,
2320  const Matrix<float, Prop0, RowLoTriang, Allocator0>& A,
2321  Matrix<float, Prop1, RowMajor, Allocator1>& B)
2322  {
2323 
2324 #ifdef SELDON_CHECK_DIMENSIONS
2325  CheckDim(Side, A, B, "Solve(side, alpha, status, diag, A, B)");
2326 #endif
2327 
2328  cblas_strsm(CblasRowMajor, Side.Cblas(), CblasLower, TransA.Cblas(), DiagA.Cblas(),
2329  B.GetM(), B.GetN(),
2330  alpha, A.GetData(), A.GetN(), B.GetData(), B.GetN());
2331  }
2332 
2333 
2334  template <class Prop0, class Allocator0,
2335  class Prop1, class Allocator1>
2336  void Solve(const SeldonSide& Side,
2337  const double& alpha,
2338  const SeldonTranspose& TransA,
2339  const SeldonDiag& DiagA,
2340  const Matrix<double, Prop0, RowLoTriang, Allocator0>& A,
2341  Matrix<double, Prop1, RowMajor, Allocator1>& B)
2342  {
2343 
2344 #ifdef SELDON_CHECK_DIMENSIONS
2345  CheckDim(Side, A, B, "Solve(side, alpha, status, diag, A, B)");
2346 #endif
2347 
2348  cblas_dtrsm(CblasRowMajor, Side.Cblas(), CblasLower, TransA.Cblas(), DiagA.Cblas(),
2349  B.GetM(), B.GetN(),
2350  alpha, A.GetData(), A.GetN(), B.GetData(), B.GetN());
2351  }
2352 
2353 
2354  template <class Prop0, class Allocator0,
2355  class Prop1, class Allocator1>
2356  void Solve(const SeldonSide& Side,
2357  const complex<float>& alpha,
2358  const SeldonTranspose& TransA,
2359  const SeldonDiag& DiagA,
2360  const Matrix<complex<float>, Prop0, RowLoTriang, Allocator0>& A,
2361  Matrix<complex<float>, Prop1, RowMajor, Allocator1>& B)
2362  {
2363 
2364 #ifdef SELDON_CHECK_DIMENSIONS
2365  CheckDim(Side, A, B, "Solve(side, alpha, status, diag, A, B)");
2366 #endif
2367 
2368  cblas_ctrsm(CblasRowMajor, Side.Cblas(), CblasLower, TransA.Cblas(), DiagA.Cblas(),
2369  B.GetM(), B.GetN(),
2370  reinterpret_cast<const void*>(&alpha),
2371  reinterpret_cast<const void*>(A.GetData()), A.GetN(),
2372  reinterpret_cast<void*>(B.GetData()), B.GetN());
2373  }
2374 
2375 
2376  template <class Prop0, class Allocator0,
2377  class Prop1, class Allocator1>
2378  void Solve(const SeldonSide& Side,
2379  const complex<double>& alpha,
2380  const SeldonTranspose& TransA,
2381  const SeldonDiag& DiagA,
2382  const Matrix<complex<double>, Prop0, RowLoTriang, Allocator0>& A,
2383  Matrix<complex<double>, Prop1, RowMajor, Allocator1>& B)
2384  {
2385 
2386 #ifdef SELDON_CHECK_DIMENSIONS
2387  CheckDim(Side, A, B, "Solve(side, alpha, status, diag, A, B)");
2388 #endif
2389 
2390  cblas_ztrsm(CblasRowMajor, Side.Cblas(), CblasLower, TransA.Cblas(), DiagA.Cblas(),
2391  B.GetM(), B.GetN(),
2392  reinterpret_cast<const void*>(&alpha),
2393  reinterpret_cast<const void*>(A.GetData()), A.GetN(),
2394  reinterpret_cast<void*>(B.GetData()), B.GetN());
2395  }
2396 
2397 
2398  // Solve //
2400 
2401 
2402 } // namespace Seldon.
2403 
2404 #define SELDON_FILE_BLAS_3_CXX
2405 #endif
Seldon::CheckDim
void CheckDim(const Matrix< T0, Prop0, Storage0, Allocator0 > &A, const Matrix< T1, Prop1, Storage1, Allocator1 > &B, const Matrix< T2, Prop2, Storage2, Allocator2 > &C, string function)
Checks the compatibility of the dimensions.
Definition: Functions_Matrix.cxx:2132
Seldon
Seldon namespace.
Definition: Array.cxx:24
Seldon::MltAddMatrix
void MltAddMatrix(const T0 &alpha, const Matrix< T1, Prop1, Storage1, Allocator1 > &A, const Matrix< T2, Prop2, Storage2, Allocator2 > &B, const T3 &beta, Matrix< T4, Prop4, Storage4, Allocator4 > &C)
Multiplies two matrices, and adds the result to a third matrix.
Definition: Functions_Matrix.cxx:617