Blas_2.cxx
1 // Copyright (C) 2001-2011 Vivien Mallet
2 // Copyright (C) 2001-2011 Marc DuruflĂ©
3 //
4 // This file is part of the linear-algebra library Seldon,
5 // http://seldon.sourceforge.net/.
6 //
7 // Seldon is free software; you can redistribute it and/or modify it under the
8 // terms of the GNU Lesser General Public License as published by the Free
9 // Software Foundation; either version 2.1 of the License, or (at your option)
10 // any later version.
11 //
12 // Seldon is distributed in the hope that it will be useful, but WITHOUT ANY
13 // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
15 // more details.
16 //
17 // You should have received a copy of the GNU Lesser General Public License
18 // along with Seldon. If not, see http://www.gnu.org/licenses/.
19 
20 
21 #ifndef SELDON_FILE_BLAS_2_CXX
22 
23 
24 #include "Blas_2.hxx"
25 
26 
27 namespace Seldon
28 {
29 
30 
32  // MLT //
33 
34 
35  /*** ColUpTriang, NoTrans and NonUnit ***/
36 
37 
38  template <class Prop0, class Allocator0,
39  class Allocator1>
40  void Mlt(const Matrix<float, Prop0, ColUpTriang, Allocator0>& A,
41  Vector<float, VectFull, Allocator1>& X)
42  {
43 
44 #ifdef SELDON_CHECK_DIMENSIONS
45  CheckDim(A, X, "Mlt(M, X)");
46 #endif
47 
48  cblas_strmv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
49  A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1);
50  }
51 
52 
53  template <class Prop0, class Allocator0,
54  class Allocator1>
55  void Mlt(const Matrix<double, Prop0, ColUpTriang, Allocator0>& A,
56  Vector<double, VectFull, Allocator1>& X)
57  {
58 
59 #ifdef SELDON_CHECK_DIMENSIONS
60  CheckDim(A, X, "Mlt(M, X)");
61 #endif
62 
63  cblas_dtrmv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
64  A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1);
65  }
66 
67 
68  template <class Prop0, class Allocator0,
69  class Allocator1>
70  void
71  Mlt(const Matrix<complex<float>, Prop0, ColUpTriang, Allocator0>& A,
72  Vector<complex<float>, VectFull, Allocator1>& X)
73  {
74 
75 #ifdef SELDON_CHECK_DIMENSIONS
76  CheckDim(A, X, "Mlt(M, X)");
77 #endif
78 
79  cblas_ctrmv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
80  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
81  A.GetM(), reinterpret_cast<void*>(X.GetData()), 1);
82  }
83 
84 
85  template <class Prop0, class Allocator0,
86  class Allocator1>
87  void
88  Mlt(const Matrix<complex<double>, Prop0, ColUpTriang, Allocator0>& A,
89  Vector<complex<double>, VectFull, Allocator1>& X)
90  {
91 
92 #ifdef SELDON_CHECK_DIMENSIONS
93  CheckDim(A, X, "Mlt(M, X)");
94 #endif
95 
96  cblas_ztrmv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
97  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
98  A.GetM(), reinterpret_cast<void*>(X.GetData()), 1);
99  }
100 
101 
102  /*** ColUpTriang ***/
103 
104 
105  template <class Prop0, class Allocator0,
106  class Allocator1>
107  void Mlt(const SeldonTranspose& TransA,
108  const SeldonDiag& DiagA,
109  const Matrix<float, Prop0, ColUpTriang, Allocator0>& A,
110  Vector<float, VectFull, Allocator1>& X)
111  {
112 
113 #ifdef SELDON_CHECK_DIMENSIONS
114  CheckDim(A, X, "Mlt(status, diag, M, X)");
115 #endif
116 
117  cblas_strmv(CblasColMajor, CblasUpper, TransA.Cblas(), DiagA.Cblas(),
118  A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1);
119  }
120 
121 
122  template <class Prop0, class Allocator0,
123  class Allocator1>
124  void Mlt(const SeldonTranspose& TransA,
125  const SeldonDiag& DiagA,
126  const Matrix<double, Prop0, ColUpTriang, Allocator0>& A,
127  Vector<double, VectFull, Allocator1>& X)
128  {
129 
130 #ifdef SELDON_CHECK_DIMENSIONS
131  CheckDim(A, X, "Mlt(status, diag, M, X)");
132 #endif
133 
134  cblas_dtrmv(CblasColMajor, CblasUpper, TransA.Cblas(), DiagA.Cblas(),
135  A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1);
136  }
137 
138 
139  template <class Prop0, class Allocator0,
140  class Allocator1>
141  void
142  Mlt(const SeldonTranspose& TransA,
143  const SeldonDiag& DiagA,
144  const Matrix<complex<float>, Prop0, ColUpTriang, Allocator0>& A,
145  Vector<complex<float>, VectFull, Allocator1>& X)
146  {
147 
148 #ifdef SELDON_CHECK_DIMENSIONS
149  CheckDim(A, X, "Mlt(status, diag, M, X)");
150 #endif
151 
152  cblas_ctrmv(CblasColMajor, CblasUpper, TransA.Cblas(), DiagA.Cblas(),
153  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
154  A.GetM(), reinterpret_cast<void*>(X.GetData()), 1);
155  }
156 
157 
158  template <class Prop0, class Allocator0,
159  class Allocator1>
160  void
161  Mlt(const SeldonTranspose& TransA,
162  const SeldonDiag& DiagA,
163  const Matrix<complex<double>, Prop0, ColUpTriang, Allocator0>& A,
164  Vector<complex<double>, VectFull, Allocator1>& X)
165  {
166 
167 #ifdef SELDON_CHECK_DIMENSIONS
168  CheckDim(A, X, "Mlt(status, diag, M, X)");
169 #endif
170 
171  cblas_ztrmv(CblasColMajor, CblasUpper, TransA.Cblas(), DiagA.Cblas(),
172  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
173  A.GetM(), reinterpret_cast<void*>(X.GetData()), 1);
174  }
175 
176 
177  /*** ColLoTriang, NoTrans and NonUnit ***/
178 
179 
180  template <class Prop0, class Allocator0,
181  class Allocator1>
182  void Mlt(const Matrix<float, Prop0, ColLoTriang, Allocator0>& A,
183  Vector<float, VectFull, Allocator1>& X)
184  {
185 
186 #ifdef SELDON_CHECK_DIMENSIONS
187  CheckDim(A, X, "Mlt(M, X)");
188 #endif
189 
190  cblas_strmv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit,
191  A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1);
192  }
193 
194 
195  template <class Prop0, class Allocator0,
196  class Allocator1>
197  void Mlt(const Matrix<double, Prop0, ColLoTriang, Allocator0>& A,
198  Vector<double, VectFull, Allocator1>& X)
199  {
200 
201 #ifdef SELDON_CHECK_DIMENSIONS
202  CheckDim(A, X, "Mlt(M, X)");
203 #endif
204 
205  cblas_dtrmv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit,
206  A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1);
207  }
208 
209 
210  template <class Prop0, class Allocator0,
211  class Allocator1>
212  void
213  Mlt(const Matrix<complex<float>, Prop0, ColLoTriang, Allocator0>& A,
214  Vector<complex<float>, VectFull, Allocator1>& X)
215  {
216 
217 #ifdef SELDON_CHECK_DIMENSIONS
218  CheckDim(A, X, "Mlt(M, X)");
219 #endif
220 
221  cblas_ctrmv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit,
222  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
223  A.GetM(), reinterpret_cast<void*>(X.GetData()), 1);
224  }
225 
226 
227  template <class Prop0, class Allocator0,
228  class Allocator1>
229  void
230  Mlt(const Matrix<complex<double>, Prop0, ColLoTriang, Allocator0>& A,
231  Vector<complex<double>, VectFull, Allocator1>& X)
232  {
233 
234 #ifdef SELDON_CHECK_DIMENSIONS
235  CheckDim(A, X, "Mlt(M, X)");
236 #endif
237 
238  cblas_ztrmv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit,
239  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
240  A.GetM(), reinterpret_cast<void*>(X.GetData()), 1);
241  }
242 
243 
244  /*** ColLoTriang ***/
245 
246 
247  template <class Prop0, class Allocator0,
248  class Allocator1>
249  void Mlt(const SeldonTranspose& TransA,
250  const SeldonDiag& DiagA,
251  const Matrix<float, Prop0, ColLoTriang, Allocator0>& A,
252  Vector<float, VectFull, Allocator1>& X)
253  {
254 
255 #ifdef SELDON_CHECK_DIMENSIONS
256  CheckDim(A, X, "Mlt(status, diag, M, X)");
257 #endif
258 
259  cblas_strmv(CblasColMajor, CblasLower, TransA.Cblas(), DiagA.Cblas(),
260  A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1);
261  }
262 
263 
264  template <class Prop0, class Allocator0,
265  class Allocator1>
266  void Mlt(const SeldonTranspose& TransA,
267  const SeldonDiag& DiagA,
268  const Matrix<double, Prop0, ColLoTriang, Allocator0>& A,
269  Vector<double, VectFull, Allocator1>& X)
270  {
271 
272 #ifdef SELDON_CHECK_DIMENSIONS
273  CheckDim(A, X, "Mlt(status, diag, M, X)");
274 #endif
275 
276  cblas_dtrmv(CblasColMajor, CblasLower, TransA.Cblas(), DiagA.Cblas(),
277  A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1);
278  }
279 
280 
281  template <class Prop0, class Allocator0,
282  class Allocator1>
283  void
284  Mlt(const SeldonTranspose& TransA,
285  const SeldonDiag& DiagA,
286  const Matrix<complex<float>, Prop0, ColLoTriang, Allocator0>& A,
287  Vector<complex<float>, VectFull, Allocator1>& X)
288  {
289 
290 #ifdef SELDON_CHECK_DIMENSIONS
291  CheckDim(A, X, "Mlt(status, diag, M, X)");
292 #endif
293 
294  cblas_ctrmv(CblasColMajor, CblasLower, TransA.Cblas(), DiagA.Cblas(),
295  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
296  A.GetM(), reinterpret_cast<void*>(X.GetData()), 1);
297  }
298 
299 
300  template <class Prop0, class Allocator0,
301  class Allocator1>
302  void
303  Mlt(const SeldonTranspose& TransA,
304  const SeldonDiag& DiagA,
305  const Matrix<complex<double>, Prop0, ColLoTriang, Allocator0>& A,
306  Vector<complex<double>, VectFull, Allocator1>& X)
307  {
308 
309 #ifdef SELDON_CHECK_DIMENSIONS
310  CheckDim(A, X, "Mlt(status, diag, M, X)");
311 #endif
312 
313  cblas_ztrmv(CblasColMajor, CblasLower, TransA.Cblas(), DiagA.Cblas(),
314  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
315  A.GetM(), reinterpret_cast<void*>(X.GetData()), 1);
316  }
317 
318 
319  /*** RowUpTriang, NoTrans and NonUnit ***/
320 
321 
322  template <class Prop0, class Allocator0,
323  class Allocator1>
324  void Mlt(const Matrix<float, Prop0, RowUpTriang, Allocator0>& A,
325  Vector<float, VectFull, Allocator1>& X)
326  {
327 
328 #ifdef SELDON_CHECK_DIMENSIONS
329  CheckDim(A, X, "Mlt(M, X)");
330 #endif
331 
332  cblas_strmv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
333  A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1);
334  }
335 
336 
337  template <class Prop0, class Allocator0,
338  class Allocator1>
339  void Mlt(const Matrix<double, Prop0, RowUpTriang, Allocator0>& A,
340  Vector<double, VectFull, Allocator1>& X)
341  {
342 
343 #ifdef SELDON_CHECK_DIMENSIONS
344  CheckDim(A, X, "Mlt(M, X)");
345 #endif
346 
347  cblas_dtrmv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
348  A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1);
349  }
350 
351 
352  template <class Prop0, class Allocator0,
353  class Allocator1>
354  void
355  Mlt(const Matrix<complex<float>, Prop0, RowUpTriang, Allocator0>& A,
356  Vector<complex<float>, VectFull, Allocator1>& X)
357  {
358 
359 #ifdef SELDON_CHECK_DIMENSIONS
360  CheckDim(A, X, "Mlt(M, X)");
361 #endif
362 
363  cblas_ctrmv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
364  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
365  A.GetM(), reinterpret_cast<void*>(X.GetData()), 1);
366  }
367 
368 
369  template <class Prop0, class Allocator0,
370  class Allocator1>
371  void
372  Mlt(const Matrix<complex<double>, Prop0, RowUpTriang, Allocator0>& A,
373  Vector<complex<double>, VectFull, Allocator1>& X)
374  {
375 
376 #ifdef SELDON_CHECK_DIMENSIONS
377  CheckDim(A, X, "Mlt(M, X)");
378 #endif
379 
380  cblas_ztrmv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
381  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
382  A.GetM(), reinterpret_cast<void*>(X.GetData()), 1);
383  }
384 
385 
386  /*** RowUpTriang ***/
387 
388 
389  template <class Prop0, class Allocator0,
390  class Allocator1>
391  void Mlt(const SeldonTranspose& TransA,
392  const SeldonDiag& DiagA,
393  const Matrix<float, Prop0, RowUpTriang, Allocator0>& A,
394  Vector<float, VectFull, Allocator1>& X)
395  {
396 
397 #ifdef SELDON_CHECK_DIMENSIONS
398  CheckDim(A, X, "Mlt(status, diag, M, X)");
399 #endif
400 
401  cblas_strmv(CblasRowMajor, CblasUpper, TransA.Cblas(), DiagA.Cblas(),
402  A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1);
403  }
404 
405 
406  template <class Prop0, class Allocator0,
407  class Allocator1>
408  void Mlt(const SeldonTranspose& TransA,
409  const SeldonDiag& DiagA,
410  const Matrix<double, Prop0, RowUpTriang, Allocator0>& A,
411  Vector<double, VectFull, Allocator1>& X)
412  {
413 
414 #ifdef SELDON_CHECK_DIMENSIONS
415  CheckDim(A, X, "Mlt(status, diag, M, X)");
416 #endif
417 
418  cblas_dtrmv(CblasRowMajor, CblasUpper, TransA.Cblas(), DiagA.Cblas(),
419  A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1);
420  }
421 
422 
423  template <class Prop0, class Allocator0,
424  class Allocator1>
425  void
426  Mlt(const SeldonTranspose& TransA,
427  const SeldonDiag& DiagA,
428  const Matrix<complex<float>, Prop0, RowUpTriang, Allocator0>& A,
429  Vector<complex<float>, VectFull, Allocator1>& X)
430  {
431 
432 #ifdef SELDON_CHECK_DIMENSIONS
433  CheckDim(A, X, "Mlt(status, diag, M, X)");
434 #endif
435 
436  cblas_ctrmv(CblasRowMajor, CblasUpper, TransA.Cblas(), DiagA.Cblas(),
437  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
438  A.GetM(), reinterpret_cast<void*>(X.GetData()), 1);
439  }
440 
441 
442  template <class Prop0, class Allocator0,
443  class Allocator1>
444  void
445  Mlt(const SeldonTranspose& TransA,
446  const SeldonDiag& DiagA,
447  const Matrix<complex<double>, Prop0, RowUpTriang, Allocator0>& A,
448  Vector<complex<double>, VectFull, Allocator1>& X)
449  {
450 
451 #ifdef SELDON_CHECK_DIMENSIONS
452  CheckDim(A, X, "Mlt(status, diag, M, X)");
453 #endif
454 
455  cblas_ztrmv(CblasRowMajor, CblasUpper, TransA.Cblas(), DiagA.Cblas(),
456  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
457  A.GetM(), reinterpret_cast<void*>(X.GetData()), 1);
458  }
459 
460 
461  /*** RowLoTriang, NoTrans and NonUnit ***/
462 
463 
464  template <class Prop0, class Allocator0,
465  class Allocator1>
466  void Mlt(const Matrix<float, Prop0, RowLoTriang, Allocator0>& A,
467  Vector<float, VectFull, Allocator1>& X)
468  {
469 
470 #ifdef SELDON_CHECK_DIMENSIONS
471  CheckDim(A, X, "Mlt(M, X)");
472 #endif
473 
474  cblas_strmv(CblasRowMajor, CblasLower, CblasNoTrans, CblasNonUnit,
475  A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1);
476  }
477 
478 
479  template <class Prop0, class Allocator0,
480  class Allocator1>
481  void Mlt(const Matrix<double, Prop0, RowLoTriang, Allocator0>& A,
482  Vector<double, VectFull, Allocator1>& X)
483  {
484 
485 #ifdef SELDON_CHECK_DIMENSIONS
486  CheckDim(A, X, "Mlt(M, X)");
487 #endif
488 
489  cblas_dtrmv(CblasRowMajor, CblasLower, CblasNoTrans, CblasNonUnit,
490  A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1);
491  }
492 
493 
494  template <class Prop0, class Allocator0,
495  class Allocator1>
496  void
497  Mlt(const Matrix<complex<float>, Prop0, RowLoTriang, Allocator0>& A,
498  Vector<complex<float>, VectFull, Allocator1>& X)
499  {
500 
501 #ifdef SELDON_CHECK_DIMENSIONS
502  CheckDim(A, X, "Mlt(M, X)");
503 #endif
504 
505  cblas_ctrmv(CblasRowMajor, CblasLower, CblasNoTrans, CblasNonUnit,
506  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
507  A.GetM(), reinterpret_cast<void*>(X.GetData()), 1);
508  }
509 
510 
511  template <class Prop0, class Allocator0,
512  class Allocator1>
513  void
514  Mlt(const Matrix<complex<double>, Prop0, RowLoTriang, Allocator0>& A,
515  Vector<complex<double>, VectFull, Allocator1>& X)
516  {
517 
518 #ifdef SELDON_CHECK_DIMENSIONS
519  CheckDim(A, X, "Mlt(M, X)");
520 #endif
521 
522  cblas_ztrmv(CblasRowMajor, CblasLower, CblasNoTrans, CblasNonUnit,
523  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
524  A.GetM(), reinterpret_cast<void*>(X.GetData()), 1);
525  }
526 
527 
528  /*** RowLoTriang ***/
529 
530 
531  template <class Prop0, class Allocator0,
532  class Allocator1>
533  void Mlt(const SeldonTranspose& TransA,
534  const SeldonDiag& DiagA,
535  const Matrix<float, Prop0, RowLoTriang, Allocator0>& A,
536  Vector<float, VectFull, Allocator1>& X)
537  {
538 
539 #ifdef SELDON_CHECK_DIMENSIONS
540  CheckDim(A, X, "Mlt(status, diag, M, X)");
541 #endif
542 
543  cblas_strmv(CblasRowMajor, CblasLower, TransA.Cblas(), DiagA.Cblas(),
544  A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1);
545  }
546 
547 
548  template <class Prop0, class Allocator0,
549  class Allocator1>
550  void Mlt(const SeldonTranspose& TransA,
551  const SeldonDiag& DiagA,
552  const Matrix<double, Prop0, RowLoTriang, Allocator0>& A,
553  Vector<double, VectFull, Allocator1>& X)
554  {
555 
556 #ifdef SELDON_CHECK_DIMENSIONS
557  CheckDim(A, X, "Mlt(status, diag, M, X)");
558 #endif
559 
560  cblas_dtrmv(CblasRowMajor, CblasLower, TransA.Cblas(), DiagA.Cblas(),
561  A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1);
562  }
563 
564 
565  template <class Prop0, class Allocator0,
566  class Allocator1>
567  void
568  Mlt(const SeldonTranspose& TransA,
569  const SeldonDiag& DiagA,
570  const Matrix<complex<float>, Prop0, RowLoTriang, Allocator0>& A,
571  Vector<complex<float>, VectFull, Allocator1>& X)
572  {
573 
574 #ifdef SELDON_CHECK_DIMENSIONS
575  CheckDim(A, X, "Mlt(status, diag, M, X)");
576 #endif
577 
578  cblas_ctrmv(CblasRowMajor, CblasLower, TransA.Cblas(), DiagA.Cblas(),
579  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
580  A.GetM(), reinterpret_cast<void*>(X.GetData()), 1);
581  }
582 
583 
584  template <class Prop0, class Allocator0,
585  class Allocator1>
586  void
587  Mlt(const SeldonTranspose& TransA,
588  const SeldonDiag& DiagA,
589  const Matrix<complex<double>, Prop0, RowLoTriang, Allocator0>& A,
590  Vector<complex<double>, VectFull, Allocator1>& X)
591  {
592 
593 #ifdef SELDON_CHECK_DIMENSIONS
594  CheckDim(A, X, "Mlt(status, diag, M, X)");
595 #endif
596 
597  cblas_ztrmv(CblasRowMajor, CblasLower, TransA.Cblas(), DiagA.Cblas(),
598  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
599  A.GetM(), reinterpret_cast<void*>(X.GetData()), 1);
600  }
601 
602 
603  /*** ColUpTriangPacked, NoTrans and NonUnit ***/
604 
605 
606  template <class Prop0, class Allocator0,
607  class Allocator1>
608  void Mlt(const Matrix<float, Prop0, ColUpTriangPacked, Allocator0>& A,
609  Vector<float, VectFull, Allocator1>& X)
610  {
611 
612 #ifdef SELDON_CHECK_DIMENSIONS
613  CheckDim(A, X, "Mlt(M, X)");
614 #endif
615 
616  cblas_stpmv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
617  A.GetN(), A.GetData(), X.GetData(), 1);
618  }
619 
620 
621  template <class Prop0, class Allocator0,
622  class Allocator1>
623  void Mlt(const Matrix<double, Prop0, ColUpTriangPacked, Allocator0>& A,
624  Vector<double, VectFull, Allocator1>& X)
625  {
626 
627 #ifdef SELDON_CHECK_DIMENSIONS
628  CheckDim(A, X, "Mlt(M, X)");
629 #endif
630 
631  cblas_dtpmv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
632  A.GetN(), A.GetData(), X.GetData(), 1);
633  }
634 
635 
636  template <class Prop0, class Allocator0,
637  class Allocator1>
638  void
639  Mlt(const Matrix<complex<float>, Prop0, ColUpTriangPacked, Allocator0>& A,
640  Vector<complex<float>, VectFull, Allocator1>& X)
641  {
642 
643 #ifdef SELDON_CHECK_DIMENSIONS
644  CheckDim(A, X, "Mlt(M, X)");
645 #endif
646 
647  cblas_ctpmv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
648  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
649  reinterpret_cast<void*>(X.GetData()), 1);
650  }
651 
652 
653  template <class Prop0, class Allocator0,
654  class Allocator1>
655  void
656  Mlt(const Matrix<complex<double>, Prop0, ColUpTriangPacked, Allocator0>& A,
657  Vector<complex<double>, VectFull, Allocator1>& X)
658  {
659 
660 #ifdef SELDON_CHECK_DIMENSIONS
661  CheckDim(A, X, "Mlt(M, X)");
662 #endif
663 
664  cblas_ztpmv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
665  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
666  reinterpret_cast<void*>(X.GetData()), 1);
667  }
668 
669 
670  /*** ColUpTriangPacked ***/
671 
672 
673  template <class Prop0, class Allocator0,
674  class Allocator1>
675  void Mlt(const SeldonTranspose& TransA,
676  const SeldonDiag& DiagA,
677  const Matrix<float, Prop0, ColUpTriangPacked, Allocator0>& A,
678  Vector<float, VectFull, Allocator1>& X)
679  {
680 
681 #ifdef SELDON_CHECK_DIMENSIONS
682  CheckDim(A, X, "Mlt(status, diag, M, X)");
683 #endif
684 
685  cblas_stpmv(CblasColMajor, CblasUpper, TransA.Cblas(), DiagA.Cblas(),
686  A.GetN(), A.GetData(), X.GetData(), 1);
687  }
688 
689 
690  template <class Prop0, class Allocator0,
691  class Allocator1>
692  void Mlt(const SeldonTranspose& TransA,
693  const SeldonDiag& DiagA,
694  const Matrix<double, Prop0, ColUpTriangPacked, Allocator0>& A,
695  Vector<double, VectFull, Allocator1>& X)
696  {
697 
698 #ifdef SELDON_CHECK_DIMENSIONS
699  CheckDim(A, X, "Mlt(status, diag, M, X)");
700 #endif
701 
702  cblas_dtpmv(CblasColMajor, CblasUpper, TransA.Cblas(), DiagA.Cblas(),
703  A.GetN(), A.GetData(), X.GetData(), 1);
704  }
705 
706 
707  template <class Prop0, class Allocator0,
708  class Allocator1>
709  void
710  Mlt(const SeldonTranspose& TransA,
711  const SeldonDiag& DiagA,
712  const Matrix<complex<float>, Prop0, ColUpTriangPacked, Allocator0>& A,
713  Vector<complex<float>, VectFull, Allocator1>& X)
714  {
715 
716 #ifdef SELDON_CHECK_DIMENSIONS
717  CheckDim(A, X, "Mlt(status, diag, M, X)");
718 #endif
719 
720  cblas_ctpmv(CblasColMajor, CblasUpper, TransA.Cblas(), DiagA.Cblas(),
721  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
722  reinterpret_cast<void*>(X.GetData()), 1);
723  }
724 
725 
726  template <class Prop0, class Allocator0,
727  class Allocator1>
728  void
729  Mlt(const SeldonTranspose& TransA,
730  const SeldonDiag& DiagA,
731  const Matrix<complex<double>, Prop0, ColUpTriangPacked, Allocator0>& A,
732  Vector<complex<double>, VectFull, Allocator1>& X)
733  {
734 
735 #ifdef SELDON_CHECK_DIMENSIONS
736  CheckDim(A, X, "Mlt(status, diag, M, X)");
737 #endif
738 
739  cblas_ztpmv(CblasColMajor, CblasUpper, TransA.Cblas(), DiagA.Cblas(),
740  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
741  reinterpret_cast<void*>(X.GetData()), 1);
742  }
743 
744 
745  /*** ColLoTriangPacked, NoTrans and NonUnit ***/
746 
747 
748  template <class Prop0, class Allocator0,
749  class Allocator1>
750  void Mlt(const Matrix<float, Prop0, ColLoTriangPacked, Allocator0>& A,
751  Vector<float, VectFull, Allocator1>& X)
752  {
753 
754 #ifdef SELDON_CHECK_DIMENSIONS
755  CheckDim(A, X, "Mlt(M, X)");
756 #endif
757 
758  cblas_stpmv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit,
759  A.GetN(), A.GetData(), X.GetData(), 1);
760  }
761 
762 
763  template <class Prop0, class Allocator0,
764  class Allocator1>
765  void Mlt(const Matrix<double, Prop0, ColLoTriangPacked, Allocator0>& A,
766  Vector<double, VectFull, Allocator1>& X)
767  {
768 
769 #ifdef SELDON_CHECK_DIMENSIONS
770  CheckDim(A, X, "Mlt(M, X)");
771 #endif
772 
773  cblas_dtpmv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit,
774  A.GetN(), A.GetData(), X.GetData(), 1);
775  }
776 
777 
778  template <class Prop0, class Allocator0,
779  class Allocator1>
780  void
781  Mlt(const Matrix<complex<float>, Prop0, ColLoTriangPacked, Allocator0>& A,
782  Vector<complex<float>, VectFull, Allocator1>& X)
783  {
784 
785 #ifdef SELDON_CHECK_DIMENSIONS
786  CheckDim(A, X, "Mlt(M, X)");
787 #endif
788 
789  cblas_ctpmv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit,
790  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
791  reinterpret_cast<void*>(X.GetData()), 1);
792  }
793 
794 
795  template <class Prop0, class Allocator0,
796  class Allocator1>
797  void
798  Mlt(const Matrix<complex<double>, Prop0, ColLoTriangPacked, Allocator0>& A,
799  Vector<complex<double>, VectFull, Allocator1>& X)
800  {
801 
802 #ifdef SELDON_CHECK_DIMENSIONS
803  CheckDim(A, X, "Mlt(M, X)");
804 #endif
805 
806  cblas_ztpmv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit,
807  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
808  reinterpret_cast<void*>(X.GetData()), 1);
809  }
810 
811 
812  /*** ColLoTriangPacked ***/
813 
814 
815  template <class Prop0, class Allocator0,
816  class Allocator1>
817  void Mlt(const SeldonTranspose& TransA,
818  const SeldonDiag& DiagA,
819  const Matrix<float, Prop0, ColLoTriangPacked, Allocator0>& A,
820  Vector<float, VectFull, Allocator1>& X)
821  {
822 
823 #ifdef SELDON_CHECK_DIMENSIONS
824  CheckDim(A, X, "Mlt(status, diag, M, X)");
825 #endif
826 
827  cblas_stpmv(CblasColMajor, CblasLower, TransA.Cblas(), DiagA.Cblas(),
828  A.GetN(), A.GetData(), X.GetData(), 1);
829  }
830 
831 
832  template <class Prop0, class Allocator0,
833  class Allocator1>
834  void Mlt(const SeldonTranspose& TransA,
835  const SeldonDiag& DiagA,
836  const Matrix<double, Prop0, ColLoTriangPacked, Allocator0>& A,
837  Vector<double, VectFull, Allocator1>& X)
838  {
839 
840 #ifdef SELDON_CHECK_DIMENSIONS
841  CheckDim(A, X, "Mlt(status, diag, M, X)");
842 #endif
843 
844  cblas_dtpmv(CblasColMajor, CblasLower, TransA.Cblas(), DiagA.Cblas(),
845  A.GetN(), A.GetData(), X.GetData(), 1);
846  }
847 
848 
849  template <class Prop0, class Allocator0,
850  class Allocator1>
851  void
852  Mlt(const SeldonTranspose& TransA,
853  const SeldonDiag& DiagA,
854  const Matrix<complex<float>, Prop0, ColLoTriangPacked, Allocator0>& A,
855  Vector<complex<float>, VectFull, Allocator1>& X)
856  {
857 
858 #ifdef SELDON_CHECK_DIMENSIONS
859  CheckDim(A, X, "Mlt(status, diag, M, X)");
860 #endif
861 
862  cblas_ctpmv(CblasColMajor, CblasLower, TransA.Cblas(), DiagA.Cblas(),
863  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
864  reinterpret_cast<void*>(X.GetData()), 1);
865  }
866 
867 
868  template <class Prop0, class Allocator0,
869  class Allocator1>
870  void
871  Mlt(const SeldonTranspose& TransA,
872  const SeldonDiag& DiagA,
873  const Matrix<complex<double>, Prop0, ColLoTriangPacked, Allocator0>& A,
874  Vector<complex<double>, VectFull, Allocator1>& X)
875  {
876 
877 #ifdef SELDON_CHECK_DIMENSIONS
878  CheckDim(A, X, "Mlt(status, diag, M, X)");
879 #endif
880 
881  cblas_ztpmv(CblasColMajor, CblasLower, TransA.Cblas(), DiagA.Cblas(),
882  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
883  reinterpret_cast<void*>(X.GetData()), 1);
884  }
885 
886 
887  /*** RowUpTriangPacked, NoTrans and NonUnit ***/
888 
889 
890  template <class Prop0, class Allocator0,
891  class Allocator1>
892  void Mlt(const Matrix<float, Prop0, RowUpTriangPacked, Allocator0>& A,
893  Vector<float, VectFull, Allocator1>& X)
894  {
895 
896 #ifdef SELDON_CHECK_DIMENSIONS
897  CheckDim(A, X, "Mlt(M, X)");
898 #endif
899 
900  cblas_stpmv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
901  A.GetN(), A.GetData(), X.GetData(), 1);
902  }
903 
904 
905  template <class Prop0, class Allocator0,
906  class Allocator1>
907  void Mlt(const Matrix<double, Prop0, RowUpTriangPacked, Allocator0>& A,
908  Vector<double, VectFull, Allocator1>& X)
909  {
910 
911 #ifdef SELDON_CHECK_DIMENSIONS
912  CheckDim(A, X, "Mlt(M, X)");
913 #endif
914 
915  cblas_dtpmv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
916  A.GetN(), A.GetData(), X.GetData(), 1);
917  }
918 
919 
920  template <class Prop0, class Allocator0,
921  class Allocator1>
922  void
923  Mlt(const Matrix<complex<float>, Prop0, RowUpTriangPacked, Allocator0>& A,
924  Vector<complex<float>, VectFull, Allocator1>& X)
925  {
926 
927 #ifdef SELDON_CHECK_DIMENSIONS
928  CheckDim(A, X, "Mlt(M, X)");
929 #endif
930 
931  cblas_ctpmv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
932  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
933  reinterpret_cast<void*>(X.GetData()), 1);
934  }
935 
936 
937  template <class Prop0, class Allocator0,
938  class Allocator1>
939  void
940  Mlt(const Matrix<complex<double>, Prop0, RowUpTriangPacked, Allocator0>& A,
941  Vector<complex<double>, VectFull, Allocator1>& X)
942  {
943 
944 #ifdef SELDON_CHECK_DIMENSIONS
945  CheckDim(A, X, "Mlt(M, X)");
946 #endif
947 
948  cblas_ztpmv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
949  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
950  reinterpret_cast<void*>(X.GetData()), 1);
951  }
952 
953 
954  /*** RowUpTriangPacked ***/
955 
956 
957  template <class Prop0, class Allocator0,
958  class Allocator1>
959  void Mlt(const SeldonTranspose& TransA,
960  const SeldonDiag& DiagA,
961  const Matrix<float, Prop0, RowUpTriangPacked, Allocator0>& A,
962  Vector<float, VectFull, Allocator1>& X)
963  {
964 
965 #ifdef SELDON_CHECK_DIMENSIONS
966  CheckDim(A, X, "Mlt(status, diag, M, X)");
967 #endif
968 
969  cblas_stpmv(CblasRowMajor, CblasUpper, TransA.Cblas(), DiagA.Cblas(),
970  A.GetN(), A.GetData(), X.GetData(), 1);
971  }
972 
973 
974  template <class Prop0, class Allocator0,
975  class Allocator1>
976  void Mlt(const SeldonTranspose& TransA,
977  const SeldonDiag& DiagA,
978  const Matrix<double, Prop0, RowUpTriangPacked, Allocator0>& A,
979  Vector<double, VectFull, Allocator1>& X)
980  {
981 
982 #ifdef SELDON_CHECK_DIMENSIONS
983  CheckDim(A, X, "Mlt(status, diag, M, X)");
984 #endif
985 
986  cblas_dtpmv(CblasRowMajor, CblasUpper, TransA.Cblas(), DiagA.Cblas(),
987  A.GetN(), A.GetData(), X.GetData(), 1);
988  }
989 
990 
991  template <class Prop0, class Allocator0,
992  class Allocator1>
993  void
994  Mlt(const SeldonTranspose& TransA,
995  const SeldonDiag& DiagA,
996  const Matrix<complex<float>, Prop0, RowUpTriangPacked, Allocator0>& A,
997  Vector<complex<float>, VectFull, Allocator1>& X)
998  {
999 
1000 #ifdef SELDON_CHECK_DIMENSIONS
1001  CheckDim(A, X, "Mlt(status, diag, M, X)");
1002 #endif
1003 
1004  cblas_ctpmv(CblasRowMajor, CblasUpper, TransA.Cblas(), DiagA.Cblas(),
1005  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
1006  reinterpret_cast<void*>(X.GetData()), 1);
1007  }
1008 
1009 
1010  template <class Prop0, class Allocator0,
1011  class Allocator1>
1012  void
1013  Mlt(const SeldonTranspose& TransA,
1014  const SeldonDiag& DiagA,
1015  const Matrix<complex<double>, Prop0, RowUpTriangPacked, Allocator0>& A,
1016  Vector<complex<double>, VectFull, Allocator1>& X)
1017  {
1018 
1019 #ifdef SELDON_CHECK_DIMENSIONS
1020  CheckDim(A, X, "Mlt(status, diag, M, X)");
1021 #endif
1022 
1023  cblas_ztpmv(CblasRowMajor, CblasUpper, TransA.Cblas(), DiagA.Cblas(),
1024  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
1025  reinterpret_cast<void*>(X.GetData()), 1);
1026  }
1027 
1028 
1029  /*** RowLoTriangPacked, NoTrans and NonUnit ***/
1030 
1031 
1032  template <class Prop0, class Allocator0,
1033  class Allocator1>
1034  void Mlt(const Matrix<float, Prop0, RowLoTriangPacked, Allocator0>& A,
1035  Vector<float, VectFull, Allocator1>& X)
1036  {
1037 
1038 #ifdef SELDON_CHECK_DIMENSIONS
1039  CheckDim(A, X, "Mlt(M, X)");
1040 #endif
1041 
1042  cblas_stpmv(CblasRowMajor, CblasLower, CblasNoTrans, CblasNonUnit,
1043  A.GetN(), A.GetData(), X.GetData(), 1);
1044  }
1045 
1046 
1047  template <class Prop0, class Allocator0,
1048  class Allocator1>
1049  void Mlt(const Matrix<double, Prop0, RowLoTriangPacked, Allocator0>& A,
1050  Vector<double, VectFull, Allocator1>& X)
1051  {
1052 
1053 #ifdef SELDON_CHECK_DIMENSIONS
1054  CheckDim(A, X, "Mlt(M, X)");
1055 #endif
1056 
1057  cblas_dtpmv(CblasRowMajor, CblasLower, CblasNoTrans, CblasNonUnit,
1058  A.GetN(), A.GetData(), X.GetData(), 1);
1059  }
1060 
1061 
1062  template <class Prop0, class Allocator0,
1063  class Allocator1>
1064  void
1065  Mlt(const Matrix<complex<float>, Prop0, RowLoTriangPacked, Allocator0>& A,
1066  Vector<complex<float>, VectFull, Allocator1>& X)
1067  {
1068 
1069 #ifdef SELDON_CHECK_DIMENSIONS
1070  CheckDim(A, X, "Mlt(M, X)");
1071 #endif
1072 
1073  cblas_ctpmv(CblasRowMajor, CblasLower, CblasNoTrans, CblasNonUnit,
1074  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
1075  reinterpret_cast<void*>(X.GetData()), 1);
1076  }
1077 
1078 
1079  template <class Prop0, class Allocator0,
1080  class Allocator1>
1081  void
1082  Mlt(const Matrix<complex<double>, Prop0, RowLoTriangPacked, Allocator0>& A,
1083  Vector<complex<double>, VectFull, Allocator1>& X)
1084  {
1085 
1086 #ifdef SELDON_CHECK_DIMENSIONS
1087  CheckDim(A, X, "Mlt(M, X)");
1088 #endif
1089 
1090  cblas_ztpmv(CblasRowMajor, CblasLower, CblasNoTrans, CblasNonUnit,
1091  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
1092  reinterpret_cast<void*>(X.GetData()), 1);
1093  }
1094 
1095 
1096  /*** RowLoTriangPacked ***/
1097 
1098 
1099  template <class Prop0, class Allocator0,
1100  class Allocator1>
1101  void Mlt(const SeldonTranspose& TransA,
1102  const SeldonDiag& DiagA,
1103  const Matrix<float, Prop0, RowLoTriangPacked, Allocator0>& A,
1104  Vector<float, VectFull, Allocator1>& X)
1105  {
1106 
1107 #ifdef SELDON_CHECK_DIMENSIONS
1108  CheckDim(A, X, "Mlt(status, diag, M, X)");
1109 #endif
1110 
1111  cblas_stpmv(CblasRowMajor, CblasLower, TransA.Cblas(), DiagA.Cblas(),
1112  A.GetN(), A.GetData(), X.GetData(), 1);
1113  }
1114 
1115 
1116  template <class Prop0, class Allocator0,
1117  class Allocator1>
1118  void Mlt(const SeldonTranspose& TransA,
1119  const SeldonDiag& DiagA,
1120  const Matrix<double, Prop0, RowLoTriangPacked, Allocator0>& A,
1121  Vector<double, VectFull, Allocator1>& X)
1122  {
1123 
1124 #ifdef SELDON_CHECK_DIMENSIONS
1125  CheckDim(A, X, "Mlt(status, diag, M, X)");
1126 #endif
1127 
1128  cblas_dtpmv(CblasRowMajor, CblasLower, TransA.Cblas(), DiagA.Cblas(),
1129  A.GetN(), A.GetData(), X.GetData(), 1);
1130  }
1131 
1132 
1133  template <class Prop0, class Allocator0,
1134  class Allocator1>
1135  void
1136  Mlt(const SeldonTranspose& TransA,
1137  const SeldonDiag& DiagA,
1138  const Matrix<complex<float>, Prop0, RowLoTriangPacked, Allocator0>& A,
1139  Vector<complex<float>, VectFull, Allocator1>& X)
1140  {
1141 
1142 #ifdef SELDON_CHECK_DIMENSIONS
1143  CheckDim(A, X, "Mlt(status, diag, M, X)");
1144 #endif
1145 
1146  cblas_ctpmv(CblasRowMajor, CblasLower, TransA.Cblas(), DiagA.Cblas(),
1147  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
1148  reinterpret_cast<void*>(X.GetData()), 1);
1149  }
1150 
1151 
1152  template <class Prop0, class Allocator0,
1153  class Allocator1>
1154  void
1155  Mlt(const SeldonTranspose& TransA,
1156  const SeldonDiag& DiagA,
1157  const Matrix<complex<double>, Prop0, RowLoTriangPacked, Allocator0>& A,
1158  Vector<complex<double>, VectFull, Allocator1>& X)
1159  {
1160 
1161 #ifdef SELDON_CHECK_DIMENSIONS
1162  CheckDim(A, X, "Mlt(status, diag, M, X)");
1163 #endif
1164 
1165  cblas_ztpmv(CblasRowMajor, CblasLower, TransA.Cblas(), DiagA.Cblas(),
1166  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
1167  reinterpret_cast<void*>(X.GetData()), 1);
1168  }
1169 
1170 
1171  // MLT //
1173 
1174 
1175 
1177  // MLTADD //
1178 
1179 
1180  // General //
1181 
1182  /*** ColMajor and NoTrans ***/
1183 
1184 
1185  template <class Prop0, class Allocator0,
1186  class Allocator1, class Allocator2>
1187  void MltAddVector(const float& alpha,
1188  const Matrix<float, Prop0, ColMajor, Allocator0>& A,
1189  const Vector<float, VectFull, Allocator1>& X,
1190  const float& beta,
1191  Vector<float, VectFull, Allocator2>& Y)
1192  {
1193 
1194 #ifdef SELDON_CHECK_DIMENSIONS
1195  CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)");
1196 #endif
1197 
1198  cblas_sgemv(CblasColMajor, CblasNoTrans,
1199  A.GetM(), A.GetN(), alpha, A.GetData(), A.GetLD(),
1200  X.GetData(), 1, beta, Y.GetData(), 1);
1201  }
1202 
1203 
1204  template <class Prop0, class Allocator0,
1205  class Allocator1, class Allocator2>
1206  void MltAddVector(const double& alpha,
1207  const Matrix<double, Prop0, ColMajor, Allocator0>& A,
1208  const Vector<double, VectFull, Allocator1>& X,
1209  const double& beta,
1210  Vector<double, VectFull, Allocator2>& Y)
1211  {
1212 
1213 #ifdef SELDON_CHECK_DIMENSIONS
1214  CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)");
1215 #endif
1216 
1217  cblas_dgemv(CblasColMajor, CblasNoTrans,
1218  A.GetM(), A.GetN(), alpha, A.GetData(), A.GetLD(),
1219  X.GetData(), 1, beta, Y.GetData(), 1);
1220  }
1221 
1222 
1223  template <class Prop0, class Allocator0,
1224  class Allocator1, class Allocator2>
1225  void MltAddVector(const complex<float>& alpha,
1226  const Matrix<complex<float>, Prop0, ColMajor, Allocator0>& A,
1227  const Vector<complex<float>, VectFull, Allocator1>& X,
1228  const complex<float>& beta,
1229  Vector<complex<float>, VectFull, Allocator2>& Y)
1230  {
1231 
1232 #ifdef SELDON_CHECK_DIMENSIONS
1233  CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)");
1234 #endif
1235 
1236  cblas_cgemv(CblasColMajor, CblasNoTrans,
1237  A.GetM(), A.GetN(), reinterpret_cast<const void*>(&alpha),
1238  reinterpret_cast<const void*>(A.GetData()), A.GetLD(),
1239  reinterpret_cast<const void*>(X.GetData()), 1,
1240  reinterpret_cast<const void*>(&beta),
1241  reinterpret_cast<void*>(Y.GetData()), 1);
1242  }
1243 
1244 
1245  template <class Prop0, class Allocator0,
1246  class Allocator1, class Allocator2>
1247  void MltAddVector(const complex<double>& alpha,
1248  const Matrix<complex<double>, Prop0, ColMajor, Allocator0>& A,
1249  const Vector<complex<double>, VectFull, Allocator1>& X,
1250  const complex<double>& beta,
1251  Vector<complex<double>, VectFull, Allocator2>& Y)
1252  {
1253 
1254 #ifdef SELDON_CHECK_DIMENSIONS
1255  CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)");
1256 #endif
1257 
1258  cblas_zgemv(CblasColMajor, CblasNoTrans,
1259  A.GetM(), A.GetN(), reinterpret_cast<const void*>(&alpha),
1260  reinterpret_cast<const void*>(A.GetData()), A.GetLD(),
1261  reinterpret_cast<const void*>(X.GetData()), 1,
1262  reinterpret_cast<const void*>(&beta),
1263  reinterpret_cast<void*>(Y.GetData()), 1);
1264  }
1265 
1266 
1267  /*** ColMajor and TransA ***/
1268 
1269 
1270  template <class Prop0, class Allocator0,
1271  class Allocator1, class Allocator2>
1272  void MltAddVector(const float& alpha,
1273  const SeldonTranspose& TransA,
1274  const Matrix<float, Prop0, ColMajor, Allocator0>& A,
1275  const Vector<float, VectFull, Allocator1>& X,
1276  const float& beta,
1277  Vector<float, VectFull, Allocator2>& Y)
1278  {
1279 
1280 #ifdef SELDON_CHECK_DIMENSIONS
1281  CheckDim(TransA, A, X, Y, "MltAdd(alpha, status, M, X, beta, Y)");
1282 #endif
1283 
1284  cblas_sgemv(CblasColMajor, TransA.Cblas(),
1285  A.GetM(), A.GetN(), alpha, A.GetData(), A.GetLD(),
1286  X.GetData(), 1, beta, Y.GetData(), 1);
1287  }
1288 
1289 
1290  template <class Prop0, class Allocator0,
1291  class Allocator1, class Allocator2>
1292  void MltAddVector(const double& alpha,
1293  const SeldonTranspose& TransA,
1294  const Matrix<double, Prop0, ColMajor, Allocator0>& A,
1295  const Vector<double, VectFull, Allocator1>& X,
1296  const double& beta,
1297  Vector<double, VectFull, Allocator2>& Y)
1298  {
1299 
1300 #ifdef SELDON_CHECK_DIMENSIONS
1301  CheckDim(TransA, A, X, Y, "MltAdd(alpha, status, M, X, beta, Y)");
1302 #endif
1303 
1304  cblas_dgemv(CblasColMajor, TransA.Cblas(),
1305  A.GetM(), A.GetN(), alpha, A.GetData(), A.GetLD(),
1306  X.GetData(), 1, beta, Y.GetData(), 1);
1307  }
1308 
1309 
1310  template <class Prop0, class Allocator0,
1311  class Allocator1, class Allocator2>
1312  void MltAddVector(const complex<float>& alpha,
1313  const SeldonTranspose& TransA,
1314  const Matrix<complex<float>, Prop0, ColMajor, Allocator0>& A,
1315  const Vector<complex<float>, VectFull, Allocator1>& X,
1316  const complex<float>& beta,
1317  Vector<complex<float>, VectFull, Allocator2>& Y)
1318  {
1319 
1320 #ifdef SELDON_CHECK_DIMENSIONS
1321  CheckDim(TransA, A, X, Y, "MltAdd(alpha, status, M, X, beta, Y)");
1322 #endif
1323 
1324  cblas_cgemv(CblasColMajor, TransA.Cblas(),
1325  A.GetM(), A.GetN(), reinterpret_cast<const void*>(&alpha),
1326  reinterpret_cast<const void*>(A.GetData()), A.GetLD(),
1327  reinterpret_cast<const void*>(X.GetData()), 1,
1328  reinterpret_cast<const void*>(&beta),
1329  reinterpret_cast<void*>(Y.GetData()), 1);
1330  }
1331 
1332 
1333  template <class Prop0, class Allocator0,
1334  class Allocator1, class Allocator2>
1335  void MltAddVector(const complex<double>& alpha,
1336  const SeldonTranspose& TransA,
1337  const Matrix<complex<double>, Prop0, ColMajor, Allocator0>& A,
1338  const Vector<complex<double>, VectFull, Allocator1>& X,
1339  const complex<double>& beta,
1340  Vector<complex<double>, VectFull, Allocator2>& Y)
1341  {
1342 
1343 #ifdef SELDON_CHECK_DIMENSIONS
1344  CheckDim(TransA, A, X, Y, "MltAdd(alpha, status, M, X, beta, Y)");
1345 #endif
1346 
1347  cblas_zgemv(CblasColMajor, TransA.Cblas(),
1348  A.GetM(), A.GetN(), reinterpret_cast<const void*>(&alpha),
1349  reinterpret_cast<const void*>(A.GetData()), A.GetLD(),
1350  reinterpret_cast<const void*>(X.GetData()), 1,
1351  reinterpret_cast<const void*>(&beta),
1352  reinterpret_cast<void*>(Y.GetData()), 1);
1353  }
1354 
1355 
1356  /*** RowMajor and NoTrans ***/
1357 
1358 
1359  template <class Prop0, class Allocator0,
1360  class Allocator1, class Allocator2>
1361  void MltAddVector(const float& alpha,
1362  const Matrix<float, Prop0, RowMajor, Allocator0>& A,
1363  const Vector<float, VectFull, Allocator1>& X,
1364  const float& beta,
1365  Vector<float, VectFull, Allocator2>& Y)
1366  {
1367 
1368 #ifdef SELDON_CHECK_DIMENSIONS
1369  CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)");
1370 #endif
1371 
1372  cblas_sgemv(CblasRowMajor, CblasNoTrans,
1373  A.GetM(), A.GetN(), alpha, A.GetData(), A.GetLD(),
1374  X.GetData(), 1, beta, Y.GetData(), 1);
1375  }
1376 
1377 
1378  template <class Prop0, class Allocator0,
1379  class Allocator1, class Allocator2>
1380  void MltAddVector(const double& alpha,
1381  const Matrix<double, Prop0, RowMajor, Allocator0>& A,
1382  const Vector<double, VectFull, Allocator1>& X,
1383  const double& beta,
1384  Vector<double, VectFull, Allocator2>& Y)
1385  {
1386 
1387 #ifdef SELDON_CHECK_DIMENSIONS
1388  CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)");
1389 #endif
1390 
1391  cblas_dgemv(CblasRowMajor, CblasNoTrans,
1392  A.GetM(), A.GetN(), alpha, A.GetData(), A.GetLD(),
1393  X.GetData(), 1, beta, Y.GetData(), 1);
1394  }
1395 
1396 
1397  template <class Prop0, class Allocator0,
1398  class Allocator1, class Allocator2>
1399  void MltAddVector(const complex<float>& alpha,
1400  const Matrix<complex<float>, Prop0, RowMajor, Allocator0>& A,
1401  const Vector<complex<float>, VectFull, Allocator1>& X,
1402  const complex<float>& beta,
1403  Vector<complex<float>, VectFull, Allocator2>& Y)
1404  {
1405 
1406 #ifdef SELDON_CHECK_DIMENSIONS
1407  CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)");
1408 #endif
1409 
1410  cblas_cgemv(CblasRowMajor, CblasNoTrans,
1411  A.GetM(), A.GetN(), reinterpret_cast<const void*>(&alpha),
1412  reinterpret_cast<const void*>(A.GetData()), A.GetLD(),
1413  reinterpret_cast<const void*>(X.GetData()), 1,
1414  reinterpret_cast<const void*>(&beta),
1415  reinterpret_cast<void*>(Y.GetData()), 1);
1416  }
1417 
1418 
1419  template <class Prop0, class Allocator0,
1420  class Allocator1, class Allocator2>
1421  void MltAddVector(const complex<double>& alpha,
1422  const Matrix<complex<double>, Prop0, RowMajor, Allocator0>& A,
1423  const Vector<complex<double>, VectFull, Allocator1>& X,
1424  const complex<double>& beta,
1425  Vector<complex<double>, VectFull, Allocator2>& Y)
1426  {
1427 
1428 #ifdef SELDON_CHECK_DIMENSIONS
1429  CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)");
1430 #endif
1431 
1432  cblas_zgemv(CblasRowMajor, CblasNoTrans,
1433  A.GetM(), A.GetN(), reinterpret_cast<const void*>(&alpha),
1434  reinterpret_cast<const void*>(A.GetData()), A.GetLD(),
1435  reinterpret_cast<const void*>(X.GetData()), 1,
1436  reinterpret_cast<const void*>(&beta),
1437  reinterpret_cast<void*>(Y.GetData()), 1);
1438  }
1439 
1440 
1441  /*** RowMajor and TransA ***/
1442 
1443 
1444  template <class Prop0, class Allocator0,
1445  class Allocator1, class Allocator2>
1446  void MltAddVector(const float& alpha,
1447  const SeldonTranspose& TransA,
1448  const Matrix<float, Prop0, RowMajor, Allocator0>& A,
1449  const Vector<float, VectFull, Allocator1>& X,
1450  const float& beta,
1451  Vector<float, VectFull, Allocator2>& Y)
1452  {
1453 
1454 #ifdef SELDON_CHECK_DIMENSIONS
1455  CheckDim(TransA, A, X, Y, "MltAdd(alpha, status, M, X, beta, Y)");
1456 #endif
1457 
1458  cblas_sgemv(CblasRowMajor, TransA.Cblas(),
1459  A.GetM(), A.GetN(), alpha, A.GetData(), A.GetLD(),
1460  X.GetData(), 1, beta, Y.GetData(), 1);
1461  }
1462 
1463 
1464  template <class Prop0, class Allocator0,
1465  class Allocator1, class Allocator2>
1466  void MltAddVector(const double& alpha,
1467  const SeldonTranspose& TransA,
1468  const Matrix<double, Prop0, RowMajor, Allocator0>& A,
1469  const Vector<double, VectFull, Allocator1>& X,
1470  const double& beta,
1471  Vector<double, VectFull, Allocator2>& Y)
1472  {
1473 
1474 #ifdef SELDON_CHECK_DIMENSIONS
1475  CheckDim(TransA, A, X, Y, "MltAdd(alpha, status, M, X, beta, Y)");
1476 #endif
1477 
1478  cblas_dgemv(CblasRowMajor, TransA.Cblas(),
1479  A.GetM(), A.GetN(), alpha, A.GetData(), A.GetLD(),
1480  X.GetData(), 1, beta, Y.GetData(), 1);
1481  }
1482 
1483 
1484  template <class Prop0, class Allocator0,
1485  class Allocator1, class Allocator2>
1486  void MltAddVector(const complex<float>& alpha,
1487  const SeldonTranspose& TransA,
1488  const Matrix<complex<float>, Prop0, RowMajor, Allocator0>& A,
1489  const Vector<complex<float>, VectFull, Allocator1>& X,
1490  const complex<float>& beta,
1491  Vector<complex<float>, VectFull, Allocator2>& Y)
1492  {
1493 
1494 #ifdef SELDON_CHECK_DIMENSIONS
1495  CheckDim(TransA, A, X, Y, "MltAdd(alpha, status, M, X, beta, Y)");
1496 #endif
1497 
1498  cblas_cgemv(CblasRowMajor, TransA.Cblas(),
1499  A.GetM(), A.GetN(), reinterpret_cast<const void*>(&alpha),
1500  reinterpret_cast<const void*>(A.GetData()), A.GetLD(),
1501  reinterpret_cast<const void*>(X.GetData()), 1,
1502  reinterpret_cast<const void*>(&beta),
1503  reinterpret_cast<void*>(Y.GetData()), 1);
1504  }
1505 
1506 
1507  template <class Prop0, class Allocator0,
1508  class Allocator1, class Allocator2>
1509  void MltAddVector(const complex<double>& alpha,
1510  const SeldonTranspose& TransA,
1511  const Matrix<complex<double>, Prop0, RowMajor, Allocator0>& A,
1512  const Vector<complex<double>, VectFull, Allocator1>& X,
1513  const complex<double>& beta,
1514  Vector<complex<double>, VectFull, Allocator2>& Y)
1515  {
1516 
1517 #ifdef SELDON_CHECK_DIMENSIONS
1518  CheckDim(TransA, A, X, Y, "MltAdd(alpha, status, M, X, beta, Y)");
1519 #endif
1520 
1521  cblas_zgemv(CblasRowMajor, TransA.Cblas(),
1522  A.GetM(), A.GetN(), reinterpret_cast<const void*>(&alpha),
1523  reinterpret_cast<const void*>(A.GetData()), A.GetLD(),
1524  reinterpret_cast<const void*>(X.GetData()), 1,
1525  reinterpret_cast<const void*>(&beta),
1526  reinterpret_cast<void*>(Y.GetData()), 1);
1527  }
1528 
1529 
1530  // Hermitian //
1531 
1532  /*** ColHerm and Upper ***/
1533 
1534 
1535  template <class Prop0, class Allocator0,
1536  class Allocator1, class Allocator2>
1537  void MltAddVector(const complex<float>& alpha,
1538  const Matrix<complex<float>, Prop0, ColHerm, Allocator0>& A,
1539  const Vector<complex<float>, VectFull, Allocator1>& X,
1540  const complex<float>& beta,
1541  Vector<complex<float>, VectFull, Allocator2>& Y)
1542  {
1543 
1544 #ifdef SELDON_CHECK_DIMENSIONS
1545  CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)");
1546 #endif
1547 
1548  cblas_chemv(CblasColMajor, CblasUpper,
1549  A.GetM(), reinterpret_cast<const void*>(&alpha),
1550  A.GetDataConstVoid(), A.GetM(),
1551  X.GetDataConstVoid(), 1, reinterpret_cast<const void*>(&beta),
1552  Y.GetDataVoid(), 1);
1553  }
1554 
1555 
1556  template <class Prop0, class Allocator0,
1557  class Allocator1, class Allocator2>
1558  void MltAddVector(const complex<double>& alpha,
1559  const Matrix<complex<double>, Prop0, ColHerm, Allocator0>& A,
1560  const Vector<complex<double>, VectFull, Allocator1>& X,
1561  const complex<double>& beta,
1562  Vector<complex<double>, VectFull, Allocator2>& Y)
1563  {
1564 
1565 #ifdef SELDON_CHECK_DIMENSIONS
1566  CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)");
1567 #endif
1568 
1569  cblas_zhemv(CblasColMajor, CblasUpper,
1570  A.GetM(), reinterpret_cast<const void*>(&alpha),
1571  A.GetDataConstVoid(), A.GetM(),
1572  X.GetDataConstVoid(), 1, reinterpret_cast<const void*>(&beta),
1573  Y.GetDataVoid(), 1);
1574  }
1575 
1576 
1577  /*** ColHerm and Uplo ***/
1578 
1579 
1580  template <class Prop0, class Allocator0,
1581  class Allocator1, class Allocator2>
1582  void MltAdd(const complex<float>& alpha,
1583  const SeldonUplo& Uplo,
1584  const Matrix<complex<float>, Prop0, ColHerm, Allocator0>& A,
1585  const Vector<complex<float>, VectFull, Allocator1>& X,
1586  const complex<float>& beta,
1587  Vector<complex<float>, VectFull, Allocator2>& Y)
1588  {
1589 
1590 #ifdef SELDON_CHECK_DIMENSIONS
1591  CheckDim(A, X, Y, "MltAdd(alpha, uplo, M, X, beta, Y)");
1592 #endif
1593 
1594  cblas_chemv(CblasColMajor, Uplo.Cblas(),
1595  A.GetM(), reinterpret_cast<const void*>(&alpha),
1596  A.GetDataConstVoid(), A.GetM(),
1597  X.GetDataConstVoid(), 1, reinterpret_cast<const void*>(&beta),
1598  Y.GetDataVoid(), 1);
1599  }
1600 
1601 
1602  template <class Prop0, class Allocator0,
1603  class Allocator1, class Allocator2>
1604  void MltAdd(const complex<double>& alpha,
1605  const SeldonUplo& Uplo,
1606  const Matrix<complex<double>, Prop0, ColHerm, Allocator0>& A,
1607  const Vector<complex<double>, VectFull, Allocator1>& X,
1608  const complex<double>& beta,
1609  Vector<complex<double>, VectFull, Allocator2>& Y)
1610  {
1611 
1612 #ifdef SELDON_CHECK_DIMENSIONS
1613  CheckDim(A, X, Y, "MltAdd(alpha, uplo, M, X, beta, Y)");
1614 #endif
1615 
1616  cblas_zhemv(CblasColMajor, Uplo.Cblas(),
1617  A.GetM(), reinterpret_cast<const void*>(&alpha),
1618  A.GetDataConstVoid(), A.GetM(),
1619  X.GetDataConstVoid(), 1, reinterpret_cast<const void*>(&beta),
1620  Y.GetDataVoid(), 1);
1621  }
1622 
1623 
1624  /*** RowHerm and Upper ***/
1625 
1626 
1627  template <class Prop0, class Allocator0,
1628  class Allocator1, class Allocator2>
1629  void MltAddVector(const complex<float>& alpha,
1630  const Matrix<complex<float>, Prop0, RowHerm, Allocator0>& A,
1631  const Vector<complex<float>, VectFull, Allocator1>& X,
1632  const complex<float>& beta,
1633  Vector<complex<float>, VectFull, Allocator2>& Y)
1634  {
1635 
1636 #ifdef SELDON_CHECK_DIMENSIONS
1637  CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)");
1638 #endif
1639 
1640  cblas_chemv(CblasRowMajor, CblasUpper,
1641  A.GetM(), reinterpret_cast<const void*>(&alpha),
1642  A.GetDataConstVoid(), A.GetM(),
1643  X.GetDataConstVoid(), 1, reinterpret_cast<const void*>(&beta),
1644  Y.GetDataVoid(), 1);
1645  }
1646 
1647 
1648  template <class Prop0, class Allocator0,
1649  class Allocator1, class Allocator2>
1650  void MltAddVector(const complex<double>& alpha,
1651  const Matrix<complex<double>, Prop0, RowHerm, Allocator0>& A,
1652  const Vector<complex<double>, VectFull, Allocator1>& X,
1653  const complex<double>& beta,
1654  Vector<complex<double>, VectFull, Allocator2>& Y)
1655  {
1656 
1657 #ifdef SELDON_CHECK_DIMENSIONS
1658  CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)");
1659 #endif
1660 
1661  cblas_zhemv(CblasRowMajor, CblasUpper,
1662  A.GetM(), reinterpret_cast<const void*>(&alpha),
1663  A.GetDataConstVoid(), A.GetM(),
1664  X.GetDataConstVoid(), 1, reinterpret_cast<const void*>(&beta),
1665  Y.GetDataVoid(), 1);
1666  }
1667 
1668 
1669  /*** RowHerm and Uplo ***/
1670 
1671 
1672  template <class Prop0, class Allocator0,
1673  class Allocator1, class Allocator2>
1674  void MltAdd(const complex<float>& alpha,
1675  const SeldonUplo& Uplo,
1676  const Matrix<complex<float>, Prop0, RowHerm, Allocator0>& A,
1677  const Vector<complex<float>, VectFull, Allocator1>& X,
1678  const complex<float>& beta,
1679  Vector<complex<float>, VectFull, Allocator2>& Y)
1680  {
1681 
1682 #ifdef SELDON_CHECK_DIMENSIONS
1683  CheckDim(A, X, Y, "MltAdd(alpha, uplo, M, X, beta, Y)");
1684 #endif
1685 
1686  cblas_chemv(CblasRowMajor, Uplo.Cblas(),
1687  A.GetM(), reinterpret_cast<const void*>(&alpha),
1688  A.GetDataConstVoid(), A.GetM(),
1689  X.GetDataConstVoid(), 1, reinterpret_cast<const void*>(&beta),
1690  Y.GetDataVoid(), 1);
1691  }
1692 
1693 
1694  template <class Prop0, class Allocator0,
1695  class Allocator1, class Allocator2>
1696  void MltAdd(const complex<double>& alpha,
1697  const SeldonUplo& Uplo,
1698  const Matrix<complex<double>, Prop0, RowHerm, Allocator0>& A,
1699  const Vector<complex<double>, VectFull, Allocator1>& X,
1700  const complex<double>& beta,
1701  Vector<complex<double>, VectFull, Allocator2>& Y)
1702  {
1703 
1704 #ifdef SELDON_CHECK_DIMENSIONS
1705  CheckDim(A, X, Y, "MltAdd(alpha, uplo, M, X, beta, Y)");
1706 #endif
1707 
1708  cblas_zhemv(CblasRowMajor, Uplo.Cblas(),
1709  A.GetM(), reinterpret_cast<const void*>(&alpha),
1710  A.GetDataConstVoid(), A.GetM(),
1711  X.GetDataConstVoid(), 1, reinterpret_cast<const void*>(&beta),
1712  Y.GetDataVoid(), 1);
1713  }
1714 
1715 
1716  // HermPacked //
1717 
1718  /*** ColHermPacked and Upper ***/
1719 
1720 
1721  template <class Prop0, class Allocator0,
1722  class Allocator1, class Allocator2>
1723  void MltAddVector(const complex<float>& alpha,
1724  const Matrix<complex<float>, Prop0,
1725  ColHermPacked, Allocator0>& A,
1726  const Vector<complex<float>, VectFull, Allocator1>& X,
1727  const complex<float>& beta,
1728  Vector<complex<float>, VectFull, Allocator2>& Y)
1729  {
1730 
1731 #ifdef SELDON_CHECK_DIMENSIONS
1732  CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)");
1733 #endif
1734 
1735  cblas_chpmv(CblasColMajor, CblasUpper,
1736  A.GetM(), reinterpret_cast<const void*>(&alpha),
1737  A.GetDataConstVoid(),
1738  X.GetDataConstVoid(), 1, reinterpret_cast<const void*>(&beta),
1739  Y.GetDataVoid(), 1);
1740  }
1741 
1742 
1743  template <class Prop0, class Allocator0,
1744  class Allocator1, class Allocator2>
1745  void MltAddVector(const complex<double>& alpha,
1746  const Matrix<complex<double>, Prop0,
1747  ColHermPacked, Allocator0>& A,
1748  const Vector<complex<double>, VectFull, Allocator1>& X,
1749  const complex<double>& beta,
1750  Vector<complex<double>, VectFull, Allocator2>& Y)
1751  {
1752 
1753 #ifdef SELDON_CHECK_DIMENSIONS
1754  CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)");
1755 #endif
1756 
1757  cblas_zhpmv(CblasColMajor, CblasUpper,
1758  A.GetM(), reinterpret_cast<const void*>(&alpha),
1759  A.GetDataConstVoid(),
1760  X.GetDataConstVoid(), 1, reinterpret_cast<const void*>(&beta),
1761  Y.GetDataVoid(), 1);
1762  }
1763 
1764 
1765  /*** ColHermPacked and Uplo ***/
1766 
1767 
1768  template <class Prop0, class Allocator0,
1769  class Allocator1, class Allocator2>
1770  void MltAdd(const complex<float>& alpha,
1771  const SeldonUplo& Uplo,
1772  const Matrix<complex<float>, Prop0,
1773  ColHermPacked, Allocator0>& A,
1774  const Vector<complex<float>, VectFull, Allocator1>& X,
1775  const complex<float>& beta,
1776  Vector<complex<float>, VectFull, Allocator2>& Y)
1777  {
1778 
1779 #ifdef SELDON_CHECK_DIMENSIONS
1780  CheckDim(A, X, Y, "MltAdd(alpha, uplo, M, X, beta, Y)");
1781 #endif
1782 
1783  cblas_chpmv(CblasColMajor, Uplo.Cblas(),
1784  A.GetM(), reinterpret_cast<const void*>(&alpha),
1785  A.GetDataConstVoid(),
1786  X.GetDataConstVoid(), 1, reinterpret_cast<const void*>(&beta),
1787  Y.GetDataVoid(), 1);
1788  }
1789 
1790 
1791  template <class Prop0, class Allocator0,
1792  class Allocator1, class Allocator2>
1793  void MltAdd(const complex<double>& alpha,
1794  const SeldonUplo& Uplo,
1795  const Matrix<complex<double>, Prop0,
1796  ColHermPacked, Allocator0>& A,
1797  const Vector<complex<double>, VectFull, Allocator1>& X,
1798  const complex<double>& beta,
1799  Vector<complex<double>, VectFull, Allocator2>& Y)
1800  {
1801 
1802 #ifdef SELDON_CHECK_DIMENSIONS
1803  CheckDim(A, X, Y, "MltAdd(alpha, uplo, M, X, beta, Y)");
1804 #endif
1805 
1806  cblas_zhpmv(CblasColMajor, Uplo.Cblas(),
1807  A.GetM(), reinterpret_cast<const void*>(&alpha),
1808  A.GetDataConstVoid(),
1809  X.GetDataConstVoid(), 1, reinterpret_cast<const void*>(&beta),
1810  Y.GetDataVoid(), 1);
1811  }
1812 
1813 
1814  /*** RowHermPacked and Upper ***/
1815 
1816 
1817  template <class Prop0, class Allocator0,
1818  class Allocator1, class Allocator2>
1819  void MltAddVector(const complex<float>& alpha,
1820  const Matrix<complex<float>, Prop0,
1821  RowHermPacked, Allocator0>& A,
1822  const Vector<complex<float>, VectFull, Allocator1>& X,
1823  const complex<float>& beta,
1824  Vector<complex<float>, VectFull, Allocator2>& Y)
1825  {
1826 
1827 #ifdef SELDON_CHECK_DIMENSIONS
1828  CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)");
1829 #endif
1830 
1831  cblas_chpmv(CblasRowMajor, CblasUpper,
1832  A.GetM(), reinterpret_cast<const void*>(&alpha),
1833  A.GetDataConstVoid(),
1834  X.GetDataConstVoid(), 1, reinterpret_cast<const void*>(&beta),
1835  Y.GetDataVoid(), 1);
1836  }
1837 
1838 
1839  template <class Prop0, class Allocator0,
1840  class Allocator1, class Allocator2>
1841  void MltAddVector(const complex<double>& alpha,
1842  const Matrix<complex<double>, Prop0,
1843  RowHermPacked, Allocator0>& A,
1844  const Vector<complex<double>, VectFull, Allocator1>& X,
1845  const complex<double>& beta,
1846  Vector<complex<double>, VectFull, Allocator2>& Y)
1847  {
1848 
1849 #ifdef SELDON_CHECK_DIMENSIONS
1850  CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)");
1851 #endif
1852 
1853  cblas_zhpmv(CblasRowMajor, CblasUpper,
1854  A.GetM(), reinterpret_cast<const void*>(&alpha),
1855  A.GetDataConstVoid(),
1856  X.GetDataConstVoid(), 1, reinterpret_cast<const void*>(&beta),
1857  Y.GetDataVoid(), 1);
1858  }
1859 
1860 
1861  /*** RowHermPacked and Uplo ***/
1862 
1863 
1864  template <class Prop0, class Allocator0,
1865  class Allocator1, class Allocator2>
1866  void MltAdd(const complex<float>& alpha,
1867  const SeldonUplo& Uplo,
1868  const Matrix<complex<float>, Prop0,
1869  RowHermPacked, Allocator0>& A,
1870  const Vector<complex<float>, VectFull, Allocator1>& X,
1871  const complex<float>& beta,
1872  Vector<complex<float>, VectFull, Allocator2>& Y)
1873  {
1874 
1875 #ifdef SELDON_CHECK_DIMENSIONS
1876  CheckDim(A, X, Y, "MltAdd(alpha, uplo, M, X, beta, Y)");
1877 #endif
1878 
1879  cblas_chpmv(CblasRowMajor, Uplo.Cblas(),
1880  A.GetM(), reinterpret_cast<const void*>(&alpha),
1881  A.GetDataConstVoid(),
1882  X.GetDataConstVoid(), 1, reinterpret_cast<const void*>(&beta),
1883  Y.GetDataVoid(), 1);
1884  }
1885 
1886 
1887  template <class Prop0, class Allocator0,
1888  class Allocator1, class Allocator2>
1889  void MltAdd(const complex<double>& alpha,
1890  const SeldonUplo& Uplo,
1891  const Matrix<complex<double>, Prop0,
1892  RowHermPacked, Allocator0>& A,
1893  const Vector<complex<double>, VectFull, Allocator1>& X,
1894  const complex<double>& beta,
1895  Vector<complex<double>, VectFull, Allocator2>& Y)
1896  {
1897 
1898 #ifdef SELDON_CHECK_DIMENSIONS
1899  CheckDim(A, X, Y, "MltAdd(alpha, uplo, M, X, beta, Y)");
1900 #endif
1901 
1902  cblas_zhpmv(CblasRowMajor, Uplo.Cblas(),
1903  A.GetM(), reinterpret_cast<const void*>(&alpha),
1904  A.GetDataConstVoid(),
1905  X.GetDataConstVoid(), 1, reinterpret_cast<const void*>(&beta),
1906  Y.GetDataVoid(), 1);
1907  }
1908 
1909 
1910  // Symmetric //
1911 
1912  /*** ColSym and Upper ***/
1913 
1914 
1915  template <class Prop0, class Allocator0,
1916  class Allocator1, class Allocator2>
1917  void MltAddVector(const float& alpha,
1918  const Matrix<float, Prop0, ColSym, Allocator0>& A,
1919  const Vector<float, VectFull, Allocator1>& X,
1920  const float& beta,
1921  Vector<float, VectFull, Allocator2>& Y)
1922  {
1923 
1924 #ifdef SELDON_CHECK_DIMENSIONS
1925  CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)");
1926 #endif
1927 
1928  cblas_ssymv(CblasColMajor, CblasUpper,
1929  A.GetM(), alpha, A.GetData(), A.GetM(),
1930  X.GetData(), 1, beta, Y.GetData(), 1);
1931  }
1932 
1933 
1934  template <class Prop0, class Allocator0,
1935  class Allocator1, class Allocator2>
1936  void MltAddVector(const double& alpha,
1937  const Matrix<double, Prop0, ColSym, Allocator0>& A,
1938  const Vector<double, VectFull, Allocator1>& X,
1939  const double& beta,
1940  Vector<double, VectFull, Allocator2>& Y)
1941  {
1942 
1943 #ifdef SELDON_CHECK_DIMENSIONS
1944  CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)");
1945 #endif
1946 
1947  cblas_dsymv(CblasColMajor, CblasUpper,
1948  A.GetM(), alpha, A.GetData(), A.GetM(),
1949  X.GetData(), 1, beta, Y.GetData(), 1);
1950  }
1951 
1952 
1953  /*** ColSym and Uplo ***/
1954 
1955 
1956  template <class Prop0, class Allocator0,
1957  class Allocator1, class Allocator2>
1958  void MltAdd(const float& alpha,
1959  const SeldonUplo& Uplo,
1960  const Matrix<float, Prop0, ColSym, Allocator0>& A,
1961  const Vector<float, VectFull, Allocator1>& X,
1962  const float& beta,
1963  Vector<float, VectFull, Allocator2>& Y)
1964  {
1965 
1966 #ifdef SELDON_CHECK_DIMENSIONS
1967  CheckDim(A, X, Y, "MltAdd(alpha, uplo, M, X, beta, Y)");
1968 #endif
1969 
1970  cblas_ssymv(CblasColMajor, Uplo.Cblas(),
1971  A.GetM(), alpha, A.GetData(), A.GetM(),
1972  X.GetData(), 1, beta, Y.GetData(), 1);
1973  }
1974 
1975 
1976  template <class Prop0, class Allocator0,
1977  class Allocator1, class Allocator2>
1978  void MltAdd(const double& alpha,
1979  const SeldonUplo& Uplo,
1980  const Matrix<double, Prop0, ColSym, Allocator0>& A,
1981  const Vector<double, VectFull, Allocator1>& X,
1982  const double& beta,
1983  Vector<double, VectFull, Allocator2>& Y)
1984  {
1985 
1986 #ifdef SELDON_CHECK_DIMENSIONS
1987  CheckDim(A, X, Y, "MltAdd(alpha, uplo, M, X, beta, Y)");
1988 #endif
1989 
1990  cblas_dsymv(CblasColMajor, Uplo.Cblas(),
1991  A.GetM(), alpha, A.GetData(), A.GetM(),
1992  X.GetData(), 1, beta, Y.GetData(), 1);
1993  }
1994 
1995 
1996  /*** RowSym and Upper ***/
1997 
1998 
1999  template <class Prop0, class Allocator0,
2000  class Allocator1, class Allocator2>
2001  void MltAddVector(const float& alpha,
2002  const Matrix<float, Prop0, RowSym, Allocator0>& A,
2003  const Vector<float, VectFull, Allocator1>& X,
2004  const float& beta,
2005  Vector<float, VectFull, Allocator2>& Y)
2006  {
2007 
2008 #ifdef SELDON_CHECK_DIMENSIONS
2009  CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)");
2010 #endif
2011 
2012  cblas_ssymv(CblasRowMajor, CblasUpper,
2013  A.GetM(), alpha, A.GetData(), A.GetM(),
2014  X.GetData(), 1, beta, Y.GetData(), 1);
2015  }
2016 
2017 
2018  template <class Prop0, class Allocator0,
2019  class Allocator1, class Allocator2>
2020  void MltAddVector(const double& alpha,
2021  const Matrix<double, Prop0, RowSym, Allocator0>& A,
2022  const Vector<double, VectFull, Allocator1>& X,
2023  const double& beta,
2024  Vector<double, VectFull, Allocator2>& Y)
2025  {
2026 
2027 #ifdef SELDON_CHECK_DIMENSIONS
2028  CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)");
2029 #endif
2030 
2031  cblas_dsymv(CblasRowMajor, CblasUpper,
2032  A.GetM(), alpha, A.GetData(), A.GetM(),
2033  X.GetData(), 1, beta, Y.GetData(), 1);
2034  }
2035 
2036 
2037  /*** RowSym and Uplo ***/
2038 
2039 
2040  template <class Prop0, class Allocator0,
2041  class Allocator1, class Allocator2>
2042  void MltAdd(const float& alpha,
2043  const SeldonUplo& Uplo,
2044  const Matrix<float, Prop0, RowSym, Allocator0>& A,
2045  const Vector<float, VectFull, Allocator1>& X,
2046  const float& beta,
2047  Vector<float, VectFull, Allocator2>& Y)
2048  {
2049 
2050 #ifdef SELDON_CHECK_DIMENSIONS
2051  CheckDim(A, X, Y, "MltAdd(alpha, uplo, M, X, beta, Y)");
2052 #endif
2053 
2054  cblas_ssymv(CblasRowMajor, Uplo.Cblas(),
2055  A.GetM(), alpha, A.GetData(), A.GetM(),
2056  X.GetData(), 1, beta, Y.GetData(), 1);
2057  }
2058 
2059 
2060  template <class Prop0, class Allocator0,
2061  class Allocator1, class Allocator2>
2062  void MltAdd(const double& alpha,
2063  const SeldonUplo& Uplo,
2064  const Matrix<double, Prop0, RowSym, Allocator0>& A,
2065  const Vector<double, VectFull, Allocator1>& X,
2066  const double& beta,
2067  Vector<double, VectFull, Allocator2>& Y)
2068  {
2069 
2070 #ifdef SELDON_CHECK_DIMENSIONS
2071  CheckDim(A, X, Y, "MltAdd(alpha, uplo, M, X, beta, Y)");
2072 #endif
2073 
2074  cblas_dsymv(CblasRowMajor, Uplo.Cblas(),
2075  A.GetM(), alpha, A.GetData(), A.GetM(),
2076  X.GetData(), 1, beta, Y.GetData(), 1);
2077  }
2078 
2079 
2080  // SymPacked //
2081 
2082  /*** ColSymPacked and Upper ***/
2083 
2084 
2085  template <class Prop0, class Allocator0,
2086  class Allocator1, class Allocator2>
2087  void MltAddVector(const float& alpha,
2088  const Matrix<float, Prop0, ColSymPacked, Allocator0>& A,
2089  const Vector<float, VectFull, Allocator1>& X,
2090  const float& beta,
2091  Vector<float, VectFull, Allocator2>& Y)
2092  {
2093 
2094 #ifdef SELDON_CHECK_DIMENSIONS
2095  CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)");
2096 #endif
2097 
2098  cblas_sspmv(CblasColMajor, CblasUpper,
2099  A.GetM(), alpha, A.GetData(),
2100  X.GetData(), 1, beta, Y.GetData(), 1);
2101  }
2102 
2103 
2104  template <class Prop0, class Allocator0,
2105  class Allocator1, class Allocator2>
2106  void MltAddVector(const double& alpha,
2107  const Matrix<double, Prop0, ColSymPacked, Allocator0>& A,
2108  const Vector<double, VectFull, Allocator1>& X,
2109  const double& beta,
2110  Vector<double, VectFull, Allocator2>& Y)
2111  {
2112 
2113 #ifdef SELDON_CHECK_DIMENSIONS
2114  CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)");
2115 #endif
2116 
2117  cblas_dspmv(CblasColMajor, CblasUpper,
2118  A.GetM(), alpha, A.GetData(),
2119  X.GetData(), 1, beta, Y.GetData(), 1);
2120  }
2121 
2122 
2123  /*** ColSymPacked and Uplo ***/
2124 
2125 
2126  template <class Prop0, class Allocator0,
2127  class Allocator1, class Allocator2>
2128  void MltAdd(const float& alpha,
2129  const SeldonUplo& Uplo,
2130  const Matrix<float, Prop0, ColSymPacked, Allocator0>& A,
2131  const Vector<float, VectFull, Allocator1>& X,
2132  const float& beta,
2133  Vector<float, VectFull, Allocator2>& Y)
2134  {
2135 
2136 #ifdef SELDON_CHECK_DIMENSIONS
2137  CheckDim(A, X, Y, "MltAdd(alpha, uplo, M, X, beta, Y)");
2138 #endif
2139 
2140  cblas_sspmv(CblasColMajor, Uplo.Cblas(),
2141  A.GetM(), alpha, A.GetData(),
2142  X.GetData(), 1, beta, Y.GetData(), 1);
2143  }
2144 
2145 
2146  template <class Prop0, class Allocator0,
2147  class Allocator1, class Allocator2>
2148  void MltAdd(const double& alpha,
2149  const SeldonUplo& Uplo,
2150  const Matrix<double, Prop0, ColSymPacked, Allocator0>& A,
2151  const Vector<double, VectFull, Allocator1>& X,
2152  const double& beta,
2153  Vector<double, VectFull, Allocator2>& Y)
2154  {
2155 
2156 #ifdef SELDON_CHECK_DIMENSIONS
2157  CheckDim(A, X, Y, "MltAdd(alpha, uplo, M, X, beta, Y)");
2158 #endif
2159 
2160  cblas_dspmv(CblasColMajor, Uplo.Cblas(),
2161  A.GetM(), alpha, A.GetData(),
2162  X.GetData(), 1, beta, Y.GetData(), 1);
2163  }
2164 
2165 
2166  /*** RowSymPacked and Upper ***/
2167 
2168 
2169  template <class Prop0, class Allocator0,
2170  class Allocator1, class Allocator2>
2171  void MltAddVector(const float& alpha,
2172  const Matrix<float, Prop0, RowSymPacked, Allocator0>& A,
2173  const Vector<float, VectFull, Allocator1>& X,
2174  const float& beta,
2175  Vector<float, VectFull, Allocator2>& Y)
2176  {
2177 
2178 #ifdef SELDON_CHECK_DIMENSIONS
2179  CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)");
2180 #endif
2181 
2182  cblas_sspmv(CblasRowMajor, CblasUpper,
2183  A.GetM(), alpha, A.GetData(),
2184  X.GetData(), 1, beta, Y.GetData(), 1);
2185  }
2186 
2187 
2188  template <class Prop0, class Allocator0,
2189  class Allocator1, class Allocator2>
2190  void MltAddVector(const double& alpha,
2191  const Matrix<double, Prop0, RowSymPacked, Allocator0>& A,
2192  const Vector<double, VectFull, Allocator1>& X,
2193  const double& beta,
2194  Vector<double, VectFull, Allocator2>& Y)
2195  {
2196 
2197 #ifdef SELDON_CHECK_DIMENSIONS
2198  CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)");
2199 #endif
2200 
2201  cblas_dspmv(CblasRowMajor, CblasUpper,
2202  A.GetM(), alpha, A.GetData(),
2203  X.GetData(), 1, beta, Y.GetData(), 1);
2204  }
2205 
2206 
2207  /*** RowSymPacked and Uplo ***/
2208 
2209 
2210  template <class Prop0, class Allocator0,
2211  class Allocator1, class Allocator2>
2212  void MltAdd(const float& alpha,
2213  const SeldonUplo& Uplo,
2214  const Matrix<float, Prop0, RowSymPacked, Allocator0>& A,
2215  const Vector<float, VectFull, Allocator1>& X,
2216  const float& beta,
2217  Vector<float, VectFull, Allocator2>& Y)
2218  {
2219 
2220 #ifdef SELDON_CHECK_DIMENSIONS
2221  CheckDim(A, X, Y, "MltAdd(alpha, uplo, M, X, beta, Y)");
2222 #endif
2223 
2224  cblas_sspmv(CblasRowMajor, Uplo.Cblas(),
2225  A.GetM(), alpha, A.GetData(),
2226  X.GetData(), 1, beta, Y.GetData(), 1);
2227  }
2228 
2229 
2230  template <class Prop0, class Allocator0,
2231  class Allocator1, class Allocator2>
2232  void MltAdd(const double& alpha,
2233  const SeldonUplo& Uplo,
2234  const Matrix<double, Prop0, RowSymPacked, Allocator0>& A,
2235  const Vector<double, VectFull, Allocator1>& X,
2236  const double& beta,
2237  Vector<double, VectFull, Allocator2>& Y)
2238  {
2239 
2240 #ifdef SELDON_CHECK_DIMENSIONS
2241  CheckDim(A, X, Y, "MltAdd(alpha, uplo, M, X, beta, Y)");
2242 #endif
2243 
2244  cblas_dspmv(CblasRowMajor, Uplo.Cblas(),
2245  A.GetM(), alpha, A.GetData(),
2246  X.GetData(), 1, beta, Y.GetData(), 1);
2247  }
2248 
2249 
2250  // MLTADD //
2252 
2253 
2254 
2256  // RANK1UPDATE //
2257 
2258 
2259  /*** ColMajor ***/
2260 
2261 
2262  template <class Prop0, class Allocator0,
2263  class Allocator1, class Allocator2>
2264  void Rank1Update(const float& alpha,
2265  const Vector<float, VectFull, Allocator1>& X,
2266  const Vector<float, VectFull, Allocator2>& Y,
2267  Matrix<float, Prop0, ColMajor, Allocator0>& A)
2268  {
2269 
2270 #ifdef SELDON_CHECK_DIMENSIONS
2271  CheckDim(SeldonNoTrans, A, Y, X,
2272  "Rank1Update(alpha, X, Y, M)", "X.Y' + M");
2273 #endif
2274 
2275  cblas_sger(CblasColMajor, A.GetM(), A.GetN(), alpha, X.GetData(), 1,
2276  Y.GetData(), 1, A.GetData(), A.GetLD());
2277  }
2278 
2279 
2280  template <class Prop0, class Allocator0,
2281  class Allocator1, class Allocator2>
2282  void Rank1Update(const double& alpha,
2283  const Vector<double, VectFull, Allocator1>& X,
2284  const Vector<double, VectFull, Allocator2>& Y,
2285  Matrix<double, Prop0, ColMajor, Allocator0>& A)
2286  {
2287 
2288 #ifdef SELDON_CHECK_DIMENSIONS
2289  CheckDim(SeldonNoTrans, A, Y, X,
2290  "Rank1Update(alpha, X, Y, M)", "X.Y' + M");
2291 #endif
2292 
2293  cblas_dger(CblasColMajor, A.GetM(), A.GetN(), alpha, X.GetData(), 1,
2294  Y.GetData(), 1, A.GetData(), A.GetLD());
2295  }
2296 
2297 
2298  template <class Prop0, class Allocator0,
2299  class Allocator1, class Allocator2>
2300  void Rank1Update(const complex<float>& alpha,
2301  const Vector<complex<float>, VectFull, Allocator1>& X,
2302  const Vector<complex<float>, VectFull, Allocator2>& Y,
2303  Matrix<complex<float>, Prop0, ColMajor, Allocator0>& A)
2304  {
2305 
2306 #ifdef SELDON_CHECK_DIMENSIONS
2307  CheckDim(SeldonNoTrans, A, Y, X,
2308  "Rank1Update(alpha, X, Y, M)", "X.Y' + M");
2309 #endif
2310 
2311  cblas_cgeru(CblasColMajor, A.GetM(), A.GetN(),
2312  reinterpret_cast<const void*>(&alpha),
2313  reinterpret_cast<const void*>(X.GetData()), 1,
2314  reinterpret_cast<const void*>(Y.GetData()), 1,
2315  reinterpret_cast<void*>(A.GetData()), A.GetLD());
2316  }
2317 
2318 
2319  template <class Prop0, class Allocator0,
2320  class Allocator1, class Allocator2>
2321  void Rank1Update(const complex<double>& alpha,
2322  const Vector<complex<double>, VectFull, Allocator1>& X,
2323  const Vector<complex<double>, VectFull, Allocator2>& Y,
2324  Matrix<complex<double>, Prop0, ColMajor, Allocator0>& A)
2325  {
2326 
2327 #ifdef SELDON_CHECK_DIMENSIONS
2328  CheckDim(SeldonNoTrans, A, Y, X,
2329  "Rank1Update(alpha, X, Y, M)", "X.Y' + M");
2330 #endif
2331 
2332  cblas_zgeru(CblasColMajor, A.GetM(), A.GetN(),
2333  reinterpret_cast<const void*>(&alpha),
2334  reinterpret_cast<const void*>(X.GetData()), 1,
2335  reinterpret_cast<const void*>(Y.GetData()), 1,
2336  reinterpret_cast<void*>(A.GetData()), A.GetLD());
2337  }
2338 
2339 
2340  /*** ColMajor and ConjY ***/
2341 
2342 
2343  template <class Prop0, class Allocator0,
2344  class Allocator1, class Allocator2>
2345  void Rank1Update(const complex<float>& alpha,
2346  const Vector<complex<float>, VectFull, Allocator1>& X,
2347  const SeldonConjugate& ConjY,
2348  const Vector<complex<float>, VectFull, Allocator2>& Y,
2349  Matrix<complex<float>, Prop0, ColMajor, Allocator0>& A)
2350  {
2351 
2352 #ifdef SELDON_CHECK_DIMENSIONS
2353  CheckDim(SeldonNoTrans, A, Y, X,
2354  "Rank1Update(alpha, X, status, Y, M)", "X.Y' + M");
2355 #endif
2356 
2357  if (ConjY.Conj())
2358  cblas_cgerc(CblasColMajor, A.GetM(), A.GetN(),
2359  reinterpret_cast<const void*>(&alpha),
2360  reinterpret_cast<const void*>(X.GetData()), 1,
2361  reinterpret_cast<const void*>(Y.GetData()), 1,
2362  reinterpret_cast<void*>(A.GetData()), A.GetLD());
2363  else
2364  cblas_cgeru(CblasColMajor, A.GetM(), A.GetN(),
2365  reinterpret_cast<const void*>(&alpha),
2366  reinterpret_cast<const void*>(X.GetData()), 1,
2367  reinterpret_cast<const void*>(Y.GetData()), 1,
2368  reinterpret_cast<void*>(A.GetData()), A.GetLD());
2369  }
2370 
2371 
2372  template <class Prop0, class Allocator0,
2373  class Allocator1, class Allocator2>
2374  void Rank1Update(const complex<double>& alpha,
2375  const Vector<complex<double>, VectFull, Allocator1>& X,
2376  const SeldonConjugate& ConjY,
2377  const Vector<complex<double>, VectFull, Allocator2>& Y,
2378  Matrix<complex<double>, Prop0, ColMajor, Allocator0>& A)
2379  {
2380 
2381 #ifdef SELDON_CHECK_DIMENSIONS
2382  CheckDim(SeldonNoTrans, A, Y, X,
2383  "Rank1Update(alpha, X, status, Y, M)", "X.Y' + M");
2384 #endif
2385 
2386  if (ConjY.Conj())
2387  cblas_zgerc(CblasColMajor, A.GetM(), A.GetN(),
2388  reinterpret_cast<const void*>(&alpha),
2389  reinterpret_cast<const void*>(X.GetData()), 1,
2390  reinterpret_cast<const void*>(Y.GetData()), 1,
2391  reinterpret_cast<void*>(A.GetData()), A.GetLD());
2392  else
2393  cblas_zgeru(CblasColMajor, A.GetM(), A.GetN(),
2394  reinterpret_cast<const void*>(&alpha),
2395  reinterpret_cast<const void*>(X.GetData()), 1,
2396  reinterpret_cast<const void*>(Y.GetData()), 1,
2397  reinterpret_cast<void*>(A.GetData()), A.GetLD());
2398  }
2399 
2400 
2401  /*** RowMajor ***/
2402 
2403 
2404  template <class Prop0, class Allocator0,
2405  class Allocator1, class Allocator2>
2406  void Rank1Update(const float& alpha,
2407  const Vector<float, VectFull, Allocator1>& X,
2408  const Vector<float, VectFull, Allocator2>& Y,
2409  Matrix<float, Prop0, RowMajor, Allocator0>& A)
2410  {
2411 
2412 #ifdef SELDON_CHECK_DIMENSIONS
2413  CheckDim(SeldonNoTrans, A, Y, X,
2414  "Rank1Update(alpha, X, Y, M)", "X.Y' + M");
2415 #endif
2416 
2417  cblas_sger(CblasRowMajor, A.GetM(), A.GetN(), alpha, X.GetData(), 1,
2418  Y.GetData(), 1, A.GetData(), A.GetLD());
2419  }
2420 
2421 
2422  template <class Prop0, class Allocator0,
2423  class Allocator1, class Allocator2>
2424  void Rank1Update(const double& alpha,
2425  const Vector<double, VectFull, Allocator1>& X,
2426  const Vector<double, VectFull, Allocator2>& Y,
2427  Matrix<double, Prop0, RowMajor, Allocator0>& A)
2428  {
2429 
2430 #ifdef SELDON_CHECK_DIMENSIONS
2431  CheckDim(SeldonNoTrans, A, Y, X,
2432  "Rank1Update(alpha, X, Y, M)", "X.Y' + M");
2433 #endif
2434 
2435  cblas_dger(CblasRowMajor, A.GetM(), A.GetN(), alpha, X.GetData(), 1,
2436  Y.GetData(), 1, A.GetData(), A.GetLD());
2437  }
2438 
2439 
2440  template <class Prop0, class Allocator0,
2441  class Allocator1, class Allocator2>
2442  void Rank1Update(const complex<float>& alpha,
2443  const Vector<complex<float>, VectFull, Allocator1>& X,
2444  const Vector<complex<float>, VectFull, Allocator2>& Y,
2445  Matrix<complex<float>, Prop0, RowMajor, Allocator0>& A)
2446  {
2447 
2448 #ifdef SELDON_CHECK_DIMENSIONS
2449  CheckDim(SeldonNoTrans, A, Y, X,
2450  "Rank1Update(alpha, X, Y, M)", "X.Y' + M");
2451 #endif
2452 
2453  cblas_cgeru(CblasRowMajor, A.GetM(), A.GetN(),
2454  reinterpret_cast<const void*>(&alpha),
2455  reinterpret_cast<const void*>(X.GetData()), 1,
2456  reinterpret_cast<const void*>(Y.GetData()), 1,
2457  reinterpret_cast<void*>(A.GetData()), A.GetLD());
2458  }
2459 
2460 
2461  template <class Prop0, class Allocator0,
2462  class Allocator1, class Allocator2>
2463  void Rank1Update(const complex<double>& alpha,
2464  const Vector<complex<double>, VectFull, Allocator1>& X,
2465  const Vector<complex<double>, VectFull, Allocator2>& Y,
2466  Matrix<complex<double>, Prop0, RowMajor, Allocator0>& A)
2467  {
2468 
2469 #ifdef SELDON_CHECK_DIMENSIONS
2470  CheckDim(SeldonNoTrans, A, Y, X,
2471  "Rank1Update(alpha, X, Y, M)", "X.Y' + M");
2472 #endif
2473 
2474  cblas_zgeru(CblasRowMajor, A.GetM(), A.GetN(),
2475  reinterpret_cast<const void*>(&alpha),
2476  reinterpret_cast<const void*>(X.GetData()), 1,
2477  reinterpret_cast<const void*>(Y.GetData()), 1,
2478  reinterpret_cast<void*>(A.GetData()), A.GetLD());
2479  }
2480 
2481 
2482  /*** RowMajor and ConjY ***/
2483 
2484 
2485  template <class Prop0, class Allocator0,
2486  class Allocator1, class Allocator2>
2487  void Rank1Update(const complex<float>& alpha,
2488  const Vector<complex<float>, VectFull, Allocator1>& X,
2489  const SeldonConjugate& ConjY,
2490  const Vector<complex<float>, VectFull, Allocator2>& Y,
2491  Matrix<complex<float>, Prop0, RowMajor, Allocator0>& A)
2492  {
2493 
2494 #ifdef SELDON_CHECK_DIMENSIONS
2495  CheckDim(SeldonNoTrans, A, Y, X,
2496  "Rank1Update(alpha, X, status, Y, M)", "X.Y' + M");
2497 #endif
2498 
2499  if (ConjY.Conj())
2500  cblas_cgerc(CblasRowMajor, A.GetM(), A.GetN(),
2501  reinterpret_cast<const void*>(&alpha),
2502  reinterpret_cast<const void*>(X.GetData()), 1,
2503  reinterpret_cast<const void*>(Y.GetData()), 1,
2504  reinterpret_cast<void*>(A.GetData()), A.GetLD());
2505  else
2506  cblas_cgeru(CblasRowMajor, A.GetM(), A.GetN(),
2507  reinterpret_cast<const void*>(&alpha),
2508  reinterpret_cast<const void*>(X.GetData()), 1,
2509  reinterpret_cast<const void*>(Y.GetData()), 1,
2510  reinterpret_cast<void*>(A.GetData()), A.GetLD());
2511  }
2512 
2513 
2514  template <class Prop0, class Allocator0,
2515  class Allocator1, class Allocator2>
2516  void Rank1Update(const complex<double>& alpha,
2517  const Vector<complex<double>, VectFull, Allocator1>& X,
2518  const SeldonConjugate& ConjY,
2519  const Vector<complex<double>, VectFull, Allocator2>& Y,
2520  Matrix<complex<double>, Prop0, RowMajor, Allocator0>& A)
2521  {
2522 
2523 #ifdef SELDON_CHECK_DIMENSIONS
2524  CheckDim(SeldonNoTrans, A, Y, X,
2525  "Rank1Update(alpha, X, status, Y, M)", "X.Y' + M");
2526 #endif
2527 
2528  if (ConjY.Conj())
2529  cblas_zgerc(CblasRowMajor, A.GetM(), A.GetN(),
2530  reinterpret_cast<const void*>(&alpha),
2531  reinterpret_cast<const void*>(X.GetData()), 1,
2532  reinterpret_cast<const void*>(Y.GetData()), 1,
2533  reinterpret_cast<void*>(A.GetData()), A.GetLD());
2534  else
2535  cblas_zgeru(CblasRowMajor, A.GetM(), A.GetN(),
2536  reinterpret_cast<const void*>(&alpha),
2537  reinterpret_cast<const void*>(X.GetData()), 1,
2538  reinterpret_cast<const void*>(Y.GetData()), 1,
2539  reinterpret_cast<void*>(A.GetData()), A.GetLD());
2540  }
2541 
2542 
2543  /*** ColSymPacked and Upper ***/
2544 
2545 
2546  template <class Allocator0,
2547  class Prop1, class Allocator1>
2548  void Rank1Update(const float& alpha,
2549  const Vector<float, VectFull, Allocator0>& X,
2550  Matrix<float, Prop1, ColSymPacked, Allocator1>& A)
2551  {
2552 
2553 #ifdef SELDON_CHECK_DIMENSIONS
2554  CheckDim(A, X, "Rank1Update(alpha, X, M)", "X.X' + M");
2555 #endif
2556 
2557  cblas_sspr(CblasColMajor, CblasUpper, A.GetM(), alpha,
2558  X.GetData(), 1, A.GetData());
2559  }
2560 
2561 
2562  template <class Allocator0,
2563  class Prop1, class Allocator1>
2564  void Rank1Update(const double& alpha,
2565  const Vector<double, VectFull, Allocator0>& X,
2566  Matrix<double, Prop1, ColSymPacked, Allocator1>& A)
2567  {
2568 
2569 #ifdef SELDON_CHECK_DIMENSIONS
2570  CheckDim(A, X, "Rank1Update(alpha, X, M)", "X.X' + M");
2571 #endif
2572 
2573  cblas_dspr(CblasColMajor, CblasUpper, A.GetM(), alpha,
2574  X.GetData(), 1, A.GetData());
2575  }
2576 
2577 
2578  template <class Allocator0,
2579  class Prop1, class Allocator1>
2580  void Rank1Update(const float& alpha,
2581  const Vector<float, VectFull, Allocator0>& X,
2582  Matrix<float, Prop1, ColSym, Allocator1>& A)
2583  {
2584 
2585 #ifdef SELDON_CHECK_DIMENSIONS
2586  CheckDim(A, X, "Rank1Update(alpha, X, M)", "X.X' + M");
2587 #endif
2588 
2589  cblas_ssyr(CblasColMajor, CblasUpper, A.GetM(), alpha,
2590  X.GetData(), 1, A.GetData(), A.GetM());
2591  }
2592 
2593 
2594  template <class Allocator0,
2595  class Prop1, class Allocator1>
2596  void Rank1Update(const double& alpha,
2597  const Vector<double, VectFull, Allocator0>& X,
2598  Matrix<double, Prop1, ColSym, Allocator1>& A)
2599  {
2600 
2601 #ifdef SELDON_CHECK_DIMENSIONS
2602  CheckDim(A, X, "Rank1Update(alpha, X, M)", "X.X' + M");
2603 #endif
2604 
2605  cblas_dsyr(CblasColMajor, CblasUpper, A.GetM(), alpha,
2606  X.GetData(), 1, A.GetData(), A.GetM());
2607  }
2608 
2609 
2610  template <class Allocator0,
2611  class Prop1, class Allocator1>
2612  void
2613  Rank1Update(const float& alpha,
2614  const Vector<complex<float>, VectFull, Allocator0>& X,
2615  Matrix<complex<float>, Prop1, ColHermPacked, Allocator1>& A)
2616  {
2617 
2618 #ifdef SELDON_CHECK_DIMENSIONS
2619  CheckDim(A, X, "Rank1Update(alpha, X, M)", "X.X' + M");
2620 #endif
2621 
2622  cblas_chpr(CblasColMajor, CblasUpper, A.GetM(), alpha,
2623  reinterpret_cast<const void*>(X.GetData()), 1,
2624  reinterpret_cast<void*>(A.GetData()));
2625  }
2626 
2627 
2628  template <class Allocator0,
2629  class Prop1, class Allocator1>
2630  void
2631  Rank1Update(const double& alpha,
2632  const Vector<complex<double>, VectFull, Allocator0>& X,
2633  Matrix<complex<double>, Prop1, ColHermPacked, Allocator1>& A)
2634  {
2635 
2636 #ifdef SELDON_CHECK_DIMENSIONS
2637  CheckDim(A, X, "Rank1Update(alpha, X, M)", "X.X' + M");
2638 #endif
2639 
2640  cblas_zhpr(CblasColMajor, CblasUpper, A.GetM(), alpha,
2641  reinterpret_cast<const void*>(X.GetData()), 1,
2642  reinterpret_cast<void*>(A.GetData()));
2643  }
2644 
2645 
2646  template <class Allocator0,
2647  class Prop1, class Allocator1>
2648  void
2649  Rank1Update(const float& alpha,
2650  const Vector<complex<float>, VectFull, Allocator0>& X,
2651  Matrix<complex<float>, Prop1, ColHerm, Allocator1>& A)
2652  {
2653 
2654 #ifdef SELDON_CHECK_DIMENSIONS
2655  CheckDim(A, X, "Rank1Update(alpha, X, M)", "X.X' + M");
2656 #endif
2657 
2658  cblas_cher(CblasColMajor, CblasUpper, A.GetM(), alpha,
2659  reinterpret_cast<const void*>(X.GetData()), 1,
2660  reinterpret_cast<void*>(A.GetData()), A.GetM());
2661  }
2662 
2663 
2664  template <class Allocator0,
2665  class Prop1, class Allocator1>
2666  void
2667  Rank1Update(const double& alpha,
2668  const Vector<complex<double>, VectFull, Allocator0>& X,
2669  Matrix<complex<double>, Prop1, ColHerm, Allocator1>& A)
2670  {
2671 
2672 #ifdef SELDON_CHECK_DIMENSIONS
2673  CheckDim(A, X, "Rank1Update(alpha, X, M)", "X.X' + M");
2674 #endif
2675 
2676  cblas_zher(CblasColMajor, CblasUpper, A.GetM(), alpha,
2677  reinterpret_cast<const void*>(X.GetData()), 1,
2678  reinterpret_cast<void*>(A.GetData()), A.GetM());
2679  }
2680 
2681 
2682  /*** ColSymPacked and Uplo ***/
2683 
2684 
2685  template <class Allocator0,
2686  class Prop1, class Allocator1>
2687  void Rank1Update(const float& alpha,
2688  const Vector<float, VectFull, Allocator0>& X,
2689  const SeldonUplo& Uplo,
2690  Matrix<float, Prop1, ColSymPacked, Allocator1>& A)
2691  {
2692 
2693 #ifdef SELDON_CHECK_DIMENSIONS
2694  CheckDim(A, X, "Rank1Update(alpha, X, uplo, M)", "X.X' + M");
2695 #endif
2696 
2697  cblas_sspr(CblasColMajor, Uplo.Cblas(), A.GetM(), alpha,
2698  X.GetData(), 1, A.GetData());
2699  }
2700 
2701 
2702  template <class Allocator0,
2703  class Prop1, class Allocator1>
2704  void Rank1Update(const double& alpha,
2705  const Vector<double, VectFull, Allocator0>& X,
2706  const SeldonUplo& Uplo,
2707  Matrix<double, Prop1, ColSymPacked, Allocator1>& A)
2708  {
2709 
2710 #ifdef SELDON_CHECK_DIMENSIONS
2711  CheckDim(A, X, "Rank1Update(alpha, X, uplo, M)", "X.X' + M");
2712 #endif
2713 
2714  cblas_dspr(CblasColMajor, Uplo.Cblas(), A.GetM(), alpha,
2715  X.GetData(), 1, A.GetData());
2716  }
2717 
2718 
2719  template <class Allocator0,
2720  class Prop1, class Allocator1>
2721  void Rank1Update(const float& alpha,
2722  const Vector<float, VectFull, Allocator0>& X,
2723  const SeldonUplo& Uplo,
2724  Matrix<float, Prop1, ColSym, Allocator1>& A)
2725  {
2726 
2727 #ifdef SELDON_CHECK_DIMENSIONS
2728  CheckDim(A, X, "Rank1Update(alpha, X, uplo, M)", "X.X' + M");
2729 #endif
2730 
2731  cblas_ssyr(CblasColMajor, Uplo.Cblas(), A.GetM(), alpha,
2732  X.GetData(), 1, A.GetData(), A.GetM());
2733  }
2734 
2735 
2736  template <class Allocator0,
2737  class Prop1, class Allocator1>
2738  void Rank1Update(const double& alpha,
2739  const Vector<double, VectFull, Allocator0>& X,
2740  const SeldonUplo& Uplo,
2741  Matrix<double, Prop1, ColSym, Allocator1>& A)
2742  {
2743 
2744 #ifdef SELDON_CHECK_DIMENSIONS
2745  CheckDim(A, X, "Rank1Update(alpha, X, uplo, M)", "X.X' + M");
2746 #endif
2747 
2748  cblas_dsyr(CblasColMajor, Uplo.Cblas(), A.GetM(), alpha,
2749  X.GetData(), 1, A.GetData(), A.GetM());
2750  }
2751 
2752 
2753  template <class Allocator0,
2754  class Prop1, class Allocator1>
2755  void
2756  Rank1Update(const float& alpha,
2757  const Vector<complex<float>, VectFull, Allocator0>& X,
2758  const SeldonUplo& Uplo,
2759  Matrix<complex<float>, Prop1, ColHermPacked, Allocator1>& A)
2760  {
2761 
2762 #ifdef SELDON_CHECK_DIMENSIONS
2763  CheckDim(A, X, "Rank1Update(alpha, X, uplo, M)", "X.X' + M");
2764 #endif
2765 
2766  cblas_chpr(CblasColMajor, Uplo.Cblas(), A.GetM(), alpha,
2767  reinterpret_cast<const void*>(X.GetData()), 1,
2768  reinterpret_cast<void*>(A.GetData()));
2769  }
2770 
2771 
2772  template <class Allocator0,
2773  class Prop1, class Allocator1>
2774  void
2775  Rank1Update(const double& alpha,
2776  const Vector<complex<double>, VectFull, Allocator0>& X,
2777  const SeldonUplo& Uplo,
2778  Matrix<complex<double>, Prop1, ColHermPacked, Allocator1>& A)
2779  {
2780 
2781 #ifdef SELDON_CHECK_DIMENSIONS
2782  CheckDim(A, X, "Rank1Update(alpha, X, uplo, M)", "X.X' + M");
2783 #endif
2784 
2785  cblas_zhpr(CblasColMajor, Uplo.Cblas(), A.GetM(), alpha,
2786  reinterpret_cast<const void*>(X.GetData()), 1,
2787  reinterpret_cast<void*>(A.GetData()));
2788  }
2789 
2790 
2791  template <class Allocator0,
2792  class Prop1, class Allocator1>
2793  void
2794  Rank1Update(const float& alpha,
2795  const Vector<complex<float>, VectFull, Allocator0>& X,
2796  const SeldonUplo& Uplo,
2797  Matrix<complex<float>, Prop1, ColHerm, Allocator1>& A)
2798  {
2799 
2800 #ifdef SELDON_CHECK_DIMENSIONS
2801  CheckDim(A, X, "Rank1Update(alpha, X, uplo, M)", "X.X' + M");
2802 #endif
2803 
2804  cblas_cher(CblasColMajor, Uplo.Cblas(), A.GetM(), alpha,
2805  reinterpret_cast<const void*>(X.GetData()), 1,
2806  reinterpret_cast<void*>(A.GetData()), A.GetM());
2807  }
2808 
2809 
2810  template <class Allocator0,
2811  class Prop1, class Allocator1>
2812  void
2813  Rank1Update(const double& alpha,
2814  const Vector<complex<double>, VectFull, Allocator0>& X,
2815  const SeldonUplo& Uplo,
2816  Matrix<complex<double>, Prop1, ColHerm, Allocator1>& A)
2817  {
2818 
2819 #ifdef SELDON_CHECK_DIMENSIONS
2820  CheckDim(A, X, "Rank1Update(alpha, X, uplo, M)", "X.X' + M");
2821 #endif
2822 
2823  cblas_zher(CblasColMajor, Uplo.Cblas(), A.GetM(), alpha,
2824  reinterpret_cast<const void*>(X.GetData()), 1,
2825  reinterpret_cast<void*>(A.GetData()), A.GetM());
2826  }
2827 
2828 
2829  /*** RowSymPacked and Upper ***/
2830 
2831 
2832  template <class Allocator0,
2833  class Prop1, class Allocator1>
2834  void Rank1Update(const float& alpha,
2835  const Vector<float, VectFull, Allocator0>& X,
2836  Matrix<float, Prop1, RowSymPacked, Allocator1>& A)
2837  {
2838 
2839 #ifdef SELDON_CHECK_DIMENSIONS
2840  CheckDim(A, X, "Rank1Update(alpha, X, M)", "X.X' + M");
2841 #endif
2842 
2843  cblas_sspr(CblasRowMajor, CblasUpper, A.GetM(), alpha,
2844  X.GetData(), 1, A.GetData());
2845  }
2846 
2847 
2848  template <class Allocator0,
2849  class Prop1, class Allocator1>
2850  void Rank1Update(const double& alpha,
2851  const Vector<double, VectFull, Allocator0>& X,
2852  Matrix<double, Prop1, RowSymPacked, Allocator1>& A)
2853  {
2854 
2855 #ifdef SELDON_CHECK_DIMENSIONS
2856  CheckDim(A, X, "Rank1Update(alpha, X, M)", "X.X' + M");
2857 #endif
2858 
2859  cblas_dspr(CblasRowMajor, CblasUpper, A.GetM(), alpha,
2860  X.GetData(), 1, A.GetData());
2861  }
2862 
2863 
2864  template <class Allocator0,
2865  class Prop1, class Allocator1>
2866  void Rank1Update(const float& alpha,
2867  const Vector<float, VectFull, Allocator0>& X,
2868  Matrix<float, Prop1, RowSym, Allocator1>& A)
2869  {
2870 
2871 #ifdef SELDON_CHECK_DIMENSIONS
2872  CheckDim(A, X, "Rank1Update(alpha, X, M)", "X.X' + M");
2873 #endif
2874 
2875  cblas_ssyr(CblasRowMajor, CblasUpper, A.GetM(), alpha,
2876  X.GetData(), 1, A.GetData(), A.GetM());
2877  }
2878 
2879 
2880  template <class Allocator0,
2881  class Prop1, class Allocator1>
2882  void Rank1Update(const double& alpha,
2883  const Vector<double, VectFull, Allocator0>& X,
2884  Matrix<double, Prop1, RowSym, Allocator1>& A)
2885  {
2886 
2887 #ifdef SELDON_CHECK_DIMENSIONS
2888  CheckDim(A, X, "Rank1Update(alpha, X, M)", "X.X' + M");
2889 #endif
2890 
2891  cblas_dsyr(CblasRowMajor, CblasUpper, A.GetM(), alpha,
2892  X.GetData(), 1, A.GetData(), A.GetM());
2893  }
2894 
2895 
2896  template <class Allocator0,
2897  class Prop1, class Allocator1>
2898  void
2899  Rank1Update(const float& alpha,
2900  const Vector<complex<float>, VectFull, Allocator0>& X,
2901  Matrix<complex<float>, Prop1, RowHermPacked, Allocator1>& A)
2902  {
2903 
2904 #ifdef SELDON_CHECK_DIMENSIONS
2905  CheckDim(A, X, "Rank1Update(alpha, X, M)", "X.X' + M");
2906 #endif
2907 
2908  cblas_chpr(CblasRowMajor, CblasUpper, A.GetM(), alpha,
2909  reinterpret_cast<const void*>(X.GetData()), 1,
2910  reinterpret_cast<void*>(A.GetData()));
2911  }
2912 
2913 
2914  template <class Allocator0,
2915  class Prop1, class Allocator1>
2916  void
2917  Rank1Update(const double& alpha,
2918  const Vector<complex<double>, VectFull, Allocator0>& X,
2919  Matrix<complex<double>, Prop1, RowHermPacked, Allocator1>& A)
2920  {
2921 
2922 #ifdef SELDON_CHECK_DIMENSIONS
2923  CheckDim(A, X, "Rank1Update(alpha, X, M)", "X.X' + M");
2924 #endif
2925 
2926  cblas_zhpr(CblasRowMajor, CblasUpper, A.GetM(), alpha,
2927  reinterpret_cast<const void*>(X.GetData()), 1,
2928  reinterpret_cast<void*>(A.GetData()));
2929  }
2930 
2931 
2932  template <class Allocator0,
2933  class Prop1, class Allocator1>
2934  void
2935  Rank1Update(const float& alpha,
2936  const Vector<complex<float>, VectFull, Allocator0>& X,
2937  Matrix<complex<float>, Prop1, RowHerm, Allocator1>& A)
2938  {
2939 
2940 #ifdef SELDON_CHECK_DIMENSIONS
2941  CheckDim(A, X, "Rank1Update(alpha, X, M)", "X.X' + M");
2942 #endif
2943 
2944  cblas_cher(CblasRowMajor, CblasUpper, A.GetM(), alpha,
2945  reinterpret_cast<const void*>(X.GetData()), 1,
2946  reinterpret_cast<void*>(A.GetData()), A.GetM());
2947  }
2948 
2949 
2950  template <class Allocator0,
2951  class Prop1, class Allocator1>
2952  void
2953  Rank1Update(const double& alpha,
2954  const Vector<complex<double>, VectFull, Allocator0>& X,
2955  Matrix<complex<double>, Prop1, RowHerm, Allocator1>& A)
2956  {
2957 
2958 #ifdef SELDON_CHECK_DIMENSIONS
2959  CheckDim(A, X, "Rank1Update(alpha, X, M)", "X.X' + M");
2960 #endif
2961 
2962  cblas_zher(CblasRowMajor, CblasUpper, A.GetM(), alpha,
2963  reinterpret_cast<const void*>(X.GetData()), 1,
2964  reinterpret_cast<void*>(A.GetData()), A.GetM());
2965  }
2966 
2967 
2968  /*** RowSymPacked and Uplo ***/
2969 
2970 
2971  template <class Allocator0,
2972  class Prop1, class Allocator1>
2973  void Rank1Update(const float& alpha,
2974  const Vector<float, VectFull, Allocator0>& X,
2975  const SeldonUplo& Uplo,
2976  Matrix<float, Prop1, RowSymPacked, Allocator1>& A)
2977  {
2978 
2979 #ifdef SELDON_CHECK_DIMENSIONS
2980  CheckDim(A, X, "Rank1Update(alpha, X, uplo, M)", "X.X' + M");
2981 #endif
2982 
2983  cblas_sspr(CblasRowMajor, Uplo.Cblas(), A.GetM(), alpha,
2984  X.GetData(), 1, A.GetData());
2985  }
2986 
2987 
2988  template <class Allocator0,
2989  class Prop1, class Allocator1>
2990  void Rank1Update(const double& alpha,
2991  const Vector<double, VectFull, Allocator0>& X,
2992  const SeldonUplo& Uplo,
2993  Matrix<double, Prop1, RowSymPacked, Allocator1>& A)
2994  {
2995 
2996 #ifdef SELDON_CHECK_DIMENSIONS
2997  CheckDim(A, X, "Rank1Update(alpha, X, uplo, M)", "X.X' + M");
2998 #endif
2999 
3000  cblas_dspr(CblasRowMajor, Uplo.Cblas(), A.GetM(), alpha,
3001  X.GetData(), 1, A.GetData());
3002  }
3003 
3004 
3005  template <class Allocator0,
3006  class Prop1, class Allocator1>
3007  void Rank1Update(const float& alpha,
3008  const Vector<float, VectFull, Allocator0>& X,
3009  const SeldonUplo& Uplo,
3010  Matrix<float, Prop1, RowSym, Allocator1>& A)
3011  {
3012 
3013 #ifdef SELDON_CHECK_DIMENSIONS
3014  CheckDim(A, X, "Rank1Update(alpha, X, uplo, M)", "X.X' + M");
3015 #endif
3016 
3017  cblas_ssyr(CblasRowMajor, Uplo.Cblas(), A.GetM(), alpha,
3018  X.GetData(), 1, A.GetData(), A.GetM());
3019  }
3020 
3021 
3022  template <class Allocator0,
3023  class Prop1, class Allocator1>
3024  void Rank1Update(const double& alpha,
3025  const Vector<double, VectFull, Allocator0>& X,
3026  const SeldonUplo& Uplo,
3027  Matrix<double, Prop1, RowSym, Allocator1>& A)
3028  {
3029 
3030 #ifdef SELDON_CHECK_DIMENSIONS
3031  CheckDim(A, X, "Rank1Update(alpha, X, uplo, M)", "X.X' + M");
3032 #endif
3033 
3034  cblas_dsyr(CblasRowMajor, Uplo.Cblas(), A.GetM(), alpha,
3035  X.GetData(), 1, A.GetData(), A.GetM());
3036  }
3037 
3038 
3039  template <class Allocator0,
3040  class Prop1, class Allocator1>
3041  void
3042  Rank1Update(const float& alpha,
3043  const Vector<complex<float>, VectFull, Allocator0>& X,
3044  const SeldonUplo& Uplo,
3045  Matrix<complex<float>, Prop1, RowHermPacked, Allocator1>& A)
3046  {
3047 
3048 #ifdef SELDON_CHECK_DIMENSIONS
3049  CheckDim(A, X, "Rank1Update(alpha, X, uplo, M)", "X.X' + M");
3050 #endif
3051 
3052  cblas_chpr(CblasRowMajor, Uplo.Cblas(), A.GetM(), alpha,
3053  reinterpret_cast<const void*>(X.GetData()), 1,
3054  reinterpret_cast<void*>(A.GetData()));
3055  }
3056 
3057 
3058  template <class Allocator0,
3059  class Prop1, class Allocator1>
3060  void
3061  Rank1Update(const double& alpha,
3062  const Vector<complex<double>, VectFull, Allocator0>& X,
3063  const SeldonUplo& Uplo,
3064  Matrix<complex<double>, Prop1, RowHermPacked, Allocator1>& A)
3065  {
3066 
3067 #ifdef SELDON_CHECK_BOUNDS
3068  CheckDim(A, X, "Rank1Update(alpha, X, uplo, M)", "X.X' + M");
3069 #endif
3070 
3071  cblas_zhpr(CblasRowMajor, Uplo.Cblas(), A.GetM(), alpha,
3072  reinterpret_cast<const void*>(X.GetData()), 1,
3073  reinterpret_cast<void*>(A.GetData()));
3074  }
3075 
3076 
3077  template <class Allocator0,
3078  class Prop1, class Allocator1>
3079  void
3080  Rank1Update(const float& alpha,
3081  const Vector<complex<float>, VectFull, Allocator0>& X,
3082  const SeldonUplo& Uplo,
3083  Matrix<complex<float>, Prop1, RowHerm, Allocator1>& A)
3084  {
3085 
3086 #ifdef SELDON_CHECK_DIMENSIONS
3087  CheckDim(A, X, "Rank1Update(alpha, X, uplo, M)", "X.X' + M");
3088 #endif
3089 
3090  cblas_cher(CblasRowMajor, Uplo.Cblas(), A.GetM(), alpha,
3091  reinterpret_cast<const void*>(X.GetData()), 1,
3092  reinterpret_cast<void*>(A.GetData()), A.GetM());
3093  }
3094 
3095 
3096  template <class Allocator0,
3097  class Prop1, class Allocator1>
3098  void
3099  Rank1Update(const double& alpha,
3100  const Vector<complex<double>, VectFull, Allocator0>& X,
3101  const SeldonUplo& Uplo,
3102  Matrix<complex<double>, Prop1, RowHerm, Allocator1>& A)
3103  {
3104 
3105 #ifdef SELDON_CHECK_BOUNDS
3106  CheckDim(A, X, "Rank1Update(alpha, X, uplo, M)", "X.X' + M");
3107 #endif
3108 
3109  cblas_zher(CblasRowMajor, Uplo.Cblas(), A.GetM(), alpha,
3110  reinterpret_cast<const void*>(X.GetData()), 1,
3111  reinterpret_cast<void*>(A.GetData()), A.GetM());
3112  }
3113 
3114 
3115  // RANK1UPDATE //
3117 
3118 
3119 
3121  // RANK2UPDATE //
3122 
3123 
3124  /*** ColSymPacked and Upper ***/
3125 
3126 
3127  template <class Allocator0,
3128  class Prop1, class Allocator1,
3129  class Allocator2>
3130  void Rank2Update(const float& alpha,
3131  const Vector<float, VectFull, Allocator0>& X,
3132  const Vector<float, VectFull, Allocator2>& Y,
3133  Matrix<float, Prop1, ColSymPacked, Allocator1>& A)
3134  {
3135 
3136 #ifdef SELDON_CHECK_BOUNDS
3137  CheckDim(A, X, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M");
3138  CheckDim(A, Y, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M");
3139 #endif
3140 
3141  cblas_sspr2(CblasColMajor, CblasUpper, A.GetM(), alpha,
3142  X.GetData(), 1, Y.GetData(), 1, A.GetData());
3143  }
3144 
3145 
3146  template <class Allocator0,
3147  class Prop1, class Allocator1,
3148  class Allocator2>
3149  void Rank2Update(const double& alpha,
3150  const Vector<double, VectFull, Allocator0>& X,
3151  const Vector<double, VectFull, Allocator2>& Y,
3152  Matrix<double, Prop1, ColSymPacked, Allocator1>& A)
3153  {
3154 
3155 #ifdef SELDON_CHECK_DIMENSIONS
3156  CheckDim(A, X, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M");
3157  CheckDim(A, Y, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M");
3158 #endif
3159 
3160  cblas_dspr2(CblasColMajor, CblasUpper, A.GetM(), alpha,
3161  X.GetData(), 1, Y.GetData(), 1, A.GetData());
3162  }
3163 
3164 
3165  template <class Allocator0,
3166  class Prop1, class Allocator1,
3167  class Allocator2>
3168  void Rank2Update(const float& alpha,
3169  const Vector<float, VectFull, Allocator0>& X,
3170  const Vector<float, VectFull, Allocator2>& Y,
3171  Matrix<float, Prop1, ColSym, Allocator1>& A)
3172  {
3173 
3174 #ifdef SELDON_CHECK_BOUNDS
3175  CheckDim(A, X, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M");
3176  CheckDim(A, Y, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M");
3177 #endif
3178 
3179  cblas_ssyr2(CblasColMajor, CblasUpper, A.GetM(), alpha,
3180  X.GetData(), 1, Y.GetData(), 1, A.GetData(), A.GetM());
3181  }
3182 
3183 
3184  template <class Allocator0,
3185  class Prop1, class Allocator1,
3186  class Allocator2>
3187  void Rank2Update(const double& alpha,
3188  const Vector<double, VectFull, Allocator0>& X,
3189  const Vector<double, VectFull, Allocator2>& Y,
3190  Matrix<double, Prop1, ColSym, Allocator1>& A)
3191  {
3192 
3193 #ifdef SELDON_CHECK_DIMENSIONS
3194  CheckDim(A, X, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M");
3195  CheckDim(A, Y, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M");
3196 #endif
3197 
3198  cblas_dsyr2(CblasColMajor, CblasUpper, A.GetM(), alpha,
3199  X.GetData(), 1, Y.GetData(), 1, A.GetData(), A.GetM());
3200  }
3201 
3202 
3203  template <class Allocator0,
3204  class Prop1, class Allocator1,
3205  class Allocator2>
3206  void
3207  Rank2Update(const complex<float>& alpha,
3208  const Vector<complex<float>, VectFull, Allocator0>& X,
3209  const Vector<complex<float>, VectFull, Allocator2>& Y,
3210  Matrix<complex<float>, Prop1, ColHermPacked, Allocator1>& A)
3211  {
3212 
3213 #ifdef SELDON_CHECK_DIMENSIONS
3214  CheckDim(A, X, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M");
3215  CheckDim(A, Y, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M");
3216 #endif
3217 
3218  cblas_chpr2(CblasColMajor, CblasUpper, A.GetM(),
3219  reinterpret_cast<const void*>(&alpha),
3220  reinterpret_cast<const void*>(X.GetData()), 1,
3221  reinterpret_cast<const void*>(Y.GetData()), 1,
3222  reinterpret_cast<void*>(A.GetData()));
3223  }
3224 
3225 
3226  template <class Allocator0,
3227  class Prop1, class Allocator1,
3228  class Allocator2>
3229  void
3230  Rank2Update(const complex<double>& alpha,
3231  const Vector<complex<double>, VectFull, Allocator0>& X,
3232  const Vector<complex<double>, VectFull, Allocator2>& Y,
3233  Matrix<complex<double>, Prop1, ColHermPacked, Allocator1>& A)
3234  {
3235 
3236 #ifdef SELDON_CHECK_DIMENSIONS
3237  CheckDim(A, X, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M");
3238  CheckDim(A, Y, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M");
3239 #endif
3240 
3241  cblas_zhpr2(CblasColMajor, CblasUpper, A.GetM(),
3242  reinterpret_cast<const void*>(&alpha),
3243  reinterpret_cast<const void*>(X.GetData()), 1,
3244  reinterpret_cast<const void*>(Y.GetData()), 1,
3245  reinterpret_cast<void*>(A.GetData()));
3246  }
3247 
3248 
3249  template <class Allocator0,
3250  class Prop1, class Allocator1,
3251  class Allocator2>
3252  void
3253  Rank2Update(const complex<float>& alpha,
3254  const Vector<complex<float>, VectFull, Allocator0>& X,
3255  const Vector<complex<float>, VectFull, Allocator2>& Y,
3256  Matrix<complex<float>, Prop1, ColHerm, Allocator1>& A)
3257  {
3258 
3259 #ifdef SELDON_CHECK_DIMENSIONS
3260  CheckDim(A, X, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M");
3261  CheckDim(A, Y, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M");
3262 #endif
3263 
3264  cblas_cher2(CblasColMajor, CblasUpper, A.GetM(),
3265  reinterpret_cast<const void*>(&alpha),
3266  reinterpret_cast<const void*>(X.GetData()), 1,
3267  reinterpret_cast<const void*>(Y.GetData()), 1,
3268  reinterpret_cast<void*>(A.GetData()), A.GetM());
3269  }
3270 
3271 
3272  template <class Allocator0,
3273  class Prop1, class Allocator1,
3274  class Allocator2>
3275  void
3276  Rank2Update(const complex<double>& alpha,
3277  const Vector<complex<double>, VectFull, Allocator0>& X,
3278  const Vector<complex<double>, VectFull, Allocator2>& Y,
3279  Matrix<complex<double>, Prop1, ColHerm, Allocator1>& A)
3280  {
3281 
3282 #ifdef SELDON_CHECK_DIMENSIONS
3283  CheckDim(A, X, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M");
3284  CheckDim(A, Y, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M");
3285 #endif
3286 
3287  cblas_zher2(CblasColMajor, CblasUpper, A.GetM(),
3288  reinterpret_cast<const void*>(&alpha),
3289  reinterpret_cast<const void*>(X.GetData()), 1,
3290  reinterpret_cast<const void*>(Y.GetData()), 1,
3291  reinterpret_cast<void*>(A.GetData()), A.GetM());
3292  }
3293 
3294 
3295  /*** ColSymPacked and Uplo ***/
3296 
3297 
3298  template <class Allocator0,
3299  class Prop1, class Allocator1,
3300  class Allocator2>
3301  void Rank2Update(const float& alpha,
3302  const Vector<float, VectFull, Allocator0>& X,
3303  const Vector<float, VectFull, Allocator2>& Y,
3304  const SeldonUplo& Uplo,
3305  Matrix<float, Prop1, ColSymPacked, Allocator1>& A)
3306  {
3307 
3308 #ifdef SELDON_CHECK_DIMENSIONS
3309  CheckDim(A, X, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M");
3310  CheckDim(A, Y, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M");
3311 #endif
3312 
3313  cblas_sspr2(CblasColMajor, Uplo.Cblas(), A.GetM(), alpha,
3314  X.GetData(), 1, Y.GetData(), 1, A.GetData());
3315  }
3316 
3317 
3318  template <class Allocator0,
3319  class Prop1, class Allocator1,
3320  class Allocator2>
3321  void Rank2Update(const double& alpha,
3322  const Vector<double, VectFull, Allocator0>& X,
3323  const Vector<double, VectFull, Allocator2>& Y,
3324  const SeldonUplo& Uplo,
3325  Matrix<double, Prop1, ColSymPacked, Allocator1>& A)
3326  {
3327 
3328 #ifdef SELDON_CHECK_DIMENSIONS
3329  CheckDim(A, X, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M");
3330  CheckDim(A, Y, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M");
3331 #endif
3332 
3333  cblas_dspr2(CblasColMajor, Uplo.Cblas(), A.GetM(), alpha,
3334  X.GetData(), 1, Y.GetData(), 1, A.GetData());
3335  }
3336 
3337 
3338  template <class Allocator0,
3339  class Prop1, class Allocator1,
3340  class Allocator2>
3341  void Rank2Update(const float& alpha,
3342  const Vector<float, VectFull, Allocator0>& X,
3343  const Vector<float, VectFull, Allocator2>& Y,
3344  const SeldonUplo& Uplo,
3345  Matrix<float, Prop1, ColSym, Allocator1>& A)
3346  {
3347 
3348 #ifdef SELDON_CHECK_DIMENSIONS
3349  CheckDim(A, X, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M");
3350  CheckDim(A, Y, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M");
3351 #endif
3352 
3353  cblas_ssyr2(CblasColMajor, Uplo.Cblas(), A.GetM(), alpha,
3354  X.GetData(), 1, Y.GetData(), 1, A.GetData(), A.GetM());
3355  }
3356 
3357 
3358  template <class Allocator0,
3359  class Prop1, class Allocator1,
3360  class Allocator2>
3361  void Rank2Update(const double& alpha,
3362  const Vector<double, VectFull, Allocator0>& X,
3363  const Vector<double, VectFull, Allocator2>& Y,
3364  const SeldonUplo& Uplo,
3365  Matrix<double, Prop1, ColSym, Allocator1>& A)
3366  {
3367 
3368 #ifdef SELDON_CHECK_DIMENSIONS
3369  CheckDim(A, X, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M");
3370  CheckDim(A, Y, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M");
3371 #endif
3372 
3373  cblas_dsyr2(CblasColMajor, Uplo.Cblas(), A.GetM(), alpha,
3374  X.GetData(), 1, Y.GetData(), 1, A.GetData(), A.GetM());
3375  }
3376 
3377 
3378  template <class Allocator0,
3379  class Prop1, class Allocator1,
3380  class Allocator2>
3381  void
3382  Rank2Update(const complex<float>& alpha,
3383  const Vector<complex<float>, VectFull, Allocator0>& X,
3384  const Vector<complex<float>, VectFull, Allocator2>& Y,
3385  const SeldonUplo& Uplo,
3386  Matrix<complex<float>, Prop1, ColHermPacked, Allocator1>& A)
3387  {
3388 
3389 #ifdef SELDON_CHECK_DIMENSIONS
3390  CheckDim(A, X, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M");
3391  CheckDim(A, Y, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M");
3392 #endif
3393 
3394  cblas_chpr2(CblasColMajor, Uplo.Cblas(), A.GetM(),
3395  reinterpret_cast<const void*>(&alpha),
3396  reinterpret_cast<const void*>(X.GetData()), 1,
3397  reinterpret_cast<const void*>(Y.GetData()), 1,
3398  reinterpret_cast<void*>(A.GetData()));
3399  }
3400 
3401 
3402  template <class Allocator0,
3403  class Prop1, class Allocator1,
3404  class Allocator2>
3405  void
3406  Rank2Update(const complex<double>& alpha,
3407  const Vector<complex<double>, VectFull, Allocator0>& X,
3408  const Vector<complex<double>, VectFull, Allocator2>& Y,
3409  const SeldonUplo& Uplo,
3410  Matrix<complex<double>, Prop1, ColHermPacked, Allocator1>& A)
3411  {
3412 
3413 #ifdef SELDON_CHECK_DIMENSIONS
3414  CheckDim(A, X, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M");
3415  CheckDim(A, Y, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M");
3416 #endif
3417 
3418  cblas_zhpr2(CblasColMajor, Uplo.Cblas(), A.GetM(),
3419  reinterpret_cast<const void*>(&alpha),
3420  reinterpret_cast<const void*>(X.GetData()), 1,
3421  reinterpret_cast<const void*>(Y.GetData()), 1,
3422  reinterpret_cast<void*>(A.GetData()));
3423  }
3424 
3425 
3426  template <class Allocator0,
3427  class Prop1, class Allocator1,
3428  class Allocator2>
3429  void
3430  Rank2Update(const complex<float>& alpha,
3431  const Vector<complex<float>, VectFull, Allocator0>& X,
3432  const Vector<complex<float>, VectFull, Allocator2>& Y,
3433  const SeldonUplo& Uplo,
3434  Matrix<complex<float>, Prop1, ColHerm, Allocator1>& A)
3435  {
3436 
3437 #ifdef SELDON_CHECK_DIMENSIONS
3438  CheckDim(A, X, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M");
3439  CheckDim(A, Y, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M");
3440 #endif
3441 
3442  cblas_cher2(CblasColMajor, Uplo.Cblas(), A.GetM(),
3443  reinterpret_cast<const void*>(&alpha),
3444  reinterpret_cast<const void*>(X.GetData()), 1,
3445  reinterpret_cast<const void*>(Y.GetData()), 1,
3446  reinterpret_cast<void*>(A.GetData()), A.GetM());
3447  }
3448 
3449 
3450  template <class Allocator0,
3451  class Prop1, class Allocator1,
3452  class Allocator2>
3453  void
3454  Rank2Update(const complex<double>& alpha,
3455  const Vector<complex<double>, VectFull, Allocator0>& X,
3456  const Vector<complex<double>, VectFull, Allocator2>& Y,
3457  const SeldonUplo& Uplo,
3458  Matrix<complex<double>, Prop1, ColHerm, Allocator1>& A)
3459  {
3460 
3461 #ifdef SELDON_CHECK_DIMENSIONS
3462  CheckDim(A, X, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M");
3463  CheckDim(A, Y, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M");
3464 #endif
3465 
3466  cblas_zher2(CblasColMajor, Uplo.Cblas(), A.GetM(),
3467  reinterpret_cast<const void*>(&alpha),
3468  reinterpret_cast<const void*>(X.GetData()), 1,
3469  reinterpret_cast<const void*>(Y.GetData()), 1,
3470  reinterpret_cast<void*>(A.GetData()), A.GetM());
3471  }
3472 
3473 
3474  /*** RowSymPacked and Upper ***/
3475 
3476 
3477  template <class Allocator0,
3478  class Prop1, class Allocator1,
3479  class Allocator2>
3480  void Rank2Update(const float& alpha,
3481  const Vector<float, VectFull, Allocator0>& X,
3482  const Vector<float, VectFull, Allocator2>& Y,
3483  Matrix<float, Prop1, RowSymPacked, Allocator1>& A)
3484  {
3485 
3486 #ifdef SELDON_CHECK_DIMENSIONS
3487  CheckDim(A, X, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M");
3488  CheckDim(A, Y, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M");
3489 #endif
3490 
3491  cblas_sspr2(CblasRowMajor, CblasUpper, A.GetM(), alpha,
3492  X.GetData(), 1, Y.GetData(), 1, A.GetData());
3493  }
3494 
3495 
3496  template <class Allocator0,
3497  class Prop1, class Allocator1,
3498  class Allocator2>
3499  void Rank2Update(const double& alpha,
3500  const Vector<double, VectFull, Allocator0>& X,
3501  const Vector<double, VectFull, Allocator2>& Y,
3502  Matrix<double, Prop1, RowSymPacked, Allocator1>& A)
3503  {
3504 
3505 #ifdef SELDON_CHECK_DIMENSIONS
3506  CheckDim(A, X, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M");
3507  CheckDim(A, Y, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M");
3508 #endif
3509 
3510  cblas_dspr2(CblasRowMajor, CblasUpper, A.GetM(), alpha,
3511  X.GetData(), 1, Y.GetData(), 1, A.GetData());
3512  }
3513 
3514 
3515  template <class Allocator0,
3516  class Prop1, class Allocator1,
3517  class Allocator2>
3518  void Rank2Update(const float& alpha,
3519  const Vector<float, VectFull, Allocator0>& X,
3520  const Vector<float, VectFull, Allocator2>& Y,
3521  Matrix<float, Prop1, RowSym, Allocator1>& A)
3522  {
3523 
3524 #ifdef SELDON_CHECK_DIMENSIONS
3525  CheckDim(A, X, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M");
3526  CheckDim(A, Y, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M");
3527 #endif
3528 
3529  cblas_ssyr2(CblasRowMajor, CblasUpper, A.GetM(), alpha,
3530  X.GetData(), 1, Y.GetData(), 1, A.GetData(), A.GetM());
3531  }
3532 
3533 
3534  template <class Allocator0,
3535  class Prop1, class Allocator1,
3536  class Allocator2>
3537  void Rank2Update(const double& alpha,
3538  const Vector<double, VectFull, Allocator0>& X,
3539  const Vector<double, VectFull, Allocator2>& Y,
3540  Matrix<double, Prop1, RowSym, Allocator1>& A)
3541  {
3542 
3543 #ifdef SELDON_CHECK_DIMENSIONS
3544  CheckDim(A, X, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M");
3545  CheckDim(A, Y, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M");
3546 #endif
3547 
3548  cblas_dsyr2(CblasRowMajor, CblasUpper, A.GetM(), alpha,
3549  X.GetData(), 1, Y.GetData(), 1, A.GetData(), A.GetM());
3550  }
3551 
3552 
3553  template <class Allocator0,
3554  class Prop1, class Allocator1,
3555  class Allocator2>
3556  void
3557  Rank2Update(const complex<float>& alpha,
3558  const Vector<complex<float>, VectFull, Allocator0>& X,
3559  const Vector<complex<float>, VectFull, Allocator2>& Y,
3560  Matrix<complex<float>, Prop1, RowHermPacked, Allocator1>& A)
3561  {
3562 
3563 #ifdef SELDON_CHECK_DIMENSIONS
3564  CheckDim(A, X, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M");
3565  CheckDim(A, Y, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M");
3566 #endif
3567 
3568  cblas_chpr2(CblasRowMajor, CblasUpper, A.GetM(),
3569  reinterpret_cast<const void*>(&alpha),
3570  reinterpret_cast<const void*>(X.GetData()), 1,
3571  reinterpret_cast<const void*>(Y.GetData()), 1,
3572  reinterpret_cast<void*>(A.GetData()));
3573  }
3574 
3575 
3576  template <class Allocator0,
3577  class Prop1, class Allocator1,
3578  class Allocator2>
3579  void
3580  Rank2Update(const complex<double>& alpha,
3581  const Vector<complex<double>, VectFull, Allocator0>& X,
3582  const Vector<complex<double>, VectFull, Allocator2>& Y,
3583  Matrix<complex<double>, Prop1, RowHermPacked, Allocator1>& A)
3584  {
3585 
3586 #ifdef SELDON_CHECK_DIMENSIONS
3587  CheckDim(A, X, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M");
3588  CheckDim(A, Y, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M");
3589 #endif
3590 
3591  cblas_zhpr2(CblasRowMajor, CblasUpper, A.GetM(),
3592  reinterpret_cast<const void*>(&alpha),
3593  reinterpret_cast<const void*>(X.GetData()), 1,
3594  reinterpret_cast<const void*>(Y.GetData()), 1,
3595  reinterpret_cast<void*>(A.GetData()));
3596  }
3597 
3598 
3599  template <class Allocator0,
3600  class Prop1, class Allocator1,
3601  class Allocator2>
3602  void
3603  Rank2Update(const complex<float>& alpha,
3604  const Vector<complex<float>, VectFull, Allocator0>& X,
3605  const Vector<complex<float>, VectFull, Allocator2>& Y,
3606  Matrix<complex<float>, Prop1, RowHerm, Allocator1>& A)
3607  {
3608 
3609 #ifdef SELDON_CHECK_DIMENSIONS
3610  CheckDim(A, X, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M");
3611  CheckDim(A, Y, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M");
3612 #endif
3613 
3614  cblas_cher2(CblasRowMajor, CblasUpper, A.GetM(),
3615  reinterpret_cast<const void*>(&alpha),
3616  reinterpret_cast<const void*>(X.GetData()), 1,
3617  reinterpret_cast<const void*>(Y.GetData()), 1,
3618  reinterpret_cast<void*>(A.GetData()), A.GetM());
3619  }
3620 
3621 
3622  template <class Allocator0,
3623  class Prop1, class Allocator1,
3624  class Allocator2>
3625  void
3626  Rank2Update(const complex<double>& alpha,
3627  const Vector<complex<double>, VectFull, Allocator0>& X,
3628  const Vector<complex<double>, VectFull, Allocator2>& Y,
3629  Matrix<complex<double>, Prop1, RowHerm, Allocator1>& A)
3630  {
3631 
3632 #ifdef SELDON_CHECK_DIMENSIONS
3633  CheckDim(A, X, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M");
3634  CheckDim(A, Y, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M");
3635 #endif
3636 
3637  cblas_zher2(CblasRowMajor, CblasUpper, A.GetM(),
3638  reinterpret_cast<const void*>(&alpha),
3639  reinterpret_cast<const void*>(X.GetData()), 1,
3640  reinterpret_cast<const void*>(Y.GetData()), 1,
3641  reinterpret_cast<void*>(A.GetData()), A.GetM());
3642  }
3643 
3644 
3645  /*** RowSymPacked and Uplo ***/
3646 
3647 
3648  template <class Allocator0,
3649  class Prop1, class Allocator1,
3650  class Allocator2>
3651  void Rank2Update(const float& alpha,
3652  const Vector<float, VectFull, Allocator0>& X,
3653  const Vector<float, VectFull, Allocator2>& Y,
3654  const SeldonUplo& Uplo,
3655  Matrix<float, Prop1, RowSymPacked, Allocator1>& A)
3656  {
3657 
3658 #ifdef SELDON_CHECK_DIMENSIONS
3659  CheckDim(A, X, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M");
3660  CheckDim(A, Y, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M");
3661 #endif
3662 
3663  cblas_sspr2(CblasRowMajor, Uplo.Cblas(), A.GetM(), alpha,
3664  X.GetData(), 1, Y.GetData(), 1, A.GetData());
3665  }
3666 
3667 
3668  template <class Allocator0,
3669  class Prop1, class Allocator1,
3670  class Allocator2>
3671  void Rank2Update(const double& alpha,
3672  const Vector<double, VectFull, Allocator0>& X,
3673  const Vector<double, VectFull, Allocator2>& Y,
3674  const SeldonUplo& Uplo,
3675  Matrix<double, Prop1, RowSymPacked, Allocator1>& A)
3676  {
3677 
3678 #ifdef SELDON_CHECK_DIMENSIONS
3679  CheckDim(A, X, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M");
3680  CheckDim(A, Y, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M");
3681 #endif
3682 
3683  cblas_dspr2(CblasRowMajor, Uplo.Cblas(), A.GetM(), alpha,
3684  X.GetData(), 1, Y.GetData(), 1, A.GetData());
3685  }
3686 
3687 
3688  template <class Allocator0,
3689  class Prop1, class Allocator1,
3690  class Allocator2>
3691  void Rank2Update(const float& alpha,
3692  const Vector<float, VectFull, Allocator0>& X,
3693  const Vector<float, VectFull, Allocator2>& Y,
3694  const SeldonUplo& Uplo,
3695  Matrix<float, Prop1, RowSym, Allocator1>& A)
3696  {
3697 
3698 #ifdef SELDON_CHECK_DIMENSIONS
3699  CheckDim(A, X, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M");
3700  CheckDim(A, Y, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M");
3701 #endif
3702 
3703  cblas_ssyr2(CblasRowMajor, Uplo.Cblas(), A.GetM(), alpha,
3704  X.GetData(), 1, Y.GetData(), 1, A.GetData(), A.GetM());
3705  }
3706 
3707 
3708  template <class Allocator0,
3709  class Prop1, class Allocator1,
3710  class Allocator2>
3711  void Rank2Update(const double& alpha,
3712  const Vector<double, VectFull, Allocator0>& X,
3713  const Vector<double, VectFull, Allocator2>& Y,
3714  const SeldonUplo& Uplo,
3715  Matrix<double, Prop1, RowSym, Allocator1>& A)
3716  {
3717 
3718 #ifdef SELDON_CHECK_DIMENSIONS
3719  CheckDim(A, X, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M");
3720  CheckDim(A, Y, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M");
3721 #endif
3722 
3723  cblas_dsyr2(CblasRowMajor, Uplo.Cblas(), A.GetM(), alpha,
3724  X.GetData(), 1, Y.GetData(), 1, A.GetData(), A.GetM());
3725  }
3726 
3727 
3728  template <class Allocator0,
3729  class Prop1, class Allocator1,
3730  class Allocator2>
3731  void
3732  Rank2Update(const complex<float>& alpha,
3733  const Vector<complex<float>, VectFull, Allocator0>& X,
3734  const Vector<complex<float>, VectFull, Allocator2>& Y,
3735  const SeldonUplo& Uplo,
3736  Matrix<complex<float>, Prop1, RowHermPacked, Allocator1>& A)
3737  {
3738 
3739 #ifdef SELDON_CHECK_DIMENSIONS
3740  CheckDim(A, X, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M");
3741  CheckDim(A, Y, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M");
3742 #endif
3743 
3744  cblas_chpr2(CblasRowMajor, Uplo.Cblas(), A.GetM(),
3745  reinterpret_cast<const void*>(&alpha),
3746  reinterpret_cast<const void*>(X.GetData()), 1,
3747  reinterpret_cast<const void*>(Y.GetData()), 1,
3748  reinterpret_cast<void*>(A.GetData()));
3749  }
3750 
3751 
3752  template <class Allocator0,
3753  class Prop1, class Allocator1,
3754  class Allocator2>
3755  void
3756  Rank2Update(const complex<double>& alpha,
3757  const Vector<complex<double>, VectFull, Allocator0>& X,
3758  const Vector<complex<double>, VectFull, Allocator2>& Y,
3759  const SeldonUplo& Uplo,
3760  Matrix<complex<double>, Prop1, RowHermPacked, Allocator1>& A)
3761  {
3762 
3763 #ifdef SELDON_CHECK_DIMENSIONS
3764  CheckDim(A, X, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M");
3765  CheckDim(A, Y, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M");
3766 #endif
3767 
3768  cblas_zhpr2(CblasRowMajor, Uplo.Cblas(), A.GetM(),
3769  reinterpret_cast<const void*>(&alpha),
3770  reinterpret_cast<const void*>(X.GetData()), 1,
3771  reinterpret_cast<const void*>(Y.GetData()), 1,
3772  reinterpret_cast<void*>(A.GetData()));
3773  }
3774 
3775 
3776  template <class Allocator0,
3777  class Prop1, class Allocator1,
3778  class Allocator2>
3779  void
3780  Rank2Update(const complex<float>& alpha,
3781  const Vector<complex<float>, VectFull, Allocator0>& X,
3782  const Vector<complex<float>, VectFull, Allocator2>& Y,
3783  const SeldonUplo& Uplo,
3784  Matrix<complex<float>, Prop1, RowHerm, Allocator1>& A)
3785  {
3786 
3787 #ifdef SELDON_CHECK_DIMENSIONS
3788  CheckDim(A, X, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M");
3789  CheckDim(A, Y, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M");
3790 #endif
3791 
3792  cblas_cher2(CblasRowMajor, Uplo.Cblas(), A.GetM(),
3793  reinterpret_cast<const void*>(&alpha),
3794  reinterpret_cast<const void*>(X.GetData()), 1,
3795  reinterpret_cast<const void*>(Y.GetData()), 1,
3796  reinterpret_cast<void*>(A.GetData()), A.GetM());
3797  }
3798 
3799 
3800  template <class Allocator0,
3801  class Prop1, class Allocator1,
3802  class Allocator2>
3803  void
3804  Rank2Update(const complex<double>& alpha,
3805  const Vector<complex<double>, VectFull, Allocator0>& X,
3806  const Vector<complex<double>, VectFull, Allocator2>& Y,
3807  const SeldonUplo& Uplo,
3808  Matrix<complex<double>, Prop1, RowHerm, Allocator1>& A)
3809  {
3810 
3811 #ifdef SELDON_CHECK_DIMENSIONS
3812  CheckDim(A, X, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M");
3813  CheckDim(A, Y, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M");
3814 #endif
3815 
3816  cblas_zher2(CblasRowMajor, Uplo.Cblas(), A.GetM(),
3817  reinterpret_cast<const void*>(&alpha),
3818  reinterpret_cast<const void*>(X.GetData()), 1,
3819  reinterpret_cast<const void*>(Y.GetData()), 1,
3820  reinterpret_cast<void*>(A.GetData()), A.GetM());
3821  }
3822 
3823 
3824  // RANK2UPDATE //
3826 
3827 
3828 
3830  // SOLVE //
3831 
3832 
3833  /*** ColUpTriang, NoTrans and NonUnit ***/
3834 
3835 
3836  template <class Prop0, class Allocator0,
3837  class Allocator1>
3838  void Solve(const Matrix<float, Prop0, ColUpTriang, Allocator0>& A,
3839  Vector<float, VectFull, Allocator1>& X)
3840  {
3841 
3842 #ifdef SELDON_CHECK_DIMENSIONS
3843  CheckDim(A, X, "Solve(M, X)");
3844 #endif
3845 
3846  cblas_strsv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
3847  A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1);
3848  }
3849 
3850 
3851  template <class Prop0, class Allocator0,
3852  class Allocator1>
3853  void Solve(const Matrix<double, Prop0, ColUpTriang, Allocator0>& A,
3854  Vector<double, VectFull, Allocator1>& X)
3855  {
3856 
3857 #ifdef SELDON_CHECK_DIMENSIONS
3858  CheckDim(A, X, "Solve(M, X)");
3859 #endif
3860 
3861  cblas_dtrsv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
3862  A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1);
3863  }
3864 
3865 
3866  template <class Prop0, class Allocator0,
3867  class Allocator1>
3868  void
3869  Solve(const Matrix<complex<float>, Prop0, ColUpTriang, Allocator0>& A,
3870  Vector<complex<float>, VectFull, Allocator1>& X)
3871  {
3872 
3873 #ifdef SELDON_CHECK_DIMENSIONS
3874  CheckDim(A, X, "Solve(M, X)");
3875 #endif
3876 
3877  cblas_ctrsv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
3878  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
3879  A.GetM(), reinterpret_cast<void*>(X.GetData()), 1);
3880  }
3881 
3882 
3883  template <class Prop0, class Allocator0,
3884  class Allocator1>
3885  void
3886  Solve(const Matrix<complex<double>, Prop0,
3887  ColUpTriang, Allocator0>& A,
3888  Vector<complex<double>, VectFull, Allocator1>& X)
3889  {
3890 
3891 #ifdef SELDON_CHECK_DIMENSIONS
3892  CheckDim(A, X, "Solve(M, X)");
3893 #endif
3894 
3895  cblas_ztrsv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
3896  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
3897  A.GetM(), reinterpret_cast<void*>(X.GetData()), 1);
3898  }
3899 
3900 
3901  /*** ColUpTriang ***/
3902 
3903 
3904  template <class Prop0, class Allocator0,
3905  class Allocator1>
3906  void Solve(const SeldonTranspose& TransA,
3907  const SeldonDiag& DiagA,
3908  const Matrix<float, Prop0, ColUpTriang, Allocator0>& A,
3909  Vector<float, VectFull, Allocator1>& X)
3910  {
3911 
3912 #ifdef SELDON_CHECK_DIMENSIONS
3913  CheckDim(A, X, "Solve(status, diag, M, X)");
3914 #endif
3915 
3916  cblas_strsv(CblasColMajor, CblasUpper, TransA.Cblas(), DiagA.Cblas(),
3917  A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1);
3918  }
3919 
3920 
3921  template <class Prop0, class Allocator0,
3922  class Allocator1>
3923  void Solve(const SeldonTranspose& TransA,
3924  const SeldonDiag& DiagA,
3925  const Matrix<double, Prop0, ColUpTriang, Allocator0>& A,
3926  Vector<double, VectFull, Allocator1>& X)
3927  {
3928 
3929 #ifdef SELDON_CHECK_DIMENSIONS
3930  CheckDim(A, X, "Solve(status, diag, M, X)");
3931 #endif
3932 
3933  cblas_dtrsv(CblasColMajor, CblasUpper, TransA.Cblas(), DiagA.Cblas(),
3934  A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1);
3935  }
3936 
3937 
3938  template <class Prop0, class Allocator0,
3939  class Allocator1>
3940  void
3941  Solve(const SeldonTranspose& TransA,
3942  const SeldonDiag& DiagA,
3943  const Matrix<complex<float>, Prop0, ColUpTriang, Allocator0>& A,
3944  Vector<complex<float>, VectFull, Allocator1>& X)
3945  {
3946 
3947 #ifdef SELDON_CHECK_DIMENSIONS
3948  CheckDim(A, X, "Solve(status, diag, M, X)");
3949 #endif
3950 
3951  cblas_ctrsv(CblasColMajor, CblasUpper, TransA.Cblas(), DiagA.Cblas(),
3952  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
3953  A.GetM(), reinterpret_cast<void*>(X.GetData()), 1);
3954  }
3955 
3956 
3957  template <class Prop0, class Allocator0,
3958  class Allocator1>
3959  void
3960  Solve(const SeldonTranspose& TransA,
3961  const SeldonDiag& DiagA,
3962  const Matrix<complex<double>, Prop0,
3963  ColUpTriang, Allocator0>& A,
3964  Vector<complex<double>, VectFull, Allocator1>& X)
3965  {
3966 
3967 #ifdef SELDON_CHECK_DIMENSIONS
3968  CheckDim(A, X, "Solve(status, diag, M, X)");
3969 #endif
3970 
3971  cblas_ztrsv(CblasColMajor, CblasUpper, TransA.Cblas(), DiagA.Cblas(),
3972  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
3973  A.GetM(), reinterpret_cast<void*>(X.GetData()), 1);
3974  }
3975 
3976 
3977  /*** ColLoTriang, NoTrans and NonUnit ***/
3978 
3979 
3980  template <class Prop0, class Allocator0,
3981  class Allocator1>
3982  void Solve(const Matrix<float, Prop0, ColLoTriang, Allocator0>& A,
3983  Vector<float, VectFull, Allocator1>& X)
3984  {
3985 
3986 #ifdef SELDON_CHECK_DIMENSIONS
3987  CheckDim(A, X, "Solve(M, X)");
3988 #endif
3989 
3990  cblas_strsv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit,
3991  A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1);
3992  }
3993 
3994 
3995  template <class Prop0, class Allocator0,
3996  class Allocator1>
3997  void Solve(const Matrix<double, Prop0, ColLoTriang, Allocator0>& A,
3998  Vector<double, VectFull, Allocator1>& X)
3999  {
4000 
4001 #ifdef SELDON_CHECK_DIMENSIONS
4002  CheckDim(A, X, "Solve(M, X)");
4003 #endif
4004 
4005  cblas_dtrsv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit,
4006  A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1);
4007  }
4008 
4009 
4010  template <class Prop0, class Allocator0,
4011  class Allocator1>
4012  void
4013  Solve(const Matrix<complex<float>, Prop0, ColLoTriang, Allocator0>& A,
4014  Vector<complex<float>, VectFull, Allocator1>& X)
4015  {
4016 
4017 #ifdef SELDON_CHECK_DIMENSIONS
4018  CheckDim(A, X, "Solve(M, X)");
4019 #endif
4020 
4021  cblas_ctrsv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit,
4022  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
4023  A.GetM(), reinterpret_cast<void*>(X.GetData()), 1);
4024  }
4025 
4026 
4027  template <class Prop0, class Allocator0,
4028  class Allocator1>
4029  void
4030  Solve(const Matrix<complex<double>, Prop0,
4031  ColLoTriang, Allocator0>& A,
4032  Vector<complex<double>, VectFull, Allocator1>& X)
4033  {
4034 
4035 #ifdef SELDON_CHECK_DIMENSIONS
4036  CheckDim(A, X, "Solve(M, X)");
4037 #endif
4038 
4039  cblas_ztrsv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit,
4040  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
4041  A.GetM(), reinterpret_cast<void*>(X.GetData()), 1);
4042  }
4043 
4044 
4045  /*** ColLoTriang ***/
4046 
4047 
4048  template <class Prop0, class Allocator0,
4049  class Allocator1>
4050  void Solve(const SeldonTranspose& TransA,
4051  const SeldonDiag& DiagA,
4052  const Matrix<float, Prop0, ColLoTriang, Allocator0>& A,
4053  Vector<float, VectFull, Allocator1>& X)
4054  {
4055 
4056 #ifdef SELDON_CHECK_DIMENSIONS
4057  CheckDim(A, X, "Solve(status, uplo, M, X)");
4058 #endif
4059 
4060  cblas_strsv(CblasColMajor, CblasLower, TransA.Cblas(), DiagA.Cblas(),
4061  A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1);
4062  }
4063 
4064 
4065  template <class Prop0, class Allocator0,
4066  class Allocator1>
4067  void Solve(const SeldonTranspose& TransA,
4068  const SeldonDiag& DiagA,
4069  const Matrix<double, Prop0, ColLoTriang, Allocator0>& A,
4070  Vector<double, VectFull, Allocator1>& X)
4071  {
4072 
4073 #ifdef SELDON_CHECK_DIMENSIONS
4074  CheckDim(A, X, "Solve(status, uplo, M, X)");
4075 #endif
4076 
4077  cblas_dtrsv(CblasColMajor, CblasLower, TransA.Cblas(), DiagA.Cblas(),
4078  A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1);
4079  }
4080 
4081 
4082  template <class Prop0, class Allocator0,
4083  class Allocator1>
4084  void
4085  Solve(const SeldonTranspose& TransA,
4086  const SeldonDiag& DiagA,
4087  const Matrix<complex<float>, Prop0, ColLoTriang, Allocator0>& A,
4088  Vector<complex<float>, VectFull, Allocator1>& X)
4089  {
4090 
4091 #ifdef SELDON_CHECK_DIMENSIONS
4092  CheckDim(A, X, "Solve(status, uplo, M, X)");
4093 #endif
4094 
4095  cblas_ctrsv(CblasColMajor, CblasLower, TransA.Cblas(), DiagA.Cblas(),
4096  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
4097  A.GetM(), reinterpret_cast<void*>(X.GetData()), 1);
4098  }
4099 
4100 
4101  template <class Prop0, class Allocator0,
4102  class Allocator1>
4103  void
4104  Solve(const SeldonTranspose& TransA,
4105  const SeldonDiag& DiagA,
4106  const Matrix<complex<double>, Prop0,
4107  ColLoTriang, Allocator0>& A,
4108  Vector<complex<double>, VectFull, Allocator1>& X)
4109  {
4110 
4111 #ifdef SELDON_CHECK_DIMENSIONS
4112  CheckDim(A, X, "Solve(status, uplo, M, X)");
4113 #endif
4114 
4115  cblas_ztrsv(CblasColMajor, CblasLower, TransA.Cblas(), DiagA.Cblas(),
4116  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
4117  A.GetM(), reinterpret_cast<void*>(X.GetData()), 1);
4118  }
4119 
4120 
4121  /*** RowUpTriang, NoTrans and NonUnit ***/
4122 
4123 
4124  template <class Prop0, class Allocator0,
4125  class Allocator1>
4126  void Solve(const Matrix<float, Prop0, RowUpTriang, Allocator0>& A,
4127  Vector<float, VectFull, Allocator1>& X)
4128  {
4129 
4130 #ifdef SELDON_CHECK_DIMENSIONS
4131  CheckDim(A, X, "Solve(M, X)");
4132 #endif
4133 
4134  cblas_strsv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
4135  A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1);
4136  }
4137 
4138 
4139  template <class Prop0, class Allocator0,
4140  class Allocator1>
4141  void Solve(const Matrix<double, Prop0, RowUpTriang, Allocator0>& A,
4142  Vector<double, VectFull, Allocator1>& X)
4143  {
4144 
4145 #ifdef SELDON_CHECK_DIMENSIONS
4146  CheckDim(A, X, "Solve(M, X)");
4147 #endif
4148 
4149  cblas_dtrsv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
4150  A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1);
4151  }
4152 
4153 
4154  template <class Prop0, class Allocator0,
4155  class Allocator1>
4156  void
4157  Solve(const Matrix<complex<float>, Prop0, RowUpTriang, Allocator0>& A,
4158  Vector<complex<float>, VectFull, Allocator1>& X)
4159  {
4160 
4161 #ifdef SELDON_CHECK_DIMENSIONS
4162  CheckDim(A, X, "Solve(M, X)");
4163 #endif
4164 
4165  cblas_ctrsv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
4166  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
4167  A.GetM(), reinterpret_cast<void*>(X.GetData()), 1);
4168  }
4169 
4170 
4171  template <class Prop0, class Allocator0,
4172  class Allocator1>
4173  void
4174  Solve(const Matrix<complex<double>, Prop0,
4175  RowUpTriang, Allocator0>& A,
4176  Vector<complex<double>, VectFull, Allocator1>& X)
4177  {
4178 
4179 #ifdef SELDON_CHECK_DIMENSIONS
4180  CheckDim(A, X, "Solve(M, X)");
4181 #endif
4182 
4183  cblas_ztrsv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
4184  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
4185  A.GetM(), reinterpret_cast<void*>(X.GetData()), 1);
4186  }
4187 
4188 
4189  /*** RowUpTriang ***/
4190 
4191 
4192  template <class Prop0, class Allocator0,
4193  class Allocator1>
4194  void Solve(const SeldonTranspose& TransA,
4195  const SeldonDiag& DiagA,
4196  const Matrix<float, Prop0, RowUpTriang, Allocator0>& A,
4197  Vector<float, VectFull, Allocator1>& X)
4198  {
4199 
4200 #ifdef SELDON_CHECK_DIMENSIONS
4201  CheckDim(A, X, "Solve(status, diag, M, X)");
4202 #endif
4203 
4204  cblas_strsv(CblasRowMajor, CblasUpper, TransA.Cblas(), DiagA.Cblas(),
4205  A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1);
4206  }
4207 
4208 
4209  template <class Prop0, class Allocator0,
4210  class Allocator1>
4211  void Solve(const SeldonTranspose& TransA,
4212  const SeldonDiag& DiagA,
4213  const Matrix<double, Prop0, RowUpTriang, Allocator0>& A,
4214  Vector<double, VectFull, Allocator1>& X)
4215  {
4216 
4217 #ifdef SELDON_CHECK_DIMENSIONS
4218  CheckDim(A, X, "Solve(status, diag, M, X)");
4219 #endif
4220 
4221  cblas_dtrsv(CblasRowMajor, CblasUpper, TransA.Cblas(), DiagA.Cblas(),
4222  A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1);
4223  }
4224 
4225 
4226  template <class Prop0, class Allocator0,
4227  class Allocator1>
4228  void
4229  Solve(const SeldonTranspose& TransA,
4230  const SeldonDiag& DiagA,
4231  const Matrix<complex<float>, Prop0, RowUpTriang, Allocator0>& A,
4232  Vector<complex<float>, VectFull, Allocator1>& X)
4233  {
4234 
4235 #ifdef SELDON_CHECK_DIMENSIONS
4236  CheckDim(A, X, "Solve(status, diag, M, X)");
4237 #endif
4238 
4239  cblas_ctrsv(CblasRowMajor, CblasUpper, TransA.Cblas(), DiagA.Cblas(),
4240  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
4241  A.GetM(), reinterpret_cast<void*>(X.GetData()), 1);
4242  }
4243 
4244 
4245  template <class Prop0, class Allocator0,
4246  class Allocator1>
4247  void
4248  Solve(const SeldonTranspose& TransA,
4249  const SeldonDiag& DiagA,
4250  const Matrix<complex<double>, Prop0,
4251  RowUpTriang, Allocator0>& A,
4252  Vector<complex<double>, VectFull, Allocator1>& X)
4253  {
4254 
4255 #ifdef SELDON_CHECK_DIMENSIONS
4256  CheckDim(A, X, "Solve(status, diag, M, X)");
4257 #endif
4258 
4259  cblas_ztrsv(CblasRowMajor, CblasUpper, TransA.Cblas(), DiagA.Cblas(),
4260  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
4261  A.GetM(), reinterpret_cast<void*>(X.GetData()), 1);
4262  }
4263 
4264 
4265  /*** RowLoTriang, NoTrans and NonUnit ***/
4266 
4267 
4268  template <class Prop0, class Allocator0,
4269  class Allocator1>
4270  void Solve(const Matrix<float, Prop0, RowLoTriang, Allocator0>& A,
4271  Vector<float, VectFull, Allocator1>& X)
4272  {
4273 
4274 #ifdef SELDON_CHECK_DIMENSIONS
4275  CheckDim(A, X, "Solve(M, X)");
4276 #endif
4277 
4278  cblas_strsv(CblasRowMajor, CblasLower, CblasNoTrans, CblasNonUnit,
4279  A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1);
4280  }
4281 
4282 
4283  template <class Prop0, class Allocator0,
4284  class Allocator1>
4285  void Solve(const Matrix<double, Prop0, RowLoTriang, Allocator0>& A,
4286  Vector<double, VectFull, Allocator1>& X)
4287  {
4288 
4289 #ifdef SELDON_CHECK_DIMENSIONS
4290  CheckDim(A, X, "Solve(M, X)");
4291 #endif
4292 
4293  cblas_dtrsv(CblasRowMajor, CblasLower, CblasNoTrans, CblasNonUnit,
4294  A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1);
4295  }
4296 
4297 
4298  template <class Prop0, class Allocator0,
4299  class Allocator1>
4300  void
4301  Solve(const Matrix<complex<float>, Prop0, RowLoTriang, Allocator0>& A,
4302  Vector<complex<float>, VectFull, Allocator1>& X)
4303  {
4304 
4305 #ifdef SELDON_CHECK_DIMENSIONS
4306  CheckDim(A, X, "Solve(M, X)");
4307 #endif
4308 
4309  cblas_ctrsv(CblasRowMajor, CblasLower, CblasNoTrans, CblasNonUnit,
4310  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
4311  A.GetM(), reinterpret_cast<void*>(X.GetData()), 1);
4312  }
4313 
4314 
4315  template <class Prop0, class Allocator0,
4316  class Allocator1>
4317  void
4318  Solve(const Matrix<complex<double>, Prop0,
4319  RowLoTriang, Allocator0>& A,
4320  Vector<complex<double>, VectFull, Allocator1>& X)
4321  {
4322 
4323 #ifdef SELDON_CHECK_DIMENSIONS
4324  CheckDim(A, X, "Solve(M, X)");
4325 #endif
4326 
4327  cblas_ztrsv(CblasRowMajor, CblasLower, CblasNoTrans, CblasNonUnit,
4328  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
4329  A.GetM(), reinterpret_cast<void*>(X.GetData()), 1);
4330  }
4331 
4332 
4333  /*** RowLoTriang ***/
4334 
4335 
4336  template <class Prop0, class Allocator0,
4337  class Allocator1>
4338  void Solve(const SeldonTranspose& TransA,
4339  const SeldonDiag& DiagA,
4340  const Matrix<float, Prop0, RowLoTriang, Allocator0>& A,
4341  Vector<float, VectFull, Allocator1>& X)
4342  {
4343 
4344 #ifdef SELDON_CHECK_DIMENSIONS
4345  CheckDim(A, X, "Solve(status, diag, M, X)");
4346 #endif
4347 
4348  cblas_strsv(CblasRowMajor, CblasLower, TransA.Cblas(), DiagA.Cblas(),
4349  A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1);
4350  }
4351 
4352 
4353  template <class Prop0, class Allocator0,
4354  class Allocator1>
4355  void Solve(const SeldonTranspose& TransA,
4356  const SeldonDiag& DiagA,
4357  const Matrix<double, Prop0, RowLoTriang, Allocator0>& A,
4358  Vector<double, VectFull, Allocator1>& X)
4359  {
4360 
4361 #ifdef SELDON_CHECK_DIMENSIONS
4362  CheckDim(A, X, "Solve(status, diag, M, X)");
4363 #endif
4364 
4365  cblas_dtrsv(CblasRowMajor, CblasLower, TransA.Cblas(), DiagA.Cblas(),
4366  A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1);
4367  }
4368 
4369 
4370  template <class Prop0, class Allocator0,
4371  class Allocator1>
4372  void
4373  Solve(const SeldonTranspose& TransA,
4374  const SeldonDiag& DiagA,
4375  const Matrix<complex<float>, Prop0, RowLoTriang, Allocator0>& A,
4376  Vector<complex<float>, VectFull, Allocator1>& X)
4377  {
4378 
4379 #ifdef SELDON_CHECK_DIMENSIONS
4380  CheckDim(A, X, "Solve(status, diag, M, X)");
4381 #endif
4382 
4383  cblas_ctrsv(CblasRowMajor, CblasLower, TransA.Cblas(), DiagA.Cblas(),
4384  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
4385  A.GetM(), reinterpret_cast<void*>(X.GetData()), 1);
4386  }
4387 
4388 
4389  template <class Prop0, class Allocator0,
4390  class Allocator1>
4391  void
4392  Solve(const SeldonTranspose& TransA,
4393  const SeldonDiag& DiagA,
4394  const Matrix<complex<double>, Prop0,
4395  RowLoTriang, Allocator0>& A,
4396  Vector<complex<double>, VectFull, Allocator1>& X)
4397  {
4398 
4399 #ifdef SELDON_CHECK_DIMENSIONS
4400  CheckDim(A, X, "Solve(status, diag, M, X)");
4401 #endif
4402 
4403  cblas_ztrsv(CblasRowMajor, CblasLower, TransA.Cblas(), DiagA.Cblas(),
4404  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
4405  A.GetM(), reinterpret_cast<void*>(X.GetData()), 1);
4406  }
4407 
4408 
4409  /*** ColUpTriangPacked, NoTrans and NonUnit ***/
4410 
4411 
4412  template <class Prop0, class Allocator0,
4413  class Allocator1>
4414  void Solve(const Matrix<float, Prop0, ColUpTriangPacked, Allocator0>& A,
4415  Vector<float, VectFull, Allocator1>& X)
4416  {
4417 
4418 #ifdef SELDON_CHECK_DIMENSIONS
4419  CheckDim(A, X, "Solve(M, X)");
4420 #endif
4421 
4422  cblas_stpsv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
4423  A.GetN(), A.GetData(), X.GetData(), 1);
4424  }
4425 
4426 
4427  template <class Prop0, class Allocator0,
4428  class Allocator1>
4429  void Solve(const Matrix<double, Prop0, ColUpTriangPacked, Allocator0>& A,
4430  Vector<double, VectFull, Allocator1>& X)
4431  {
4432 
4433 #ifdef SELDON_CHECK_DIMENSIONS
4434  CheckDim(A, X, "Solve(M, X)");
4435 #endif
4436 
4437  cblas_dtpsv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
4438  A.GetN(), A.GetData(), X.GetData(), 1);
4439  }
4440 
4441 
4442  template <class Prop0, class Allocator0,
4443  class Allocator1>
4444  void
4445  Solve(const Matrix<complex<float>, Prop0, ColUpTriangPacked, Allocator0>& A,
4446  Vector<complex<float>, VectFull, Allocator1>& X)
4447  {
4448 
4449 #ifdef SELDON_CHECK_DIMENSIONS
4450  CheckDim(A, X, "Solve(M, X)");
4451 #endif
4452 
4453  cblas_ctpsv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
4454  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
4455  reinterpret_cast<void*>(X.GetData()), 1);
4456  }
4457 
4458 
4459  template <class Prop0, class Allocator0,
4460  class Allocator1>
4461  void
4462  Solve(const Matrix<complex<double>, Prop0,
4463  ColUpTriangPacked, Allocator0>& A,
4464  Vector<complex<double>, VectFull, Allocator1>& X)
4465  {
4466 
4467 #ifdef SELDON_CHECK_DIMENSIONS
4468  CheckDim(A, X, "Solve(M, X)");
4469 #endif
4470 
4471  cblas_ztpsv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
4472  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
4473  reinterpret_cast<void*>(X.GetData()), 1);
4474  }
4475 
4476 
4477  /*** ColUpTriangPacked ***/
4478 
4479 
4480  template <class Prop0, class Allocator0,
4481  class Allocator1>
4482  void Solve(const SeldonTranspose& TransA,
4483  const SeldonDiag& DiagA,
4484  const Matrix<float, Prop0, ColUpTriangPacked, Allocator0>& A,
4485  Vector<float, VectFull, Allocator1>& X)
4486  {
4487 
4488 #ifdef SELDON_CHECK_DIMENSIONS
4489  CheckDim(A, X, "Solve(status, diag, M, X)");
4490 #endif
4491 
4492  cblas_stpsv(CblasColMajor, CblasUpper, TransA.Cblas(), DiagA.Cblas(),
4493  A.GetN(), A.GetData(), X.GetData(), 1);
4494  }
4495 
4496 
4497  template <class Prop0, class Allocator0,
4498  class Allocator1>
4499  void Solve(const SeldonTranspose& TransA,
4500  const SeldonDiag& DiagA,
4501  const Matrix<double, Prop0, ColUpTriangPacked, Allocator0>& A,
4502  Vector<double, VectFull, Allocator1>& X)
4503  {
4504 
4505 #ifdef SELDON_CHECK_DIMENSIONS
4506  CheckDim(A, X, "Solve(status, diag, M, X)");
4507 #endif
4508 
4509  cblas_dtpsv(CblasColMajor, CblasUpper, TransA.Cblas(), DiagA.Cblas(),
4510  A.GetN(), A.GetData(), X.GetData(), 1);
4511  }
4512 
4513 
4514  template <class Prop0, class Allocator0,
4515  class Allocator1>
4516  void
4517  Solve(const SeldonTranspose& TransA,
4518  const SeldonDiag& DiagA,
4519  const Matrix<complex<float>, Prop0, ColUpTriangPacked, Allocator0>& A,
4520  Vector<complex<float>, VectFull, Allocator1>& X)
4521  {
4522 
4523 #ifdef SELDON_CHECK_DIMENSIONS
4524  CheckDim(A, X, "Solve(status, diag, M, X)");
4525 #endif
4526 
4527  cblas_ctpsv(CblasColMajor, CblasUpper, TransA.Cblas(), DiagA.Cblas(),
4528  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
4529  reinterpret_cast<void*>(X.GetData()), 1);
4530  }
4531 
4532 
4533  template <class Prop0, class Allocator0,
4534  class Allocator1>
4535  void
4536  Solve(const SeldonTranspose& TransA,
4537  const SeldonDiag& DiagA,
4538  const Matrix<complex<double>, Prop0,
4539  ColUpTriangPacked, Allocator0>& A,
4540  Vector<complex<double>, VectFull, Allocator1>& X)
4541  {
4542 
4543 #ifdef SELDON_CHECK_DIMENSIONS
4544  CheckDim(A, X, "Solve(status, diag, M, X)");
4545 #endif
4546 
4547  cblas_ztpsv(CblasColMajor, CblasUpper, TransA.Cblas(), DiagA.Cblas(),
4548  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
4549  reinterpret_cast<void*>(X.GetData()), 1);
4550  }
4551 
4552 
4553  /*** ColLoTriangPacked, NoTrans and NonUnit ***/
4554 
4555 
4556  template <class Prop0, class Allocator0,
4557  class Allocator1>
4558  void Solve(const Matrix<float, Prop0, ColLoTriangPacked, Allocator0>& A,
4559  Vector<float, VectFull, Allocator1>& X)
4560  {
4561 
4562 #ifdef SELDON_CHECK_DIMENSIONS
4563  CheckDim(A, X, "Solve(M, X)");
4564 #endif
4565 
4566  cblas_stpsv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit,
4567  A.GetN(), A.GetData(), X.GetData(), 1);
4568  }
4569 
4570 
4571  template <class Prop0, class Allocator0,
4572  class Allocator1>
4573  void Solve(const Matrix<double, Prop0, ColLoTriangPacked, Allocator0>& A,
4574  Vector<double, VectFull, Allocator1>& X)
4575  {
4576 
4577 #ifdef SELDON_CHECK_DIMENSIONS
4578  CheckDim(A, X, "Solve(M, X)");
4579 #endif
4580 
4581  cblas_dtpsv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit,
4582  A.GetN(), A.GetData(), X.GetData(), 1);
4583  }
4584 
4585 
4586  template <class Prop0, class Allocator0,
4587  class Allocator1>
4588  void
4589  Solve(const Matrix<complex<float>, Prop0, ColLoTriangPacked, Allocator0>& A,
4590  Vector<complex<float>, VectFull, Allocator1>& X)
4591  {
4592 
4593 #ifdef SELDON_CHECK_DIMENSIONS
4594  CheckDim(A, X, "Solve(M, X)");
4595 #endif
4596 
4597  cblas_ctpsv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit,
4598  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
4599  reinterpret_cast<void*>(X.GetData()), 1);
4600  }
4601 
4602 
4603  template <class Prop0, class Allocator0,
4604  class Allocator1>
4605  void
4606  Solve(const Matrix<complex<double>, Prop0,
4607  ColLoTriangPacked, Allocator0>& A,
4608  Vector<complex<double>, VectFull, Allocator1>& X)
4609  {
4610 
4611 #ifdef SELDON_CHECK_DIMENSIONS
4612  CheckDim(A, X, "Solve(M, X)");
4613 #endif
4614 
4615  cblas_ztpsv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit,
4616  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
4617  reinterpret_cast<void*>(X.GetData()), 1);
4618  }
4619 
4620 
4621  /*** ColLoTriangPacked ***/
4622 
4623 
4624  template <class Prop0, class Allocator0,
4625  class Allocator1>
4626  void Solve(const SeldonTranspose& TransA,
4627  const SeldonDiag& DiagA,
4628  const Matrix<float, Prop0, ColLoTriangPacked, Allocator0>& A,
4629  Vector<float, VectFull, Allocator1>& X)
4630  {
4631 
4632 #ifdef SELDON_CHECK_DIMENSIONS
4633  CheckDim(A, X, "Solve(status, diag, M, X)");
4634 #endif
4635 
4636  cblas_stpsv(CblasColMajor, CblasLower, TransA.Cblas(), DiagA.Cblas(),
4637  A.GetN(), A.GetData(), X.GetData(), 1);
4638  }
4639 
4640 
4641  template <class Prop0, class Allocator0,
4642  class Allocator1>
4643  void Solve(const SeldonTranspose& TransA,
4644  const SeldonDiag& DiagA,
4645  const Matrix<double, Prop0, ColLoTriangPacked, Allocator0>& A,
4646  Vector<double, VectFull, Allocator1>& X)
4647  {
4648 
4649 #ifdef SELDON_CHECK_DIMENSIONS
4650  CheckDim(A, X, "Solve(status, diag, M, X)");
4651 #endif
4652 
4653  cblas_dtpsv(CblasColMajor, CblasLower, TransA.Cblas(), DiagA.Cblas(),
4654  A.GetN(), A.GetData(), X.GetData(), 1);
4655  }
4656 
4657 
4658  template <class Prop0, class Allocator0,
4659  class Allocator1>
4660  void
4661  Solve(const SeldonTranspose& TransA,
4662  const SeldonDiag& DiagA,
4663  const Matrix<complex<float>, Prop0, ColLoTriangPacked, Allocator0>& A,
4664  Vector<complex<float>, VectFull, Allocator1>& X)
4665  {
4666 
4667 #ifdef SELDON_CHECK_DIMENSIONS
4668  CheckDim(A, X, "Solve(status, diag, M, X)");
4669 #endif
4670 
4671  cblas_ctpsv(CblasColMajor, CblasLower, TransA.Cblas(), DiagA.Cblas(),
4672  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
4673  reinterpret_cast<void*>(X.GetData()), 1);
4674  }
4675 
4676 
4677  template <class Prop0, class Allocator0,
4678  class Allocator1>
4679  void
4680  Solve(const SeldonTranspose& TransA,
4681  const SeldonDiag& DiagA,
4682  const Matrix<complex<double>, Prop0,
4683  ColLoTriangPacked, Allocator0>& A,
4684  Vector<complex<double>, VectFull, Allocator1>& X)
4685  {
4686 
4687 #ifdef SELDON_CHECK_DIMENSIONS
4688  CheckDim(A, X, "Solve(status, diag, M, X)");
4689 #endif
4690 
4691  cblas_ztpsv(CblasColMajor, CblasLower, TransA.Cblas(), DiagA.Cblas(),
4692  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
4693  reinterpret_cast<void*>(X.GetData()), 1);
4694  }
4695 
4696 
4697  /*** RowUpTriangPacked, NoTrans and NonUnit ***/
4698 
4699 
4700  template <class Prop0, class Allocator0,
4701  class Allocator1>
4702  void Solve(const Matrix<float, Prop0, RowUpTriangPacked, Allocator0>& A,
4703  Vector<float, VectFull, Allocator1>& X)
4704  {
4705 
4706 #ifdef SELDON_CHECK_DIMENSIONS
4707  CheckDim(A, X, "Solve(M, X)");
4708 #endif
4709 
4710  cblas_stpsv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
4711  A.GetN(), A.GetData(), X.GetData(), 1);
4712  }
4713 
4714 
4715  template <class Prop0, class Allocator0,
4716  class Allocator1>
4717  void Solve(const Matrix<double, Prop0, RowUpTriangPacked, Allocator0>& A,
4718  Vector<double, VectFull, Allocator1>& X)
4719  {
4720 
4721 #ifdef SELDON_CHECK_DIMENSIONS
4722  CheckDim(A, X, "Solve(M, X)");
4723 #endif
4724 
4725  cblas_dtpsv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
4726  A.GetN(), A.GetData(), X.GetData(), 1);
4727  }
4728 
4729 
4730  template <class Prop0, class Allocator0,
4731  class Allocator1>
4732  void
4733  Solve(const Matrix<complex<float>, Prop0, RowUpTriangPacked, Allocator0>& A,
4734  Vector<complex<float>, VectFull, Allocator1>& X)
4735  {
4736 
4737 #ifdef SELDON_CHECK_DIMENSIONS
4738  CheckDim(A, X, "Solve(M, X)");
4739 #endif
4740 
4741  cblas_ctpsv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
4742  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
4743  reinterpret_cast<void*>(X.GetData()), 1);
4744  }
4745 
4746 
4747  template <class Prop0, class Allocator0,
4748  class Allocator1>
4749  void
4750  Solve(const Matrix<complex<double>, Prop0,
4751  RowUpTriangPacked, Allocator0>& A,
4752  Vector<complex<double>, VectFull, Allocator1>& X)
4753  {
4754 
4755 #ifdef SELDON_CHECK_DIMENSIONS
4756  CheckDim(A, X, "Solve(M, X)");
4757 #endif
4758 
4759  cblas_ztpsv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
4760  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
4761  reinterpret_cast<void*>(X.GetData()), 1);
4762  }
4763 
4764 
4765  /*** RowUpTriangPacked ***/
4766 
4767 
4768  template <class Prop0, class Allocator0,
4769  class Allocator1>
4770  void Solve(const SeldonTranspose& TransA,
4771  const SeldonDiag& DiagA,
4772  const Matrix<float, Prop0, RowUpTriangPacked, Allocator0>& A,
4773  Vector<float, VectFull, Allocator1>& X)
4774  {
4775 
4776 #ifdef SELDON_CHECK_DIMENSIONS
4777  CheckDim(A, X, "Solve(status, diag, M, X)");
4778 #endif
4779 
4780  cblas_stpsv(CblasRowMajor, CblasUpper, TransA.Cblas(), DiagA.Cblas(),
4781  A.GetN(), A.GetData(), X.GetData(), 1);
4782  }
4783 
4784 
4785  template <class Prop0, class Allocator0,
4786  class Allocator1>
4787  void Solve(const SeldonTranspose& TransA,
4788  const SeldonDiag& DiagA,
4789  const Matrix<double, Prop0, RowUpTriangPacked, Allocator0>& A,
4790  Vector<double, VectFull, Allocator1>& X)
4791  {
4792 
4793 #ifdef SELDON_CHECK_DIMENSIONS
4794  CheckDim(A, X, "Solve(status, diag, M, X)");
4795 #endif
4796 
4797  cblas_dtpsv(CblasRowMajor, CblasUpper, TransA.Cblas(), DiagA.Cblas(),
4798  A.GetN(), A.GetData(), X.GetData(), 1);
4799  }
4800 
4801 
4802  template <class Prop0, class Allocator0,
4803  class Allocator1>
4804  void
4805  Solve(const SeldonTranspose& TransA,
4806  const SeldonDiag& DiagA,
4807  const Matrix<complex<float>, Prop0, RowUpTriangPacked, Allocator0>& A,
4808  Vector<complex<float>, VectFull, Allocator1>& X)
4809  {
4810 
4811 #ifdef SELDON_CHECK_DIMENSIONS
4812  CheckDim(A, X, "Solve(status, diag, M, X)");
4813 #endif
4814 
4815  cblas_ctpsv(CblasRowMajor, CblasUpper, TransA.Cblas(), DiagA.Cblas(),
4816  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
4817  reinterpret_cast<void*>(X.GetData()), 1);
4818  }
4819 
4820 
4821  template <class Prop0, class Allocator0,
4822  class Allocator1>
4823  void
4824  Solve(const SeldonTranspose& TransA,
4825  const SeldonDiag& DiagA,
4826  const Matrix<complex<double>, Prop0,
4827  RowUpTriangPacked, Allocator0>& A,
4828  Vector<complex<double>, VectFull, Allocator1>& X)
4829  {
4830 
4831 #ifdef SELDON_CHECK_DIMENSIONS
4832  CheckDim(A, X, "Solve(status, diag, M, X)");
4833 #endif
4834 
4835  cblas_ztpsv(CblasRowMajor, CblasUpper, TransA.Cblas(), DiagA.Cblas(),
4836  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
4837  reinterpret_cast<void*>(X.GetData()), 1);
4838  }
4839 
4840 
4841  /*** RowLoTriangPacked, NoTrans and NonUnit ***/
4842 
4843 
4844  template <class Prop0, class Allocator0,
4845  class Allocator1>
4846  void Solve(const Matrix<float, Prop0, RowLoTriangPacked, Allocator0>& A,
4847  Vector<float, VectFull, Allocator1>& X)
4848  {
4849 
4850 #ifdef SELDON_CHECK_DIMENSIONS
4851  CheckDim(A, X, "Solve(M, X)");
4852 #endif
4853 
4854  cblas_stpsv(CblasRowMajor, CblasLower, CblasNoTrans, CblasNonUnit,
4855  A.GetN(), A.GetData(), X.GetData(), 1);
4856  }
4857 
4858 
4859  template <class Prop0, class Allocator0,
4860  class Allocator1>
4861  void Solve(const Matrix<double, Prop0, RowLoTriangPacked, Allocator0>& A,
4862  Vector<double, VectFull, Allocator1>& X)
4863  {
4864 
4865 #ifdef SELDON_CHECK_DIMENSIONS
4866  CheckDim(A, X, "Solve(M, X)");
4867 #endif
4868 
4869  cblas_dtpsv(CblasRowMajor, CblasLower, CblasNoTrans, CblasNonUnit,
4870  A.GetN(), A.GetData(), X.GetData(), 1);
4871  }
4872 
4873 
4874  template <class Prop0, class Allocator0,
4875  class Allocator1>
4876  void
4877  Solve(const Matrix<complex<float>, Prop0, RowLoTriangPacked, Allocator0>& A,
4878  Vector<complex<float>, VectFull, Allocator1>& X)
4879  {
4880 
4881 #ifdef SELDON_CHECK_DIMENSIONS
4882  CheckDim(A, X, "Solve(M, X)");
4883 #endif
4884 
4885  cblas_ctpsv(CblasRowMajor, CblasLower, CblasNoTrans, CblasNonUnit,
4886  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
4887  reinterpret_cast<void*>(X.GetData()), 1);
4888  }
4889 
4890 
4891  template <class Prop0, class Allocator0,
4892  class Allocator1>
4893  void
4894  Solve(const Matrix<complex<double>, Prop0,
4895  RowLoTriangPacked, Allocator0>& A,
4896  Vector<complex<double>, VectFull, Allocator1>& X)
4897  {
4898 
4899 #ifdef SELDON_CHECK_DIMENSIONS
4900  CheckDim(A, X, "Solve(M, X)");
4901 #endif
4902 
4903  cblas_ztpsv(CblasRowMajor, CblasLower, CblasNoTrans, CblasNonUnit,
4904  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
4905  reinterpret_cast<void*>(X.GetData()), 1);
4906  }
4907 
4908 
4909  /*** RowLoTriangPacked ***/
4910 
4911 
4912  template <class Prop0, class Allocator0,
4913  class Allocator1>
4914  void Solve(const SeldonTranspose& TransA,
4915  const SeldonDiag& DiagA,
4916  const Matrix<float, Prop0, RowLoTriangPacked, Allocator0>& A,
4917  Vector<float, VectFull, Allocator1>& X)
4918  {
4919 
4920 #ifdef SELDON_CHECK_DIMENSIONS
4921  CheckDim(A, X, "Solve(status, diag, M, X)");
4922 #endif
4923 
4924  cblas_stpsv(CblasRowMajor, CblasLower, TransA.Cblas(), DiagA.Cblas(),
4925  A.GetN(), A.GetData(), X.GetData(), 1);
4926  }
4927 
4928 
4929  template <class Prop0, class Allocator0,
4930  class Allocator1>
4931  void Solve(const SeldonTranspose& TransA,
4932  const SeldonDiag& DiagA,
4933  const Matrix<double, Prop0, RowLoTriangPacked, Allocator0>& A,
4934  Vector<double, VectFull, Allocator1>& X)
4935  {
4936 
4937 #ifdef SELDON_CHECK_DIMENSIONS
4938  CheckDim(A, X, "Solve(status, diag, M, X)");
4939 #endif
4940 
4941  cblas_dtpsv(CblasRowMajor, CblasLower, TransA.Cblas(), DiagA.Cblas(),
4942  A.GetN(), A.GetData(), X.GetData(), 1);
4943  }
4944 
4945 
4946  template <class Prop0, class Allocator0,
4947  class Allocator1>
4948  void
4949  Solve(const SeldonTranspose& TransA,
4950  const SeldonDiag& DiagA,
4951  const Matrix<complex<float>, Prop0, RowLoTriangPacked, Allocator0>& A,
4952  Vector<complex<float>, VectFull, Allocator1>& X)
4953  {
4954 
4955 #ifdef SELDON_CHECK_DIMENSIONS
4956  CheckDim(A, X, "Solve(status, diag, M, X)");
4957 #endif
4958 
4959  cblas_ctpsv(CblasRowMajor, CblasLower, TransA.Cblas(), DiagA.Cblas(),
4960  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
4961  reinterpret_cast<void*>(X.GetData()), 1);
4962  }
4963 
4964 
4965  template <class Prop0, class Allocator0,
4966  class Allocator1>
4967  void
4968  Solve(const SeldonTranspose& TransA,
4969  const SeldonDiag& DiagA,
4970  const Matrix<complex<double>, Prop0,
4971  RowLoTriangPacked, Allocator0>& A,
4972  Vector<complex<double>, VectFull, Allocator1>& X)
4973  {
4974 
4975 #ifdef SELDON_CHECK_DIMENSIONS
4976  CheckDim(A, X, "Solve(status, diag, M, X)");
4977 #endif
4978 
4979  cblas_ztpsv(CblasRowMajor, CblasLower, TransA.Cblas(), DiagA.Cblas(),
4980  A.GetN(), reinterpret_cast<const void*>(A.GetData()),
4981  reinterpret_cast<void*>(X.GetData()), 1);
4982  }
4983 
4984 
4985  // SOLVE //
4987 
4988 
4989 } // namespace Seldon.
4990 
4991 #define SELDON_FILE_BLAS_2_CXX
4992 #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