Warning: this documentation for the development version is under construction.
00001 // Copyright (C) 2001-2009 Vivien Mallet 00002 // 00003 // This file is part of the linear-algebra library Seldon, 00004 // http://seldon.sourceforge.net/. 00005 // 00006 // Seldon is free software; you can redistribute it and/or modify it under the 00007 // terms of the GNU Lesser General Public License as published by the Free 00008 // Software Foundation; either version 2.1 of the License, or (at your option) 00009 // any later version. 00010 // 00011 // Seldon is distributed in the hope that it will be useful, but WITHOUT ANY 00012 // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00013 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 00014 // more details. 00015 // 00016 // You should have received a copy of the GNU Lesser General Public License 00017 // along with Seldon. If not, see http://www.gnu.org/licenses/. 00018 00019 00020 #ifndef SELDON_FILE_BLAS_2_CXX 00021 00022 00023 #include "Blas_2.hxx" 00024 00025 00026 namespace Seldon 00027 { 00028 00029 00031 // MLT // 00032 00033 00034 /*** ColUpTriang, NoTrans and NonUnit ***/ 00035 00036 00037 template <class Prop0, class Allocator0, 00038 class Allocator1> 00039 void Mlt(const Matrix<float, Prop0, ColUpTriang, Allocator0>& A, 00040 Vector<float, VectFull, Allocator1>& X) 00041 { 00042 00043 #ifdef SELDON_CHECK_DIMENSIONS 00044 CheckDim(A, X, "Mlt(M, X)"); 00045 #endif 00046 00047 cblas_strmv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 00048 A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1); 00049 } 00050 00051 00052 template <class Prop0, class Allocator0, 00053 class Allocator1> 00054 void Mlt(const Matrix<double, Prop0, ColUpTriang, Allocator0>& A, 00055 Vector<double, VectFull, Allocator1>& X) 00056 { 00057 00058 #ifdef SELDON_CHECK_DIMENSIONS 00059 CheckDim(A, X, "Mlt(M, X)"); 00060 #endif 00061 00062 cblas_dtrmv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 00063 A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1); 00064 } 00065 00066 00067 template <class Prop0, class Allocator0, 00068 class Allocator1> 00069 void 00070 Mlt(const Matrix<complex<float>, Prop0, ColUpTriang, Allocator0>& A, 00071 Vector<complex<float>, VectFull, Allocator1>& X) 00072 { 00073 00074 #ifdef SELDON_CHECK_DIMENSIONS 00075 CheckDim(A, X, "Mlt(M, X)"); 00076 #endif 00077 00078 cblas_ctrmv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 00079 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 00080 A.GetM(), reinterpret_cast<void*>(X.GetData()), 1); 00081 } 00082 00083 00084 template <class Prop0, class Allocator0, 00085 class Allocator1> 00086 void 00087 Mlt(const Matrix<complex<double>, Prop0, ColUpTriang, Allocator0>& A, 00088 Vector<complex<double>, VectFull, Allocator1>& X) 00089 { 00090 00091 #ifdef SELDON_CHECK_DIMENSIONS 00092 CheckDim(A, X, "Mlt(M, X)"); 00093 #endif 00094 00095 cblas_ztrmv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 00096 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 00097 A.GetM(), reinterpret_cast<void*>(X.GetData()), 1); 00098 } 00099 00100 00101 /*** ColUpTriang ***/ 00102 00103 00104 template <class Prop0, class Allocator0, 00105 class Allocator1> 00106 void Mlt(const SeldonTranspose& TransA, 00107 const SeldonDiag& DiagA, 00108 const Matrix<float, Prop0, ColUpTriang, Allocator0>& A, 00109 Vector<float, VectFull, Allocator1>& X) 00110 { 00111 00112 #ifdef SELDON_CHECK_DIMENSIONS 00113 CheckDim(A, X, "Mlt(status, diag, M, X)"); 00114 #endif 00115 00116 cblas_strmv(CblasColMajor, CblasUpper, TransA, DiagA, 00117 A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1); 00118 } 00119 00120 00121 template <class Prop0, class Allocator0, 00122 class Allocator1> 00123 void Mlt(const SeldonTranspose& TransA, 00124 const SeldonDiag& DiagA, 00125 const Matrix<double, Prop0, ColUpTriang, Allocator0>& A, 00126 Vector<double, VectFull, Allocator1>& X) 00127 { 00128 00129 #ifdef SELDON_CHECK_DIMENSIONS 00130 CheckDim(A, X, "Mlt(status, diag, M, X)"); 00131 #endif 00132 00133 cblas_dtrmv(CblasColMajor, CblasUpper, TransA, DiagA, 00134 A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1); 00135 } 00136 00137 00138 template <class Prop0, class Allocator0, 00139 class Allocator1> 00140 void 00141 Mlt(const SeldonTranspose& TransA, 00142 const SeldonDiag& DiagA, 00143 const Matrix<complex<float>, Prop0, ColUpTriang, Allocator0>& A, 00144 Vector<complex<float>, VectFull, Allocator1>& X) 00145 { 00146 00147 #ifdef SELDON_CHECK_DIMENSIONS 00148 CheckDim(A, X, "Mlt(status, diag, M, X)"); 00149 #endif 00150 00151 cblas_ctrmv(CblasColMajor, CblasUpper, TransA, DiagA, 00152 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 00153 A.GetM(), reinterpret_cast<void*>(X.GetData()), 1); 00154 } 00155 00156 00157 template <class Prop0, class Allocator0, 00158 class Allocator1> 00159 void 00160 Mlt(const SeldonTranspose& TransA, 00161 const SeldonDiag& DiagA, 00162 const Matrix<complex<double>, Prop0, ColUpTriang, Allocator0>& A, 00163 Vector<complex<double>, VectFull, Allocator1>& X) 00164 { 00165 00166 #ifdef SELDON_CHECK_DIMENSIONS 00167 CheckDim(A, X, "Mlt(status, diag, M, X)"); 00168 #endif 00169 00170 cblas_ztrmv(CblasColMajor, CblasUpper, TransA, DiagA, 00171 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 00172 A.GetM(), reinterpret_cast<void*>(X.GetData()), 1); 00173 } 00174 00175 00176 /*** ColLoTriang, NoTrans and NonUnit ***/ 00177 00178 00179 template <class Prop0, class Allocator0, 00180 class Allocator1> 00181 void Mlt(const Matrix<float, Prop0, ColLoTriang, Allocator0>& A, 00182 Vector<float, VectFull, Allocator1>& X) 00183 { 00184 00185 #ifdef SELDON_CHECK_DIMENSIONS 00186 CheckDim(A, X, "Mlt(M, X)"); 00187 #endif 00188 00189 cblas_strmv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit, 00190 A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1); 00191 } 00192 00193 00194 template <class Prop0, class Allocator0, 00195 class Allocator1> 00196 void Mlt(const Matrix<double, Prop0, ColLoTriang, Allocator0>& A, 00197 Vector<double, VectFull, Allocator1>& X) 00198 { 00199 00200 #ifdef SELDON_CHECK_DIMENSIONS 00201 CheckDim(A, X, "Mlt(M, X)"); 00202 #endif 00203 00204 cblas_dtrmv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit, 00205 A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1); 00206 } 00207 00208 00209 template <class Prop0, class Allocator0, 00210 class Allocator1> 00211 void 00212 Mlt(const Matrix<complex<float>, Prop0, ColLoTriang, Allocator0>& A, 00213 Vector<complex<float>, VectFull, Allocator1>& X) 00214 { 00215 00216 #ifdef SELDON_CHECK_DIMENSIONS 00217 CheckDim(A, X, "Mlt(M, X)"); 00218 #endif 00219 00220 cblas_ctrmv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit, 00221 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 00222 A.GetM(), reinterpret_cast<void*>(X.GetData()), 1); 00223 } 00224 00225 00226 template <class Prop0, class Allocator0, 00227 class Allocator1> 00228 void 00229 Mlt(const Matrix<complex<double>, Prop0, ColLoTriang, Allocator0>& A, 00230 Vector<complex<double>, VectFull, Allocator1>& X) 00231 { 00232 00233 #ifdef SELDON_CHECK_DIMENSIONS 00234 CheckDim(A, X, "Mlt(M, X)"); 00235 #endif 00236 00237 cblas_ztrmv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit, 00238 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 00239 A.GetM(), reinterpret_cast<void*>(X.GetData()), 1); 00240 } 00241 00242 00243 /*** ColLoTriang ***/ 00244 00245 00246 template <class Prop0, class Allocator0, 00247 class Allocator1> 00248 void Mlt(const SeldonTranspose& TransA, 00249 const SeldonDiag& DiagA, 00250 const Matrix<float, Prop0, ColLoTriang, Allocator0>& A, 00251 Vector<float, VectFull, Allocator1>& X) 00252 { 00253 00254 #ifdef SELDON_CHECK_DIMENSIONS 00255 CheckDim(A, X, "Mlt(status, diag, M, X)"); 00256 #endif 00257 00258 cblas_strmv(CblasColMajor, CblasLower, TransA, DiagA, 00259 A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1); 00260 } 00261 00262 00263 template <class Prop0, class Allocator0, 00264 class Allocator1> 00265 void Mlt(const SeldonTranspose& TransA, 00266 const SeldonDiag& DiagA, 00267 const Matrix<double, Prop0, ColLoTriang, Allocator0>& A, 00268 Vector<double, VectFull, Allocator1>& X) 00269 { 00270 00271 #ifdef SELDON_CHECK_DIMENSIONS 00272 CheckDim(A, X, "Mlt(status, diag, M, X)"); 00273 #endif 00274 00275 cblas_dtrmv(CblasColMajor, CblasLower, TransA, DiagA, 00276 A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1); 00277 } 00278 00279 00280 template <class Prop0, class Allocator0, 00281 class Allocator1> 00282 void 00283 Mlt(const SeldonTranspose& TransA, 00284 const SeldonDiag& DiagA, 00285 const Matrix<complex<float>, Prop0, ColLoTriang, Allocator0>& A, 00286 Vector<complex<float>, VectFull, Allocator1>& X) 00287 { 00288 00289 #ifdef SELDON_CHECK_DIMENSIONS 00290 CheckDim(A, X, "Mlt(status, diag, M, X)"); 00291 #endif 00292 00293 cblas_ctrmv(CblasColMajor, CblasLower, TransA, DiagA, 00294 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 00295 A.GetM(), reinterpret_cast<void*>(X.GetData()), 1); 00296 } 00297 00298 00299 template <class Prop0, class Allocator0, 00300 class Allocator1> 00301 void 00302 Mlt(const SeldonTranspose& TransA, 00303 const SeldonDiag& DiagA, 00304 const Matrix<complex<double>, Prop0, ColLoTriang, Allocator0>& A, 00305 Vector<complex<double>, VectFull, Allocator1>& X) 00306 { 00307 00308 #ifdef SELDON_CHECK_DIMENSIONS 00309 CheckDim(A, X, "Mlt(status, diag, M, X)"); 00310 #endif 00311 00312 cblas_ztrmv(CblasColMajor, CblasLower, TransA, DiagA, 00313 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 00314 A.GetM(), reinterpret_cast<void*>(X.GetData()), 1); 00315 } 00316 00317 00318 /*** RowUpTriang, NoTrans and NonUnit ***/ 00319 00320 00321 template <class Prop0, class Allocator0, 00322 class Allocator1> 00323 void Mlt(const Matrix<float, Prop0, RowUpTriang, Allocator0>& A, 00324 Vector<float, VectFull, Allocator1>& X) 00325 { 00326 00327 #ifdef SELDON_CHECK_DIMENSIONS 00328 CheckDim(A, X, "Mlt(M, X)"); 00329 #endif 00330 00331 cblas_strmv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 00332 A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1); 00333 } 00334 00335 00336 template <class Prop0, class Allocator0, 00337 class Allocator1> 00338 void Mlt(const Matrix<double, Prop0, RowUpTriang, Allocator0>& A, 00339 Vector<double, VectFull, Allocator1>& X) 00340 { 00341 00342 #ifdef SELDON_CHECK_DIMENSIONS 00343 CheckDim(A, X, "Mlt(M, X)"); 00344 #endif 00345 00346 cblas_dtrmv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 00347 A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1); 00348 } 00349 00350 00351 template <class Prop0, class Allocator0, 00352 class Allocator1> 00353 void 00354 Mlt(const Matrix<complex<float>, Prop0, RowUpTriang, Allocator0>& A, 00355 Vector<complex<float>, VectFull, Allocator1>& X) 00356 { 00357 00358 #ifdef SELDON_CHECK_DIMENSIONS 00359 CheckDim(A, X, "Mlt(M, X)"); 00360 #endif 00361 00362 cblas_ctrmv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 00363 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 00364 A.GetM(), reinterpret_cast<void*>(X.GetData()), 1); 00365 } 00366 00367 00368 template <class Prop0, class Allocator0, 00369 class Allocator1> 00370 void 00371 Mlt(const Matrix<complex<double>, Prop0, RowUpTriang, Allocator0>& A, 00372 Vector<complex<double>, VectFull, Allocator1>& X) 00373 { 00374 00375 #ifdef SELDON_CHECK_DIMENSIONS 00376 CheckDim(A, X, "Mlt(M, X)"); 00377 #endif 00378 00379 cblas_ztrmv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 00380 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 00381 A.GetM(), reinterpret_cast<void*>(X.GetData()), 1); 00382 } 00383 00384 00385 /*** RowUpTriang ***/ 00386 00387 00388 template <class Prop0, class Allocator0, 00389 class Allocator1> 00390 void Mlt(const SeldonTranspose& TransA, 00391 const SeldonDiag& DiagA, 00392 const Matrix<float, Prop0, RowUpTriang, Allocator0>& A, 00393 Vector<float, VectFull, Allocator1>& X) 00394 { 00395 00396 #ifdef SELDON_CHECK_DIMENSIONS 00397 CheckDim(A, X, "Mlt(status, diag, M, X)"); 00398 #endif 00399 00400 cblas_strmv(CblasRowMajor, CblasUpper, TransA, DiagA, 00401 A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1); 00402 } 00403 00404 00405 template <class Prop0, class Allocator0, 00406 class Allocator1> 00407 void Mlt(const SeldonTranspose& TransA, 00408 const SeldonDiag& DiagA, 00409 const Matrix<double, Prop0, RowUpTriang, Allocator0>& A, 00410 Vector<double, VectFull, Allocator1>& X) 00411 { 00412 00413 #ifdef SELDON_CHECK_DIMENSIONS 00414 CheckDim(A, X, "Mlt(status, diag, M, X)"); 00415 #endif 00416 00417 cblas_dtrmv(CblasRowMajor, CblasUpper, TransA, DiagA, 00418 A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1); 00419 } 00420 00421 00422 template <class Prop0, class Allocator0, 00423 class Allocator1> 00424 void 00425 Mlt(const SeldonTranspose& TransA, 00426 const SeldonDiag& DiagA, 00427 const Matrix<complex<float>, Prop0, RowUpTriang, Allocator0>& A, 00428 Vector<complex<float>, VectFull, Allocator1>& X) 00429 { 00430 00431 #ifdef SELDON_CHECK_DIMENSIONS 00432 CheckDim(A, X, "Mlt(status, diag, M, X)"); 00433 #endif 00434 00435 cblas_ctrmv(CblasRowMajor, CblasUpper, TransA, DiagA, 00436 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 00437 A.GetM(), reinterpret_cast<void*>(X.GetData()), 1); 00438 } 00439 00440 00441 template <class Prop0, class Allocator0, 00442 class Allocator1> 00443 void 00444 Mlt(const SeldonTranspose& TransA, 00445 const SeldonDiag& DiagA, 00446 const Matrix<complex<double>, Prop0, RowUpTriang, Allocator0>& A, 00447 Vector<complex<double>, VectFull, Allocator1>& X) 00448 { 00449 00450 #ifdef SELDON_CHECK_DIMENSIONS 00451 CheckDim(A, X, "Mlt(status, diag, M, X)"); 00452 #endif 00453 00454 cblas_ztrmv(CblasRowMajor, CblasUpper, TransA, DiagA, 00455 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 00456 A.GetM(), reinterpret_cast<void*>(X.GetData()), 1); 00457 } 00458 00459 00460 /*** RowLoTriang, NoTrans and NonUnit ***/ 00461 00462 00463 template <class Prop0, class Allocator0, 00464 class Allocator1> 00465 void Mlt(const Matrix<float, Prop0, RowLoTriang, Allocator0>& A, 00466 Vector<float, VectFull, Allocator1>& X) 00467 { 00468 00469 #ifdef SELDON_CHECK_DIMENSIONS 00470 CheckDim(A, X, "Mlt(M, X)"); 00471 #endif 00472 00473 cblas_strmv(CblasRowMajor, CblasLower, CblasNoTrans, CblasNonUnit, 00474 A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1); 00475 } 00476 00477 00478 template <class Prop0, class Allocator0, 00479 class Allocator1> 00480 void Mlt(const Matrix<double, Prop0, RowLoTriang, Allocator0>& A, 00481 Vector<double, VectFull, Allocator1>& X) 00482 { 00483 00484 #ifdef SELDON_CHECK_DIMENSIONS 00485 CheckDim(A, X, "Mlt(M, X)"); 00486 #endif 00487 00488 cblas_dtrmv(CblasRowMajor, CblasLower, CblasNoTrans, CblasNonUnit, 00489 A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1); 00490 } 00491 00492 00493 template <class Prop0, class Allocator0, 00494 class Allocator1> 00495 void 00496 Mlt(const Matrix<complex<float>, Prop0, RowLoTriang, Allocator0>& A, 00497 Vector<complex<float>, VectFull, Allocator1>& X) 00498 { 00499 00500 #ifdef SELDON_CHECK_DIMENSIONS 00501 CheckDim(A, X, "Mlt(M, X)"); 00502 #endif 00503 00504 cblas_ctrmv(CblasRowMajor, CblasLower, CblasNoTrans, CblasNonUnit, 00505 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 00506 A.GetM(), reinterpret_cast<void*>(X.GetData()), 1); 00507 } 00508 00509 00510 template <class Prop0, class Allocator0, 00511 class Allocator1> 00512 void 00513 Mlt(const Matrix<complex<double>, Prop0, RowLoTriang, Allocator0>& A, 00514 Vector<complex<double>, VectFull, Allocator1>& X) 00515 { 00516 00517 #ifdef SELDON_CHECK_DIMENSIONS 00518 CheckDim(A, X, "Mlt(M, X)"); 00519 #endif 00520 00521 cblas_ztrmv(CblasRowMajor, CblasLower, CblasNoTrans, CblasNonUnit, 00522 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 00523 A.GetM(), reinterpret_cast<void*>(X.GetData()), 1); 00524 } 00525 00526 00527 /*** RowLoTriang ***/ 00528 00529 00530 template <class Prop0, class Allocator0, 00531 class Allocator1> 00532 void Mlt(const SeldonTranspose& TransA, 00533 const SeldonDiag& DiagA, 00534 const Matrix<float, Prop0, RowLoTriang, Allocator0>& A, 00535 Vector<float, VectFull, Allocator1>& X) 00536 { 00537 00538 #ifdef SELDON_CHECK_DIMENSIONS 00539 CheckDim(A, X, "Mlt(status, diag, M, X)"); 00540 #endif 00541 00542 cblas_strmv(CblasRowMajor, CblasLower, TransA, DiagA, 00543 A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1); 00544 } 00545 00546 00547 template <class Prop0, class Allocator0, 00548 class Allocator1> 00549 void Mlt(const SeldonTranspose& TransA, 00550 const SeldonDiag& DiagA, 00551 const Matrix<double, Prop0, RowLoTriang, Allocator0>& A, 00552 Vector<double, VectFull, Allocator1>& X) 00553 { 00554 00555 #ifdef SELDON_CHECK_DIMENSIONS 00556 CheckDim(A, X, "Mlt(status, diag, M, X)"); 00557 #endif 00558 00559 cblas_dtrmv(CblasRowMajor, CblasLower, TransA, DiagA, 00560 A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1); 00561 } 00562 00563 00564 template <class Prop0, class Allocator0, 00565 class Allocator1> 00566 void 00567 Mlt(const SeldonTranspose& TransA, 00568 const SeldonDiag& DiagA, 00569 const Matrix<complex<float>, Prop0, RowLoTriang, Allocator0>& A, 00570 Vector<complex<float>, VectFull, Allocator1>& X) 00571 { 00572 00573 #ifdef SELDON_CHECK_DIMENSIONS 00574 CheckDim(A, X, "Mlt(status, diag, M, X)"); 00575 #endif 00576 00577 cblas_ctrmv(CblasRowMajor, CblasLower, TransA, DiagA, 00578 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 00579 A.GetM(), reinterpret_cast<void*>(X.GetData()), 1); 00580 } 00581 00582 00583 template <class Prop0, class Allocator0, 00584 class Allocator1> 00585 void 00586 Mlt(const SeldonTranspose& TransA, 00587 const SeldonDiag& DiagA, 00588 const Matrix<complex<double>, Prop0, RowLoTriang, Allocator0>& A, 00589 Vector<complex<double>, VectFull, Allocator1>& X) 00590 { 00591 00592 #ifdef SELDON_CHECK_DIMENSIONS 00593 CheckDim(A, X, "Mlt(status, diag, M, X)"); 00594 #endif 00595 00596 cblas_ztrmv(CblasRowMajor, CblasLower, TransA, DiagA, 00597 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 00598 A.GetM(), reinterpret_cast<void*>(X.GetData()), 1); 00599 } 00600 00601 00602 /*** ColUpTriangPacked, NoTrans and NonUnit ***/ 00603 00604 00605 template <class Prop0, class Allocator0, 00606 class Allocator1> 00607 void Mlt(const Matrix<float, Prop0, ColUpTriangPacked, Allocator0>& A, 00608 Vector<float, VectFull, Allocator1>& X) 00609 { 00610 00611 #ifdef SELDON_CHECK_DIMENSIONS 00612 CheckDim(A, X, "Mlt(M, X)"); 00613 #endif 00614 00615 cblas_stpmv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 00616 A.GetN(), A.GetData(), X.GetData(), 1); 00617 } 00618 00619 00620 template <class Prop0, class Allocator0, 00621 class Allocator1> 00622 void Mlt(const Matrix<double, Prop0, ColUpTriangPacked, Allocator0>& A, 00623 Vector<double, VectFull, Allocator1>& X) 00624 { 00625 00626 #ifdef SELDON_CHECK_DIMENSIONS 00627 CheckDim(A, X, "Mlt(M, X)"); 00628 #endif 00629 00630 cblas_dtpmv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 00631 A.GetN(), A.GetData(), X.GetData(), 1); 00632 } 00633 00634 00635 template <class Prop0, class Allocator0, 00636 class Allocator1> 00637 void 00638 Mlt(const Matrix<complex<float>, Prop0, ColUpTriangPacked, Allocator0>& A, 00639 Vector<complex<float>, VectFull, Allocator1>& X) 00640 { 00641 00642 #ifdef SELDON_CHECK_DIMENSIONS 00643 CheckDim(A, X, "Mlt(M, X)"); 00644 #endif 00645 00646 cblas_ctpmv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 00647 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 00648 reinterpret_cast<void*>(X.GetData()), 1); 00649 } 00650 00651 00652 template <class Prop0, class Allocator0, 00653 class Allocator1> 00654 void 00655 Mlt(const Matrix<complex<double>, Prop0, ColUpTriangPacked, Allocator0>& A, 00656 Vector<complex<double>, VectFull, Allocator1>& X) 00657 { 00658 00659 #ifdef SELDON_CHECK_DIMENSIONS 00660 CheckDim(A, X, "Mlt(M, X)"); 00661 #endif 00662 00663 cblas_ztpmv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 00664 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 00665 reinterpret_cast<void*>(X.GetData()), 1); 00666 } 00667 00668 00669 /*** ColUpTriangPacked ***/ 00670 00671 00672 template <class Prop0, class Allocator0, 00673 class Allocator1> 00674 void Mlt(const SeldonTranspose& TransA, 00675 const SeldonDiag& DiagA, 00676 const Matrix<float, Prop0, ColUpTriangPacked, Allocator0>& A, 00677 Vector<float, VectFull, Allocator1>& X) 00678 { 00679 00680 #ifdef SELDON_CHECK_DIMENSIONS 00681 CheckDim(A, X, "Mlt(status, diag, M, X)"); 00682 #endif 00683 00684 cblas_stpmv(CblasColMajor, CblasUpper, TransA, DiagA, 00685 A.GetN(), A.GetData(), X.GetData(), 1); 00686 } 00687 00688 00689 template <class Prop0, class Allocator0, 00690 class Allocator1> 00691 void Mlt(const SeldonTranspose& TransA, 00692 const SeldonDiag& DiagA, 00693 const Matrix<double, Prop0, ColUpTriangPacked, Allocator0>& A, 00694 Vector<double, VectFull, Allocator1>& X) 00695 { 00696 00697 #ifdef SELDON_CHECK_DIMENSIONS 00698 CheckDim(A, X, "Mlt(status, diag, M, X)"); 00699 #endif 00700 00701 cblas_dtpmv(CblasColMajor, CblasUpper, TransA, DiagA, 00702 A.GetN(), A.GetData(), X.GetData(), 1); 00703 } 00704 00705 00706 template <class Prop0, class Allocator0, 00707 class Allocator1> 00708 void 00709 Mlt(const SeldonTranspose& TransA, 00710 const SeldonDiag& DiagA, 00711 const Matrix<complex<float>, Prop0, ColUpTriangPacked, Allocator0>& A, 00712 Vector<complex<float>, VectFull, Allocator1>& X) 00713 { 00714 00715 #ifdef SELDON_CHECK_DIMENSIONS 00716 CheckDim(A, X, "Mlt(status, diag, M, X)"); 00717 #endif 00718 00719 cblas_ctpmv(CblasColMajor, CblasUpper, TransA, DiagA, 00720 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 00721 reinterpret_cast<void*>(X.GetData()), 1); 00722 } 00723 00724 00725 template <class Prop0, class Allocator0, 00726 class Allocator1> 00727 void 00728 Mlt(const SeldonTranspose& TransA, 00729 const SeldonDiag& DiagA, 00730 const Matrix<complex<double>, Prop0, ColUpTriangPacked, Allocator0>& A, 00731 Vector<complex<double>, VectFull, Allocator1>& X) 00732 { 00733 00734 #ifdef SELDON_CHECK_DIMENSIONS 00735 CheckDim(A, X, "Mlt(status, diag, M, X)"); 00736 #endif 00737 00738 cblas_ztpmv(CblasColMajor, CblasUpper, TransA, DiagA, 00739 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 00740 reinterpret_cast<void*>(X.GetData()), 1); 00741 } 00742 00743 00744 /*** ColLoTriangPacked, NoTrans and NonUnit ***/ 00745 00746 00747 template <class Prop0, class Allocator0, 00748 class Allocator1> 00749 void Mlt(const Matrix<float, Prop0, ColLoTriangPacked, Allocator0>& A, 00750 Vector<float, VectFull, Allocator1>& X) 00751 { 00752 00753 #ifdef SELDON_CHECK_DIMENSIONS 00754 CheckDim(A, X, "Mlt(M, X)"); 00755 #endif 00756 00757 cblas_stpmv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit, 00758 A.GetN(), A.GetData(), X.GetData(), 1); 00759 } 00760 00761 00762 template <class Prop0, class Allocator0, 00763 class Allocator1> 00764 void Mlt(const Matrix<double, Prop0, ColLoTriangPacked, Allocator0>& A, 00765 Vector<double, VectFull, Allocator1>& X) 00766 { 00767 00768 #ifdef SELDON_CHECK_DIMENSIONS 00769 CheckDim(A, X, "Mlt(M, X)"); 00770 #endif 00771 00772 cblas_dtpmv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit, 00773 A.GetN(), A.GetData(), X.GetData(), 1); 00774 } 00775 00776 00777 template <class Prop0, class Allocator0, 00778 class Allocator1> 00779 void 00780 Mlt(const Matrix<complex<float>, Prop0, ColLoTriangPacked, Allocator0>& A, 00781 Vector<complex<float>, VectFull, Allocator1>& X) 00782 { 00783 00784 #ifdef SELDON_CHECK_DIMENSIONS 00785 CheckDim(A, X, "Mlt(M, X)"); 00786 #endif 00787 00788 cblas_ctpmv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit, 00789 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 00790 reinterpret_cast<void*>(X.GetData()), 1); 00791 } 00792 00793 00794 template <class Prop0, class Allocator0, 00795 class Allocator1> 00796 void 00797 Mlt(const Matrix<complex<double>, Prop0, ColLoTriangPacked, Allocator0>& A, 00798 Vector<complex<double>, VectFull, Allocator1>& X) 00799 { 00800 00801 #ifdef SELDON_CHECK_DIMENSIONS 00802 CheckDim(A, X, "Mlt(M, X)"); 00803 #endif 00804 00805 cblas_ztpmv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit, 00806 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 00807 reinterpret_cast<void*>(X.GetData()), 1); 00808 } 00809 00810 00811 /*** ColLoTriangPacked ***/ 00812 00813 00814 template <class Prop0, class Allocator0, 00815 class Allocator1> 00816 void Mlt(const SeldonTranspose& TransA, 00817 const SeldonDiag& DiagA, 00818 const Matrix<float, Prop0, ColLoTriangPacked, Allocator0>& A, 00819 Vector<float, VectFull, Allocator1>& X) 00820 { 00821 00822 #ifdef SELDON_CHECK_DIMENSIONS 00823 CheckDim(A, X, "Mlt(status, diag, M, X)"); 00824 #endif 00825 00826 cblas_stpmv(CblasColMajor, CblasLower, TransA, DiagA, 00827 A.GetN(), A.GetData(), X.GetData(), 1); 00828 } 00829 00830 00831 template <class Prop0, class Allocator0, 00832 class Allocator1> 00833 void Mlt(const SeldonTranspose& TransA, 00834 const SeldonDiag& DiagA, 00835 const Matrix<double, Prop0, ColLoTriangPacked, Allocator0>& A, 00836 Vector<double, VectFull, Allocator1>& X) 00837 { 00838 00839 #ifdef SELDON_CHECK_DIMENSIONS 00840 CheckDim(A, X, "Mlt(status, diag, M, X)"); 00841 #endif 00842 00843 cblas_dtpmv(CblasColMajor, CblasLower, TransA, DiagA, 00844 A.GetN(), A.GetData(), X.GetData(), 1); 00845 } 00846 00847 00848 template <class Prop0, class Allocator0, 00849 class Allocator1> 00850 void 00851 Mlt(const SeldonTranspose& TransA, 00852 const SeldonDiag& DiagA, 00853 const Matrix<complex<float>, Prop0, ColLoTriangPacked, Allocator0>& A, 00854 Vector<complex<float>, VectFull, Allocator1>& X) 00855 { 00856 00857 #ifdef SELDON_CHECK_DIMENSIONS 00858 CheckDim(A, X, "Mlt(status, diag, M, X)"); 00859 #endif 00860 00861 cblas_ctpmv(CblasColMajor, CblasLower, TransA, DiagA, 00862 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 00863 reinterpret_cast<void*>(X.GetData()), 1); 00864 } 00865 00866 00867 template <class Prop0, class Allocator0, 00868 class Allocator1> 00869 void 00870 Mlt(const SeldonTranspose& TransA, 00871 const SeldonDiag& DiagA, 00872 const Matrix<complex<double>, Prop0, ColLoTriangPacked, Allocator0>& A, 00873 Vector<complex<double>, VectFull, Allocator1>& X) 00874 { 00875 00876 #ifdef SELDON_CHECK_DIMENSIONS 00877 CheckDim(A, X, "Mlt(status, diag, M, X)"); 00878 #endif 00879 00880 cblas_ztpmv(CblasColMajor, CblasLower, TransA, DiagA, 00881 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 00882 reinterpret_cast<void*>(X.GetData()), 1); 00883 } 00884 00885 00886 /*** RowUpTriangPacked, NoTrans and NonUnit ***/ 00887 00888 00889 template <class Prop0, class Allocator0, 00890 class Allocator1> 00891 void Mlt(const Matrix<float, Prop0, RowUpTriangPacked, Allocator0>& A, 00892 Vector<float, VectFull, Allocator1>& X) 00893 { 00894 00895 #ifdef SELDON_CHECK_DIMENSIONS 00896 CheckDim(A, X, "Mlt(M, X)"); 00897 #endif 00898 00899 cblas_stpmv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 00900 A.GetN(), A.GetData(), X.GetData(), 1); 00901 } 00902 00903 00904 template <class Prop0, class Allocator0, 00905 class Allocator1> 00906 void Mlt(const Matrix<double, Prop0, RowUpTriangPacked, Allocator0>& A, 00907 Vector<double, VectFull, Allocator1>& X) 00908 { 00909 00910 #ifdef SELDON_CHECK_DIMENSIONS 00911 CheckDim(A, X, "Mlt(M, X)"); 00912 #endif 00913 00914 cblas_dtpmv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 00915 A.GetN(), A.GetData(), X.GetData(), 1); 00916 } 00917 00918 00919 template <class Prop0, class Allocator0, 00920 class Allocator1> 00921 void 00922 Mlt(const Matrix<complex<float>, Prop0, RowUpTriangPacked, Allocator0>& A, 00923 Vector<complex<float>, VectFull, Allocator1>& X) 00924 { 00925 00926 #ifdef SELDON_CHECK_DIMENSIONS 00927 CheckDim(A, X, "Mlt(M, X)"); 00928 #endif 00929 00930 cblas_ctpmv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 00931 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 00932 reinterpret_cast<void*>(X.GetData()), 1); 00933 } 00934 00935 00936 template <class Prop0, class Allocator0, 00937 class Allocator1> 00938 void 00939 Mlt(const Matrix<complex<double>, Prop0, RowUpTriangPacked, Allocator0>& A, 00940 Vector<complex<double>, VectFull, Allocator1>& X) 00941 { 00942 00943 #ifdef SELDON_CHECK_DIMENSIONS 00944 CheckDim(A, X, "Mlt(M, X)"); 00945 #endif 00946 00947 cblas_ztpmv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 00948 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 00949 reinterpret_cast<void*>(X.GetData()), 1); 00950 } 00951 00952 00953 /*** RowUpTriangPacked ***/ 00954 00955 00956 template <class Prop0, class Allocator0, 00957 class Allocator1> 00958 void Mlt(const SeldonTranspose& TransA, 00959 const SeldonDiag& DiagA, 00960 const Matrix<float, Prop0, RowUpTriangPacked, Allocator0>& A, 00961 Vector<float, VectFull, Allocator1>& X) 00962 { 00963 00964 #ifdef SELDON_CHECK_DIMENSIONS 00965 CheckDim(A, X, "Mlt(status, diag, M, X)"); 00966 #endif 00967 00968 cblas_stpmv(CblasRowMajor, CblasUpper, TransA, DiagA, 00969 A.GetN(), A.GetData(), X.GetData(), 1); 00970 } 00971 00972 00973 template <class Prop0, class Allocator0, 00974 class Allocator1> 00975 void Mlt(const SeldonTranspose& TransA, 00976 const SeldonDiag& DiagA, 00977 const Matrix<double, Prop0, RowUpTriangPacked, Allocator0>& A, 00978 Vector<double, VectFull, Allocator1>& X) 00979 { 00980 00981 #ifdef SELDON_CHECK_DIMENSIONS 00982 CheckDim(A, X, "Mlt(status, diag, M, X)"); 00983 #endif 00984 00985 cblas_dtpmv(CblasRowMajor, CblasUpper, TransA, DiagA, 00986 A.GetN(), A.GetData(), X.GetData(), 1); 00987 } 00988 00989 00990 template <class Prop0, class Allocator0, 00991 class Allocator1> 00992 void 00993 Mlt(const SeldonTranspose& TransA, 00994 const SeldonDiag& DiagA, 00995 const Matrix<complex<float>, Prop0, RowUpTriangPacked, Allocator0>& A, 00996 Vector<complex<float>, VectFull, Allocator1>& X) 00997 { 00998 00999 #ifdef SELDON_CHECK_DIMENSIONS 01000 CheckDim(A, X, "Mlt(status, diag, M, X)"); 01001 #endif 01002 01003 cblas_ctpmv(CblasRowMajor, CblasUpper, TransA, DiagA, 01004 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 01005 reinterpret_cast<void*>(X.GetData()), 1); 01006 } 01007 01008 01009 template <class Prop0, class Allocator0, 01010 class Allocator1> 01011 void 01012 Mlt(const SeldonTranspose& TransA, 01013 const SeldonDiag& DiagA, 01014 const Matrix<complex<double>, Prop0, RowUpTriangPacked, Allocator0>& A, 01015 Vector<complex<double>, VectFull, Allocator1>& X) 01016 { 01017 01018 #ifdef SELDON_CHECK_DIMENSIONS 01019 CheckDim(A, X, "Mlt(status, diag, M, X)"); 01020 #endif 01021 01022 cblas_ztpmv(CblasRowMajor, CblasUpper, TransA, DiagA, 01023 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 01024 reinterpret_cast<void*>(X.GetData()), 1); 01025 } 01026 01027 01028 /*** RowLoTriangPacked, NoTrans and NonUnit ***/ 01029 01030 01031 template <class Prop0, class Allocator0, 01032 class Allocator1> 01033 void Mlt(const Matrix<float, Prop0, RowLoTriangPacked, Allocator0>& A, 01034 Vector<float, VectFull, Allocator1>& X) 01035 { 01036 01037 #ifdef SELDON_CHECK_DIMENSIONS 01038 CheckDim(A, X, "Mlt(M, X)"); 01039 #endif 01040 01041 cblas_stpmv(CblasRowMajor, CblasLower, CblasNoTrans, CblasNonUnit, 01042 A.GetN(), A.GetData(), X.GetData(), 1); 01043 } 01044 01045 01046 template <class Prop0, class Allocator0, 01047 class Allocator1> 01048 void Mlt(const Matrix<double, Prop0, RowLoTriangPacked, Allocator0>& A, 01049 Vector<double, VectFull, Allocator1>& X) 01050 { 01051 01052 #ifdef SELDON_CHECK_DIMENSIONS 01053 CheckDim(A, X, "Mlt(M, X)"); 01054 #endif 01055 01056 cblas_dtpmv(CblasRowMajor, CblasLower, CblasNoTrans, CblasNonUnit, 01057 A.GetN(), A.GetData(), X.GetData(), 1); 01058 } 01059 01060 01061 template <class Prop0, class Allocator0, 01062 class Allocator1> 01063 void 01064 Mlt(const Matrix<complex<float>, Prop0, RowLoTriangPacked, Allocator0>& A, 01065 Vector<complex<float>, VectFull, Allocator1>& X) 01066 { 01067 01068 #ifdef SELDON_CHECK_DIMENSIONS 01069 CheckDim(A, X, "Mlt(M, X)"); 01070 #endif 01071 01072 cblas_ctpmv(CblasRowMajor, CblasLower, CblasNoTrans, CblasNonUnit, 01073 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 01074 reinterpret_cast<void*>(X.GetData()), 1); 01075 } 01076 01077 01078 template <class Prop0, class Allocator0, 01079 class Allocator1> 01080 void 01081 Mlt(const Matrix<complex<double>, Prop0, RowLoTriangPacked, Allocator0>& A, 01082 Vector<complex<double>, VectFull, Allocator1>& X) 01083 { 01084 01085 #ifdef SELDON_CHECK_DIMENSIONS 01086 CheckDim(A, X, "Mlt(M, X)"); 01087 #endif 01088 01089 cblas_ztpmv(CblasRowMajor, CblasLower, CblasNoTrans, CblasNonUnit, 01090 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 01091 reinterpret_cast<void*>(X.GetData()), 1); 01092 } 01093 01094 01095 /*** RowLoTriangPacked ***/ 01096 01097 01098 template <class Prop0, class Allocator0, 01099 class Allocator1> 01100 void Mlt(const SeldonTranspose& TransA, 01101 const SeldonDiag& DiagA, 01102 const Matrix<float, Prop0, RowLoTriangPacked, Allocator0>& A, 01103 Vector<float, VectFull, Allocator1>& X) 01104 { 01105 01106 #ifdef SELDON_CHECK_DIMENSIONS 01107 CheckDim(A, X, "Mlt(status, diag, M, X)"); 01108 #endif 01109 01110 cblas_stpmv(CblasRowMajor, CblasLower, TransA, DiagA, 01111 A.GetN(), A.GetData(), X.GetData(), 1); 01112 } 01113 01114 01115 template <class Prop0, class Allocator0, 01116 class Allocator1> 01117 void Mlt(const SeldonTranspose& TransA, 01118 const SeldonDiag& DiagA, 01119 const Matrix<double, Prop0, RowLoTriangPacked, Allocator0>& A, 01120 Vector<double, VectFull, Allocator1>& X) 01121 { 01122 01123 #ifdef SELDON_CHECK_DIMENSIONS 01124 CheckDim(A, X, "Mlt(status, diag, M, X)"); 01125 #endif 01126 01127 cblas_dtpmv(CblasRowMajor, CblasLower, TransA, DiagA, 01128 A.GetN(), A.GetData(), X.GetData(), 1); 01129 } 01130 01131 01132 template <class Prop0, class Allocator0, 01133 class Allocator1> 01134 void 01135 Mlt(const SeldonTranspose& TransA, 01136 const SeldonDiag& DiagA, 01137 const Matrix<complex<float>, Prop0, RowLoTriangPacked, Allocator0>& A, 01138 Vector<complex<float>, VectFull, Allocator1>& X) 01139 { 01140 01141 #ifdef SELDON_CHECK_DIMENSIONS 01142 CheckDim(A, X, "Mlt(status, diag, M, X)"); 01143 #endif 01144 01145 cblas_ctpmv(CblasRowMajor, CblasLower, TransA, DiagA, 01146 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 01147 reinterpret_cast<void*>(X.GetData()), 1); 01148 } 01149 01150 01151 template <class Prop0, class Allocator0, 01152 class Allocator1> 01153 void 01154 Mlt(const SeldonTranspose& TransA, 01155 const SeldonDiag& DiagA, 01156 const Matrix<complex<double>, Prop0, RowLoTriangPacked, Allocator0>& A, 01157 Vector<complex<double>, VectFull, Allocator1>& X) 01158 { 01159 01160 #ifdef SELDON_CHECK_DIMENSIONS 01161 CheckDim(A, X, "Mlt(status, diag, M, X)"); 01162 #endif 01163 01164 cblas_ztpmv(CblasRowMajor, CblasLower, TransA, DiagA, 01165 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 01166 reinterpret_cast<void*>(X.GetData()), 1); 01167 } 01168 01169 01170 // MLT // 01172 01173 01174 01176 // MLTADD // 01177 01178 01179 // General // 01180 01181 /*** ColMajor and NoTrans ***/ 01182 01183 01184 template <class Prop0, class Allocator0, 01185 class Allocator1, class Allocator2> 01186 void MltAdd(const float alpha, 01187 const Matrix<float, Prop0, ColMajor, Allocator0>& A, 01188 const Vector<float, VectFull, Allocator1>& X, 01189 const float beta, 01190 Vector<float, VectFull, Allocator2>& Y) 01191 { 01192 01193 #ifdef SELDON_CHECK_DIMENSIONS 01194 CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)"); 01195 #endif 01196 01197 cblas_sgemv(CblasColMajor, CblasNoTrans, 01198 A.GetM(), A.GetN(), alpha, A.GetData(), A.GetLD(), 01199 X.GetData(), 1, beta, Y.GetData(), 1); 01200 } 01201 01202 01203 template <class Prop0, class Allocator0, 01204 class Allocator1, class Allocator2> 01205 void MltAdd(const double alpha, 01206 const Matrix<double, Prop0, ColMajor, Allocator0>& A, 01207 const Vector<double, VectFull, Allocator1>& X, 01208 const double beta, 01209 Vector<double, VectFull, Allocator2>& Y) 01210 { 01211 01212 #ifdef SELDON_CHECK_DIMENSIONS 01213 CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)"); 01214 #endif 01215 01216 cblas_dgemv(CblasColMajor, CblasNoTrans, 01217 A.GetM(), A.GetN(), alpha, A.GetData(), A.GetLD(), 01218 X.GetData(), 1, beta, Y.GetData(), 1); 01219 } 01220 01221 01222 template <class Prop0, class Allocator0, 01223 class Allocator1, class Allocator2> 01224 void MltAdd(const complex<float> alpha, 01225 const Matrix<complex<float>, Prop0, ColMajor, Allocator0>& A, 01226 const Vector<complex<float>, VectFull, Allocator1>& X, 01227 const complex<float> beta, 01228 Vector<complex<float>, VectFull, Allocator2>& Y) 01229 { 01230 01231 #ifdef SELDON_CHECK_DIMENSIONS 01232 CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)"); 01233 #endif 01234 01235 cblas_cgemv(CblasColMajor, CblasNoTrans, 01236 A.GetM(), A.GetN(), reinterpret_cast<const void*>(&alpha), 01237 reinterpret_cast<const void*>(A.GetData()), A.GetLD(), 01238 reinterpret_cast<const void*>(X.GetData()), 1, 01239 reinterpret_cast<const void*>(&beta), 01240 reinterpret_cast<void*>(Y.GetData()), 1); 01241 } 01242 01243 01244 template <class Prop0, class Allocator0, 01245 class Allocator1, class Allocator2> 01246 void MltAdd(const complex<double> alpha, 01247 const Matrix<complex<double>, Prop0, ColMajor, Allocator0>& A, 01248 const Vector<complex<double>, VectFull, Allocator1>& X, 01249 const complex<double> beta, 01250 Vector<complex<double>, VectFull, Allocator2>& Y) 01251 { 01252 01253 #ifdef SELDON_CHECK_DIMENSIONS 01254 CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)"); 01255 #endif 01256 01257 cblas_zgemv(CblasColMajor, CblasNoTrans, 01258 A.GetM(), A.GetN(), reinterpret_cast<const void*>(&alpha), 01259 reinterpret_cast<const void*>(A.GetData()), A.GetLD(), 01260 reinterpret_cast<const void*>(X.GetData()), 1, 01261 reinterpret_cast<const void*>(&beta), 01262 reinterpret_cast<void*>(Y.GetData()), 1); 01263 } 01264 01265 01266 /*** ColMajor and TransA ***/ 01267 01268 01269 template <class Prop0, class Allocator0, 01270 class Allocator1, class Allocator2> 01271 void MltAdd(const float alpha, 01272 const SeldonTranspose& TransA, 01273 const Matrix<float, Prop0, ColMajor, Allocator0>& A, 01274 const Vector<float, VectFull, Allocator1>& X, 01275 const float beta, 01276 Vector<float, VectFull, Allocator2>& Y) 01277 { 01278 01279 #ifdef SELDON_CHECK_DIMENSIONS 01280 CheckDim(TransA, A, X, Y, "MltAdd(alpha, status, M, X, beta, Y)"); 01281 #endif 01282 01283 cblas_sgemv(CblasColMajor, TransA, 01284 A.GetM(), A.GetN(), alpha, A.GetData(), A.GetLD(), 01285 X.GetData(), 1, beta, Y.GetData(), 1); 01286 } 01287 01288 01289 template <class Prop0, class Allocator0, 01290 class Allocator1, class Allocator2> 01291 void MltAdd(const double alpha, 01292 const SeldonTranspose& TransA, 01293 const Matrix<double, Prop0, ColMajor, Allocator0>& A, 01294 const Vector<double, VectFull, Allocator1>& X, 01295 const double beta, 01296 Vector<double, VectFull, Allocator2>& Y) 01297 { 01298 01299 #ifdef SELDON_CHECK_DIMENSIONS 01300 CheckDim(TransA, A, X, Y, "MltAdd(alpha, status, M, X, beta, Y)"); 01301 #endif 01302 01303 cblas_dgemv(CblasColMajor, TransA, 01304 A.GetM(), A.GetN(), alpha, A.GetData(), A.GetLD(), 01305 X.GetData(), 1, beta, Y.GetData(), 1); 01306 } 01307 01308 01309 template <class Prop0, class Allocator0, 01310 class Allocator1, class Allocator2> 01311 void MltAdd(const complex<float> alpha, 01312 const SeldonTranspose& TransA, 01313 const Matrix<complex<float>, Prop0, ColMajor, Allocator0>& A, 01314 const Vector<complex<float>, VectFull, Allocator1>& X, 01315 const complex<float> beta, 01316 Vector<complex<float>, VectFull, Allocator2>& Y) 01317 { 01318 01319 #ifdef SELDON_CHECK_DIMENSIONS 01320 CheckDim(TransA, A, X, Y, "MltAdd(alpha, status, M, X, beta, Y)"); 01321 #endif 01322 01323 cblas_cgemv(CblasColMajor, TransA, 01324 A.GetM(), A.GetN(), reinterpret_cast<const void*>(&alpha), 01325 reinterpret_cast<const void*>(A.GetData()), A.GetLD(), 01326 reinterpret_cast<const void*>(X.GetData()), 1, 01327 reinterpret_cast<const void*>(&beta), 01328 reinterpret_cast<void*>(Y.GetData()), 1); 01329 } 01330 01331 01332 template <class Prop0, class Allocator0, 01333 class Allocator1, class Allocator2> 01334 void MltAdd(const complex<double> alpha, 01335 const SeldonTranspose& TransA, 01336 const Matrix<complex<double>, Prop0, ColMajor, Allocator0>& A, 01337 const Vector<complex<double>, VectFull, Allocator1>& X, 01338 const complex<double> beta, 01339 Vector<complex<double>, VectFull, Allocator2>& Y) 01340 { 01341 01342 #ifdef SELDON_CHECK_DIMENSIONS 01343 CheckDim(TransA, A, X, Y, "MltAdd(alpha, status, M, X, beta, Y)"); 01344 #endif 01345 01346 cblas_zgemv(CblasColMajor, TransA, 01347 A.GetM(), A.GetN(), reinterpret_cast<const void*>(&alpha), 01348 reinterpret_cast<const void*>(A.GetData()), A.GetLD(), 01349 reinterpret_cast<const void*>(X.GetData()), 1, 01350 reinterpret_cast<const void*>(&beta), 01351 reinterpret_cast<void*>(Y.GetData()), 1); 01352 } 01353 01354 01355 /*** RowMajor and NoTrans ***/ 01356 01357 01358 template <class Prop0, class Allocator0, 01359 class Allocator1, class Allocator2> 01360 void MltAdd(const float alpha, 01361 const Matrix<float, Prop0, RowMajor, Allocator0>& A, 01362 const Vector<float, VectFull, Allocator1>& X, 01363 const float beta, 01364 Vector<float, VectFull, Allocator2>& Y) 01365 { 01366 01367 #ifdef SELDON_CHECK_DIMENSIONS 01368 CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)"); 01369 #endif 01370 01371 cblas_sgemv(CblasRowMajor, CblasNoTrans, 01372 A.GetM(), A.GetN(), alpha, A.GetData(), A.GetLD(), 01373 X.GetData(), 1, beta, Y.GetData(), 1); 01374 } 01375 01376 01377 template <class Prop0, class Allocator0, 01378 class Allocator1, class Allocator2> 01379 void MltAdd(const double alpha, 01380 const Matrix<double, Prop0, RowMajor, Allocator0>& A, 01381 const Vector<double, VectFull, Allocator1>& X, 01382 const double beta, 01383 Vector<double, VectFull, Allocator2>& Y) 01384 { 01385 01386 #ifdef SELDON_CHECK_DIMENSIONS 01387 CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)"); 01388 #endif 01389 01390 cblas_dgemv(CblasRowMajor, CblasNoTrans, 01391 A.GetM(), A.GetN(), alpha, A.GetData(), A.GetLD(), 01392 X.GetData(), 1, beta, Y.GetData(), 1); 01393 } 01394 01395 01396 template <class Prop0, class Allocator0, 01397 class Allocator1, class Allocator2> 01398 void MltAdd(const complex<float> alpha, 01399 const Matrix<complex<float>, Prop0, RowMajor, Allocator0>& A, 01400 const Vector<complex<float>, VectFull, Allocator1>& X, 01401 const complex<float> beta, 01402 Vector<complex<float>, VectFull, Allocator2>& Y) 01403 { 01404 01405 #ifdef SELDON_CHECK_DIMENSIONS 01406 CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)"); 01407 #endif 01408 01409 cblas_cgemv(CblasRowMajor, CblasNoTrans, 01410 A.GetM(), A.GetN(), reinterpret_cast<const void*>(&alpha), 01411 reinterpret_cast<const void*>(A.GetData()), A.GetLD(), 01412 reinterpret_cast<const void*>(X.GetData()), 1, 01413 reinterpret_cast<const void*>(&beta), 01414 reinterpret_cast<void*>(Y.GetData()), 1); 01415 } 01416 01417 01418 template <class Prop0, class Allocator0, 01419 class Allocator1, class Allocator2> 01420 void MltAdd(const complex<double> alpha, 01421 const Matrix<complex<double>, Prop0, RowMajor, Allocator0>& A, 01422 const Vector<complex<double>, VectFull, Allocator1>& X, 01423 const complex<double> beta, 01424 Vector<complex<double>, VectFull, Allocator2>& Y) 01425 { 01426 01427 #ifdef SELDON_CHECK_DIMENSIONS 01428 CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)"); 01429 #endif 01430 01431 cblas_zgemv(CblasRowMajor, CblasNoTrans, 01432 A.GetM(), A.GetN(), reinterpret_cast<const void*>(&alpha), 01433 reinterpret_cast<const void*>(A.GetData()), A.GetLD(), 01434 reinterpret_cast<const void*>(X.GetData()), 1, 01435 reinterpret_cast<const void*>(&beta), 01436 reinterpret_cast<void*>(Y.GetData()), 1); 01437 } 01438 01439 01440 /*** RowMajor and TransA ***/ 01441 01442 01443 template <class Prop0, class Allocator0, 01444 class Allocator1, class Allocator2> 01445 void MltAdd(const float alpha, 01446 const SeldonTranspose& TransA, 01447 const Matrix<float, Prop0, RowMajor, Allocator0>& A, 01448 const Vector<float, VectFull, Allocator1>& X, 01449 const float beta, 01450 Vector<float, VectFull, Allocator2>& Y) 01451 { 01452 01453 #ifdef SELDON_CHECK_DIMENSIONS 01454 CheckDim(TransA, A, X, Y, "MltAdd(alpha, status, M, X, beta, Y)"); 01455 #endif 01456 01457 cblas_sgemv(CblasRowMajor, TransA, 01458 A.GetM(), A.GetN(), alpha, A.GetData(), A.GetLD(), 01459 X.GetData(), 1, beta, Y.GetData(), 1); 01460 } 01461 01462 01463 template <class Prop0, class Allocator0, 01464 class Allocator1, class Allocator2> 01465 void MltAdd(const double alpha, 01466 const SeldonTranspose& TransA, 01467 const Matrix<double, Prop0, RowMajor, Allocator0>& A, 01468 const Vector<double, VectFull, Allocator1>& X, 01469 const double beta, 01470 Vector<double, VectFull, Allocator2>& Y) 01471 { 01472 01473 #ifdef SELDON_CHECK_DIMENSIONS 01474 CheckDim(TransA, A, X, Y, "MltAdd(alpha, status, M, X, beta, Y)"); 01475 #endif 01476 01477 cblas_dgemv(CblasRowMajor, TransA, 01478 A.GetM(), A.GetN(), alpha, A.GetData(), A.GetLD(), 01479 X.GetData(), 1, beta, Y.GetData(), 1); 01480 } 01481 01482 01483 template <class Prop0, class Allocator0, 01484 class Allocator1, class Allocator2> 01485 void MltAdd(const complex<float> alpha, 01486 const SeldonTranspose& TransA, 01487 const Matrix<complex<float>, Prop0, RowMajor, Allocator0>& A, 01488 const Vector<complex<float>, VectFull, Allocator1>& X, 01489 const complex<float> beta, 01490 Vector<complex<float>, VectFull, Allocator2>& Y) 01491 { 01492 01493 #ifdef SELDON_CHECK_DIMENSIONS 01494 CheckDim(TransA, A, X, Y, "MltAdd(alpha, status, M, X, beta, Y)"); 01495 #endif 01496 01497 cblas_cgemv(CblasRowMajor, TransA, 01498 A.GetM(), A.GetN(), reinterpret_cast<const void*>(&alpha), 01499 reinterpret_cast<const void*>(A.GetData()), A.GetLD(), 01500 reinterpret_cast<const void*>(X.GetData()), 1, 01501 reinterpret_cast<const void*>(&beta), 01502 reinterpret_cast<void*>(Y.GetData()), 1); 01503 } 01504 01505 01506 template <class Prop0, class Allocator0, 01507 class Allocator1, class Allocator2> 01508 void MltAdd(const complex<double> alpha, 01509 const SeldonTranspose& TransA, 01510 const Matrix<complex<double>, Prop0, RowMajor, Allocator0>& A, 01511 const Vector<complex<double>, VectFull, Allocator1>& X, 01512 const complex<double> beta, 01513 Vector<complex<double>, VectFull, Allocator2>& Y) 01514 { 01515 01516 #ifdef SELDON_CHECK_DIMENSIONS 01517 CheckDim(TransA, A, X, Y, "MltAdd(alpha, status, M, X, beta, Y)"); 01518 #endif 01519 01520 cblas_zgemv(CblasRowMajor, TransA, 01521 A.GetM(), A.GetN(), reinterpret_cast<const void*>(&alpha), 01522 reinterpret_cast<const void*>(A.GetData()), A.GetLD(), 01523 reinterpret_cast<const void*>(X.GetData()), 1, 01524 reinterpret_cast<const void*>(&beta), 01525 reinterpret_cast<void*>(Y.GetData()), 1); 01526 } 01527 01528 01529 // Hermitian // 01530 01531 /*** ColHerm and Upper ***/ 01532 01533 01534 template <class Prop0, class Allocator0, 01535 class Allocator1, class Allocator2> 01536 void MltAdd(const complex<float> alpha, 01537 const Matrix<complex<float>, Prop0, ColHerm, Allocator0>& A, 01538 const Vector<complex<float>, VectFull, Allocator1>& X, 01539 const complex<float> beta, 01540 Vector<complex<float>, VectFull, Allocator2>& Y) 01541 { 01542 01543 #ifdef SELDON_CHECK_DIMENSIONS 01544 CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)"); 01545 #endif 01546 01547 cblas_chemv(CblasColMajor, CblasUpper, 01548 A.GetM(), reinterpret_cast<const void*>(&alpha), 01549 A.GetDataConstVoid(), A.GetM(), 01550 X.GetDataConstVoid(), 1, reinterpret_cast<const void*>(&beta), 01551 Y.GetDataVoid(), 1); 01552 } 01553 01554 01555 template <class Prop0, class Allocator0, 01556 class Allocator1, class Allocator2> 01557 void MltAdd(const complex<double> alpha, 01558 const Matrix<complex<double>, Prop0, ColHerm, Allocator0>& A, 01559 const Vector<complex<double>, VectFull, Allocator1>& X, 01560 const complex<double> beta, 01561 Vector<complex<double>, VectFull, Allocator2>& Y) 01562 { 01563 01564 #ifdef SELDON_CHECK_DIMENSIONS 01565 CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)"); 01566 #endif 01567 01568 cblas_zhemv(CblasColMajor, CblasUpper, 01569 A.GetM(), reinterpret_cast<const void*>(&alpha), 01570 A.GetDataConstVoid(), A.GetM(), 01571 X.GetDataConstVoid(), 1, reinterpret_cast<const void*>(&beta), 01572 Y.GetDataVoid(), 1); 01573 } 01574 01575 01576 /*** ColHerm and Uplo ***/ 01577 01578 01579 template <class Prop0, class Allocator0, 01580 class Allocator1, class Allocator2> 01581 void MltAdd(const complex<float> alpha, 01582 const SeldonUplo& Uplo, 01583 const Matrix<complex<float>, Prop0, ColHerm, Allocator0>& A, 01584 const Vector<complex<float>, VectFull, Allocator1>& X, 01585 const complex<float> beta, 01586 Vector<complex<float>, VectFull, Allocator2>& Y) 01587 { 01588 01589 #ifdef SELDON_CHECK_DIMENSIONS 01590 CheckDim(A, X, Y, "MltAdd(alpha, uplo, M, X, beta, Y)"); 01591 #endif 01592 01593 cblas_chemv(CblasColMajor, Uplo, 01594 A.GetM(), reinterpret_cast<const void*>(&alpha), 01595 A.GetDataConstVoid(), A.GetM(), 01596 X.GetDataConstVoid(), 1, reinterpret_cast<const void*>(&beta), 01597 Y.GetDataVoid(), 1); 01598 } 01599 01600 01601 template <class Prop0, class Allocator0, 01602 class Allocator1, class Allocator2> 01603 void MltAdd(const complex<double> alpha, 01604 const SeldonUplo& Uplo, 01605 const Matrix<complex<double>, Prop0, ColHerm, Allocator0>& A, 01606 const Vector<complex<double>, VectFull, Allocator1>& X, 01607 const complex<double> beta, 01608 Vector<complex<double>, VectFull, Allocator2>& Y) 01609 { 01610 01611 #ifdef SELDON_CHECK_DIMENSIONS 01612 CheckDim(A, X, Y, "MltAdd(alpha, uplo, M, X, beta, Y)"); 01613 #endif 01614 01615 cblas_zhemv(CblasColMajor, Uplo, 01616 A.GetM(), reinterpret_cast<const void*>(&alpha), 01617 A.GetDataConstVoid(), A.GetM(), 01618 X.GetDataConstVoid(), 1, reinterpret_cast<const void*>(&beta), 01619 Y.GetDataVoid(), 1); 01620 } 01621 01622 01623 /*** RowHerm and Upper ***/ 01624 01625 01626 template <class Prop0, class Allocator0, 01627 class Allocator1, class Allocator2> 01628 void MltAdd(const complex<float> alpha, 01629 const Matrix<complex<float>, Prop0, RowHerm, Allocator0>& A, 01630 const Vector<complex<float>, VectFull, Allocator1>& X, 01631 const complex<float> beta, 01632 Vector<complex<float>, VectFull, Allocator2>& Y) 01633 { 01634 01635 #ifdef SELDON_CHECK_DIMENSIONS 01636 CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)"); 01637 #endif 01638 01639 cblas_chemv(CblasRowMajor, CblasUpper, 01640 A.GetM(), reinterpret_cast<const void*>(&alpha), 01641 A.GetDataConstVoid(), A.GetM(), 01642 X.GetDataConstVoid(), 1, reinterpret_cast<const void*>(&beta), 01643 Y.GetDataVoid(), 1); 01644 } 01645 01646 01647 template <class Prop0, class Allocator0, 01648 class Allocator1, class Allocator2> 01649 void MltAdd(const complex<double> alpha, 01650 const Matrix<complex<double>, Prop0, RowHerm, Allocator0>& A, 01651 const Vector<complex<double>, VectFull, Allocator1>& X, 01652 const complex<double> beta, 01653 Vector<complex<double>, VectFull, Allocator2>& Y) 01654 { 01655 01656 #ifdef SELDON_CHECK_DIMENSIONS 01657 CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)"); 01658 #endif 01659 01660 cblas_zhemv(CblasRowMajor, CblasUpper, 01661 A.GetM(), reinterpret_cast<const void*>(&alpha), 01662 A.GetDataConstVoid(), A.GetM(), 01663 X.GetDataConstVoid(), 1, reinterpret_cast<const void*>(&beta), 01664 Y.GetDataVoid(), 1); 01665 } 01666 01667 01668 /*** RowHerm and Uplo ***/ 01669 01670 01671 template <class Prop0, class Allocator0, 01672 class Allocator1, class Allocator2> 01673 void MltAdd(const complex<float> alpha, 01674 const SeldonUplo& Uplo, 01675 const Matrix<complex<float>, Prop0, RowHerm, Allocator0>& A, 01676 const Vector<complex<float>, VectFull, Allocator1>& X, 01677 const complex<float> beta, 01678 Vector<complex<float>, VectFull, Allocator2>& Y) 01679 { 01680 01681 #ifdef SELDON_CHECK_DIMENSIONS 01682 CheckDim(A, X, Y, "MltAdd(alpha, uplo, M, X, beta, Y)"); 01683 #endif 01684 01685 cblas_chemv(CblasRowMajor, Uplo, 01686 A.GetM(), reinterpret_cast<const void*>(&alpha), 01687 A.GetDataConstVoid(), A.GetM(), 01688 X.GetDataConstVoid(), 1, reinterpret_cast<const void*>(&beta), 01689 Y.GetDataVoid(), 1); 01690 } 01691 01692 01693 template <class Prop0, class Allocator0, 01694 class Allocator1, class Allocator2> 01695 void MltAdd(const complex<double> alpha, 01696 const SeldonUplo& Uplo, 01697 const Matrix<complex<double>, Prop0, RowHerm, Allocator0>& A, 01698 const Vector<complex<double>, VectFull, Allocator1>& X, 01699 const complex<double> beta, 01700 Vector<complex<double>, VectFull, Allocator2>& Y) 01701 { 01702 01703 #ifdef SELDON_CHECK_DIMENSIONS 01704 CheckDim(A, X, Y, "MltAdd(alpha, uplo, M, X, beta, Y)"); 01705 #endif 01706 01707 cblas_zhemv(CblasRowMajor, Uplo, 01708 A.GetM(), reinterpret_cast<const void*>(&alpha), 01709 A.GetDataConstVoid(), A.GetM(), 01710 X.GetDataConstVoid(), 1, reinterpret_cast<const void*>(&beta), 01711 Y.GetDataVoid(), 1); 01712 } 01713 01714 01715 // HermPacked // 01716 01717 /*** ColHermPacked and Upper ***/ 01718 01719 01720 template <class Prop0, class Allocator0, 01721 class Allocator1, class Allocator2> 01722 void MltAdd(const complex<float> alpha, 01723 const Matrix<complex<float>, Prop0, 01724 ColHermPacked, Allocator0>& A, 01725 const Vector<complex<float>, VectFull, Allocator1>& X, 01726 const complex<float> beta, 01727 Vector<complex<float>, VectFull, Allocator2>& Y) 01728 { 01729 01730 #ifdef SELDON_CHECK_DIMENSIONS 01731 CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)"); 01732 #endif 01733 01734 cblas_chpmv(CblasColMajor, CblasUpper, 01735 A.GetM(), reinterpret_cast<const void*>(&alpha), 01736 A.GetDataConstVoid(), 01737 X.GetDataConstVoid(), 1, reinterpret_cast<const void*>(&beta), 01738 Y.GetDataVoid(), 1); 01739 } 01740 01741 01742 template <class Prop0, class Allocator0, 01743 class Allocator1, class Allocator2> 01744 void MltAdd(const complex<double> alpha, 01745 const Matrix<complex<double>, Prop0, 01746 ColHermPacked, Allocator0>& A, 01747 const Vector<complex<double>, VectFull, Allocator1>& X, 01748 const complex<double> beta, 01749 Vector<complex<double>, VectFull, Allocator2>& Y) 01750 { 01751 01752 #ifdef SELDON_CHECK_DIMENSIONS 01753 CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)"); 01754 #endif 01755 01756 cblas_zhpmv(CblasColMajor, CblasUpper, 01757 A.GetM(), reinterpret_cast<const void*>(&alpha), 01758 A.GetDataConstVoid(), 01759 X.GetDataConstVoid(), 1, reinterpret_cast<const void*>(&beta), 01760 Y.GetDataVoid(), 1); 01761 } 01762 01763 01764 /*** ColHermPacked and Uplo ***/ 01765 01766 01767 template <class Prop0, class Allocator0, 01768 class Allocator1, class Allocator2> 01769 void MltAdd(const complex<float> alpha, 01770 const SeldonUplo& Uplo, 01771 const Matrix<complex<float>, Prop0, 01772 ColHermPacked, Allocator0>& A, 01773 const Vector<complex<float>, VectFull, Allocator1>& X, 01774 const complex<float> beta, 01775 Vector<complex<float>, VectFull, Allocator2>& Y) 01776 { 01777 01778 #ifdef SELDON_CHECK_DIMENSIONS 01779 CheckDim(A, X, Y, "MltAdd(alpha, uplo, M, X, beta, Y)"); 01780 #endif 01781 01782 cblas_chpmv(CblasColMajor, Uplo, 01783 A.GetM(), reinterpret_cast<const void*>(&alpha), 01784 A.GetDataConstVoid(), 01785 X.GetDataConstVoid(), 1, reinterpret_cast<const void*>(&beta), 01786 Y.GetDataVoid(), 1); 01787 } 01788 01789 01790 template <class Prop0, class Allocator0, 01791 class Allocator1, class Allocator2> 01792 void MltAdd(const complex<double> alpha, 01793 const SeldonUplo& Uplo, 01794 const Matrix<complex<double>, Prop0, 01795 ColHermPacked, Allocator0>& A, 01796 const Vector<complex<double>, VectFull, Allocator1>& X, 01797 const complex<double> beta, 01798 Vector<complex<double>, VectFull, Allocator2>& Y) 01799 { 01800 01801 #ifdef SELDON_CHECK_DIMENSIONS 01802 CheckDim(A, X, Y, "MltAdd(alpha, uplo, M, X, beta, Y)"); 01803 #endif 01804 01805 cblas_zhpmv(CblasColMajor, Uplo, 01806 A.GetM(), reinterpret_cast<const void*>(&alpha), 01807 A.GetDataConstVoid(), 01808 X.GetDataConstVoid(), 1, reinterpret_cast<const void*>(&beta), 01809 Y.GetDataVoid(), 1); 01810 } 01811 01812 01813 /*** RowHermPacked and Upper ***/ 01814 01815 01816 template <class Prop0, class Allocator0, 01817 class Allocator1, class Allocator2> 01818 void MltAdd(const complex<float> alpha, 01819 const Matrix<complex<float>, Prop0, 01820 RowHermPacked, Allocator0>& A, 01821 const Vector<complex<float>, VectFull, Allocator1>& X, 01822 const complex<float> beta, 01823 Vector<complex<float>, VectFull, Allocator2>& Y) 01824 { 01825 01826 #ifdef SELDON_CHECK_DIMENSIONS 01827 CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)"); 01828 #endif 01829 01830 cblas_chpmv(CblasRowMajor, CblasUpper, 01831 A.GetM(), reinterpret_cast<const void*>(&alpha), 01832 A.GetDataConstVoid(), 01833 X.GetDataConstVoid(), 1, reinterpret_cast<const void*>(&beta), 01834 Y.GetDataVoid(), 1); 01835 } 01836 01837 01838 template <class Prop0, class Allocator0, 01839 class Allocator1, class Allocator2> 01840 void MltAdd(const complex<double> alpha, 01841 const Matrix<complex<double>, Prop0, 01842 RowHermPacked, Allocator0>& A, 01843 const Vector<complex<double>, VectFull, Allocator1>& X, 01844 const complex<double> beta, 01845 Vector<complex<double>, VectFull, Allocator2>& Y) 01846 { 01847 01848 #ifdef SELDON_CHECK_DIMENSIONS 01849 CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)"); 01850 #endif 01851 01852 cblas_zhpmv(CblasRowMajor, CblasUpper, 01853 A.GetM(), reinterpret_cast<const void*>(&alpha), 01854 A.GetDataConstVoid(), 01855 X.GetDataConstVoid(), 1, reinterpret_cast<const void*>(&beta), 01856 Y.GetDataVoid(), 1); 01857 } 01858 01859 01860 /*** RowHermPacked and Uplo ***/ 01861 01862 01863 template <class Prop0, class Allocator0, 01864 class Allocator1, class Allocator2> 01865 void MltAdd(const complex<float> alpha, 01866 const SeldonUplo& Uplo, 01867 const Matrix<complex<float>, Prop0, 01868 RowHermPacked, Allocator0>& A, 01869 const Vector<complex<float>, VectFull, Allocator1>& X, 01870 const complex<float> beta, 01871 Vector<complex<float>, VectFull, Allocator2>& Y) 01872 { 01873 01874 #ifdef SELDON_CHECK_DIMENSIONS 01875 CheckDim(A, X, Y, "MltAdd(alpha, uplo, M, X, beta, Y)"); 01876 #endif 01877 01878 cblas_chpmv(CblasRowMajor, Uplo, 01879 A.GetM(), reinterpret_cast<const void*>(&alpha), 01880 A.GetDataConstVoid(), 01881 X.GetDataConstVoid(), 1, reinterpret_cast<const void*>(&beta), 01882 Y.GetDataVoid(), 1); 01883 } 01884 01885 01886 template <class Prop0, class Allocator0, 01887 class Allocator1, class Allocator2> 01888 void MltAdd(const complex<double> alpha, 01889 const SeldonUplo& Uplo, 01890 const Matrix<complex<double>, Prop0, 01891 RowHermPacked, Allocator0>& A, 01892 const Vector<complex<double>, VectFull, Allocator1>& X, 01893 const complex<double> beta, 01894 Vector<complex<double>, VectFull, Allocator2>& Y) 01895 { 01896 01897 #ifdef SELDON_CHECK_DIMENSIONS 01898 CheckDim(A, X, Y, "MltAdd(alpha, uplo, M, X, beta, Y)"); 01899 #endif 01900 01901 cblas_zhpmv(CblasRowMajor, Uplo, 01902 A.GetM(), reinterpret_cast<const void*>(&alpha), 01903 A.GetDataConstVoid(), 01904 X.GetDataConstVoid(), 1, reinterpret_cast<const void*>(&beta), 01905 Y.GetDataVoid(), 1); 01906 } 01907 01908 01909 // Symmetric // 01910 01911 /*** ColSym and Upper ***/ 01912 01913 01914 template <class Prop0, class Allocator0, 01915 class Allocator1, class Allocator2> 01916 void MltAdd(const float alpha, 01917 const Matrix<float, Prop0, ColSym, Allocator0>& A, 01918 const Vector<float, VectFull, Allocator1>& X, 01919 const float beta, 01920 Vector<float, VectFull, Allocator2>& Y) 01921 { 01922 01923 #ifdef SELDON_CHECK_DIMENSIONS 01924 CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)"); 01925 #endif 01926 01927 cblas_ssymv(CblasColMajor, CblasUpper, 01928 A.GetM(), alpha, A.GetData(), A.GetM(), 01929 X.GetData(), 1, beta, Y.GetData(), 1); 01930 } 01931 01932 01933 template <class Prop0, class Allocator0, 01934 class Allocator1, class Allocator2> 01935 void MltAdd(const double alpha, 01936 const Matrix<double, Prop0, ColSym, Allocator0>& A, 01937 const Vector<double, VectFull, Allocator1>& X, 01938 const double beta, 01939 Vector<double, VectFull, Allocator2>& Y) 01940 { 01941 01942 #ifdef SELDON_CHECK_DIMENSIONS 01943 CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)"); 01944 #endif 01945 01946 cblas_dsymv(CblasColMajor, CblasUpper, 01947 A.GetM(), alpha, A.GetData(), A.GetM(), 01948 X.GetData(), 1, beta, Y.GetData(), 1); 01949 } 01950 01951 01952 /*** ColSym and Uplo ***/ 01953 01954 01955 template <class Prop0, class Allocator0, 01956 class Allocator1, class Allocator2> 01957 void MltAdd(const float alpha, 01958 const SeldonUplo& Uplo, 01959 const Matrix<float, Prop0, ColSym, Allocator0>& A, 01960 const Vector<float, VectFull, Allocator1>& X, 01961 const float beta, 01962 Vector<float, VectFull, Allocator2>& Y) 01963 { 01964 01965 #ifdef SELDON_CHECK_DIMENSIONS 01966 CheckDim(A, X, Y, "MltAdd(alpha, uplo, M, X, beta, Y)"); 01967 #endif 01968 01969 cblas_ssymv(CblasColMajor, Uplo, 01970 A.GetM(), alpha, A.GetData(), A.GetM(), 01971 X.GetData(), 1, beta, Y.GetData(), 1); 01972 } 01973 01974 01975 template <class Prop0, class Allocator0, 01976 class Allocator1, class Allocator2> 01977 void MltAdd(const double alpha, 01978 const SeldonUplo& Uplo, 01979 const Matrix<double, Prop0, ColSym, Allocator0>& A, 01980 const Vector<double, VectFull, Allocator1>& X, 01981 const double beta, 01982 Vector<double, VectFull, Allocator2>& Y) 01983 { 01984 01985 #ifdef SELDON_CHECK_DIMENSIONS 01986 CheckDim(A, X, Y, "MltAdd(alpha, uplo, M, X, beta, Y)"); 01987 #endif 01988 01989 cblas_dsymv(CblasColMajor, Uplo, 01990 A.GetM(), alpha, A.GetData(), A.GetM(), 01991 X.GetData(), 1, beta, Y.GetData(), 1); 01992 } 01993 01994 01995 /*** RowSym and Upper ***/ 01996 01997 01998 template <class Prop0, class Allocator0, 01999 class Allocator1, class Allocator2> 02000 void MltAdd(const float alpha, 02001 const Matrix<float, Prop0, RowSym, Allocator0>& A, 02002 const Vector<float, VectFull, Allocator1>& X, 02003 const float beta, 02004 Vector<float, VectFull, Allocator2>& Y) 02005 { 02006 02007 #ifdef SELDON_CHECK_DIMENSIONS 02008 CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)"); 02009 #endif 02010 02011 cblas_ssymv(CblasRowMajor, CblasUpper, 02012 A.GetM(), alpha, A.GetData(), A.GetM(), 02013 X.GetData(), 1, beta, Y.GetData(), 1); 02014 } 02015 02016 02017 template <class Prop0, class Allocator0, 02018 class Allocator1, class Allocator2> 02019 void MltAdd(const double alpha, 02020 const Matrix<double, Prop0, RowSym, Allocator0>& A, 02021 const Vector<double, VectFull, Allocator1>& X, 02022 const double beta, 02023 Vector<double, VectFull, Allocator2>& Y) 02024 { 02025 02026 #ifdef SELDON_CHECK_DIMENSIONS 02027 CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)"); 02028 #endif 02029 02030 cblas_dsymv(CblasRowMajor, CblasUpper, 02031 A.GetM(), alpha, A.GetData(), A.GetM(), 02032 X.GetData(), 1, beta, Y.GetData(), 1); 02033 } 02034 02035 02036 /*** RowSym and Uplo ***/ 02037 02038 02039 template <class Prop0, class Allocator0, 02040 class Allocator1, class Allocator2> 02041 void MltAdd(const float alpha, 02042 const SeldonUplo& Uplo, 02043 const Matrix<float, Prop0, RowSym, Allocator0>& A, 02044 const Vector<float, VectFull, Allocator1>& X, 02045 const float beta, 02046 Vector<float, VectFull, Allocator2>& Y) 02047 { 02048 02049 #ifdef SELDON_CHECK_DIMENSIONS 02050 CheckDim(A, X, Y, "MltAdd(alpha, uplo, M, X, beta, Y)"); 02051 #endif 02052 02053 cblas_ssymv(CblasRowMajor, Uplo, 02054 A.GetM(), alpha, A.GetData(), A.GetM(), 02055 X.GetData(), 1, beta, Y.GetData(), 1); 02056 } 02057 02058 02059 template <class Prop0, class Allocator0, 02060 class Allocator1, class Allocator2> 02061 void MltAdd(const double alpha, 02062 const SeldonUplo& Uplo, 02063 const Matrix<double, Prop0, RowSym, Allocator0>& A, 02064 const Vector<double, VectFull, Allocator1>& X, 02065 const double beta, 02066 Vector<double, VectFull, Allocator2>& Y) 02067 { 02068 02069 #ifdef SELDON_CHECK_DIMENSIONS 02070 CheckDim(A, X, Y, "MltAdd(alpha, uplo, M, X, beta, Y)"); 02071 #endif 02072 02073 cblas_dsymv(CblasRowMajor, Uplo, 02074 A.GetM(), alpha, A.GetData(), A.GetM(), 02075 X.GetData(), 1, beta, Y.GetData(), 1); 02076 } 02077 02078 02079 // SymPacked // 02080 02081 /*** ColSymPacked and Upper ***/ 02082 02083 02084 template <class Prop0, class Allocator0, 02085 class Allocator1, class Allocator2> 02086 void MltAdd(const float alpha, 02087 const Matrix<float, Prop0, ColSymPacked, Allocator0>& A, 02088 const Vector<float, VectFull, Allocator1>& X, 02089 const float beta, 02090 Vector<float, VectFull, Allocator2>& Y) 02091 { 02092 02093 #ifdef SELDON_CHECK_DIMENSIONS 02094 CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)"); 02095 #endif 02096 02097 cblas_sspmv(CblasColMajor, CblasUpper, 02098 A.GetM(), alpha, A.GetData(), 02099 X.GetData(), 1, beta, Y.GetData(), 1); 02100 } 02101 02102 02103 template <class Prop0, class Allocator0, 02104 class Allocator1, class Allocator2> 02105 void MltAdd(const double alpha, 02106 const Matrix<double, Prop0, ColSymPacked, Allocator0>& A, 02107 const Vector<double, VectFull, Allocator1>& X, 02108 const double beta, 02109 Vector<double, VectFull, Allocator2>& Y) 02110 { 02111 02112 #ifdef SELDON_CHECK_DIMENSIONS 02113 CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)"); 02114 #endif 02115 02116 cblas_dspmv(CblasColMajor, CblasUpper, 02117 A.GetM(), alpha, A.GetData(), 02118 X.GetData(), 1, beta, Y.GetData(), 1); 02119 } 02120 02121 02122 /*** ColSymPacked and Uplo ***/ 02123 02124 02125 template <class Prop0, class Allocator0, 02126 class Allocator1, class Allocator2> 02127 void MltAdd(const float alpha, 02128 const SeldonUplo& Uplo, 02129 const Matrix<float, Prop0, ColSymPacked, Allocator0>& A, 02130 const Vector<float, VectFull, Allocator1>& X, 02131 const float beta, 02132 Vector<float, VectFull, Allocator2>& Y) 02133 { 02134 02135 #ifdef SELDON_CHECK_DIMENSIONS 02136 CheckDim(A, X, Y, "MltAdd(alpha, uplo, M, X, beta, Y)"); 02137 #endif 02138 02139 cblas_sspmv(CblasColMajor, Uplo, 02140 A.GetM(), alpha, A.GetData(), 02141 X.GetData(), 1, beta, Y.GetData(), 1); 02142 } 02143 02144 02145 template <class Prop0, class Allocator0, 02146 class Allocator1, class Allocator2> 02147 void MltAdd(const double alpha, 02148 const SeldonUplo& Uplo, 02149 const Matrix<double, Prop0, ColSymPacked, Allocator0>& A, 02150 const Vector<double, VectFull, Allocator1>& X, 02151 const double beta, 02152 Vector<double, VectFull, Allocator2>& Y) 02153 { 02154 02155 #ifdef SELDON_CHECK_DIMENSIONS 02156 CheckDim(A, X, Y, "MltAdd(alpha, uplo, M, X, beta, Y)"); 02157 #endif 02158 02159 cblas_dspmv(CblasColMajor, Uplo, 02160 A.GetM(), alpha, A.GetData(), 02161 X.GetData(), 1, beta, Y.GetData(), 1); 02162 } 02163 02164 02165 /*** RowSymPacked and Upper ***/ 02166 02167 02168 template <class Prop0, class Allocator0, 02169 class Allocator1, class Allocator2> 02170 void MltAdd(const float alpha, 02171 const Matrix<float, Prop0, RowSymPacked, Allocator0>& A, 02172 const Vector<float, VectFull, Allocator1>& X, 02173 const float beta, 02174 Vector<float, VectFull, Allocator2>& Y) 02175 { 02176 02177 #ifdef SELDON_CHECK_DIMENSIONS 02178 CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)"); 02179 #endif 02180 02181 cblas_sspmv(CblasRowMajor, CblasUpper, 02182 A.GetM(), alpha, A.GetData(), 02183 X.GetData(), 1, beta, Y.GetData(), 1); 02184 } 02185 02186 02187 template <class Prop0, class Allocator0, 02188 class Allocator1, class Allocator2> 02189 void MltAdd(const double alpha, 02190 const Matrix<double, Prop0, RowSymPacked, Allocator0>& A, 02191 const Vector<double, VectFull, Allocator1>& X, 02192 const double beta, 02193 Vector<double, VectFull, Allocator2>& Y) 02194 { 02195 02196 #ifdef SELDON_CHECK_DIMENSIONS 02197 CheckDim(A, X, Y, "MltAdd(alpha, M, X, beta, Y)"); 02198 #endif 02199 02200 cblas_dspmv(CblasRowMajor, CblasUpper, 02201 A.GetM(), alpha, A.GetData(), 02202 X.GetData(), 1, beta, Y.GetData(), 1); 02203 } 02204 02205 02206 /*** RowSymPacked and Uplo ***/ 02207 02208 02209 template <class Prop0, class Allocator0, 02210 class Allocator1, class Allocator2> 02211 void MltAdd(const float alpha, 02212 const SeldonUplo& Uplo, 02213 const Matrix<float, Prop0, RowSymPacked, Allocator0>& A, 02214 const Vector<float, VectFull, Allocator1>& X, 02215 const float beta, 02216 Vector<float, VectFull, Allocator2>& Y) 02217 { 02218 02219 #ifdef SELDON_CHECK_DIMENSIONS 02220 CheckDim(A, X, Y, "MltAdd(alpha, uplo, M, X, beta, Y)"); 02221 #endif 02222 02223 cblas_sspmv(CblasRowMajor, Uplo, 02224 A.GetM(), alpha, A.GetData(), 02225 X.GetData(), 1, beta, Y.GetData(), 1); 02226 } 02227 02228 02229 template <class Prop0, class Allocator0, 02230 class Allocator1, class Allocator2> 02231 void MltAdd(const double alpha, 02232 const SeldonUplo& Uplo, 02233 const Matrix<double, Prop0, RowSymPacked, Allocator0>& A, 02234 const Vector<double, VectFull, Allocator1>& X, 02235 const double beta, 02236 Vector<double, VectFull, Allocator2>& Y) 02237 { 02238 02239 #ifdef SELDON_CHECK_DIMENSIONS 02240 CheckDim(A, X, Y, "MltAdd(alpha, uplo, M, X, beta, Y)"); 02241 #endif 02242 02243 cblas_dspmv(CblasRowMajor, Uplo, 02244 A.GetM(), alpha, A.GetData(), 02245 X.GetData(), 1, beta, Y.GetData(), 1); 02246 } 02247 02248 02249 // MLTADD // 02251 02252 02253 02255 // RANK1UPDATE // 02256 02257 02258 /*** ColMajor ***/ 02259 02260 02261 template <class Prop0, class Allocator0, 02262 class Allocator1, class Allocator2> 02263 void Rank1Update(const float alpha, 02264 const Vector<float, VectFull, Allocator1>& X, 02265 const Vector<float, VectFull, Allocator2>& Y, 02266 Matrix<float, Prop0, ColMajor, Allocator0>& A) 02267 { 02268 02269 #ifdef SELDON_CHECK_DIMENSIONS 02270 CheckDim(SeldonNoTrans, A, Y, X, 02271 "Rank1Update(alpha, X, Y, M)", "X.Y' + M"); 02272 #endif 02273 02274 cblas_sger(CblasColMajor, A.GetM(), A.GetN(), alpha, X.GetData(), 1, 02275 Y.GetData(), 1, A.GetData(), A.GetLD()); 02276 } 02277 02278 02279 template <class Prop0, class Allocator0, 02280 class Allocator1, class Allocator2> 02281 void Rank1Update(const double alpha, 02282 const Vector<double, VectFull, Allocator1>& X, 02283 const Vector<double, VectFull, Allocator2>& Y, 02284 Matrix<double, Prop0, ColMajor, Allocator0>& A) 02285 { 02286 02287 #ifdef SELDON_CHECK_DIMENSIONS 02288 CheckDim(SeldonNoTrans, A, Y, X, 02289 "Rank1Update(alpha, X, Y, M)", "X.Y' + M"); 02290 #endif 02291 02292 cblas_dger(CblasColMajor, A.GetM(), A.GetN(), alpha, X.GetData(), 1, 02293 Y.GetData(), 1, A.GetData(), A.GetLD()); 02294 } 02295 02296 02297 template <class Prop0, class Allocator0, 02298 class Allocator1, class Allocator2> 02299 void Rank1Update(const complex<float> alpha, 02300 const Vector<complex<float>, VectFull, Allocator1>& X, 02301 const Vector<complex<float>, VectFull, Allocator2>& Y, 02302 Matrix<complex<float>, Prop0, ColMajor, Allocator0>& A) 02303 { 02304 02305 #ifdef SELDON_CHECK_DIMENSIONS 02306 CheckDim(SeldonNoTrans, A, Y, X, 02307 "Rank1Update(alpha, X, Y, M)", "X.Y' + M"); 02308 #endif 02309 02310 cblas_cgeru(CblasColMajor, A.GetM(), A.GetN(), 02311 reinterpret_cast<const void*>(&alpha), 02312 reinterpret_cast<const void*>(X.GetData()), 1, 02313 reinterpret_cast<const void*>(Y.GetData()), 1, 02314 reinterpret_cast<void*>(A.GetData()), A.GetLD()); 02315 } 02316 02317 02318 template <class Prop0, class Allocator0, 02319 class Allocator1, class Allocator2> 02320 void Rank1Update(const complex<double> alpha, 02321 const Vector<complex<double>, VectFull, Allocator1>& X, 02322 const Vector<complex<double>, VectFull, Allocator2>& Y, 02323 Matrix<complex<double>, Prop0, ColMajor, Allocator0>& A) 02324 { 02325 02326 #ifdef SELDON_CHECK_DIMENSIONS 02327 CheckDim(SeldonNoTrans, A, Y, X, 02328 "Rank1Update(alpha, X, Y, M)", "X.Y' + M"); 02329 #endif 02330 02331 cblas_zgeru(CblasColMajor, A.GetM(), A.GetN(), 02332 reinterpret_cast<const void*>(&alpha), 02333 reinterpret_cast<const void*>(X.GetData()), 1, 02334 reinterpret_cast<const void*>(Y.GetData()), 1, 02335 reinterpret_cast<void*>(A.GetData()), A.GetLD()); 02336 } 02337 02338 02339 /*** ColMajor and ConjY ***/ 02340 02341 02342 template <class Prop0, class Allocator0, 02343 class Allocator1, class Allocator2> 02344 void Rank1Update(const complex<float> alpha, 02345 const Vector<complex<float>, VectFull, Allocator1>& X, 02346 const SeldonConjugate& ConjY, 02347 const Vector<complex<float>, VectFull, Allocator2>& Y, 02348 Matrix<complex<float>, Prop0, ColMajor, Allocator0>& A) 02349 { 02350 02351 #ifdef SELDON_CHECK_DIMENSIONS 02352 CheckDim(SeldonNoTrans, A, Y, X, 02353 "Rank1Update(alpha, X, status, Y, M)", "X.Y' + M"); 02354 #endif 02355 02356 if (ConjY.Conj()) 02357 cblas_cgerc(CblasColMajor, A.GetM(), A.GetN(), 02358 reinterpret_cast<const void*>(&alpha), 02359 reinterpret_cast<const void*>(X.GetData()), 1, 02360 reinterpret_cast<const void*>(Y.GetData()), 1, 02361 reinterpret_cast<void*>(A.GetData()), A.GetLD()); 02362 else 02363 cblas_cgeru(CblasColMajor, A.GetM(), A.GetN(), 02364 reinterpret_cast<const void*>(&alpha), 02365 reinterpret_cast<const void*>(X.GetData()), 1, 02366 reinterpret_cast<const void*>(Y.GetData()), 1, 02367 reinterpret_cast<void*>(A.GetData()), A.GetLD()); 02368 } 02369 02370 02371 template <class Prop0, class Allocator0, 02372 class Allocator1, class Allocator2> 02373 void Rank1Update(const complex<double> alpha, 02374 const Vector<complex<double>, VectFull, Allocator1>& X, 02375 const SeldonConjugate& ConjY, 02376 const Vector<complex<double>, VectFull, Allocator2>& Y, 02377 Matrix<complex<double>, Prop0, ColMajor, Allocator0>& A) 02378 { 02379 02380 #ifdef SELDON_CHECK_DIMENSIONS 02381 CheckDim(SeldonNoTrans, A, Y, X, 02382 "Rank1Update(alpha, X, status, Y, M)", "X.Y' + M"); 02383 #endif 02384 02385 if (ConjY.Conj()) 02386 cblas_zgerc(CblasColMajor, A.GetM(), A.GetN(), 02387 reinterpret_cast<const void*>(&alpha), 02388 reinterpret_cast<const void*>(X.GetData()), 1, 02389 reinterpret_cast<const void*>(Y.GetData()), 1, 02390 reinterpret_cast<void*>(A.GetData()), A.GetLD()); 02391 else 02392 cblas_zgeru(CblasColMajor, A.GetM(), A.GetN(), 02393 reinterpret_cast<const void*>(&alpha), 02394 reinterpret_cast<const void*>(X.GetData()), 1, 02395 reinterpret_cast<const void*>(Y.GetData()), 1, 02396 reinterpret_cast<void*>(A.GetData()), A.GetLD()); 02397 } 02398 02399 02400 /*** RowMajor ***/ 02401 02402 02403 template <class Prop0, class Allocator0, 02404 class Allocator1, class Allocator2> 02405 void Rank1Update(const float alpha, 02406 const Vector<float, VectFull, Allocator1>& X, 02407 const Vector<float, VectFull, Allocator2>& Y, 02408 Matrix<float, Prop0, RowMajor, Allocator0>& A) 02409 { 02410 02411 #ifdef SELDON_CHECK_DIMENSIONS 02412 CheckDim(SeldonNoTrans, A, Y, X, 02413 "Rank1Update(alpha, X, Y, M)", "X.Y' + M"); 02414 #endif 02415 02416 cblas_sger(CblasRowMajor, A.GetM(), A.GetN(), alpha, X.GetData(), 1, 02417 Y.GetData(), 1, A.GetData(), A.GetLD()); 02418 } 02419 02420 02421 template <class Prop0, class Allocator0, 02422 class Allocator1, class Allocator2> 02423 void Rank1Update(const double alpha, 02424 const Vector<double, VectFull, Allocator1>& X, 02425 const Vector<double, VectFull, Allocator2>& Y, 02426 Matrix<double, Prop0, RowMajor, Allocator0>& A) 02427 { 02428 02429 #ifdef SELDON_CHECK_DIMENSIONS 02430 CheckDim(SeldonNoTrans, A, Y, X, 02431 "Rank1Update(alpha, X, Y, M)", "X.Y' + M"); 02432 #endif 02433 02434 cblas_dger(CblasRowMajor, A.GetM(), A.GetN(), alpha, X.GetData(), 1, 02435 Y.GetData(), 1, A.GetData(), A.GetLD()); 02436 } 02437 02438 02439 template <class Prop0, class Allocator0, 02440 class Allocator1, class Allocator2> 02441 void Rank1Update(const complex<float> alpha, 02442 const Vector<complex<float>, VectFull, Allocator1>& X, 02443 const Vector<complex<float>, VectFull, Allocator2>& Y, 02444 Matrix<complex<float>, Prop0, RowMajor, Allocator0>& A) 02445 { 02446 02447 #ifdef SELDON_CHECK_DIMENSIONS 02448 CheckDim(SeldonNoTrans, A, Y, X, 02449 "Rank1Update(alpha, X, Y, M)", "X.Y' + M"); 02450 #endif 02451 02452 cblas_cgeru(CblasRowMajor, A.GetM(), A.GetN(), 02453 reinterpret_cast<const void*>(&alpha), 02454 reinterpret_cast<const void*>(X.GetData()), 1, 02455 reinterpret_cast<const void*>(Y.GetData()), 1, 02456 reinterpret_cast<void*>(A.GetData()), A.GetLD()); 02457 } 02458 02459 02460 template <class Prop0, class Allocator0, 02461 class Allocator1, class Allocator2> 02462 void Rank1Update(const complex<double> alpha, 02463 const Vector<complex<double>, VectFull, Allocator1>& X, 02464 const Vector<complex<double>, VectFull, Allocator2>& Y, 02465 Matrix<complex<double>, Prop0, RowMajor, Allocator0>& A) 02466 { 02467 02468 #ifdef SELDON_CHECK_DIMENSIONS 02469 CheckDim(SeldonNoTrans, A, Y, X, 02470 "Rank1Update(alpha, X, Y, M)", "X.Y' + M"); 02471 #endif 02472 02473 cblas_zgeru(CblasRowMajor, A.GetM(), A.GetN(), 02474 reinterpret_cast<const void*>(&alpha), 02475 reinterpret_cast<const void*>(X.GetData()), 1, 02476 reinterpret_cast<const void*>(Y.GetData()), 1, 02477 reinterpret_cast<void*>(A.GetData()), A.GetLD()); 02478 } 02479 02480 02481 /*** RowMajor and ConjY ***/ 02482 02483 02484 template <class Prop0, class Allocator0, 02485 class Allocator1, class Allocator2> 02486 void Rank1Update(const complex<float> alpha, 02487 const Vector<complex<float>, VectFull, Allocator1>& X, 02488 const SeldonConjugate& ConjY, 02489 const Vector<complex<float>, VectFull, Allocator2>& Y, 02490 Matrix<complex<float>, Prop0, RowMajor, Allocator0>& A) 02491 { 02492 02493 #ifdef SELDON_CHECK_DIMENSIONS 02494 CheckDim(SeldonNoTrans, A, Y, X, 02495 "Rank1Update(alpha, X, status, Y, M)", "X.Y' + M"); 02496 #endif 02497 02498 if (ConjY.Conj()) 02499 cblas_cgerc(CblasRowMajor, A.GetM(), A.GetN(), 02500 reinterpret_cast<const void*>(&alpha), 02501 reinterpret_cast<const void*>(X.GetData()), 1, 02502 reinterpret_cast<const void*>(Y.GetData()), 1, 02503 reinterpret_cast<void*>(A.GetData()), A.GetLD()); 02504 else 02505 cblas_cgeru(CblasRowMajor, A.GetM(), A.GetN(), 02506 reinterpret_cast<const void*>(&alpha), 02507 reinterpret_cast<const void*>(X.GetData()), 1, 02508 reinterpret_cast<const void*>(Y.GetData()), 1, 02509 reinterpret_cast<void*>(A.GetData()), A.GetLD()); 02510 } 02511 02512 02513 template <class Prop0, class Allocator0, 02514 class Allocator1, class Allocator2> 02515 void Rank1Update(const complex<double> alpha, 02516 const Vector<complex<double>, VectFull, Allocator1>& X, 02517 const SeldonConjugate& ConjY, 02518 const Vector<complex<double>, VectFull, Allocator2>& Y, 02519 Matrix<complex<double>, Prop0, RowMajor, Allocator0>& A) 02520 { 02521 02522 #ifdef SELDON_CHECK_DIMENSIONS 02523 CheckDim(SeldonNoTrans, A, Y, X, 02524 "Rank1Update(alpha, X, status, Y, M)", "X.Y' + M"); 02525 #endif 02526 02527 if (ConjY.Conj()) 02528 cblas_zgerc(CblasRowMajor, A.GetM(), A.GetN(), 02529 reinterpret_cast<const void*>(&alpha), 02530 reinterpret_cast<const void*>(X.GetData()), 1, 02531 reinterpret_cast<const void*>(Y.GetData()), 1, 02532 reinterpret_cast<void*>(A.GetData()), A.GetLD()); 02533 else 02534 cblas_zgeru(CblasRowMajor, A.GetM(), A.GetN(), 02535 reinterpret_cast<const void*>(&alpha), 02536 reinterpret_cast<const void*>(X.GetData()), 1, 02537 reinterpret_cast<const void*>(Y.GetData()), 1, 02538 reinterpret_cast<void*>(A.GetData()), A.GetLD()); 02539 } 02540 02541 02542 /*** ColSymPacked and Upper ***/ 02543 02544 02545 template <class Allocator0, 02546 class Prop1, class Allocator1> 02547 void Rank1Update(const float alpha, 02548 const Vector<float, VectFull, Allocator0>& X, 02549 Matrix<float, Prop1, ColSymPacked, Allocator1>& A) 02550 { 02551 02552 #ifdef SELDON_CHECK_DIMENSIONS 02553 CheckDim(A, X, "Rank1Update(alpha, X, M)", "X.X' + M"); 02554 #endif 02555 02556 cblas_sspr(CblasColMajor, CblasUpper, A.GetM(), alpha, 02557 X.GetData(), 1, A.GetData()); 02558 } 02559 02560 02561 template <class Allocator0, 02562 class Prop1, class Allocator1> 02563 void Rank1Update(const double alpha, 02564 const Vector<double, VectFull, Allocator0>& X, 02565 Matrix<double, Prop1, ColSymPacked, Allocator1>& A) 02566 { 02567 02568 #ifdef SELDON_CHECK_DIMENSIONS 02569 CheckDim(A, X, "Rank1Update(alpha, X, M)", "X.X' + M"); 02570 #endif 02571 02572 cblas_dspr(CblasColMajor, CblasUpper, A.GetM(), alpha, 02573 X.GetData(), 1, A.GetData()); 02574 } 02575 02576 02577 template <class Allocator0, 02578 class Prop1, class Allocator1> 02579 void 02580 Rank1Update(const float alpha, 02581 const Vector<complex<float>, VectFull, Allocator0>& X, 02582 Matrix<complex<float>, Prop1, ColHermPacked, Allocator1>& A) 02583 { 02584 02585 #ifdef SELDON_CHECK_DIMENSIONS 02586 CheckDim(A, X, "Rank1Update(alpha, X, M)", "X.X' + M"); 02587 #endif 02588 02589 cblas_chpr(CblasColMajor, CblasUpper, A.GetM(), alpha, 02590 reinterpret_cast<const void*>(X.GetData()), 1, 02591 reinterpret_cast<void*>(A.GetData())); 02592 } 02593 02594 02595 template <class Allocator0, 02596 class Prop1, class Allocator1> 02597 void 02598 Rank1Update(const double alpha, 02599 const Vector<complex<double>, VectFull, Allocator0>& X, 02600 Matrix<complex<double>, Prop1, ColHermPacked, Allocator1>& A) 02601 { 02602 02603 #ifdef SELDON_CHECK_DIMENSIONS 02604 CheckDim(A, X, "Rank1Update(alpha, X, M)", "X.X' + M"); 02605 #endif 02606 02607 cblas_zhpr(CblasColMajor, CblasUpper, A.GetM(), alpha, 02608 reinterpret_cast<const void*>(X.GetData()), 1, 02609 reinterpret_cast<void*>(A.GetData())); 02610 } 02611 02612 02613 /*** ColSymPacked and Uplo ***/ 02614 02615 02616 template <class Allocator0, 02617 class Prop1, class Allocator1> 02618 void Rank1Update(const float alpha, 02619 const Vector<float, VectFull, Allocator0>& X, 02620 const SeldonUplo& Uplo, 02621 Matrix<float, Prop1, ColSymPacked, Allocator1>& A) 02622 { 02623 02624 #ifdef SELDON_CHECK_DIMENSIONS 02625 CheckDim(A, X, "Rank1Update(alpha, X, uplo, M)", "X.X' + M"); 02626 #endif 02627 02628 cblas_sspr(CblasColMajor, Uplo, A.GetM(), alpha, 02629 X.GetData(), 1, A.GetData()); 02630 } 02631 02632 02633 template <class Allocator0, 02634 class Prop1, class Allocator1> 02635 void Rank1Update(const double alpha, 02636 const Vector<double, VectFull, Allocator0>& X, 02637 const SeldonUplo& Uplo, 02638 Matrix<double, Prop1, ColSymPacked, Allocator1>& A) 02639 { 02640 02641 #ifdef SELDON_CHECK_DIMENSIONS 02642 CheckDim(A, X, "Rank1Update(alpha, X, uplo, M)", "X.X' + M"); 02643 #endif 02644 02645 cblas_dspr(CblasColMajor, Uplo, A.GetM(), alpha, 02646 X.GetData(), 1, A.GetData()); 02647 } 02648 02649 02650 template <class Allocator0, 02651 class Prop1, class Allocator1> 02652 void 02653 Rank1Update(const float alpha, 02654 const Vector<complex<float>, VectFull, Allocator0>& X, 02655 const SeldonUplo& Uplo, 02656 Matrix<complex<float>, Prop1, ColHermPacked, Allocator1>& A) 02657 { 02658 02659 #ifdef SELDON_CHECK_DIMENSIONS 02660 CheckDim(A, X, "Rank1Update(alpha, X, uplo, M)", "X.X' + M"); 02661 #endif 02662 02663 cblas_chpr(CblasColMajor, Uplo, A.GetM(), alpha, 02664 reinterpret_cast<const void*>(X.GetData()), 1, 02665 reinterpret_cast<void*>(A.GetData())); 02666 } 02667 02668 02669 template <class Allocator0, 02670 class Prop1, class Allocator1> 02671 void 02672 Rank1Update(const double alpha, 02673 const Vector<complex<double>, VectFull, Allocator0>& X, 02674 const SeldonUplo& Uplo, 02675 Matrix<complex<double>, Prop1, ColHermPacked, Allocator1>& A) 02676 { 02677 02678 #ifdef SELDON_CHECK_DIMENSIONS 02679 CheckDim(A, X, "Rank1Update(alpha, X, uplo, M)", "X.X' + M"); 02680 #endif 02681 02682 cblas_zhpr(CblasColMajor, Uplo, A.GetM(), alpha, 02683 reinterpret_cast<const void*>(X.GetData()), 1, 02684 reinterpret_cast<void*>(A.GetData())); 02685 } 02686 02687 02688 /*** RowSymPacked and Upper ***/ 02689 02690 02691 template <class Allocator0, 02692 class Prop1, class Allocator1> 02693 void Rank1Update(const float alpha, 02694 const Vector<float, VectFull, Allocator0>& X, 02695 Matrix<float, Prop1, RowSymPacked, Allocator1>& A) 02696 { 02697 02698 #ifdef SELDON_CHECK_DIMENSIONS 02699 CheckDim(A, X, "Rank1Update(alpha, X, M)", "X.X' + M"); 02700 #endif 02701 02702 cblas_sspr(CblasRowMajor, CblasUpper, A.GetM(), alpha, 02703 X.GetData(), 1, A.GetData()); 02704 } 02705 02706 02707 template <class Allocator0, 02708 class Prop1, class Allocator1> 02709 void Rank1Update(const double alpha, 02710 const Vector<double, VectFull, Allocator0>& X, 02711 Matrix<double, Prop1, RowSymPacked, Allocator1>& A) 02712 { 02713 02714 #ifdef SELDON_CHECK_DIMENSIONS 02715 CheckDim(A, X, "Rank1Update(alpha, X, M)", "X.X' + M"); 02716 #endif 02717 02718 cblas_dspr(CblasRowMajor, CblasUpper, A.GetM(), alpha, 02719 X.GetData(), 1, A.GetData()); 02720 } 02721 02722 02723 template <class Allocator0, 02724 class Prop1, class Allocator1> 02725 void 02726 Rank1Update(const float alpha, 02727 const Vector<complex<float>, VectFull, Allocator0>& X, 02728 Matrix<complex<float>, Prop1, RowHermPacked, Allocator1>& A) 02729 { 02730 02731 #ifdef SELDON_CHECK_DIMENSIONS 02732 CheckDim(A, X, "Rank1Update(alpha, X, M)", "X.X' + M"); 02733 #endif 02734 02735 cblas_chpr(CblasRowMajor, CblasUpper, A.GetM(), alpha, 02736 reinterpret_cast<const void*>(X.GetData()), 1, 02737 reinterpret_cast<void*>(A.GetData())); 02738 } 02739 02740 02741 template <class Allocator0, 02742 class Prop1, class Allocator1> 02743 void 02744 Rank1Update(const double alpha, 02745 const Vector<complex<double>, VectFull, Allocator0>& X, 02746 Matrix<complex<double>, Prop1, RowHermPacked, Allocator1>& A) 02747 { 02748 02749 #ifdef SELDON_CHECK_DIMENSIONS 02750 CheckDim(A, X, "Rank1Update(alpha, X, M)", "X.X' + M"); 02751 #endif 02752 02753 cblas_zhpr(CblasRowMajor, CblasUpper, A.GetM(), alpha, 02754 reinterpret_cast<const void*>(X.GetData()), 1, 02755 reinterpret_cast<void*>(A.GetData())); 02756 } 02757 02758 02759 /*** RowSymPacked and Uplo ***/ 02760 02761 02762 template <class Allocator0, 02763 class Prop1, class Allocator1> 02764 void Rank1Update(const float alpha, 02765 const Vector<float, VectFull, Allocator0>& X, 02766 const SeldonUplo& Uplo, 02767 Matrix<float, Prop1, RowSymPacked, Allocator1>& A) 02768 { 02769 02770 #ifdef SELDON_CHECK_DIMENSIONS 02771 CheckDim(A, X, "Rank1Update(alpha, X, uplo, M)", "X.X' + M"); 02772 #endif 02773 02774 cblas_sspr(CblasRowMajor, Uplo, A.GetM(), alpha, 02775 X.GetData(), 1, A.GetData()); 02776 } 02777 02778 02779 template <class Allocator0, 02780 class Prop1, class Allocator1> 02781 void Rank1Update(const double alpha, 02782 const Vector<double, VectFull, Allocator0>& X, 02783 const SeldonUplo& Uplo, 02784 Matrix<double, Prop1, RowSymPacked, Allocator1>& A) 02785 { 02786 02787 #ifdef SELDON_CHECK_DIMENSIONS 02788 CheckDim(A, X, "Rank1Update(alpha, X, uplo, M)", "X.X' + M"); 02789 #endif 02790 02791 cblas_dspr(CblasRowMajor, Uplo, A.GetM(), alpha, 02792 X.GetData(), 1, A.GetData()); 02793 } 02794 02795 02796 template <class Allocator0, 02797 class Prop1, class Allocator1> 02798 void 02799 Rank1Update(const float alpha, 02800 const Vector<complex<float>, VectFull, Allocator0>& X, 02801 const SeldonUplo& Uplo, 02802 Matrix<complex<float>, Prop1, RowHermPacked, Allocator1>& A) 02803 { 02804 02805 #ifdef SELDON_CHECK_DIMENSIONS 02806 CheckDim(A, X, "Rank1Update(alpha, X, uplo, M)", "X.X' + M"); 02807 #endif 02808 02809 cblas_chpr(CblasRowMajor, Uplo, A.GetM(), alpha, 02810 reinterpret_cast<const void*>(X.GetData()), 1, 02811 reinterpret_cast<void*>(A.GetData())); 02812 } 02813 02814 02815 template <class Allocator0, 02816 class Prop1, class Allocator1> 02817 void 02818 Rank1Update(const double alpha, 02819 const Vector<complex<double>, VectFull, Allocator0>& X, 02820 const SeldonUplo& Uplo, 02821 Matrix<complex<double>, Prop1, RowHermPacked, Allocator1>& A) 02822 { 02823 02824 #ifdef SELDON_CHECK_BOUNDS 02825 CheckDim(A, X, "Rank1Update(alpha, X, uplo, M)", "X.X' + M"); 02826 #endif 02827 02828 cblas_zhpr(CblasRowMajor, Uplo, A.GetM(), alpha, 02829 reinterpret_cast<const void*>(X.GetData()), 1, 02830 reinterpret_cast<void*>(A.GetData())); 02831 } 02832 02833 02834 // RANK1UPDATE // 02836 02837 02838 02840 // RANK2UPDATE // 02841 02842 02843 /*** ColSymPacked and Upper ***/ 02844 02845 02846 template <class Allocator0, 02847 class Prop1, class Allocator1, 02848 class Allocator2> 02849 void Rank2Update(const float alpha, 02850 const Vector<float, VectFull, Allocator0>& X, 02851 const Vector<float, VectFull, Allocator2>& Y, 02852 Matrix<float, Prop1, ColSymPacked, Allocator1>& A) 02853 { 02854 02855 #ifdef SELDON_CHECK_BOUNDS 02856 CheckDim(A, X, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M"); 02857 CheckDim(A, Y, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M"); 02858 #endif 02859 02860 cblas_sspr2(CblasColMajor, CblasUpper, A.GetM(), alpha, 02861 X.GetData(), 1, Y.GetData(), 1, A.GetData()); 02862 } 02863 02864 02865 template <class Allocator0, 02866 class Prop1, class Allocator1, 02867 class Allocator2> 02868 void Rank2Update(const double alpha, 02869 const Vector<double, VectFull, Allocator0>& X, 02870 const Vector<double, VectFull, Allocator2>& Y, 02871 Matrix<double, Prop1, ColSymPacked, Allocator1>& A) 02872 { 02873 02874 #ifdef SELDON_CHECK_DIMENSIONS 02875 CheckDim(A, X, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M"); 02876 CheckDim(A, Y, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M"); 02877 #endif 02878 02879 cblas_dspr2(CblasColMajor, CblasUpper, A.GetM(), alpha, 02880 X.GetData(), 1, Y.GetData(), 1, A.GetData()); 02881 } 02882 02883 02884 template <class Allocator0, 02885 class Prop1, class Allocator1, 02886 class Allocator2> 02887 void 02888 Rank2Update(const complex<float> alpha, 02889 const Vector<complex<float>, VectFull, Allocator0>& X, 02890 const Vector<complex<float>, VectFull, Allocator2>& Y, 02891 Matrix<complex<float>, Prop1, ColHermPacked, Allocator1>& A) 02892 { 02893 02894 #ifdef SELDON_CHECK_DIMENSIONS 02895 CheckDim(A, X, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M"); 02896 CheckDim(A, Y, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M"); 02897 #endif 02898 02899 cblas_chpr2(CblasColMajor, CblasUpper, A.GetM(), 02900 reinterpret_cast<const void*>(&alpha), 02901 reinterpret_cast<const void*>(X.GetData()), 1, 02902 reinterpret_cast<const void*>(Y.GetData()), 1, 02903 reinterpret_cast<void*>(A.GetData())); 02904 } 02905 02906 02907 template <class Allocator0, 02908 class Prop1, class Allocator1, 02909 class Allocator2> 02910 void 02911 Rank2Update(const complex<double> alpha, 02912 const Vector<complex<double>, VectFull, Allocator0>& X, 02913 const Vector<complex<double>, VectFull, Allocator2>& Y, 02914 Matrix<complex<double>, Prop1, ColHermPacked, Allocator1>& A) 02915 { 02916 02917 #ifdef SELDON_CHECK_DIMENSIONS 02918 CheckDim(A, X, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M"); 02919 CheckDim(A, Y, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M"); 02920 #endif 02921 02922 cblas_zhpr2(CblasColMajor, CblasUpper, A.GetM(), 02923 reinterpret_cast<const void*>(&alpha), 02924 reinterpret_cast<const void*>(X.GetData()), 1, 02925 reinterpret_cast<const void*>(Y.GetData()), 1, 02926 reinterpret_cast<void*>(A.GetData())); 02927 } 02928 02929 02930 /*** ColSymPacked and Uplo ***/ 02931 02932 02933 template <class Allocator0, 02934 class Prop1, class Allocator1, 02935 class Allocator2> 02936 void Rank2Update(const float alpha, 02937 const Vector<float, VectFull, Allocator0>& X, 02938 const Vector<float, VectFull, Allocator2>& Y, 02939 const SeldonUplo& Uplo, 02940 Matrix<float, Prop1, ColSymPacked, Allocator1>& A) 02941 { 02942 02943 #ifdef SELDON_CHECK_DIMENSIONS 02944 CheckDim(A, X, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M"); 02945 CheckDim(A, Y, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M"); 02946 #endif 02947 02948 cblas_sspr2(CblasColMajor, Uplo, A.GetM(), alpha, 02949 X.GetData(), 1, Y.GetData(), 1, A.GetData()); 02950 } 02951 02952 02953 template <class Allocator0, 02954 class Prop1, class Allocator1, 02955 class Allocator2> 02956 void Rank2Update(const double alpha, 02957 const Vector<double, VectFull, Allocator0>& X, 02958 const Vector<double, VectFull, Allocator2>& Y, 02959 const SeldonUplo& Uplo, 02960 Matrix<double, Prop1, ColSymPacked, Allocator1>& A) 02961 { 02962 02963 #ifdef SELDON_CHECK_DIMENSIONS 02964 CheckDim(A, X, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M"); 02965 CheckDim(A, Y, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M"); 02966 #endif 02967 02968 cblas_dspr2(CblasColMajor, Uplo, A.GetM(), alpha, 02969 X.GetData(), 1, Y.GetData(), 1, A.GetData()); 02970 } 02971 02972 02973 template <class Allocator0, 02974 class Prop1, class Allocator1, 02975 class Allocator2> 02976 void 02977 Rank2Update(const complex<float> alpha, 02978 const Vector<complex<float>, VectFull, Allocator0>& X, 02979 const Vector<complex<float>, VectFull, Allocator2>& Y, 02980 const SeldonUplo& Uplo, 02981 Matrix<complex<float>, Prop1, ColHermPacked, Allocator1>& A) 02982 { 02983 02984 #ifdef SELDON_CHECK_DIMENSIONS 02985 CheckDim(A, X, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M"); 02986 CheckDim(A, Y, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M"); 02987 #endif 02988 02989 cblas_chpr2(CblasColMajor, Uplo, A.GetM(), 02990 reinterpret_cast<const void*>(&alpha), 02991 reinterpret_cast<const void*>(X.GetData()), 1, 02992 reinterpret_cast<const void*>(Y.GetData()), 1, 02993 reinterpret_cast<void*>(A.GetData())); 02994 } 02995 02996 02997 template <class Allocator0, 02998 class Prop1, class Allocator1, 02999 class Allocator2> 03000 void 03001 Rank2Update(const complex<double> alpha, 03002 const Vector<complex<double>, VectFull, Allocator0>& X, 03003 const Vector<complex<double>, VectFull, Allocator2>& Y, 03004 const SeldonUplo& Uplo, 03005 Matrix<complex<double>, Prop1, ColHermPacked, Allocator1>& A) 03006 { 03007 03008 #ifdef SELDON_CHECK_DIMENSIONS 03009 CheckDim(A, X, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M"); 03010 CheckDim(A, Y, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M"); 03011 #endif 03012 03013 cblas_zhpr2(CblasColMajor, Uplo, A.GetM(), 03014 reinterpret_cast<const void*>(&alpha), 03015 reinterpret_cast<const void*>(X.GetData()), 1, 03016 reinterpret_cast<const void*>(Y.GetData()), 1, 03017 reinterpret_cast<void*>(A.GetData())); 03018 } 03019 03020 03021 /*** RowSymPacked and Upper ***/ 03022 03023 03024 template <class Allocator0, 03025 class Prop1, class Allocator1, 03026 class Allocator2> 03027 void Rank2Update(const float alpha, 03028 const Vector<float, VectFull, Allocator0>& X, 03029 const Vector<float, VectFull, Allocator2>& Y, 03030 Matrix<float, Prop1, RowSymPacked, Allocator1>& A) 03031 { 03032 03033 #ifdef SELDON_CHECK_DIMENSIONS 03034 CheckDim(A, X, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M"); 03035 CheckDim(A, Y, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M"); 03036 #endif 03037 03038 cblas_sspr2(CblasRowMajor, CblasUpper, A.GetM(), alpha, 03039 X.GetData(), 1, Y.GetData(), 1, A.GetData()); 03040 } 03041 03042 03043 template <class Allocator0, 03044 class Prop1, class Allocator1, 03045 class Allocator2> 03046 void Rank2Update(const double alpha, 03047 const Vector<double, VectFull, Allocator0>& X, 03048 const Vector<double, VectFull, Allocator2>& Y, 03049 Matrix<double, Prop1, RowSymPacked, Allocator1>& A) 03050 { 03051 03052 #ifdef SELDON_CHECK_DIMENSIONS 03053 CheckDim(A, X, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M"); 03054 CheckDim(A, Y, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M"); 03055 #endif 03056 03057 cblas_dspr2(CblasRowMajor, CblasUpper, A.GetM(), alpha, 03058 X.GetData(), 1, Y.GetData(), 1, A.GetData()); 03059 } 03060 03061 03062 template <class Allocator0, 03063 class Prop1, class Allocator1, 03064 class Allocator2> 03065 void 03066 Rank2Update(const complex<float> alpha, 03067 const Vector<complex<float>, VectFull, Allocator0>& X, 03068 const Vector<complex<float>, VectFull, Allocator2>& Y, 03069 Matrix<complex<float>, Prop1, RowHermPacked, Allocator1>& A) 03070 { 03071 03072 #ifdef SELDON_CHECK_DIMENSIONS 03073 CheckDim(A, X, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M"); 03074 CheckDim(A, Y, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M"); 03075 #endif 03076 03077 cblas_chpr2(CblasRowMajor, CblasUpper, A.GetM(), 03078 reinterpret_cast<const void*>(&alpha), 03079 reinterpret_cast<const void*>(X.GetData()), 1, 03080 reinterpret_cast<const void*>(Y.GetData()), 1, 03081 reinterpret_cast<void*>(A.GetData())); 03082 } 03083 03084 03085 template <class Allocator0, 03086 class Prop1, class Allocator1, 03087 class Allocator2> 03088 void 03089 Rank2Update(const complex<double> alpha, 03090 const Vector<complex<double>, VectFull, Allocator0>& X, 03091 const Vector<complex<double>, VectFull, Allocator2>& Y, 03092 Matrix<complex<double>, Prop1, RowHermPacked, Allocator1>& A) 03093 { 03094 03095 #ifdef SELDON_CHECK_DIMENSIONS 03096 CheckDim(A, X, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M"); 03097 CheckDim(A, Y, "Rank2Update(alpha, X, Y, M)", "X.Y' + Y.X' + M"); 03098 #endif 03099 03100 cblas_zhpr2(CblasRowMajor, CblasUpper, A.GetM(), 03101 reinterpret_cast<const void*>(&alpha), 03102 reinterpret_cast<const void*>(X.GetData()), 1, 03103 reinterpret_cast<const void*>(Y.GetData()), 1, 03104 reinterpret_cast<void*>(A.GetData())); 03105 } 03106 03107 03108 /*** RowSymPacked and Uplo ***/ 03109 03110 03111 template <class Allocator0, 03112 class Prop1, class Allocator1, 03113 class Allocator2> 03114 void Rank2Update(const float alpha, 03115 const Vector<float, VectFull, Allocator0>& X, 03116 const Vector<float, VectFull, Allocator2>& Y, 03117 const SeldonUplo& Uplo, 03118 Matrix<float, Prop1, RowSymPacked, Allocator1>& A) 03119 { 03120 03121 #ifdef SELDON_CHECK_DIMENSIONS 03122 CheckDim(A, X, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M"); 03123 CheckDim(A, Y, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M"); 03124 #endif 03125 03126 cblas_sspr2(CblasRowMajor, Uplo, A.GetM(), alpha, 03127 X.GetData(), 1, Y.GetData(), 1, A.GetData()); 03128 } 03129 03130 03131 template <class Allocator0, 03132 class Prop1, class Allocator1, 03133 class Allocator2> 03134 void Rank2Update(const double alpha, 03135 const Vector<double, VectFull, Allocator0>& X, 03136 const Vector<double, VectFull, Allocator2>& Y, 03137 const SeldonUplo& Uplo, 03138 Matrix<double, Prop1, RowSymPacked, Allocator1>& A) 03139 { 03140 03141 #ifdef SELDON_CHECK_DIMENSIONS 03142 CheckDim(A, X, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M"); 03143 CheckDim(A, Y, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M"); 03144 #endif 03145 03146 cblas_dspr2(CblasRowMajor, Uplo, A.GetM(), alpha, 03147 X.GetData(), 1, Y.GetData(), 1, A.GetData()); 03148 } 03149 03150 03151 template <class Allocator0, 03152 class Prop1, class Allocator1, 03153 class Allocator2> 03154 void 03155 Rank2Update(const complex<float> alpha, 03156 const Vector<complex<float>, VectFull, Allocator0>& X, 03157 const Vector<complex<float>, VectFull, Allocator2>& Y, 03158 const SeldonUplo& Uplo, 03159 Matrix<complex<float>, Prop1, RowHermPacked, Allocator1>& A) 03160 { 03161 03162 #ifdef SELDON_CHECK_DIMENSIONS 03163 CheckDim(A, X, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M"); 03164 CheckDim(A, Y, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M"); 03165 #endif 03166 03167 cblas_chpr2(CblasRowMajor, Uplo, A.GetM(), 03168 reinterpret_cast<const void*>(&alpha), 03169 reinterpret_cast<const void*>(X.GetData()), 1, 03170 reinterpret_cast<const void*>(Y.GetData()), 1, 03171 reinterpret_cast<void*>(A.GetData())); 03172 } 03173 03174 03175 template <class Allocator0, 03176 class Prop1, class Allocator1, 03177 class Allocator2> 03178 void 03179 Rank2Update(const complex<double> alpha, 03180 const Vector<complex<double>, VectFull, Allocator0>& X, 03181 const Vector<complex<double>, VectFull, Allocator2>& Y, 03182 const SeldonUplo& Uplo, 03183 Matrix<complex<double>, Prop1, RowHermPacked, Allocator1>& A) 03184 { 03185 03186 #ifdef SELDON_CHECK_DIMENSIONS 03187 CheckDim(A, X, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M"); 03188 CheckDim(A, Y, "Rank2Update(alpha, X, Y, uplo, M)", "X.Y' + Y.X' + M"); 03189 #endif 03190 03191 cblas_zhpr2(CblasRowMajor, Uplo, A.GetM(), 03192 reinterpret_cast<const void*>(&alpha), 03193 reinterpret_cast<const void*>(X.GetData()), 1, 03194 reinterpret_cast<const void*>(Y.GetData()), 1, 03195 reinterpret_cast<void*>(A.GetData())); 03196 } 03197 03198 03199 // RANK2UPDATE // 03201 03202 03203 03205 // SOLVE // 03206 03207 03208 /*** ColUpTriang, NoTrans and NonUnit ***/ 03209 03210 03211 template <class Prop0, class Allocator0, 03212 class Allocator1> 03213 void Solve(const Matrix<float, Prop0, ColUpTriang, Allocator0>& A, 03214 Vector<float, VectFull, Allocator1>& X) 03215 { 03216 03217 #ifdef SELDON_CHECK_DIMENSIONS 03218 CheckDim(A, X, "Solve(M, X)"); 03219 #endif 03220 03221 cblas_strsv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 03222 A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1); 03223 } 03224 03225 03226 template <class Prop0, class Allocator0, 03227 class Allocator1> 03228 void Solve(const Matrix<double, Prop0, ColUpTriang, Allocator0>& A, 03229 Vector<double, VectFull, Allocator1>& X) 03230 { 03231 03232 #ifdef SELDON_CHECK_DIMENSIONS 03233 CheckDim(A, X, "Solve(M, X)"); 03234 #endif 03235 03236 cblas_dtrsv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 03237 A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1); 03238 } 03239 03240 03241 template <class Prop0, class Allocator0, 03242 class Allocator1> 03243 void 03244 Solve(const Matrix<complex<float>, Prop0, ColUpTriang, Allocator0>& A, 03245 Vector<complex<float>, VectFull, Allocator1>& X) 03246 { 03247 03248 #ifdef SELDON_CHECK_DIMENSIONS 03249 CheckDim(A, X, "Solve(M, X)"); 03250 #endif 03251 03252 cblas_ctrsv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 03253 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 03254 A.GetM(), reinterpret_cast<void*>(X.GetData()), 1); 03255 } 03256 03257 03258 template <class Prop0, class Allocator0, 03259 class Allocator1> 03260 void 03261 Solve(const Matrix<complex<double>, Prop0, 03262 ColUpTriang, Allocator0>& A, 03263 Vector<complex<double>, VectFull, Allocator1>& X) 03264 { 03265 03266 #ifdef SELDON_CHECK_DIMENSIONS 03267 CheckDim(A, X, "Solve(M, X)"); 03268 #endif 03269 03270 cblas_ztrsv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 03271 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 03272 A.GetM(), reinterpret_cast<void*>(X.GetData()), 1); 03273 } 03274 03275 03276 /*** ColUpTriang ***/ 03277 03278 03279 template <class Prop0, class Allocator0, 03280 class Allocator1> 03281 void Solve(const SeldonTranspose& TransA, 03282 const SeldonDiag& DiagA, 03283 const Matrix<float, Prop0, ColUpTriang, Allocator0>& A, 03284 Vector<float, VectFull, Allocator1>& X) 03285 { 03286 03287 #ifdef SELDON_CHECK_DIMENSIONS 03288 CheckDim(A, X, "Solve(status, diag, M, X)"); 03289 #endif 03290 03291 cblas_strsv(CblasColMajor, CblasUpper, TransA, DiagA, 03292 A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1); 03293 } 03294 03295 03296 template <class Prop0, class Allocator0, 03297 class Allocator1> 03298 void Solve(const SeldonTranspose& TransA, 03299 const SeldonDiag& DiagA, 03300 const Matrix<double, Prop0, ColUpTriang, Allocator0>& A, 03301 Vector<double, VectFull, Allocator1>& X) 03302 { 03303 03304 #ifdef SELDON_CHECK_DIMENSIONS 03305 CheckDim(A, X, "Solve(status, diag, M, X)"); 03306 #endif 03307 03308 cblas_dtrsv(CblasColMajor, CblasUpper, TransA, DiagA, 03309 A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1); 03310 } 03311 03312 03313 template <class Prop0, class Allocator0, 03314 class Allocator1> 03315 void 03316 Solve(const SeldonTranspose& TransA, 03317 const SeldonDiag& DiagA, 03318 const Matrix<complex<float>, Prop0, ColUpTriang, Allocator0>& A, 03319 Vector<complex<float>, VectFull, Allocator1>& X) 03320 { 03321 03322 #ifdef SELDON_CHECK_DIMENSIONS 03323 CheckDim(A, X, "Solve(status, diag, M, X)"); 03324 #endif 03325 03326 cblas_ctrsv(CblasColMajor, CblasUpper, TransA, DiagA, 03327 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 03328 A.GetM(), reinterpret_cast<void*>(X.GetData()), 1); 03329 } 03330 03331 03332 template <class Prop0, class Allocator0, 03333 class Allocator1> 03334 void 03335 Solve(const SeldonTranspose& TransA, 03336 const SeldonDiag& DiagA, 03337 const Matrix<complex<double>, Prop0, 03338 ColUpTriang, Allocator0>& A, 03339 Vector<complex<double>, VectFull, Allocator1>& X) 03340 { 03341 03342 #ifdef SELDON_CHECK_DIMENSIONS 03343 CheckDim(A, X, "Solve(status, diag, M, X)"); 03344 #endif 03345 03346 cblas_ztrsv(CblasColMajor, CblasUpper, TransA, DiagA, 03347 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 03348 A.GetM(), reinterpret_cast<void*>(X.GetData()), 1); 03349 } 03350 03351 03352 /*** ColLoTriang, NoTrans and NonUnit ***/ 03353 03354 03355 template <class Prop0, class Allocator0, 03356 class Allocator1> 03357 void Solve(const Matrix<float, Prop0, ColLoTriang, Allocator0>& A, 03358 Vector<float, VectFull, Allocator1>& X) 03359 { 03360 03361 #ifdef SELDON_CHECK_DIMENSIONS 03362 CheckDim(A, X, "Solve(M, X)"); 03363 #endif 03364 03365 cblas_strsv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit, 03366 A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1); 03367 } 03368 03369 03370 template <class Prop0, class Allocator0, 03371 class Allocator1> 03372 void Solve(const Matrix<double, Prop0, ColLoTriang, Allocator0>& A, 03373 Vector<double, VectFull, Allocator1>& X) 03374 { 03375 03376 #ifdef SELDON_CHECK_DIMENSIONS 03377 CheckDim(A, X, "Solve(M, X)"); 03378 #endif 03379 03380 cblas_dtrsv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit, 03381 A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1); 03382 } 03383 03384 03385 template <class Prop0, class Allocator0, 03386 class Allocator1> 03387 void 03388 Solve(const Matrix<complex<float>, Prop0, ColLoTriang, Allocator0>& A, 03389 Vector<complex<float>, VectFull, Allocator1>& X) 03390 { 03391 03392 #ifdef SELDON_CHECK_DIMENSIONS 03393 CheckDim(A, X, "Solve(M, X)"); 03394 #endif 03395 03396 cblas_ctrsv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit, 03397 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 03398 A.GetM(), reinterpret_cast<void*>(X.GetData()), 1); 03399 } 03400 03401 03402 template <class Prop0, class Allocator0, 03403 class Allocator1> 03404 void 03405 Solve(const Matrix<complex<double>, Prop0, 03406 ColLoTriang, Allocator0>& A, 03407 Vector<complex<double>, VectFull, Allocator1>& X) 03408 { 03409 03410 #ifdef SELDON_CHECK_DIMENSIONS 03411 CheckDim(A, X, "Solve(M, X)"); 03412 #endif 03413 03414 cblas_ztrsv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit, 03415 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 03416 A.GetM(), reinterpret_cast<void*>(X.GetData()), 1); 03417 } 03418 03419 03420 /*** ColLoTriang ***/ 03421 03422 03423 template <class Prop0, class Allocator0, 03424 class Allocator1> 03425 void Solve(const SeldonTranspose& TransA, 03426 const SeldonDiag& DiagA, 03427 const Matrix<float, Prop0, ColLoTriang, Allocator0>& A, 03428 Vector<float, VectFull, Allocator1>& X) 03429 { 03430 03431 #ifdef SELDON_CHECK_DIMENSIONS 03432 CheckDim(A, X, "Solve(status, uplo, M, X)"); 03433 #endif 03434 03435 cblas_strsv(CblasColMajor, CblasLower, TransA, DiagA, 03436 A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1); 03437 } 03438 03439 03440 template <class Prop0, class Allocator0, 03441 class Allocator1> 03442 void Solve(const SeldonTranspose& TransA, 03443 const SeldonDiag& DiagA, 03444 const Matrix<double, Prop0, ColLoTriang, Allocator0>& A, 03445 Vector<double, VectFull, Allocator1>& X) 03446 { 03447 03448 #ifdef SELDON_CHECK_DIMENSIONS 03449 CheckDim(A, X, "Solve(status, uplo, M, X)"); 03450 #endif 03451 03452 cblas_dtrsv(CblasColMajor, CblasLower, TransA, DiagA, 03453 A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1); 03454 } 03455 03456 03457 template <class Prop0, class Allocator0, 03458 class Allocator1> 03459 void 03460 Solve(const SeldonTranspose& TransA, 03461 const SeldonDiag& DiagA, 03462 const Matrix<complex<float>, Prop0, ColLoTriang, Allocator0>& A, 03463 Vector<complex<float>, VectFull, Allocator1>& X) 03464 { 03465 03466 #ifdef SELDON_CHECK_DIMENSIONS 03467 CheckDim(A, X, "Solve(status, uplo, M, X)"); 03468 #endif 03469 03470 cblas_ctrsv(CblasColMajor, CblasLower, TransA, DiagA, 03471 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 03472 A.GetM(), reinterpret_cast<void*>(X.GetData()), 1); 03473 } 03474 03475 03476 template <class Prop0, class Allocator0, 03477 class Allocator1> 03478 void 03479 Solve(const SeldonTranspose& TransA, 03480 const SeldonDiag& DiagA, 03481 const Matrix<complex<double>, Prop0, 03482 ColLoTriang, Allocator0>& A, 03483 Vector<complex<double>, VectFull, Allocator1>& X) 03484 { 03485 03486 #ifdef SELDON_CHECK_DIMENSIONS 03487 CheckDim(A, X, "Solve(status, uplo, M, X)"); 03488 #endif 03489 03490 cblas_ztrsv(CblasColMajor, CblasLower, TransA, DiagA, 03491 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 03492 A.GetM(), reinterpret_cast<void*>(X.GetData()), 1); 03493 } 03494 03495 03496 /*** RowUpTriang, NoTrans and NonUnit ***/ 03497 03498 03499 template <class Prop0, class Allocator0, 03500 class Allocator1> 03501 void Solve(const Matrix<float, Prop0, RowUpTriang, Allocator0>& A, 03502 Vector<float, VectFull, Allocator1>& X) 03503 { 03504 03505 #ifdef SELDON_CHECK_DIMENSIONS 03506 CheckDim(A, X, "Solve(M, X)"); 03507 #endif 03508 03509 cblas_strsv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 03510 A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1); 03511 } 03512 03513 03514 template <class Prop0, class Allocator0, 03515 class Allocator1> 03516 void Solve(const Matrix<double, Prop0, RowUpTriang, Allocator0>& A, 03517 Vector<double, VectFull, Allocator1>& X) 03518 { 03519 03520 #ifdef SELDON_CHECK_DIMENSIONS 03521 CheckDim(A, X, "Solve(M, X)"); 03522 #endif 03523 03524 cblas_dtrsv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 03525 A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1); 03526 } 03527 03528 03529 template <class Prop0, class Allocator0, 03530 class Allocator1> 03531 void 03532 Solve(const Matrix<complex<float>, Prop0, RowUpTriang, Allocator0>& A, 03533 Vector<complex<float>, VectFull, Allocator1>& X) 03534 { 03535 03536 #ifdef SELDON_CHECK_DIMENSIONS 03537 CheckDim(A, X, "Solve(M, X)"); 03538 #endif 03539 03540 cblas_ctrsv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 03541 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 03542 A.GetM(), reinterpret_cast<void*>(X.GetData()), 1); 03543 } 03544 03545 03546 template <class Prop0, class Allocator0, 03547 class Allocator1> 03548 void 03549 Solve(const Matrix<complex<double>, Prop0, 03550 RowUpTriang, Allocator0>& A, 03551 Vector<complex<double>, VectFull, Allocator1>& X) 03552 { 03553 03554 #ifdef SELDON_CHECK_DIMENSIONS 03555 CheckDim(A, X, "Solve(M, X)"); 03556 #endif 03557 03558 cblas_ztrsv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 03559 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 03560 A.GetM(), reinterpret_cast<void*>(X.GetData()), 1); 03561 } 03562 03563 03564 /*** RowUpTriang ***/ 03565 03566 03567 template <class Prop0, class Allocator0, 03568 class Allocator1> 03569 void Solve(const SeldonTranspose& TransA, 03570 const SeldonDiag& DiagA, 03571 const Matrix<float, Prop0, RowUpTriang, Allocator0>& A, 03572 Vector<float, VectFull, Allocator1>& X) 03573 { 03574 03575 #ifdef SELDON_CHECK_DIMENSIONS 03576 CheckDim(A, X, "Solve(status, diag, M, X)"); 03577 #endif 03578 03579 cblas_strsv(CblasRowMajor, CblasUpper, TransA, DiagA, 03580 A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1); 03581 } 03582 03583 03584 template <class Prop0, class Allocator0, 03585 class Allocator1> 03586 void Solve(const SeldonTranspose& TransA, 03587 const SeldonDiag& DiagA, 03588 const Matrix<double, Prop0, RowUpTriang, Allocator0>& A, 03589 Vector<double, VectFull, Allocator1>& X) 03590 { 03591 03592 #ifdef SELDON_CHECK_DIMENSIONS 03593 CheckDim(A, X, "Solve(status, diag, M, X)"); 03594 #endif 03595 03596 cblas_dtrsv(CblasRowMajor, CblasUpper, TransA, DiagA, 03597 A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1); 03598 } 03599 03600 03601 template <class Prop0, class Allocator0, 03602 class Allocator1> 03603 void 03604 Solve(const SeldonTranspose& TransA, 03605 const SeldonDiag& DiagA, 03606 const Matrix<complex<float>, Prop0, RowUpTriang, Allocator0>& A, 03607 Vector<complex<float>, VectFull, Allocator1>& X) 03608 { 03609 03610 #ifdef SELDON_CHECK_DIMENSIONS 03611 CheckDim(A, X, "Solve(status, diag, M, X)"); 03612 #endif 03613 03614 cblas_ctrsv(CblasRowMajor, CblasUpper, TransA, DiagA, 03615 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 03616 A.GetM(), reinterpret_cast<void*>(X.GetData()), 1); 03617 } 03618 03619 03620 template <class Prop0, class Allocator0, 03621 class Allocator1> 03622 void 03623 Solve(const SeldonTranspose& TransA, 03624 const SeldonDiag& DiagA, 03625 const Matrix<complex<double>, Prop0, 03626 RowUpTriang, Allocator0>& A, 03627 Vector<complex<double>, VectFull, Allocator1>& X) 03628 { 03629 03630 #ifdef SELDON_CHECK_DIMENSIONS 03631 CheckDim(A, X, "Solve(status, diag, M, X)"); 03632 #endif 03633 03634 cblas_ztrsv(CblasRowMajor, CblasUpper, TransA, DiagA, 03635 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 03636 A.GetM(), reinterpret_cast<void*>(X.GetData()), 1); 03637 } 03638 03639 03640 /*** RowLoTriang, NoTrans and NonUnit ***/ 03641 03642 03643 template <class Prop0, class Allocator0, 03644 class Allocator1> 03645 void Solve(const Matrix<float, Prop0, RowLoTriang, Allocator0>& A, 03646 Vector<float, VectFull, Allocator1>& X) 03647 { 03648 03649 #ifdef SELDON_CHECK_DIMENSIONS 03650 CheckDim(A, X, "Solve(M, X)"); 03651 #endif 03652 03653 cblas_strsv(CblasRowMajor, CblasLower, CblasNoTrans, CblasNonUnit, 03654 A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1); 03655 } 03656 03657 03658 template <class Prop0, class Allocator0, 03659 class Allocator1> 03660 void Solve(const Matrix<double, Prop0, RowLoTriang, Allocator0>& A, 03661 Vector<double, VectFull, Allocator1>& X) 03662 { 03663 03664 #ifdef SELDON_CHECK_DIMENSIONS 03665 CheckDim(A, X, "Solve(M, X)"); 03666 #endif 03667 03668 cblas_dtrsv(CblasRowMajor, CblasLower, CblasNoTrans, CblasNonUnit, 03669 A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1); 03670 } 03671 03672 03673 template <class Prop0, class Allocator0, 03674 class Allocator1> 03675 void 03676 Solve(const Matrix<complex<float>, Prop0, RowLoTriang, Allocator0>& A, 03677 Vector<complex<float>, VectFull, Allocator1>& X) 03678 { 03679 03680 #ifdef SELDON_CHECK_DIMENSIONS 03681 CheckDim(A, X, "Solve(M, X)"); 03682 #endif 03683 03684 cblas_ctrsv(CblasRowMajor, CblasLower, CblasNoTrans, CblasNonUnit, 03685 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 03686 A.GetM(), reinterpret_cast<void*>(X.GetData()), 1); 03687 } 03688 03689 03690 template <class Prop0, class Allocator0, 03691 class Allocator1> 03692 void 03693 Solve(const Matrix<complex<double>, Prop0, 03694 RowLoTriang, Allocator0>& A, 03695 Vector<complex<double>, VectFull, Allocator1>& X) 03696 { 03697 03698 #ifdef SELDON_CHECK_DIMENSIONS 03699 CheckDim(A, X, "Solve(M, X)"); 03700 #endif 03701 03702 cblas_ztrsv(CblasRowMajor, CblasLower, CblasNoTrans, CblasNonUnit, 03703 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 03704 A.GetM(), reinterpret_cast<void*>(X.GetData()), 1); 03705 } 03706 03707 03708 /*** RowLoTriang ***/ 03709 03710 03711 template <class Prop0, class Allocator0, 03712 class Allocator1> 03713 void Solve(const SeldonTranspose& TransA, 03714 const SeldonDiag& DiagA, 03715 const Matrix<float, Prop0, RowLoTriang, Allocator0>& A, 03716 Vector<float, VectFull, Allocator1>& X) 03717 { 03718 03719 #ifdef SELDON_CHECK_DIMENSIONS 03720 CheckDim(A, X, "Solve(status, diag, M, X)"); 03721 #endif 03722 03723 cblas_strsv(CblasRowMajor, CblasLower, TransA, DiagA, 03724 A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1); 03725 } 03726 03727 03728 template <class Prop0, class Allocator0, 03729 class Allocator1> 03730 void Solve(const SeldonTranspose& TransA, 03731 const SeldonDiag& DiagA, 03732 const Matrix<double, Prop0, RowLoTriang, Allocator0>& A, 03733 Vector<double, VectFull, Allocator1>& X) 03734 { 03735 03736 #ifdef SELDON_CHECK_DIMENSIONS 03737 CheckDim(A, X, "Solve(status, diag, M, X)"); 03738 #endif 03739 03740 cblas_dtrsv(CblasRowMajor, CblasLower, TransA, DiagA, 03741 A.GetN(), A.GetData(), A.GetM(), X.GetData(), 1); 03742 } 03743 03744 03745 template <class Prop0, class Allocator0, 03746 class Allocator1> 03747 void 03748 Solve(const SeldonTranspose& TransA, 03749 const SeldonDiag& DiagA, 03750 const Matrix<complex<float>, Prop0, RowLoTriang, Allocator0>& A, 03751 Vector<complex<float>, VectFull, Allocator1>& X) 03752 { 03753 03754 #ifdef SELDON_CHECK_DIMENSIONS 03755 CheckDim(A, X, "Solve(status, diag, M, X)"); 03756 #endif 03757 03758 cblas_ctrsv(CblasRowMajor, CblasLower, TransA, DiagA, 03759 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 03760 A.GetM(), reinterpret_cast<void*>(X.GetData()), 1); 03761 } 03762 03763 03764 template <class Prop0, class Allocator0, 03765 class Allocator1> 03766 void 03767 Solve(const SeldonTranspose& TransA, 03768 const SeldonDiag& DiagA, 03769 const Matrix<complex<double>, Prop0, 03770 RowLoTriang, Allocator0>& A, 03771 Vector<complex<double>, VectFull, Allocator1>& X) 03772 { 03773 03774 #ifdef SELDON_CHECK_DIMENSIONS 03775 CheckDim(A, X, "Solve(status, diag, M, X)"); 03776 #endif 03777 03778 cblas_ztrsv(CblasRowMajor, CblasLower, TransA, DiagA, 03779 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 03780 A.GetM(), reinterpret_cast<void*>(X.GetData()), 1); 03781 } 03782 03783 03784 /*** ColUpTriangPacked, NoTrans and NonUnit ***/ 03785 03786 03787 template <class Prop0, class Allocator0, 03788 class Allocator1> 03789 void Solve(const Matrix<float, Prop0, ColUpTriangPacked, Allocator0>& A, 03790 Vector<float, VectFull, Allocator1>& X) 03791 { 03792 03793 #ifdef SELDON_CHECK_DIMENSIONS 03794 CheckDim(A, X, "Solve(M, X)"); 03795 #endif 03796 03797 cblas_stpsv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 03798 A.GetN(), A.GetData(), X.GetData(), 1); 03799 } 03800 03801 03802 template <class Prop0, class Allocator0, 03803 class Allocator1> 03804 void Solve(const Matrix<double, Prop0, ColUpTriangPacked, Allocator0>& A, 03805 Vector<double, VectFull, Allocator1>& X) 03806 { 03807 03808 #ifdef SELDON_CHECK_DIMENSIONS 03809 CheckDim(A, X, "Solve(M, X)"); 03810 #endif 03811 03812 cblas_dtpsv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 03813 A.GetN(), A.GetData(), X.GetData(), 1); 03814 } 03815 03816 03817 template <class Prop0, class Allocator0, 03818 class Allocator1> 03819 void 03820 Solve(const Matrix<complex<float>, Prop0, ColUpTriangPacked, Allocator0>& A, 03821 Vector<complex<float>, VectFull, Allocator1>& X) 03822 { 03823 03824 #ifdef SELDON_CHECK_DIMENSIONS 03825 CheckDim(A, X, "Solve(M, X)"); 03826 #endif 03827 03828 cblas_ctpsv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 03829 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 03830 reinterpret_cast<void*>(X.GetData()), 1); 03831 } 03832 03833 03834 template <class Prop0, class Allocator0, 03835 class Allocator1> 03836 void 03837 Solve(const Matrix<complex<double>, Prop0, 03838 ColUpTriangPacked, Allocator0>& A, 03839 Vector<complex<double>, VectFull, Allocator1>& X) 03840 { 03841 03842 #ifdef SELDON_CHECK_DIMENSIONS 03843 CheckDim(A, X, "Solve(M, X)"); 03844 #endif 03845 03846 cblas_ztpsv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 03847 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 03848 reinterpret_cast<void*>(X.GetData()), 1); 03849 } 03850 03851 03852 /*** ColUpTriangPacked ***/ 03853 03854 03855 template <class Prop0, class Allocator0, 03856 class Allocator1> 03857 void Solve(const SeldonTranspose& TransA, 03858 const SeldonDiag& DiagA, 03859 const Matrix<float, Prop0, ColUpTriangPacked, Allocator0>& A, 03860 Vector<float, VectFull, Allocator1>& X) 03861 { 03862 03863 #ifdef SELDON_CHECK_DIMENSIONS 03864 CheckDim(A, X, "Solve(status, diag, M, X)"); 03865 #endif 03866 03867 cblas_stpsv(CblasColMajor, CblasUpper, TransA, DiagA, 03868 A.GetN(), A.GetData(), X.GetData(), 1); 03869 } 03870 03871 03872 template <class Prop0, class Allocator0, 03873 class Allocator1> 03874 void Solve(const SeldonTranspose& TransA, 03875 const SeldonDiag& DiagA, 03876 const Matrix<double, Prop0, ColUpTriangPacked, Allocator0>& A, 03877 Vector<double, VectFull, Allocator1>& X) 03878 { 03879 03880 #ifdef SELDON_CHECK_DIMENSIONS 03881 CheckDim(A, X, "Solve(status, diag, M, X)"); 03882 #endif 03883 03884 cblas_dtpsv(CblasColMajor, CblasUpper, TransA, DiagA, 03885 A.GetN(), A.GetData(), X.GetData(), 1); 03886 } 03887 03888 03889 template <class Prop0, class Allocator0, 03890 class Allocator1> 03891 void 03892 Solve(const SeldonTranspose& TransA, 03893 const SeldonDiag& DiagA, 03894 const Matrix<complex<float>, Prop0, ColUpTriangPacked, Allocator0>& A, 03895 Vector<complex<float>, VectFull, Allocator1>& X) 03896 { 03897 03898 #ifdef SELDON_CHECK_DIMENSIONS 03899 CheckDim(A, X, "Solve(status, diag, M, X)"); 03900 #endif 03901 03902 cblas_ctpsv(CblasColMajor, CblasUpper, TransA, DiagA, 03903 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 03904 reinterpret_cast<void*>(X.GetData()), 1); 03905 } 03906 03907 03908 template <class Prop0, class Allocator0, 03909 class Allocator1> 03910 void 03911 Solve(const SeldonTranspose& TransA, 03912 const SeldonDiag& DiagA, 03913 const Matrix<complex<double>, Prop0, 03914 ColUpTriangPacked, Allocator0>& A, 03915 Vector<complex<double>, VectFull, Allocator1>& X) 03916 { 03917 03918 #ifdef SELDON_CHECK_DIMENSIONS 03919 CheckDim(A, X, "Solve(status, diag, M, X)"); 03920 #endif 03921 03922 cblas_ztpsv(CblasColMajor, CblasUpper, TransA, DiagA, 03923 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 03924 reinterpret_cast<void*>(X.GetData()), 1); 03925 } 03926 03927 03928 /*** ColLoTriangPacked, NoTrans and NonUnit ***/ 03929 03930 03931 template <class Prop0, class Allocator0, 03932 class Allocator1> 03933 void Solve(const Matrix<float, Prop0, ColLoTriangPacked, Allocator0>& A, 03934 Vector<float, VectFull, Allocator1>& X) 03935 { 03936 03937 #ifdef SELDON_CHECK_DIMENSIONS 03938 CheckDim(A, X, "Solve(M, X)"); 03939 #endif 03940 03941 cblas_stpsv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit, 03942 A.GetN(), A.GetData(), X.GetData(), 1); 03943 } 03944 03945 03946 template <class Prop0, class Allocator0, 03947 class Allocator1> 03948 void Solve(const Matrix<double, Prop0, ColLoTriangPacked, Allocator0>& A, 03949 Vector<double, VectFull, Allocator1>& X) 03950 { 03951 03952 #ifdef SELDON_CHECK_DIMENSIONS 03953 CheckDim(A, X, "Solve(M, X)"); 03954 #endif 03955 03956 cblas_dtpsv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit, 03957 A.GetN(), A.GetData(), X.GetData(), 1); 03958 } 03959 03960 03961 template <class Prop0, class Allocator0, 03962 class Allocator1> 03963 void 03964 Solve(const Matrix<complex<float>, Prop0, ColLoTriangPacked, Allocator0>& A, 03965 Vector<complex<float>, VectFull, Allocator1>& X) 03966 { 03967 03968 #ifdef SELDON_CHECK_DIMENSIONS 03969 CheckDim(A, X, "Solve(M, X)"); 03970 #endif 03971 03972 cblas_ctpsv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit, 03973 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 03974 reinterpret_cast<void*>(X.GetData()), 1); 03975 } 03976 03977 03978 template <class Prop0, class Allocator0, 03979 class Allocator1> 03980 void 03981 Solve(const Matrix<complex<double>, Prop0, 03982 ColLoTriangPacked, Allocator0>& A, 03983 Vector<complex<double>, VectFull, Allocator1>& X) 03984 { 03985 03986 #ifdef SELDON_CHECK_DIMENSIONS 03987 CheckDim(A, X, "Solve(M, X)"); 03988 #endif 03989 03990 cblas_ztpsv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit, 03991 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 03992 reinterpret_cast<void*>(X.GetData()), 1); 03993 } 03994 03995 03996 /*** ColLoTriangPacked ***/ 03997 03998 03999 template <class Prop0, class Allocator0, 04000 class Allocator1> 04001 void Solve(const SeldonTranspose& TransA, 04002 const SeldonDiag& DiagA, 04003 const Matrix<float, Prop0, ColLoTriangPacked, Allocator0>& A, 04004 Vector<float, VectFull, Allocator1>& X) 04005 { 04006 04007 #ifdef SELDON_CHECK_DIMENSIONS 04008 CheckDim(A, X, "Solve(status, diag, M, X)"); 04009 #endif 04010 04011 cblas_stpsv(CblasColMajor, CblasLower, TransA, DiagA, 04012 A.GetN(), A.GetData(), X.GetData(), 1); 04013 } 04014 04015 04016 template <class Prop0, class Allocator0, 04017 class Allocator1> 04018 void Solve(const SeldonTranspose& TransA, 04019 const SeldonDiag& DiagA, 04020 const Matrix<double, Prop0, ColLoTriangPacked, Allocator0>& A, 04021 Vector<double, VectFull, Allocator1>& X) 04022 { 04023 04024 #ifdef SELDON_CHECK_DIMENSIONS 04025 CheckDim(A, X, "Solve(status, diag, M, X)"); 04026 #endif 04027 04028 cblas_dtpsv(CblasColMajor, CblasLower, TransA, DiagA, 04029 A.GetN(), A.GetData(), X.GetData(), 1); 04030 } 04031 04032 04033 template <class Prop0, class Allocator0, 04034 class Allocator1> 04035 void 04036 Solve(const SeldonTranspose& TransA, 04037 const SeldonDiag& DiagA, 04038 const Matrix<complex<float>, Prop0, ColLoTriangPacked, Allocator0>& A, 04039 Vector<complex<float>, VectFull, Allocator1>& X) 04040 { 04041 04042 #ifdef SELDON_CHECK_DIMENSIONS 04043 CheckDim(A, X, "Solve(status, diag, M, X)"); 04044 #endif 04045 04046 cblas_ctpsv(CblasColMajor, CblasLower, TransA, DiagA, 04047 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 04048 reinterpret_cast<void*>(X.GetData()), 1); 04049 } 04050 04051 04052 template <class Prop0, class Allocator0, 04053 class Allocator1> 04054 void 04055 Solve(const SeldonTranspose& TransA, 04056 const SeldonDiag& DiagA, 04057 const Matrix<complex<double>, Prop0, 04058 ColLoTriangPacked, Allocator0>& A, 04059 Vector<complex<double>, VectFull, Allocator1>& X) 04060 { 04061 04062 #ifdef SELDON_CHECK_DIMENSIONS 04063 CheckDim(A, X, "Solve(status, diag, M, X)"); 04064 #endif 04065 04066 cblas_ztpsv(CblasColMajor, CblasLower, TransA, DiagA, 04067 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 04068 reinterpret_cast<void*>(X.GetData()), 1); 04069 } 04070 04071 04072 /*** RowUpTriangPacked, NoTrans and NonUnit ***/ 04073 04074 04075 template <class Prop0, class Allocator0, 04076 class Allocator1> 04077 void Solve(const Matrix<float, Prop0, RowUpTriangPacked, Allocator0>& A, 04078 Vector<float, VectFull, Allocator1>& X) 04079 { 04080 04081 #ifdef SELDON_CHECK_DIMENSIONS 04082 CheckDim(A, X, "Solve(M, X)"); 04083 #endif 04084 04085 cblas_stpsv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 04086 A.GetN(), A.GetData(), X.GetData(), 1); 04087 } 04088 04089 04090 template <class Prop0, class Allocator0, 04091 class Allocator1> 04092 void Solve(const Matrix<double, Prop0, RowUpTriangPacked, Allocator0>& A, 04093 Vector<double, VectFull, Allocator1>& X) 04094 { 04095 04096 #ifdef SELDON_CHECK_DIMENSIONS 04097 CheckDim(A, X, "Solve(M, X)"); 04098 #endif 04099 04100 cblas_dtpsv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 04101 A.GetN(), A.GetData(), X.GetData(), 1); 04102 } 04103 04104 04105 template <class Prop0, class Allocator0, 04106 class Allocator1> 04107 void 04108 Solve(const Matrix<complex<float>, Prop0, RowUpTriangPacked, Allocator0>& A, 04109 Vector<complex<float>, VectFull, Allocator1>& X) 04110 { 04111 04112 #ifdef SELDON_CHECK_DIMENSIONS 04113 CheckDim(A, X, "Solve(M, X)"); 04114 #endif 04115 04116 cblas_ctpsv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 04117 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 04118 reinterpret_cast<void*>(X.GetData()), 1); 04119 } 04120 04121 04122 template <class Prop0, class Allocator0, 04123 class Allocator1> 04124 void 04125 Solve(const Matrix<complex<double>, Prop0, 04126 RowUpTriangPacked, Allocator0>& A, 04127 Vector<complex<double>, VectFull, Allocator1>& X) 04128 { 04129 04130 #ifdef SELDON_CHECK_DIMENSIONS 04131 CheckDim(A, X, "Solve(M, X)"); 04132 #endif 04133 04134 cblas_ztpsv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 04135 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 04136 reinterpret_cast<void*>(X.GetData()), 1); 04137 } 04138 04139 04140 /*** RowUpTriangPacked ***/ 04141 04142 04143 template <class Prop0, class Allocator0, 04144 class Allocator1> 04145 void Solve(const SeldonTranspose& TransA, 04146 const SeldonDiag& DiagA, 04147 const Matrix<float, Prop0, RowUpTriangPacked, Allocator0>& A, 04148 Vector<float, VectFull, Allocator1>& X) 04149 { 04150 04151 #ifdef SELDON_CHECK_DIMENSIONS 04152 CheckDim(A, X, "Solve(status, diag, M, X)"); 04153 #endif 04154 04155 cblas_stpsv(CblasRowMajor, CblasUpper, TransA, DiagA, 04156 A.GetN(), A.GetData(), X.GetData(), 1); 04157 } 04158 04159 04160 template <class Prop0, class Allocator0, 04161 class Allocator1> 04162 void Solve(const SeldonTranspose& TransA, 04163 const SeldonDiag& DiagA, 04164 const Matrix<double, Prop0, RowUpTriangPacked, Allocator0>& A, 04165 Vector<double, VectFull, Allocator1>& X) 04166 { 04167 04168 #ifdef SELDON_CHECK_DIMENSIONS 04169 CheckDim(A, X, "Solve(status, diag, M, X)"); 04170 #endif 04171 04172 cblas_dtpsv(CblasRowMajor, CblasUpper, TransA, DiagA, 04173 A.GetN(), A.GetData(), X.GetData(), 1); 04174 } 04175 04176 04177 template <class Prop0, class Allocator0, 04178 class Allocator1> 04179 void 04180 Solve(const SeldonTranspose& TransA, 04181 const SeldonDiag& DiagA, 04182 const Matrix<complex<float>, Prop0, RowUpTriangPacked, Allocator0>& A, 04183 Vector<complex<float>, VectFull, Allocator1>& X) 04184 { 04185 04186 #ifdef SELDON_CHECK_DIMENSIONS 04187 CheckDim(A, X, "Solve(status, diag, M, X)"); 04188 #endif 04189 04190 cblas_ctpsv(CblasRowMajor, CblasUpper, TransA, DiagA, 04191 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 04192 reinterpret_cast<void*>(X.GetData()), 1); 04193 } 04194 04195 04196 template <class Prop0, class Allocator0, 04197 class Allocator1> 04198 void 04199 Solve(const SeldonTranspose& TransA, 04200 const SeldonDiag& DiagA, 04201 const Matrix<complex<double>, Prop0, 04202 RowUpTriangPacked, Allocator0>& A, 04203 Vector<complex<double>, VectFull, Allocator1>& X) 04204 { 04205 04206 #ifdef SELDON_CHECK_DIMENSIONS 04207 CheckDim(A, X, "Solve(status, diag, M, X)"); 04208 #endif 04209 04210 cblas_ztpsv(CblasRowMajor, CblasUpper, TransA, DiagA, 04211 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 04212 reinterpret_cast<void*>(X.GetData()), 1); 04213 } 04214 04215 04216 /*** RowLoTriangPacked, NoTrans and NonUnit ***/ 04217 04218 04219 template <class Prop0, class Allocator0, 04220 class Allocator1> 04221 void Solve(const Matrix<float, Prop0, RowLoTriangPacked, Allocator0>& A, 04222 Vector<float, VectFull, Allocator1>& X) 04223 { 04224 04225 #ifdef SELDON_CHECK_DIMENSIONS 04226 CheckDim(A, X, "Solve(M, X)"); 04227 #endif 04228 04229 cblas_stpsv(CblasRowMajor, CblasLower, CblasNoTrans, CblasNonUnit, 04230 A.GetN(), A.GetData(), X.GetData(), 1); 04231 } 04232 04233 04234 template <class Prop0, class Allocator0, 04235 class Allocator1> 04236 void Solve(const Matrix<double, Prop0, RowLoTriangPacked, Allocator0>& A, 04237 Vector<double, VectFull, Allocator1>& X) 04238 { 04239 04240 #ifdef SELDON_CHECK_DIMENSIONS 04241 CheckDim(A, X, "Solve(M, X)"); 04242 #endif 04243 04244 cblas_dtpsv(CblasRowMajor, CblasLower, CblasNoTrans, CblasNonUnit, 04245 A.GetN(), A.GetData(), X.GetData(), 1); 04246 } 04247 04248 04249 template <class Prop0, class Allocator0, 04250 class Allocator1> 04251 void 04252 Solve(const Matrix<complex<float>, Prop0, RowLoTriangPacked, Allocator0>& A, 04253 Vector<complex<float>, VectFull, Allocator1>& X) 04254 { 04255 04256 #ifdef SELDON_CHECK_DIMENSIONS 04257 CheckDim(A, X, "Solve(M, X)"); 04258 #endif 04259 04260 cblas_ctpsv(CblasRowMajor, CblasLower, CblasNoTrans, CblasNonUnit, 04261 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 04262 reinterpret_cast<void*>(X.GetData()), 1); 04263 } 04264 04265 04266 template <class Prop0, class Allocator0, 04267 class Allocator1> 04268 void 04269 Solve(const Matrix<complex<double>, Prop0, 04270 RowLoTriangPacked, Allocator0>& A, 04271 Vector<complex<double>, VectFull, Allocator1>& X) 04272 { 04273 04274 #ifdef SELDON_CHECK_DIMENSIONS 04275 CheckDim(A, X, "Solve(M, X)"); 04276 #endif 04277 04278 cblas_ztpsv(CblasRowMajor, CblasLower, CblasNoTrans, CblasNonUnit, 04279 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 04280 reinterpret_cast<void*>(X.GetData()), 1); 04281 } 04282 04283 04284 /*** RowLoTriangPacked ***/ 04285 04286 04287 template <class Prop0, class Allocator0, 04288 class Allocator1> 04289 void Solve(const SeldonTranspose& TransA, 04290 const SeldonDiag& DiagA, 04291 const Matrix<float, Prop0, RowLoTriangPacked, Allocator0>& A, 04292 Vector<float, VectFull, Allocator1>& X) 04293 { 04294 04295 #ifdef SELDON_CHECK_DIMENSIONS 04296 CheckDim(A, X, "Solve(status, diag, M, X)"); 04297 #endif 04298 04299 cblas_stpsv(CblasRowMajor, CblasLower, TransA, DiagA, 04300 A.GetN(), A.GetData(), X.GetData(), 1); 04301 } 04302 04303 04304 template <class Prop0, class Allocator0, 04305 class Allocator1> 04306 void Solve(const SeldonTranspose& TransA, 04307 const SeldonDiag& DiagA, 04308 const Matrix<double, Prop0, RowLoTriangPacked, Allocator0>& A, 04309 Vector<double, VectFull, Allocator1>& X) 04310 { 04311 04312 #ifdef SELDON_CHECK_DIMENSIONS 04313 CheckDim(A, X, "Solve(status, diag, M, X)"); 04314 #endif 04315 04316 cblas_dtpsv(CblasRowMajor, CblasLower, TransA, DiagA, 04317 A.GetN(), A.GetData(), X.GetData(), 1); 04318 } 04319 04320 04321 template <class Prop0, class Allocator0, 04322 class Allocator1> 04323 void 04324 Solve(const SeldonTranspose& TransA, 04325 const SeldonDiag& DiagA, 04326 const Matrix<complex<float>, Prop0, RowLoTriangPacked, Allocator0>& A, 04327 Vector<complex<float>, VectFull, Allocator1>& X) 04328 { 04329 04330 #ifdef SELDON_CHECK_DIMENSIONS 04331 CheckDim(A, X, "Solve(status, diag, M, X)"); 04332 #endif 04333 04334 cblas_ctpsv(CblasRowMajor, CblasLower, TransA, DiagA, 04335 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 04336 reinterpret_cast<void*>(X.GetData()), 1); 04337 } 04338 04339 04340 template <class Prop0, class Allocator0, 04341 class Allocator1> 04342 void 04343 Solve(const SeldonTranspose& TransA, 04344 const SeldonDiag& DiagA, 04345 const Matrix<complex<double>, Prop0, 04346 RowLoTriangPacked, Allocator0>& A, 04347 Vector<complex<double>, VectFull, Allocator1>& X) 04348 { 04349 04350 #ifdef SELDON_CHECK_DIMENSIONS 04351 CheckDim(A, X, "Solve(status, diag, M, X)"); 04352 #endif 04353 04354 cblas_ztpsv(CblasRowMajor, CblasLower, TransA, DiagA, 04355 A.GetN(), reinterpret_cast<const void*>(A.GetData()), 04356 reinterpret_cast<void*>(X.GetData()), 1); 04357 } 04358 04359 04360 // SOLVE // 04362 04363 04364 } // namespace Seldon. 04365 04366 #define SELDON_FILE_BLAS_2_CXX 04367 #endif