Warning: this documentation for the development version is under construction.
00001 // Copyright (C) 2001-2009 Vivien Mallet 00002 // Copyright (C) 2003-2009 Marc Duruflé 00003 // 00004 // This file is part of the linear-algebra library Seldon, 00005 // http://seldon.sourceforge.net/. 00006 // 00007 // Seldon is free software; you can redistribute it and/or modify it under the 00008 // terms of the GNU Lesser General Public License as published by the Free 00009 // Software Foundation; either version 2.1 of the License, or (at your option) 00010 // any later version. 00011 // 00012 // Seldon is distributed in the hope that it will be useful, but WITHOUT ANY 00013 // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00014 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 00015 // more details. 00016 // 00017 // You should have received a copy of the GNU Lesser General Public License 00018 // along with Seldon. If not, see http://www.gnu.org/licenses/. 00019 00020 00021 #ifndef SELDON_FILE_LAPACK_LINEAREQUATIONS_CXX 00022 00023 00024 #include "Lapack_LinearEquations.hxx" 00025 00026 00027 namespace Seldon 00028 { 00029 00030 00032 // GetLU // 00033 00034 00035 /*** ColMajor ***/ 00036 00037 00038 template <class Prop0, class Allocator0, 00039 class Allocator1> 00040 void GetLU(Matrix<float, Prop0, ColMajor, Allocator0>& A, 00041 Vector<int, VectFull, Allocator1>& P, 00042 LapackInfo& info) 00043 { 00044 int m = A.GetM(); 00045 int n = A.GetN(); 00046 #ifdef SELDON_CHECK_BOUNDS 00047 if ((m <= 0)||(n <= 0)) 00048 throw WrongDim("GetLU", "Provide a non-empty matrix"); 00049 #endif 00050 00051 P.Reallocate(min(m, n)); 00052 sgetrf_(&m, &n, A.GetData(), &m, 00053 P.GetData(), &info.GetInfoRef()); 00054 00055 #ifdef SELDON_LAPACK_CHECK_INFO 00056 if (info.GetInfo() != 0) 00057 throw LapackError(info.GetInfo(), "GetLU", 00058 "An error occured during the factorization."); 00059 #endif 00060 00061 } 00062 00063 00064 template <class Prop0, class Allocator0, 00065 class Allocator1> 00066 void GetLU(Matrix<double, Prop0, ColMajor, Allocator0>& A, 00067 Vector<int, VectFull, Allocator1>& P, 00068 LapackInfo& info) 00069 { 00070 int m = A.GetM(); 00071 int n = A.GetN(); 00072 00073 #ifdef SELDON_CHECK_BOUNDS 00074 if ((m <= 0)||(n <= 0)) 00075 throw WrongDim("GetLU", "Provide a non-empty matrix"); 00076 #endif 00077 00078 P.Reallocate(min(m, n)); 00079 dgetrf_(&m, &n, A.GetData(), &m, 00080 P.GetData(), &info.GetInfoRef()); 00081 00082 #ifdef SELDON_LAPACK_CHECK_INFO 00083 if (info.GetInfo() != 0) 00084 throw LapackError(info.GetInfo(), "GetLU", 00085 "An error occured during the factorization."); 00086 #endif 00087 00088 } 00089 00090 00091 template <class Prop0, class Allocator0, 00092 class Allocator1> 00093 void GetLU(Matrix<complex<float>, Prop0, ColMajor, Allocator0>& A, 00094 Vector<int, VectFull, Allocator1>& P, 00095 LapackInfo& info) 00096 { 00097 int m = A.GetM(); 00098 int n = A.GetN(); 00099 00100 #ifdef SELDON_CHECK_BOUNDS 00101 if ((m <= 0)||(n <= 0)) 00102 throw WrongDim("GetLU", "Provide a non-empty matrix"); 00103 #endif 00104 00105 P.Reallocate(min(m, n)); 00106 cgetrf_(&m, &n, A.GetDataVoid(), &m, 00107 P.GetData(), &info.GetInfoRef()); 00108 00109 #ifdef SELDON_LAPACK_CHECK_INFO 00110 if (info.GetInfo() != 0) 00111 throw LapackError(info.GetInfo(), "GetLU", 00112 "An error occured during the factorization."); 00113 #endif 00114 00115 } 00116 00117 00118 template <class Prop0, class Allocator0, 00119 class Allocator1> 00120 void GetLU(Matrix<complex<double>, Prop0, ColMajor, Allocator0>& A, 00121 Vector<int, VectFull, Allocator1>& P, 00122 LapackInfo& info) 00123 { 00124 int m = A.GetM(); 00125 int n = A.GetN(); 00126 00127 #ifdef SELDON_CHECK_BOUNDS 00128 if ((m <= 0)||(n <= 0)) 00129 throw WrongDim("GetLU", "Provide a non-empty matrix"); 00130 #endif 00131 00132 P.Reallocate(min(m, n)); 00133 zgetrf_(&m, &n, A.GetDataVoid(), &m, 00134 P.GetData(), &info.GetInfoRef()); 00135 00136 #ifdef SELDON_LAPACK_CHECK_INFO 00137 if (info.GetInfo() != 0) 00138 throw LapackError(info.GetInfo(), "GetLU", 00139 "An error occured during the factorization."); 00140 #endif 00141 00142 } 00143 00144 00145 /*** RowMajor ***/ 00146 00147 00148 template <class Prop0, class Allocator0, 00149 class Allocator1> 00150 void GetLU(Matrix<float, Prop0, RowMajor, Allocator0>& A, 00151 Vector<int, VectFull, Allocator1>& P, 00152 LapackInfo& info) 00153 { 00154 int m = A.GetM(); 00155 int n = A.GetN(); 00156 00157 #ifdef SELDON_CHECK_BOUNDS 00158 if ((m <= 0)||(n <= 0)) 00159 throw WrongDim("GetLU", "Provide a non-empty matrix"); 00160 #endif 00161 00162 P.Reallocate(min(m, n)); 00163 sgetrf_(&m, &n, A.GetData(), &m, 00164 P.GetData(), &info.GetInfoRef()); 00165 00166 #ifdef SELDON_LAPACK_CHECK_INFO 00167 if (info.GetInfo() != 0) 00168 throw LapackError(info.GetInfo(), "GetLU", 00169 "An error occured during the factorization."); 00170 #endif 00171 00172 } 00173 00174 00175 template <class Prop0, class Allocator0, 00176 class Allocator1> 00177 void GetLU(Matrix<double, Prop0, RowMajor, Allocator0>& A, 00178 Vector<int, VectFull, Allocator1>& P, 00179 LapackInfo& info) 00180 { 00181 int m = A.GetM(); 00182 int n = A.GetN(); 00183 00184 #ifdef SELDON_CHECK_BOUNDS 00185 if ((m <= 0)||(n <= 0)) 00186 throw WrongDim("GetLU", "Provide a non-empty matrix"); 00187 #endif 00188 00189 P.Reallocate(min(m, n)); 00190 dgetrf_(&m, &n, A.GetData(), &m, 00191 P.GetData(), &info.GetInfoRef()); 00192 00193 #ifdef SELDON_LAPACK_CHECK_INFO 00194 if (info.GetInfo() != 0) 00195 throw LapackError(info.GetInfo(), "GetLU", 00196 "An error occured during the factorization."); 00197 #endif 00198 00199 } 00200 00201 00202 template <class Prop0, class Allocator0, 00203 class Allocator1> 00204 void GetLU(Matrix<complex<float>, Prop0, RowMajor, Allocator0>& A, 00205 Vector<int, VectFull, Allocator1>& P, 00206 LapackInfo& info) 00207 { 00208 int m = A.GetM(); 00209 int n = A.GetN(); 00210 00211 #ifdef SELDON_CHECK_BOUNDS 00212 if ((m <= 0)||(n <= 0)) 00213 throw WrongDim("GetLU", "Provide a non-empty matrix"); 00214 #endif 00215 00216 P.Reallocate(min(m, n)); 00217 cgetrf_(&m, &n, A.GetDataVoid(), &m, 00218 P.GetData(), &info.GetInfoRef()); 00219 00220 #ifdef SELDON_LAPACK_CHECK_INFO 00221 if (info.GetInfo() != 0) 00222 throw LapackError(info.GetInfo(), "GetLU", 00223 "An error occured during the factorization."); 00224 #endif 00225 00226 } 00227 00228 00229 template <class Prop0, class Allocator0, 00230 class Allocator1> 00231 void GetLU(Matrix<complex<double>, Prop0, RowMajor, Allocator0>& A, 00232 Vector<int, VectFull, Allocator1>& P, 00233 LapackInfo& info) 00234 { 00235 int m = A.GetM(); 00236 int n = A.GetN(); 00237 00238 #ifdef SELDON_CHECK_BOUNDS 00239 if ((m <= 0)||(n <= 0)) 00240 throw WrongDim("GetLU", "Provide a non-empty matrix"); 00241 #endif 00242 00243 P.Reallocate(min(m, n)); 00244 zgetrf_(&m, &n, A.GetDataVoid(), &m, 00245 P.GetData(), &info.GetInfoRef()); 00246 00247 #ifdef SELDON_LAPACK_CHECK_INFO 00248 if (info.GetInfo() != 0) 00249 throw LapackError(info.GetInfo(), "GetLU", 00250 "An error occured during the factorization."); 00251 #endif 00252 00253 } 00254 00255 00256 /*** ColSym and Upper ***/ 00257 00258 00259 template <class Prop0, class Allocator0, 00260 class Allocator1> 00261 void GetLU(Matrix<float, Prop0, ColSym, Allocator0>& A, 00262 Vector<int, VectFull, Allocator1>& P, 00263 LapackInfo& info) 00264 { 00265 int m = A.GetM(); 00266 00267 #ifdef SELDON_CHECK_BOUNDS 00268 if (m <= 0) 00269 throw WrongDim("GetLU", "Provide a non-empty matrix"); 00270 #endif 00271 00272 int lwork = m; 00273 char uplo('U'); 00274 Vector<float,VectFull,Allocator0> work(lwork); 00275 P.Reallocate(m); 00276 ssytrf_(&uplo, &m, A.GetData(), &m, 00277 P.GetData(), work.GetData(), &lwork, &info.GetInfoRef()); 00278 00279 #ifdef SELDON_LAPACK_CHECK_INFO 00280 if (info.GetInfo() != 0) 00281 throw LapackError(info.GetInfo(), "GetLU", 00282 "An error occured during the factorization."); 00283 #endif 00284 00285 } 00286 00287 00288 template <class Prop0, class Allocator0, 00289 class Allocator1> 00290 void GetLU(Matrix<double, Prop0, ColSym, Allocator0>& A, 00291 Vector<int, VectFull, Allocator1>& P, 00292 LapackInfo& info) 00293 { 00294 int m = A.GetM(); 00295 int lwork = m; 00296 00297 #ifdef SELDON_CHECK_BOUNDS 00298 if (m <= 0) 00299 throw WrongDim("GetLU", "Provide a non-empty matrix"); 00300 #endif 00301 00302 char uplo('U'); 00303 Vector<double,VectFull,Allocator0> work(lwork); 00304 P.Reallocate(m); 00305 dsytrf_(&uplo, &m, A.GetData(), &m, 00306 P.GetData(), work.GetData(), &lwork, &info.GetInfoRef()); 00307 00308 #ifdef SELDON_LAPACK_CHECK_INFO 00309 if (info.GetInfo() != 0) 00310 throw LapackError(info.GetInfo(), "GetLU", 00311 "An error occured during the factorization."); 00312 #endif 00313 00314 } 00315 00316 00317 template <class Prop0, class Allocator0, 00318 class Allocator1> 00319 void GetLU(Matrix<complex<float>, Prop0, ColSym, Allocator0>& A, 00320 Vector<int, VectFull, Allocator1>& P, 00321 LapackInfo& info) 00322 { 00323 int m = A.GetM(); 00324 int lwork = m; 00325 00326 #ifdef SELDON_CHECK_BOUNDS 00327 if (m <= 0) 00328 throw WrongDim("GetLU", "Provide a non-empty matrix"); 00329 #endif 00330 00331 char uplo('U'); 00332 Vector<complex<float>,VectFull,Allocator0> work(lwork); 00333 P.Reallocate(m); 00334 csytrf_(&uplo, &m, A.GetDataVoid(), &m, 00335 P.GetData(), work.GetDataVoid(), 00336 &lwork, &info.GetInfoRef()); 00337 00338 #ifdef SELDON_LAPACK_CHECK_INFO 00339 if (info.GetInfo() != 0) 00340 throw LapackError(info.GetInfo(), "GetLU", 00341 "An error occured during the factorization."); 00342 #endif 00343 00344 } 00345 00346 00347 template <class Prop0, class Allocator0, 00348 class Allocator1> 00349 void GetLU(Matrix<complex<double>, Prop0, ColSym, Allocator0>& A, 00350 Vector<int, VectFull, Allocator1>& P, 00351 LapackInfo& info) 00352 { 00353 int m = A.GetM(); 00354 int lwork = m; 00355 00356 #ifdef SELDON_CHECK_BOUNDS 00357 if (m <= 0) 00358 throw WrongDim("GetLU", "Provide a non-empty matrix"); 00359 #endif 00360 00361 char uplo('U'); 00362 Vector<complex<double>,VectFull,Allocator0> work(lwork); 00363 P.Reallocate(m); 00364 zsytrf_(&uplo, &m, A.GetDataVoid(), &m, 00365 P.GetData(), work.GetDataVoid(), 00366 &lwork, &info.GetInfoRef()); 00367 00368 #ifdef SELDON_LAPACK_CHECK_INFO 00369 if (info.GetInfo() != 0) 00370 throw LapackError(info.GetInfo(), "GetLU", 00371 "An error occured during the factorization."); 00372 #endif 00373 00374 } 00375 00376 00377 /*** ColSymPacked and Upper ***/ 00378 00379 00380 template <class Prop0, class Allocator0, 00381 class Allocator1> 00382 void GetLU(Matrix<float, Prop0, ColSymPacked, Allocator0>& A, 00383 Vector<int, VectFull, Allocator1>& P, 00384 LapackInfo& info) 00385 { 00386 int m = A.GetM(); 00387 00388 #ifdef SELDON_CHECK_BOUNDS 00389 if (m <= 0) 00390 throw WrongDim("GetLU", "Provide a non-empty matrix"); 00391 #endif 00392 00393 char uplo('U'); 00394 P.Reallocate(m); 00395 ssptrf_(&uplo, &m, A.GetData(), 00396 P.GetData(), &info.GetInfoRef()); 00397 00398 #ifdef SELDON_LAPACK_CHECK_INFO 00399 if (info.GetInfo() != 0) 00400 throw LapackError(info.GetInfo(), "GetLU", 00401 "An error occured during the factorization."); 00402 #endif 00403 00404 } 00405 00406 00407 template <class Prop0, class Allocator0, 00408 class Allocator1> 00409 void GetLU(Matrix<double, Prop0, ColSymPacked, Allocator0>& A, 00410 Vector<int, VectFull, Allocator1>& P, 00411 LapackInfo& info) 00412 { 00413 int m = A.GetM(); 00414 00415 #ifdef SELDON_CHECK_BOUNDS 00416 if (m <= 0) 00417 throw WrongDim("GetLU", "Provide a non-empty matrix"); 00418 #endif 00419 00420 char uplo('U'); 00421 P.Reallocate(m); 00422 dsptrf_(&uplo, &m, A.GetData(), 00423 P.GetData(), &info.GetInfoRef()); 00424 00425 #ifdef SELDON_LAPACK_CHECK_INFO 00426 if (info.GetInfo() != 0) 00427 throw LapackError(info.GetInfo(), "GetLU", 00428 "An error occured during the factorization."); 00429 #endif 00430 00431 } 00432 00433 00434 template <class Prop0, class Allocator0, 00435 class Allocator1> 00436 void GetLU(Matrix<complex<float>, Prop0, ColSymPacked, Allocator0>& A, 00437 Vector<int, VectFull, Allocator1>& P, 00438 LapackInfo& info) 00439 { 00440 int m = A.GetM(); 00441 00442 #ifdef SELDON_CHECK_BOUNDS 00443 if (m <= 0) 00444 throw WrongDim("GetLU", "Provide a non-empty matrix"); 00445 #endif 00446 00447 char uplo('U'); 00448 P.Reallocate(m); 00449 csptrf_(&uplo, &m, A.GetDataVoid(), 00450 P.GetData(), &info.GetInfoRef()); 00451 00452 #ifdef SELDON_LAPACK_CHECK_INFO 00453 if (info.GetInfo() != 0) 00454 throw LapackError(info.GetInfo(), "GetLU", 00455 "An error occured during the factorization."); 00456 #endif 00457 00458 } 00459 00460 00461 template <class Prop0, class Allocator0, 00462 class Allocator1> 00463 void GetLU(Matrix<complex<double>, Prop0, ColSymPacked, Allocator0>& A, 00464 Vector<int, VectFull, Allocator1>& P, 00465 LapackInfo& info) 00466 { 00467 int m = A.GetM(); 00468 00469 #ifdef SELDON_CHECK_BOUNDS 00470 if (m <= 0) 00471 throw WrongDim("GetLU", "Provide a non-empty matrix"); 00472 #endif 00473 00474 char uplo('U'); 00475 P.Reallocate(m); 00476 zsptrf_(&uplo, &m, A.GetDataVoid(), 00477 P.GetData(), &info.GetInfoRef()); 00478 00479 #ifdef SELDON_LAPACK_CHECK_INFO 00480 if (info.GetInfo() != 0) 00481 throw LapackError(info.GetInfo(), "GetLU", 00482 "An error occured during the factorization."); 00483 #endif 00484 00485 } 00486 00487 00488 /*** ColSymPacked and Uplo ***/ 00489 00490 00491 template <class Prop0, class Allocator0, 00492 class Allocator1> 00493 void GetLU(SeldonUplo Uplo, 00494 Matrix<float, Prop0, ColSymPacked, Allocator0>& A, 00495 Vector<int, VectFull, Allocator1>& P, 00496 LapackInfo& info) 00497 { 00498 int m = A.GetM(); 00499 00500 #ifdef SELDON_CHECK_BOUNDS 00501 if (m <= 0) 00502 throw WrongDim("GetLU", "Provide a non-empty matrix"); 00503 #endif 00504 00505 char uplo(Uplo); 00506 P.Reallocate(m); 00507 ssptrf_(&uplo, &m, A.GetData(), 00508 P.GetData(), &info.GetInfoRef()); 00509 00510 #ifdef SELDON_LAPACK_CHECK_INFO 00511 if (info.GetInfo() != 0) 00512 throw LapackError(info.GetInfo(), "GetLU", 00513 "An error occured during the factorization."); 00514 #endif 00515 00516 } 00517 00518 00519 template <class Prop0, class Allocator0, 00520 class Allocator1> 00521 void GetLU(SeldonUplo Uplo, 00522 Matrix<double, Prop0, ColSymPacked, Allocator0>& A, 00523 Vector<int, VectFull, Allocator1>& P, 00524 LapackInfo& info) 00525 { 00526 int m = A.GetM(); 00527 00528 #ifdef SELDON_CHECK_BOUNDS 00529 if (m <= 0) 00530 throw WrongDim("GetLU", "Provide a non-empty matrix"); 00531 #endif 00532 00533 char uplo(Uplo); 00534 P.Reallocate(m); 00535 dsptrf_(&uplo, &m, A.GetData(), 00536 P.GetData(), &info.GetInfoRef()); 00537 00538 #ifdef SELDON_LAPACK_CHECK_INFO 00539 if (info.GetInfo() != 0) 00540 throw LapackError(info.GetInfo(), "GetLU", 00541 "An error occured during the factorization."); 00542 #endif 00543 00544 } 00545 00546 00547 template <class Prop0, class Allocator0, 00548 class Allocator1> 00549 void GetLU(SeldonUplo Uplo, 00550 Matrix<complex<float>, Prop0, ColSymPacked, Allocator0>& A, 00551 Vector<int, VectFull, Allocator1>& P, 00552 LapackInfo& info) 00553 { 00554 int m = A.GetM(); 00555 00556 #ifdef SELDON_CHECK_BOUNDS 00557 if (m <= 0) 00558 throw WrongDim("GetLU", "Provide a non-empty matrix"); 00559 #endif 00560 00561 char uplo(Uplo); 00562 P.Reallocate(m); 00563 csptrf_(&uplo, &m, A.GetDataVoid(), 00564 P.GetData(), &info.GetInfoRef()); 00565 00566 #ifdef SELDON_LAPACK_CHECK_INFO 00567 if (info.GetInfo() != 0) 00568 throw LapackError(info.GetInfo(), "GetLU", 00569 "An error occured during the factorization."); 00570 #endif 00571 00572 } 00573 00574 00575 template <class Prop0, class Allocator0, 00576 class Allocator1> 00577 void GetLU(SeldonUplo Uplo, 00578 Matrix<complex<double>, Prop0, ColSymPacked, Allocator0>& A, 00579 Vector<int, VectFull, Allocator1>& P, 00580 LapackInfo& info) 00581 { 00582 int m = A.GetM(); 00583 00584 #ifdef SELDON_CHECK_BOUNDS 00585 if (m <= 0) 00586 throw WrongDim("GetLU", "Provide a non-empty matrix"); 00587 #endif 00588 00589 char uplo(Uplo); 00590 P.Reallocate(m); 00591 zsptrf_(&uplo, &m, A.GetDataVoid(), 00592 P.GetData(), &info.GetInfoRef()); 00593 00594 #ifdef SELDON_LAPACK_CHECK_INFO 00595 if (info.GetInfo() != 0) 00596 throw LapackError(info.GetInfo(), "GetLU", 00597 "An error occured during the factorization."); 00598 #endif 00599 00600 } 00601 00602 00603 /*** RowSym and Upper ***/ 00604 00605 00606 template <class Prop0, class Allocator0, 00607 class Allocator1> 00608 void GetLU(Matrix<float, Prop0, RowSym, Allocator0>& A, 00609 Vector<int, VectFull, Allocator1>& P, 00610 LapackInfo& info) 00611 { 00612 int m = A.GetM(); 00613 00614 #ifdef SELDON_CHECK_BOUNDS 00615 if (m <= 0) 00616 throw WrongDim("GetLU", "Provide a non-empty matrix"); 00617 #endif 00618 00619 int lwork = m; 00620 char uplo('L'); 00621 Vector<float, VectFull, Allocator0> work(lwork); 00622 P.Reallocate(m); 00623 ssytrf_(&uplo, &m, A.GetData(), &m, 00624 P.GetData(), work.GetData(), &lwork, &info.GetInfoRef()); 00625 00626 #ifdef SELDON_LAPACK_CHECK_INFO 00627 if (info.GetInfo() != 0) 00628 throw LapackError(info.GetInfo(), "GetLU", 00629 "An error occured during the factorization."); 00630 #endif 00631 00632 } 00633 00634 00635 template <class Prop0, class Allocator0, 00636 class Allocator1> 00637 void GetLU(Matrix<double, Prop0, RowSym, Allocator0>& A, 00638 Vector<int, VectFull, Allocator1>& P, 00639 LapackInfo& info) 00640 { 00641 int m = A.GetM(); 00642 00643 #ifdef SELDON_CHECK_BOUNDS 00644 if (m <= 0) 00645 throw WrongDim("GetLU", "Provide a non-empty matrix"); 00646 #endif 00647 00648 int lwork = m; 00649 char uplo('L'); 00650 Vector<double, VectFull, Allocator0> work(lwork); 00651 P.Reallocate(m); 00652 dsytrf_(&uplo, &m, A.GetData(), &m, 00653 P.GetData(), work.GetData(), &lwork, &info.GetInfoRef()); 00654 00655 #ifdef SELDON_LAPACK_CHECK_INFO 00656 if (info.GetInfo() != 0) 00657 throw LapackError(info.GetInfo(), "GetLU", 00658 "An error occured during the factorization."); 00659 #endif 00660 00661 } 00662 00663 00664 template <class Prop0, class Allocator0, 00665 class Allocator1> 00666 void GetLU(Matrix<complex<float>, Prop0, RowSym, Allocator0>& A, 00667 Vector<int, VectFull, Allocator1>& P, 00668 LapackInfo& info) 00669 { 00670 int m = A.GetM(); 00671 00672 #ifdef SELDON_CHECK_BOUNDS 00673 if (m <= 0) 00674 throw WrongDim("GetLU", "Provide a non-empty matrix"); 00675 #endif 00676 00677 int lwork = m; 00678 char uplo('L'); 00679 Vector<complex<float>, VectFull, Allocator0> work(lwork); 00680 P.Reallocate(m); 00681 csytrf_(&uplo, &m, A.GetDataVoid(), &m, 00682 P.GetData(), work.GetDataVoid(), 00683 &lwork, &info.GetInfoRef()); 00684 00685 #ifdef SELDON_LAPACK_CHECK_INFO 00686 if (info.GetInfo() != 0) 00687 throw LapackError(info.GetInfo(), "GetLU", 00688 "An error occured during the factorization."); 00689 #endif 00690 00691 } 00692 00693 00694 template <class Prop0, class Allocator0, 00695 class Allocator1> 00696 void GetLU(Matrix<complex<double>, Prop0, RowSym, Allocator0>& A, 00697 Vector<int, VectFull, Allocator1>& P, 00698 LapackInfo& info) 00699 { 00700 int m = A.GetM(); 00701 00702 #ifdef SELDON_CHECK_BOUNDS 00703 if (m <= 0) 00704 throw WrongDim("GetLU", "Provide a non-empty matrix"); 00705 #endif 00706 00707 int lwork = m; 00708 char uplo('L'); 00709 Vector<complex<double>, VectFull, Allocator0> work(lwork); 00710 P.Reallocate(m); 00711 zsytrf_(&uplo, &m, A.GetDataVoid(), &m, 00712 P.GetData(), work.GetDataVoid(), 00713 &lwork, &info.GetInfoRef()); 00714 00715 #ifdef SELDON_LAPACK_CHECK_INFO 00716 if (info.GetInfo() != 0) 00717 throw LapackError(info.GetInfo(), "GetLU", 00718 "An error occured during the factorization."); 00719 #endif 00720 00721 } 00722 00723 00724 /*** RowSymPacked and Upper ***/ 00725 00726 00727 template <class Prop0, class Allocator0, 00728 class Allocator1> 00729 void GetLU(Matrix<float, Prop0, RowSymPacked, Allocator0>& A, 00730 Vector<int, VectFull, Allocator1>& P, 00731 LapackInfo& info) 00732 { 00733 int m = A.GetM(); 00734 00735 #ifdef SELDON_CHECK_BOUNDS 00736 if (m <= 0) 00737 throw WrongDim("GetLU", "Provide a non-empty matrix"); 00738 #endif 00739 00740 char uplo('L'); 00741 P.Reallocate(m); 00742 ssptrf_(&uplo, &m, A.GetData(), 00743 P.GetData(), &info.GetInfoRef()); 00744 00745 #ifdef SELDON_LAPACK_CHECK_INFO 00746 if (info.GetInfo() != 0) 00747 throw LapackError(info.GetInfo(), "GetLU", 00748 "An error occured during the factorization."); 00749 #endif 00750 00751 } 00752 00753 00754 template <class Prop0, class Allocator0, 00755 class Allocator1> 00756 void GetLU(Matrix<double, Prop0, RowSymPacked, Allocator0>& A, 00757 Vector<int, VectFull, Allocator1>& P, 00758 LapackInfo& info) 00759 { 00760 int m = A.GetM(); 00761 00762 #ifdef SELDON_CHECK_BOUNDS 00763 if (m <= 0) 00764 throw WrongDim("GetLU", "Provide a non-empty matrix"); 00765 #endif 00766 00767 char uplo('L'); 00768 P.Reallocate(m); 00769 dsptrf_(&uplo, &m, A.GetData(), 00770 P.GetData(), &info.GetInfoRef()); 00771 00772 #ifdef SELDON_LAPACK_CHECK_INFO 00773 if (info.GetInfo() != 0) 00774 throw LapackError(info.GetInfo(), "GetLU", 00775 "An error occured during the factorization."); 00776 #endif 00777 00778 } 00779 00780 00781 template <class Prop0, class Allocator0, 00782 class Allocator1> 00783 void GetLU(Matrix<complex<float>, Prop0, RowSymPacked, Allocator0>& A, 00784 Vector<int, VectFull, Allocator1>& P, 00785 LapackInfo& info) 00786 { 00787 int m = A.GetM(); 00788 00789 #ifdef SELDON_CHECK_BOUNDS 00790 if (m <= 0) 00791 throw WrongDim("GetLU", "Provide a non-empty matrix"); 00792 #endif 00793 00794 char uplo('L'); 00795 P.Reallocate(m); 00796 csptrf_(&uplo, &m, A.GetDataVoid(), 00797 P.GetData(), &info.GetInfoRef()); 00798 00799 #ifdef SELDON_LAPACK_CHECK_INFO 00800 if (info.GetInfo() != 0) 00801 throw LapackError(info.GetInfo(), "GetLU", 00802 "An error occured during the factorization."); 00803 #endif 00804 00805 } 00806 00807 00808 template <class Prop0, class Allocator0, 00809 class Allocator1> 00810 void GetLU(Matrix<complex<double>, Prop0, RowSymPacked, Allocator0>& A, 00811 Vector<int, VectFull, Allocator1>& P, 00812 LapackInfo& info) 00813 { 00814 int m = A.GetM(); 00815 00816 #ifdef SELDON_CHECK_BOUNDS 00817 if (m <= 0) 00818 throw WrongDim("GetLU", "Provide a non-empty matrix"); 00819 #endif 00820 00821 char uplo('L'); 00822 P.Reallocate(m); 00823 zsptrf_(&uplo, &m, A.GetDataVoid(), 00824 P.GetData(), &info.GetInfoRef()); 00825 00826 #ifdef SELDON_LAPACK_CHECK_INFO 00827 if (info.GetInfo() != 0) 00828 throw LapackError(info.GetInfo(), "GetLU", 00829 "An error occured during the factorization."); 00830 #endif 00831 00832 } 00833 00834 00835 /*** RowSymPacked and Uplo ***/ 00836 00837 00838 template <class Prop0, class Allocator0, 00839 class Allocator1> 00840 void GetLU(SeldonUplo Uplo, 00841 Matrix<float, Prop0, RowSymPacked, Allocator0>& A, 00842 Vector<int, VectFull, Allocator1>& P, 00843 LapackInfo& info) 00844 { 00845 int m = A.GetM(); 00846 00847 #ifdef SELDON_CHECK_BOUNDS 00848 if (m <= 0) 00849 throw WrongDim("GetLU", "Provide a non-empty matrix"); 00850 #endif 00851 00852 char uplo(Uplo.RevChar()); 00853 P.Reallocate(m); 00854 ssptrf_(&uplo, &m, A.GetData(), 00855 P.GetData(), &info.GetInfoRef()); 00856 00857 #ifdef SELDON_LAPACK_CHECK_INFO 00858 if (info.GetInfo() != 0) 00859 throw LapackError(info.GetInfo(), "GetLU", 00860 "An error occured during the factorization."); 00861 #endif 00862 00863 } 00864 00865 00866 template <class Prop0, class Allocator0, 00867 class Allocator1> 00868 void GetLU(SeldonUplo Uplo, 00869 Matrix<double, Prop0, RowSymPacked, Allocator0>& A, 00870 Vector<int, VectFull, Allocator1>& P, 00871 LapackInfo& info) 00872 { 00873 int m = A.GetM(); 00874 00875 #ifdef SELDON_CHECK_BOUNDS 00876 if (m <= 0) 00877 throw WrongDim("GetLU", "Provide a non-empty matrix"); 00878 #endif 00879 00880 char uplo(Uplo.RevChar()); 00881 P.Reallocate(m); 00882 dsptrf_(&uplo, &m, A.GetData(), 00883 P.GetData(), &info.GetInfoRef()); 00884 00885 #ifdef SELDON_LAPACK_CHECK_INFO 00886 if (info.GetInfo() != 0) 00887 throw LapackError(info.GetInfo(), "GetLU", 00888 "An error occured during the factorization."); 00889 #endif 00890 00891 } 00892 00893 00894 template <class Prop0, class Allocator0, 00895 class Allocator1> 00896 void GetLU(SeldonUplo Uplo, 00897 Matrix<complex<float>, Prop0, RowSymPacked, Allocator0>& A, 00898 Vector<int, VectFull, Allocator1>& P, 00899 LapackInfo& info) 00900 { 00901 int m = A.GetM(); 00902 00903 #ifdef SELDON_CHECK_BOUNDS 00904 if (m <= 0) 00905 throw WrongDim("GetLU", "Provide a non-empty matrix"); 00906 #endif 00907 00908 char uplo(Uplo.RevChar()); 00909 P.Reallocate(m); 00910 csptrf_(&uplo, &m, A.GetDataVoid(), 00911 P.GetData(), &info.GetInfoRef()); 00912 00913 #ifdef SELDON_LAPACK_CHECK_INFO 00914 if (info.GetInfo() != 0) 00915 throw LapackError(info.GetInfo(), "GetLU", 00916 "An error occured during the factorization."); 00917 #endif 00918 00919 } 00920 00921 00922 template <class Prop0, class Allocator0, 00923 class Allocator1> 00924 void GetLU(SeldonUplo Uplo, 00925 Matrix<complex<double>, Prop0, RowSymPacked, Allocator0>& A, 00926 Vector<int, VectFull, Allocator1>& P, 00927 LapackInfo& info) 00928 { 00929 int m = A.GetM(); 00930 00931 #ifdef SELDON_CHECK_BOUNDS 00932 if (m <= 0) 00933 throw WrongDim("GetLU", "Provide a non-empty matrix"); 00934 #endif 00935 00936 char uplo(Uplo.RevChar()); 00937 P.Reallocate(m); 00938 zsptrf_(&uplo, &m, A.GetDataVoid(), 00939 P.GetData(), &info.GetInfoRef()); 00940 00941 #ifdef SELDON_LAPACK_CHECK_INFO 00942 if (info.GetInfo() != 0) 00943 throw LapackError(info.GetInfo(), "GetLU", 00944 "An error occured during the factorization."); 00945 #endif 00946 00947 } 00948 00949 00950 /*** ColHerm and Upper ***/ 00951 00952 00953 template <class Prop0, class Allocator0, 00954 class Allocator1> 00955 void GetLU(Matrix<complex<float>, Prop0, ColHerm, Allocator0>& A, 00956 Vector<int, VectFull, Allocator1>& P, 00957 LapackInfo& info) 00958 { 00959 int m = A.GetM(); 00960 00961 #ifdef SELDON_CHECK_BOUNDS 00962 if (m <= 0) 00963 throw WrongDim("GetLU", "Provide a non-empty matrix"); 00964 #endif 00965 00966 int lwork = m; 00967 char uplo('U'); 00968 Vector<complex<float>, VectFull, Allocator0> work(lwork); 00969 P.Reallocate(m); 00970 chetrf_(&uplo, &m, A.GetDataVoid(), &m, 00971 P.GetData(), work.GetDataVoid(), 00972 &lwork, &info.GetInfoRef()); 00973 00974 #ifdef SELDON_LAPACK_CHECK_INFO 00975 if (info.GetInfo() != 0) 00976 throw LapackError(info.GetInfo(), "GetLU", 00977 "An error occured during the factorization."); 00978 #endif 00979 00980 } 00981 00982 00983 template <class Prop0, class Allocator0, 00984 class Allocator1> 00985 void GetLU(Matrix<complex<double>, Prop0, ColHerm, Allocator0>& A, 00986 Vector<int, VectFull, Allocator1>& P, 00987 LapackInfo& info) 00988 { 00989 int m = A.GetM(); 00990 00991 #ifdef SELDON_CHECK_BOUNDS 00992 if (m <= 0) 00993 throw WrongDim("GetLU", "Provide a non-empty matrix"); 00994 #endif 00995 00996 int lwork = m; 00997 char uplo('U'); 00998 Vector<complex<double>, VectFull, Allocator0> work(lwork); 00999 P.Reallocate(m); 01000 zhetrf_(&uplo, &m, A.GetDataVoid(), &m, 01001 P.GetData(), work.GetDataVoid(), 01002 &lwork, &info.GetInfoRef()); 01003 01004 #ifdef SELDON_LAPACK_CHECK_INFO 01005 if (info.GetInfo() != 0) 01006 throw LapackError(info.GetInfo(), "GetLU", 01007 "An error occured during the factorization."); 01008 #endif 01009 01010 } 01011 01012 01013 /*** ColHermPacked and Upper ***/ 01014 01015 01016 template <class Prop0, class Allocator0, 01017 class Allocator1> 01018 void GetLU(Matrix<complex<float>, Prop0, ColHermPacked, Allocator0>& A, 01019 Vector<int, VectFull, Allocator1>& P, 01020 LapackInfo& info) 01021 { 01022 int m = A.GetM(); 01023 01024 #ifdef SELDON_CHECK_BOUNDS 01025 if (m <= 0) 01026 throw WrongDim("GetLU", "Provide a non-empty matrix"); 01027 #endif 01028 01029 char uplo('U'); 01030 P.Reallocate(m); 01031 chptrf_(&uplo, &m, A.GetDataVoid(), 01032 P.GetData(), &info.GetInfoRef()); 01033 01034 #ifdef SELDON_LAPACK_CHECK_INFO 01035 if (info.GetInfo() != 0) 01036 throw LapackError(info.GetInfo(), "GetLU", 01037 "An error occured during the factorization."); 01038 #endif 01039 01040 } 01041 01042 01043 template <class Prop0, class Allocator0, 01044 class Allocator1> 01045 void GetLU(Matrix<complex<double>, Prop0, ColHermPacked, Allocator0>& A, 01046 Vector<int, VectFull, Allocator1>& P, 01047 LapackInfo& info) 01048 { 01049 int m = A.GetM(); 01050 01051 #ifdef SELDON_CHECK_DIMENSIONS 01052 if (m <= 0) 01053 throw WrongDim("GetLU", "Provide a non-empty matrix"); 01054 #endif 01055 01056 char uplo('U'); 01057 P.Reallocate(m); 01058 zhptrf_(&uplo, &m, A.GetDataVoid(), 01059 P.GetData(), &info.GetInfoRef()); 01060 01061 #ifdef SELDON_LAPACK_CHECK_INFO 01062 if (info.GetInfo() != 0) 01063 throw LapackError(info.GetInfo(), "GetLU", 01064 "An error occured during the factorization."); 01065 #endif 01066 01067 } 01068 01069 01070 /*** RowHerm and Upper ***/ 01071 01072 01073 template <class Prop0, class Allocator0, 01074 class Allocator1> 01075 void GetLU(Matrix<complex<float>, Prop0, RowHerm, Allocator0>& A, 01076 Vector<int, VectFull, Allocator1>& P, 01077 LapackInfo& info) 01078 { 01079 int m = A.GetM(); 01080 01081 #ifdef SELDON_CHECK_DIMENSIONS 01082 if (m <= 0) 01083 throw WrongDim("GetLU", "Provide a non-empty matrix"); 01084 #endif 01085 01086 int lwork = m; 01087 char uplo('L'); 01088 Vector<complex<float>, VectFull, Allocator0> work(lwork); 01089 P.Reallocate(m); 01090 chetrf_(&uplo, &m, A.GetDataVoid(), &m, 01091 P.GetData(), work.GetDataVoid(), 01092 &lwork, &info.GetInfoRef()); 01093 01094 #ifdef SELDON_LAPACK_CHECK_INFO 01095 if (info.GetInfo() != 0) 01096 throw LapackError(info.GetInfo(), "GetLU", 01097 "An error occured during the factorization."); 01098 #endif 01099 01100 } 01101 01102 01103 template <class Prop0, class Allocator0, 01104 class Allocator1> 01105 void GetLU(Matrix<complex<double>, Prop0, RowHerm, Allocator0>& A, 01106 Vector<int, VectFull, Allocator1>& P, 01107 LapackInfo& info) 01108 { 01109 int m = A.GetM(); 01110 01111 #ifdef SELDON_CHECK_DIMENSIONS 01112 if (m <= 0) 01113 throw WrongDim("GetLU", "Provide a non-empty matrix"); 01114 #endif 01115 01116 int lwork = m; 01117 char uplo('L'); 01118 Vector<complex<double>, VectFull, Allocator0> work(lwork); 01119 P.Reallocate(m); 01120 zhetrf_(&uplo, &m, A.GetDataVoid(), &m, 01121 P.GetData(), work.GetDataVoid(), 01122 &lwork, &info.GetInfoRef()); 01123 01124 #ifdef SELDON_LAPACK_CHECK_INFO 01125 if (info.GetInfo() != 0) 01126 throw LapackError(info.GetInfo(), "GetLU", 01127 "An error occured during the factorization."); 01128 #endif 01129 01130 } 01131 01132 01133 /*** RowSymPacked and Upper ***/ 01134 01135 01136 template <class Prop0, class Allocator0, 01137 class Allocator1> 01138 void GetLU(Matrix<complex<float>, Prop0, RowHermPacked, Allocator0>& A, 01139 Vector<int, VectFull, Allocator1>& P, 01140 LapackInfo& info) 01141 { 01142 int m = A.GetM(); 01143 01144 #ifdef SELDON_CHECK_DIMENSIONS 01145 if (m <= 0) 01146 throw WrongDim("GetLU", "Provide a non-empty matrix"); 01147 #endif 01148 01149 char uplo('L'); 01150 P.Reallocate(m); 01151 chptrf_(&uplo, &m, A.GetDataVoid(), 01152 P.GetData(), &info.GetInfoRef()); 01153 01154 #ifdef SELDON_LAPACK_CHECK_INFO 01155 if (info.GetInfo() != 0) 01156 throw LapackError(info.GetInfo(), "GetLU", 01157 "An error occured during the factorization."); 01158 #endif 01159 01160 } 01161 01162 01163 template <class Prop0, class Allocator0, 01164 class Allocator1> 01165 void GetLU(Matrix<complex<double>, Prop0, RowHermPacked, Allocator0>& A, 01166 Vector<int, VectFull, Allocator1>& P, 01167 LapackInfo& info) 01168 { 01169 int m = A.GetM(); 01170 01171 #ifdef SELDON_CHECK_DIMENSIONS 01172 if (m <= 0) 01173 throw WrongDim("GetLU", "Provide a non-empty matrix"); 01174 #endif 01175 01176 char uplo('L'); 01177 P.Reallocate(m); 01178 zhptrf_(&uplo, &m, A.GetDataVoid(), 01179 P.GetData(), &info.GetInfoRef()); 01180 01181 #ifdef SELDON_LAPACK_CHECK_INFO 01182 if (info.GetInfo() != 0) 01183 throw LapackError(info.GetInfo(), "GetLU", 01184 "An error occured during the factorization."); 01185 #endif 01186 01187 } 01188 01189 01190 // GetLU // 01192 01193 01194 01196 // SolveLU // 01197 01198 01199 /*** ColMajor and NoTrans ***/ 01200 01201 01202 template <class Prop0, class Allocator0, 01203 class Allocator1,class Allocator2> 01204 void SolveLU(const Matrix<float, Prop0, ColMajor, Allocator0>& A, 01205 const Vector<int, VectFull, Allocator1>& P, 01206 Vector<float, VectFull, Allocator2>& b, 01207 LapackInfo& info) 01208 { 01209 01210 #ifdef SELDON_CHECK_DIMENSIONS 01211 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01212 #endif 01213 01214 int m = A.GetM(); 01215 int nrhs = 1; 01216 char trans('N'); 01217 sgetrs_(&trans, &m, &nrhs, A.GetData(), &m, P.GetData(), 01218 b.GetData(), &m, &info.GetInfoRef() ); 01219 } 01220 01221 01222 template <class Prop0, class Allocator0, 01223 class Allocator1, class Allocator2> 01224 void SolveLU(const Matrix<double, Prop0, ColMajor, Allocator0>& A, 01225 const Vector<int, VectFull, Allocator1>& P, 01226 Vector<double, VectFull, Allocator2>& b, 01227 LapackInfo& info) 01228 { 01229 01230 #ifdef SELDON_CHECK_DIMENSIONS 01231 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01232 #endif 01233 01234 int m = A.GetM(); 01235 int nrhs = 1; 01236 char trans('N'); 01237 dgetrs_(&trans, &m, &nrhs, A.GetData(), &m,P.GetData(), 01238 b.GetData(), &m, &info.GetInfoRef() ); 01239 } 01240 01241 01242 template <class Prop0, class Allocator0, 01243 class Allocator1, class Allocator2> 01244 void SolveLU(const Matrix<complex<float>, Prop0, ColMajor, Allocator0>& A, 01245 const Vector<int, VectFull, Allocator1>& P, 01246 Vector<complex<float>, VectFull, Allocator2>& b, 01247 LapackInfo& info) 01248 { 01249 01250 #ifdef SELDON_CHECK_DIMENSIONS 01251 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01252 #endif 01253 01254 int m = A.GetM(); 01255 int nrhs = 1; 01256 char trans('N'); 01257 cgetrs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, 01258 P.GetData(), b.GetDataVoid(), 01259 &m, &info.GetInfoRef() ); 01260 } 01261 01262 01263 template <class Prop0, class Allocator0, 01264 class Allocator1, class Allocator2> 01265 void SolveLU(const Matrix<complex<double>, Prop0, ColMajor, Allocator0>& A, 01266 const Vector<int, VectFull, Allocator1>& P, 01267 Vector<complex<double>, VectFull, Allocator2>& b, 01268 LapackInfo& info) 01269 { 01270 01271 #ifdef SELDON_CHECK_DIMENSIONS 01272 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01273 #endif 01274 01275 int m = A.GetM(); 01276 int nrhs = 1; 01277 char trans('N'); 01278 zgetrs_(&trans, &m, &nrhs, A.GetData(), &m, 01279 P.GetData(), b.GetDataVoid(), 01280 &m, &info.GetInfoRef() ); 01281 } 01282 01283 01284 /*** ColMajor ***/ 01285 01286 01287 template <class Prop0, class Allocator0, 01288 class Allocator1,class Allocator2> 01289 void SolveLU(const SeldonTranspose& TransA, 01290 const Matrix<float, Prop0, ColMajor, Allocator0>& A, 01291 const Vector<int, VectFull, Allocator1>& P, 01292 Vector<float, VectFull, Allocator2>& b, 01293 LapackInfo& info) 01294 { 01295 01296 #ifdef SELDON_CHECK_DIMENSIONS 01297 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01298 #endif 01299 01300 int m = A.GetM(); 01301 int nrhs = 1; 01302 char trans = TransA.Char(); 01303 sgetrs_(&trans, &m, &nrhs, A.GetData(), &m, P.GetData(), 01304 b.GetData(), &m, &info.GetInfoRef()); 01305 } 01306 01307 template <class Prop0, class Allocator0, 01308 class Allocator1,class Allocator2> 01309 void SolveLU(const SeldonTranspose& TransA, 01310 const Matrix<double, Prop0, ColMajor, Allocator0>& A, 01311 const Vector<int, VectFull, Allocator1>& P, 01312 Vector<double, VectFull, Allocator2>& b, 01313 LapackInfo& info) 01314 { 01315 01316 #ifdef SELDON_CHECK_DIMENSIONS 01317 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01318 #endif 01319 01320 int m = A.GetM(); 01321 int nrhs = 1; 01322 char trans = TransA.Char(); 01323 dgetrs_(&trans, &m, &nrhs, A.GetData(), &m, P.GetData(), 01324 b.GetData(), &m, &info.GetInfoRef()); 01325 } 01326 01327 template <class Prop0, class Allocator0, 01328 class Allocator1,class Allocator2> 01329 void SolveLU(const SeldonTranspose& TransA, 01330 const Matrix<complex<float>, Prop0, ColMajor, Allocator0>& A, 01331 const Vector<int, VectFull, Allocator1>& P, 01332 Vector<complex<float>, VectFull, Allocator2>& b, 01333 LapackInfo& info) 01334 { 01335 01336 #ifdef SELDON_CHECK_DIMENSIONS 01337 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01338 #endif 01339 01340 int m = A.GetM(); 01341 int nrhs = 1; 01342 char trans = TransA.Char(); 01343 cgetrs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, P.GetData(), 01344 b.GetDataVoid(), &m, &info.GetInfoRef()); 01345 } 01346 01347 template <class Prop0, class Allocator0, 01348 class Allocator1,class Allocator2> 01349 void SolveLU(const SeldonTranspose& TransA, 01350 const Matrix<complex<double>, Prop0, ColMajor, Allocator0>& A, 01351 const Vector<int, VectFull, Allocator1>& P, 01352 Vector<complex<double>, VectFull, Allocator2>& b, 01353 LapackInfo& info) 01354 { 01355 01356 #ifdef SELDON_CHECK_DIMENSIONS 01357 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01358 #endif 01359 01360 int m = A.GetM(); 01361 int nrhs = 1; 01362 char trans = TransA.Char(); 01363 zgetrs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, P.GetData(), 01364 b.GetDataVoid(), &m, &info.GetInfoRef()); 01365 } 01366 01367 /*** RowMajor and NoTrans***/ 01368 01369 01370 template <class Prop0, class Allocator0, 01371 class Allocator1,class Allocator2> 01372 void SolveLU(const Matrix<float, Prop0, RowMajor, Allocator0>& A, 01373 const Vector<int, VectFull, Allocator1>& P, 01374 Vector<float, VectFull, Allocator2>& b, 01375 LapackInfo& info) 01376 { 01377 01378 #ifdef SELDON_CHECK_DIMENSIONS 01379 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01380 #endif 01381 01382 int m = A.GetM(); 01383 int nrhs = 1; 01384 char trans('T'); 01385 sgetrs_(&trans, &m, &nrhs, A.GetData(), &m, 01386 P.GetData(), b.GetData(), &m, &info.GetInfoRef() ); 01387 } 01388 01389 01390 template <class Prop0, class Allocator0, 01391 class Allocator1,class Allocator2> 01392 void SolveLU(const Matrix<double, Prop0, RowMajor, Allocator0>& A, 01393 const Vector<int, VectFull, Allocator1>& P, 01394 Vector<double, VectFull, Allocator2>& b, 01395 LapackInfo& info) 01396 { 01397 01398 #ifdef SELDON_CHECK_DIMENSIONS 01399 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01400 #endif 01401 01402 int m = A.GetM(); 01403 int nrhs = 1; 01404 char trans('T'); 01405 dgetrs_(&trans, &m, &nrhs, A.GetData(), &m, 01406 P.GetData(), b.GetData(), &m, &info.GetInfoRef() ); 01407 } 01408 01409 01410 template <class Prop0, class Allocator0, 01411 class Allocator1,class Allocator2> 01412 void SolveLU(const Matrix<complex<float>, Prop0, RowMajor, Allocator0>& A, 01413 const Vector<int, VectFull, Allocator1>& P, 01414 Vector<complex<float>, VectFull, Allocator2>& b, 01415 LapackInfo& info) 01416 { 01417 01418 #ifdef SELDON_CHECK_DIMENSIONS 01419 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01420 #endif 01421 01422 int m = A.GetM(); 01423 int nrhs = 1; 01424 char trans('T'); 01425 cgetrs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, 01426 P.GetData(), b.GetData(), &m, &info.GetInfoRef() ); 01427 } 01428 01429 01430 template <class Prop0, class Allocator0, 01431 class Allocator1,class Allocator2> 01432 void SolveLU(const Matrix<complex<double>, Prop0, RowMajor, Allocator0>& A, 01433 const Vector<int, VectFull, Allocator1>& P, 01434 Vector<complex<double>, VectFull, Allocator2>& b, 01435 LapackInfo& info) 01436 { 01437 01438 #ifdef SELDON_CHECK_DIMENSIONS 01439 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01440 #endif 01441 01442 int m = A.GetM(); 01443 int nrhs = 1; 01444 char trans('T'); 01445 zgetrs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, 01446 P.GetData(), b.GetData(), &m, &info.GetInfoRef() ); 01447 } 01448 01449 01450 /*** RowMajor ***/ 01451 01452 01453 template <class Prop0, class Allocator0, 01454 class Allocator1,class Allocator2> 01455 void SolveLU(const SeldonTranspose& TransA, 01456 const Matrix<float, Prop0, RowMajor, Allocator0>& A, 01457 const Vector<int, VectFull, Allocator1>& P, 01458 Vector<float, VectFull, Allocator2>& b, 01459 LapackInfo& info) 01460 { 01461 01462 #ifdef SELDON_CHECK_DIMENSIONS 01463 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01464 #endif 01465 01466 int m = A.GetM(); 01467 int nrhs = 1; 01468 char trans = TransA.RevChar(); 01469 sgetrs_(&trans, &m, &nrhs, A.GetData(), &m, P.GetData(), 01470 b.GetData(), &m, &info.GetInfoRef()); 01471 } 01472 01473 template <class Prop0, class Allocator0, 01474 class Allocator1,class Allocator2> 01475 void SolveLU(const SeldonTranspose& TransA, 01476 const Matrix<double, Prop0, RowMajor, Allocator0>& A, 01477 const Vector<int, VectFull, Allocator1>& P, 01478 Vector<double, VectFull, Allocator2>& b, 01479 LapackInfo& info) 01480 { 01481 01482 #ifdef SELDON_CHECK_DIMENSIONS 01483 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01484 #endif 01485 01486 int m = A.GetM(); 01487 int nrhs = 1; 01488 char trans = TransA.RevChar(); 01489 dgetrs_(&trans, &m, &nrhs, A.GetData(), &m, P.GetData(), 01490 b.GetData(), &m, &info.GetInfoRef()); 01491 } 01492 01493 template <class Prop0, class Allocator0, 01494 class Allocator1,class Allocator2> 01495 void SolveLU(const SeldonTranspose& TransA, 01496 const Matrix<complex<float>, Prop0, RowMajor, Allocator0>& A, 01497 const Vector<int, VectFull, Allocator1>& P, 01498 Vector<complex<float>, VectFull, Allocator2>& b, 01499 LapackInfo& info) 01500 { 01501 01502 #ifdef SELDON_CHECK_DIMENSIONS 01503 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01504 #endif 01505 01506 int m = A.GetM(); 01507 int nrhs = 1; 01508 char trans = TransA.RevChar(); 01509 if (TransA.ConjTrans()) 01510 Conjugate(b); 01511 01512 cgetrs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, P.GetData(), 01513 b.GetDataVoid(), &m, &info.GetInfoRef()); 01514 01515 if (TransA.ConjTrans()) 01516 Conjugate(b); 01517 } 01518 01519 template <class Prop0, class Allocator0, 01520 class Allocator1,class Allocator2> 01521 void SolveLU(const SeldonTranspose& TransA, 01522 const Matrix<complex<double>, Prop0, RowMajor, Allocator0>& A, 01523 const Vector<int, VectFull, Allocator1>& P, 01524 Vector<complex<double>, VectFull, Allocator2>& b, 01525 LapackInfo& info) 01526 { 01527 01528 #ifdef SELDON_CHECK_DIMENSIONS 01529 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01530 #endif 01531 01532 int m = A.GetM(); 01533 int nrhs = 1; 01534 char trans = TransA.RevChar(); 01535 if (TransA.ConjTrans()) 01536 Conjugate(b); 01537 01538 zgetrs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, P.GetData(), 01539 b.GetDataVoid(), &m, &info.GetInfoRef()); 01540 01541 if (TransA.ConjTrans()) 01542 Conjugate(b); 01543 } 01544 01545 01546 /*** ColSym and Upper ***/ 01547 01548 01549 template <class Prop0, class Allocator0, 01550 class Allocator1, class Allocator2> 01551 void SolveLU(const Matrix<float, Prop0, ColSym, Allocator0>& A, 01552 const Vector<int, VectFull, Allocator1>& P, 01553 Vector<float, VectFull, Allocator2>& b, 01554 LapackInfo& info) 01555 { 01556 01557 #ifdef SELDON_CHECK_DIMENSIONS 01558 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01559 #endif 01560 01561 int m = A.GetM(); int nrhs = 1; 01562 char uplo('U'); 01563 ssytrs_(&uplo, &m, &nrhs, A.GetData(), &m, 01564 P.GetData(), b.GetData(), &m, &info.GetInfoRef()); 01565 } 01566 01567 01568 template <class Prop0, class Allocator0, 01569 class Allocator1, class Allocator2> 01570 void SolveLU(const Matrix<double, Prop0, ColSym, Allocator0>& A, 01571 const Vector<int, VectFull, Allocator1>& P, 01572 Vector<double, VectFull, Allocator2>& b, 01573 LapackInfo& info) 01574 { 01575 01576 #ifdef SELDON_CHECK_DIMENSIONS 01577 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01578 #endif 01579 01580 int m = A.GetM(); int nrhs = 1; 01581 char uplo('U'); 01582 dsytrs_(&uplo, &m, &nrhs, A.GetData(), &m, 01583 P.GetData(), b.GetData(), &m, &info.GetInfoRef()); 01584 } 01585 01586 01587 template <class Prop0, class Allocator0, 01588 class Allocator1, class Allocator2> 01589 void SolveLU(const Matrix<complex<float>, Prop0, ColSym, Allocator0>& A, 01590 const Vector<int, VectFull, Allocator1>& P, 01591 Vector<complex<float>, VectFull, Allocator2>& b, 01592 LapackInfo& info) 01593 { 01594 01595 #ifdef SELDON_CHECK_DIMENSIONS 01596 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01597 #endif 01598 01599 int m = A.GetM(); int nrhs = 1; 01600 char uplo('U'); 01601 csytrs_(&uplo, &m, & nrhs, A.GetDataVoid(), &m, 01602 P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef()); 01603 } 01604 01605 01606 template <class Prop0, class Allocator0, 01607 class Allocator1, class Allocator2> 01608 void SolveLU(const Matrix<complex<double>, Prop0, ColSym, Allocator0>& A, 01609 const Vector<int, VectFull, Allocator1>& P, 01610 Vector<complex<double>, VectFull, Allocator2>& b, 01611 LapackInfo& info) 01612 { 01613 01614 #ifdef SELDON_CHECK_DIMENSIONS 01615 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01616 #endif 01617 01618 int m = A.GetM(); int nrhs = 1; 01619 char uplo('U'); 01620 zsytrs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m, 01621 P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef()); 01622 } 01623 01624 01625 /*** ColSymPacked and Upper ***/ 01626 01627 01628 template <class Prop0, class Allocator0, 01629 class Allocator1, class Allocator2> 01630 void SolveLU(const Matrix<float, Prop0, ColSymPacked, Allocator0>& A, 01631 const Vector<int, VectFull, Allocator1>& P, 01632 Vector<float, VectFull, Allocator2>& b, 01633 LapackInfo& info) 01634 { 01635 01636 #ifdef SELDON_CHECK_DIMENSIONS 01637 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01638 #endif 01639 01640 int m = A.GetM(); 01641 int nrhs = 1; 01642 char uplo('U'); 01643 ssptrs_(&uplo, &m, &nrhs, A.GetData(), P.GetData(), 01644 b.GetData(), &m, &info.GetInfoRef() ); 01645 } 01646 01647 01648 template <class Prop0, class Allocator0, 01649 class Allocator1, class Allocator2> 01650 void SolveLU(const Matrix<double, Prop0, ColSymPacked, Allocator0>& A, 01651 const Vector<int, VectFull, Allocator1>& P, 01652 Vector<double, VectFull, Allocator2>& b, 01653 LapackInfo& info) 01654 { 01655 01656 #ifdef SELDON_CHECK_DIMENSIONS 01657 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01658 #endif 01659 01660 int m = A.GetM(); 01661 int nrhs = 1; 01662 char uplo('U'); 01663 dsptrs_(&uplo, &m, &nrhs, A.GetData(), P.GetData(), 01664 b.GetData(), &m, &info.GetInfoRef() ); 01665 } 01666 01667 01668 template <class Prop0, class Allocator0, 01669 class Allocator1,class Allocator2> 01670 void SolveLU(const Matrix<complex<float>, Prop0, ColSymPacked, 01671 Allocator0>& A, const Vector<int, VectFull, Allocator1>& P, 01672 Vector<complex<float>, VectFull, Allocator2>& b, 01673 LapackInfo& info) 01674 { 01675 01676 #ifdef SELDON_CHECK_DIMENSIONS 01677 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01678 #endif 01679 01680 int m = A.GetM(); 01681 int nrhs = 1; 01682 char uplo('U'); 01683 csptrs_(&uplo, &m, &nrhs, A.GetDataVoid(), P.GetData(), 01684 b.GetData(), &m, &info.GetInfoRef() ); 01685 } 01686 01687 01688 template <class Prop0, class Allocator0, 01689 class Allocator1, class Allocator2> 01690 void SolveLU(const Matrix<complex<double>, Prop0, ColSymPacked, 01691 Allocator0>& A, const Vector<int, VectFull, Allocator1>& P, 01692 Vector<complex<double>, VectFull, Allocator2>& b, 01693 LapackInfo& info) 01694 { 01695 01696 #ifdef SELDON_CHECK_DIMENSIONS 01697 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01698 #endif 01699 01700 int m = A.GetM(); 01701 int nrhs = 1; 01702 char uplo('U'); 01703 zsptrs_(&uplo, &m, &nrhs, A.GetDataVoid(), P.GetData(), 01704 b.GetData(), &m, &info.GetInfoRef() ); 01705 } 01706 01707 01708 /*** RowSym and Upper ***/ 01709 01710 01711 template <class Prop0, class Allocator0, 01712 class Allocator1, class Allocator2> 01713 void SolveLU(const Matrix<float, Prop0, RowSym, Allocator0>& A, 01714 const Vector<int, VectFull, Allocator1>& P, 01715 Vector<float, VectFull, Allocator2>& b, 01716 LapackInfo& info) 01717 { 01718 01719 #ifdef SELDON_CHECK_DIMENSIONS 01720 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01721 #endif 01722 01723 int m = A.GetM(); int nrhs = 1; 01724 char uplo('L'); 01725 ssytrs_(&uplo, &m, &nrhs, A.GetData(), &m, 01726 P.GetData(), b.GetData(), &m, &info.GetInfoRef()); 01727 } 01728 01729 01730 template <class Prop0, class Allocator0, 01731 class Allocator1, class Allocator2> 01732 void SolveLU(const Matrix<double, Prop0, RowSym, Allocator0>& A, 01733 const Vector<int, VectFull, Allocator1>& P, 01734 Vector<double, VectFull, Allocator2>& b, 01735 LapackInfo& info) 01736 { 01737 01738 #ifdef SELDON_CHECK_DIMENSIONS 01739 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01740 #endif 01741 01742 int m = A.GetM(); int nrhs = 1; 01743 char uplo('L'); 01744 dsytrs_(&uplo, &m, &nrhs, A.GetData(), &m, 01745 P.GetData(), b.GetData(), &m, &info.GetInfoRef()); 01746 } 01747 01748 01749 template <class Prop0, class Allocator0, 01750 class Allocator1, class Allocator2> 01751 void SolveLU(const Matrix<complex<float>, Prop0, RowSym, Allocator0>& A, 01752 const Vector<int, VectFull, Allocator1>& P, 01753 Vector<complex<float>, VectFull, Allocator2>& b, 01754 LapackInfo& info) 01755 { 01756 01757 #ifdef SELDON_CHECK_DIMENSIONS 01758 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01759 #endif 01760 01761 int m = A.GetM(); int nrhs = 1; 01762 char uplo('L'); 01763 csytrs_(&uplo, &m, & nrhs, A.GetDataVoid(), &m, 01764 P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef()); 01765 } 01766 01767 01768 template <class Prop0, class Allocator0, 01769 class Allocator1, class Allocator2> 01770 void SolveLU(const Matrix<complex<double>, Prop0, RowSym, Allocator0>& A, 01771 const Vector<int, VectFull, Allocator1>& P, 01772 Vector<complex<double>, VectFull, Allocator2>& b, 01773 LapackInfo& info) 01774 { 01775 01776 #ifdef SELDON_CHECK_DIMENSIONS 01777 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01778 #endif 01779 01780 int m = A.GetM(); int nrhs = 1; 01781 char uplo('L'); 01782 zsytrs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m, 01783 P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef()); 01784 } 01785 01786 01787 /*** RowSymPacked and Upper ***/ 01788 01789 01790 template <class Prop0, class Allocator0, 01791 class Allocator1, class Allocator2> 01792 void SolveLU(const Matrix<float, Prop0, RowSymPacked, Allocator0>& A, 01793 const Vector<int, VectFull, Allocator1>& P, 01794 Vector<float, VectFull, Allocator2>& b, 01795 LapackInfo& info) 01796 { 01797 01798 #ifdef SELDON_CHECK_DIMENSIONS 01799 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01800 #endif 01801 01802 int m = A.GetM(); 01803 int nrhs = 1; 01804 char uplo('L'); 01805 ssptrs_(&uplo, &m, &nrhs, A.GetData(), P.GetData(), 01806 b.GetData(), &m, &info.GetInfoRef() ); 01807 } 01808 01809 01810 template <class Prop0, class Allocator0, 01811 class Allocator1, class Allocator2> 01812 void SolveLU(const Matrix<double, Prop0, RowSymPacked, Allocator0>& A, 01813 const Vector<int, VectFull, Allocator1>& P, 01814 Vector<double, VectFull, Allocator2>& b, 01815 LapackInfo& info) 01816 { 01817 01818 #ifdef SELDON_CHECK_DIMENSIONS 01819 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01820 #endif 01821 01822 int m = A.GetM(); 01823 int nrhs = 1; 01824 char uplo('L'); 01825 dsptrs_(&uplo, &m, &nrhs, A.GetData(), P.GetData(), 01826 b.GetData(), &m, &info.GetInfoRef() ); 01827 } 01828 01829 01830 template <class Prop0, class Allocator0, 01831 class Allocator1, class Allocator2> 01832 void SolveLU(const Matrix<complex<float>, Prop0, RowSymPacked, 01833 Allocator0>& A, const Vector<int, VectFull, Allocator1>& P, 01834 Vector<complex<float>, VectFull, Allocator2>& b, 01835 LapackInfo& info) 01836 { 01837 01838 #ifdef SELDON_CHECK_DIMENSIONS 01839 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01840 #endif 01841 01842 int m = A.GetM(); 01843 int nrhs = 1; 01844 char uplo('L'); 01845 csptrs_(&uplo, &m, &nrhs, A.GetDataVoid(), P.GetData(), 01846 b.GetData(), &m, &info.GetInfoRef() ); 01847 } 01848 01849 01850 template <class Prop0, class Allocator0, 01851 class Allocator1, class Allocator2> 01852 void SolveLU(const Matrix<complex<double>, Prop0, RowSymPacked, 01853 Allocator0>& A, const Vector<int, VectFull, Allocator1>& P, 01854 Vector<complex<double>, VectFull, Allocator2>& b, 01855 LapackInfo& info) 01856 { 01857 01858 #ifdef SELDON_CHECK_DIMENSIONS 01859 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01860 #endif 01861 01862 int m = A.GetM(); 01863 int nrhs = 1; 01864 char uplo('L'); 01865 zsptrs_(&uplo, &m, &nrhs, A.GetDataVoid(), P.GetData(), 01866 b.GetData(), &m, &info.GetInfoRef() ); 01867 } 01868 01869 01870 /*** ColHerm and Upper ***/ 01871 01872 01873 template <class Prop0, class Allocator0, 01874 class Allocator1, class Allocator2> 01875 void SolveLU(const Matrix<complex<float>, Prop0, ColHerm, Allocator0>& A, 01876 const Vector<int, VectFull, Allocator1>& P, 01877 Vector<complex<float>, VectFull, Allocator2>& b, 01878 LapackInfo& info) 01879 { 01880 01881 #ifdef SELDON_CHECK_DIMENSIONS 01882 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01883 #endif 01884 01885 int m = A.GetM(); int nrhs = 1; 01886 char uplo('U'); 01887 chetrs_(&uplo, &m, & nrhs, A.GetDataVoid(), &m, 01888 P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef()); 01889 } 01890 01891 01892 template <class Prop0, class Allocator0, 01893 class Allocator1, class Allocator2> 01894 void SolveLU(const Matrix<complex<double>, Prop0, ColHerm, Allocator0>& A, 01895 const Vector<int, VectFull, Allocator1>& P, 01896 Vector<complex<double>, VectFull, Allocator2>& b, 01897 LapackInfo& info) 01898 { 01899 01900 #ifdef SELDON_CHECK_DIMENSIONS 01901 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01902 #endif 01903 01904 int m = A.GetM(); int nrhs = 1; 01905 char uplo('U'); 01906 zhetrs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m, 01907 P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef()); 01908 } 01909 01910 01911 /*** ColHermPacked and Upper ***/ 01912 01913 01914 template <class Prop0, class Allocator0, 01915 class Allocator1, class Allocator2> 01916 void SolveLU(const Matrix<complex<float>, Prop0, ColHermPacked, 01917 Allocator0>& A, const Vector<int, VectFull, Allocator1>& P, 01918 Vector<complex<float>, VectFull, Allocator2>& b, 01919 LapackInfo& info) 01920 { 01921 01922 #ifdef SELDON_CHECK_DIMENSIONS 01923 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01924 #endif 01925 01926 int m = A.GetM(); int nrhs = 1; 01927 char uplo('U'); 01928 chptrs_(&uplo, &m, & nrhs, A.GetDataVoid(), 01929 P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef()); 01930 } 01931 01932 01933 template <class Prop0, class Allocator0, 01934 class Allocator1, class Allocator2> 01935 void SolveLU(const Matrix<complex<double>, Prop0, ColHermPacked, 01936 Allocator0>& A, const Vector<int, VectFull, Allocator1>& P, 01937 Vector<complex<double>, VectFull, Allocator2>& b, 01938 LapackInfo& info) 01939 { 01940 01941 #ifdef SELDON_CHECK_DIMENSIONS 01942 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01943 #endif 01944 01945 int m = A.GetM(); int nrhs = 1; 01946 char uplo('U'); 01947 zhptrs_(&uplo, &m, &nrhs, A.GetDataVoid(), 01948 P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef()); 01949 } 01950 01951 01952 /*** RowHerm and Upper ***/ 01953 01954 01955 template <class Prop0, class Allocator0, 01956 class Allocator1, class Allocator2> 01957 void SolveLU(const Matrix<complex<float>, Prop0, RowHerm, Allocator0>& A, 01958 const Vector<int, VectFull, Allocator1>& P, 01959 Vector<complex<float>, VectFull, Allocator2>& b, 01960 LapackInfo& info) 01961 { 01962 01963 #ifdef SELDON_CHECK_DIMENSIONS 01964 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01965 #endif 01966 01967 int m = A.GetM(); int nrhs = 1; 01968 char uplo('L'); 01969 Conjugate(b); 01970 chetrs_(&uplo, &m, & nrhs, A.GetDataVoid(), &m, 01971 P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef()); 01972 Conjugate(b); 01973 } 01974 01975 01976 template <class Prop0, class Allocator0, 01977 class Allocator1, class Allocator2> 01978 void SolveLU(const Matrix<complex<double>, Prop0, RowHerm, Allocator0>& A, 01979 const Vector<int, VectFull, Allocator1>& P, 01980 Vector<complex<double>, VectFull, Allocator2>& b, 01981 LapackInfo& info) 01982 { 01983 01984 #ifdef SELDON_CHECK_DIMENSIONS 01985 CheckDim(A, b, "SolveLU(A, pivot, X)"); 01986 #endif 01987 01988 int m = A.GetM(); int nrhs = 1; 01989 char uplo('L'); 01990 Conjugate(b); 01991 zhetrs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m, 01992 P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef()); 01993 Conjugate(b); 01994 } 01995 01996 01997 /*** RowHermPacked and Upper ***/ 01998 01999 02000 template <class Prop0, class Allocator0, 02001 class Allocator1, class Allocator2> 02002 void SolveLU(const Matrix<complex<float>, Prop0, RowHermPacked, 02003 Allocator0>& A, const Vector<int, VectFull, Allocator1>& P, 02004 Vector<complex<float>, VectFull, Allocator2>& b, 02005 LapackInfo& info) 02006 { 02007 02008 #ifdef SELDON_CHECK_DIMENSIONS 02009 CheckDim(A, b, "SolveLU(A, pivot, X)"); 02010 #endif 02011 02012 int m = A.GetM(); int nrhs = 1; 02013 char uplo('L'); 02014 Conjugate(b); 02015 chptrs_(&uplo, &m, & nrhs, A.GetDataVoid(), 02016 P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef()); 02017 Conjugate(b); 02018 } 02019 02020 02021 template <class Prop0, class Allocator0, 02022 class Allocator1, class Allocator2> 02023 void SolveLU(const Matrix<complex<double>, Prop0, RowHermPacked, 02024 Allocator0>& A, const Vector<int, VectFull, Allocator1>& P, 02025 Vector<complex<double>, VectFull, Allocator2>& b, 02026 LapackInfo& info) 02027 { 02028 02029 #ifdef SELDON_CHECK_DIMENSIONS 02030 CheckDim(A, b, "SolveLU(A, pivot, X)"); 02031 #endif 02032 02033 int m = A.GetM(); int nrhs = 1; 02034 char uplo('L'); 02035 Conjugate(b); 02036 zhptrs_(&uplo, &m, &nrhs, A.GetDataVoid(), 02037 P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef()); 02038 Conjugate(b); 02039 } 02040 02041 02042 /*** ColUpTriang, NoTrans and NonUnit ***/ 02043 02044 02045 template <class Prop0, class Allocator0, class Allocator2> 02046 void SolveLU(const Matrix<float, Prop0, ColUpTriang, Allocator0>& A, 02047 Vector<float, VectFull, Allocator2>& b, 02048 LapackInfo& info) 02049 { 02050 02051 #ifdef SELDON_CHECK_DIMENSIONS 02052 CheckDim(A, b, "SolveLU(A, X)"); 02053 #endif 02054 02055 int m = A.GetM(); int nrhs = 1; 02056 char uplo('U'); char trans('N'); char diag('N'); 02057 strtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m, 02058 b.GetData(), &m, &info.GetInfoRef()); 02059 } 02060 02061 02062 template <class Prop0, class Allocator0, class Allocator2> 02063 void SolveLU(const Matrix<double, Prop0, ColUpTriang, Allocator0>& A, 02064 Vector<double, VectFull, Allocator2>& b, 02065 LapackInfo& info) 02066 { 02067 02068 #ifdef SELDON_CHECK_DIMENSIONS 02069 CheckDim(A, b, "SolveLU(A, X)"); 02070 #endif 02071 02072 int m = A.GetM(); int nrhs = 1; 02073 char uplo('U'); char trans('N'); char diag('N'); 02074 dtrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m, 02075 b.GetData(), &m, &info.GetInfoRef()); 02076 } 02077 02078 02079 template <class Prop0, class Allocator0, class Allocator2> 02080 void SolveLU(const Matrix<complex<float>, Prop0, ColUpTriang, 02081 Allocator0>& A, 02082 Vector<complex<float>, VectFull, Allocator2>& b, 02083 LapackInfo& info) 02084 { 02085 02086 #ifdef SELDON_CHECK_DIMENSIONS 02087 CheckDim(A, b, "SolveLU(A, X)"); 02088 #endif 02089 02090 int m = A.GetM(); int nrhs = 1; 02091 char uplo('U'); char trans('N'); char diag('N'); 02092 ctrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m, 02093 b.GetDataVoid(), &m, &info.GetInfoRef()); 02094 } 02095 02096 02097 template <class Prop0, class Allocator0, class Allocator2> 02098 void SolveLU(const Matrix<complex<double>, Prop0, ColUpTriang, 02099 Allocator0>& A, 02100 Vector<complex<double>, VectFull, Allocator2>& b, 02101 LapackInfo& info) 02102 { 02103 02104 #ifdef SELDON_CHECK_DIMENSIONS 02105 CheckDim(A, b, "SolveLU(A, X)"); 02106 #endif 02107 02108 int m = A.GetM(); int nrhs = 1; 02109 char uplo('U'); char trans('N'); char diag('N'); 02110 ztrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m, 02111 b.GetDataVoid(), &m, &info.GetInfoRef()); 02112 02113 } 02114 02115 02116 /*** ColUpTriang ***/ 02117 02118 02119 template <class Prop0, class Allocator0, class Allocator2> 02120 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 02121 const Matrix<float, Prop0, ColUpTriang, Allocator0>& A, 02122 Vector<float, VectFull, Allocator2>& b, 02123 LapackInfo& info) 02124 { 02125 02126 #ifdef SELDON_CHECK_DIMENSIONS 02127 CheckDim(A, b, "SolveLU(A, X)"); 02128 #endif 02129 02130 int m = A.GetM(); int nrhs = 1; 02131 char uplo('U'); 02132 char trans = TransA.Char(); char diag = DiagA.Char(); 02133 strtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m, 02134 b.GetData(), &m, &info.GetInfoRef()); 02135 } 02136 02137 02138 template <class Prop0, class Allocator0, class Allocator2> 02139 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 02140 const Matrix<double, Prop0, ColUpTriang, Allocator0>& A, 02141 Vector<double, VectFull, Allocator2>& b, 02142 LapackInfo& info) 02143 { 02144 02145 #ifdef SELDON_CHECK_DIMENSIONS 02146 CheckDim(A, b, "SolveLU(A, X)"); 02147 #endif 02148 02149 int m = A.GetM(); int nrhs = 1; 02150 char uplo('U'); 02151 char trans = TransA.Char(); char diag = DiagA.Char(); 02152 dtrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m, 02153 b.GetData(), &m, &info.GetInfoRef()); 02154 } 02155 02156 02157 template <class Prop0, class Allocator0, class Allocator2> 02158 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 02159 const Matrix<complex<float>, Prop0, ColUpTriang, 02160 Allocator0>& A, 02161 Vector<complex<float>, VectFull, Allocator2>& b, 02162 LapackInfo& info) 02163 { 02164 02165 #ifdef SELDON_CHECK_DIMENSIONS 02166 CheckDim(A, b, "SolveLU(A, X)"); 02167 #endif 02168 02169 int m = A.GetM(); int nrhs = 1; 02170 char uplo('U'); 02171 char trans = TransA.Char(); char diag = DiagA.Char(); 02172 ctrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m, 02173 b.GetDataVoid(), &m, &info.GetInfoRef()); 02174 } 02175 02176 02177 template <class Prop0, class Allocator0, class Allocator2> 02178 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 02179 const Matrix<complex<double>, Prop0, ColUpTriang, 02180 Allocator0>& A, 02181 Vector<complex<double>, VectFull, Allocator2>& b, 02182 LapackInfo& info) 02183 { 02184 02185 #ifdef SELDON_CHECK_DIMENSIONS 02186 CheckDim(A, b, "SolveLU(A, X)"); 02187 #endif 02188 02189 int m = A.GetM(); int nrhs = 1; 02190 char uplo('U'); 02191 char trans = TransA.Char(); char diag = DiagA.Char(); 02192 ztrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m, 02193 b.GetDataVoid(), &m, &info.GetInfoRef()); 02194 02195 } 02196 02197 02198 /*** ColLoTriang, NoTrans and NonUnit ***/ 02199 02200 02201 template <class Prop0, class Allocator0, class Allocator2> 02202 void SolveLU(const Matrix<float, Prop0, ColLoTriang, Allocator0>& A, 02203 Vector<float, VectFull, Allocator2>& b, 02204 LapackInfo& info) 02205 { 02206 02207 #ifdef SELDON_CHECK_DIMENSIONS 02208 CheckDim(A, b, "SolveLU(A, X)"); 02209 #endif 02210 02211 int m = A.GetM(); int nrhs = 1; 02212 char uplo('L'); char trans('N'); char diag('N'); 02213 strtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m, 02214 b.GetData(), &m, &info.GetInfoRef()); 02215 } 02216 02217 02218 template <class Prop0, class Allocator0, class Allocator2> 02219 void SolveLU(const Matrix<double, Prop0, ColLoTriang, Allocator0>& A, 02220 Vector<double, VectFull, Allocator2>& b, 02221 LapackInfo& info) 02222 { 02223 02224 #ifdef SELDON_CHECK_DIMENSIONS 02225 CheckDim(A, b, "SolveLU(A, X)"); 02226 #endif 02227 02228 int m = A.GetM(); int nrhs = 1; 02229 char uplo('L'); char trans('N'); char diag('N'); 02230 dtrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m, 02231 b.GetData(), &m, &info.GetInfoRef()); 02232 02233 } 02234 02235 02236 template <class Prop0, class Allocator0, class Allocator2> 02237 void SolveLU(const Matrix<complex<float>, Prop0, ColLoTriang, 02238 Allocator0>& A, 02239 Vector<complex<float>, VectFull, Allocator2>& b, 02240 LapackInfo& info) 02241 { 02242 02243 #ifdef SELDON_CHECK_DIMENSIONS 02244 CheckDim(A, b, "SolveLU(A, X)"); 02245 #endif 02246 02247 int m = A.GetM(); int nrhs = 1; 02248 char uplo('L'); char trans('N'); char diag('N'); 02249 ctrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m, 02250 b.GetDataVoid(), &m, &info.GetInfoRef()); 02251 } 02252 02253 02254 template <class Prop0, class Allocator0, class Allocator2> 02255 void SolveLU(const Matrix<complex<double>, Prop0, ColLoTriang, 02256 Allocator0>& A, 02257 Vector<complex<double>, VectFull, Allocator2>& b, 02258 LapackInfo& info) 02259 { 02260 02261 #ifdef SELDON_CHECK_DIMENSIONS 02262 CheckDim(A, b, "SolveLU(A, X)"); 02263 #endif 02264 02265 int m = A.GetM(); int nrhs = 1; 02266 char uplo('L'); char trans('N'); char diag('N'); 02267 ztrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m, 02268 b.GetDataVoid(), &m, &info.GetInfoRef()); 02269 02270 } 02271 02272 02273 /*** ColLoTriang ***/ 02274 02275 02276 template <class Prop0, class Allocator0, class Allocator2> 02277 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 02278 const Matrix<float, Prop0, ColLoTriang, Allocator0>& A, 02279 Vector<float, VectFull, Allocator2>& b, 02280 LapackInfo& info) 02281 { 02282 02283 #ifdef SELDON_CHECK_DIMENSIONS 02284 CheckDim(A, b, "SolveLU(A, X)"); 02285 #endif 02286 02287 int m = A.GetM(); int nrhs = 1; 02288 char uplo('L'); 02289 char trans = TransA.Char(); char diag = DiagA.Char(); 02290 strtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m, 02291 b.GetData(), &m, &info.GetInfoRef()); 02292 } 02293 02294 02295 template <class Prop0, class Allocator0, class Allocator2> 02296 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 02297 const Matrix<double, Prop0, ColLoTriang, Allocator0>& A, 02298 Vector<double, VectFull, Allocator2>& b, 02299 LapackInfo& info) 02300 { 02301 02302 #ifdef SELDON_CHECK_DIMENSIONS 02303 CheckDim(A, b, "SolveLU(A, X)"); 02304 #endif 02305 02306 int m = A.GetM(); int nrhs = 1; 02307 char uplo('L'); 02308 char trans = TransA.Char(); char diag = DiagA.Char(); 02309 dtrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m, 02310 b.GetData(), &m, &info.GetInfoRef()); 02311 02312 } 02313 02314 02315 template <class Prop0, class Allocator0, class Allocator2> 02316 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 02317 const Matrix<complex<float>, Prop0, ColLoTriang, 02318 Allocator0>& A, 02319 Vector<complex<float>, VectFull, Allocator2>& b, 02320 LapackInfo& info) 02321 { 02322 02323 #ifdef SELDON_CHECK_DIMENSIONS 02324 CheckDim(A, b, "SolveLU(A, X)"); 02325 #endif 02326 02327 int m = A.GetM(); int nrhs = 1; 02328 char uplo('L'); 02329 char trans = TransA.Char(); char diag = DiagA.Char(); 02330 ctrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m, 02331 b.GetDataVoid(), &m, &info.GetInfoRef()); 02332 } 02333 02334 02335 template <class Prop0, class Allocator0, class Allocator2> 02336 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 02337 const Matrix<complex<double>, Prop0, ColLoTriang, 02338 Allocator0>& A, 02339 Vector<complex<double>, VectFull, Allocator2>& b, 02340 LapackInfo& info) 02341 { 02342 02343 #ifdef SELDON_CHECK_DIMENSIONS 02344 CheckDim(A, b, "SolveLU(A, X)"); 02345 #endif 02346 02347 int m = A.GetM(); int nrhs = 1; 02348 char uplo('L'); 02349 char trans = TransA.Char(); char diag = DiagA.Char(); 02350 ztrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m, 02351 b.GetDataVoid(), &m, &info.GetInfoRef()); 02352 02353 } 02354 02355 02356 /*** ColUpTriangPacked, NoTrans, and NonUnit ***/ 02357 02358 02359 template <class Prop0, class Allocator0, class Allocator2> 02360 void SolveLU(const Matrix<float, Prop0, ColUpTriangPacked, Allocator0>& A, 02361 Vector<float, VectFull, Allocator2>& b, 02362 LapackInfo& info) 02363 { 02364 02365 #ifdef SELDON_CHECK_DIMENSIONS 02366 CheckDim(A, b, "SolveLU(A, X)"); 02367 #endif 02368 02369 int m = A.GetM(); int nrhs = 1; 02370 char uplo('U'); char trans('N'); char diag('N'); 02371 stptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), 02372 b.GetData(), &m, &info.GetInfoRef()); 02373 } 02374 02375 02376 template <class Prop0, class Allocator0, class Allocator2> 02377 void SolveLU(const Matrix<double, Prop0, ColUpTriangPacked, Allocator0>& A, 02378 Vector<double, VectFull, Allocator2>& b, 02379 LapackInfo& info) 02380 { 02381 02382 #ifdef SELDON_CHECK_DIMENSIONS 02383 CheckDim(A, b, "SolveLU(A, X)"); 02384 #endif 02385 02386 int m = A.GetM(); int nrhs = 1; 02387 char uplo('U'); char trans('N'); char diag('N'); 02388 dtptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), 02389 b.GetData(), &m, &info.GetInfoRef()); 02390 02391 } 02392 02393 02394 template <class Prop0, class Allocator0, class Allocator2> 02395 void SolveLU(const Matrix<complex<float>, Prop0, ColUpTriangPacked, 02396 Allocator0>& A, 02397 Vector<complex<float>, VectFull, Allocator2>& b, 02398 LapackInfo& info) 02399 { 02400 02401 #ifdef SELDON_CHECK_DIMENSIONS 02402 CheckDim(A, b, "SolveLU(A, X)"); 02403 #endif 02404 02405 int m = A.GetM(); int nrhs = 1; 02406 char uplo('U'); char trans('N'); char diag('N'); 02407 ctptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), 02408 b.GetDataVoid(), &m, &info.GetInfoRef()); 02409 } 02410 02411 02412 template <class Prop0, class Allocator0, class Allocator2> 02413 void SolveLU(const Matrix<complex<double>, Prop0, ColUpTriangPacked, 02414 Allocator0>& A, 02415 Vector<complex<double>, VectFull, Allocator2>& b, 02416 LapackInfo& info) 02417 { 02418 02419 #ifdef SELDON_CHECK_DIMENSIONS 02420 CheckDim(A, b, "SolveLU(A, X)"); 02421 #endif 02422 02423 int m = A.GetM(); int nrhs = 1; 02424 char uplo('U'); char trans('N'); char diag('N'); 02425 ztptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), 02426 b.GetDataVoid(), &m, &info.GetInfoRef()); 02427 02428 } 02429 02430 02431 /*** ColUpTriangPacked ***/ 02432 02433 02434 template <class Prop0, class Allocator0, class Allocator2> 02435 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 02436 const Matrix<float, Prop0, ColUpTriangPacked, Allocator0>& A, 02437 Vector<float, VectFull, Allocator2>& b, 02438 LapackInfo& info) 02439 { 02440 02441 #ifdef SELDON_CHECK_DIMENSIONS 02442 CheckDim(A, b, "SolveLU(A, X)"); 02443 #endif 02444 02445 int m = A.GetM(); int nrhs = 1; 02446 char uplo('U'); 02447 char trans = TransA.Char(); char diag = DiagA.Char(); 02448 stptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), 02449 b.GetData(), &m, &info.GetInfoRef()); 02450 } 02451 02452 02453 template <class Prop0, class Allocator0, class Allocator2> 02454 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 02455 const Matrix<double, Prop0, ColUpTriangPacked, Allocator0>& A, 02456 Vector<double, VectFull, Allocator2>& b, 02457 LapackInfo& info) 02458 { 02459 02460 #ifdef SELDON_CHECK_DIMENSIONS 02461 CheckDim(A, b, "SolveLU(A, X)"); 02462 #endif 02463 02464 int m = A.GetM(); int nrhs = 1; 02465 char uplo('U'); 02466 char trans = TransA.Char(); char diag = DiagA.Char(); 02467 dtptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), 02468 b.GetData(), &m, &info.GetInfoRef()); 02469 02470 } 02471 02472 02473 template <class Prop0, class Allocator0, class Allocator2> 02474 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 02475 const Matrix<complex<float>, Prop0, ColUpTriangPacked, 02476 Allocator0>& A, 02477 Vector<complex<float>, VectFull, Allocator2>& b, 02478 LapackInfo& info) 02479 { 02480 02481 #ifdef SELDON_CHECK_DIMENSIONS 02482 CheckDim(A, b, "SolveLU(A, X)"); 02483 #endif 02484 02485 int m = A.GetM(); int nrhs = 1; 02486 char uplo('U'); 02487 char trans = TransA.Char(); char diag = DiagA.Char(); 02488 ctptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), 02489 b.GetDataVoid(), &m, &info.GetInfoRef()); 02490 } 02491 02492 02493 template <class Prop0, class Allocator0, class Allocator2> 02494 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 02495 const Matrix<complex<double>, Prop0, ColUpTriangPacked, 02496 Allocator0>& A, 02497 Vector<complex<double>, VectFull, Allocator2>& b, 02498 LapackInfo& info) 02499 { 02500 02501 #ifdef SELDON_CHECK_DIMENSIONS 02502 CheckDim(A, b, "SolveLU(A, X)"); 02503 #endif 02504 02505 int m = A.GetM(); int nrhs = 1; 02506 char uplo('U'); 02507 char trans = TransA.Char(); char diag = DiagA.Char(); 02508 ztptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), 02509 b.GetDataVoid(), &m, &info.GetInfoRef()); 02510 02511 } 02512 02513 02514 /*** ColLoTriangPacked, NoTrans and NonUnit ***/ 02515 02516 02517 template <class Prop0, class Allocator0, class Allocator2> 02518 void SolveLU(const Matrix<float, Prop0, ColLoTriangPacked, Allocator0>& A, 02519 Vector<float, VectFull, Allocator2>& b, 02520 LapackInfo& info) 02521 { 02522 02523 #ifdef SELDON_CHECK_DIMENSIONS 02524 CheckDim(A, b, "SolveLU(A, X)"); 02525 #endif 02526 02527 int m = A.GetM(); int nrhs = 1; 02528 char uplo('L'); char trans('N'); char diag('N'); 02529 stptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), 02530 b.GetData(), &m, &info.GetInfoRef()); 02531 } 02532 02533 02534 template <class Prop0, class Allocator0, class Allocator2> 02535 void SolveLU(const Matrix<double, Prop0, ColLoTriangPacked, Allocator0>& A, 02536 Vector<double, VectFull, Allocator2>& b, 02537 LapackInfo& info) 02538 { 02539 02540 #ifdef SELDON_CHECK_DIMENSIONS 02541 CheckDim(A, b, "SolveLU(A, X)"); 02542 #endif 02543 02544 int m = A.GetM(); int nrhs = 1; 02545 char uplo('L'); char trans('N'); char diag('N'); 02546 dtptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), 02547 b.GetData(), &m, &info.GetInfoRef()); 02548 02549 } 02550 02551 02552 template <class Prop0, class Allocator0, class Allocator2> 02553 void SolveLU(const Matrix<complex<float>, Prop0, ColLoTriangPacked, 02554 Allocator0>& A, 02555 Vector<complex<float>, VectFull, Allocator2>& b, 02556 LapackInfo& info) 02557 { 02558 02559 #ifdef SELDON_CHECK_DIMENSIONS 02560 CheckDim(A, b, "SolveLU(A, X)"); 02561 #endif 02562 02563 int m = A.GetM(); int nrhs = 1; 02564 char uplo('L'); char trans('N'); char diag('N'); 02565 ctptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), 02566 b.GetDataVoid(), &m, &info.GetInfoRef()); 02567 } 02568 02569 02570 template <class Prop0, class Allocator0, class Allocator2> 02571 void SolveLU(const Matrix<complex<double>, Prop0, ColLoTriangPacked, 02572 Allocator0>& A, 02573 Vector<complex<double>, VectFull, Allocator2>& b, 02574 LapackInfo& info) 02575 { 02576 02577 #ifdef SELDON_CHECK_DIMENSIONS 02578 CheckDim(A, b, "SolveLU(A, X)"); 02579 #endif 02580 02581 int m = A.GetM(); int nrhs = 1; 02582 char uplo('L'); char trans('N'); char diag('N'); 02583 ztptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), 02584 b.GetDataVoid(), &m, &info.GetInfoRef()); 02585 02586 } 02587 02588 02589 /*** ColLoTriangPacked ***/ 02590 02591 02592 template <class Prop0, class Allocator0, class Allocator2> 02593 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 02594 const Matrix<float, Prop0, ColLoTriangPacked, Allocator0>& A, 02595 Vector<float, VectFull, Allocator2>& b, 02596 LapackInfo& info) 02597 { 02598 02599 #ifdef SELDON_CHECK_DIMENSIONS 02600 CheckDim(A, b, "SolveLU(A, X)"); 02601 #endif 02602 02603 int m = A.GetM(); int nrhs = 1; 02604 char uplo('L'); 02605 char trans = TransA.Char(); char diag = DiagA.Char(); 02606 stptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), 02607 b.GetData(), &m, &info.GetInfoRef()); 02608 } 02609 02610 02611 template <class Prop0, class Allocator0, class Allocator2> 02612 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 02613 const Matrix<double, Prop0, ColLoTriangPacked, Allocator0>& A, 02614 Vector<double, VectFull, Allocator2>& b, 02615 LapackInfo& info) 02616 { 02617 02618 #ifdef SELDON_CHECK_DIMENSIONS 02619 CheckDim(A, b, "SolveLU(A, X)"); 02620 #endif 02621 02622 int m = A.GetM(); int nrhs = 1; 02623 char uplo('L'); 02624 char trans = TransA.Char(); char diag = DiagA.Char(); 02625 dtptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), 02626 b.GetData(), &m, &info.GetInfoRef()); 02627 02628 } 02629 02630 02631 template <class Prop0, class Allocator0, class Allocator2> 02632 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 02633 const Matrix<complex<float>, Prop0, ColLoTriangPacked, 02634 Allocator0>& A, 02635 Vector<complex<float>, VectFull, Allocator2>& b, 02636 LapackInfo& info) 02637 { 02638 02639 #ifdef SELDON_CHECK_DIMENSIONS 02640 CheckDim(A, b, "SolveLU(A, X)"); 02641 #endif 02642 02643 int m = A.GetM(); int nrhs = 1; 02644 char uplo('L'); 02645 char trans = TransA.Char(); char diag = DiagA.Char(); 02646 ctptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), 02647 b.GetDataVoid(), &m, &info.GetInfoRef()); 02648 } 02649 02650 02651 template <class Prop0, class Allocator0, class Allocator2> 02652 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 02653 const Matrix<complex<double>, Prop0, ColLoTriangPacked, 02654 Allocator0>& A, 02655 Vector<complex<double>, VectFull, Allocator2>& b, 02656 LapackInfo& info) 02657 { 02658 02659 #ifdef SELDON_CHECK_DIMENSIONS 02660 CheckDim(A, b, "SolveLU(A, X)"); 02661 #endif 02662 02663 int m = A.GetM(); int nrhs = 1; 02664 char uplo('L'); 02665 char trans = TransA.Char(); char diag = DiagA.Char(); 02666 ztptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), 02667 b.GetDataVoid(), &m, &info.GetInfoRef()); 02668 02669 } 02670 02671 02672 /*** RowUpTriang, NoTrans and NonUnit ***/ 02673 02674 02675 template <class Prop0, class Allocator0, class Allocator2> 02676 void SolveLU(const Matrix<float, Prop0, RowUpTriang, Allocator0>& A, 02677 Vector<float, VectFull, Allocator2>& b, 02678 LapackInfo& info) 02679 { 02680 02681 #ifdef SELDON_CHECK_DIMENSIONS 02682 CheckDim(A, b, "SolveLU(A, X)"); 02683 #endif 02684 02685 int m = A.GetM(); int nrhs = 1; 02686 char uplo('L'); char trans('T'); char diag('N'); 02687 strtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m, 02688 b.GetData(), &m, &info.GetInfoRef()); 02689 } 02690 02691 02692 template <class Prop0, class Allocator0, class Allocator2> 02693 void SolveLU(const Matrix<double, Prop0, RowUpTriang, Allocator0>& A, 02694 Vector<double, VectFull, Allocator2>& b, 02695 LapackInfo& info) 02696 { 02697 02698 #ifdef SELDON_CHECK_DIMENSIONS 02699 CheckDim(A, b, "SolveLU(A, X)"); 02700 #endif 02701 02702 int m = A.GetM(); int nrhs = 1; 02703 char uplo('L'); char trans('T'); char diag('N'); 02704 dtrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m, 02705 b.GetData(), &m, &info.GetInfoRef()); 02706 02707 } 02708 02709 02710 template <class Prop0, class Allocator0, class Allocator2> 02711 void 02712 SolveLU(const Matrix<complex<float>, Prop0, RowUpTriang, Allocator0>& A, 02713 Vector<complex<float>, VectFull, Allocator2>& b, 02714 LapackInfo& info) 02715 { 02716 02717 #ifdef SELDON_CHECK_DIMENSIONS 02718 CheckDim(A, b, "SolveLU(A, X)"); 02719 #endif 02720 02721 int m = A.GetM(); int nrhs = 1; 02722 char uplo('L'); char trans('T'); char diag('N'); 02723 ctrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m, 02724 b.GetDataVoid(), &m, &info.GetInfoRef()); 02725 } 02726 02727 02728 template <class Prop0, class Allocator0, class Allocator2> 02729 void 02730 SolveLU(const Matrix<complex<double>, Prop0, RowUpTriang, Allocator0>& A, 02731 Vector<complex<double>, VectFull, Allocator2>& b, 02732 LapackInfo& info) 02733 { 02734 02735 #ifdef SELDON_CHECK_DIMENSIONS 02736 CheckDim(A, b, "SolveLU(A, X)"); 02737 #endif 02738 02739 int m = A.GetM(); int nrhs = 1; 02740 char uplo('L'); char trans('T'); char diag('N'); 02741 ztrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m, 02742 b.GetDataVoid(), &m, &info.GetInfoRef()); 02743 02744 } 02745 02746 02747 /*** RowUpTriang ***/ 02748 02749 02750 template <class Prop0, class Allocator0, class Allocator2> 02751 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 02752 const Matrix<float, Prop0, RowUpTriang, Allocator0>& A, 02753 Vector<float, VectFull, Allocator2>& b, 02754 LapackInfo& info) 02755 { 02756 02757 #ifdef SELDON_CHECK_DIMENSIONS 02758 CheckDim(A, b, "SolveLU(A, X)"); 02759 #endif 02760 02761 int m = A.GetM(); int nrhs = 1; 02762 char uplo('L'); 02763 char trans = TransA.RevChar(); char diag = DiagA.Char(); 02764 strtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m, 02765 b.GetData(), &m, &info.GetInfoRef()); 02766 } 02767 02768 02769 template <class Prop0, class Allocator0, class Allocator2> 02770 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 02771 const Matrix<double, Prop0, RowUpTriang, Allocator0>& A, 02772 Vector<double, VectFull, Allocator2>& b, 02773 LapackInfo& info) 02774 { 02775 02776 #ifdef SELDON_CHECK_DIMENSIONS 02777 CheckDim(A, b, "SolveLU(A, X)"); 02778 #endif 02779 02780 int m = A.GetM(); int nrhs = 1; 02781 char uplo('L'); 02782 char trans = TransA.RevChar(); char diag = DiagA.Char(); 02783 dtrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m, 02784 b.GetData(), &m, &info.GetInfoRef()); 02785 02786 } 02787 02788 02789 template <class Prop0, class Allocator0, class Allocator2> 02790 void 02791 SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 02792 const Matrix<complex<float>, Prop0, RowUpTriang, Allocator0>& A, 02793 Vector<complex<float>, VectFull, Allocator2>& b, 02794 LapackInfo& info) 02795 { 02796 02797 #ifdef SELDON_CHECK_DIMENSIONS 02798 CheckDim(A, b, "SolveLU(A, X)"); 02799 #endif 02800 02801 int m = A.GetM(); int nrhs = 1; 02802 char uplo('L'); 02803 char trans = TransA.RevChar(); char diag = DiagA.Char(); 02804 if (TransA.ConjTrans()) 02805 Conjugate(b); 02806 ctrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m, 02807 b.GetDataVoid(), &m, &info.GetInfoRef()); 02808 if (TransA.ConjTrans()) 02809 Conjugate(b); 02810 } 02811 02812 02813 template <class Prop0, class Allocator0, class Allocator2> 02814 void 02815 SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 02816 const Matrix<complex<double>, Prop0, RowUpTriang, Allocator0>& A, 02817 Vector<complex<double>, VectFull, Allocator2>& b, 02818 LapackInfo& info) 02819 { 02820 02821 #ifdef SELDON_CHECK_DIMENSIONS 02822 CheckDim(A, b, "SolveLU(A, X)"); 02823 #endif 02824 02825 int m = A.GetM(); int nrhs = 1; 02826 char uplo('L'); 02827 char trans = TransA.RevChar(); char diag = DiagA.Char(); 02828 if (TransA.ConjTrans()) 02829 Conjugate(b); 02830 ztrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m, 02831 b.GetDataVoid(), &m, &info.GetInfoRef()); 02832 if (TransA.ConjTrans()) 02833 Conjugate(b); 02834 02835 } 02836 02837 02838 /*** RowLoTriang, NoTrans and NonUnit ***/ 02839 02840 02841 template <class Prop0, class Allocator0, class Allocator2> 02842 void SolveLU(const Matrix<float, Prop0, RowLoTriang, Allocator0>& A, 02843 Vector<float, VectFull, Allocator2>& b, 02844 LapackInfo& info) 02845 { 02846 02847 #ifdef SELDON_CHECK_DIMENSIONS 02848 CheckDim(A, b, "SolveLU(A, X)"); 02849 #endif 02850 02851 int m = A.GetM(); int nrhs = 1; 02852 char uplo('U'); char trans('T'); char diag('N'); 02853 strtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m, 02854 b.GetData(), &m, &info.GetInfoRef()); 02855 } 02856 02857 02858 template <class Prop0, class Allocator0, class Allocator2> 02859 void SolveLU(const Matrix<double, Prop0, RowLoTriang, Allocator0>& A, 02860 Vector<double, VectFull, Allocator2>& b, 02861 LapackInfo& info) 02862 { 02863 02864 #ifdef SELDON_CHECK_DIMENSIONS 02865 CheckDim(A, b, "SolveLU(A, X)"); 02866 #endif 02867 02868 int m = A.GetM(); int nrhs = 1; 02869 char uplo('U'); char trans('T'); char diag('N'); 02870 dtrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m, 02871 b.GetData(), &m, &info.GetInfoRef()); 02872 02873 } 02874 02875 02876 template <class Prop0, class Allocator0, class Allocator2> 02877 void 02878 SolveLU(const Matrix<complex<float>, Prop0, RowLoTriang, Allocator0>& A, 02879 Vector<complex<float>, VectFull, Allocator2>& b, 02880 LapackInfo& info) 02881 { 02882 02883 #ifdef SELDON_CHECK_DIMENSIONS 02884 CheckDim(A, b, "SolveLU(A, X)"); 02885 #endif 02886 02887 int m = A.GetM(); int nrhs = 1; 02888 char uplo('U'); char trans('T'); char diag('N'); 02889 ctrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m, 02890 b.GetDataVoid(), &m, &info.GetInfoRef()); 02891 } 02892 02893 02894 template <class Prop0, class Allocator0, class Allocator2> 02895 void 02896 SolveLU(const Matrix<complex<double>, Prop0, RowLoTriang, Allocator0>& A, 02897 Vector<complex<double>, VectFull, Allocator2>& b, 02898 LapackInfo& info) 02899 { 02900 02901 #ifdef SELDON_CHECK_DIMENSIONS 02902 CheckDim(A, b, "SolveLU(A, X)"); 02903 #endif 02904 02905 int m = A.GetM(); int nrhs = 1; 02906 char uplo('U'); char trans('T'); char diag('N'); 02907 ztrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m, 02908 b.GetDataVoid(), &m, &info.GetInfoRef()); 02909 02910 } 02911 02912 02913 /*** RowLoTriang ***/ 02914 02915 02916 template <class Prop0, class Allocator0, class Allocator2> 02917 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 02918 const Matrix<float, Prop0, RowLoTriang, Allocator0>& A, 02919 Vector<float, VectFull, Allocator2>& b, 02920 LapackInfo& info) 02921 { 02922 02923 #ifdef SELDON_CHECK_DIMENSIONS 02924 CheckDim(A, b, "SolveLU(A, X)"); 02925 #endif 02926 02927 int m = A.GetM(); int nrhs = 1; 02928 char uplo('U'); 02929 char trans = TransA.RevChar(); char diag = DiagA.Char(); 02930 strtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m, 02931 b.GetData(), &m, &info.GetInfoRef()); 02932 } 02933 02934 02935 template <class Prop0, class Allocator0, class Allocator2> 02936 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 02937 const Matrix<double, Prop0, RowLoTriang, Allocator0>& A, 02938 Vector<double, VectFull, Allocator2>& b, 02939 LapackInfo& info) 02940 { 02941 02942 #ifdef SELDON_CHECK_DIMENSIONS 02943 CheckDim(A, b, "SolveLU(A, X)"); 02944 #endif 02945 02946 int m = A.GetM(); int nrhs = 1; 02947 char uplo('U'); 02948 char trans = TransA.RevChar(); char diag = DiagA.Char(); 02949 dtrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m, 02950 b.GetData(), &m, &info.GetInfoRef()); 02951 02952 } 02953 02954 02955 template <class Prop0, class Allocator0, class Allocator2> 02956 void 02957 SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 02958 const Matrix<complex<float>, Prop0, RowLoTriang, Allocator0>& A, 02959 Vector<complex<float>, VectFull, Allocator2>& b, 02960 LapackInfo& info) 02961 { 02962 02963 #ifdef SELDON_CHECK_DIMENSIONS 02964 CheckDim(A, b, "SolveLU(A, X)"); 02965 #endif 02966 02967 int m = A.GetM(); int nrhs = 1; 02968 char uplo('U'); 02969 char trans = TransA.RevChar(); char diag = DiagA.Char(); 02970 if (TransA.ConjTrans()) 02971 Conjugate(b); 02972 ctrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m, 02973 b.GetDataVoid(), &m, &info.GetInfoRef()); 02974 if (TransA.ConjTrans()) 02975 Conjugate(b); 02976 } 02977 02978 02979 template <class Prop0, class Allocator0, class Allocator2> 02980 void 02981 SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 02982 const Matrix<complex<double>, Prop0, RowLoTriang, Allocator0>& A, 02983 Vector<complex<double>, VectFull, Allocator2>& b, 02984 LapackInfo& info) 02985 { 02986 02987 #ifdef SELDON_CHECK_DIMENSIONS 02988 CheckDim(A, b, "SolveLU(A, X)"); 02989 #endif 02990 02991 int m = A.GetM(); int nrhs = 1; 02992 char uplo('U'); 02993 char trans = TransA.RevChar(); char diag = DiagA.Char(); 02994 if (TransA.ConjTrans()) 02995 Conjugate(b); 02996 ztrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m, 02997 b.GetDataVoid(), &m, &info.GetInfoRef()); 02998 if (TransA.ConjTrans()) 02999 Conjugate(b); 03000 } 03001 03002 03003 /*** RowUpTriangPacked, NoTrans and NonUnit ***/ 03004 03005 03006 template <class Prop0, class Allocator0, class Allocator2> 03007 void SolveLU(const Matrix<float, Prop0, RowUpTriangPacked, Allocator0>& A, 03008 Vector<float, VectFull, Allocator2>& b, 03009 LapackInfo& info) 03010 { 03011 03012 #ifdef SELDON_CHECK_DIMENSIONS 03013 CheckDim(A, b, "SolveLU(A, X)"); 03014 #endif 03015 03016 int m = A.GetM(); int nrhs = 1; 03017 char uplo('L'); char trans('T'); char diag('N'); 03018 stptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), 03019 b.GetData(), &m, &info.GetInfoRef()); 03020 } 03021 03022 03023 template <class Prop0, class Allocator0, class Allocator2> 03024 void SolveLU(const Matrix<double, Prop0, RowUpTriangPacked, Allocator0>& A, 03025 Vector<double, VectFull, Allocator2>& b, 03026 LapackInfo& info) 03027 { 03028 03029 #ifdef SELDON_CHECK_DIMENSIONS 03030 CheckDim(A, b, "SolveLU(A, X)"); 03031 #endif 03032 03033 int m = A.GetM(); int nrhs = 1; 03034 char uplo('L'); char trans('T'); char diag('N'); 03035 dtptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), 03036 b.GetData(), &m, &info.GetInfoRef()); 03037 03038 } 03039 03040 03041 template <class Prop0, class Allocator0, class Allocator2> 03042 void SolveLU(const Matrix<complex<float>, Prop0, RowUpTriangPacked, 03043 Allocator0>& A, 03044 Vector<complex<float>, VectFull, Allocator2>& b, 03045 LapackInfo& info) 03046 { 03047 03048 #ifdef SELDON_CHECK_DIMENSIONS 03049 CheckDim(A, b, "SolveLU(A, X)"); 03050 #endif 03051 03052 int m = A.GetM(); int nrhs = 1; 03053 char uplo('L'); char trans('T'); char diag('N'); 03054 ctptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), 03055 b.GetDataVoid(), &m, &info.GetInfoRef()); 03056 } 03057 03058 03059 template <class Prop0, class Allocator0, class Allocator2> 03060 void SolveLU(const Matrix<complex<double>, Prop0, RowUpTriangPacked, 03061 Allocator0>& A, 03062 Vector<complex<double>, VectFull, Allocator2>& b, 03063 LapackInfo& info) 03064 { 03065 03066 #ifdef SELDON_CHECK_DIMENSIONS 03067 CheckDim(A, b, "SolveLU(A, X)"); 03068 #endif 03069 03070 int m = A.GetM(); int nrhs = 1; 03071 char uplo('L'); char trans('T'); char diag('N'); 03072 ztptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), 03073 b.GetDataVoid(), &m, &info.GetInfoRef()); 03074 03075 } 03076 03077 03078 /*** RowUpTriangPacked ***/ 03079 03080 03081 template <class Prop0, class Allocator0, class Allocator2> 03082 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 03083 const Matrix<float, Prop0, RowUpTriangPacked, Allocator0>& A, 03084 Vector<float, VectFull, Allocator2>& b, 03085 LapackInfo& info) 03086 { 03087 03088 #ifdef SELDON_CHECK_DIMENSIONS 03089 CheckDim(A, b, "SolveLU(A, X)"); 03090 #endif 03091 03092 int m = A.GetM(); int nrhs = 1; 03093 char uplo('L'); 03094 char trans = TransA.RevChar(); char diag = DiagA.Char(); 03095 stptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), 03096 b.GetData(), &m, &info.GetInfoRef()); 03097 } 03098 03099 03100 template <class Prop0, class Allocator0, class Allocator2> 03101 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 03102 const Matrix<double, Prop0, RowUpTriangPacked, Allocator0>& A, 03103 Vector<double, VectFull, Allocator2>& b, 03104 LapackInfo& info) 03105 { 03106 03107 #ifdef SELDON_CHECK_DIMENSIONS 03108 CheckDim(A, b, "SolveLU(A, X)"); 03109 #endif 03110 03111 int m = A.GetM(); int nrhs = 1; 03112 char uplo('L'); 03113 char trans = TransA.RevChar(); char diag = DiagA.Char(); 03114 dtptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), 03115 b.GetData(), &m, &info.GetInfoRef()); 03116 03117 } 03118 03119 03120 template <class Prop0, class Allocator0, class Allocator2> 03121 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 03122 const Matrix<complex<float>, Prop0, RowUpTriangPacked, 03123 Allocator0>& A, 03124 Vector<complex<float>, VectFull, Allocator2>& b, 03125 LapackInfo& info) 03126 { 03127 03128 #ifdef SELDON_CHECK_DIMENSIONS 03129 CheckDim(A, b, "SolveLU(A, X)"); 03130 #endif 03131 03132 int m = A.GetM(); int nrhs = 1; 03133 char uplo('L'); 03134 char trans = TransA.RevChar(); char diag = DiagA.Char(); 03135 if (TransA.ConjTrans()) 03136 Conjugate(b); 03137 ctptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), 03138 b.GetDataVoid(), &m, &info.GetInfoRef()); 03139 if (TransA.ConjTrans()) 03140 Conjugate(b); 03141 } 03142 03143 03144 template <class Prop0, class Allocator0, class Allocator2> 03145 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 03146 const Matrix<complex<double>, Prop0, RowUpTriangPacked, 03147 Allocator0>& A, 03148 Vector<complex<double>, VectFull, Allocator2>& b, 03149 LapackInfo& info) 03150 { 03151 03152 #ifdef SELDON_CHECK_DIMENSIONS 03153 CheckDim(A, b, "SolveLU(A, X)"); 03154 #endif 03155 03156 int m = A.GetM(); int nrhs = 1; 03157 char uplo('L'); 03158 char trans = TransA.RevChar(); char diag = DiagA.Char(); 03159 if (TransA.ConjTrans()) 03160 Conjugate(b); 03161 ztptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), 03162 b.GetDataVoid(), &m, &info.GetInfoRef()); 03163 if (TransA.ConjTrans()) 03164 Conjugate(b); 03165 } 03166 03167 03168 /*** RowLoTriangPacked, NoTrans and NonUnit ***/ 03169 03170 03171 template <class Prop0, class Allocator0, class Allocator2> 03172 void SolveLU(const Matrix<float, Prop0, RowLoTriangPacked, Allocator0>& A, 03173 Vector<float, VectFull, Allocator2>& b, 03174 LapackInfo& info) 03175 { 03176 03177 #ifdef SELDON_CHECK_DIMENSIONS 03178 CheckDim(A, b, "SolveLU(A, X)"); 03179 #endif 03180 03181 int m = A.GetM(); int nrhs = 1; 03182 char uplo('U'); char trans('T'); char diag('N'); 03183 stptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), 03184 b.GetData(), &m, &info.GetInfoRef()); 03185 } 03186 03187 03188 template <class Prop0, class Allocator0, class Allocator2> 03189 void SolveLU(const Matrix<double, Prop0, RowLoTriangPacked, Allocator0>& A, 03190 Vector<double, VectFull, Allocator2>& b, 03191 LapackInfo& info) 03192 { 03193 03194 #ifdef SELDON_CHECK_DIMENSIONS 03195 CheckDim(A, b, "SolveLU(A, X)"); 03196 #endif 03197 03198 int m = A.GetM(); int nrhs = 1; 03199 char uplo('U'); char trans('T'); char diag('N'); 03200 dtptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), 03201 b.GetData(), &m, &info.GetInfoRef()); 03202 03203 } 03204 03205 03206 template <class Prop0, class Allocator0, class Allocator2> 03207 void SolveLU(const Matrix<complex<float>, Prop0, RowLoTriangPacked, 03208 Allocator0>& A, 03209 Vector<complex<float>, VectFull, Allocator2>& b, 03210 LapackInfo& info) 03211 { 03212 03213 #ifdef SELDON_CHECK_DIMENSIONS 03214 CheckDim(A, b, "SolveLU(A, X)"); 03215 #endif 03216 03217 int m = A.GetM(); int nrhs = 1; 03218 char uplo('U'); char trans('T'); char diag('N'); 03219 03220 03221 ctptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), 03222 b.GetDataVoid(), &m, &info.GetInfoRef()); 03223 } 03224 03225 03226 template <class Prop0, class Allocator0, class Allocator2> 03227 void SolveLU(const Matrix<complex<double>, Prop0, RowLoTriangPacked, 03228 Allocator0>& A, 03229 Vector<complex<double>, VectFull, Allocator2>& b, 03230 LapackInfo& info) 03231 { 03232 03233 #ifdef SELDON_CHECK_DIMENSIONS 03234 CheckDim(A, b, "SolveLU(A, X)"); 03235 #endif 03236 03237 int m = A.GetM(); int nrhs = 1; 03238 char uplo('U'); char trans('T'); char diag('N'); 03239 ztptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), 03240 b.GetDataVoid(), &m, &info.GetInfoRef()); 03241 03242 } 03243 03244 03245 /*** RowLoTriangPacked ***/ 03246 03247 03248 template <class Prop0, class Allocator0, class Allocator2> 03249 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 03250 const Matrix<float, Prop0, RowLoTriangPacked, Allocator0>& A, 03251 Vector<float, VectFull, Allocator2>& b, 03252 LapackInfo& info) 03253 { 03254 03255 #ifdef SELDON_CHECK_DIMENSIONS 03256 CheckDim(A, b, "SolveLU(A, X)"); 03257 #endif 03258 03259 int m = A.GetM(); int nrhs = 1; 03260 char uplo('U'); 03261 char trans = TransA.RevChar(); char diag = DiagA.Char(); 03262 stptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), 03263 b.GetData(), &m, &info.GetInfoRef()); 03264 } 03265 03266 03267 template <class Prop0, class Allocator0, class Allocator2> 03268 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 03269 const Matrix<double, Prop0, RowLoTriangPacked, Allocator0>& A, 03270 Vector<double, VectFull, Allocator2>& b, 03271 LapackInfo& info) 03272 { 03273 03274 #ifdef SELDON_CHECK_DIMENSIONS 03275 CheckDim(A, b, "SolveLU(A, X)"); 03276 #endif 03277 03278 int m = A.GetM(); int nrhs = 1; 03279 char uplo('U'); 03280 char trans = TransA.RevChar(); char diag = DiagA.Char(); 03281 dtptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), 03282 b.GetData(), &m, &info.GetInfoRef()); 03283 03284 } 03285 03286 03287 template <class Prop0, class Allocator0, class Allocator2> 03288 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 03289 const Matrix<complex<float>, Prop0, RowLoTriangPacked, 03290 Allocator0>& A, 03291 Vector<complex<float>, VectFull, Allocator2>& b, 03292 LapackInfo& info) 03293 { 03294 03295 #ifdef SELDON_CHECK_DIMENSIONS 03296 CheckDim(A, b, "SolveLU(A, X)"); 03297 #endif 03298 03299 int m = A.GetM(); int nrhs = 1; 03300 char uplo('U'); 03301 char trans = TransA.RevChar(); char diag = DiagA.Char(); 03302 if (TransA.ConjTrans()) 03303 Conjugate(b); 03304 ctptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), 03305 b.GetDataVoid(), &m, &info.GetInfoRef()); 03306 if (TransA.ConjTrans()) 03307 Conjugate(b); 03308 } 03309 03310 03311 template <class Prop0, class Allocator0, class Allocator2> 03312 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 03313 const Matrix<complex<double>, Prop0, RowLoTriangPacked, 03314 Allocator0>& A, 03315 Vector<complex<double>, VectFull, Allocator2>& b, 03316 LapackInfo& info) 03317 { 03318 03319 #ifdef SELDON_CHECK_DIMENSIONS 03320 CheckDim(A, b, "SolveLU(A, X)"); 03321 #endif 03322 03323 int m = A.GetM(); int nrhs = 1; 03324 char uplo('U'); 03325 char trans = TransA.RevChar(); char diag = DiagA.Char(); 03326 if (TransA.ConjTrans()) 03327 Conjugate(b); 03328 ztptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), 03329 b.GetDataVoid(), &m, &info.GetInfoRef()); 03330 if (TransA.ConjTrans()) 03331 Conjugate(b); 03332 } 03333 03334 03335 // SolveLU // 03337 03338 03339 03341 // ReciprocalConditionNumber // 03342 03343 03344 /*** ColMajor ***/ 03345 03346 03347 template<class Prop0, class Allocator0, class Allocator1> 03348 float ReciprocalConditionNumber(const Matrix<float, Prop0, ColMajor, 03349 Allocator0>& A, 03350 Vector<int, VectFull, Allocator1>& P, 03351 SeldonNorm norm, float anorm, 03352 LapackInfo& info) 03353 { 03354 char norm_type = norm.Char(); 03355 03356 int n = A.GetM(); float rcond(0); 03357 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(4*n); 03358 sgecon_(&norm_type, &n, A.GetData(), &n, &anorm, &rcond, 03359 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 03360 return rcond; 03361 } 03362 03363 03364 template<class Prop0, class Allocator0, class Allocator1> 03365 double ReciprocalConditionNumber(const Matrix<double, Prop0, ColMajor, 03366 Allocator0>& A, 03367 Vector<int, VectFull, Allocator1>& P, 03368 SeldonNorm norm, double anorm, 03369 LapackInfo& info) 03370 { 03371 char norm_type = norm.Char(); 03372 03373 int n = A.GetM(); double rcond(0); 03374 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(4*n); 03375 dgecon_(&norm_type, &n, A.GetData(), &n, &anorm, &rcond, 03376 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 03377 return rcond; 03378 } 03379 03380 03381 template<class Prop0, class Allocator0, class Allocator1> 03382 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0, 03383 ColMajor, Allocator0>& A, 03384 Vector<int, VectFull, Allocator1>& P, 03385 SeldonNorm norm, float anorm, 03386 LapackInfo& info) 03387 { 03388 char norm_type = norm.Char(); 03389 03390 int n = A.GetM(); float rcond(0); 03391 Vector<float> rwork(2*n); 03392 Vector<complex<float>, VectFull, Allocator0> work(2*n); 03393 cgecon_(&norm_type, &n, A.GetDataVoid(), &n, &anorm, &rcond, 03394 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 03395 return rcond; 03396 } 03397 03398 03399 template<class Prop0, class Allocator0, class Allocator1> 03400 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0, 03401 ColMajor, Allocator0>& A, 03402 Vector<int, VectFull, Allocator1>& P, 03403 SeldonNorm norm, double anorm, 03404 LapackInfo& info) 03405 { 03406 char norm_type = norm.Char(); 03407 03408 int n = A.GetM(); double rcond(0); 03409 Vector<double> rwork(2*n); 03410 Vector<complex<double>, VectFull, Allocator0> work(2*n); 03411 zgecon_(&norm_type, &n, A.GetDataVoid(), &n, &anorm, &rcond, 03412 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 03413 return rcond; 03414 } 03415 03416 03417 /*** RowMajor ***/ 03418 03419 03420 template<class Prop0, class Allocator0, class Allocator1> 03421 float ReciprocalConditionNumber(const Matrix<float, Prop0, RowMajor, 03422 Allocator0>& A, 03423 Vector<int, VectFull, Allocator1>& P, 03424 SeldonNorm norm, float anorm, 03425 LapackInfo& info) 03426 { 03427 char norm_type = norm.RevChar(); 03428 03429 int n = A.GetM(); float rcond(0); 03430 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(4*n); 03431 sgecon_(&norm_type, &n, A.GetData(), &n, &anorm, &rcond, 03432 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 03433 return rcond; 03434 } 03435 03436 03437 template<class Prop0, class Allocator0, class Allocator1> 03438 double ReciprocalConditionNumber(const Matrix<double, Prop0, RowMajor, 03439 Allocator0>& A, 03440 Vector<int, VectFull, Allocator1>& P, 03441 SeldonNorm norm, double anorm, 03442 LapackInfo& info) 03443 { 03444 char norm_type = norm.RevChar(); 03445 03446 int n = A.GetM(); double rcond(0); 03447 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(4*n); 03448 dgecon_(&norm_type, &n, A.GetData(), &n, &anorm, &rcond, 03449 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 03450 return rcond; 03451 } 03452 03453 03454 template<class Prop0, class Allocator0, class Allocator1> 03455 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0, 03456 RowMajor, Allocator0>& A, 03457 Vector<int, VectFull, Allocator1>& P, 03458 SeldonNorm norm, float anorm, 03459 LapackInfo& info) 03460 { 03461 char norm_type = norm.RevChar(); 03462 03463 int n = A.GetM(); float rcond(0); 03464 Vector<float> rwork(2*n); 03465 Vector<complex<float>, VectFull, Allocator0> work(2*n); 03466 cgecon_(&norm_type, &n, A.GetDataVoid(), &n, &anorm, &rcond, 03467 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 03468 return rcond; 03469 } 03470 03471 03472 template<class Prop0, class Allocator0, class Allocator1> 03473 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0, 03474 RowMajor, Allocator0>& A, 03475 Vector<int, VectFull, Allocator1>& P, 03476 SeldonNorm norm, double anorm, 03477 LapackInfo& info) 03478 { 03479 char norm_type = norm.RevChar(); 03480 03481 int n = A.GetM(); double rcond(0); 03482 Vector<double> rwork(2*n); 03483 Vector<complex<double>, VectFull, Allocator0> work(2*n); 03484 zgecon_(&norm_type, &n, A.GetDataVoid(), &n, &anorm, &rcond, 03485 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 03486 return rcond; 03487 } 03488 03489 03490 /*** ColSym and Upper ***/ 03491 03492 03493 template<class Prop0, class Allocator0, class Allocator1> 03494 float ReciprocalConditionNumber(const Matrix<float, Prop0, ColSym, 03495 Allocator0>& A, 03496 Vector<int, VectFull, Allocator1>& P, 03497 SeldonNorm norm, float anorm, 03498 LapackInfo& info) 03499 { 03500 char uplo('U'); 03501 03502 int n = A.GetM(); float rcond(0); 03503 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(2*n); 03504 ssycon_(&uplo, &n, A.GetData(), &n, P.GetData(), &anorm, &rcond, 03505 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 03506 return rcond; 03507 } 03508 03509 03510 template<class Prop0, class Allocator0, class Allocator1> 03511 double ReciprocalConditionNumber(const Matrix<double, Prop0, ColSym, 03512 Allocator0>& A, 03513 Vector<int, VectFull, Allocator1>& P, 03514 SeldonNorm norm, double anorm, 03515 LapackInfo& info) 03516 { 03517 char uplo('U'); 03518 03519 int n = A.GetM(); double rcond(0); 03520 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(2*n); 03521 dsycon_(&uplo, &n, A.GetData(), &n, P.GetData(), &anorm, &rcond, 03522 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 03523 return rcond; 03524 } 03525 03526 03527 template<class Prop0, class Allocator0, class Allocator1> 03528 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0, 03529 ColSym, Allocator0>& A, 03530 Vector<int, VectFull, Allocator1>& P, 03531 SeldonNorm norm, float anorm, 03532 LapackInfo& info) 03533 { 03534 char uplo('U'); 03535 03536 int n = A.GetM(); float rcond(0); 03537 Vector<complex<float>, VectFull, Allocator0> work(2*n); 03538 csycon_(&uplo, &n, A.GetDataVoid(), &n, P.GetData(), &anorm, &rcond, 03539 work.GetDataVoid(), &info.GetInfoRef()); 03540 return rcond; 03541 } 03542 03543 03544 template<class Prop0, class Allocator0, class Allocator1> 03545 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0, 03546 ColSym, Allocator0>& A, 03547 Vector<int, VectFull, Allocator1>& P, 03548 SeldonNorm norm, double anorm, 03549 LapackInfo& info) 03550 { 03551 char uplo('U'); 03552 03553 int n = A.GetM(); double rcond(0); 03554 Vector<complex<double>, VectFull, Allocator0> work(2*n); 03555 zsycon_(&uplo, &n, A.GetDataVoid(), &n, P.GetData(), &anorm, &rcond, 03556 work.GetDataVoid(), &info.GetInfoRef()); 03557 return rcond; 03558 } 03559 03560 03561 /*** ColSymPacked and Upper ***/ 03562 03563 03564 template<class Prop0, class Allocator0, class Allocator1> 03565 float ReciprocalConditionNumber(const Matrix<float, Prop0, 03566 ColSymPacked, Allocator0>& A, 03567 Vector<int, VectFull, Allocator1>& P, 03568 SeldonNorm norm, float anorm, 03569 LapackInfo& info) 03570 { 03571 char uplo('U'); 03572 03573 int n = A.GetM(); float rcond(0); 03574 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(2*n); 03575 sspcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond, 03576 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 03577 return rcond; 03578 } 03579 03580 03581 template<class Prop0, class Allocator0, class Allocator1> 03582 double ReciprocalConditionNumber(const Matrix<double, Prop0, ColSymPacked, 03583 Allocator0>& A, 03584 Vector<int, VectFull, Allocator1>& P, 03585 SeldonNorm norm, double anorm, 03586 LapackInfo& info) 03587 { 03588 char uplo('U'); 03589 03590 int n = A.GetM(); double rcond(0); 03591 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(2*n); 03592 dspcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond, 03593 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 03594 return rcond; 03595 } 03596 03597 03598 template<class Prop0, class Allocator0, class Allocator1> 03599 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0, 03600 ColSymPacked, Allocator0>& A, 03601 Vector<int, VectFull, Allocator1>& P, 03602 SeldonNorm norm, float anorm, 03603 LapackInfo& info) 03604 { 03605 char uplo('U'); 03606 03607 int n = A.GetM(); float rcond(0); 03608 Vector<complex<float>, VectFull, Allocator0> work(2*n); 03609 cspcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond, 03610 work.GetData(), &info.GetInfoRef()); 03611 return rcond; 03612 } 03613 03614 03615 template<class Prop0, class Allocator0, class Allocator1> 03616 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0, 03617 ColSymPacked, Allocator0>& A, 03618 Vector<int, VectFull, Allocator1>& P, 03619 SeldonNorm norm, double anorm, 03620 LapackInfo& info) 03621 { 03622 char uplo('U'); 03623 03624 int n = A.GetM(); double rcond(0); 03625 Vector<complex<double>, VectFull, Allocator0> work(2*n); 03626 zspcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond, 03627 work.GetData(), &info.GetInfoRef()); 03628 return rcond; 03629 } 03630 03631 03632 /*** RowSym and Upper ***/ 03633 03634 03635 template<class Prop0, class Allocator0, class Allocator1> 03636 float ReciprocalConditionNumber(const Matrix<float, Prop0, RowSym, 03637 Allocator0>& A, 03638 Vector<int, VectFull, Allocator1>& P, 03639 SeldonNorm norm, float anorm, 03640 LapackInfo& info) 03641 { 03642 char uplo('L'); 03643 03644 int n = A.GetM(); float rcond(0); 03645 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(2*n); 03646 ssycon_(&uplo, &n, A.GetData(), &n, P.GetData(), &anorm, &rcond, 03647 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 03648 return rcond; 03649 } 03650 03651 03652 template<class Prop0, class Allocator0, class Allocator1> 03653 double ReciprocalConditionNumber(const Matrix<double, Prop0, RowSym, 03654 Allocator0>& A, 03655 Vector<int, VectFull, Allocator1>& P, 03656 SeldonNorm norm, double anorm, 03657 LapackInfo& info) 03658 { 03659 char uplo('L'); 03660 03661 int n = A.GetM(); double rcond(0); 03662 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(2*n); 03663 dsycon_(&uplo, &n, A.GetData(), &n, P.GetData(), &anorm, &rcond, 03664 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 03665 return rcond; 03666 } 03667 03668 03669 template<class Prop0, class Allocator0, class Allocator1> 03670 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0, RowSym, 03671 Allocator0>& A, 03672 Vector<int, VectFull, Allocator1>& P, 03673 SeldonNorm norm, float anorm, 03674 LapackInfo& info) 03675 { 03676 char uplo('L'); 03677 03678 int n = A.GetM(); float rcond(0); 03679 Vector<complex<float>, VectFull, Allocator0> work(2*n); 03680 csycon_(&uplo, &n, A.GetDataVoid(), &n, P.GetData(), &anorm, &rcond, 03681 work.GetDataVoid(), &info.GetInfoRef()); 03682 return rcond; 03683 } 03684 03685 03686 template<class Prop0, class Allocator0, class Allocator1> 03687 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0, 03688 RowSym, Allocator0>& A, 03689 Vector<int, VectFull, Allocator1>& P, 03690 SeldonNorm norm, double anorm, 03691 LapackInfo& info) 03692 { 03693 char uplo('L'); 03694 03695 int n = A.GetM(); double rcond(0); 03696 Vector<complex<double>, VectFull, Allocator0> work(2*n); 03697 zsycon_(&uplo, &n, A.GetDataVoid(), &n, P.GetData(), &anorm, &rcond, 03698 work.GetDataVoid(), &info.GetInfoRef()); 03699 return rcond; 03700 } 03701 03702 03703 /*** RowSymPacked and Upper ***/ 03704 03705 03706 template<class Prop0, class Allocator0, class Allocator1> 03707 float ReciprocalConditionNumber(const Matrix<float, Prop0, RowSymPacked, 03708 Allocator0>& A, 03709 Vector<int, VectFull, Allocator1>& P, 03710 SeldonNorm norm, float anorm, 03711 LapackInfo& info) 03712 { 03713 char uplo('L'); 03714 03715 int n = A.GetM(); float rcond(0); 03716 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(2*n); 03717 sspcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond, 03718 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 03719 return rcond; 03720 } 03721 03722 03723 template<class Prop0, class Allocator0, class Allocator1> 03724 double ReciprocalConditionNumber(const Matrix<double, Prop0, RowSymPacked, 03725 Allocator0>& A, 03726 Vector<int, VectFull, Allocator1>& P, 03727 SeldonNorm norm, double anorm, 03728 LapackInfo& info) 03729 { 03730 char uplo('L'); 03731 03732 int n = A.GetM(); double rcond(0); 03733 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(2*n); 03734 dspcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond, 03735 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 03736 return rcond; 03737 } 03738 03739 03740 template<class Prop0, class Allocator0, class Allocator1> 03741 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0, 03742 RowSymPacked, Allocator0>& A, 03743 Vector<int, VectFull, Allocator1>& P, 03744 SeldonNorm norm, float anorm, 03745 LapackInfo& info) 03746 { 03747 char uplo('L'); 03748 03749 int n = A.GetM(); float rcond(0); 03750 Vector<complex<float>, VectFull, Allocator0> work(2*n); 03751 cspcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond, 03752 work.GetData(), &info.GetInfoRef()); 03753 return rcond; 03754 } 03755 03756 03757 template<class Prop0, class Allocator0, class Allocator1> 03758 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0, 03759 RowSymPacked, Allocator0>& A, 03760 Vector<int, VectFull, Allocator1>& P, 03761 SeldonNorm norm, double anorm, 03762 LapackInfo& info) 03763 { 03764 char uplo('L'); 03765 03766 int n = A.GetM(); double rcond(0); 03767 Vector<complex<double>, VectFull, Allocator0> work(2*n); 03768 zspcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond, 03769 work.GetData(), &info.GetInfoRef()); 03770 return rcond; 03771 } 03772 03773 03774 /*** ColHerm and Upper ***/ 03775 03776 03777 template<class Prop0, class Allocator0, class Allocator1> 03778 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0, 03779 ColHerm, Allocator0>& A, 03780 Vector<int, VectFull, Allocator1>& P, 03781 SeldonNorm norm, float anorm, 03782 LapackInfo& info) 03783 { 03784 char uplo('U'); 03785 03786 int n = A.GetM(); float rcond(0); 03787 Vector<complex<float>, VectFull, Allocator0> work(2*n); 03788 checon_(&uplo, &n, A.GetData(), &n, P.GetData(), &anorm, &rcond, 03789 work.GetData(), &info.GetInfoRef()); 03790 return rcond; 03791 } 03792 03793 03794 template<class Prop0, class Allocator0, class Allocator1> 03795 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0, 03796 ColHerm, Allocator0>& A, 03797 Vector<int, VectFull, Allocator1>& P, 03798 SeldonNorm norm, double anorm, 03799 LapackInfo& info) 03800 { 03801 char uplo('U'); 03802 03803 int n = A.GetM(); double rcond(0); 03804 Vector<complex<double>, VectFull, Allocator0> work(2*n); 03805 zhecon_(&uplo, &n, A.GetData(), &n, P.GetData(), &anorm, &rcond, 03806 work.GetData(), &info.GetInfoRef()); 03807 return rcond; 03808 } 03809 03810 03811 /*** ColHermPacked and Upper ***/ 03812 03813 03814 template<class Prop0, class Allocator0, class Allocator1> 03815 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0, 03816 ColHermPacked, Allocator0>& A, 03817 Vector<int, VectFull, Allocator1>& P, 03818 SeldonNorm norm, float anorm, 03819 LapackInfo& info) 03820 { 03821 char uplo('U'); 03822 03823 int n = A.GetM(); float rcond(0); 03824 Vector<complex<float>, VectFull, Allocator0> work(2*n); 03825 chpcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond, 03826 work.GetData(), &info.GetInfoRef()); 03827 return rcond; 03828 } 03829 03830 03831 template<class Prop0, class Allocator0, class Allocator1> 03832 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0, 03833 ColHermPacked, Allocator0>& A, 03834 Vector<int, VectFull, Allocator1>& P, 03835 SeldonNorm norm, double anorm, 03836 LapackInfo& info) 03837 { 03838 char uplo('U'); 03839 03840 int n = A.GetM(); double rcond(0); 03841 Vector<complex<double>, VectFull, Allocator0> work(2*n); 03842 zhpcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond, 03843 work.GetData(), &info.GetInfoRef()); 03844 return rcond; 03845 } 03846 03847 03848 /*** RowHerm and Upper ***/ 03849 03850 03851 template<class Prop0, class Allocator0, class Allocator1> 03852 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0, 03853 RowHerm, Allocator0>& A, 03854 Vector<int, VectFull, Allocator1>& P, 03855 SeldonNorm norm, float anorm, 03856 LapackInfo& info) 03857 { 03858 char uplo('L'); 03859 03860 int n = A.GetM(); float rcond(0); 03861 Vector<complex<float>, VectFull, Allocator0> work(2*n); 03862 checon_(&uplo, &n, A.GetData(), &n, P.GetData(), &anorm, &rcond, 03863 work.GetData(), &info.GetInfoRef()); 03864 return rcond; 03865 } 03866 03867 03868 template<class Prop0, class Allocator0, class Allocator1> 03869 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0, 03870 RowHerm, Allocator0>& A, 03871 Vector<int, VectFull, Allocator1>& P, 03872 SeldonNorm norm, double anorm, 03873 LapackInfo& info) 03874 { 03875 char uplo('L'); 03876 03877 int n = A.GetM(); double rcond(0); 03878 Vector<complex<double>, VectFull, Allocator0> work(2*n); 03879 zhecon_(&uplo, &n, A.GetData(), &n, P.GetData(), &anorm, &rcond, 03880 work.GetData(), &info.GetInfoRef()); 03881 return rcond; 03882 } 03883 03884 03885 /*** RowHermPacked and Upper ***/ 03886 03887 03888 template<class Prop0, class Allocator0, class Allocator1> 03889 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0, 03890 RowHermPacked, Allocator0>& A, 03891 Vector<int, VectFull, Allocator1>& P, 03892 SeldonNorm norm, float anorm, 03893 LapackInfo& info) 03894 { 03895 char uplo('L'); 03896 03897 int n = A.GetM(); float rcond(0); 03898 Vector<complex<float>, VectFull, Allocator0> work(2*n); 03899 chpcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond, 03900 work.GetData(), &info.GetInfoRef()); 03901 return rcond; 03902 } 03903 03904 03905 template<class Prop0, class Allocator0, class Allocator1> 03906 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0, 03907 RowHermPacked, Allocator0>& A, 03908 Vector<int, VectFull, Allocator1>& P, 03909 SeldonNorm norm, double anorm, 03910 LapackInfo& info) 03911 { 03912 char uplo('L'); 03913 03914 int n = A.GetM(); double rcond(0); 03915 Vector<complex<double>, VectFull, Allocator0> work(2*n); 03916 zhpcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond, 03917 work.GetData(), &info.GetInfoRef()); 03918 return rcond; 03919 } 03920 03921 03922 /*** ColUpTriang and NonUnit ***/ 03923 03924 03925 template<class Prop0, class Allocator0> 03926 float ReciprocalConditionNumber(const Matrix<float, Prop0, ColUpTriang, 03927 Allocator0>& A, SeldonNorm norm, 03928 LapackInfo& info) 03929 { 03930 char uplo('U'); char norm_type = norm.Char(); char diag('N'); 03931 03932 int n = A.GetM(); float rcond(0); 03933 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n); 03934 strcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond, 03935 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 03936 return rcond; 03937 } 03938 03939 03940 template<class Prop0, class Allocator0> 03941 double ReciprocalConditionNumber(const Matrix<double, Prop0, ColUpTriang, 03942 Allocator0>& A, SeldonNorm norm, 03943 LapackInfo& info) 03944 { 03945 char uplo('U'); char norm_type = norm.Char(); char diag('N'); 03946 03947 int n = A.GetM(); double rcond(0); 03948 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n); 03949 dtrcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond, 03950 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 03951 return rcond; 03952 } 03953 03954 03955 template<class Prop0, class Allocator0> 03956 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0, 03957 ColUpTriang, Allocator0>& A, 03958 SeldonNorm norm, 03959 LapackInfo& info) 03960 { 03961 char uplo('U'); char norm_type = norm.Char(); char diag('N'); 03962 03963 int n = A.GetM(); float rcond(0); 03964 Vector<float> rwork(n); 03965 Vector<complex<float>, VectFull, Allocator0> work(2*n); 03966 ctrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond, 03967 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 03968 return rcond; 03969 } 03970 03971 03972 template<class Prop0, class Allocator0> 03973 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0, 03974 ColUpTriang, Allocator0>& A, 03975 SeldonNorm norm, 03976 LapackInfo& info) 03977 { 03978 char uplo('U'); char norm_type = norm.Char(); char diag('N'); 03979 03980 int n = A.GetM(); double rcond(0); 03981 Vector<double> rwork(n); 03982 Vector<complex<double>, VectFull, Allocator0> work(2*n); 03983 ztrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond, 03984 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 03985 return rcond; 03986 } 03987 03988 03989 /*** ColUpTriang ***/ 03990 03991 03992 template<class Prop0, class Allocator0> 03993 float ReciprocalConditionNumber(const SeldonDiag& DiagA, 03994 const Matrix<float, Prop0, ColUpTriang, 03995 Allocator0>& A, SeldonNorm norm, 03996 LapackInfo& info) 03997 { 03998 char uplo('U'); char norm_type = norm.Char(); 03999 char diag = DiagA.Char(); 04000 int n = A.GetM(); float rcond(0); 04001 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n); 04002 strcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond, 04003 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 04004 return rcond; 04005 } 04006 04007 04008 template<class Prop0, class Allocator0> 04009 double ReciprocalConditionNumber(const SeldonDiag& DiagA, 04010 const Matrix<double, Prop0, ColUpTriang, 04011 Allocator0>& A, SeldonNorm norm, 04012 LapackInfo& info) 04013 { 04014 char uplo('U'); char norm_type = norm.Char(); 04015 04016 int n = A.GetM(); double rcond(0); 04017 char diag = DiagA.Char(); 04018 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n); 04019 dtrcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond, 04020 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 04021 return rcond; 04022 } 04023 04024 04025 template<class Prop0, class Allocator0> 04026 float ReciprocalConditionNumber(const SeldonDiag& DiagA, 04027 const Matrix<complex<float>, Prop0, 04028 ColUpTriang, Allocator0>& A, 04029 SeldonNorm norm, 04030 LapackInfo& info) 04031 { 04032 char uplo('U'); char norm_type = norm.Char(); 04033 char diag = DiagA.Char(); 04034 int n = A.GetM(); float rcond(0); 04035 Vector<float> rwork(n); 04036 Vector<complex<float>, VectFull, Allocator0> work(2*n); 04037 ctrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond, 04038 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 04039 return rcond; 04040 } 04041 04042 04043 template<class Prop0, class Allocator0> 04044 double ReciprocalConditionNumber(const SeldonDiag& DiagA, 04045 const Matrix<complex<double>, Prop0, 04046 ColUpTriang, Allocator0>& A, 04047 SeldonNorm norm, 04048 LapackInfo& info) 04049 { 04050 char uplo('U'); char norm_type = norm.Char(); 04051 char diag = DiagA.Char(); 04052 int n = A.GetM(); double rcond(0); 04053 Vector<double> rwork(n); 04054 Vector<complex<double>, VectFull, Allocator0> work(2*n); 04055 ztrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond, 04056 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 04057 return rcond; 04058 } 04059 04060 04061 /*** ColLoTriang and NonUnit ***/ 04062 04063 04064 template<class Prop0, class Allocator0> 04065 float ReciprocalConditionNumber(const Matrix<float, Prop0, 04066 ColLoTriang, Allocator0>& A, 04067 SeldonNorm norm, 04068 LapackInfo& info) 04069 { 04070 char uplo('L'); char norm_type = norm.Char(); char diag('N'); 04071 04072 int n = A.GetM(); float rcond(0); 04073 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n); 04074 strcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond, 04075 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 04076 return rcond; 04077 } 04078 04079 04080 template<class Prop0, class Allocator0> 04081 double ReciprocalConditionNumber(const Matrix<double, Prop0, ColLoTriang, 04082 Allocator0>& A, SeldonNorm norm, 04083 LapackInfo& info) 04084 { 04085 char uplo('L'); char norm_type = norm.Char(); char diag('N'); 04086 04087 int n = A.GetM(); double rcond(0); 04088 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n); 04089 dtrcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond, 04090 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 04091 return rcond; 04092 } 04093 04094 04095 template<class Prop0, class Allocator0> 04096 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0, 04097 ColLoTriang, Allocator0>& A, 04098 SeldonNorm norm, 04099 LapackInfo& info) 04100 { 04101 char uplo('L'); char norm_type = norm.Char(); char diag('N'); 04102 04103 int n = A.GetM(); float rcond(0); 04104 Vector<float> rwork(n); 04105 Vector<complex<float>, VectFull, Allocator0> work(2*n); 04106 ctrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond, 04107 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 04108 return rcond; 04109 } 04110 04111 04112 template<class Prop0, class Allocator0> 04113 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0, 04114 ColLoTriang, Allocator0>& A, 04115 SeldonNorm norm, 04116 LapackInfo& info) 04117 { 04118 char uplo('L'); char norm_type = norm.Char(); char diag('N'); 04119 04120 int n = A.GetM(); double rcond(0); 04121 Vector<double> rwork(n); 04122 Vector<complex<double>, VectFull, Allocator0> work(2*n); 04123 ztrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond, 04124 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 04125 return rcond; 04126 } 04127 04128 04129 /*** ColLoTriang ***/ 04130 04131 04132 template<class Prop0, class Allocator0> 04133 float ReciprocalConditionNumber(const SeldonDiag& DiagA, 04134 const Matrix<float, Prop0, 04135 ColLoTriang, Allocator0>& A, 04136 SeldonNorm norm, 04137 LapackInfo& info) 04138 { 04139 char uplo('L'); char norm_type = norm.Char(); 04140 char diag = DiagA.Char(); 04141 int n = A.GetM(); float rcond(0); 04142 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n); 04143 strcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond, 04144 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 04145 return rcond; 04146 } 04147 04148 04149 template<class Prop0, class Allocator0> 04150 double ReciprocalConditionNumber(const SeldonDiag& DiagA, 04151 const Matrix<double, Prop0, ColLoTriang, 04152 Allocator0>& A, SeldonNorm norm, 04153 LapackInfo& info) 04154 { 04155 char uplo('L'); char norm_type = norm.Char(); 04156 char diag = DiagA.Char(); 04157 int n = A.GetM(); double rcond(0); 04158 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n); 04159 dtrcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond, 04160 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 04161 return rcond; 04162 } 04163 04164 04165 template<class Prop0, class Allocator0> 04166 float ReciprocalConditionNumber(const SeldonDiag& DiagA, 04167 const Matrix<complex<float>, Prop0, 04168 ColLoTriang, Allocator0>& A, 04169 SeldonNorm norm, 04170 LapackInfo& info) 04171 { 04172 char uplo('L'); char norm_type = norm.Char(); 04173 char diag = DiagA.Char(); 04174 int n = A.GetM(); float rcond(0); 04175 Vector<float> rwork(n); 04176 Vector<complex<float>, VectFull, Allocator0> work(2*n); 04177 ctrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond, 04178 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 04179 return rcond; 04180 } 04181 04182 04183 template<class Prop0, class Allocator0> 04184 double ReciprocalConditionNumber(const SeldonDiag& DiagA, 04185 const Matrix<complex<double>, Prop0, 04186 ColLoTriang, Allocator0>& A, 04187 SeldonNorm norm, 04188 LapackInfo& info) 04189 { 04190 char uplo('L'); char norm_type = norm.Char(); 04191 char diag = DiagA.Char(); 04192 int n = A.GetM(); double rcond(0); 04193 Vector<double> rwork(n); 04194 Vector<complex<double>, VectFull, Allocator0> work(2*n); 04195 ztrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond, 04196 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 04197 return rcond; 04198 } 04199 04200 04201 /*** ColUpTriangPacked and NonUnit ***/ 04202 04203 04204 template<class Prop0, class Allocator0> 04205 float ReciprocalConditionNumber(const Matrix<float, Prop0, 04206 ColUpTriangPacked, Allocator0>& A, 04207 SeldonNorm norm, 04208 LapackInfo& info) 04209 { 04210 char uplo('U'); char norm_type = norm.Char(); char diag('N'); 04211 04212 int n = A.GetM(); float rcond(0); 04213 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n); 04214 stpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond, 04215 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 04216 return rcond; 04217 } 04218 04219 04220 template<class Prop0, class Allocator0> 04221 double ReciprocalConditionNumber(const Matrix<double, Prop0, 04222 ColUpTriangPacked, Allocator0>& A, 04223 SeldonNorm norm, 04224 LapackInfo& info) 04225 { 04226 char uplo('U'); char norm_type = norm.Char(); char diag('N'); 04227 04228 int n = A.GetM(); double rcond(0); 04229 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n); 04230 dtpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond, 04231 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 04232 return rcond; 04233 } 04234 04235 04236 template<class Prop0, class Allocator0> 04237 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0, 04238 ColUpTriangPacked, Allocator0>& A, 04239 SeldonNorm norm, 04240 LapackInfo& info) 04241 { 04242 char uplo('U'); char norm_type = norm.Char(); char diag('N'); 04243 04244 int n = A.GetM(); float rcond(0); 04245 Vector<float> rwork(n); 04246 Vector<complex<float>, VectFull, Allocator0> work(2*n); 04247 ctpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond, 04248 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 04249 return rcond; 04250 } 04251 04252 04253 template<class Prop0, class Allocator0> 04254 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0, 04255 ColUpTriangPacked, Allocator0>& A, 04256 SeldonNorm norm, 04257 LapackInfo& info) 04258 { 04259 char uplo('U'); char norm_type = norm.Char(); char diag('N'); 04260 04261 int n = A.GetM(); double rcond(0); 04262 Vector<double> rwork(n); 04263 Vector<complex<double>, VectFull, Allocator0> work(2*n); 04264 ztpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond, 04265 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 04266 return rcond; 04267 } 04268 04269 04270 /*** ColUpTriangPacked ***/ 04271 04272 04273 template<class Prop0, class Allocator0> 04274 float ReciprocalConditionNumber(const SeldonDiag& DiagA, 04275 const Matrix<float, Prop0, 04276 ColUpTriangPacked, Allocator0>& A, 04277 SeldonNorm norm, 04278 LapackInfo& info) 04279 { 04280 char uplo('U'); char norm_type = norm.Char(); 04281 char diag = DiagA.Char(); 04282 int n = A.GetM(); float rcond(0); 04283 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n); 04284 stpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond, 04285 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 04286 return rcond; 04287 } 04288 04289 04290 template<class Prop0, class Allocator0> 04291 double ReciprocalConditionNumber(const SeldonDiag& DiagA, 04292 const Matrix<double, Prop0, 04293 ColUpTriangPacked, Allocator0>& A, 04294 SeldonNorm norm, 04295 LapackInfo& info) 04296 { 04297 char uplo('U'); char norm_type = norm.Char(); 04298 char diag = DiagA.Char(); 04299 int n = A.GetM(); double rcond(0); 04300 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n); 04301 dtpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond, 04302 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 04303 return rcond; 04304 } 04305 04306 04307 template<class Prop0, class Allocator0> 04308 float ReciprocalConditionNumber(const SeldonDiag& DiagA, 04309 const Matrix<complex<float>, Prop0, 04310 ColUpTriangPacked, Allocator0>& A, 04311 SeldonNorm norm, 04312 LapackInfo& info) 04313 { 04314 char uplo('U'); char norm_type = norm.Char(); 04315 char diag = DiagA.Char(); 04316 int n = A.GetM(); float rcond(0); 04317 Vector<float> rwork(n); 04318 Vector<complex<float>, VectFull, Allocator0> work(2*n); 04319 ctpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond, 04320 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 04321 return rcond; 04322 } 04323 04324 04325 template<class Prop0, class Allocator0> 04326 double ReciprocalConditionNumber(const SeldonDiag& DiagA, 04327 const Matrix<complex<double>, Prop0, 04328 ColUpTriangPacked, Allocator0>& A, 04329 SeldonNorm norm, 04330 LapackInfo& info) 04331 { 04332 char uplo('U'); char norm_type = norm.Char(); 04333 char diag = DiagA.Char(); 04334 int n = A.GetM(); double rcond(0); 04335 Vector<double> rwork(n); 04336 Vector<complex<double>, VectFull, Allocator0> work(2*n); 04337 ztpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond, 04338 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 04339 return rcond; 04340 } 04341 04342 04343 /*** ColLoTriangPacked and NonUnit ***/ 04344 04345 04346 template<class Prop0, class Allocator0> 04347 float ReciprocalConditionNumber(const Matrix<float, Prop0, 04348 ColLoTriangPacked, Allocator0>& A, 04349 SeldonNorm norm, 04350 LapackInfo& info) 04351 { 04352 char uplo('L'); char norm_type = norm.Char(); char diag('N'); 04353 04354 int n = A.GetM(); float rcond(0); 04355 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n); 04356 stpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond, 04357 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 04358 return rcond; 04359 } 04360 04361 04362 template<class Prop0, class Allocator0> 04363 double ReciprocalConditionNumber(const Matrix<double, Prop0, 04364 ColLoTriangPacked, Allocator0>& A, 04365 SeldonNorm norm, 04366 LapackInfo& info) 04367 { 04368 char uplo('L'); char norm_type = norm.Char(); char diag('N'); 04369 04370 int n = A.GetM(); double rcond(0); 04371 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n); 04372 dtpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond, 04373 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 04374 return rcond; 04375 } 04376 04377 04378 template<class Prop0, class Allocator0> 04379 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0, 04380 ColLoTriangPacked, Allocator0>& A, 04381 SeldonNorm norm, 04382 LapackInfo& info) 04383 { 04384 char uplo('L'); char norm_type = norm.Char(); char diag('N'); 04385 04386 int n = A.GetM(); float rcond(0); 04387 Vector<float> rwork(n); 04388 Vector<complex<float>, VectFull, Allocator0> work(2*n); 04389 ctpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond, 04390 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 04391 return rcond; 04392 } 04393 04394 04395 template<class Prop0, class Allocator0> 04396 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0, 04397 ColLoTriangPacked, Allocator0>& A, 04398 SeldonNorm norm, 04399 LapackInfo& info) 04400 { 04401 char uplo('L'); char norm_type = norm.Char(); char diag('N'); 04402 04403 int n = A.GetM(); double rcond(0); 04404 Vector<double> rwork(n); 04405 Vector<complex<double>, VectFull, Allocator0> work(2*n); 04406 ztpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond, 04407 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 04408 return rcond; 04409 } 04410 04411 04412 /*** ColLoTriangPacked ***/ 04413 04414 04415 template<class Prop0, class Allocator0> 04416 float ReciprocalConditionNumber(const SeldonDiag& DiagA, 04417 const Matrix<float, Prop0, 04418 ColLoTriangPacked, Allocator0>& A, 04419 SeldonNorm norm, 04420 LapackInfo& info) 04421 { 04422 char uplo('L'); char norm_type = norm.Char(); 04423 char diag = DiagA.Char(); 04424 int n = A.GetM(); float rcond(0); 04425 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n); 04426 stpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond, 04427 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 04428 return rcond; 04429 } 04430 04431 04432 template<class Prop0, class Allocator0> 04433 double ReciprocalConditionNumber(const SeldonDiag& DiagA, 04434 const Matrix<double, Prop0, 04435 ColLoTriangPacked, Allocator0>& A, 04436 SeldonNorm norm, 04437 LapackInfo& info) 04438 { 04439 char uplo('L'); char norm_type = norm.Char(); 04440 char diag = DiagA.Char(); 04441 int n = A.GetM(); double rcond(0); 04442 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n); 04443 dtpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond, 04444 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 04445 return rcond; 04446 } 04447 04448 04449 template<class Prop0, class Allocator0> 04450 float ReciprocalConditionNumber(const SeldonDiag& DiagA, 04451 const Matrix<complex<float>, Prop0, 04452 ColLoTriangPacked, Allocator0>& A, 04453 SeldonNorm norm, 04454 LapackInfo& info) 04455 { 04456 char uplo('L'); char norm_type = norm.Char(); 04457 char diag = DiagA.Char(); 04458 int n = A.GetM(); float rcond(0); 04459 Vector<float> rwork(n); 04460 Vector<complex<float>, VectFull, Allocator0> work(2*n); 04461 ctpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond, 04462 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 04463 return rcond; 04464 } 04465 04466 04467 template<class Prop0, class Allocator0> 04468 double ReciprocalConditionNumber(const SeldonDiag& DiagA, 04469 const Matrix<complex<double>, Prop0, 04470 ColLoTriangPacked, Allocator0>& A, 04471 SeldonNorm norm, 04472 LapackInfo& info) 04473 { 04474 char uplo('L'); char norm_type = norm.Char(); 04475 char diag = DiagA.Char(); 04476 int n = A.GetM(); double rcond(0); 04477 Vector<double> rwork(n); 04478 Vector<complex<double>, VectFull, Allocator0> work(2*n); 04479 ztpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond, 04480 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 04481 return rcond; 04482 } 04483 04484 04485 /*** RowUpTriang and NonUnit ***/ 04486 04487 04488 template<class Prop0, class Allocator0> 04489 float ReciprocalConditionNumber(const Matrix<float, Prop0, RowUpTriang, 04490 Allocator0>& A, SeldonNorm norm, 04491 LapackInfo& info) 04492 { 04493 char uplo('L'); char norm_type = norm.RevChar(); char diag('N'); 04494 04495 int n = A.GetM(); float rcond(0); 04496 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n); 04497 strcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond, 04498 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 04499 return rcond; 04500 } 04501 04502 04503 template<class Prop0, class Allocator0> 04504 double ReciprocalConditionNumber(const Matrix<double, Prop0, RowUpTriang, 04505 Allocator0>& A, SeldonNorm norm, 04506 LapackInfo& info) 04507 { 04508 char uplo('L'); char norm_type = norm.RevChar(); char diag('N'); 04509 04510 int n = A.GetM(); double rcond(0); 04511 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n); 04512 dtrcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond, 04513 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 04514 return rcond; 04515 } 04516 04517 04518 template<class Prop0, class Allocator0> 04519 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0, 04520 RowUpTriang, Allocator0>& A, 04521 SeldonNorm norm, 04522 LapackInfo& info) 04523 { 04524 char uplo('L'); char norm_type = norm.RevChar(); char diag('N'); 04525 04526 int n = A.GetM(); float rcond(0); 04527 Vector<float> rwork(n); 04528 Vector<complex<float>, VectFull, Allocator0> work(2*n); 04529 ctrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond, 04530 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 04531 return rcond; 04532 } 04533 04534 04535 template<class Prop0, class Allocator0> 04536 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0, 04537 RowUpTriang, Allocator0>& A, 04538 SeldonNorm norm, 04539 LapackInfo& info) 04540 { 04541 char uplo('L'); char norm_type = norm.RevChar(); char diag('N'); 04542 04543 int n = A.GetM(); double rcond(0); 04544 Vector<double> rwork(n); 04545 Vector<complex<double>, VectFull, Allocator0> work(2*n); 04546 ztrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond, 04547 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 04548 return rcond; 04549 } 04550 04551 04552 /*** RowUpTriang ***/ 04553 04554 04555 template<class Prop0, class Allocator0> 04556 float ReciprocalConditionNumber(const SeldonDiag& DiagA, 04557 const Matrix<float, Prop0, RowUpTriang, 04558 Allocator0>& A, SeldonNorm norm, 04559 LapackInfo& info) 04560 { 04561 char uplo('L'); char norm_type = norm.RevChar(); 04562 char diag = DiagA.Char(); 04563 int n = A.GetM(); float rcond(0); 04564 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n); 04565 strcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond, 04566 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 04567 return rcond; 04568 } 04569 04570 04571 template<class Prop0, class Allocator0> 04572 double ReciprocalConditionNumber(const SeldonDiag& DiagA, 04573 const Matrix<double, Prop0, RowUpTriang, 04574 Allocator0>& A, SeldonNorm norm, 04575 LapackInfo& info) 04576 { 04577 char uplo('L'); char norm_type = norm.RevChar(); 04578 char diag = DiagA.Char(); 04579 int n = A.GetM(); double rcond(0); 04580 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n); 04581 dtrcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond, 04582 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 04583 return rcond; 04584 } 04585 04586 04587 template<class Prop0, class Allocator0> 04588 float ReciprocalConditionNumber(const SeldonDiag& DiagA, 04589 const Matrix<complex<float>, Prop0, 04590 RowUpTriang, Allocator0>& A, 04591 SeldonNorm norm, 04592 LapackInfo& info) 04593 { 04594 char uplo('L'); char norm_type = norm.RevChar(); 04595 char diag = DiagA.Char(); 04596 int n = A.GetM(); float rcond(0); 04597 Vector<float> rwork(n); 04598 Vector<complex<float>, VectFull, Allocator0> work(2*n); 04599 ctrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond, 04600 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 04601 return rcond; 04602 } 04603 04604 04605 template<class Prop0, class Allocator0> 04606 double ReciprocalConditionNumber(const SeldonDiag& DiagA, 04607 const Matrix<complex<double>, Prop0, 04608 RowUpTriang, Allocator0>& A, 04609 SeldonNorm norm, 04610 LapackInfo& info) 04611 { 04612 char uplo('L'); char norm_type = norm.RevChar(); 04613 char diag = DiagA.Char(); 04614 int n = A.GetM(); double rcond(0); 04615 Vector<double> rwork(n); 04616 Vector<complex<double>, VectFull, Allocator0> work(2*n); 04617 ztrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond, 04618 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 04619 return rcond; 04620 } 04621 04622 04623 /*** RowLoTriang and NonUnit ***/ 04624 04625 04626 template<class Prop0, class Allocator0> 04627 float ReciprocalConditionNumber(const Matrix<float, Prop0, 04628 RowLoTriang, Allocator0>& A, 04629 SeldonNorm norm, 04630 LapackInfo& info) 04631 { 04632 char uplo('U'); char norm_type = norm.RevChar(); char diag('N'); 04633 04634 int n = A.GetM(); float rcond(0); 04635 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n); 04636 strcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond, 04637 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 04638 return rcond; 04639 } 04640 04641 04642 template<class Prop0, class Allocator0> 04643 double ReciprocalConditionNumber(const Matrix<double, Prop0, 04644 RowLoTriang, Allocator0>& A, 04645 SeldonNorm norm, 04646 LapackInfo& info) 04647 { 04648 char uplo('U'); char norm_type = norm.RevChar(); char diag('N'); 04649 04650 int n = A.GetM(); double rcond(0); 04651 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n); 04652 dtrcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond, 04653 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 04654 return rcond; 04655 } 04656 04657 04658 template<class Prop0, class Allocator0> 04659 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0, 04660 RowLoTriang, Allocator0>& A, 04661 SeldonNorm norm, 04662 LapackInfo& info) 04663 { 04664 char uplo('U'); char norm_type = norm.RevChar(); char diag('N'); 04665 04666 int n = A.GetM(); float rcond(0); 04667 Vector<float> rwork(n); 04668 Vector<complex<float>, VectFull, Allocator0> work(2*n); 04669 ctrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond, 04670 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 04671 return rcond; 04672 } 04673 04674 04675 template<class Prop0, class Allocator0> 04676 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0, 04677 RowLoTriang, Allocator0>& A, 04678 SeldonNorm norm, 04679 LapackInfo& info) 04680 { 04681 char uplo('U'); char norm_type = norm.RevChar(); char diag('N'); 04682 04683 int n = A.GetM(); double rcond(0); 04684 Vector<double> rwork(n); 04685 Vector<complex<double>, VectFull, Allocator0> work(2*n); 04686 ztrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond, 04687 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 04688 return rcond; 04689 } 04690 04691 04692 /*** RowLoTriang ***/ 04693 04694 04695 template<class Prop0, class Allocator0> 04696 float ReciprocalConditionNumber(const SeldonDiag& DiagA, 04697 const Matrix<float, Prop0, 04698 RowLoTriang, Allocator0>& A, 04699 SeldonNorm norm, 04700 LapackInfo& info) 04701 { 04702 char uplo('U'); char norm_type = norm.RevChar(); 04703 char diag = DiagA.Char(); 04704 int n = A.GetM(); float rcond(0); 04705 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n); 04706 strcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond, 04707 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 04708 return rcond; 04709 } 04710 04711 04712 template<class Prop0, class Allocator0> 04713 double ReciprocalConditionNumber(const SeldonDiag& DiagA, 04714 const Matrix<double, Prop0, 04715 RowLoTriang, Allocator0>& A, 04716 SeldonNorm norm, 04717 LapackInfo& info) 04718 { 04719 char uplo('U'); char norm_type = norm.RevChar(); 04720 char diag = DiagA.Char(); 04721 int n = A.GetM(); double rcond(0); 04722 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n); 04723 dtrcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond, 04724 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 04725 return rcond; 04726 } 04727 04728 04729 template<class Prop0, class Allocator0> 04730 float ReciprocalConditionNumber(const SeldonDiag& DiagA, 04731 const Matrix<complex<float>, Prop0, 04732 RowLoTriang, Allocator0>& A, 04733 SeldonNorm norm, 04734 LapackInfo& info) 04735 { 04736 char uplo('U'); char norm_type = norm.RevChar(); 04737 char diag = DiagA.Char(); 04738 int n = A.GetM(); float rcond(0); 04739 Vector<float> rwork(n); 04740 Vector<complex<float>, VectFull, Allocator0> work(2*n); 04741 ctrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond, 04742 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 04743 return rcond; 04744 } 04745 04746 04747 template<class Prop0, class Allocator0> 04748 double ReciprocalConditionNumber(const SeldonDiag& DiagA, 04749 const Matrix<complex<double>, Prop0, 04750 RowLoTriang, Allocator0>& A, 04751 SeldonNorm norm, 04752 LapackInfo& info) 04753 { 04754 char uplo('U'); char norm_type = norm.RevChar(); 04755 char diag = DiagA.Char(); 04756 int n = A.GetM(); double rcond(0); 04757 Vector<double> rwork(n); 04758 Vector<complex<double>, VectFull, Allocator0> work(2*n); 04759 ztrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond, 04760 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 04761 return rcond; 04762 } 04763 04764 04765 /*** RowUpTriangPacked and NonUnit ***/ 04766 04767 04768 template<class Prop0, class Allocator0> 04769 float ReciprocalConditionNumber(const Matrix<float, Prop0, 04770 RowUpTriangPacked, Allocator0>& A, 04771 SeldonNorm norm, 04772 LapackInfo& info) 04773 { 04774 char uplo('L'); char norm_type = norm.RevChar(); char diag('N'); 04775 04776 int n = A.GetM(); float rcond(0); 04777 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n); 04778 stpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond, 04779 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 04780 return rcond; 04781 } 04782 04783 04784 template<class Prop0, class Allocator0> 04785 double ReciprocalConditionNumber(const Matrix<double, Prop0, 04786 RowUpTriangPacked, Allocator0>& A, 04787 SeldonNorm norm, 04788 LapackInfo& info) 04789 { 04790 char uplo('L'); char norm_type = norm.RevChar(); char diag('N'); 04791 04792 int n = A.GetM(); double rcond(0); 04793 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n); 04794 dtpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond, 04795 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 04796 return rcond; 04797 } 04798 04799 04800 template<class Prop0, class Allocator0> 04801 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0, 04802 RowUpTriangPacked, Allocator0>& A, 04803 SeldonNorm norm, 04804 LapackInfo& info) 04805 { 04806 char uplo('L'); char norm_type = norm.RevChar(); char diag('N'); 04807 04808 int n = A.GetM(); float rcond(0); 04809 Vector<float> rwork(n); 04810 Vector<complex<float>, VectFull, Allocator0> work(2*n); 04811 ctpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond, 04812 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 04813 return rcond; 04814 } 04815 04816 04817 template<class Prop0, class Allocator0> 04818 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0, 04819 RowUpTriangPacked, Allocator0>& A, 04820 SeldonNorm norm, 04821 LapackInfo& info) 04822 { 04823 char uplo('L'); char norm_type = norm.RevChar(); char diag('N'); 04824 04825 int n = A.GetM(); double rcond(0); 04826 Vector<double> rwork(n); 04827 Vector<complex<double>, VectFull, Allocator0> work(2*n); 04828 ztpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond, 04829 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 04830 return rcond; 04831 } 04832 04833 04834 /*** RowUpTriangPacked ***/ 04835 04836 04837 template<class Prop0, class Allocator0> 04838 float ReciprocalConditionNumber(const SeldonDiag& DiagA, 04839 const Matrix<float, Prop0, 04840 RowUpTriangPacked, Allocator0>& A, 04841 SeldonNorm norm, 04842 LapackInfo& info) 04843 { 04844 char uplo('L'); char norm_type = norm.RevChar(); 04845 char diag = DiagA.Char(); 04846 int n = A.GetM(); float rcond(0); 04847 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n); 04848 stpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond, 04849 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 04850 return rcond; 04851 } 04852 04853 04854 template<class Prop0, class Allocator0> 04855 double ReciprocalConditionNumber(const SeldonDiag& DiagA, 04856 const Matrix<double, Prop0, 04857 RowUpTriangPacked, Allocator0>& A, 04858 SeldonNorm norm, 04859 LapackInfo& info) 04860 { 04861 char uplo('L'); char norm_type = norm.RevChar(); 04862 char diag = DiagA.Char(); 04863 int n = A.GetM(); double rcond(0); 04864 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n); 04865 dtpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond, 04866 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 04867 return rcond; 04868 } 04869 04870 04871 template<class Prop0, class Allocator0> 04872 float ReciprocalConditionNumber(const SeldonDiag& DiagA, 04873 const Matrix<complex<float>, Prop0, 04874 RowUpTriangPacked, Allocator0>& A, 04875 SeldonNorm norm, 04876 LapackInfo& info) 04877 { 04878 char uplo('L'); char norm_type = norm.RevChar(); 04879 char diag = DiagA.Char(); 04880 int n = A.GetM(); float rcond(0); 04881 Vector<float> rwork(n); 04882 Vector<complex<float>, VectFull, Allocator0> work(2*n); 04883 ctpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond, 04884 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 04885 return rcond; 04886 } 04887 04888 04889 template<class Prop0, class Allocator0> 04890 double ReciprocalConditionNumber(const SeldonDiag& DiagA, 04891 const Matrix<complex<double>, Prop0, 04892 RowUpTriangPacked, Allocator0>& A, 04893 SeldonNorm norm, 04894 LapackInfo& info) 04895 { 04896 char uplo('L'); char norm_type = norm.RevChar(); 04897 char diag = DiagA.Char(); 04898 int n = A.GetM(); double rcond(0); 04899 Vector<double> rwork(n); 04900 Vector<complex<double>, VectFull, Allocator0> work(2*n); 04901 ztpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond, 04902 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 04903 return rcond; 04904 } 04905 04906 04907 /*** RowLoTriangPacked and NonUnit ***/ 04908 04909 04910 template<class Prop0, class Allocator0> 04911 float ReciprocalConditionNumber(const Matrix<float, Prop0, 04912 RowLoTriangPacked, Allocator0>& A, 04913 SeldonNorm norm, 04914 LapackInfo& info) 04915 { 04916 char uplo('U'); char norm_type = norm.RevChar(); char diag('N'); 04917 04918 int n = A.GetM(); float rcond(0); 04919 Vector<int> iwork(n); 04920 Vector<float, VectFull, Allocator0> work(3*n); 04921 stpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond, 04922 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 04923 return rcond; 04924 } 04925 04926 04927 template<class Prop0, class Allocator0> 04928 double ReciprocalConditionNumber(const Matrix<double, Prop0, 04929 RowLoTriangPacked, Allocator0>& A, 04930 SeldonNorm norm, 04931 LapackInfo& info) 04932 { 04933 char uplo('U'); char norm_type = norm.RevChar(); char diag('N'); 04934 04935 int n = A.GetM(); double rcond(0); 04936 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n); 04937 dtpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond, 04938 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 04939 return rcond; 04940 } 04941 04942 04943 template<class Prop0, class Allocator0> 04944 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0, 04945 RowLoTriangPacked, Allocator0>& A, 04946 SeldonNorm norm, 04947 LapackInfo& info) 04948 { 04949 char uplo('U'); char norm_type = norm.RevChar(); char diag('N'); 04950 04951 int n = A.GetM(); float rcond(0); 04952 Vector<float> rwork(n); 04953 Vector<complex<float>, VectFull, Allocator0> work(2*n); 04954 ctpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond, 04955 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 04956 return rcond; 04957 } 04958 04959 04960 template<class Prop0, class Allocator0> 04961 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0, 04962 RowLoTriangPacked, Allocator0>& A, 04963 SeldonNorm norm, 04964 LapackInfo& info) 04965 { 04966 char uplo('U'); char norm_type = norm.RevChar(); char diag('N'); 04967 04968 int n = A.GetM(); double rcond(0); 04969 Vector<double> rwork(n); 04970 Vector<complex<double>, VectFull, Allocator0> work(2*n); 04971 ztpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond, 04972 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 04973 return rcond; 04974 } 04975 04976 04977 /*** RowLoTriangPacked ***/ 04978 04979 04980 template<class Prop0, class Allocator0> 04981 float ReciprocalConditionNumber(const SeldonDiag& DiagA, 04982 const Matrix<float, Prop0, 04983 RowLoTriangPacked, Allocator0>& A, 04984 SeldonNorm norm, 04985 LapackInfo& info) 04986 { 04987 char uplo('U'); char norm_type = norm.RevChar(); 04988 char diag = DiagA.Char(); 04989 int n = A.GetM(); float rcond(0); 04990 Vector<int> iwork(n); 04991 Vector<float, VectFull, Allocator0> work(3*n); 04992 stpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond, 04993 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 04994 return rcond; 04995 } 04996 04997 04998 template<class Prop0, class Allocator0> 04999 double ReciprocalConditionNumber(const SeldonDiag& DiagA, 05000 const Matrix<double, Prop0, 05001 RowLoTriangPacked, Allocator0>& A, 05002 SeldonNorm norm, 05003 LapackInfo& info) 05004 { 05005 char uplo('U'); char norm_type = norm.RevChar(); 05006 char diag = DiagA.Char(); 05007 int n = A.GetM(); double rcond(0); 05008 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n); 05009 dtpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond, 05010 work.GetData(), iwork.GetData(), &info.GetInfoRef()); 05011 return rcond; 05012 } 05013 05014 05015 template<class Prop0, class Allocator0> 05016 float ReciprocalConditionNumber(const SeldonDiag& DiagA, 05017 const Matrix<complex<float>, Prop0, 05018 RowLoTriangPacked, Allocator0>& A, 05019 SeldonNorm norm, 05020 LapackInfo& info) 05021 { 05022 char uplo('U'); char norm_type = norm.RevChar(); 05023 char diag = DiagA.Char(); 05024 int n = A.GetM(); float rcond(0); 05025 Vector<float> rwork(n); 05026 Vector<complex<float>, VectFull, Allocator0> work(2*n); 05027 ctpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond, 05028 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 05029 return rcond; 05030 } 05031 05032 05033 template<class Prop0, class Allocator0> 05034 double ReciprocalConditionNumber(const SeldonDiag& DiagA, 05035 const Matrix<complex<double>, Prop0, 05036 RowLoTriangPacked, Allocator0>& A, 05037 SeldonNorm norm, 05038 LapackInfo& info) 05039 { 05040 char uplo('U'); char norm_type = norm.RevChar(); 05041 char diag = DiagA.Char(); 05042 int n = A.GetM(); double rcond(0); 05043 Vector<double> rwork(n); 05044 Vector<complex<double>, VectFull, Allocator0> work(2*n); 05045 ztpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond, 05046 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef()); 05047 return rcond; 05048 } 05049 05050 05051 // ReciprocalConditionNumber // 05053 05054 05055 05057 // RefineSolutionLU // 05058 05059 05060 /*** ColMajor and NoTrans ***/ 05061 05062 05063 template <class Prop0, class Allocator0, 05064 class Allocator1, class Allocator2, 05065 class Allocator3, class Allocator4> 05066 void RefineSolutionLU(const Matrix<float, Prop0, ColMajor, Allocator0>& A, 05067 const Matrix<float, Prop0, ColMajor, 05068 Allocator1>& Alu, 05069 const Vector<int, VectFull, Allocator2>& P, 05070 Vector<float, VectFull, Allocator3>& x, 05071 const Vector<float, VectFull, Allocator4>& b, 05072 float& ferr, float& berr, 05073 LapackInfo& info) 05074 { 05075 05076 #ifdef SELDON_CHECK_DIMENSIONS 05077 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05078 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05079 #endif 05080 05081 int m = A.GetM(); 05082 int nrhs = 1; 05083 char trans('N'); 05084 Vector<float, VectFull, Allocator3> work(3*m); 05085 Vector<int> iwork(m); 05086 sgerfs_(&trans, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m, 05087 P.GetData(), b.GetData(), &m, x.GetData(), &m, 05088 &ferr, &berr, work.GetData(), 05089 iwork.GetData(), &info.GetInfoRef() ); 05090 } 05091 05092 05093 template <class Prop0, class Allocator0, 05094 class Allocator1, class Allocator2, 05095 class Allocator3, class Allocator4> 05096 void RefineSolutionLU(const Matrix<double, Prop0, ColMajor, Allocator0>& A, 05097 const Matrix<double, Prop0, ColMajor, 05098 Allocator1>& Alu, 05099 const Vector<int, VectFull, Allocator2>& P, 05100 Vector<double, VectFull, Allocator3>& x, 05101 const Vector<double, VectFull, Allocator4>& b, 05102 double& ferr, double& berr, 05103 LapackInfo& info) 05104 { 05105 05106 #ifdef SELDON_CHECK_DIMENSIONS 05107 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05108 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05109 #endif 05110 05111 int m = A.GetM(); 05112 int nrhs = 1; 05113 char trans('N'); 05114 Vector<double, VectFull, Allocator3> work(3*m); 05115 Vector<int> iwork(m); 05116 dgerfs_(&trans, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m, 05117 P.GetData(), b.GetData(), &m, x.GetData(), &m, 05118 &ferr, &berr, work.GetData(), 05119 iwork.GetData(), &info.GetInfoRef() ); 05120 } 05121 05122 05123 template <class Prop0, class Allocator0, 05124 class Allocator1, class Allocator2, 05125 class Allocator3, class Allocator4> 05126 void RefineSolutionLU(const Matrix<complex<float>, Prop0, 05127 ColMajor, Allocator0>& A, 05128 const Matrix<complex<float>, Prop0, 05129 ColMajor, Allocator1>& Alu, 05130 const Vector<int, VectFull, Allocator2>& P, 05131 Vector<complex<float>, VectFull, Allocator3>& x, 05132 const Vector<complex<float>, VectFull, 05133 Allocator4>& b, 05134 float& ferr, float& berr, 05135 LapackInfo& info) 05136 { 05137 05138 #ifdef SELDON_CHECK_DIMENSIONS 05139 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05140 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05141 #endif 05142 05143 int m = A.GetM(); 05144 int nrhs = 1; 05145 char trans('N'); 05146 Vector<complex<float>, VectFull, Allocator3> work(2*m); 05147 Vector<float> rwork(m); 05148 cgerfs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m, 05149 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr, 05150 &berr, work.GetData(), rwork.GetData(), 05151 &info.GetInfoRef() ); 05152 } 05153 05154 05155 template <class Prop0, class Allocator0, 05156 class Allocator1, class Allocator2, 05157 class Allocator3, class Allocator4> 05158 void RefineSolutionLU(const Matrix<complex<double>, Prop0, 05159 ColMajor, Allocator0>& A, 05160 const Matrix<complex<double>, Prop0, 05161 ColMajor, Allocator1>& Alu, 05162 const Vector<int, VectFull, Allocator2>& P, 05163 Vector<complex<double>, VectFull, Allocator3>& x, 05164 const Vector<complex<double>, VectFull, 05165 Allocator4>& b, 05166 double& ferr, double& berr, 05167 LapackInfo& info) 05168 { 05169 05170 #ifdef SELDON_CHECK_DIMENSIONS 05171 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05172 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05173 #endif 05174 05175 int m = A.GetM(); 05176 int nrhs = 1; 05177 char trans('N'); 05178 Vector<complex<double>, VectFull, Allocator3> work(2*m); 05179 Vector<double> rwork(m); 05180 zgerfs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m, 05181 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr, 05182 &berr, work.GetData(), rwork.GetData(), 05183 &info.GetInfoRef() ); 05184 } 05185 05186 05187 /*** ColMajor ***/ 05188 05189 05190 template <class Prop0, class Allocator0, 05191 class Allocator1, class Allocator2, 05192 class Allocator3, class Allocator4> 05193 void RefineSolutionLU(const SeldonTranspose& TransA, 05194 const Matrix<float, Prop0, ColMajor, Allocator0>& A, 05195 const Matrix<float, Prop0, ColMajor, 05196 Allocator1>& Alu, 05197 const Vector<int, VectFull, Allocator2>& P, 05198 Vector<float, VectFull, Allocator3>& x, 05199 const Vector<float, VectFull, Allocator4>& b, 05200 float& ferr, float& berr, 05201 LapackInfo& info) 05202 { 05203 05204 #ifdef SELDON_CHECK_DIMENSIONS 05205 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05206 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05207 #endif 05208 05209 int m = A.GetM(); 05210 int nrhs = 1; 05211 char trans = TransA.Char(); 05212 Vector<float, VectFull, Allocator3> work(3*m); 05213 Vector<int> iwork(m); 05214 sgerfs_(&trans, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m, 05215 P.GetData(), b.GetData(), &m, x.GetData(), &m, 05216 &ferr, &berr, work.GetData(), 05217 iwork.GetData(), &info.GetInfoRef() ); 05218 } 05219 05220 05221 template <class Prop0, class Allocator0, 05222 class Allocator1, class Allocator2, 05223 class Allocator3, class Allocator4> 05224 void RefineSolutionLU(const SeldonTranspose& TransA, 05225 const Matrix<double, Prop0, ColMajor, Allocator0>& A, 05226 const Matrix<double, Prop0, ColMajor, 05227 Allocator1>& Alu, 05228 const Vector<int, VectFull, Allocator2>& P, 05229 Vector<double, VectFull, Allocator3>& x, 05230 const Vector<double, VectFull, Allocator4>& b, 05231 double& ferr, double& berr, 05232 LapackInfo& info) 05233 { 05234 05235 #ifdef SELDON_CHECK_DIMENSIONS 05236 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05237 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05238 #endif 05239 05240 int m = A.GetM(); 05241 int nrhs = 1; 05242 char trans = TransA.Char(); 05243 Vector<double, VectFull, Allocator3> work(3*m); 05244 Vector<int> iwork(m); 05245 dgerfs_(&trans, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m, 05246 P.GetData(), b.GetData(), &m, x.GetData(), &m, 05247 &ferr, &berr, work.GetData(), 05248 iwork.GetData(), &info.GetInfoRef() ); 05249 } 05250 05251 05252 template <class Prop0, class Allocator0, 05253 class Allocator1, class Allocator2, 05254 class Allocator3, class Allocator4> 05255 void 05256 RefineSolutionLU(const SeldonTranspose& TransA, 05257 const Matrix<complex<float>, Prop0, ColMajor, 05258 Allocator0>& A, 05259 const Matrix<complex<float>, Prop0, ColMajor, 05260 Allocator1>& Alu, 05261 const Vector<int, VectFull, Allocator2>& P, 05262 Vector<complex<float>, VectFull, Allocator3>& x, 05263 const Vector<complex<float>, VectFull, Allocator4>& b, 05264 float& ferr, float& berr, 05265 LapackInfo& info) 05266 { 05267 05268 #ifdef SELDON_CHECK_DIMENSIONS 05269 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05270 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05271 #endif 05272 05273 int m = A.GetM(); 05274 int nrhs = 1; 05275 char trans = TransA.Char(); 05276 Vector<complex<float>, VectFull, Allocator3> work(2*m); 05277 Vector<float> rwork(m); 05278 cgerfs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m, 05279 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, 05280 &ferr, &berr, work.GetDataVoid(), 05281 rwork.GetData(), &info.GetInfoRef() ); 05282 } 05283 05284 05285 template <class Prop0, class Allocator0, 05286 class Allocator1, class Allocator2, 05287 class Allocator3, class Allocator4> 05288 void RefineSolutionLU(const SeldonTranspose& TransA, 05289 const Matrix<complex<double>, Prop0, ColMajor, 05290 Allocator0>& A, 05291 const Matrix<complex<double>, Prop0, ColMajor, 05292 Allocator1>& Alu, 05293 const Vector<int, VectFull, Allocator2>& P, 05294 Vector<complex<double>, VectFull, Allocator3>& x, 05295 const Vector<complex<double>, VectFull, 05296 Allocator4>& b, 05297 double& ferr, double& berr, 05298 LapackInfo& info) 05299 { 05300 05301 #ifdef SELDON_CHECK_DIMENSIONS 05302 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05303 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05304 #endif 05305 05306 int m = A.GetM(); 05307 int nrhs = 1; 05308 char trans = TransA.Char(); 05309 Vector<complex<double>, VectFull, Allocator3> work(2*m); 05310 Vector<double> rwork(m); 05311 zgerfs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m, 05312 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, 05313 &ferr, &berr, work.GetDataVoid(), 05314 rwork.GetData(), &info.GetInfoRef()); 05315 } 05316 05317 05318 /*** RowMajor and NoTrans ***/ 05319 05320 05321 template <class Prop0, class Allocator0, 05322 class Allocator1, class Allocator2, 05323 class Allocator3, class Allocator4> 05324 void RefineSolutionLU(const Matrix<float, Prop0, RowMajor, Allocator0>& A, 05325 const Matrix<float, Prop0, RowMajor, 05326 Allocator1>& Alu, 05327 const Vector<int, VectFull, Allocator2>& P, 05328 Vector<float, VectFull, Allocator3>& x, 05329 const Vector<float, VectFull, Allocator4>& b, 05330 float& ferr, float& berr, 05331 LapackInfo& info) 05332 { 05333 05334 #ifdef SELDON_CHECK_DIMENSIONS 05335 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05336 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05337 #endif 05338 05339 int m = A.GetM(); 05340 int nrhs = 1; 05341 char trans('T'); 05342 Vector<float, VectFull, Allocator3> work(3*m); 05343 Vector<int> iwork(m); 05344 sgerfs_(&trans, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m, 05345 P.GetData(), b.GetData(), &m, x.GetData(), &m, 05346 &ferr, &berr, work.GetData(), 05347 iwork.GetData(), &info.GetInfoRef()); 05348 } 05349 05350 05351 template <class Prop0, class Allocator0, 05352 class Allocator1, class Allocator2, 05353 class Allocator3, class Allocator4> 05354 void RefineSolutionLU(const Matrix<double, Prop0, RowMajor, Allocator0>& A, 05355 const Matrix<double, Prop0, RowMajor, 05356 Allocator1>& Alu, 05357 const Vector<int, VectFull, Allocator2>& P, 05358 Vector<double, VectFull, Allocator3>& x, 05359 const Vector<double, VectFull, Allocator4>& b, 05360 double& ferr, double& berr, 05361 LapackInfo& info) 05362 { 05363 05364 #ifdef SELDON_CHECK_DIMENSIONS 05365 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05366 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05367 #endif 05368 05369 int m = A.GetM(); 05370 int nrhs = 1; 05371 char trans('T'); 05372 Vector<double, VectFull, Allocator3> work(3*m); 05373 Vector<int> iwork(m); 05374 dgerfs_(&trans, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m, 05375 P.GetData(), b.GetData(), &m, x.GetData(), &m, 05376 &ferr, &berr, work.GetData(), 05377 iwork.GetData(), &info.GetInfoRef()); 05378 } 05379 05380 05381 template <class Prop0, class Allocator0, 05382 class Allocator1, class Allocator2, 05383 class Allocator3, class Allocator4> 05384 void RefineSolutionLU(const Matrix<complex<float>, Prop0, 05385 RowMajor, Allocator0>& A, 05386 const Matrix<complex<float>, Prop0, 05387 RowMajor, Allocator1>& Alu, 05388 const Vector<int, VectFull, Allocator2>& P, 05389 Vector<complex<float>, VectFull, Allocator3>& x, 05390 const Vector<complex<float>, VectFull, 05391 Allocator4>& b, 05392 float& ferr, float& berr, 05393 LapackInfo& info) 05394 { 05395 05396 #ifdef SELDON_CHECK_DIMENSIONS 05397 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05398 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05399 #endif 05400 05401 int m = A.GetM(); 05402 int nrhs = 1; 05403 char trans('T'); 05404 Vector<complex<float>, VectFull, Allocator3> work(2*m); 05405 Vector<float> rwork(m); 05406 cgerfs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m, 05407 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr, 05408 &berr, work.GetData(), rwork.GetData(), 05409 &info.GetInfoRef()); 05410 } 05411 05412 05413 template <class Prop0, class Allocator0, 05414 class Allocator1, class Allocator2, 05415 class Allocator3, class Allocator4> 05416 void RefineSolutionLU(const Matrix<complex<double>, Prop0, 05417 RowMajor, Allocator0>& A, 05418 const Matrix<complex<double>, Prop0, 05419 RowMajor, Allocator1>& Alu, 05420 const Vector<int, VectFull, Allocator2>& P, 05421 Vector<complex<double>, VectFull, Allocator3>& x, 05422 const Vector<complex<double>, VectFull, 05423 Allocator4>& b, 05424 double& ferr, double& berr, 05425 LapackInfo& info) 05426 { 05427 05428 #ifdef SELDON_CHECK_DIMENSIONS 05429 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05430 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05431 #endif 05432 05433 int m = A.GetM(); 05434 int nrhs = 1; 05435 char trans('T'); 05436 Vector<complex<double>, VectFull, Allocator3> work(2*m); 05437 Vector<double> rwork(m); 05438 zgerfs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m, 05439 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr, 05440 &berr, work.GetData(), rwork.GetData(), 05441 &info.GetInfoRef()); 05442 } 05443 05444 05445 /*** RowMajor ***/ 05446 05447 05448 template <class Prop0, class Allocator0, 05449 class Allocator1, class Allocator2, 05450 class Allocator3, class Allocator4> 05451 void RefineSolutionLU(const SeldonTranspose& TransA, 05452 const Matrix<float, Prop0, RowMajor, Allocator0>& A, 05453 const Matrix<float, Prop0, RowMajor, 05454 Allocator1>& Alu, 05455 const Vector<int, VectFull, Allocator2>& P, 05456 Vector<float, VectFull, Allocator3>& x, 05457 const Vector<float, VectFull, Allocator4>& b, 05458 float& ferr, float& berr, 05459 LapackInfo& info) 05460 { 05461 05462 #ifdef SELDON_CHECK_DIMENSIONS 05463 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05464 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05465 #endif 05466 05467 int m = A.GetM(); 05468 int nrhs = 1; 05469 char trans = TransA.RevChar(); 05470 Vector<float, VectFull, Allocator3> work(3*m); 05471 Vector<int> iwork(m); 05472 sgerfs_(&trans, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m, 05473 P.GetData(), b.GetData(), &m, x.GetData(), &m, 05474 &ferr, &berr, work.GetData(), 05475 iwork.GetData(), &info.GetInfoRef() ); 05476 } 05477 05478 05479 template <class Prop0, class Allocator0, 05480 class Allocator1, class Allocator2, 05481 class Allocator3, class Allocator4> 05482 void RefineSolutionLU(const SeldonTranspose& TransA, 05483 const Matrix<double, Prop0, RowMajor, Allocator0>& A, 05484 const Matrix<double, Prop0, RowMajor, 05485 Allocator1>& Alu, 05486 const Vector<int, VectFull, Allocator2>& P, 05487 Vector<double, VectFull, Allocator3>& x, 05488 const Vector<double, VectFull, Allocator4>& b, 05489 double& ferr, double& berr, 05490 LapackInfo& info) 05491 { 05492 05493 #ifdef SELDON_CHECK_DIMENSIONS 05494 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05495 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05496 #endif 05497 05498 int m = A.GetM(); 05499 int nrhs = 1; 05500 char trans = TransA.RevChar(); 05501 Vector<double, VectFull, Allocator3> work(3*m); 05502 Vector<int> iwork(m); 05503 dgerfs_(&trans, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m, 05504 P.GetData(), b.GetData(), &m, x.GetData(), &m, 05505 &ferr, &berr, work.GetData(), 05506 iwork.GetData(), &info.GetInfoRef() ); 05507 } 05508 05509 05510 template <class Prop0, class Allocator0, 05511 class Allocator1, class Allocator2, 05512 class Allocator3, class Allocator4> 05513 void RefineSolutionLU(const SeldonTranspose& TransA, 05514 const Matrix<complex<float>, Prop0, RowMajor, 05515 Allocator0>& A, 05516 const Matrix<complex<float>, Prop0, RowMajor, 05517 Allocator1>& Alu, 05518 const Vector<int, VectFull, Allocator2>& P, 05519 Vector<complex<float>, VectFull, Allocator3>& x, 05520 Vector<complex<float>, VectFull, Allocator4>& b, 05521 float& ferr, float& berr, 05522 LapackInfo& info) 05523 { 05524 05525 #ifdef SELDON_CHECK_DIMENSIONS 05526 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05527 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05528 #endif 05529 05530 int m = A.GetM(); 05531 int nrhs = 1; 05532 char trans = TransA.RevChar(); 05533 Vector<complex<float>, VectFull, Allocator3> work(2*m); 05534 Vector<float> rwork(m); 05535 if (TransA.ConjTrans()) 05536 { 05537 Conjugate(b); 05538 Conjugate(x); 05539 } 05540 cgerfs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m, 05541 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, 05542 &ferr, &berr, work.GetDataVoid(), 05543 rwork.GetData(), &info.GetInfoRef() ); 05544 if (TransA.ConjTrans()) 05545 { 05546 Conjugate(b); 05547 Conjugate(x); 05548 } 05549 } 05550 05551 05552 template <class Prop0, class Allocator0, 05553 class Allocator1, class Allocator2, 05554 class Allocator3, class Allocator4> 05555 void RefineSolutionLU(const SeldonTranspose& TransA, 05556 const Matrix<complex<double>, Prop0, RowMajor, 05557 Allocator0>& A, 05558 const Matrix<complex<double>, Prop0, RowMajor, 05559 Allocator1>& Alu, 05560 const Vector<int, VectFull, Allocator2>& P, 05561 Vector<complex<double>, VectFull, Allocator3>& x, 05562 Vector<complex<double>, VectFull, 05563 Allocator4>& b, 05564 double& ferr, double& berr, 05565 LapackInfo& info) 05566 { 05567 05568 #ifdef SELDON_CHECK_DIMENSIONS 05569 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05570 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05571 #endif 05572 05573 int m = A.GetM(); 05574 int nrhs = 1; 05575 char trans = TransA.RevChar(); 05576 Vector<complex<double>, VectFull, Allocator3> work(2*m); 05577 Vector<double> rwork(m); 05578 if (TransA.ConjTrans()) 05579 { 05580 Conjugate(b); 05581 Conjugate(x); 05582 } 05583 zgerfs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m, 05584 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, 05585 &ferr, &berr, work.GetDataVoid(), 05586 rwork.GetData(), &info.GetInfoRef()); 05587 if (TransA.ConjTrans()) 05588 { 05589 Conjugate(b); 05590 Conjugate(x); 05591 } 05592 } 05593 05594 05595 /*** ColSym and Upper ***/ 05596 05597 05598 template <class Prop0, class Allocator0, 05599 class Allocator1, class Allocator2, 05600 class Allocator3, class Allocator4> 05601 void RefineSolutionLU(const Matrix<float, Prop0, ColSym, Allocator0>& A, 05602 const Matrix<float, Prop0, ColSym, 05603 Allocator1>& Alu, 05604 const Vector<int, VectFull, Allocator2>& P, 05605 Vector<float, VectFull, Allocator3>& x, 05606 const Vector<float, VectFull, Allocator4>& b, 05607 float& ferr, float& berr, 05608 LapackInfo& info) 05609 { 05610 05611 #ifdef SELDON_CHECK_DIMENSIONS 05612 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05613 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05614 #endif 05615 05616 int m = A.GetM(); 05617 int nrhs = 1; 05618 char uplo('U'); 05619 Vector<float, VectFull, Allocator3> work(3*m); 05620 Vector<int> iwork(m); 05621 ssyrfs_(&uplo, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m, 05622 P.GetData(), b.GetData(), &m, x.GetData(), &m, 05623 &ferr, &berr, work.GetData(), 05624 iwork.GetData(), &info.GetInfoRef() ); 05625 } 05626 05627 05628 template <class Prop0, class Allocator0, 05629 class Allocator1, class Allocator2, 05630 class Allocator3, class Allocator4> 05631 void RefineSolutionLU(const Matrix<double, Prop0, ColSym, Allocator0>& A, 05632 const Matrix<double, Prop0, ColSym, 05633 Allocator1>& Alu, 05634 const Vector<int, VectFull, Allocator2>& P, 05635 Vector<double, VectFull, Allocator3>& x, 05636 const Vector<double, VectFull, Allocator4>& b, 05637 double& ferr, double& berr, 05638 LapackInfo& info) 05639 { 05640 05641 #ifdef SELDON_CHECK_DIMENSIONS 05642 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05643 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05644 #endif 05645 05646 int m = A.GetM(); 05647 int nrhs = 1; 05648 char uplo('U'); 05649 Vector<double, VectFull, Allocator3> work(3*m); 05650 Vector<int> iwork(m); 05651 dsyrfs_(&uplo, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m, 05652 P.GetData(), b.GetData(), &m, x.GetData(), &m, 05653 &ferr, &berr, work.GetData(), 05654 iwork.GetData(), &info.GetInfoRef() ); 05655 } 05656 05657 05658 template <class Prop0, class Allocator0, 05659 class Allocator1, class Allocator2, 05660 class Allocator3, class Allocator4> 05661 void RefineSolutionLU(const Matrix<complex<float>, Prop0, 05662 ColSym, Allocator0>& A, 05663 const Matrix<complex<float>, Prop0, 05664 ColSym, Allocator1>& Alu, 05665 const Vector<int, VectFull, Allocator2>& P, 05666 Vector<complex<float>, VectFull, Allocator3>& x, 05667 const Vector<complex<float>, VectFull, 05668 Allocator4>& b, 05669 float& ferr, float& berr, 05670 LapackInfo& info) 05671 { 05672 05673 #ifdef SELDON_CHECK_DIMENSIONS 05674 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05675 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05676 #endif 05677 05678 int m = A.GetM(); 05679 int nrhs = 1; 05680 char uplo('U'); 05681 Vector<complex<float>, VectFull, Allocator3> work(2*m); 05682 Vector<float> rwork(m); 05683 csyrfs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m, 05684 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr, 05685 &berr, work.GetData(), rwork.GetData(), 05686 &info.GetInfoRef() ); 05687 } 05688 05689 05690 template <class Prop0, class Allocator0, 05691 class Allocator1, class Allocator2, 05692 class Allocator3, class Allocator4> 05693 void RefineSolutionLU(const Matrix<complex<double>, Prop0, 05694 ColSym, Allocator0>& A, 05695 const Matrix<complex<double>, Prop0, 05696 ColSym, Allocator1>& Alu, 05697 const Vector<int, VectFull, Allocator2>& P, 05698 Vector<complex<double>, VectFull, Allocator3>& x, 05699 const Vector<complex<double>, VectFull, 05700 Allocator4>& b, 05701 double& ferr, double& berr, 05702 LapackInfo& info) 05703 { 05704 05705 #ifdef SELDON_CHECK_DIMENSIONS 05706 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05707 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05708 #endif 05709 05710 int m = A.GetM(); 05711 int nrhs = 1; 05712 char uplo('U'); 05713 Vector<complex<double>, VectFull, Allocator3> work(2*m); 05714 Vector<double> rwork(m); 05715 zsyrfs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m, 05716 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr, 05717 &berr, work.GetData(), rwork.GetData(), 05718 &info.GetInfoRef() ); 05719 } 05720 05721 05722 /*** ColSymPacked and Upper ***/ 05723 05724 05725 template <class Prop0, class Allocator0, 05726 class Allocator1, class Allocator2, 05727 class Allocator3, class Allocator4> 05728 void RefineSolutionLU(const Matrix<float, Prop0, ColSymPacked, 05729 Allocator0>& A, 05730 const Matrix<float, Prop0, ColSymPacked, 05731 Allocator1>& Alu, 05732 const Vector<int, VectFull, Allocator2>& P, 05733 Vector<float, VectFull, Allocator3>& x, 05734 const Vector<float, VectFull, Allocator4>& b, 05735 float& ferr, float& berr, 05736 LapackInfo& info) 05737 { 05738 05739 #ifdef SELDON_CHECK_DIMENSIONS 05740 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05741 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05742 #endif 05743 05744 int m = A.GetM(); 05745 int nrhs = 1; 05746 char uplo('U'); 05747 Vector<float, VectFull, Allocator3> work(3*m); 05748 Vector<int> iwork(m); 05749 ssprfs_(&uplo, &m, &nrhs, A.GetData(), Alu.GetData(), 05750 P.GetData(), b.GetData(), &m, x.GetData(), &m, 05751 &ferr, &berr, work.GetData(), 05752 iwork.GetData(), &info.GetInfoRef() ); 05753 } 05754 05755 05756 template <class Prop0, class Allocator0, 05757 class Allocator1, class Allocator2, 05758 class Allocator3, class Allocator4> 05759 void RefineSolutionLU(const Matrix<double, Prop0, ColSymPacked, 05760 Allocator0>& A, 05761 const Matrix<double, Prop0, ColSymPacked, 05762 Allocator1>& Alu, 05763 const Vector<int, VectFull, Allocator2>& P, 05764 Vector<double, VectFull, Allocator3>& x, 05765 const Vector<double, VectFull, Allocator4>& b, 05766 double& ferr, double& berr, 05767 LapackInfo& info) 05768 { 05769 05770 #ifdef SELDON_CHECK_DIMENSIONS 05771 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05772 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05773 #endif 05774 05775 int m = A.GetM(); 05776 int nrhs = 1; 05777 char uplo('U'); 05778 Vector<double, VectFull, Allocator3> work(3*m); 05779 Vector<int> iwork(m); 05780 dsprfs_(&uplo, &m, &nrhs, A.GetData(), Alu.GetData(), 05781 P.GetData(), b.GetData(), &m, x.GetData(), &m, 05782 &ferr, &berr, work.GetData(), 05783 iwork.GetData(), &info.GetInfoRef() ); 05784 } 05785 05786 05787 template <class Prop0, class Allocator0, 05788 class Allocator1, class Allocator2, 05789 class Allocator3, class Allocator4> 05790 void RefineSolutionLU(const Matrix<complex<float>, Prop0, 05791 ColSymPacked, Allocator0>& A, 05792 const Matrix<complex<float>, Prop0, 05793 ColSymPacked, Allocator1>& Alu, 05794 const Vector<int, VectFull, Allocator2>& P, 05795 Vector<complex<float>, VectFull, Allocator3>& x, 05796 const Vector<complex<float>, VectFull, 05797 Allocator4>& b, 05798 float& ferr, float& berr, 05799 LapackInfo& info) 05800 { 05801 05802 #ifdef SELDON_CHECK_DIMENSIONS 05803 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05804 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05805 #endif 05806 05807 int m = A.GetM(); 05808 int nrhs = 1; 05809 char uplo('U'); 05810 Vector<complex<float>, VectFull, Allocator3> work(2*m); 05811 Vector<float> rwork(m); 05812 csprfs_(&uplo, &m, &nrhs, A.GetDataVoid(), Alu.GetDataVoid(), 05813 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr, 05814 &berr, work.GetData(), rwork.GetData(), 05815 &info.GetInfoRef() ); 05816 } 05817 05818 05819 template <class Prop0, class Allocator0, 05820 class Allocator1, class Allocator2, 05821 class Allocator3, class Allocator4> 05822 void RefineSolutionLU(const Matrix<complex<double>, Prop0, 05823 ColSymPacked, Allocator0>& A, 05824 const Matrix<complex<double>, Prop0, 05825 ColSymPacked, Allocator1>& Alu, 05826 const Vector<int, VectFull, Allocator2>& P, 05827 Vector<complex<double>, VectFull, Allocator3>& x, 05828 const Vector<complex<double>, VectFull, 05829 Allocator4>& b, 05830 double& ferr, double& berr, 05831 LapackInfo& info) 05832 { 05833 05834 #ifdef SELDON_CHECK_DIMENSIONS 05835 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05836 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05837 #endif 05838 05839 int m = A.GetM(); 05840 int nrhs = 1; 05841 char uplo('U'); 05842 Vector<complex<double>, VectFull, Allocator3> work(2*m); 05843 Vector<double> rwork(m); 05844 zsprfs_(&uplo, &m, &nrhs, A.GetDataVoid(), Alu.GetDataVoid(), 05845 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr, 05846 &berr, work.GetData(), rwork.GetData(), 05847 &info.GetInfoRef() ); 05848 } 05849 05850 05851 /*** RowSym and Upper ***/ 05852 05853 05854 template <class Prop0, class Allocator0, 05855 class Allocator1, class Allocator2, 05856 class Allocator3, class Allocator4> 05857 void RefineSolutionLU(const Matrix<float, Prop0, RowSym, Allocator0>& A, 05858 const Matrix<float, Prop0, RowSym, 05859 Allocator1>& Alu, 05860 const Vector<int, VectFull, Allocator2>& P, 05861 Vector<float, VectFull, Allocator3>& x, 05862 const Vector<float, VectFull, Allocator4>& b, 05863 float& ferr, float& berr, 05864 LapackInfo& info) 05865 { 05866 05867 #ifdef SELDON_CHECK_DIMENSIONS 05868 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05869 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05870 #endif 05871 05872 int m = A.GetM(); 05873 int nrhs = 1; 05874 char uplo('L'); 05875 Vector<float, VectFull, Allocator3> work(3*m); 05876 Vector<int> iwork(m); 05877 ssyrfs_(&uplo, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m, 05878 P.GetData(), b.GetData(), &m, x.GetData(), &m, 05879 &ferr, &berr, work.GetData(), 05880 iwork.GetData(), &info.GetInfoRef() ); 05881 } 05882 05883 05884 template <class Prop0, class Allocator0, 05885 class Allocator1, class Allocator2, 05886 class Allocator3, class Allocator4> 05887 void RefineSolutionLU(const Matrix<double, Prop0, RowSym, Allocator0>& A, 05888 const Matrix<double, Prop0, RowSym, 05889 Allocator1>& Alu, 05890 const Vector<int, VectFull, Allocator2>& P, 05891 Vector<double, VectFull, Allocator3>& x, 05892 const Vector<double, VectFull, Allocator4>& b, 05893 double& ferr, double& berr, 05894 LapackInfo& info) 05895 { 05896 05897 #ifdef SELDON_CHECK_DIMENSIONS 05898 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05899 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05900 #endif 05901 05902 int m = A.GetM(); 05903 int nrhs = 1; 05904 char uplo('L'); 05905 Vector<double, VectFull, Allocator3> work(3*m); 05906 Vector<int> iwork(m); 05907 dsyrfs_(&uplo, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m, 05908 P.GetData(), b.GetData(), &m, x.GetData(), &m, 05909 &ferr, &berr, work.GetData(), 05910 iwork.GetData(), &info.GetInfoRef() ); 05911 } 05912 05913 05914 template <class Prop0, class Allocator0, 05915 class Allocator1, class Allocator2, 05916 class Allocator3, class Allocator4> 05917 void RefineSolutionLU(const Matrix<complex<float>, Prop0, 05918 RowSym, Allocator0>& A, 05919 const Matrix<complex<float>, Prop0, 05920 RowSym, Allocator1>& Alu, 05921 const Vector<int, VectFull, Allocator2>& P, 05922 Vector<complex<float>, VectFull, Allocator3>& x, 05923 const Vector<complex<float>, VectFull, 05924 Allocator4>& b, 05925 float& ferr, float& berr, 05926 LapackInfo& info) 05927 { 05928 05929 #ifdef SELDON_CHECK_DIMENSIONS 05930 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05931 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05932 #endif 05933 05934 int m = A.GetM(); 05935 int nrhs = 1; 05936 char uplo('L'); 05937 Vector<complex<float>, VectFull, Allocator3> work(2*m); 05938 Vector<float> rwork(m); 05939 csyrfs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m, 05940 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr, 05941 &berr, work.GetData(), rwork.GetData(), 05942 &info.GetInfoRef() ); 05943 } 05944 05945 05946 template <class Prop0, class Allocator0, 05947 class Allocator1, class Allocator2, 05948 class Allocator3, class Allocator4> 05949 void RefineSolutionLU(const Matrix<complex<double>, Prop0, 05950 RowSym, Allocator0>& A, 05951 const Matrix<complex<double>, Prop0, 05952 RowSym, Allocator1>& Alu, 05953 const Vector<int, VectFull, Allocator2>& P, 05954 Vector<complex<double>, VectFull, Allocator3>& x, 05955 const Vector<complex<double>, VectFull, 05956 Allocator4>& b, 05957 double& ferr, double& berr, 05958 LapackInfo& info) 05959 { 05960 05961 #ifdef SELDON_CHECK_DIMENSIONS 05962 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05963 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05964 #endif 05965 05966 int m = A.GetM(); 05967 int nrhs = 1; 05968 char uplo('L'); 05969 Vector<complex<double>, VectFull, Allocator3> work(2*m); 05970 Vector<double> rwork(m); 05971 zsyrfs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m, 05972 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr, 05973 &berr, work.GetData(), rwork.GetData(), 05974 &info.GetInfoRef() ); 05975 } 05976 05977 05978 /*** RowSymPacked and Upper ***/ 05979 05980 05981 template <class Prop0, class Allocator0, 05982 class Allocator1, class Allocator2, 05983 class Allocator3, class Allocator4> 05984 void RefineSolutionLU(const Matrix<float, Prop0, RowSymPacked, 05985 Allocator0>& A, 05986 const Matrix<float, Prop0, RowSymPacked, 05987 Allocator1>& Alu, 05988 const Vector<int, VectFull, Allocator2>& P, 05989 Vector<float, VectFull, Allocator3>& x, 05990 const Vector<float, VectFull, Allocator4>& b, 05991 float& ferr, float& berr, 05992 LapackInfo& info) 05993 { 05994 05995 #ifdef SELDON_CHECK_DIMENSIONS 05996 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05997 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 05998 #endif 05999 06000 int m = A.GetM(); 06001 int nrhs = 1; 06002 char uplo('L'); 06003 Vector<float, VectFull, Allocator3> work(3*m); 06004 Vector<int> iwork(m); 06005 ssprfs_(&uplo, &m, &nrhs, A.GetData(), Alu.GetData(), 06006 P.GetData(), b.GetData(), &m, x.GetData(), &m, 06007 &ferr, &berr, work.GetData(), 06008 iwork.GetData(), &info.GetInfoRef() ); 06009 } 06010 06011 06012 template <class Prop0, class Allocator0, 06013 class Allocator1, class Allocator2, 06014 class Allocator3, class Allocator4> 06015 void RefineSolutionLU(const Matrix<double, Prop0, RowSymPacked, 06016 Allocator0>& A, 06017 const Matrix<double, Prop0, RowSymPacked, 06018 Allocator1>& Alu, 06019 const Vector<int, VectFull, Allocator2>& P, 06020 Vector<double, VectFull, Allocator3>& x, 06021 const Vector<double, VectFull, Allocator4>& b, 06022 double& ferr, double& berr, 06023 LapackInfo& info) 06024 { 06025 06026 #ifdef SELDON_CHECK_DIMENSIONS 06027 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 06028 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 06029 #endif 06030 06031 int m = A.GetM(); 06032 int nrhs = 1; 06033 char uplo('L'); 06034 Vector<double, VectFull, Allocator3> work(3*m); 06035 Vector<int> iwork(m); 06036 dsprfs_(&uplo, &m, &nrhs, A.GetData(), Alu.GetData(), 06037 P.GetData(), b.GetData(), &m, x.GetData(), &m, 06038 &ferr, &berr, work.GetData(), 06039 iwork.GetData(), &info.GetInfoRef() ); 06040 } 06041 06042 06043 template <class Prop0, class Allocator0, 06044 class Allocator1, class Allocator2, 06045 class Allocator3, class Allocator4> 06046 void RefineSolutionLU(const Matrix<complex<float>, Prop0, 06047 RowSymPacked, Allocator0>& A, 06048 const Matrix<complex<float>, Prop0, 06049 RowSymPacked, Allocator1>& Alu, 06050 const Vector<int, VectFull, Allocator2>& P, 06051 Vector<complex<float>, VectFull, Allocator3>& x, 06052 const Vector<complex<float>, VectFull, 06053 Allocator4>& b, 06054 float& ferr, float& berr, 06055 LapackInfo& info) 06056 { 06057 06058 #ifdef SELDON_CHECK_DIMENSIONS 06059 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 06060 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 06061 #endif 06062 06063 int m = A.GetM(); 06064 int nrhs = 1; 06065 char uplo('L'); 06066 Vector<complex<float>, VectFull, Allocator3> work(2*m); 06067 Vector<float> rwork(m); 06068 csprfs_(&uplo, &m, &nrhs, A.GetDataVoid(), Alu.GetDataVoid(), 06069 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr, 06070 &berr, work.GetData(), rwork.GetData(), 06071 &info.GetInfoRef() ); 06072 } 06073 06074 06075 template <class Prop0, class Allocator0, 06076 class Allocator1, class Allocator2, 06077 class Allocator3, class Allocator4> 06078 void RefineSolutionLU(const Matrix<complex<double>, Prop0, 06079 RowSymPacked, Allocator0>& A, 06080 const Matrix<complex<double>, Prop0, 06081 RowSymPacked, Allocator1>& Alu, 06082 const Vector<int, VectFull, Allocator2>& P, 06083 Vector<complex<double>, VectFull, Allocator3>& x, 06084 const Vector<complex<double>, VectFull, 06085 Allocator4>& b, 06086 double& ferr, double& berr, 06087 LapackInfo& info) 06088 { 06089 06090 #ifdef SELDON_CHECK_DIMENSIONS 06091 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 06092 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 06093 #endif 06094 06095 int m = A.GetM(); 06096 int nrhs = 1; 06097 char uplo('L'); 06098 Vector<complex<double>, VectFull, Allocator3> work(2*m); 06099 Vector<double> rwork(m); 06100 zsprfs_(&uplo, &m, &nrhs, A.GetDataVoid(), Alu.GetDataVoid(), 06101 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr, 06102 &berr, work.GetData(), rwork.GetData(), 06103 &info.GetInfoRef() ); 06104 } 06105 06106 06107 /*** ColHerm and Upper ***/ 06108 06109 06110 template <class Prop0, class Allocator0, 06111 class Allocator1, class Allocator2, 06112 class Allocator3, class Allocator4> 06113 void RefineSolutionLU(const Matrix<complex<float>, Prop0, 06114 ColHerm, Allocator0>& A, 06115 const Matrix<complex<float>, Prop0, 06116 ColHerm, Allocator1>& Alu, 06117 const Vector<int, VectFull, Allocator2>& P, 06118 Vector<complex<float>, VectFull, Allocator3>& x, 06119 const Vector<complex<float>, VectFull, 06120 Allocator4>& b, 06121 float& ferr, float& berr, 06122 LapackInfo& info) 06123 { 06124 06125 #ifdef SELDON_CHECK_DIMENSIONS 06126 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 06127 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 06128 #endif 06129 06130 int m = A.GetM(); 06131 int nrhs = 1; 06132 char uplo('U'); 06133 Vector<complex<float>, VectFull, Allocator3> work(2*m); 06134 Vector<float> rwork(m); 06135 cherfs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m, 06136 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr, 06137 &berr, work.GetData(), rwork.GetData(), 06138 &info.GetInfoRef() ); 06139 } 06140 06141 06142 template <class Prop0, class Allocator0, 06143 class Allocator1, class Allocator2, 06144 class Allocator3, class Allocator4> 06145 void RefineSolutionLU(const Matrix<complex<double>, Prop0, 06146 ColHerm, Allocator0>& A, 06147 const Matrix<complex<double>, Prop0, 06148 ColHerm, Allocator1>& Alu, 06149 const Vector<int, VectFull, Allocator2>& P, 06150 Vector<complex<double>, VectFull, Allocator3>& x, 06151 const Vector<complex<double>, VectFull, 06152 Allocator4>& b, 06153 double& ferr, double& berr, 06154 LapackInfo& info) 06155 { 06156 06157 #ifdef SELDON_CHECK_DIMENSIONS 06158 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 06159 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 06160 #endif 06161 06162 int m = A.GetM(); 06163 int nrhs = 1; 06164 char uplo('U'); 06165 Vector<complex<double>, VectFull, Allocator3> work(2*m); 06166 Vector<double> rwork(m); 06167 zherfs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m, 06168 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr, 06169 &berr, work.GetData(), rwork.GetData(), 06170 &info.GetInfoRef() ); 06171 } 06172 06173 06174 /*** ColHermPacked and Upper ***/ 06175 06176 06177 template <class Prop0, class Allocator0, 06178 class Allocator1, class Allocator2, 06179 class Allocator3, class Allocator4> 06180 void RefineSolutionLU(const Matrix<complex<float>, Prop0, 06181 ColHermPacked, Allocator0>& A, 06182 const Matrix<complex<float>, Prop0, 06183 ColHermPacked, Allocator1>& Alu, 06184 const Vector<int, VectFull, Allocator2>& P, 06185 Vector<complex<float>, VectFull, Allocator3>& x, 06186 const Vector<complex<float>, VectFull, 06187 Allocator4>& b, 06188 float& ferr, float& berr, 06189 LapackInfo& info) 06190 { 06191 06192 #ifdef SELDON_CHECK_DIMENSIONS 06193 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 06194 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 06195 #endif 06196 06197 int m = A.GetM(); 06198 int nrhs = 1; 06199 char uplo('U'); 06200 Vector<complex<float>, VectFull, Allocator3> work(2*m); 06201 Vector<float> rwork(m); 06202 chprfs_(&uplo, &m, &nrhs, A.GetDataVoid(), Alu.GetDataVoid(), 06203 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr, 06204 &berr, work.GetData(), rwork.GetData(), 06205 &info.GetInfoRef() ); 06206 } 06207 06208 06209 template <class Prop0, class Allocator0, 06210 class Allocator1, class Allocator2, 06211 class Allocator3, class Allocator4> 06212 void RefineSolutionLU(const Matrix<complex<double>, Prop0, 06213 ColHermPacked, Allocator0>& A, 06214 const Matrix<complex<double>, Prop0, 06215 ColHermPacked, Allocator1>& Alu, 06216 const Vector<int, VectFull, Allocator2>& P, 06217 Vector<complex<double>, VectFull, Allocator3>& x, 06218 const Vector<complex<double>, VectFull, 06219 Allocator4>& b, 06220 double& ferr, double& berr, 06221 LapackInfo& info) 06222 { 06223 06224 #ifdef SELDON_CHECK_DIMENSIONS 06225 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 06226 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 06227 #endif 06228 06229 int m = A.GetM(); 06230 int nrhs = 1; 06231 char uplo('U'); 06232 Vector<complex<double>, VectFull, Allocator3> work(2*m); 06233 Vector<double> rwork(m); 06234 zhprfs_(&uplo, &m, &nrhs, A.GetDataVoid(), Alu.GetDataVoid(), 06235 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr, 06236 &berr, work.GetData(), rwork.GetData(), 06237 &info.GetInfoRef() ); 06238 } 06239 06240 06241 /*** RowHerm and Upper ***/ 06242 06243 06244 template <class Prop0, class Allocator0, 06245 class Allocator1, class Allocator2, 06246 class Allocator3, class Allocator4> 06247 void RefineSolutionLU(const Matrix<complex<float>, Prop0, 06248 RowHerm, Allocator0>& A, 06249 const Matrix<complex<float>, Prop0, 06250 RowHerm, Allocator1>& Alu, 06251 const Vector<int, VectFull, Allocator2>& P, 06252 Vector<complex<float>, VectFull, Allocator3>& x, 06253 Vector<complex<float>, VectFull, 06254 Allocator4>& b, 06255 float& ferr, float& berr, 06256 LapackInfo& info) 06257 { 06258 06259 #ifdef SELDON_CHECK_DIMENSIONS 06260 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 06261 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 06262 #endif 06263 06264 int m = A.GetM(); 06265 int nrhs = 1; 06266 char uplo('L'); 06267 Vector<complex<float>, VectFull, Allocator3> work(2*m); 06268 Vector<float> rwork(m); 06269 Conjugate(b); Conjugate(x); 06270 cherfs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m, 06271 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr, 06272 &berr, work.GetData(), rwork.GetData(), 06273 &info.GetInfoRef() ); 06274 Conjugate(b); Conjugate(x); 06275 } 06276 06277 06278 template <class Prop0, class Allocator0, 06279 class Allocator1, class Allocator2, 06280 class Allocator3, class Allocator4> 06281 void RefineSolutionLU(const Matrix<complex<double>, Prop0, 06282 RowHerm, Allocator0>& A, 06283 const Matrix<complex<double>, Prop0, 06284 RowHerm, Allocator1>& Alu, 06285 const Vector<int, VectFull, Allocator2>& P, 06286 Vector<complex<double>, VectFull, Allocator3>& x, 06287 Vector<complex<double>, VectFull, 06288 Allocator4>& b, 06289 double& ferr, double& berr, 06290 LapackInfo& info) 06291 { 06292 06293 #ifdef SELDON_CHECK_DIMENSIONS 06294 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 06295 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 06296 #endif 06297 06298 int m = A.GetM(); 06299 int nrhs = 1; 06300 char uplo('L'); 06301 Vector<complex<double>, VectFull, Allocator3> work(2*m); 06302 Vector<double> rwork(m); 06303 Conjugate(b); Conjugate(x); 06304 zherfs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m, 06305 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr, 06306 &berr, work.GetData(), rwork.GetData(), 06307 &info.GetInfoRef() ); 06308 Conjugate(b); Conjugate(x); 06309 } 06310 06311 06312 /*** RowHermPacked and Upper ***/ 06313 06314 06315 template <class Prop0, class Allocator0, 06316 class Allocator1, class Allocator2, 06317 class Allocator3, class Allocator4> 06318 void RefineSolutionLU(const Matrix<complex<float>, Prop0, 06319 RowHermPacked, Allocator0>& A, 06320 const Matrix<complex<float>, Prop0, 06321 RowHermPacked, Allocator1>& Alu, 06322 const Vector<int, VectFull, Allocator2>& P, 06323 Vector<complex<float>, VectFull, Allocator3>& x, 06324 Vector<complex<float>, VectFull, 06325 Allocator4>& b, 06326 float& ferr, float& berr, 06327 LapackInfo& info) 06328 { 06329 06330 #ifdef SELDON_CHECK_DIMENSIONS 06331 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 06332 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 06333 #endif 06334 06335 int m = A.GetM(); 06336 int nrhs = 1; 06337 char uplo('L'); 06338 Vector<complex<float>, VectFull, Allocator3> work(2*m); 06339 Vector<float> rwork(m); 06340 Conjugate(b); Conjugate(x); 06341 chprfs_(&uplo, &m, &nrhs, A.GetDataVoid(), Alu.GetDataVoid(), 06342 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr, 06343 &berr, work.GetData(), rwork.GetData(), 06344 &info.GetInfoRef() ); 06345 Conjugate(b); Conjugate(x); 06346 } 06347 06348 06349 template <class Prop0, class Allocator0, 06350 class Allocator1, class Allocator2, 06351 class Allocator3, class Allocator4> 06352 void RefineSolutionLU(const Matrix<complex<double>, Prop0, 06353 RowHermPacked, Allocator0>& A, 06354 const Matrix<complex<double>, Prop0, 06355 RowHermPacked, Allocator1>& Alu, 06356 const Vector<int, VectFull, Allocator2>& P, 06357 Vector<complex<double>, VectFull, Allocator3>& x, 06358 Vector<complex<double>, VectFull, 06359 Allocator4>& b, 06360 double& ferr, double& berr, 06361 LapackInfo& info) 06362 { 06363 06364 #ifdef SELDON_CHECK_DIMENSIONS 06365 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 06366 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)"); 06367 #endif 06368 06369 int m = A.GetM(); 06370 int nrhs = 1; 06371 char uplo('L'); 06372 Vector<complex<double>, VectFull, Allocator3> work(2*m); 06373 Vector<double> rwork(m); 06374 Conjugate(b); Conjugate(x); 06375 zhprfs_(&uplo, &m, &nrhs, A.GetDataVoid(), Alu.GetDataVoid(), 06376 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr, 06377 &berr, work.GetData(), rwork.GetData(), 06378 &info.GetInfoRef() ); 06379 Conjugate(b); Conjugate(x); 06380 } 06381 06382 06383 /*** ColUpTriang, NoTrans and NonUnit ***/ 06384 06385 06386 template <class Prop0, class Allocator0, 06387 class Allocator1, class Allocator2> 06388 void RefineSolutionLU(const Matrix<float, Prop0, ColUpTriang, 06389 Allocator0>& A, 06390 Vector<float, VectFull, Allocator1>& x, 06391 const Vector<float, VectFull, Allocator2>& b, 06392 float& ferr, float& berr, 06393 LapackInfo& info) 06394 { 06395 06396 #ifdef SELDON_CHECK_DIMENSIONS 06397 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 06398 #endif 06399 06400 int m = A.GetM(); 06401 int nrhs = 1; 06402 char uplo('U'); 06403 char trans('N'); char diag('N'); 06404 Vector<float, VectFull, Allocator1> work(3*m); 06405 Vector<int> iwork(m); 06406 strrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m, 06407 b.GetData(), &m, x.GetData(), &m, 06408 &ferr, &berr, work.GetData(), 06409 iwork.GetData(), &info.GetInfoRef() ); 06410 } 06411 06412 template <class Prop0, class Allocator0, 06413 class Allocator1, class Allocator2> 06414 void RefineSolutionLU(const Matrix<double, Prop0, ColUpTriang, 06415 Allocator0>& A, 06416 Vector<double, VectFull, Allocator1>& x, 06417 const Vector<double, VectFull, Allocator2>& b, 06418 double& ferr, double& berr, 06419 LapackInfo& info) 06420 { 06421 06422 #ifdef SELDON_CHECK_DIMENSIONS 06423 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 06424 #endif 06425 06426 int m = A.GetM(); 06427 int nrhs = 1; 06428 char uplo('U'); 06429 char trans('N'); char diag('N'); 06430 Vector<double, VectFull, Allocator1> work(3*m); 06431 Vector<int> iwork(m); 06432 dtrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m, 06433 b.GetData(), &m, x.GetData(), &m, 06434 &ferr, &berr, work.GetData(), 06435 iwork.GetData(), &info.GetInfoRef() ); 06436 } 06437 06438 06439 template <class Prop0, class Allocator0, 06440 class Allocator1, class Allocator2> 06441 void 06442 RefineSolutionLU(const Matrix<complex<float>, Prop0, ColUpTriang, 06443 Allocator0>& A, 06444 Vector<complex<float>, VectFull, Allocator1>& x, 06445 const Vector<complex<float>, VectFull, Allocator2>& b, 06446 float& ferr, float& berr, 06447 LapackInfo& info) 06448 { 06449 06450 #ifdef SELDON_CHECK_DIMENSIONS 06451 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 06452 #endif 06453 06454 int m = A.GetM(); 06455 int nrhs = 1; 06456 char uplo('U'); 06457 char trans('N'); char diag('N'); 06458 Vector<complex<float>, VectFull, Allocator1> work(2*m); 06459 Vector<float> rwork(m); 06460 ctrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m, 06461 b.GetDataVoid(), &m, x.GetDataVoid(), &m, 06462 &ferr, &berr, work.GetDataVoid(), 06463 rwork.GetData(), &info.GetInfoRef() ); 06464 } 06465 06466 06467 template <class Prop0, class Allocator0, 06468 class Allocator1, class Allocator2> 06469 void 06470 RefineSolutionLU(const Matrix<complex<double>, Prop0, ColUpTriang, 06471 Allocator0>& A, 06472 Vector<complex<double>, VectFull, Allocator1>& x, 06473 const Vector<complex<double>, VectFull, Allocator2>& b, 06474 double& ferr, double& berr, 06475 LapackInfo& info) 06476 { 06477 06478 #ifdef SELDON_CHECK_DIMENSIONS 06479 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 06480 #endif 06481 06482 int m = A.GetM(); 06483 int nrhs = 1; 06484 char uplo('U'); 06485 char trans('N'); char diag('N'); 06486 Vector<complex<double>, VectFull, Allocator1> work(2*m); 06487 Vector<double> rwork(m); 06488 ztrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m, 06489 b.GetDataVoid(), &m, x.GetDataVoid(), &m, 06490 &ferr, &berr, work.GetDataVoid(), 06491 rwork.GetData(), &info.GetInfoRef() ); 06492 } 06493 06494 06495 /*** ColUpTriang ***/ 06496 06497 06498 template <class Prop0, class Allocator0, 06499 class Allocator1, class Allocator2> 06500 void 06501 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 06502 const Matrix<float, Prop0, ColUpTriang, 06503 Allocator0>& A, 06504 Vector<float, VectFull, Allocator1>& x, 06505 const Vector<float, VectFull, Allocator2>& b, 06506 float& ferr, float& berr, 06507 LapackInfo& info) 06508 { 06509 06510 #ifdef SELDON_CHECK_DIMENSIONS 06511 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 06512 #endif 06513 06514 int m = A.GetM(); 06515 int nrhs = 1; 06516 char uplo('U'); 06517 char trans = TransA.Char(); char diag = DiagA.Char(); 06518 Vector<float, VectFull, Allocator1> work(3*m); 06519 Vector<int> iwork(m); 06520 strrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m, 06521 b.GetData(), &m, x.GetData(), &m, 06522 &ferr, &berr, work.GetData(), 06523 iwork.GetData(), &info.GetInfoRef() ); 06524 } 06525 06526 template <class Prop0, class Allocator0, 06527 class Allocator1, class Allocator2> 06528 void 06529 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 06530 const Matrix<double, Prop0, ColUpTriang, 06531 Allocator0>& A, 06532 Vector<double, VectFull, Allocator1>& x, 06533 const Vector<double, VectFull, Allocator2>& b, 06534 double& ferr, double& berr, 06535 LapackInfo& info) 06536 { 06537 06538 #ifdef SELDON_CHECK_DIMENSIONS 06539 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 06540 #endif 06541 06542 int m = A.GetM(); 06543 int nrhs = 1; 06544 char uplo('U'); 06545 char trans = TransA.Char(); char diag = DiagA.Char(); 06546 Vector<double, VectFull, Allocator1> work(3*m); 06547 Vector<int> iwork(m); 06548 dtrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m, 06549 b.GetData(), &m, x.GetData(), &m, 06550 &ferr, &berr, work.GetData(), 06551 iwork.GetData(), &info.GetInfoRef() ); 06552 } 06553 06554 06555 template <class Prop0, class Allocator0, 06556 class Allocator1, class Allocator2> 06557 void 06558 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 06559 const Matrix<complex<float>, Prop0, ColUpTriang, 06560 Allocator0>& A, 06561 Vector<complex<float>, VectFull, Allocator1>& x, 06562 const Vector<complex<float>, VectFull, Allocator2>& b, 06563 float& ferr, float& berr, 06564 LapackInfo& info) 06565 { 06566 06567 #ifdef SELDON_CHECK_DIMENSIONS 06568 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 06569 #endif 06570 06571 int m = A.GetM(); 06572 int nrhs = 1; 06573 char uplo('U'); 06574 char trans = TransA.Char(); char diag = DiagA.Char(); 06575 Vector<complex<float>, VectFull, Allocator1> work(2*m); 06576 Vector<float> rwork(m); 06577 ctrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m, 06578 b.GetDataVoid(), &m, x.GetDataVoid(), &m, 06579 &ferr, &berr, work.GetDataVoid(), 06580 rwork.GetData(), &info.GetInfoRef() ); 06581 } 06582 06583 06584 template <class Prop0, class Allocator0, 06585 class Allocator1, class Allocator2> 06586 void 06587 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 06588 const Matrix<complex<double>, Prop0, ColUpTriang, 06589 Allocator0>& A, 06590 Vector<complex<double>, VectFull, Allocator1>& x, 06591 const Vector<complex<double>, VectFull, Allocator2>& b, 06592 double& ferr, double& berr, 06593 LapackInfo& info) 06594 { 06595 06596 #ifdef SELDON_CHECK_DIMENSIONS 06597 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 06598 #endif 06599 06600 int m = A.GetM(); 06601 int nrhs = 1; 06602 char uplo('U'); 06603 char trans = TransA.Char(); char diag = DiagA.Char(); 06604 Vector<complex<double>, VectFull, Allocator1> work(2*m); 06605 Vector<double> rwork(m); 06606 ztrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m, 06607 b.GetDataVoid(), &m, x.GetDataVoid(), &m, 06608 &ferr, &berr, work.GetDataVoid(), 06609 rwork.GetData(), &info.GetInfoRef() ); 06610 } 06611 06612 06613 /*** ColLoTriang, NoTrans and NonUnit ***/ 06614 06615 06616 template <class Prop0, class Allocator0, 06617 class Allocator1, class Allocator2> 06618 void RefineSolutionLU(const Matrix<float, Prop0, ColLoTriang, 06619 Allocator0>& A, 06620 Vector<float, VectFull, Allocator1>& x, 06621 const Vector<float, VectFull, Allocator2>& b, 06622 float& ferr, float& berr, 06623 LapackInfo& info) 06624 { 06625 06626 #ifdef SELDON_CHECK_DIMENSIONS 06627 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 06628 #endif 06629 06630 int m = A.GetM(); 06631 int nrhs = 1; 06632 char uplo('L'); 06633 char trans('N'); char diag('N'); 06634 Vector<float, VectFull, Allocator1> work(3*m); 06635 Vector<int> iwork(m); 06636 strrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m, 06637 b.GetData(), &m, x.GetData(), &m, 06638 &ferr, &berr, work.GetData(), 06639 iwork.GetData(), &info.GetInfoRef() ); 06640 } 06641 06642 template <class Prop0, class Allocator0, 06643 class Allocator1, class Allocator2> 06644 void RefineSolutionLU(const Matrix<double, Prop0, ColLoTriang, 06645 Allocator0>& A, 06646 Vector<double, VectFull, Allocator1>& x, 06647 const Vector<double, VectFull, Allocator2>& b, 06648 double& ferr, double& berr, 06649 LapackInfo& info) 06650 { 06651 06652 #ifdef SELDON_CHECK_DIMENSIONS 06653 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 06654 #endif 06655 06656 int m = A.GetM(); 06657 int nrhs = 1; 06658 char uplo('L'); 06659 char trans('N'); char diag('N'); 06660 Vector<double, VectFull, Allocator1> work(3*m); 06661 Vector<int> iwork(m); 06662 dtrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m, 06663 b.GetData(), &m, x.GetData(), &m, 06664 &ferr, &berr, work.GetData(), 06665 iwork.GetData(), &info.GetInfoRef() ); 06666 } 06667 06668 06669 template <class Prop0, class Allocator0, 06670 class Allocator1, class Allocator2> 06671 void 06672 RefineSolutionLU(const Matrix<complex<float>, Prop0, ColLoTriang, 06673 Allocator0>& A, 06674 Vector<complex<float>, VectFull, Allocator1>& x, 06675 const Vector<complex<float>, VectFull, Allocator2>& b, 06676 float& ferr, float& berr, 06677 LapackInfo& info) 06678 { 06679 06680 #ifdef SELDON_CHECK_DIMENSIONS 06681 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 06682 #endif 06683 06684 int m = A.GetM(); 06685 int nrhs = 1; 06686 char uplo('L'); 06687 char trans('N'); char diag('N'); 06688 Vector<complex<float>, VectFull, Allocator1> work(2*m); 06689 Vector<float> rwork(m); 06690 ctrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m, 06691 b.GetDataVoid(), &m, x.GetDataVoid(), &m, 06692 &ferr, &berr, work.GetDataVoid(), 06693 rwork.GetData(), &info.GetInfoRef() ); 06694 } 06695 06696 06697 template <class Prop0, class Allocator0, 06698 class Allocator1, class Allocator2> 06699 void 06700 RefineSolutionLU(const Matrix<complex<double>, Prop0, ColLoTriang, 06701 Allocator0>& A, 06702 Vector<complex<double>, VectFull, Allocator1>& x, 06703 const Vector<complex<double>, VectFull, Allocator2>& b, 06704 double& ferr, double& berr, 06705 LapackInfo& info) 06706 { 06707 06708 #ifdef SELDON_CHECK_DIMENSIONS 06709 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 06710 #endif 06711 06712 int m = A.GetM(); 06713 int nrhs = 1; 06714 char uplo('L'); 06715 char trans('N'); char diag('N'); 06716 Vector<complex<double>, VectFull, Allocator1> work(2*m); 06717 Vector<double> rwork(m); 06718 ztrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m, 06719 b.GetDataVoid(), &m, x.GetDataVoid(), &m, 06720 &ferr, &berr, work.GetDataVoid(), 06721 rwork.GetData(), &info.GetInfoRef() ); 06722 } 06723 06724 06725 /*** ColLoTriang ***/ 06726 06727 06728 template <class Prop0, class Allocator0, 06729 class Allocator1, class Allocator2> 06730 void 06731 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 06732 const Matrix<float, Prop0, ColLoTriang, 06733 Allocator0>& A, 06734 Vector<float, VectFull, Allocator1>& x, 06735 const Vector<float, VectFull, Allocator2>& b, 06736 float& ferr, float& berr, 06737 LapackInfo& info) 06738 { 06739 06740 #ifdef SELDON_CHECK_DIMENSIONS 06741 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 06742 #endif 06743 06744 int m = A.GetM(); 06745 int nrhs = 1; 06746 char uplo('L'); 06747 char trans = TransA.Char(); char diag = DiagA.Char(); 06748 Vector<float, VectFull, Allocator1> work(3*m); 06749 Vector<int> iwork(m); 06750 strrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m, 06751 b.GetData(), &m, x.GetData(), &m, 06752 &ferr, &berr, work.GetData(), 06753 iwork.GetData(), &info.GetInfoRef() ); 06754 } 06755 06756 template <class Prop0, class Allocator0, 06757 class Allocator1, class Allocator2> 06758 void 06759 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 06760 const Matrix<double, Prop0, ColLoTriang, 06761 Allocator0>& A, 06762 Vector<double, VectFull, Allocator1>& x, 06763 const Vector<double, VectFull, Allocator2>& b, 06764 double& ferr, double& berr, 06765 LapackInfo& info) 06766 { 06767 06768 #ifdef SELDON_CHECK_DIMENSIONS 06769 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 06770 #endif 06771 06772 int m = A.GetM(); 06773 int nrhs = 1; 06774 char uplo('L'); 06775 char trans = TransA.Char(); char diag = DiagA.Char(); 06776 Vector<double, VectFull, Allocator1> work(3*m); 06777 Vector<int> iwork(m); 06778 dtrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m, 06779 b.GetData(), &m, x.GetData(), &m, 06780 &ferr, &berr, work.GetData(), 06781 iwork.GetData(), &info.GetInfoRef() ); 06782 } 06783 06784 06785 template <class Prop0, class Allocator0, 06786 class Allocator1, class Allocator2> 06787 void 06788 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 06789 const Matrix<complex<float>, Prop0, ColLoTriang, 06790 Allocator0>& A, 06791 Vector<complex<float>, VectFull, Allocator1>& x, 06792 const Vector<complex<float>, VectFull, Allocator2>& b, 06793 float& ferr, float& berr, 06794 LapackInfo& info) 06795 { 06796 06797 #ifdef SELDON_CHECK_DIMENSIONS 06798 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 06799 #endif 06800 06801 int m = A.GetM(); 06802 int nrhs = 1; 06803 char uplo('L'); 06804 char trans = TransA.Char(); char diag = DiagA.Char(); 06805 Vector<complex<float>, VectFull, Allocator1> work(2*m); 06806 Vector<float> rwork(m); 06807 ctrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m, 06808 b.GetDataVoid(), &m, x.GetDataVoid(), &m, 06809 &ferr, &berr, work.GetDataVoid(), 06810 rwork.GetData(), &info.GetInfoRef() ); 06811 } 06812 06813 06814 template <class Prop0, class Allocator0, 06815 class Allocator1, class Allocator2> 06816 void 06817 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 06818 const Matrix<complex<double>, Prop0, ColLoTriang, 06819 Allocator0>& A, 06820 Vector<complex<double>, VectFull, Allocator1>& x, 06821 const Vector<complex<double>, VectFull, Allocator2>& b, 06822 double& ferr, double& berr, 06823 LapackInfo& info) 06824 { 06825 06826 #ifdef SELDON_CHECK_DIMENSIONS 06827 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 06828 #endif 06829 06830 int m = A.GetM(); 06831 int nrhs = 1; 06832 char uplo('L'); 06833 char trans = TransA.Char(); char diag = DiagA.Char(); 06834 Vector<complex<double>, VectFull, Allocator1> work(2*m); 06835 Vector<double> rwork(m); 06836 ztrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m, 06837 b.GetDataVoid(), &m, x.GetDataVoid(), &m, 06838 &ferr, &berr, work.GetDataVoid(), 06839 rwork.GetData(), &info.GetInfoRef() ); 06840 } 06841 06842 06843 /*** ColUpTriangPacked, NoTrans and NonUnit ***/ 06844 06845 06846 template <class Prop0, class Allocator0, 06847 class Allocator1, class Allocator2> 06848 void RefineSolutionLU(const Matrix<float, Prop0, ColUpTriangPacked, 06849 Allocator0>& A, 06850 Vector<float, VectFull, Allocator1>& x, 06851 const Vector<float, VectFull, Allocator2>& b, 06852 float& ferr, float& berr, 06853 LapackInfo& info) 06854 { 06855 06856 #ifdef SELDON_CHECK_DIMENSIONS 06857 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 06858 #endif 06859 06860 int m = A.GetM(); 06861 int nrhs = 1; 06862 char uplo('U'); 06863 char trans('N'); char diag('N'); 06864 Vector<float, VectFull, Allocator1> work(3*m); 06865 Vector<int> iwork(m); 06866 stprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), 06867 b.GetData(), &m, x.GetData(), &m, 06868 &ferr, &berr, work.GetData(), 06869 iwork.GetData(), &info.GetInfoRef() ); 06870 } 06871 06872 template <class Prop0, class Allocator0, 06873 class Allocator1, class Allocator2> 06874 void RefineSolutionLU(const Matrix<double, Prop0, ColUpTriangPacked, 06875 Allocator0>& A, 06876 Vector<double, VectFull, Allocator1>& x, 06877 const Vector<double, VectFull, Allocator2>& b, 06878 double& ferr, double& berr, 06879 LapackInfo& info) 06880 { 06881 06882 #ifdef SELDON_CHECK_DIMENSIONS 06883 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 06884 #endif 06885 06886 int m = A.GetM(); 06887 int nrhs = 1; 06888 char uplo('U'); 06889 char trans('N'); char diag('N'); 06890 Vector<double, VectFull, Allocator1> work(3*m); 06891 Vector<int> iwork(m); 06892 dtprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), 06893 b.GetData(), &m, x.GetData(), &m, 06894 &ferr, &berr, work.GetData(), 06895 iwork.GetData(), &info.GetInfoRef() ); 06896 } 06897 06898 06899 template <class Prop0, class Allocator0, 06900 class Allocator1, class Allocator2> 06901 void 06902 RefineSolutionLU(const Matrix<complex<float>, Prop0, ColUpTriangPacked, 06903 Allocator0>& A, 06904 Vector<complex<float>, VectFull, Allocator1>& x, 06905 const Vector<complex<float>, VectFull, Allocator2>& b, 06906 float& ferr, float& berr, 06907 LapackInfo& info) 06908 { 06909 06910 #ifdef SELDON_CHECK_DIMENSIONS 06911 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 06912 #endif 06913 06914 int m = A.GetM(); 06915 int nrhs = 1; 06916 char uplo('U'); 06917 char trans('N'); char diag('N'); 06918 Vector<complex<float>, VectFull, Allocator1> work(2*m); 06919 Vector<float> rwork(m); 06920 ctprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), 06921 b.GetDataVoid(), &m, x.GetDataVoid(), &m, 06922 &ferr, &berr, work.GetDataVoid(), 06923 rwork.GetData(), &info.GetInfoRef() ); 06924 } 06925 06926 06927 template <class Prop0, class Allocator0, 06928 class Allocator1, class Allocator2> 06929 void 06930 RefineSolutionLU(const Matrix<complex<double>, Prop0, ColUpTriangPacked, 06931 Allocator0>& A, 06932 Vector<complex<double>, VectFull, Allocator1>& x, 06933 const Vector<complex<double>, VectFull, Allocator2>& b, 06934 double& ferr, double& berr, 06935 LapackInfo& info) 06936 { 06937 06938 #ifdef SELDON_CHECK_DIMENSIONS 06939 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 06940 #endif 06941 06942 int m = A.GetM(); 06943 int nrhs = 1; 06944 char uplo('U'); 06945 char trans('N'); char diag('N'); 06946 Vector<complex<double>, VectFull, Allocator1> work(2*m); 06947 Vector<double> rwork(m); 06948 ztprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), 06949 b.GetDataVoid(), &m, x.GetDataVoid(), &m, 06950 &ferr, &berr, work.GetDataVoid(), 06951 rwork.GetData(), &info.GetInfoRef() ); 06952 } 06953 06954 06955 /*** ColUpTriangPacked ***/ 06956 06957 06958 template <class Prop0, class Allocator0, 06959 class Allocator1, class Allocator2> 06960 void 06961 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 06962 const Matrix<float, Prop0, ColUpTriangPacked, 06963 Allocator0>& A, 06964 Vector<float, VectFull, Allocator1>& x, 06965 const Vector<float, VectFull, Allocator2>& b, 06966 float& ferr, float& berr, 06967 LapackInfo& info) 06968 { 06969 06970 #ifdef SELDON_CHECK_DIMENSIONS 06971 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 06972 #endif 06973 06974 int m = A.GetM(); 06975 int nrhs = 1; 06976 char uplo('U'); 06977 char trans = TransA.Char(); char diag = DiagA.Char(); 06978 Vector<float, VectFull, Allocator1> work(3*m); 06979 Vector<int> iwork(m); 06980 stprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), 06981 b.GetData(), &m, x.GetData(), &m, 06982 &ferr, &berr, work.GetData(), 06983 iwork.GetData(), &info.GetInfoRef() ); 06984 } 06985 06986 template <class Prop0, class Allocator0, 06987 class Allocator1, class Allocator2> 06988 void 06989 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 06990 const Matrix<double, Prop0, ColUpTriangPacked, 06991 Allocator0>& A, 06992 Vector<double, VectFull, Allocator1>& x, 06993 const Vector<double, VectFull, Allocator2>& b, 06994 double& ferr, double& berr, 06995 LapackInfo& info) 06996 { 06997 06998 #ifdef SELDON_CHECK_DIMENSIONS 06999 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 07000 #endif 07001 07002 int m = A.GetM(); 07003 int nrhs = 1; 07004 char uplo('U'); 07005 char trans = TransA.Char(); char diag = DiagA.Char(); 07006 Vector<double, VectFull, Allocator1> work(3*m); 07007 Vector<int> iwork(m); 07008 dtprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), 07009 b.GetData(), &m, x.GetData(), &m, 07010 &ferr, &berr, work.GetData(), 07011 iwork.GetData(), &info.GetInfoRef() ); 07012 } 07013 07014 07015 template <class Prop0, class Allocator0, 07016 class Allocator1, class Allocator2> 07017 void 07018 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 07019 const Matrix<complex<float>, Prop0, ColUpTriangPacked, 07020 Allocator0>& A, 07021 Vector<complex<float>, VectFull, Allocator1>& x, 07022 const Vector<complex<float>, VectFull, Allocator2>& b, 07023 float& ferr, float& berr, 07024 LapackInfo& info) 07025 { 07026 07027 #ifdef SELDON_CHECK_DIMENSIONS 07028 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 07029 #endif 07030 07031 int m = A.GetM(); 07032 int nrhs = 1; 07033 char uplo('U'); 07034 char trans = TransA.Char(); char diag = DiagA.Char(); 07035 Vector<complex<float>, VectFull, Allocator1> work(2*m); 07036 Vector<float> rwork(m); 07037 ctprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), 07038 b.GetDataVoid(), &m, x.GetDataVoid(), &m, 07039 &ferr, &berr, work.GetDataVoid(), 07040 rwork.GetData(), &info.GetInfoRef() ); 07041 } 07042 07043 07044 template <class Prop0, class Allocator0, 07045 class Allocator1, class Allocator2> 07046 void 07047 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 07048 const Matrix<complex<double>, Prop0, ColUpTriangPacked, 07049 Allocator0>& A, 07050 Vector<complex<double>, VectFull, Allocator1>& x, 07051 const Vector<complex<double>, VectFull, Allocator2>& b, 07052 double& ferr, double& berr, 07053 LapackInfo& info) 07054 { 07055 07056 #ifdef SELDON_CHECK_DIMENSIONS 07057 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 07058 #endif 07059 07060 int m = A.GetM(); 07061 int nrhs = 1; 07062 char uplo('U'); 07063 char trans = TransA.Char(); char diag = DiagA.Char(); 07064 Vector<complex<double>, VectFull, Allocator1> work(2*m); 07065 Vector<double> rwork(m); 07066 ztprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), 07067 b.GetDataVoid(), &m, x.GetDataVoid(), &m, 07068 &ferr, &berr, work.GetDataVoid(), 07069 rwork.GetData(), &info.GetInfoRef() ); 07070 } 07071 07072 07073 /*** ColLoTriangPacked, NoTrans and NonUnit ***/ 07074 07075 07076 template <class Prop0, class Allocator0, 07077 class Allocator1, class Allocator2> 07078 void RefineSolutionLU(const Matrix<float, Prop0, ColLoTriangPacked, 07079 Allocator0>& A, 07080 Vector<float, VectFull, Allocator1>& x, 07081 const Vector<float, VectFull, Allocator2>& b, 07082 float& ferr, float& berr, 07083 LapackInfo& info) 07084 { 07085 07086 #ifdef SELDON_CHECK_DIMENSIONS 07087 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 07088 #endif 07089 07090 int m = A.GetM(); 07091 int nrhs = 1; 07092 char uplo('L'); 07093 char trans('N'); char diag('N'); 07094 Vector<float, VectFull, Allocator1> work(3*m); 07095 Vector<int> iwork(m); 07096 stprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), 07097 b.GetData(), &m, x.GetData(), &m, 07098 &ferr, &berr, work.GetData(), 07099 iwork.GetData(), &info.GetInfoRef() ); 07100 } 07101 07102 template <class Prop0, class Allocator0, 07103 class Allocator1, class Allocator2> 07104 void RefineSolutionLU(const Matrix<double, Prop0, ColLoTriangPacked, 07105 Allocator0>& A, 07106 Vector<double, VectFull, Allocator1>& x, 07107 const Vector<double, VectFull, Allocator2>& b, 07108 double& ferr, double& berr, 07109 LapackInfo& info) 07110 { 07111 07112 #ifdef SELDON_CHECK_DIMENSIONS 07113 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 07114 #endif 07115 07116 int m = A.GetM(); 07117 int nrhs = 1; 07118 char uplo('L'); 07119 char trans('N'); char diag('N'); 07120 Vector<double, VectFull, Allocator1> work(3*m); 07121 Vector<int> iwork(m); 07122 dtprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), 07123 b.GetData(), &m, x.GetData(), &m, 07124 &ferr, &berr, work.GetData(), 07125 iwork.GetData(), &info.GetInfoRef() ); 07126 } 07127 07128 07129 template <class Prop0, class Allocator0, 07130 class Allocator1, class Allocator2> 07131 void 07132 RefineSolutionLU(const Matrix<complex<float>, Prop0, ColLoTriangPacked, 07133 Allocator0>& A, 07134 Vector<complex<float>, VectFull, Allocator1>& x, 07135 const Vector<complex<float>, VectFull, Allocator2>& b, 07136 float& ferr, float& berr, 07137 LapackInfo& info) 07138 { 07139 07140 #ifdef SELDON_CHECK_DIMENSIONS 07141 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 07142 #endif 07143 07144 int m = A.GetM(); 07145 int nrhs = 1; 07146 char uplo('L'); 07147 char trans('N'); char diag('N'); 07148 Vector<complex<float>, VectFull, Allocator1> work(2*m); 07149 Vector<float> rwork(m); 07150 ctprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), 07151 b.GetDataVoid(), &m, x.GetDataVoid(), &m, 07152 &ferr, &berr, work.GetDataVoid(), 07153 rwork.GetData(), &info.GetInfoRef() ); 07154 } 07155 07156 07157 template <class Prop0, class Allocator0, 07158 class Allocator1, class Allocator2> 07159 void 07160 RefineSolutionLU(const Matrix<complex<double>, Prop0, ColLoTriangPacked, 07161 Allocator0>& A, 07162 Vector<complex<double>, VectFull, Allocator1>& x, 07163 const Vector<complex<double>, VectFull, Allocator2>& b, 07164 double& ferr, double& berr, 07165 LapackInfo& info) 07166 { 07167 07168 #ifdef SELDON_CHECK_DIMENSIONS 07169 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 07170 #endif 07171 07172 int m = A.GetM(); 07173 int nrhs = 1; 07174 char uplo('L'); 07175 char trans('N'); char diag('N'); 07176 Vector<complex<double>, VectFull, Allocator1> work(2*m); 07177 Vector<double> rwork(m); 07178 ztprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), 07179 b.GetDataVoid(), &m, x.GetDataVoid(), &m, 07180 &ferr, &berr, work.GetDataVoid(), 07181 rwork.GetData(), &info.GetInfoRef() ); 07182 } 07183 07184 07185 /*** ColLoTriangPacked ***/ 07186 07187 07188 template <class Prop0, class Allocator0, 07189 class Allocator1, class Allocator2> 07190 void 07191 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 07192 const Matrix<float, Prop0, ColLoTriangPacked, 07193 Allocator0>& A, 07194 Vector<float, VectFull, Allocator1>& x, 07195 const Vector<float, VectFull, Allocator2>& b, 07196 float& ferr, float& berr, 07197 LapackInfo& info) 07198 { 07199 07200 #ifdef SELDON_CHECK_DIMENSIONS 07201 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 07202 #endif 07203 07204 int m = A.GetM(); 07205 int nrhs = 1; 07206 char uplo('L'); 07207 char trans = TransA.Char(); char diag = DiagA.Char(); 07208 Vector<float, VectFull, Allocator1> work(3*m); 07209 Vector<int> iwork(m); 07210 stprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), 07211 b.GetData(), &m, x.GetData(), &m, 07212 &ferr, &berr, work.GetData(), 07213 iwork.GetData(), &info.GetInfoRef() ); 07214 } 07215 07216 template <class Prop0, class Allocator0, 07217 class Allocator1, class Allocator2> 07218 void 07219 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 07220 const Matrix<double, Prop0, ColLoTriangPacked, 07221 Allocator0>& A, 07222 Vector<double, VectFull, Allocator1>& x, 07223 const Vector<double, VectFull, Allocator2>& b, 07224 double& ferr, double& berr, 07225 LapackInfo& info) 07226 { 07227 07228 #ifdef SELDON_CHECK_DIMENSIONS 07229 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 07230 #endif 07231 07232 int m = A.GetM(); 07233 int nrhs = 1; 07234 char uplo('L'); 07235 char trans = TransA.Char(); char diag = DiagA.Char(); 07236 Vector<double, VectFull, Allocator1> work(3*m); 07237 Vector<int> iwork(m); 07238 dtprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), 07239 b.GetData(), &m, x.GetData(), &m, 07240 &ferr, &berr, work.GetData(), 07241 iwork.GetData(), &info.GetInfoRef() ); 07242 } 07243 07244 07245 template <class Prop0, class Allocator0, 07246 class Allocator1, class Allocator2> 07247 void 07248 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 07249 const Matrix<complex<float>, Prop0, ColLoTriangPacked, 07250 Allocator0>& A, 07251 Vector<complex<float>, VectFull, Allocator1>& x, 07252 const Vector<complex<float>, VectFull, Allocator2>& b, 07253 float& ferr, float& berr, 07254 LapackInfo& info) 07255 { 07256 07257 #ifdef SELDON_CHECK_DIMENSIONS 07258 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 07259 #endif 07260 07261 int m = A.GetM(); 07262 int nrhs = 1; 07263 char uplo('L'); 07264 char trans = TransA.Char(); char diag = DiagA.Char(); 07265 Vector<complex<float>, VectFull, Allocator1> work(2*m); 07266 Vector<float> rwork(m); 07267 ctprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), 07268 b.GetDataVoid(), &m, x.GetDataVoid(), &m, 07269 &ferr, &berr, work.GetDataVoid(), 07270 rwork.GetData(), &info.GetInfoRef() ); 07271 } 07272 07273 07274 template <class Prop0, class Allocator0, 07275 class Allocator1, class Allocator2> 07276 void 07277 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 07278 const Matrix<complex<double>, Prop0, ColLoTriangPacked, 07279 Allocator0>& A, 07280 Vector<complex<double>, VectFull, Allocator1>& x, 07281 const Vector<complex<double>, VectFull, Allocator2>& b, 07282 double& ferr, double& berr, 07283 LapackInfo& info) 07284 { 07285 07286 #ifdef SELDON_CHECK_DIMENSIONS 07287 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 07288 #endif 07289 07290 int m = A.GetM(); 07291 int nrhs = 1; 07292 char uplo('L'); 07293 char trans = TransA.Char(); char diag = DiagA.Char(); 07294 Vector<complex<double>, VectFull, Allocator1> work(2*m); 07295 Vector<double> rwork(m); 07296 ztprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), 07297 b.GetDataVoid(), &m, x.GetDataVoid(), &m, 07298 &ferr, &berr, work.GetDataVoid(), 07299 rwork.GetData(), &info.GetInfoRef() ); 07300 } 07301 07302 07303 /*** RowUpTriang, NoTrans and NonUnit ***/ 07304 07305 07306 template <class Prop0, class Allocator0, 07307 class Allocator1, class Allocator2> 07308 void RefineSolutionLU(const Matrix<float, Prop0, RowUpTriang, 07309 Allocator0>& A, 07310 Vector<float, VectFull, Allocator1>& x, 07311 const Vector<float, VectFull, Allocator2>& b, 07312 float& ferr, float& berr, 07313 LapackInfo& info) 07314 { 07315 07316 #ifdef SELDON_CHECK_DIMENSIONS 07317 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 07318 #endif 07319 07320 int m = A.GetM(); 07321 int nrhs = 1; 07322 char uplo('L'); 07323 char trans('T'); char diag('N'); 07324 Vector<float, VectFull, Allocator1> work(3*m); 07325 Vector<int> iwork(m); 07326 strrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m, 07327 b.GetData(), &m, x.GetData(), &m, 07328 &ferr, &berr, work.GetData(), 07329 iwork.GetData(), &info.GetInfoRef() ); 07330 } 07331 07332 template <class Prop0, class Allocator0, 07333 class Allocator1, class Allocator2> 07334 void RefineSolutionLU(const Matrix<double, Prop0, RowUpTriang, 07335 Allocator0>& A, 07336 Vector<double, VectFull, Allocator1>& x, 07337 const Vector<double, VectFull, Allocator2>& b, 07338 double& ferr, double& berr, 07339 LapackInfo& info) 07340 { 07341 07342 #ifdef SELDON_CHECK_DIMENSIONS 07343 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 07344 #endif 07345 07346 int m = A.GetM(); 07347 int nrhs = 1; 07348 char uplo('L'); 07349 char trans('T'); char diag('N'); 07350 Vector<double, VectFull, Allocator1> work(3*m); 07351 Vector<int> iwork(m); 07352 dtrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m, 07353 b.GetData(), &m, x.GetData(), &m, 07354 &ferr, &berr, work.GetData(), 07355 iwork.GetData(), &info.GetInfoRef() ); 07356 } 07357 07358 07359 template <class Prop0, class Allocator0, 07360 class Allocator1, class Allocator2> 07361 void 07362 RefineSolutionLU(const Matrix<complex<float>, Prop0, RowUpTriang, 07363 Allocator0>& A, 07364 Vector<complex<float>, VectFull, Allocator1>& x, 07365 const Vector<complex<float>, VectFull, Allocator2>& b, 07366 float& ferr, float& berr, 07367 LapackInfo& info) 07368 { 07369 07370 #ifdef SELDON_CHECK_DIMENSIONS 07371 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 07372 #endif 07373 07374 int m = A.GetM(); 07375 int nrhs = 1; 07376 char uplo('L'); 07377 char trans('T'); char diag('N'); 07378 Vector<complex<float>, VectFull, Allocator1> work(2*m); 07379 Vector<float> rwork(m); 07380 ctrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m, 07381 b.GetDataVoid(), &m, x.GetDataVoid(), &m, 07382 &ferr, &berr, work.GetDataVoid(), 07383 rwork.GetData(), &info.GetInfoRef() ); 07384 } 07385 07386 07387 template <class Prop0, class Allocator0, 07388 class Allocator1, class Allocator2> 07389 void 07390 RefineSolutionLU(const Matrix<complex<double>, Prop0, RowUpTriang, 07391 Allocator0>& A, 07392 Vector<complex<double>, VectFull, Allocator1>& x, 07393 const Vector<complex<double>, VectFull, Allocator2>& b, 07394 double& ferr, double& berr, 07395 LapackInfo& info) 07396 { 07397 07398 #ifdef SELDON_CHECK_DIMENSIONS 07399 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 07400 #endif 07401 07402 int m = A.GetM(); 07403 int nrhs = 1; 07404 char uplo('L'); 07405 char trans('T'); char diag('N'); 07406 Vector<complex<double>, VectFull, Allocator1> work(2*m); 07407 Vector<double> rwork(m); 07408 ztrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m, 07409 b.GetDataVoid(), &m, x.GetDataVoid(), &m, 07410 &ferr, &berr, work.GetDataVoid(), 07411 rwork.GetData(), &info.GetInfoRef() ); 07412 } 07413 07414 07415 /*** RowUpTriang ***/ 07416 07417 07418 template <class Prop0, class Allocator0, 07419 class Allocator1, class Allocator2> 07420 void 07421 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 07422 const Matrix<float, Prop0, RowUpTriang, 07423 Allocator0>& A, 07424 Vector<float, VectFull, Allocator1>& x, 07425 const Vector<float, VectFull, Allocator2>& b, 07426 float& ferr, float& berr, 07427 LapackInfo& info) 07428 { 07429 07430 #ifdef SELDON_CHECK_DIMENSIONS 07431 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 07432 #endif 07433 07434 int m = A.GetM(); 07435 int nrhs = 1; 07436 char uplo('L'); 07437 char trans = TransA.RevChar(); char diag = DiagA.Char(); 07438 Vector<float, VectFull, Allocator1> work(3*m); 07439 Vector<int> iwork(m); 07440 strrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m, 07441 b.GetData(), &m, x.GetData(), &m, 07442 &ferr, &berr, work.GetData(), 07443 iwork.GetData(), &info.GetInfoRef() ); 07444 } 07445 07446 template <class Prop0, class Allocator0, 07447 class Allocator1, class Allocator2> 07448 void 07449 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 07450 const Matrix<double, Prop0, RowUpTriang, 07451 Allocator0>& A, 07452 Vector<double, VectFull, Allocator1>& x, 07453 const Vector<double, VectFull, Allocator2>& b, 07454 double& ferr, double& berr, 07455 LapackInfo& info) 07456 { 07457 07458 #ifdef SELDON_CHECK_DIMENSIONS 07459 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 07460 #endif 07461 07462 int m = A.GetM(); 07463 int nrhs = 1; 07464 char uplo('L'); 07465 char trans = TransA.RevChar(); char diag = DiagA.Char(); 07466 Vector<double, VectFull, Allocator1> work(3*m); 07467 Vector<int> iwork(m); 07468 dtrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m, 07469 b.GetData(), &m, x.GetData(), &m, 07470 &ferr, &berr, work.GetData(), 07471 iwork.GetData(), &info.GetInfoRef() ); 07472 } 07473 07474 07475 template <class Prop0, class Allocator0, 07476 class Allocator1, class Allocator2> 07477 void 07478 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 07479 const Matrix<complex<float>, Prop0, RowUpTriang, 07480 Allocator0>& A, 07481 Vector<complex<float>, VectFull, Allocator1>& x, 07482 Vector<complex<float>, VectFull, Allocator2>& b, 07483 float& ferr, float& berr, 07484 LapackInfo& info) 07485 { 07486 07487 #ifdef SELDON_CHECK_DIMENSIONS 07488 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 07489 #endif 07490 07491 int m = A.GetM(); 07492 int nrhs = 1; 07493 char uplo('L'); 07494 char trans = TransA.RevChar(); char diag = DiagA.Char(); 07495 Vector<complex<float>, VectFull, Allocator1> work(2*m); 07496 Vector<float> rwork(m); 07497 if (TransA.ConjTrans()) 07498 { 07499 Conjugate(b); 07500 Conjugate(x); 07501 } 07502 ctrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m, 07503 b.GetDataVoid(), &m, x.GetDataVoid(), &m, 07504 &ferr, &berr, work.GetDataVoid(), 07505 rwork.GetData(), &info.GetInfoRef() ); 07506 if (TransA.ConjTrans()) 07507 { 07508 Conjugate(b); 07509 Conjugate(x); 07510 } 07511 } 07512 07513 07514 template <class Prop0, class Allocator0, 07515 class Allocator1, class Allocator2> 07516 void 07517 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 07518 const Matrix<complex<double>, Prop0, RowUpTriang, 07519 Allocator0>& A, 07520 Vector<complex<double>, VectFull, Allocator1>& x, 07521 Vector<complex<double>, VectFull, Allocator2>& b, 07522 double& ferr, double& berr, 07523 LapackInfo& info) 07524 { 07525 07526 #ifdef SELDON_CHECK_DIMENSIONS 07527 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 07528 #endif 07529 07530 int m = A.GetM(); 07531 int nrhs = 1; 07532 char uplo('L'); 07533 char trans = TransA.RevChar(); char diag = DiagA.Char(); 07534 Vector<complex<double>, VectFull, Allocator1> work(2*m); 07535 Vector<double> rwork(m); 07536 if (TransA.ConjTrans()) 07537 { 07538 Conjugate(b); 07539 Conjugate(x); 07540 } 07541 ztrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m, 07542 b.GetDataVoid(), &m, x.GetDataVoid(), &m, 07543 &ferr, &berr, work.GetDataVoid(), 07544 rwork.GetData(), &info.GetInfoRef() ); 07545 if (TransA.ConjTrans()) 07546 { 07547 Conjugate(b); 07548 Conjugate(x); 07549 } 07550 } 07551 07552 07553 /*** RowLoTriang, NoTrans and NonUnit ***/ 07554 07555 07556 template <class Prop0, class Allocator0, 07557 class Allocator1, class Allocator2> 07558 void RefineSolutionLU(const Matrix<float, Prop0, RowLoTriang, 07559 Allocator0>& A, 07560 Vector<float, VectFull, Allocator1>& x, 07561 const Vector<float, VectFull, Allocator2>& b, 07562 float& ferr, float& berr, 07563 LapackInfo& info) 07564 { 07565 07566 #ifdef SELDON_CHECK_DIMENSIONS 07567 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 07568 #endif 07569 07570 int m = A.GetM(); 07571 int nrhs = 1; 07572 char uplo('U'); 07573 char trans('T'); char diag('N'); 07574 Vector<float, VectFull, Allocator1> work(3*m); 07575 Vector<int> iwork(m); 07576 strrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m, 07577 b.GetData(), &m, x.GetData(), &m, 07578 &ferr, &berr, work.GetData(), 07579 iwork.GetData(), &info.GetInfoRef() ); 07580 } 07581 07582 template <class Prop0, class Allocator0, 07583 class Allocator1, class Allocator2> 07584 void RefineSolutionLU(const Matrix<double, Prop0, RowLoTriang, 07585 Allocator0>& A, 07586 Vector<double, VectFull, Allocator1>& x, 07587 const Vector<double, VectFull, Allocator2>& b, 07588 double& ferr, double& berr, 07589 LapackInfo& info) 07590 { 07591 07592 #ifdef SELDON_CHECK_DIMENSIONS 07593 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 07594 #endif 07595 07596 int m = A.GetM(); 07597 int nrhs = 1; 07598 char uplo('U'); 07599 char trans('T'); char diag('N'); 07600 Vector<double, VectFull, Allocator1> work(3*m); 07601 Vector<int> iwork(m); 07602 dtrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m, 07603 b.GetData(), &m, x.GetData(), &m, 07604 &ferr, &berr, work.GetData(), 07605 iwork.GetData(), &info.GetInfoRef() ); 07606 } 07607 07608 07609 template <class Prop0, class Allocator0, 07610 class Allocator1, class Allocator2> 07611 void 07612 RefineSolutionLU(const Matrix<complex<float>, Prop0, RowLoTriang, 07613 Allocator0>& A, 07614 Vector<complex<float>, VectFull, Allocator1>& x, 07615 const Vector<complex<float>, VectFull, Allocator2>& b, 07616 float& ferr, float& berr, 07617 LapackInfo& info) 07618 { 07619 07620 #ifdef SELDON_CHECK_DIMENSIONS 07621 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 07622 #endif 07623 07624 int m = A.GetM(); 07625 int nrhs = 1; 07626 char uplo('U'); 07627 char trans('T'); char diag('N'); 07628 Vector<complex<float>, VectFull, Allocator1> work(2*m); 07629 Vector<float> rwork(m); 07630 ctrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m, 07631 b.GetDataVoid(), &m, x.GetDataVoid(), &m, 07632 &ferr, &berr, work.GetDataVoid(), 07633 rwork.GetData(), &info.GetInfoRef() ); 07634 } 07635 07636 07637 template <class Prop0, class Allocator0, 07638 class Allocator1, class Allocator2> 07639 void 07640 RefineSolutionLU(const Matrix<complex<double>, Prop0, RowLoTriang, 07641 Allocator0>& A, 07642 Vector<complex<double>, VectFull, Allocator1>& x, 07643 const Vector<complex<double>, VectFull, Allocator2>& b, 07644 double& ferr, double& berr, 07645 LapackInfo& info) 07646 { 07647 07648 #ifdef SELDON_CHECK_DIMENSIONS 07649 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 07650 #endif 07651 07652 int m = A.GetM(); 07653 int nrhs = 1; 07654 char uplo('U'); 07655 char trans('T'); char diag('N'); 07656 Vector<complex<double>, VectFull, Allocator1> work(2*m); 07657 Vector<double> rwork(m); 07658 ztrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m, 07659 b.GetDataVoid(), &m, x.GetDataVoid(), &m, 07660 &ferr, &berr, work.GetDataVoid(), 07661 rwork.GetData(), &info.GetInfoRef() ); 07662 } 07663 07664 07665 /*** RowLoTriang ***/ 07666 07667 07668 template <class Prop0, class Allocator0, 07669 class Allocator1, class Allocator2> 07670 void 07671 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 07672 const Matrix<float, Prop0, RowLoTriang, 07673 Allocator0>& A, 07674 Vector<float, VectFull, Allocator1>& x, 07675 const Vector<float, VectFull, Allocator2>& b, 07676 float& ferr, float& berr, 07677 LapackInfo& info) 07678 { 07679 07680 #ifdef SELDON_CHECK_DIMENSIONS 07681 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 07682 #endif 07683 07684 int m = A.GetM(); 07685 int nrhs = 1; 07686 char uplo('U'); 07687 char trans = TransA.RevChar(); char diag = DiagA.Char(); 07688 Vector<float, VectFull, Allocator1> work(3*m); 07689 Vector<int> iwork(m); 07690 strrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m, 07691 b.GetData(), &m, x.GetData(), &m, 07692 &ferr, &berr, work.GetData(), 07693 iwork.GetData(), &info.GetInfoRef() ); 07694 } 07695 07696 template <class Prop0, class Allocator0, 07697 class Allocator1, class Allocator2> 07698 void 07699 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 07700 const Matrix<double, Prop0, RowLoTriang, 07701 Allocator0>& A, 07702 Vector<double, VectFull, Allocator1>& x, 07703 const Vector<double, VectFull, Allocator2>& b, 07704 double& ferr, double& berr, 07705 LapackInfo& info) 07706 { 07707 07708 #ifdef SELDON_CHECK_DIMENSIONS 07709 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 07710 #endif 07711 07712 int m = A.GetM(); 07713 int nrhs = 1; 07714 char uplo('U'); 07715 char trans = TransA.RevChar(); char diag = DiagA.Char(); 07716 Vector<double, VectFull, Allocator1> work(3*m); 07717 Vector<int> iwork(m); 07718 dtrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m, 07719 b.GetData(), &m, x.GetData(), &m, 07720 &ferr, &berr, work.GetData(), 07721 iwork.GetData(), &info.GetInfoRef() ); 07722 } 07723 07724 07725 template <class Prop0, class Allocator0, 07726 class Allocator1, class Allocator2> 07727 void 07728 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 07729 const Matrix<complex<float>, Prop0, RowLoTriang, 07730 Allocator0>& A, 07731 Vector<complex<float>, VectFull, Allocator1>& x, 07732 Vector<complex<float>, VectFull, Allocator2>& b, 07733 float& ferr, float& berr, 07734 LapackInfo& info) 07735 { 07736 07737 #ifdef SELDON_CHECK_DIMENSIONS 07738 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 07739 #endif 07740 07741 int m = A.GetM(); 07742 int nrhs = 1; 07743 char uplo('U'); 07744 char trans = TransA.RevChar(); char diag = DiagA.Char(); 07745 Vector<complex<float>, VectFull, Allocator1> work(2*m); 07746 Vector<float> rwork(m); 07747 if (TransA.ConjTrans()) 07748 { 07749 Conjugate(b); 07750 Conjugate(x); 07751 } 07752 ctrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m, 07753 b.GetDataVoid(), &m, x.GetDataVoid(), &m, 07754 &ferr, &berr, work.GetDataVoid(), 07755 rwork.GetData(), &info.GetInfoRef() ); 07756 if (TransA.ConjTrans()) 07757 { 07758 Conjugate(b); 07759 Conjugate(x); 07760 } 07761 } 07762 07763 07764 template <class Prop0, class Allocator0, 07765 class Allocator1, class Allocator2> 07766 void 07767 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 07768 const Matrix<complex<double>, Prop0, RowLoTriang, 07769 Allocator0>& A, 07770 Vector<complex<double>, VectFull, Allocator1>& x, 07771 Vector<complex<double>, VectFull, Allocator2>& b, 07772 double& ferr, double& berr, 07773 LapackInfo& info) 07774 { 07775 07776 #ifdef SELDON_CHECK_DIMENSIONS 07777 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 07778 #endif 07779 07780 int m = A.GetM(); 07781 int nrhs = 1; 07782 char uplo('U'); 07783 char trans = TransA.RevChar(); char diag = DiagA.Char(); 07784 Vector<complex<double>, VectFull, Allocator1> work(2*m); 07785 Vector<double> rwork(m); 07786 if (TransA.ConjTrans()) 07787 { 07788 Conjugate(b); 07789 Conjugate(x); 07790 } 07791 ztrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m, 07792 b.GetDataVoid(), &m, x.GetDataVoid(), &m, 07793 &ferr, &berr, work.GetDataVoid(), 07794 rwork.GetData(), &info.GetInfoRef() ); 07795 if (TransA.ConjTrans()) 07796 { 07797 Conjugate(b); 07798 Conjugate(x); 07799 } 07800 } 07801 07802 07803 /*** RowUpTriangPacked, NoTrans and NonUnit ***/ 07804 07805 07806 template <class Prop0, class Allocator0, 07807 class Allocator1, class Allocator2> 07808 void RefineSolutionLU(const Matrix<float, Prop0, RowUpTriangPacked, 07809 Allocator0>& A, 07810 Vector<float, VectFull, Allocator1>& x, 07811 const Vector<float, VectFull, Allocator2>& b, 07812 float& ferr, float& berr, 07813 LapackInfo& info) 07814 { 07815 07816 #ifdef SELDON_CHECK_DIMENSIONS 07817 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 07818 #endif 07819 07820 int m = A.GetM(); 07821 int nrhs = 1; 07822 char uplo('L'); 07823 char trans('T'); char diag('N'); 07824 Vector<float, VectFull, Allocator1> work(3*m); 07825 Vector<int> iwork(m); 07826 stprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), 07827 b.GetData(), &m, x.GetData(), &m, 07828 &ferr, &berr, work.GetData(), 07829 iwork.GetData(), &info.GetInfoRef() ); 07830 } 07831 07832 template <class Prop0, class Allocator0, 07833 class Allocator1, class Allocator2> 07834 void RefineSolutionLU(const Matrix<double, Prop0, RowUpTriangPacked, 07835 Allocator0>& A, 07836 Vector<double, VectFull, Allocator1>& x, 07837 const Vector<double, VectFull, Allocator2>& b, 07838 double& ferr, double& berr, 07839 LapackInfo& info) 07840 { 07841 07842 #ifdef SELDON_CHECK_DIMENSIONS 07843 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 07844 #endif 07845 07846 int m = A.GetM(); 07847 int nrhs = 1; 07848 char uplo('L'); 07849 char trans('T'); char diag('N'); 07850 Vector<double, VectFull, Allocator1> work(3*m); 07851 Vector<int> iwork(m); 07852 dtprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), 07853 b.GetData(), &m, x.GetData(), &m, 07854 &ferr, &berr, work.GetData(), 07855 iwork.GetData(), &info.GetInfoRef() ); 07856 } 07857 07858 07859 template <class Prop0, class Allocator0, 07860 class Allocator1, class Allocator2> 07861 void 07862 RefineSolutionLU(const Matrix<complex<float>, Prop0, RowUpTriangPacked, 07863 Allocator0>& A, 07864 Vector<complex<float>, VectFull, Allocator1>& x, 07865 const Vector<complex<float>, VectFull, Allocator2>& b, 07866 float& ferr, float& berr, 07867 LapackInfo& info) 07868 { 07869 07870 #ifdef SELDON_CHECK_DIMENSIONS 07871 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 07872 #endif 07873 07874 int m = A.GetM(); 07875 int nrhs = 1; 07876 char uplo('L'); 07877 char trans('T'); char diag('N'); 07878 Vector<complex<float>, VectFull, Allocator1> work(2*m); 07879 Vector<float> rwork(m); 07880 ctprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), 07881 b.GetDataVoid(), &m, x.GetDataVoid(), &m, 07882 &ferr, &berr, work.GetDataVoid(), 07883 rwork.GetData(), &info.GetInfoRef() ); 07884 } 07885 07886 07887 template <class Prop0, class Allocator0, 07888 class Allocator1, class Allocator2> 07889 void 07890 RefineSolutionLU(const Matrix<complex<double>, Prop0, RowUpTriangPacked, 07891 Allocator0>& A, 07892 Vector<complex<double>, VectFull, Allocator1>& x, 07893 const Vector<complex<double>, VectFull, Allocator2>& b, 07894 double& ferr, double& berr, 07895 LapackInfo& info) 07896 { 07897 07898 #ifdef SELDON_CHECK_DIMENSIONS 07899 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 07900 #endif 07901 07902 int m = A.GetM(); 07903 int nrhs = 1; 07904 char uplo('L'); 07905 char trans('T'); char diag('N'); 07906 Vector<complex<double>, VectFull, Allocator1> work(2*m); 07907 Vector<double> rwork(m); 07908 ztprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), 07909 b.GetDataVoid(), &m, x.GetDataVoid(), &m, 07910 &ferr, &berr, work.GetDataVoid(), 07911 rwork.GetData(), &info.GetInfoRef() ); 07912 } 07913 07914 07915 /*** RowUpTriangPacked ***/ 07916 07917 07918 template <class Prop0, class Allocator0, 07919 class Allocator1, class Allocator2> 07920 void 07921 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 07922 const Matrix<float, Prop0, RowUpTriangPacked, 07923 Allocator0>& A, 07924 Vector<float, VectFull, Allocator1>& x, 07925 const Vector<float, VectFull, Allocator2>& b, 07926 float& ferr, float& berr, 07927 LapackInfo& info) 07928 { 07929 07930 #ifdef SELDON_CHECK_DIMENSIONS 07931 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 07932 #endif 07933 07934 int m = A.GetM(); 07935 int nrhs = 1; 07936 char uplo('L'); 07937 char trans = TransA.RevChar(); char diag = DiagA.Char(); 07938 Vector<float, VectFull, Allocator1> work(3*m); 07939 Vector<int> iwork(m); 07940 stprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), 07941 b.GetData(), &m, x.GetData(), &m, 07942 &ferr, &berr, work.GetData(), 07943 iwork.GetData(), &info.GetInfoRef() ); 07944 } 07945 07946 template <class Prop0, class Allocator0, 07947 class Allocator1, class Allocator2> 07948 void 07949 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 07950 const Matrix<double, Prop0, RowUpTriangPacked, 07951 Allocator0>& A, 07952 Vector<double, VectFull, Allocator1>& x, 07953 const Vector<double, VectFull, Allocator2>& b, 07954 double& ferr, double& berr, 07955 LapackInfo& info) 07956 { 07957 07958 #ifdef SELDON_CHECK_DIMENSIONS 07959 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 07960 #endif 07961 07962 int m = A.GetM(); 07963 int nrhs = 1; 07964 char uplo('L'); 07965 char trans = TransA.RevChar(); char diag = DiagA.Char(); 07966 Vector<double, VectFull, Allocator1> work(3*m); 07967 Vector<int> iwork(m); 07968 dtprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), 07969 b.GetData(), &m, x.GetData(), &m, 07970 &ferr, &berr, work.GetData(), 07971 iwork.GetData(), &info.GetInfoRef() ); 07972 } 07973 07974 07975 template <class Prop0, class Allocator0, 07976 class Allocator1, class Allocator2> 07977 void 07978 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 07979 const Matrix<complex<float>, Prop0, RowUpTriangPacked, 07980 Allocator0>& A, 07981 Vector<complex<float>, VectFull, Allocator1>& x, 07982 Vector<complex<float>, VectFull, Allocator2>& b, 07983 float& ferr, float& berr, 07984 LapackInfo& info) 07985 { 07986 07987 #ifdef SELDON_CHECK_DIMENSIONS 07988 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 07989 #endif 07990 07991 int m = A.GetM(); 07992 int nrhs = 1; 07993 char uplo('L'); 07994 char trans = TransA.RevChar(); char diag = DiagA.Char(); 07995 Vector<complex<float>, VectFull, Allocator1> work(2*m); 07996 Vector<float> rwork(m); 07997 if (TransA.ConjTrans()) 07998 { 07999 Conjugate(b); 08000 Conjugate(x); 08001 } 08002 ctprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), 08003 b.GetDataVoid(), &m, x.GetDataVoid(), &m, 08004 &ferr, &berr, work.GetDataVoid(), 08005 rwork.GetData(), &info.GetInfoRef() ); 08006 if (TransA.ConjTrans()) 08007 { 08008 Conjugate(b); 08009 Conjugate(x); 08010 } 08011 } 08012 08013 08014 template <class Prop0, class Allocator0, 08015 class Allocator1, class Allocator2> 08016 void 08017 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 08018 const Matrix<complex<double>, Prop0, RowUpTriangPacked, 08019 Allocator0>& A, 08020 Vector<complex<double>, VectFull, Allocator1>& x, 08021 Vector<complex<double>, VectFull, Allocator2>& b, 08022 double& ferr, double& berr, 08023 LapackInfo& info) 08024 { 08025 08026 #ifdef SELDON_CHECK_DIMENSIONS 08027 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 08028 #endif 08029 08030 int m = A.GetM(); 08031 int nrhs = 1; 08032 char uplo('L'); 08033 char trans = TransA.RevChar(); char diag = DiagA.Char(); 08034 Vector<complex<double>, VectFull, Allocator1> work(2*m); 08035 Vector<double> rwork(m); 08036 if (TransA.ConjTrans()) 08037 { 08038 Conjugate(b); 08039 Conjugate(x); 08040 } 08041 ztprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), 08042 b.GetDataVoid(), &m, x.GetDataVoid(), &m, 08043 &ferr, &berr, work.GetDataVoid(), 08044 rwork.GetData(), &info.GetInfoRef() ); 08045 if (TransA.ConjTrans()) 08046 { 08047 Conjugate(b); 08048 Conjugate(x); 08049 } 08050 } 08051 08052 08053 /*** RowLoTriangPacked, NoTrans and NonUnit ***/ 08054 08055 08056 template <class Prop0, class Allocator0, 08057 class Allocator1, class Allocator2> 08058 void RefineSolutionLU(const Matrix<float, Prop0, RowLoTriangPacked, 08059 Allocator0>& A, 08060 Vector<float, VectFull, Allocator1>& x, 08061 const Vector<float, VectFull, Allocator2>& b, 08062 float& ferr, float& berr, 08063 LapackInfo& info) 08064 { 08065 08066 #ifdef SELDON_CHECK_DIMENSIONS 08067 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 08068 #endif 08069 08070 int m = A.GetM(); 08071 int nrhs = 1; 08072 char uplo('U'); 08073 char trans('T'); char diag('N'); 08074 Vector<float, VectFull, Allocator1> work(3*m); 08075 Vector<int> iwork(m); 08076 stprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), 08077 b.GetData(), &m, x.GetData(), &m, 08078 &ferr, &berr, work.GetData(), 08079 iwork.GetData(), &info.GetInfoRef() ); 08080 } 08081 08082 template <class Prop0, class Allocator0, 08083 class Allocator1, class Allocator2> 08084 void RefineSolutionLU(const Matrix<double, Prop0, RowLoTriangPacked, 08085 Allocator0>& A, 08086 Vector<double, VectFull, Allocator1>& x, 08087 const Vector<double, VectFull, Allocator2>& b, 08088 double& ferr, double& berr, 08089 LapackInfo& info) 08090 { 08091 08092 #ifdef SELDON_CHECK_DIMENSIONS 08093 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 08094 #endif 08095 08096 int m = A.GetM(); 08097 int nrhs = 1; 08098 char uplo('U'); 08099 char trans('T'); char diag('N'); 08100 Vector<double, VectFull, Allocator1> work(3*m); 08101 Vector<int> iwork(m); 08102 dtprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), 08103 b.GetData(), &m, x.GetData(), &m, 08104 &ferr, &berr, work.GetData(), 08105 iwork.GetData(), &info.GetInfoRef() ); 08106 } 08107 08108 08109 template <class Prop0, class Allocator0, 08110 class Allocator1, class Allocator2> 08111 void 08112 RefineSolutionLU(const Matrix<complex<float>, Prop0, RowLoTriangPacked, 08113 Allocator0>& A, 08114 Vector<complex<float>, VectFull, Allocator1>& x, 08115 const Vector<complex<float>, VectFull, Allocator2>& b, 08116 float& ferr, float& berr, 08117 LapackInfo& info) 08118 { 08119 08120 #ifdef SELDON_CHECK_DIMENSIONS 08121 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 08122 #endif 08123 08124 int m = A.GetM(); 08125 int nrhs = 1; 08126 char uplo('U'); 08127 char trans('T'); char diag('N'); 08128 Vector<complex<float>, VectFull, Allocator1> work(2*m); 08129 Vector<float> rwork(m); 08130 ctprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), 08131 b.GetDataVoid(), &m, x.GetDataVoid(), &m, 08132 &ferr, &berr, work.GetDataVoid(), 08133 rwork.GetData(), &info.GetInfoRef() ); 08134 } 08135 08136 08137 template <class Prop0, class Allocator0, 08138 class Allocator1, class Allocator2> 08139 void 08140 RefineSolutionLU(const Matrix<complex<double>, Prop0, RowLoTriangPacked, 08141 Allocator0>& A, 08142 Vector<complex<double>, VectFull, Allocator1>& x, 08143 const Vector<complex<double>, VectFull, Allocator2>& b, 08144 double& ferr, double& berr, 08145 LapackInfo& info) 08146 { 08147 08148 #ifdef SELDON_CHECK_DIMENSIONS 08149 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 08150 #endif 08151 08152 int m = A.GetM(); 08153 int nrhs = 1; 08154 char uplo('U'); 08155 char trans('T'); char diag('N'); 08156 Vector<complex<double>, VectFull, Allocator1> work(2*m); 08157 Vector<double> rwork(m); 08158 ztprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), 08159 b.GetDataVoid(), &m, x.GetDataVoid(), &m, 08160 &ferr, &berr, work.GetDataVoid(), 08161 rwork.GetData(), &info.GetInfoRef() ); 08162 } 08163 08164 08165 /*** RowLoTriangPacked ***/ 08166 08167 08168 template <class Prop0, class Allocator0, 08169 class Allocator1, class Allocator2> 08170 void 08171 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 08172 const Matrix<float, Prop0, RowLoTriangPacked, 08173 Allocator0>& A, 08174 Vector<float, VectFull, Allocator1>& x, 08175 const Vector<float, VectFull, Allocator2>& b, 08176 float& ferr, float& berr, 08177 LapackInfo& info) 08178 { 08179 08180 #ifdef SELDON_CHECK_DIMENSIONS 08181 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 08182 #endif 08183 08184 int m = A.GetM(); 08185 int nrhs = 1; 08186 char uplo('U'); 08187 char trans = TransA.RevChar(); char diag = DiagA.Char(); 08188 Vector<float, VectFull, Allocator1> work(3*m); 08189 Vector<int> iwork(m); 08190 stprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), 08191 b.GetData(), &m, x.GetData(), &m, 08192 &ferr, &berr, work.GetData(), 08193 iwork.GetData(), &info.GetInfoRef() ); 08194 } 08195 08196 template <class Prop0, class Allocator0, 08197 class Allocator1, class Allocator2> 08198 void 08199 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 08200 const Matrix<double, Prop0, RowLoTriangPacked, 08201 Allocator0>& A, 08202 Vector<double, VectFull, Allocator1>& x, 08203 const Vector<double, VectFull, Allocator2>& b, 08204 double& ferr, double& berr, 08205 LapackInfo& info) 08206 { 08207 08208 #ifdef SELDON_CHECK_DIMENSIONS 08209 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 08210 #endif 08211 08212 int m = A.GetM(); 08213 int nrhs = 1; 08214 char uplo('U'); 08215 char trans = TransA.RevChar(); char diag = DiagA.Char(); 08216 Vector<double, VectFull, Allocator1> work(3*m); 08217 Vector<int> iwork(m); 08218 dtprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), 08219 b.GetData(), &m, x.GetData(), &m, 08220 &ferr, &berr, work.GetData(), 08221 iwork.GetData(), &info.GetInfoRef() ); 08222 } 08223 08224 08225 template <class Prop0, class Allocator0, 08226 class Allocator1, class Allocator2> 08227 void 08228 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 08229 const Matrix<complex<float>, Prop0, RowLoTriangPacked, 08230 Allocator0>& A, 08231 Vector<complex<float>, VectFull, Allocator1>& x, 08232 Vector<complex<float>, VectFull, Allocator2>& b, 08233 float& ferr, float& berr, 08234 LapackInfo& info) 08235 { 08236 08237 #ifdef SELDON_CHECK_DIMENSIONS 08238 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 08239 #endif 08240 08241 int m = A.GetM(); 08242 int nrhs = 1; 08243 char uplo('U'); 08244 char trans = TransA.RevChar(); char diag = DiagA.Char(); 08245 Vector<complex<float>, VectFull, Allocator1> work(2*m); 08246 Vector<float> rwork(m); 08247 if (TransA.ConjTrans()) 08248 { 08249 Conjugate(b); 08250 Conjugate(x); 08251 } 08252 ctprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), 08253 b.GetDataVoid(), &m, x.GetDataVoid(), &m, 08254 &ferr, &berr, work.GetDataVoid(), 08255 rwork.GetData(), &info.GetInfoRef() ); 08256 if (TransA.ConjTrans()) 08257 { 08258 Conjugate(b); 08259 Conjugate(x); 08260 } 08261 } 08262 08263 08264 template <class Prop0, class Allocator0, 08265 class Allocator1, class Allocator2> 08266 void 08267 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA, 08268 const Matrix<complex<double>, Prop0, RowLoTriangPacked, 08269 Allocator0>& A, 08270 Vector<complex<double>, VectFull, Allocator1>& x, 08271 Vector<complex<double>, VectFull, Allocator2>& b, 08272 double& ferr, double& berr, 08273 LapackInfo& info) 08274 { 08275 08276 #ifdef SELDON_CHECK_DIMENSIONS 08277 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)"); 08278 #endif 08279 08280 int m = A.GetM(); 08281 int nrhs = 1; 08282 char uplo('U'); 08283 char trans = TransA.RevChar(); char diag = DiagA.Char(); 08284 Vector<complex<double>, VectFull, Allocator1> work(2*m); 08285 Vector<double> rwork(m); 08286 if (TransA.ConjTrans()) 08287 { 08288 Conjugate(b); 08289 Conjugate(x); 08290 } 08291 ztprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), 08292 b.GetDataVoid(), &m, x.GetDataVoid(), &m, 08293 &ferr, &berr, work.GetDataVoid(), 08294 rwork.GetData(), &info.GetInfoRef() ); 08295 if (TransA.ConjTrans()) 08296 { 08297 Conjugate(b); 08298 Conjugate(x); 08299 } 08300 } 08301 08302 08303 // RefineSolutionLU // 08305 08306 08307 08309 // GetInverse // 08310 08311 08312 /*** ColMajor ***/ 08313 08314 08315 template <class Prop0, class Allocator0> 08316 void GetInverse(Matrix<float, Prop0, ColMajor, Allocator0>& A, 08317 LapackInfo& info) 08318 { 08319 int m = A.GetM(); 08320 Vector<int, VectFull, CallocAlloc<int> > pivot; 08321 Vector<float, VectFull, Allocator0> work(m); 08322 GetLU(A, pivot, info); 08323 sgetri_(&m, A.GetData(), &m, pivot.GetData(), work.GetData(), &m, 08324 &info.GetInfoRef()); 08325 08326 #ifdef SELDON_LAPACK_CHECK_INFO 08327 if (info.GetInfo() != 0) 08328 throw LapackError(info.GetInfo(), "GetInverse", 08329 "The matrix is inversible ? "); 08330 #endif 08331 08332 } 08333 08334 08335 template <class Prop0, class Allocator0> 08336 void GetInverse(Matrix<double, Prop0, ColMajor, Allocator0>& A, 08337 LapackInfo& info) 08338 { 08339 int m = A.GetM(); 08340 Vector<int, VectFull, CallocAlloc<int> > pivot; 08341 Vector<double, VectFull, Allocator0> work(m); 08342 GetLU(A, pivot, info); 08343 dgetri_(&m, A.GetData(), &m, pivot.GetData(), work.GetData(), &m, 08344 &info.GetInfoRef()); 08345 08346 #ifdef SELDON_LAPACK_CHECK_INFO 08347 if (info.GetInfo() != 0) 08348 throw LapackError(info.GetInfo(), "GetInverse", 08349 "The matrix is inversible ? "); 08350 #endif 08351 08352 } 08353 08354 08355 template <class Prop0, class Allocator0> 08356 void GetInverse(Matrix<complex<float>, Prop0, ColMajor, Allocator0>& A, 08357 LapackInfo& info) 08358 { 08359 int m = A.GetM(); 08360 Vector<int, VectFull, CallocAlloc<int> > pivot; 08361 Vector<complex<float>, VectFull, Allocator0> work(m); 08362 GetLU(A, pivot, info); 08363 cgetri_(&m, A.GetDataVoid(), &m, pivot.GetData(), 08364 work.GetDataVoid(), &m, &info.GetInfoRef()); 08365 08366 #ifdef SELDON_LAPACK_CHECK_INFO 08367 if (info.GetInfo() != 0) 08368 throw LapackError(info.GetInfo(), "GetInverse", 08369 "The matrix is inversible ? "); 08370 #endif 08371 08372 } 08373 08374 08375 template <class Prop0, class Allocator0> 08376 void GetInverse(Matrix<complex<double>, Prop0, ColMajor, Allocator0>& A, 08377 LapackInfo& info) 08378 { 08379 int m = A.GetM(); 08380 Vector<int, VectFull, CallocAlloc<int> > pivot; 08381 Vector<complex<double>, VectFull, Allocator0> work(m); 08382 GetLU(A, pivot, info); 08383 zgetri_(&m, A.GetDataVoid(), &m, pivot.GetData(), 08384 work.GetDataVoid(), &m, &info.GetInfoRef()); 08385 08386 #ifdef SELDON_LAPACK_CHECK_INFO 08387 if (info.GetInfo() != 0) 08388 throw LapackError(info.GetInfo(), "GetInverse", 08389 "The matrix is inversible ? "); 08390 #endif 08391 08392 } 08393 08394 08395 /*** RowMajor ***/ 08396 08397 08398 template <class Prop0, class Allocator0> 08399 void GetInverse(Matrix<float, Prop0, RowMajor, Allocator0>& A, 08400 LapackInfo& info) 08401 { 08402 int m = A.GetM(); 08403 Vector<int, VectFull, CallocAlloc<int> > pivot; 08404 Vector<float, VectFull, Allocator0> work(m); 08405 GetLU(A, pivot, info); 08406 sgetri_(&m, A.GetData(), &m, pivot.GetData(), work.GetData(), &m, 08407 &info.GetInfoRef()); 08408 08409 #ifdef SELDON_LAPACK_CHECK_INFO 08410 if (info.GetInfo() != 0) 08411 throw LapackError(info.GetInfo(), "GetInverse", 08412 "The matrix is inversible ? "); 08413 #endif 08414 08415 } 08416 08417 08418 template <class Prop0, class Allocator0> 08419 void GetInverse(Matrix<double, Prop0, RowMajor, Allocator0>& A, 08420 LapackInfo& info) 08421 { 08422 int m = A.GetM(); 08423 Vector<int, VectFull, CallocAlloc<int> > pivot; 08424 Vector<double, VectFull, Allocator0> work(m); 08425 GetLU(A, pivot, info); 08426 dgetri_(&m, A.GetData(), &m, pivot.GetData(), work.GetData(), &m, 08427 &info.GetInfoRef()); 08428 08429 #ifdef SELDON_LAPACK_CHECK_INFO 08430 if (info.GetInfo() != 0) 08431 throw LapackError(info.GetInfo(), "GetInverse", 08432 "The matrix is inversible ? "); 08433 #endif 08434 08435 } 08436 08437 08438 template <class Prop0, class Allocator0> 08439 void GetInverse(Matrix<complex<float>, Prop0, RowMajor, Allocator0>& A, 08440 LapackInfo& info) 08441 { 08442 int m = A.GetM(); 08443 Vector<int, VectFull, CallocAlloc<int> > pivot; 08444 Vector<complex<float>, VectFull, Allocator0> work(m); 08445 GetLU(A, pivot, info); 08446 cgetri_(&m, A.GetDataVoid(), &m, pivot.GetData(), 08447 work.GetDataVoid(), &m, &info.GetInfoRef()); 08448 08449 #ifdef SELDON_LAPACK_CHECK_INFO 08450 if (info.GetInfo() != 0) 08451 throw LapackError(info.GetInfo(), "GetInverse", 08452 "The matrix is inversible ? "); 08453 #endif 08454 08455 } 08456 08457 08458 template <class Prop0, class Allocator0> 08459 void GetInverse(Matrix<complex<double>, Prop0, RowMajor, Allocator0>& A, 08460 LapackInfo& info) 08461 { 08462 int m = A.GetM(); 08463 Vector<int, VectFull, CallocAlloc<int> > pivot; 08464 Vector<complex<double>, VectFull, Allocator0> work(m); 08465 GetLU(A, pivot, info); 08466 zgetri_(&m, A.GetDataVoid(), &m, pivot.GetData(), 08467 work.GetDataVoid(), &m, &info.GetInfoRef()); 08468 08469 #ifdef SELDON_LAPACK_CHECK_INFO 08470 if (info.GetInfo() != 0) 08471 throw LapackError(info.GetInfo(), "GetInverse", 08472 "The matrix is inversible ? "); 08473 #endif 08474 08475 } 08476 08477 08478 /*** ColSym and Upper ***/ 08479 08480 08481 template <class Prop0, class Allocator0> 08482 void GetInverse(Matrix<float, Prop0, ColSym, Allocator0>& A, 08483 LapackInfo& info) 08484 { 08485 int m = A.GetM(); 08486 char uplo('U'); 08487 Vector<int, VectFull, CallocAlloc<int> > pivot; 08488 Vector<float, VectFull, Allocator0> work(2*m); 08489 GetLU(A, pivot, info); 08490 ssytri_(&uplo, &m, A.GetData(), &m, pivot.GetData(), work.GetData(), 08491 &info.GetInfoRef()); 08492 08493 #ifdef SELDON_LAPACK_CHECK_INFO 08494 if (info.GetInfo() != 0) 08495 throw LapackError(info.GetInfo(), "GetInverse", 08496 "The matrix is inversible ? "); 08497 #endif 08498 08499 } 08500 08501 08502 template <class Prop0, class Allocator0> 08503 void GetInverse(Matrix<double, Prop0, ColSym, Allocator0>& A, 08504 LapackInfo& info) 08505 { 08506 int m = A.GetM(); 08507 char uplo('U'); 08508 Vector<int, VectFull, CallocAlloc<int> > pivot; 08509 Vector<double, VectFull, Allocator0> work(2*m); 08510 GetLU(A, pivot, info); 08511 dsytri_(&uplo, &m, A.GetData(), &m, pivot.GetData(), work.GetData(), 08512 &info.GetInfoRef()); 08513 08514 #ifdef SELDON_LAPACK_CHECK_INFO 08515 if (info.GetInfo() != 0) 08516 throw LapackError(info.GetInfo(), "GetInverse", 08517 "The matrix is inversible ? "); 08518 #endif 08519 08520 } 08521 08522 08523 template <class Prop0, class Allocator0> 08524 void GetInverse(Matrix<complex<float>, Prop0, ColSym, Allocator0>& A, 08525 LapackInfo& info) 08526 { 08527 int m = A.GetM(); 08528 char uplo('U'); 08529 Vector<int, VectFull, CallocAlloc<int> > pivot; 08530 Vector<complex<float>, VectFull, Allocator0> work(2*m); 08531 GetLU(A, pivot, info); 08532 csytri_(&uplo, &m, A.GetDataVoid(), &m, pivot.GetData(), 08533 work.GetDataVoid(), &info.GetInfoRef()); 08534 08535 #ifdef SELDON_LAPACK_CHECK_INFO 08536 if (info.GetInfo() != 0) 08537 throw LapackError(info.GetInfo(), "GetInverse", 08538 "The matrix is inversible ? "); 08539 #endif 08540 08541 } 08542 08543 08544 template <class Prop0, class Allocator0> 08545 void GetInverse(Matrix<complex<double>, Prop0, ColSym, Allocator0>& A, 08546 LapackInfo& info) 08547 { 08548 int m = A.GetM(); 08549 char uplo('U'); 08550 Vector<int, VectFull, CallocAlloc<int> > pivot; 08551 Vector<complex<double>, VectFull, Allocator0> work(2*m); 08552 GetLU(A, pivot, info); 08553 zsytri_(&uplo, &m, A.GetDataVoid(), &m, pivot.GetData(), 08554 work.GetDataVoid(), &info.GetInfoRef()); 08555 08556 #ifdef SELDON_LAPACK_CHECK_INFO 08557 if (info.GetInfo() != 0) 08558 throw LapackError(info.GetInfo(), "GetInverse", 08559 "The matrix is inversible ? "); 08560 #endif 08561 08562 } 08563 08564 08565 /*** ColSymPacked and Upper ***/ 08566 08567 08568 template <class Prop0, class Allocator0> 08569 void GetInverse(Matrix<float, Prop0, ColSymPacked, Allocator0>& A, 08570 LapackInfo& info) 08571 { 08572 int m = A.GetM(); 08573 char uplo('U'); 08574 Vector<int, VectFull, CallocAlloc<int> > pivot; 08575 Vector<float, VectFull, Allocator0> work(m); 08576 GetLU(A, pivot, info); 08577 ssptri_(&uplo, &m, A.GetData(), pivot.GetData(), work.GetData(), 08578 &info.GetInfoRef()); 08579 08580 #ifdef SELDON_LAPACK_CHECK_INFO 08581 if (info.GetInfo() != 0) 08582 throw LapackError(info.GetInfo(), "GetInverse", 08583 "The matrix is inversible ? "); 08584 #endif 08585 08586 } 08587 08588 08589 template <class Prop0, class Allocator0> 08590 void GetInverse(Matrix<double, Prop0, ColSymPacked, Allocator0>& A, 08591 LapackInfo& info) 08592 { 08593 int m = A.GetM(); 08594 char uplo('U'); 08595 Vector<int, VectFull, CallocAlloc<int> > pivot; 08596 Vector<double, VectFull, Allocator0> work(m); 08597 GetLU(A, pivot, info); 08598 dsptri_(&uplo, &m, A.GetData(), pivot.GetData(), work.GetData(), 08599 &info.GetInfoRef()); 08600 08601 #ifdef SELDON_LAPACK_CHECK_INFO 08602 if (info.GetInfo() != 0) 08603 throw LapackError(info.GetInfo(), "GetInverse", 08604 "The matrix is inversible ? "); 08605 #endif 08606 08607 } 08608 08609 08610 template <class Prop0, class Allocator0> 08611 void GetInverse(Matrix<complex<float>, Prop0, ColSymPacked, Allocator0>& A, 08612 LapackInfo& info) 08613 { 08614 int m = A.GetM(); 08615 char uplo('U'); 08616 Vector<int, VectFull, CallocAlloc<int> > pivot; 08617 Vector<complex<float>, VectFull, Allocator0> work(m); 08618 GetLU(A, pivot, info); 08619 csptri_(&uplo, &m, A.GetDataVoid(), pivot.GetData(), 08620 work.GetDataVoid(), &info.GetInfoRef()); 08621 08622 #ifdef SELDON_LAPACK_CHECK_INFO 08623 if (info.GetInfo() != 0) 08624 throw LapackError(info.GetInfo(), "GetInverse", 08625 "The matrix is inversible ? "); 08626 #endif 08627 08628 } 08629 08630 08631 template <class Prop0, class Allocator0> 08632 void GetInverse(Matrix<complex<double>, Prop0, ColSymPacked, Allocator0>& A, 08633 LapackInfo& info) 08634 { 08635 int m = A.GetM(); 08636 char uplo('U'); 08637 Vector<int, VectFull, CallocAlloc<int> > pivot; 08638 Vector<complex<double>, VectFull, Allocator0> work(m); 08639 GetLU(A, pivot, info); 08640 zsptri_(&uplo, &m, A.GetDataVoid(), pivot.GetData(), 08641 work.GetDataVoid(), &info.GetInfoRef()); 08642 08643 #ifdef SELDON_LAPACK_CHECK_INFO 08644 if (info.GetInfo() != 0) 08645 throw LapackError(info.GetInfo(), "GetInverse", 08646 "The matrix is inversible ? "); 08647 #endif 08648 08649 } 08650 08651 08652 /*** RowSym and Upper ***/ 08653 08654 08655 template <class Prop0, class Allocator0> 08656 void GetInverse(Matrix<float, Prop0, RowSym, Allocator0>& A, 08657 LapackInfo& info) 08658 { 08659 int m = A.GetM(); 08660 char uplo('L'); 08661 Vector<int, VectFull, CallocAlloc<int> > pivot; 08662 Vector<float, VectFull, Allocator0> work(2*m); 08663 GetLU(A, pivot, info); 08664 ssytri_(&uplo, &m, A.GetData(), &m, pivot.GetData(), work.GetData(), 08665 &info.GetInfoRef()); 08666 08667 #ifdef SELDON_LAPACK_CHECK_INFO 08668 if (info.GetInfo() != 0) 08669 throw LapackError(info.GetInfo(), "GetInverse", 08670 "The matrix is inversible ? "); 08671 #endif 08672 08673 } 08674 08675 08676 template <class Prop0, class Allocator0> 08677 void GetInverse(Matrix<double, Prop0, RowSym, Allocator0>& A, 08678 LapackInfo& info) 08679 { 08680 int m = A.GetM(); 08681 char uplo('L'); 08682 Vector<int, VectFull, CallocAlloc<int> > pivot; 08683 Vector<double, VectFull, Allocator0> work(2*m); 08684 GetLU(A, pivot, info); 08685 dsytri_(&uplo, &m, A.GetData(), &m, pivot.GetData(), work.GetData(), 08686 &info.GetInfoRef()); 08687 08688 #ifdef SELDON_LAPACK_CHECK_INFO 08689 if (info.GetInfo() != 0) 08690 throw LapackError(info.GetInfo(), "GetInverse", 08691 "The matrix is inversible ? "); 08692 #endif 08693 08694 } 08695 08696 08697 template <class Prop0, class Allocator0> 08698 void GetInverse(Matrix<complex<float>, Prop0, RowSym, Allocator0>& A, 08699 LapackInfo& info) 08700 { 08701 int m = A.GetM(); 08702 char uplo('L'); 08703 Vector<int, VectFull, CallocAlloc<int> > pivot; 08704 Vector<complex<float>, VectFull, Allocator0> work(2*m); 08705 GetLU(A, pivot, info); 08706 csytri_(&uplo, &m, A.GetDataVoid(), &m, pivot.GetData(), 08707 work.GetDataVoid(), &info.GetInfoRef()); 08708 08709 #ifdef SELDON_LAPACK_CHECK_INFO 08710 if (info.GetInfo() != 0) 08711 throw LapackError(info.GetInfo(), "GetInverse", 08712 "The matrix is inversible ? "); 08713 #endif 08714 08715 } 08716 08717 08718 template <class Prop0, class Allocator0> 08719 void GetInverse(Matrix<complex<double>, Prop0, RowSym, Allocator0>& A, 08720 LapackInfo& info) 08721 { 08722 int m = A.GetM(); 08723 char uplo('L'); 08724 Vector<int, VectFull, CallocAlloc<int> > pivot; 08725 Vector<complex<double>, VectFull, Allocator0> work(2*m); 08726 GetLU(A, pivot, info); 08727 zsytri_(&uplo, &m, A.GetDataVoid(), &m, pivot.GetData(), 08728 work.GetDataVoid(), &info.GetInfoRef()); 08729 08730 #ifdef SELDON_LAPACK_CHECK_INFO 08731 if (info.GetInfo() != 0) 08732 throw LapackError(info.GetInfo(), "GetInverse", 08733 "The matrix is inversible ? "); 08734 #endif 08735 08736 } 08737 08738 08739 /*** RowSymPacked and Upper ***/ 08740 08741 08742 template <class Prop0, class Allocator0> 08743 void GetInverse(Matrix<float, Prop0, RowSymPacked, Allocator0>& A, 08744 LapackInfo& info) 08745 { 08746 int m = A.GetM(); 08747 char uplo('L'); 08748 Vector<int, VectFull, CallocAlloc<int> > pivot; 08749 Vector<float, VectFull, Allocator0> work(m); 08750 GetLU(A, pivot, info); 08751 ssptri_(&uplo, &m, A.GetData(), pivot.GetData(), work.GetData(), 08752 &info.GetInfoRef()); 08753 08754 #ifdef SELDON_LAPACK_CHECK_INFO 08755 if (info.GetInfo() != 0) 08756 throw LapackError(info.GetInfo(), "GetInverse", 08757 "The matrix is inversible ? "); 08758 #endif 08759 08760 } 08761 08762 08763 template <class Prop0, class Allocator0> 08764 void GetInverse(Matrix<double, Prop0, RowSymPacked, Allocator0>& A, 08765 LapackInfo& info) 08766 { 08767 int m = A.GetM(); 08768 char uplo('L'); 08769 Vector<int, VectFull, CallocAlloc<int> > pivot; 08770 Vector<double, VectFull, Allocator0> work(m); 08771 GetLU(A, pivot, info); 08772 dsptri_(&uplo, &m, A.GetData(), pivot.GetData(), work.GetData(), 08773 &info.GetInfoRef()); 08774 08775 #ifdef SELDON_LAPACK_CHECK_INFO 08776 if (info.GetInfo() != 0) 08777 throw LapackError(info.GetInfo(), "GetInverse", 08778 "The matrix is inversible ? "); 08779 #endif 08780 08781 } 08782 08783 08784 template <class Prop0, class Allocator0> 08785 void GetInverse(Matrix<complex<float>, Prop0, RowSymPacked, Allocator0>& A, 08786 LapackInfo& info) 08787 { 08788 int m = A.GetM(); 08789 char uplo('L'); 08790 Vector<int, VectFull, CallocAlloc<int> > pivot; 08791 Vector<complex<float>, VectFull, Allocator0> work(m); 08792 GetLU(A, pivot, info); 08793 csptri_(&uplo, &m, A.GetDataVoid(), pivot.GetData(), 08794 work.GetDataVoid(), &info.GetInfoRef()); 08795 08796 #ifdef SELDON_LAPACK_CHECK_INFO 08797 if (info.GetInfo() != 0) 08798 throw LapackError(info.GetInfo(), "GetInverse", 08799 "The matrix is inversible ? "); 08800 #endif 08801 08802 } 08803 08804 08805 template <class Prop0, class Allocator0> 08806 void GetInverse(Matrix<complex<double>, Prop0, RowSymPacked, Allocator0>& A, 08807 LapackInfo& info) 08808 { 08809 int m = A.GetM(); 08810 char uplo('L'); 08811 Vector<int, VectFull, CallocAlloc<int> > pivot; 08812 Vector<complex<double>, VectFull, Allocator0> work(m); 08813 GetLU(A, pivot, info); 08814 zsptri_(&uplo, &m, A.GetDataVoid(), pivot.GetData(), 08815 work.GetDataVoid(), &info.GetInfoRef()); 08816 08817 #ifdef SELDON_LAPACK_CHECK_INFO 08818 if (info.GetInfo() != 0) 08819 throw LapackError(info.GetInfo(), "GetInverse", 08820 "The matrix is inversible ? "); 08821 #endif 08822 08823 } 08824 08825 08826 /*** ColHerm and Upper ***/ 08827 08828 08829 template <class Prop0, class Allocator0> 08830 void GetInverse(Matrix<complex<float>, Prop0, ColHerm, Allocator0>& A, 08831 LapackInfo& info) 08832 { 08833 int m = A.GetM(); 08834 char uplo('U'); 08835 Vector<int, VectFull, CallocAlloc<int> > pivot; 08836 Vector<complex<float>, VectFull, Allocator0> work(m); 08837 GetLU(A, pivot, info); 08838 chetri_(&uplo, &m, A.GetDataVoid(), &m, pivot.GetData(), 08839 work.GetDataVoid(), &info.GetInfoRef()); 08840 08841 #ifdef SELDON_LAPACK_CHECK_INFO 08842 if (info.GetInfo() != 0) 08843 throw LapackError(info.GetInfo(), "GetInverse", 08844 "The matrix is inversible ? "); 08845 #endif 08846 08847 } 08848 08849 08850 template <class Prop0, class Allocator0> 08851 void GetInverse(Matrix<complex<double>, Prop0, ColHerm, Allocator0>& A, 08852 LapackInfo& info) 08853 { 08854 int m = A.GetM(); 08855 char uplo('U'); 08856 Vector<int, VectFull, CallocAlloc<int> > pivot; 08857 Vector<complex<double>, VectFull, Allocator0> work(m); 08858 GetLU(A, pivot, info); 08859 zhetri_(&uplo, &m, A.GetDataVoid(), &m, pivot.GetData(), 08860 work.GetDataVoid(), &info.GetInfoRef()); 08861 08862 #ifdef SELDON_LAPACK_CHECK_INFO 08863 if (info.GetInfo() != 0) 08864 throw LapackError(info.GetInfo(), "GetInverse", 08865 "The matrix is inversible ? "); 08866 #endif 08867 08868 } 08869 08870 08871 /*** ColHermPacked and Upper ***/ 08872 08873 08874 template <class Prop0, class Allocator0> 08875 void GetInverse(Matrix<complex<float>, Prop0, ColHermPacked, 08876 Allocator0>& A, 08877 LapackInfo& info) 08878 { 08879 int m = A.GetM(); 08880 char uplo('U'); 08881 Vector<int, VectFull, CallocAlloc<int> > pivot; 08882 Vector<complex<float>, VectFull, Allocator0> work(m); 08883 GetLU(A, pivot, info); 08884 chptri_(&uplo, &m, A.GetDataVoid(), pivot.GetData(), 08885 work.GetDataVoid(), &info.GetInfoRef()); 08886 08887 #ifdef SELDON_LAPACK_CHECK_INFO 08888 if (info.GetInfo() != 0) 08889 throw LapackError(info.GetInfo(), "GetInverse", 08890 "The matrix is inversible ? "); 08891 #endif 08892 08893 } 08894 08895 08896 template <class Prop0, class Allocator0> 08897 void GetInverse(Matrix<complex<double>, Prop0, ColHermPacked, 08898 Allocator0>& A, 08899 LapackInfo& info) 08900 { 08901 int m = A.GetM(); 08902 char uplo('U'); 08903 Vector<int, VectFull, CallocAlloc<int> > pivot; 08904 Vector<complex<double>, VectFull, Allocator0> work(m); 08905 GetLU(A, pivot, info); 08906 zhptri_(&uplo, &m, A.GetDataVoid(), pivot.GetData(), 08907 work.GetDataVoid(), &info.GetInfoRef()); 08908 08909 #ifdef SELDON_LAPACK_CHECK_INFO 08910 if (info.GetInfo() != 0) 08911 throw LapackError(info.GetInfo(), "GetInverse", 08912 "The matrix is inversible ? "); 08913 #endif 08914 08915 } 08916 08917 08918 /*** RowHerm and Upper ***/ 08919 08920 08921 template <class Prop0, class Allocator0> 08922 void GetInverse(Matrix<complex<float>, Prop0, RowHerm, Allocator0>& A, 08923 LapackInfo& info) 08924 { 08925 int m = A.GetM(); 08926 char uplo('L'); 08927 Vector<int, VectFull, CallocAlloc<int> > pivot; 08928 Vector<complex<float>, VectFull, Allocator0> work(m); 08929 GetLU(A, pivot, info); 08930 chetri_(&uplo, &m, A.GetDataVoid(), &m, pivot.GetData(), 08931 work.GetDataVoid(), &info.GetInfoRef()); 08932 08933 #ifdef SELDON_LAPACK_CHECK_INFO 08934 if (info.GetInfo() != 0) 08935 throw LapackError(info.GetInfo(), "GetInverse", 08936 "The matrix is inversible ? "); 08937 #endif 08938 08939 } 08940 08941 08942 template <class Prop0, class Allocator0> 08943 void GetInverse(Matrix<complex<double>, Prop0, RowHerm, Allocator0>& A, 08944 LapackInfo& info) 08945 { 08946 int m = A.GetM(); 08947 char uplo('L'); 08948 Vector<int, VectFull, CallocAlloc<int> > pivot; 08949 Vector<complex<double>, VectFull, Allocator0> work(m); 08950 GetLU(A, pivot, info); 08951 zhetri_(&uplo, &m, A.GetDataVoid(), &m, pivot.GetData(), 08952 work.GetDataVoid(), &info.GetInfoRef()); 08953 08954 #ifdef SELDON_LAPACK_CHECK_INFO 08955 if (info.GetInfo() != 0) 08956 throw LapackError(info.GetInfo(), "GetInverse", 08957 "The matrix is inversible ? "); 08958 #endif 08959 08960 } 08961 08962 08963 /*** RowHermPacked and Upper ***/ 08964 08965 08966 template <class Prop0, class Allocator0> 08967 void GetInverse(Matrix<complex<float>, Prop0, RowHermPacked, 08968 Allocator0>& A, 08969 LapackInfo& info) 08970 { 08971 int m = A.GetM(); 08972 char uplo('L'); 08973 Vector<int, VectFull, CallocAlloc<int> > pivot; 08974 Vector<complex<float>, VectFull, Allocator0> work(m); 08975 GetLU(A, pivot, info); 08976 chptri_(&uplo, &m, A.GetDataVoid(), pivot.GetData(), 08977 work.GetDataVoid(), &info.GetInfoRef()); 08978 08979 #ifdef SELDON_LAPACK_CHECK_INFO 08980 if (info.GetInfo() != 0) 08981 throw LapackError(info.GetInfo(), "GetInverse", 08982 "The matrix is inversible ? "); 08983 #endif 08984 08985 } 08986 08987 08988 template <class Prop0, class Allocator0> 08989 void GetInverse(Matrix<complex<double>, Prop0, RowHermPacked, 08990 Allocator0>& A, 08991 LapackInfo& info) 08992 { 08993 int m = A.GetM(); 08994 char uplo('L'); 08995 Vector<int, VectFull, CallocAlloc<int> > pivot; 08996 Vector<complex<double>, VectFull, Allocator0> work(m); 08997 GetLU(A, pivot, info); 08998 zhptri_(&uplo, &m, A.GetDataVoid(), pivot.GetData(), 08999 work.GetDataVoid(), &info.GetInfoRef()); 09000 09001 #ifdef SELDON_LAPACK_CHECK_INFO 09002 if (info.GetInfo() != 0) 09003 throw LapackError(info.GetInfo(), "GetInverse", 09004 "The matrix is inversible ? "); 09005 #endif 09006 09007 } 09008 09009 09010 /*** ColUpTriang and NonUnit ***/ 09011 09012 09013 template <class Prop0, class Allocator0> 09014 void GetInverse(Matrix<float, Prop0, ColUpTriang, Allocator0>& A, 09015 LapackInfo& info) 09016 { 09017 int m = A.GetM(); 09018 char uplo('U'); char diag('N'); 09019 strtri_(&uplo, &diag, &m, A.GetData(), &m, 09020 &info.GetInfoRef()); 09021 09022 #ifdef SELDON_LAPACK_CHECK_INFO 09023 if (info.GetInfo() != 0) 09024 throw LapackError(info.GetInfo(), "GetInverse", 09025 "The matrix is inversible ? "); 09026 #endif 09027 09028 } 09029 09030 09031 template <class Prop0, class Allocator0> 09032 void GetInverse(Matrix<double, Prop0, ColUpTriang, Allocator0>& A, 09033 LapackInfo& info) 09034 { 09035 int m = A.GetM(); 09036 char uplo('U'); char diag('N'); 09037 dtrtri_(&uplo, &diag, &m, A.GetData(), &m, 09038 &info.GetInfoRef()); 09039 09040 #ifdef SELDON_LAPACK_CHECK_INFO 09041 if (info.GetInfo() != 0) 09042 throw LapackError(info.GetInfo(), "GetInverse", 09043 "The matrix is inversible ? "); 09044 #endif 09045 09046 } 09047 09048 09049 template <class Prop0, class Allocator0> 09050 void GetInverse(Matrix<complex<float>, Prop0, ColUpTriang, Allocator0>& A, 09051 LapackInfo& info) 09052 { 09053 int m = A.GetM(); 09054 char uplo('U'); char diag('N'); 09055 ctrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m, 09056 &info.GetInfoRef()); 09057 09058 #ifdef SELDON_LAPACK_CHECK_INFO 09059 if (info.GetInfo() != 0) 09060 throw LapackError(info.GetInfo(), "GetInverse", 09061 "The matrix is inversible ? "); 09062 #endif 09063 09064 } 09065 09066 09067 template <class Prop0, class Allocator0> 09068 void GetInverse(Matrix<complex<double>, Prop0, ColUpTriang, Allocator0>& A, 09069 LapackInfo& info) 09070 { 09071 int m = A.GetM(); 09072 char uplo('U'); char diag('N'); 09073 ztrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m, 09074 &info.GetInfoRef()); 09075 09076 #ifdef SELDON_LAPACK_CHECK_INFO 09077 if (info.GetInfo() != 0) 09078 throw LapackError(info.GetInfo(), "GetInverse", 09079 "The matrix is inversible ? "); 09080 #endif 09081 09082 } 09083 09084 09085 /*** ColUpTriang ***/ 09086 09087 09088 template <class Prop0, class Allocator0> 09089 void GetInverse(const SeldonDiag& DiagA, 09090 Matrix<float, Prop0, ColUpTriang, Allocator0>& A, 09091 LapackInfo& info) 09092 { 09093 int m = A.GetM(); 09094 char uplo('U'); char diag = DiagA.Char(); 09095 strtri_(&uplo, &diag, &m, A.GetData(), &m, 09096 &info.GetInfoRef()); 09097 09098 #ifdef SELDON_LAPACK_CHECK_INFO 09099 if (info.GetInfo() != 0) 09100 throw LapackError(info.GetInfo(), "GetInverse", 09101 "The matrix is inversible ? "); 09102 #endif 09103 09104 } 09105 09106 09107 template <class Prop0, class Allocator0> 09108 void GetInverse(const SeldonDiag& DiagA, 09109 Matrix<double, Prop0, ColUpTriang, Allocator0>& A, 09110 LapackInfo& info) 09111 { 09112 int m = A.GetM(); 09113 char uplo('U'); char diag = DiagA.Char(); 09114 dtrtri_(&uplo, &diag, &m, A.GetData(), &m, 09115 &info.GetInfoRef()); 09116 09117 #ifdef SELDON_LAPACK_CHECK_INFO 09118 if (info.GetInfo() != 0) 09119 throw LapackError(info.GetInfo(), "GetInverse", 09120 "The matrix is inversible ? "); 09121 #endif 09122 09123 } 09124 09125 09126 template <class Prop0, class Allocator0> 09127 void GetInverse(const SeldonDiag& DiagA, 09128 Matrix<complex<float>, Prop0, ColUpTriang, Allocator0>& A, 09129 LapackInfo& info) 09130 { 09131 int m = A.GetM(); 09132 char uplo('U'); char diag = DiagA.Char(); 09133 ctrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m, 09134 &info.GetInfoRef()); 09135 09136 #ifdef SELDON_LAPACK_CHECK_INFO 09137 if (info.GetInfo() != 0) 09138 throw LapackError(info.GetInfo(), "GetInverse", 09139 "The matrix is inversible ? "); 09140 #endif 09141 09142 } 09143 09144 09145 template <class Prop0, class Allocator0> 09146 void GetInverse(const SeldonDiag& DiagA, 09147 Matrix<complex<double>, Prop0, ColUpTriang, Allocator0>& A, 09148 LapackInfo& info) 09149 { 09150 int m = A.GetM(); 09151 char uplo('U'); char diag = DiagA.Char(); 09152 ztrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m, 09153 &info.GetInfoRef()); 09154 09155 #ifdef SELDON_LAPACK_CHECK_INFO 09156 if (info.GetInfo() != 0) 09157 throw LapackError(info.GetInfo(), "GetInverse", 09158 "The matrix is inversible ? "); 09159 #endif 09160 09161 } 09162 09163 09164 /*** ColLoTriang and NonUnit ***/ 09165 09166 09167 template <class Prop0, class Allocator0> 09168 void GetInverse(Matrix<float, Prop0, ColLoTriang, Allocator0>& A, 09169 LapackInfo& info) 09170 { 09171 int m = A.GetM(); 09172 char uplo('L'); char diag('N'); 09173 strtri_(&uplo, &diag, &m, A.GetData(), &m, 09174 &info.GetInfoRef()); 09175 09176 #ifdef SELDON_LAPACK_CHECK_INFO 09177 if (info.GetInfo() != 0) 09178 throw LapackError(info.GetInfo(), "GetInverse", 09179 "The matrix is inversible ? "); 09180 #endif 09181 09182 } 09183 09184 09185 template <class Prop0, class Allocator0> 09186 void GetInverse(Matrix<double, Prop0, ColLoTriang, Allocator0>& A, 09187 LapackInfo& info) 09188 { 09189 int m = A.GetM(); 09190 char uplo('L'); char diag('N'); 09191 dtrtri_(&uplo, &diag, &m, A.GetData(), &m, 09192 &info.GetInfoRef()); 09193 09194 #ifdef SELDON_LAPACK_CHECK_INFO 09195 if (info.GetInfo() != 0) 09196 throw LapackError(info.GetInfo(), "GetInverse", 09197 "The matrix is inversible ? "); 09198 #endif 09199 09200 } 09201 09202 09203 template <class Prop0, class Allocator0> 09204 void GetInverse(Matrix<complex<float>, Prop0, ColLoTriang, Allocator0>& A, 09205 LapackInfo& info) 09206 { 09207 int m = A.GetM(); 09208 char uplo('L'); char diag('N'); 09209 ctrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m, 09210 &info.GetInfoRef()); 09211 09212 #ifdef SELDON_LAPACK_CHECK_INFO 09213 if (info.GetInfo() != 0) 09214 throw LapackError(info.GetInfo(), "GetInverse", 09215 "The matrix is inversible ? "); 09216 #endif 09217 09218 } 09219 09220 09221 template <class Prop0, class Allocator0> 09222 void GetInverse(Matrix<complex<double>, Prop0, ColLoTriang, Allocator0>& A, 09223 LapackInfo& info) 09224 { 09225 int m = A.GetM(); 09226 char uplo('L'); char diag('N'); 09227 ztrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m, 09228 &info.GetInfoRef()); 09229 09230 #ifdef SELDON_LAPACK_CHECK_INFO 09231 if (info.GetInfo() != 0) 09232 throw LapackError(info.GetInfo(), "GetInverse", 09233 "The matrix is inversible ? "); 09234 #endif 09235 09236 } 09237 09238 09239 /*** ColLoTriang ***/ 09240 09241 09242 template <class Prop0, class Allocator0> 09243 void GetInverse(const SeldonDiag& DiagA, 09244 Matrix<float, Prop0, ColLoTriang, Allocator0>& A, 09245 LapackInfo& info) 09246 { 09247 int m = A.GetM(); 09248 char uplo('L'); char diag = DiagA.Char(); 09249 strtri_(&uplo, &diag, &m, A.GetData(), &m, 09250 &info.GetInfoRef()); 09251 09252 #ifdef SELDON_LAPACK_CHECK_INFO 09253 if (info.GetInfo() != 0) 09254 throw LapackError(info.GetInfo(), "GetInverse", 09255 "The matrix is inversible ? "); 09256 #endif 09257 09258 } 09259 09260 09261 template <class Prop0, class Allocator0> 09262 void GetInverse(const SeldonDiag& DiagA, 09263 Matrix<double, Prop0, ColLoTriang, Allocator0>& A, 09264 LapackInfo& info) 09265 { 09266 int m = A.GetM(); 09267 char uplo('L'); char diag = DiagA.Char(); 09268 dtrtri_(&uplo, &diag, &m, A.GetData(), &m, 09269 &info.GetInfoRef()); 09270 09271 #ifdef SELDON_LAPACK_CHECK_INFO 09272 if (info.GetInfo() != 0) 09273 throw LapackError(info.GetInfo(), "GetInverse", 09274 "The matrix is inversible ? "); 09275 #endif 09276 09277 } 09278 09279 09280 template <class Prop0, class Allocator0> 09281 void GetInverse(const SeldonDiag& DiagA, 09282 Matrix<complex<float>, Prop0, ColLoTriang, Allocator0>& A, 09283 LapackInfo& info) 09284 { 09285 int m = A.GetM(); 09286 char uplo('L'); char diag = DiagA.Char(); 09287 ctrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m, 09288 &info.GetInfoRef()); 09289 09290 #ifdef SELDON_LAPACK_CHECK_INFO 09291 if (info.GetInfo() != 0) 09292 throw LapackError(info.GetInfo(), "GetInverse", 09293 "The matrix is inversible ? "); 09294 #endif 09295 09296 } 09297 09298 09299 template <class Prop0, class Allocator0> 09300 void GetInverse(const SeldonDiag& DiagA, 09301 Matrix<complex<double>, Prop0, ColLoTriang, Allocator0>& A, 09302 LapackInfo& info) 09303 { 09304 int m = A.GetM(); 09305 char uplo('L'); char diag = DiagA.Char(); 09306 ztrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m, 09307 &info.GetInfoRef()); 09308 09309 #ifdef SELDON_LAPACK_CHECK_INFO 09310 if (info.GetInfo() != 0) 09311 throw LapackError(info.GetInfo(), "GetInverse", 09312 "The matrix is inversible ? "); 09313 #endif 09314 09315 } 09316 09317 09318 /*** ColUpTriangPacked and NonUnit ***/ 09319 09320 09321 template <class Prop0, class Allocator0> 09322 void GetInverse(Matrix<float, Prop0, ColUpTriangPacked, Allocator0>& A, 09323 LapackInfo& info) 09324 { 09325 int m = A.GetM(); 09326 char uplo('U'); char diag('N'); 09327 stptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef()); 09328 09329 #ifdef SELDON_LAPACK_CHECK_INFO 09330 if (info.GetInfo() != 0) 09331 throw LapackError(info.GetInfo(), "GetInverse", 09332 "The matrix is inversible ? "); 09333 #endif 09334 09335 } 09336 09337 09338 template <class Prop0, class Allocator0> 09339 void GetInverse(Matrix<double, Prop0, ColUpTriangPacked, Allocator0>& A, 09340 LapackInfo& info) 09341 { 09342 int m = A.GetM(); 09343 char uplo('U'); char diag('N'); 09344 dtptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef()); 09345 09346 #ifdef SELDON_LAPACK_CHECK_INFO 09347 if (info.GetInfo() != 0) 09348 throw LapackError(info.GetInfo(), "GetInverse", 09349 "The matrix is inversible ? "); 09350 #endif 09351 09352 } 09353 09354 09355 template <class Prop0, class Allocator0> 09356 void GetInverse(Matrix<complex<float>, Prop0, ColUpTriangPacked, 09357 Allocator0>& A, 09358 LapackInfo& info) 09359 { 09360 int m = A.GetM(); 09361 char uplo('U'); char diag('N'); 09362 ctptri_(&uplo, &diag, &m, A.GetDataVoid(), &info.GetInfoRef()); 09363 09364 #ifdef SELDON_LAPACK_CHECK_INFO 09365 if (info.GetInfo() != 0) 09366 throw LapackError(info.GetInfo(), "GetInverse", 09367 "The matrix is inversible ? "); 09368 #endif 09369 09370 } 09371 09372 09373 template <class Prop0, class Allocator0> 09374 void GetInverse(Matrix<complex<double>, Prop0, ColUpTriangPacked, 09375 Allocator0>& A, 09376 LapackInfo& info) 09377 { 09378 int m = A.GetM(); 09379 char uplo('U'); char diag('N'); 09380 ztptri_(&uplo, &diag, &m, A.GetDataVoid(), 09381 &info.GetInfoRef()); 09382 09383 #ifdef SELDON_LAPACK_CHECK_INFO 09384 if (info.GetInfo() != 0) 09385 throw LapackError(info.GetInfo(), "GetInverse", 09386 "The matrix is inversible ? "); 09387 #endif 09388 09389 } 09390 09391 09392 /*** ColUpTriangPacked ***/ 09393 09394 09395 template <class Prop0, class Allocator0> 09396 void GetInverse(const SeldonDiag& DiagA, 09397 Matrix<float, Prop0, ColUpTriangPacked, Allocator0>& A, 09398 LapackInfo& info) 09399 { 09400 int m = A.GetM(); 09401 char uplo('U'); char diag = DiagA.Char(); 09402 stptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef()); 09403 09404 #ifdef SELDON_LAPACK_CHECK_INFO 09405 if (info.GetInfo() != 0) 09406 throw LapackError(info.GetInfo(), "GetInverse", 09407 "The matrix is inversible ? "); 09408 #endif 09409 09410 } 09411 09412 09413 template <class Prop0, class Allocator0> 09414 void GetInverse(const SeldonDiag& DiagA, 09415 Matrix<double, Prop0, ColUpTriangPacked, Allocator0>& A, 09416 LapackInfo& info) 09417 { 09418 int m = A.GetM(); 09419 char uplo('U'); char diag = DiagA.Char(); 09420 dtptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef()); 09421 09422 #ifdef SELDON_LAPACK_CHECK_INFO 09423 if (info.GetInfo() != 0) 09424 throw LapackError(info.GetInfo(), "GetInverse", 09425 "The matrix is inversible ? "); 09426 #endif 09427 09428 } 09429 09430 09431 template <class Prop0, class Allocator0> 09432 void GetInverse(const SeldonDiag& DiagA, 09433 Matrix<complex<float>, Prop0, ColUpTriangPacked, 09434 Allocator0>& A, 09435 LapackInfo& info) 09436 { 09437 int m = A.GetM(); 09438 char uplo('U'); char diag = DiagA.Char(); 09439 ctptri_(&uplo, &diag, &m, A.GetDataVoid(), &info.GetInfoRef()); 09440 09441 #ifdef SELDON_LAPACK_CHECK_INFO 09442 if (info.GetInfo() != 0) 09443 throw LapackError(info.GetInfo(), "GetInverse", 09444 "The matrix is inversible ? "); 09445 #endif 09446 09447 } 09448 09449 09450 template <class Prop0, class Allocator0> 09451 void GetInverse(const SeldonDiag& DiagA, 09452 Matrix<complex<double>, Prop0, ColUpTriangPacked, 09453 Allocator0>& A, 09454 LapackInfo& info) 09455 { 09456 int m = A.GetM(); 09457 char uplo('U'); char diag = DiagA.Char(); 09458 ztptri_(&uplo, &diag, &m, A.GetDataVoid(), 09459 &info.GetInfoRef()); 09460 09461 #ifdef SELDON_LAPACK_CHECK_INFO 09462 if (info.GetInfo() != 0) 09463 throw LapackError(info.GetInfo(), "GetInverse", 09464 "The matrix is inversible ? "); 09465 #endif 09466 09467 } 09468 09469 09470 /*** ColLoTriangPacked and NonUnit ***/ 09471 09472 09473 template <class Prop0, class Allocator0> 09474 void GetInverse(Matrix<float, Prop0, ColLoTriangPacked, Allocator0>& A, 09475 LapackInfo& info) 09476 { 09477 int m = A.GetM(); 09478 char uplo('L'); char diag('N'); 09479 stptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef()); 09480 09481 #ifdef SELDON_LAPACK_CHECK_INFO 09482 if (info.GetInfo() != 0) 09483 throw LapackError(info.GetInfo(), "GetInverse", 09484 "The matrix is inversible ? "); 09485 #endif 09486 09487 } 09488 09489 09490 template <class Prop0, class Allocator0> 09491 void GetInverse(Matrix<double, Prop0, ColLoTriangPacked, Allocator0>& A, 09492 LapackInfo& info) 09493 { 09494 int m = A.GetM(); 09495 char uplo('L'); char diag('N'); 09496 dtptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef()); 09497 09498 #ifdef SELDON_LAPACK_CHECK_INFO 09499 if (info.GetInfo() != 0) 09500 throw LapackError(info.GetInfo(), "GetInverse", 09501 "The matrix is inversible ? "); 09502 #endif 09503 09504 } 09505 09506 09507 template <class Prop0, class Allocator0> 09508 void GetInverse(Matrix<complex<float>, Prop0, ColLoTriangPacked, 09509 Allocator0>& A, 09510 LapackInfo& info) 09511 { 09512 int m = A.GetM(); 09513 char uplo('L'); char diag('N'); 09514 ctptri_(&uplo, &diag, &m, A.GetDataVoid(), 09515 &info.GetInfoRef()); 09516 09517 #ifdef SELDON_LAPACK_CHECK_INFO 09518 if (info.GetInfo() != 0) 09519 throw LapackError(info.GetInfo(), "GetInverse", 09520 "The matrix is inversible ? "); 09521 #endif 09522 09523 } 09524 09525 09526 template <class Prop0, class Allocator0> 09527 void GetInverse(Matrix<complex<double>, Prop0, ColLoTriangPacked, 09528 Allocator0>& A, 09529 LapackInfo& info) 09530 { 09531 int m = A.GetM(); 09532 char uplo('L'); char diag('N'); 09533 ztptri_(&uplo, &diag, &m, A.GetDataVoid(), 09534 &info.GetInfoRef()); 09535 09536 #ifdef SELDON_LAPACK_CHECK_INFO 09537 if (info.GetInfo() != 0) 09538 throw LapackError(info.GetInfo(), "GetInverse", 09539 "The matrix is inversible ? "); 09540 #endif 09541 09542 } 09543 09544 09545 /*** ColLoTriangPacked ***/ 09546 09547 09548 template <class Prop0, class Allocator0> 09549 void GetInverse(const SeldonDiag& DiagA, 09550 Matrix<float, Prop0, ColLoTriangPacked, Allocator0>& A, 09551 LapackInfo& info) 09552 { 09553 int m = A.GetM(); 09554 char uplo('L'); char diag = DiagA.Char(); 09555 stptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef()); 09556 09557 #ifdef SELDON_LAPACK_CHECK_INFO 09558 if (info.GetInfo() != 0) 09559 throw LapackError(info.GetInfo(), "GetInverse", 09560 "The matrix is inversible ? "); 09561 #endif 09562 09563 } 09564 09565 09566 template <class Prop0, class Allocator0> 09567 void GetInverse(const SeldonDiag& DiagA, 09568 Matrix<double, Prop0, ColLoTriangPacked, Allocator0>& A, 09569 LapackInfo& info) 09570 { 09571 int m = A.GetM(); 09572 char uplo('L'); char diag = DiagA.Char(); 09573 dtptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef()); 09574 09575 #ifdef SELDON_LAPACK_CHECK_INFO 09576 if (info.GetInfo() != 0) 09577 throw LapackError(info.GetInfo(), "GetInverse", 09578 "The matrix is inversible ? "); 09579 #endif 09580 09581 } 09582 09583 09584 template <class Prop0, class Allocator0> 09585 void GetInverse(const SeldonDiag& DiagA, 09586 Matrix<complex<float>, Prop0, ColLoTriangPacked, 09587 Allocator0>& A, 09588 LapackInfo& info) 09589 { 09590 int m = A.GetM(); 09591 char uplo('L'); char diag = DiagA.Char(); 09592 ctptri_(&uplo, &diag, &m, A.GetDataVoid(), 09593 &info.GetInfoRef()); 09594 09595 #ifdef SELDON_LAPACK_CHECK_INFO 09596 if (info.GetInfo() != 0) 09597 throw LapackError(info.GetInfo(), "GetInverse", 09598 "The matrix is inversible ? "); 09599 #endif 09600 09601 } 09602 09603 09604 template <class Prop0, class Allocator0> 09605 void GetInverse(const SeldonDiag& DiagA, 09606 Matrix<complex<double>, Prop0, ColLoTriangPacked, 09607 Allocator0>& A, 09608 LapackInfo& info) 09609 { 09610 int m = A.GetM(); 09611 char uplo('L'); char diag = DiagA.Char(); 09612 ztptri_(&uplo, &diag, &m, A.GetDataVoid(), 09613 &info.GetInfoRef()); 09614 09615 #ifdef SELDON_LAPACK_CHECK_INFO 09616 if (info.GetInfo() != 0) 09617 throw LapackError(info.GetInfo(), "GetInverse", 09618 "The matrix is inversible ? "); 09619 #endif 09620 09621 } 09622 09623 09624 /*** RowUpTriang and NonUnit ***/ 09625 09626 09627 template <class Prop0, class Allocator0> 09628 void GetInverse(Matrix<float, Prop0, RowUpTriang, Allocator0>& A, 09629 LapackInfo& info) 09630 { 09631 int m = A.GetM(); 09632 char uplo('L'); char diag('N'); 09633 strtri_(&uplo, &diag, &m, A.GetData(), &m, 09634 &info.GetInfoRef()); 09635 09636 #ifdef SELDON_LAPACK_CHECK_INFO 09637 if (info.GetInfo() != 0) 09638 throw LapackError(info.GetInfo(), "GetInverse", 09639 "The matrix is inversible ? "); 09640 #endif 09641 09642 } 09643 09644 09645 template <class Prop0, class Allocator0> 09646 void GetInverse(Matrix<double, Prop0, RowUpTriang, Allocator0>& A, 09647 LapackInfo& info) 09648 { 09649 int m = A.GetM(); 09650 char uplo('L'); char diag('N'); 09651 dtrtri_(&uplo, &diag, &m, A.GetData(), &m, 09652 &info.GetInfoRef()); 09653 09654 #ifdef SELDON_LAPACK_CHECK_INFO 09655 if (info.GetInfo() != 0) 09656 throw LapackError(info.GetInfo(), "GetInverse", 09657 "The matrix is inversible ? "); 09658 #endif 09659 09660 } 09661 09662 09663 template <class Prop0, class Allocator0> 09664 void GetInverse(Matrix<complex<float>, Prop0, RowUpTriang, Allocator0>& A, 09665 LapackInfo& info) 09666 { 09667 int m = A.GetM(); 09668 char uplo('L'); char diag('N'); 09669 ctrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m, 09670 &info.GetInfoRef()); 09671 09672 #ifdef SELDON_LAPACK_CHECK_INFO 09673 if (info.GetInfo() != 0) 09674 throw LapackError(info.GetInfo(), "GetInverse", 09675 "The matrix is inversible ? "); 09676 #endif 09677 09678 } 09679 09680 09681 template <class Prop0, class Allocator0> 09682 void GetInverse(Matrix<complex<double>, Prop0, RowUpTriang, Allocator0>& A, 09683 LapackInfo& info) 09684 { 09685 int m = A.GetM(); 09686 char uplo('L'); char diag('N'); 09687 ztrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m, 09688 &info.GetInfoRef()); 09689 09690 #ifdef SELDON_LAPACK_CHECK_INFO 09691 if (info.GetInfo() != 0) 09692 throw LapackError(info.GetInfo(), "GetInverse", 09693 "The matrix is inversible ? "); 09694 #endif 09695 09696 } 09697 09698 09699 /*** RowUpTriang ***/ 09700 09701 09702 template <class Prop0, class Allocator0> 09703 void GetInverse(const SeldonDiag& DiagA, 09704 Matrix<float, Prop0, RowUpTriang, Allocator0>& A, 09705 LapackInfo& info) 09706 { 09707 int m = A.GetM(); 09708 char uplo('L'); char diag = DiagA.Char(); 09709 strtri_(&uplo, &diag, &m, A.GetData(), &m, 09710 &info.GetInfoRef()); 09711 09712 #ifdef SELDON_LAPACK_CHECK_INFO 09713 if (info.GetInfo() != 0) 09714 throw LapackError(info.GetInfo(), "GetInverse", 09715 "The matrix is inversible ? "); 09716 #endif 09717 09718 } 09719 09720 09721 template <class Prop0, class Allocator0> 09722 void GetInverse(const SeldonDiag& DiagA, 09723 Matrix<double, Prop0, RowUpTriang, Allocator0>& A, 09724 LapackInfo& info) 09725 { 09726 int m = A.GetM(); 09727 char uplo('L'); char diag = DiagA.Char(); 09728 dtrtri_(&uplo, &diag, &m, A.GetData(), &m, 09729 &info.GetInfoRef()); 09730 09731 #ifdef SELDON_LAPACK_CHECK_INFO 09732 if (info.GetInfo() != 0) 09733 throw LapackError(info.GetInfo(), "GetInverse", 09734 "The matrix is inversible ? "); 09735 #endif 09736 09737 } 09738 09739 09740 template <class Prop0, class Allocator0> 09741 void GetInverse(const SeldonDiag& DiagA, 09742 Matrix<complex<float>, Prop0, RowUpTriang, Allocator0>& A, 09743 LapackInfo& info) 09744 { 09745 int m = A.GetM(); 09746 char uplo('L'); char diag = DiagA.Char(); 09747 ctrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m, 09748 &info.GetInfoRef()); 09749 09750 #ifdef SELDON_LAPACK_CHECK_INFO 09751 if (info.GetInfo() != 0) 09752 throw LapackError(info.GetInfo(), "GetInverse", 09753 "The matrix is inversible ? "); 09754 #endif 09755 09756 } 09757 09758 09759 template <class Prop0, class Allocator0> 09760 void GetInverse(const SeldonDiag& DiagA, 09761 Matrix<complex<double>, Prop0, RowUpTriang, Allocator0>& A, 09762 LapackInfo& info) 09763 { 09764 int m = A.GetM(); 09765 char uplo('L'); char diag = DiagA.Char(); 09766 ztrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m, 09767 &info.GetInfoRef()); 09768 09769 #ifdef SELDON_LAPACK_CHECK_INFO 09770 if (info.GetInfo() != 0) 09771 throw LapackError(info.GetInfo(), "GetInverse", 09772 "The matrix is inversible ? "); 09773 #endif 09774 09775 } 09776 09777 09778 /*** RowLoTriang and NonUnit ***/ 09779 09780 09781 template <class Prop0, class Allocator0> 09782 void GetInverse(Matrix<float, Prop0, RowLoTriang, Allocator0>& A, 09783 LapackInfo& info) 09784 { 09785 int m = A.GetM(); 09786 char uplo('U'); char diag('N'); 09787 strtri_(&uplo, &diag, &m, A.GetData(), &m, 09788 &info.GetInfoRef()); 09789 09790 #ifdef SELDON_LAPACK_CHECK_INFO 09791 if (info.GetInfo() != 0) 09792 throw LapackError(info.GetInfo(), "GetInverse", 09793 "The matrix is inversible ? "); 09794 #endif 09795 09796 } 09797 09798 09799 template <class Prop0, class Allocator0> 09800 void GetInverse(Matrix<double, Prop0, RowLoTriang, Allocator0>& A, 09801 LapackInfo& info) 09802 { 09803 int m = A.GetM(); 09804 char uplo('U'); char diag('N'); 09805 dtrtri_(&uplo, &diag, &m, A.GetData(), &m, 09806 &info.GetInfoRef()); 09807 09808 #ifdef SELDON_LAPACK_CHECK_INFO 09809 if (info.GetInfo() != 0) 09810 throw LapackError(info.GetInfo(), "GetInverse", 09811 "The matrix is inversible ? "); 09812 #endif 09813 09814 } 09815 09816 09817 template <class Prop0, class Allocator0> 09818 void GetInverse(Matrix<complex<float>, Prop0, RowLoTriang, Allocator0>& A, 09819 LapackInfo& info) 09820 { 09821 int m = A.GetM(); 09822 char uplo('U'); char diag('N'); 09823 ctrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m, 09824 &info.GetInfoRef()); 09825 09826 #ifdef SELDON_LAPACK_CHECK_INFO 09827 if (info.GetInfo() != 0) 09828 throw LapackError(info.GetInfo(), "GetInverse", 09829 "The matrix is inversible ? "); 09830 #endif 09831 09832 } 09833 09834 09835 template <class Prop0, class Allocator0> 09836 void GetInverse(Matrix<complex<double>, Prop0, RowLoTriang, Allocator0>& A, 09837 LapackInfo& info) 09838 { 09839 int m = A.GetM(); 09840 char uplo('U'); char diag('N'); 09841 ztrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m, 09842 &info.GetInfoRef()); 09843 09844 #ifdef SELDON_LAPACK_CHECK_INFO 09845 if (info.GetInfo() != 0) 09846 throw LapackError(info.GetInfo(), "GetInverse", 09847 "The matrix is inversible ? "); 09848 #endif 09849 09850 } 09851 09852 09853 /*** RowLoTriang ***/ 09854 09855 09856 template <class Prop0, class Allocator0> 09857 void GetInverse(const SeldonDiag& DiagA, 09858 Matrix<float, Prop0, RowLoTriang, Allocator0>& A, 09859 LapackInfo& info) 09860 { 09861 int m = A.GetM(); 09862 char uplo('U'); char diag = DiagA.Char(); 09863 strtri_(&uplo, &diag, &m, A.GetData(), &m, 09864 &info.GetInfoRef()); 09865 09866 #ifdef SELDON_LAPACK_CHECK_INFO 09867 if (info.GetInfo() != 0) 09868 throw LapackError(info.GetInfo(), "GetInverse", 09869 "The matrix is inversible ? "); 09870 #endif 09871 09872 } 09873 09874 09875 template <class Prop0, class Allocator0> 09876 void GetInverse(const SeldonDiag& DiagA, 09877 Matrix<double, Prop0, RowLoTriang, Allocator0>& A, 09878 LapackInfo& info) 09879 { 09880 int m = A.GetM(); 09881 char uplo('U'); char diag = DiagA.Char(); 09882 dtrtri_(&uplo, &diag, &m, A.GetData(), &m, 09883 &info.GetInfoRef()); 09884 09885 #ifdef SELDON_LAPACK_CHECK_INFO 09886 if (info.GetInfo() != 0) 09887 throw LapackError(info.GetInfo(), "GetInverse", 09888 "The matrix is inversible ? "); 09889 #endif 09890 09891 } 09892 09893 09894 template <class Prop0, class Allocator0> 09895 void GetInverse(const SeldonDiag& DiagA, 09896 Matrix<complex<float>, Prop0, RowLoTriang, Allocator0>& A, 09897 LapackInfo& info) 09898 { 09899 int m = A.GetM(); 09900 char uplo('U'); char diag = DiagA.Char(); 09901 ctrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m, 09902 &info.GetInfoRef()); 09903 09904 #ifdef SELDON_LAPACK_CHECK_INFO 09905 if (info.GetInfo() != 0) 09906 throw LapackError(info.GetInfo(), "GetInverse", 09907 "The matrix is inversible ? "); 09908 #endif 09909 09910 } 09911 09912 09913 template <class Prop0, class Allocator0> 09914 void GetInverse(const SeldonDiag& DiagA, 09915 Matrix<complex<double>, Prop0, RowLoTriang, Allocator0>& A, 09916 LapackInfo& info) 09917 { 09918 int m = A.GetM(); 09919 char uplo('U'); char diag = DiagA.Char(); 09920 ztrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m, 09921 &info.GetInfoRef()); 09922 09923 #ifdef SELDON_LAPACK_CHECK_INFO 09924 if (info.GetInfo() != 0) 09925 throw LapackError(info.GetInfo(), "GetInverse", 09926 "The matrix is inversible ? "); 09927 #endif 09928 09929 } 09930 09931 09932 /*** RowUpTriangPacked and NonUnit ***/ 09933 09934 09935 template <class Prop0, class Allocator0> 09936 void GetInverse(Matrix<float, Prop0, RowUpTriangPacked, Allocator0>& A, 09937 LapackInfo& info) 09938 { 09939 int m = A.GetM(); 09940 char uplo('L'); char diag('N'); 09941 stptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef()); 09942 09943 #ifdef SELDON_LAPACK_CHECK_INFO 09944 if (info.GetInfo() != 0) 09945 throw LapackError(info.GetInfo(), "GetInverse", 09946 "The matrix is inversible ? "); 09947 #endif 09948 09949 } 09950 09951 09952 template <class Prop0, class Allocator0> 09953 void GetInverse(Matrix<double, Prop0, RowUpTriangPacked, Allocator0>& A, 09954 LapackInfo& info) 09955 { 09956 int m = A.GetM(); 09957 char uplo('L'); char diag('N'); 09958 dtptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef()); 09959 09960 #ifdef SELDON_LAPACK_CHECK_INFO 09961 if (info.GetInfo() != 0) 09962 throw LapackError(info.GetInfo(), "GetInverse", 09963 "The matrix is inversible ? "); 09964 #endif 09965 09966 } 09967 09968 09969 template <class Prop0, class Allocator0> 09970 void GetInverse(Matrix<complex<float>, Prop0, RowUpTriangPacked, 09971 Allocator0>& A, 09972 LapackInfo& info) 09973 { 09974 int m = A.GetM(); 09975 char uplo('L'); char diag('N'); 09976 ctptri_(&uplo, &diag, &m, A.GetDataVoid(), &info.GetInfoRef()); 09977 09978 #ifdef SELDON_LAPACK_CHECK_INFO 09979 if (info.GetInfo() != 0) 09980 throw LapackError(info.GetInfo(), "GetInverse", 09981 "The matrix is inversible ? "); 09982 #endif 09983 09984 } 09985 09986 09987 template <class Prop0, class Allocator0> 09988 void GetInverse(Matrix<complex<double>, Prop0, RowUpTriangPacked, 09989 Allocator0>& A, 09990 LapackInfo& info) 09991 { 09992 int m = A.GetM(); 09993 char uplo('L'); char diag('N'); 09994 ztptri_(&uplo, &diag, &m, A.GetDataVoid(), 09995 &info.GetInfoRef()); 09996 09997 #ifdef SELDON_LAPACK_CHECK_INFO 09998 if (info.GetInfo() != 0) 09999 throw LapackError(info.GetInfo(), "GetInverse", 10000 "The matrix is inversible ? "); 10001 #endif 10002 10003 } 10004 10005 10006 /*** RowUpTriangPacked ***/ 10007 10008 10009 template <class Prop0, class Allocator0> 10010 void GetInverse(const SeldonDiag& DiagA, 10011 Matrix<float, Prop0, RowUpTriangPacked, Allocator0>& A, 10012 LapackInfo& info) 10013 { 10014 int m = A.GetM(); 10015 char uplo('L'); char diag = DiagA.Char(); 10016 stptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef()); 10017 10018 #ifdef SELDON_LAPACK_CHECK_INFO 10019 if (info.GetInfo() != 0) 10020 throw LapackError(info.GetInfo(), "GetInverse", 10021 "The matrix is inversible ? "); 10022 #endif 10023 10024 } 10025 10026 10027 template <class Prop0, class Allocator0> 10028 void GetInverse(const SeldonDiag& DiagA, 10029 Matrix<double, Prop0, RowUpTriangPacked, Allocator0>& A, 10030 LapackInfo& info) 10031 { 10032 int m = A.GetM(); 10033 char uplo('L'); char diag = DiagA.Char(); 10034 dtptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef()); 10035 10036 #ifdef SELDON_LAPACK_CHECK_INFO 10037 if (info.GetInfo() != 0) 10038 throw LapackError(info.GetInfo(), "GetInverse", 10039 "The matrix is inversible ? "); 10040 #endif 10041 10042 } 10043 10044 10045 template <class Prop0, class Allocator0> 10046 void GetInverse(const SeldonDiag& DiagA, 10047 Matrix<complex<float>, Prop0, RowUpTriangPacked, 10048 Allocator0>& A, 10049 LapackInfo& info) 10050 { 10051 int m = A.GetM(); 10052 char uplo('L'); char diag = DiagA.Char(); 10053 ctptri_(&uplo, &diag, &m, A.GetDataVoid(), &info.GetInfoRef()); 10054 10055 #ifdef SELDON_LAPACK_CHECK_INFO 10056 if (info.GetInfo() != 0) 10057 throw LapackError(info.GetInfo(), "GetInverse", 10058 "The matrix is inversible ? "); 10059 #endif 10060 10061 } 10062 10063 10064 template <class Prop0, class Allocator0> 10065 void GetInverse(const SeldonDiag& DiagA, 10066 Matrix<complex<double>, Prop0, RowUpTriangPacked, 10067 Allocator0>& A, 10068 LapackInfo& info) 10069 { 10070 int m = A.GetM(); 10071 char uplo('L'); char diag = DiagA.Char(); 10072 ztptri_(&uplo, &diag, &m, A.GetDataVoid(), 10073 &info.GetInfoRef()); 10074 10075 #ifdef SELDON_LAPACK_CHECK_INFO 10076 if (info.GetInfo() != 0) 10077 throw LapackError(info.GetInfo(), "GetInverse", 10078 "The matrix is inversible ? "); 10079 #endif 10080 10081 } 10082 10083 10084 /*** RowLoTriangPacked and NonUnit ***/ 10085 10086 10087 template <class Prop0, class Allocator0> 10088 void GetInverse(Matrix<float, Prop0, RowLoTriangPacked, Allocator0>& A, 10089 LapackInfo& info) 10090 { 10091 int m = A.GetM(); 10092 char uplo('U'); char diag('N'); 10093 stptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef()); 10094 10095 #ifdef SELDON_LAPACK_CHECK_INFO 10096 if (info.GetInfo() != 0) 10097 throw LapackError(info.GetInfo(), "GetInverse", 10098 "The matrix is inversible ? "); 10099 #endif 10100 10101 } 10102 10103 10104 template <class Prop0, class Allocator0> 10105 void GetInverse(Matrix<double, Prop0, RowLoTriangPacked, Allocator0>& A, 10106 LapackInfo& info) 10107 { 10108 int m = A.GetM(); 10109 char uplo('U'); char diag('N'); 10110 dtptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef()); 10111 10112 #ifdef SELDON_LAPACK_CHECK_INFO 10113 if (info.GetInfo() != 0) 10114 throw LapackError(info.GetInfo(), "GetInverse", 10115 "The matrix is inversible ? "); 10116 #endif 10117 10118 } 10119 10120 10121 template <class Prop0, class Allocator0> 10122 void GetInverse(Matrix<complex<float>, Prop0, RowLoTriangPacked, 10123 Allocator0>& A, 10124 LapackInfo& info) 10125 { 10126 int m = A.GetM(); 10127 char uplo('U'); char diag('N'); 10128 ctptri_(&uplo, &diag, &m, A.GetDataVoid(), 10129 &info.GetInfoRef()); 10130 10131 #ifdef SELDON_LAPACK_CHECK_INFO 10132 if (info.GetInfo() != 0) 10133 throw LapackError(info.GetInfo(), "GetInverse", 10134 "The matrix is inversible ? "); 10135 #endif 10136 10137 } 10138 10139 10140 template <class Prop0, class Allocator0> 10141 void GetInverse(Matrix<complex<double>, Prop0, RowLoTriangPacked, 10142 Allocator0>& A, 10143 LapackInfo& info) 10144 { 10145 int m = A.GetM(); 10146 char uplo('U'); char diag('N'); 10147 ztptri_(&uplo, &diag, &m, A.GetDataVoid(), 10148 &info.GetInfoRef()); 10149 10150 #ifdef SELDON_LAPACK_CHECK_INFO 10151 if (info.GetInfo() != 0) 10152 throw LapackError(info.GetInfo(), "GetInverse", 10153 "The matrix is inversible ? "); 10154 #endif 10155 10156 } 10157 10158 10159 /*** RowLoTriangPacked ***/ 10160 10161 10162 template <class Prop0, class Allocator0> 10163 void GetInverse(const SeldonDiag& DiagA, 10164 Matrix<float, Prop0, RowLoTriangPacked, Allocator0>& A, 10165 LapackInfo& info) 10166 { 10167 int m = A.GetM(); 10168 char uplo('U'); char diag = DiagA.Char(); 10169 stptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef()); 10170 10171 #ifdef SELDON_LAPACK_CHECK_INFO 10172 if (info.GetInfo() != 0) 10173 throw LapackError(info.GetInfo(), "GetInverse", 10174 "The matrix is inversible ? "); 10175 #endif 10176 10177 } 10178 10179 10180 template <class Prop0, class Allocator0> 10181 void GetInverse(const SeldonDiag& DiagA, 10182 Matrix<double, Prop0, RowLoTriangPacked, Allocator0>& A, 10183 LapackInfo& info) 10184 { 10185 int m = A.GetM(); 10186 char uplo('U'); char diag = DiagA.Char(); 10187 dtptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef()); 10188 10189 #ifdef SELDON_LAPACK_CHECK_INFO 10190 if (info.GetInfo() != 0) 10191 throw LapackError(info.GetInfo(), "GetInverse", 10192 "The matrix is inversible ? "); 10193 #endif 10194 10195 } 10196 10197 10198 template <class Prop0, class Allocator0> 10199 void GetInverse(const SeldonDiag& DiagA, 10200 Matrix<complex<float>, Prop0, RowLoTriangPacked, 10201 Allocator0>& A, 10202 LapackInfo& info) 10203 { 10204 int m = A.GetM(); 10205 char uplo('U'); char diag = DiagA.Char(); 10206 ctptri_(&uplo, &diag, &m, A.GetDataVoid(), 10207 &info.GetInfoRef()); 10208 10209 #ifdef SELDON_LAPACK_CHECK_INFO 10210 if (info.GetInfo() != 0) 10211 throw LapackError(info.GetInfo(), "GetInverse", 10212 "The matrix is inversible ? "); 10213 #endif 10214 10215 } 10216 10217 10218 template <class Prop0, class Allocator0> 10219 void GetInverse(const SeldonDiag& DiagA, 10220 Matrix<complex<double>, Prop0, RowLoTriangPacked, 10221 Allocator0>& A, 10222 LapackInfo& info) 10223 { 10224 int m = A.GetM(); 10225 char uplo('U'); char diag = DiagA.Char(); 10226 ztptri_(&uplo, &diag, &m, A.GetDataVoid(), 10227 &info.GetInfoRef()); 10228 10229 #ifdef SELDON_LAPACK_CHECK_INFO 10230 if (info.GetInfo() != 0) 10231 throw LapackError(info.GetInfo(), "GetInverse", 10232 "The matrix is inversible ? "); 10233 #endif 10234 10235 } 10236 10237 10238 // GetInverse // 10240 10241 10242 10244 // GetScalingFactors // 10245 10246 10247 /*** ColMajor ***/ 10248 10249 10250 template<class Prop0, class Allocator0, 10251 class Allocator1, class Allocator2> 10252 void GetScalingFactors(const Matrix<float, Prop0, ColMajor, Allocator0>& A, 10253 Vector<float, VectFull, Allocator1>& row_scale, 10254 Vector<float, VectFull, Allocator2>& col_scale, 10255 float& row_condition_number, 10256 float& col_condition_number, float& amax, 10257 LapackInfo& info) 10258 { 10259 10260 #ifdef SELDON_CHECK_DIMENSIONS 10261 CheckDim(A, col_scale, row_scale, string("GetScalingFactors(A, X, Y, ") 10262 + string(" rowcnd, colcnd, amax)")); 10263 #endif 10264 10265 int m = A.GetM(), n = A.GetN(); 10266 int lda = A.GetLD(); 10267 sgeequ_(&m, &n, A.GetData(), &lda, row_scale.GetData(), 10268 col_scale.GetData(), &row_condition_number, &col_condition_number, 10269 &amax, &info.GetInfoRef()); 10270 } 10271 10272 10273 template<class Prop0, class Allocator0, 10274 class Allocator1, class Allocator2> 10275 void GetScalingFactors(const Matrix<double, Prop0, ColMajor, Allocator0>& A, 10276 Vector<double, VectFull, Allocator1>& row_scale, 10277 Vector<double, VectFull, Allocator2>& col_scale, 10278 double& row_condition_number, 10279 double& col_condition_number, double& amax, 10280 LapackInfo& info) 10281 { 10282 10283 #ifdef SELDON_CHECK_DIMENSIONS 10284 CheckDim(A, col_scale, row_scale, string("GetScalingFactors(A, X, Y, ") 10285 + string(" rowcnd, colcnd, amax)")); 10286 #endif 10287 10288 int m = A.GetM(), n = A.GetN(); 10289 int lda = A.GetLD(); 10290 dgeequ_(&m, &n, A.GetData(), &lda, row_scale.GetData(), 10291 col_scale.GetData(), &row_condition_number, &col_condition_number, 10292 &amax, &info.GetInfoRef()); 10293 } 10294 10295 10296 template<class Prop0, class Allocator0, 10297 class Allocator1, class Allocator2> 10298 void GetScalingFactors(const Matrix<complex<float>, Prop0, ColMajor, 10299 Allocator0>& A, 10300 Vector<float, VectFull, Allocator1>& row_scale, 10301 Vector<float, VectFull, Allocator2>& col_scale, 10302 float& row_condition_number, 10303 float& col_condition_number, float& amax, 10304 LapackInfo& info) 10305 { 10306 10307 #ifdef SELDON_CHECK_DIMENSIONS 10308 CheckDim(A, col_scale, row_scale, string("GetScalingFactors(A, X, Y, ") 10309 +string("rowcnd, colcnd, amax)")); 10310 #endif 10311 10312 int m = A.GetM(), n = A.GetN(); 10313 int lda = A.GetLD(); 10314 cgeequ_(&m, &n, A.GetDataVoid(), &lda, row_scale.GetData(), 10315 col_scale.GetData(), &row_condition_number, 10316 &col_condition_number, &amax, &info.GetInfoRef()); 10317 } 10318 10319 10320 template<class Prop0, class Allocator0, 10321 class Allocator1, class Allocator2> 10322 void GetScalingFactors(const Matrix<complex<double>, Prop0, ColMajor, 10323 Allocator0>& A, 10324 Vector<double, VectFull, Allocator1>& row_scale, 10325 Vector<double, VectFull, Allocator2>& col_scale, 10326 double& row_condition_number, 10327 double& col_condition_number, double& amax, 10328 LapackInfo& info) 10329 { 10330 10331 #ifdef SELDON_CHECK_DIMENSIONS 10332 CheckDim(A, col_scale, row_scale, string("GetScalingFactors(A, X, Y, ") 10333 + string("rowcnd, colcnd, amax)")); 10334 #endif 10335 10336 int m = A.GetM(), n = A.GetN(); 10337 int lda = A.GetLD(); 10338 zgeequ_(&m, &n, A.GetDataVoid(), &lda, row_scale.GetData(), 10339 col_scale.GetData(), &row_condition_number, 10340 &col_condition_number, &amax, &info.GetInfoRef()); 10341 } 10342 10343 10344 /*** RowMajor ***/ 10345 10346 10347 template<class Prop0, class Allocator0, 10348 class Allocator1, class Allocator2> 10349 void GetScalingFactors(const Matrix<float, Prop0, RowMajor, Allocator0>& A, 10350 Vector<float, VectFull, Allocator1>& row_scale, 10351 Vector<float, VectFull, Allocator2>& col_scale, 10352 float& row_condition_number, 10353 float& col_condition_number, float& amax, 10354 LapackInfo& info) 10355 { 10356 10357 #ifdef SELDON_CHECK_DIMENSIONS 10358 CheckDim(A, col_scale, row_scale, string("GetScalingFactors(A, X, Y, ") 10359 + string(" rowcnd, colcnd, amax)")); 10360 #endif 10361 10362 int m = A.GetM(), n = A.GetN(); 10363 int lda = A.GetLD(); 10364 sgeequ_(&n, &m, A.GetData(), &lda, col_scale.GetData(), 10365 row_scale.GetData(), &col_condition_number, &row_condition_number, 10366 &amax, &info.GetInfoRef()); 10367 } 10368 10369 10370 template<class Prop0, class Allocator0, 10371 class Allocator1, class Allocator2> 10372 void GetScalingFactors(const Matrix<double, Prop0, RowMajor, Allocator0>& A, 10373 Vector<double, VectFull, Allocator1>& row_scale, 10374 Vector<double, VectFull, Allocator2>& col_scale, 10375 double& row_condition_number, 10376 double& col_condition_number, double& amax, 10377 LapackInfo& info) 10378 { 10379 10380 #ifdef SELDON_CHECK_DIMENSIONS 10381 CheckDim(A, col_scale, row_scale, string("GetScalingFactors(A, X, Y, ") 10382 + string(" rowcnd, colcnd, amax)")); 10383 #endif 10384 10385 int m = A.GetM(), n = A.GetN(); 10386 int lda = A.GetLD(); 10387 dgeequ_(&n, &m, A.GetData(), &lda, col_scale.GetData(), 10388 row_scale.GetData(), &col_condition_number, &row_condition_number, 10389 &amax, &info.GetInfoRef()); 10390 } 10391 10392 10393 template<class Prop0, class Allocator0, 10394 class Allocator1, class Allocator2> 10395 void GetScalingFactors(const Matrix<complex<float>, Prop0, RowMajor, 10396 Allocator0>& A, 10397 Vector<float, VectFull, Allocator1>& row_scale, 10398 Vector<float, VectFull, Allocator2>& col_scale, 10399 float& row_condition_number, 10400 float& col_condition_number, float& amax, 10401 LapackInfo& info) 10402 { 10403 10404 #ifdef SELDON_CHECK_DIMENSIONS 10405 CheckDim(A, col_scale, row_scale, string("GetScalingFactors(A, X, Y,") 10406 + string(" rowcnd, colcnd, amax)")); 10407 #endif 10408 10409 int m = A.GetM(), n = A.GetN(); 10410 int lda = A.GetLD(); 10411 cgeequ_(&n, &m, A.GetDataVoid(), &lda, col_scale.GetData(), 10412 row_scale.GetData(), &col_condition_number, 10413 &row_condition_number, &amax, &info.GetInfoRef()); 10414 } 10415 10416 10417 template<class Prop0, class Allocator0, 10418 class Allocator1, class Allocator2> 10419 void GetScalingFactors(const Matrix<complex<double>, Prop0, RowMajor, 10420 Allocator0>& A, 10421 Vector<double, VectFull, Allocator1>& row_scale, 10422 Vector<double, VectFull, Allocator2>& col_scale, 10423 double& row_condition_number, 10424 double& col_condition_number, double& amax, 10425 LapackInfo& info) 10426 { 10427 10428 #ifdef SELDON_CHECK_DIMENSIONS 10429 CheckDim(A, col_scale, row_scale, string("GetScalingFactors(A, X, Y, ") 10430 + string("rowcnd, colcnd, amax)")); 10431 #endif 10432 10433 int m = A.GetM(), n = A.GetN(); 10434 int lda = A.GetLD(); 10435 zgeequ_(&n, &m, A.GetDataVoid(), &lda, col_scale.GetData(), 10436 row_scale.GetData(), &col_condition_number, 10437 &row_condition_number, &amax, &info.GetInfoRef()); 10438 } 10439 10440 10441 // GetScalingFactors // 10443 10444 10446 // GetCholesky // 10447 10448 10449 template<class Prop, class Allocator> 10450 void GetCholesky(Matrix<double, Prop, RowSymPacked, Allocator>& A, 10451 LapackInfo& info) 10452 { 10453 int n = A.GetN(); 10454 #ifdef SELDON_CHECK_BOUNDS 10455 if (n <= 0) 10456 throw WrongDim("GetCholesky", "Provide a non-empty matrix"); 10457 #endif 10458 10459 char uplo('L'); 10460 dpptrf_(&uplo, &n, A.GetData(), &info.GetInfoRef()); 10461 10462 #ifdef SELDON_LAPACK_CHECK_INFO 10463 if (info.GetInfo() != 0) 10464 throw LapackError(info.GetInfo(), "GetCholesky", 10465 "An error occured during the factorization."); 10466 #endif 10467 10468 } 10469 10470 10471 template<class Prop, class Allocator> 10472 void GetCholesky(Matrix<double, Prop, ColSymPacked, Allocator>& A, 10473 LapackInfo& info) 10474 { 10475 int n = A.GetN(); 10476 #ifdef SELDON_CHECK_BOUNDS 10477 if (n <= 0) 10478 throw WrongDim("GetCholesky", "Provide a non-empty matrix"); 10479 #endif 10480 10481 char uplo('U'); 10482 dpptrf_(&uplo, &n, A.GetData(), &info.GetInfoRef()); 10483 10484 #ifdef SELDON_LAPACK_CHECK_INFO 10485 if (info.GetInfo() != 0) 10486 throw LapackError(info.GetInfo(), "GetCholesky", 10487 "An error occured during the factorization."); 10488 #endif 10489 10490 } 10491 10492 10493 // GetCholesky // 10495 10496 10498 // SolveCholesky // 10499 10500 10501 template<class Transp, class Prop, class Allocator, class Allocator2> 10502 void SolveCholesky(const Transp& TransA, 10503 const Matrix<double, Prop, RowSymPacked, Allocator>& A, 10504 Vector<double, VectFull, Allocator2>& X, 10505 LapackInfo& info) 10506 { 10507 #ifdef SELDON_CHECK_BOUNDS 10508 if (X.GetM() != A.GetM()) 10509 throw WrongDim("SolveCholesky", 10510 "The vector should have a dimension compatible " 10511 "with the matrix."); 10512 #endif 10513 10514 // basic triangular solve 10515 char uplo('L'); char trans(TransA.Char()); char diag('N'); 10516 int n = A.GetM(); int nrhs = 1; 10517 dtptrs_(&uplo, &trans, &diag, &n, &nrhs, A.GetData(), X.GetData(), 10518 &n, &info.GetInfoRef()); 10519 } 10520 10521 10522 template<class Transp, class Prop, class Allocator, class Allocator2> 10523 void SolveCholesky(const Transp& TransA, 10524 const Matrix<double, Prop, ColSymPacked, Allocator>& A, 10525 Vector<double, VectFull, Allocator2>& X, 10526 LapackInfo& info) 10527 { 10528 #ifdef SELDON_CHECK_BOUNDS 10529 if (X.GetM() != A.GetM()) 10530 throw WrongDim("SolveCholesky", 10531 "The vector should have a dimension compatible " 10532 "with the matrix."); 10533 #endif 10534 10535 // basic triangular solve 10536 char uplo('U'); char trans(TransA.RevChar()); char diag('N'); 10537 int n = A.GetM(); int nrhs = 1; 10538 dtptrs_(&uplo, &trans, &diag, &n, &nrhs, A.GetData(), X.GetData(), 10539 &n, &info.GetInfoRef()); 10540 } 10541 10542 10543 // SolveCholesky // 10545 10546 10548 // MltCholesky // 10549 10550 10551 template<class Transp, class Prop, class Allocator, class Allocator2> 10552 void MltCholesky(const Transp& TransA, 10553 const Matrix<double, Prop, RowSymPacked, Allocator>& A, 10554 Vector<double, VectFull, Allocator2>& X, 10555 LapackInfo& info) 10556 { 10557 #ifdef SELDON_CHECK_BOUNDS 10558 if (X.GetM() != A.GetM()) 10559 throw WrongDim("MltCholesky", 10560 "The vector should have a dimension compatible " 10561 "with the matrix."); 10562 #endif 10563 10564 // matrix-vector product with a triangular matrix 10565 if (TransA.Trans()) 10566 cblas_dtpmv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 10567 A.GetM(), A.GetData(), X.GetData(), 1); 10568 else 10569 cblas_dtpmv(CblasRowMajor, CblasUpper, CblasTrans, CblasNonUnit, 10570 A.GetM(), A.GetData(), X.GetData(), 1); 10571 } 10572 10573 10574 template<class Transp, class Prop, class Allocator, class Allocator2> 10575 void MltCholesky(const Transp& TransA, 10576 const Matrix<double, Prop, ColSymPacked, Allocator>& A, 10577 Vector<double, VectFull, Allocator2>& X, 10578 LapackInfo& info) 10579 { 10580 #ifdef SELDON_CHECK_BOUNDS 10581 if (X.GetM() != A.GetM()) 10582 throw WrongDim("MltCholesky", 10583 "The vector should have a dimension compatible " 10584 "with the matrix."); 10585 #endif 10586 10587 // matrix-vector product with a triangular matrix 10588 if (TransA.Trans()) 10589 cblas_dtpmv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, 10590 A.GetM(), A.GetData(), X.GetData(), 1); 10591 else 10592 cblas_dtpmv(CblasColMajor, CblasUpper, CblasTrans, CblasNonUnit, 10593 A.GetM(), A.GetData(), X.GetData(), 1); 10594 } 10595 10596 10597 // MltCholesky // 10599 10600 10601 // Generic method, which factorizes a matrix and solve the linear system 10602 // b is overwritten by the solution 10603 template<class T, class Prop, class Storage, class Allocator, 10604 class Allocator1, class Allocator2> 10605 void GetAndSolveLU(Matrix<T, Prop, Storage, Allocator>& A, 10606 Vector<int, VectFull, Allocator1>& P, 10607 Vector<T, VectFull, Allocator2>& b, 10608 LapackInfo& info) 10609 { 10610 GetLU(A, P, info); 10611 SolveLU(A, P, b, info); 10612 } 10613 10614 10615 } // namespace Seldon. 10616 10617 #define SELDON_FILE_LAPACK_LINEAREQUATIONS_CXX 10618 #endif