Warning: this documentation for the development version is under construction.
00001 // Copyright (C) 2001-2009 Vivien Mallet 00002 // 00003 // This file is part of the linear-algebra library Seldon, 00004 // http://seldon.sourceforge.net/. 00005 // 00006 // Seldon is free software; you can redistribute it and/or modify it under the 00007 // terms of the GNU Lesser General Public License as published by the Free 00008 // Software Foundation; either version 2.1 of the License, or (at your option) 00009 // any later version. 00010 // 00011 // Seldon is distributed in the hope that it will be useful, but WITHOUT ANY 00012 // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00013 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 00014 // more details. 00015 // 00016 // You should have received a copy of the GNU Lesser General Public License 00017 // along with Seldon. If not, see http://www.gnu.org/licenses/. 00018 00019 00020 #ifndef SELDON_FILE_BLAS_3_CXX 00021 00022 00023 #include "Blas_3.hxx" 00024 00025 00026 namespace Seldon 00027 { 00028 00029 00031 // MltAdd // 00032 00033 00034 /*** ColMajor and NoTrans ***/ 00035 00036 00037 template <class Prop0, class Allocator0, 00038 class Prop1, class Allocator1, 00039 class Prop2, class Allocator2> 00040 void MltAdd(const float alpha, 00041 const Matrix<float, Prop0, ColMajor, Allocator0>& A, 00042 const Matrix<float, Prop1, ColMajor, Allocator1>& B, 00043 const float beta, 00044 Matrix<float, Prop2, ColMajor, Allocator2>& C) 00045 { 00046 00047 #ifdef SELDON_CHECK_DIMENSIONS 00048 CheckDim(A, B, C, "MltAdd(alpha, A, B, beta, C)"); 00049 #endif 00050 00051 cblas_sgemm(CblasColMajor, CblasNoTrans, CblasNoTrans, 00052 C.GetM(), C.GetN(), A.GetN(), 00053 alpha, A.GetData(), A.GetLD(), B.GetData(), B.GetLD(), 00054 beta, C.GetData(), C.GetLD()); 00055 } 00056 00057 00058 template <class Prop0, class Allocator0, 00059 class Prop1, class Allocator1, 00060 class Prop2, class Allocator2> 00061 void MltAdd(const double alpha, 00062 const Matrix<double, Prop0, ColMajor, Allocator0>& A, 00063 const Matrix<double, Prop1, ColMajor, Allocator1>& B, 00064 const double beta, 00065 Matrix<double, Prop2, ColMajor, Allocator2>& C) 00066 { 00067 00068 #ifdef SELDON_CHECK_DIMENSIONS 00069 CheckDim(A, B, C, "MltAdd(alpha, A, B, beta, C)"); 00070 #endif 00071 00072 cblas_dgemm(CblasColMajor, CblasNoTrans, CblasNoTrans, 00073 C.GetM(), C.GetN(), A.GetN(), 00074 alpha, A.GetData(), A.GetLD(), B.GetData(), B.GetLD(), 00075 beta, C.GetData(), C.GetLD()); 00076 } 00077 00078 00079 template <class Prop0, class Allocator0, 00080 class Prop1, class Allocator1, 00081 class Prop2, class Allocator2> 00082 void MltAdd(const complex<float> alpha, 00083 const Matrix<complex<float>, Prop0, ColMajor, Allocator0>& A, 00084 const Matrix<complex<float>, Prop1, ColMajor, Allocator1>& B, 00085 const complex<float> beta, 00086 Matrix<complex<float>, Prop2, ColMajor, Allocator2>& C) 00087 { 00088 00089 #ifdef SELDON_CHECK_DIMENSIONS 00090 CheckDim(A, B, C, "MltAdd(alpha, A, B, beta, C)"); 00091 #endif 00092 00093 cblas_cgemm(CblasColMajor, CblasNoTrans, CblasNoTrans, 00094 C.GetM(), C.GetN(), A.GetN(), 00095 reinterpret_cast<const void*>(&alpha), 00096 reinterpret_cast<const void*>(A.GetData()), A.GetLD(), 00097 reinterpret_cast<const void*>(B.GetData()), B.GetLD(), 00098 reinterpret_cast<const void*>(&beta), 00099 reinterpret_cast<void*>(C.GetData()), C.GetLD()); 00100 } 00101 00102 00103 template <class Prop0, class Allocator0, 00104 class Prop1, class Allocator1, 00105 class Prop2, class Allocator2> 00106 void MltAdd(const complex<double> alpha, 00107 const Matrix<complex<double>, Prop0, ColMajor, Allocator0>& A, 00108 const Matrix<complex<double>, Prop1, ColMajor, Allocator1>& B, 00109 const complex<double> beta, 00110 Matrix<complex<double>, Prop2, ColMajor, Allocator2>& C) 00111 { 00112 00113 #ifdef SELDON_CHECK_DIMENSIONS 00114 CheckDim(A, B, C, "MltAdd(alpha, A, B, beta, C)"); 00115 #endif 00116 00117 cblas_zgemm(CblasColMajor, CblasNoTrans, CblasNoTrans, 00118 C.GetM(), C.GetN(), A.GetN(), 00119 reinterpret_cast<const void*>(&alpha), 00120 reinterpret_cast<const void*>(A.GetData()), A.GetLD(), 00121 reinterpret_cast<const void*>(B.GetData()), B.GetLD(), 00122 reinterpret_cast<const void*>(&beta), 00123 reinterpret_cast<void*>(C.GetData()), C.GetLD()); 00124 } 00125 00126 00127 /*** ColMajor and TransA, TransB ***/ 00128 00129 00130 template <class Prop0, class Allocator0, 00131 class Prop1, class Allocator1, 00132 class Prop2, class Allocator2> 00133 void MltAdd(const float alpha, 00134 const SeldonTranspose& TransA, 00135 const Matrix<float, Prop0, ColMajor, Allocator0>& A, 00136 const SeldonTranspose& TransB, 00137 const Matrix<float, Prop1, ColMajor, Allocator1>& B, 00138 const float beta, 00139 Matrix<float, Prop2, ColMajor, Allocator2>& C) 00140 { 00141 00142 #ifdef SELDON_CHECK_DIMENSIONS 00143 CheckDim(TransA, A, TransB, B, C, 00144 "MltAdd(alpha, TransA, A, TransB, B, beta, C)"); 00145 #endif 00146 00147 cblas_sgemm(CblasColMajor, TransA, TransB, C.GetM(), C.GetN(), 00148 A.GetN(TransA), alpha, A.GetData(), A.GetLD(), 00149 B.GetData(), B.GetLD(), beta, C.GetData(), C.GetLD()); 00150 } 00151 00152 00153 template <class Prop0, class Allocator0, 00154 class Prop1, class Allocator1, 00155 class Prop2, class Allocator2> 00156 void MltAdd(const double alpha, 00157 const SeldonTranspose& TransA, 00158 const Matrix<double, Prop0, ColMajor, Allocator0>& A, 00159 const SeldonTranspose& TransB, 00160 const Matrix<double, Prop1, ColMajor, Allocator1>& B, 00161 const double beta, 00162 Matrix<double, Prop2, ColMajor, Allocator2>& C) 00163 { 00164 00165 #ifdef SELDON_CHECK_DIMENSIONS 00166 CheckDim(TransA, A, TransB, B, C, 00167 "MltAdd(alpha, TransA, A, TransB, B, beta, C)"); 00168 #endif 00169 00170 cblas_dgemm(CblasColMajor, TransA, TransB, C.GetM(), C.GetN(), 00171 A.GetN(TransA), alpha, A.GetData(), A.GetLD(), 00172 B.GetData(), B.GetLD(), beta, C.GetData(), C.GetLD()); 00173 } 00174 00175 00176 template <class Prop0, class Allocator0, 00177 class Prop1, class Allocator1, 00178 class Prop2, class Allocator2> 00179 void MltAdd(const complex<float> alpha, 00180 const SeldonTranspose& TransA, 00181 const Matrix<complex<float>, Prop0, ColMajor, Allocator0>& A, 00182 const SeldonTranspose& TransB, 00183 const Matrix<complex<float>, Prop1, ColMajor, Allocator1>& B, 00184 const complex<float> beta, 00185 Matrix<complex<float>, Prop2, ColMajor, Allocator2>& C) 00186 { 00187 00188 #ifdef SELDON_CHECK_DIMENSIONS 00189 CheckDim(TransA, A, TransB, B, C, 00190 "MltAdd(alpha, TransA, A, TransB, B, beta, C)"); 00191 #endif 00192 00193 cblas_cgemm(CblasColMajor, TransA, TransB, C.GetM(), C.GetN(), 00194 A.GetN(TransA), reinterpret_cast<const void*>(&alpha), 00195 reinterpret_cast<const void*>(A.GetData()), A.GetLD(), 00196 reinterpret_cast<const void*>(B.GetData()), B.GetLD(), 00197 reinterpret_cast<const void*>(&beta), 00198 reinterpret_cast<void*>(C.GetData()), C.GetLD()); 00199 } 00200 00201 00202 template <class Prop0, class Allocator0, 00203 class Prop1, class Allocator1, 00204 class Prop2, class Allocator2> 00205 void MltAdd(const complex<double> alpha, 00206 const SeldonTranspose& TransA, 00207 const Matrix<complex<double>, Prop0, ColMajor, Allocator0>& A, 00208 const SeldonTranspose& TransB, 00209 const Matrix<complex<double>, Prop1, ColMajor, Allocator1>& B, 00210 const complex<double> beta, 00211 Matrix<complex<double>, Prop2, ColMajor, Allocator2>& C) 00212 { 00213 00214 #ifdef SELDON_CHECK_DIMENSIONS 00215 CheckDim(TransA, A, TransB, B, C, 00216 "MltAdd(alpha, TransA, A, TransB, B, beta, C)"); 00217 #endif 00218 00219 cblas_zgemm(CblasColMajor, TransA, TransB, C.GetM(), C.GetN(), 00220 A.GetN(TransA), reinterpret_cast<const void*>(&alpha), 00221 reinterpret_cast<const void*>(A.GetData()), A.GetLD(), 00222 reinterpret_cast<const void*>(B.GetData()), B.GetLD(), 00223 reinterpret_cast<const void*>(&beta), 00224 reinterpret_cast<void*>(C.GetData()), C.GetLD()); 00225 } 00226 00227 00228 /*** RowMajor and NoTrans ***/ 00229 00230 00231 template <class Prop0, class Allocator0, 00232 class Prop1, class Allocator1, 00233 class Prop2, class Allocator2> 00234 void MltAdd(const float alpha, 00235 const Matrix<float, Prop0, RowMajor, Allocator0>& A, 00236 const Matrix<float, Prop1, RowMajor, Allocator1>& B, 00237 const float beta, 00238 Matrix<float, Prop2, RowMajor, Allocator2>& C) 00239 { 00240 00241 #ifdef SELDON_CHECK_DIMENSIONS 00242 CheckDim(A, B, C, "MltAdd(alpha, A, B, beta, C)"); 00243 #endif 00244 00245 cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, 00246 C.GetM(), C.GetN(), A.GetN(), 00247 alpha, A.GetData(), A.GetLD(), B.GetData(), B.GetLD(), 00248 beta, C.GetData(), C.GetLD()); 00249 } 00250 00251 00252 template <class Prop0, class Allocator0, 00253 class Prop1, class Allocator1, 00254 class Prop2, class Allocator2> 00255 void MltAdd(const double alpha, 00256 const Matrix<double, Prop0, RowMajor, Allocator0>& A, 00257 const Matrix<double, Prop1, RowMajor, Allocator1>& B, 00258 const double beta, 00259 Matrix<double, Prop2, RowMajor, Allocator2>& C) 00260 { 00261 00262 #ifdef SELDON_CHECK_DIMENSIONS 00263 CheckDim(A, B, C, "MltAdd(alpha, A, B, beta, C)"); 00264 #endif 00265 00266 cblas_dgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, 00267 C.GetM(), C.GetN(), A.GetN(), 00268 alpha, A.GetData(), A.GetLD(), B.GetData(), B.GetLD(), 00269 beta, C.GetData(), C.GetLD()); 00270 } 00271 00272 00273 template <class Prop0, class Allocator0, 00274 class Prop1, class Allocator1, 00275 class Prop2, class Allocator2> 00276 void MltAdd(const complex<float> alpha, 00277 const Matrix<complex<float>, Prop0, RowMajor, Allocator0>& A, 00278 const Matrix<complex<float>, Prop1, RowMajor, Allocator1>& B, 00279 const complex<float> beta, 00280 Matrix<complex<float>, Prop2, RowMajor, Allocator2>& C) 00281 { 00282 00283 #ifdef SELDON_CHECK_DIMENSIONS 00284 CheckDim(A, B, C, "MltAdd(alpha, A, B, beta, C)"); 00285 #endif 00286 00287 cblas_cgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, 00288 C.GetM(), C.GetN(), A.GetN(), 00289 reinterpret_cast<const void*>(&alpha), 00290 reinterpret_cast<const void*>(A.GetData()), A.GetLD(), 00291 reinterpret_cast<const void*>(B.GetData()), B.GetLD(), 00292 reinterpret_cast<const void*>(&beta), 00293 reinterpret_cast<void*>(C.GetData()), C.GetLD()); 00294 } 00295 00296 00297 template <class Prop0, class Allocator0, 00298 class Prop1, class Allocator1, 00299 class Prop2, class Allocator2> 00300 void MltAdd(const complex<double> alpha, 00301 const Matrix<complex<double>, Prop0, RowMajor, Allocator0>& A, 00302 const Matrix<complex<double>, Prop1, RowMajor, Allocator1>& B, 00303 const complex<double> beta, 00304 Matrix<complex<double>, Prop2, RowMajor, Allocator2>& C) 00305 { 00306 00307 #ifdef SELDON_CHECK_DIMENSIONS 00308 CheckDim(A, B, C, "MltAdd(alpha, A, B, beta, C)"); 00309 #endif 00310 00311 cblas_zgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, 00312 C.GetM(), C.GetN(), A.GetN(), 00313 reinterpret_cast<const void*>(&alpha), 00314 reinterpret_cast<const void*>(A.GetData()), A.GetLD(), 00315 reinterpret_cast<const void*>(B.GetData()), B.GetLD(), 00316 reinterpret_cast<const void*>(&beta), 00317 reinterpret_cast<void*>(C.GetData()), C.GetLD()); 00318 } 00319 00320 00321 /*** RowMajor and TransA, TransB ***/ 00322 00323 00324 template <class Prop0, class Allocator0, 00325 class Prop1, class Allocator1, 00326 class Prop2, class Allocator2> 00327 void MltAdd(const float alpha, 00328 const SeldonTranspose& TransA, 00329 const Matrix<float, Prop0, RowMajor, Allocator0>& A, 00330 const SeldonTranspose& TransB, 00331 const Matrix<float, Prop1, RowMajor, Allocator1>& B, 00332 const float beta, 00333 Matrix<float, Prop2, RowMajor, Allocator2>& C) 00334 { 00335 00336 #ifdef SELDON_CHECK_DIMENSIONS 00337 CheckDim(TransA, A, TransB, B, C, 00338 "MltAdd(alpha, TransA, A, TransB, B, beta, C)"); 00339 #endif 00340 00341 cblas_sgemm(CblasRowMajor, TransA, TransB, C.GetM(), C.GetN(), 00342 A.GetN(TransA), alpha, A.GetData(), A.GetLD(), 00343 B.GetData(), B.GetLD(), beta, C.GetData(), C.GetLD()); 00344 } 00345 00346 00347 template <class Prop0, class Allocator0, 00348 class Prop1, class Allocator1, 00349 class Prop2, class Allocator2> 00350 void MltAdd(const double alpha, 00351 const SeldonTranspose& TransA, 00352 const Matrix<double, Prop0, RowMajor, Allocator0>& A, 00353 const SeldonTranspose& TransB, 00354 const Matrix<double, Prop1, RowMajor, Allocator1>& B, 00355 const double beta, 00356 Matrix<double, Prop2, RowMajor, Allocator2>& C) 00357 { 00358 00359 #ifdef SELDON_CHECK_DIMENSIONS 00360 CheckDim(TransA, A, TransB, B, C, 00361 "MltAdd(alpha, TransA, A, TransB, B, beta, C)"); 00362 #endif 00363 00364 cblas_dgemm(CblasRowMajor, TransA, TransB, C.GetM(), C.GetN(), 00365 A.GetN(TransA), alpha, A.GetData(), A.GetLD(), 00366 B.GetData(), B.GetLD(), beta, C.GetData(), C.GetLD()); 00367 } 00368 00369 00370 template <class Prop0, class Allocator0, 00371 class Prop1, class Allocator1, 00372 class Prop2, class Allocator2> 00373 void MltAdd(const complex<float> alpha, 00374 const SeldonTranspose& TransA, 00375 const Matrix<complex<float>, Prop0, RowMajor, Allocator0>& A, 00376 const SeldonTranspose& TransB, 00377 const Matrix<complex<float>, Prop1, RowMajor, Allocator1>& B, 00378 const complex<float> beta, 00379 Matrix<complex<float>, Prop2, RowMajor, Allocator2>& C) 00380 { 00381 00382 #ifdef SELDON_CHECK_DIMENSIONS 00383 CheckDim(TransA, A, TransB, B, C, 00384 "MltAdd(alpha, TransA, A, TransB, B, beta, C)"); 00385 #endif 00386 00387 cblas_cgemm(CblasRowMajor, TransA, TransB, C.GetM(), C.GetN(), 00388 A.GetN(TransA), reinterpret_cast<const void*>(&alpha), 00389 reinterpret_cast<const void*>(A.GetData()), A.GetLD(), 00390 reinterpret_cast<const void*>(B.GetData()), B.GetLD(), 00391 reinterpret_cast<const void*>(&beta), 00392 reinterpret_cast<void*>(C.GetData()), C.GetLD()); 00393 } 00394 00395 00396 template <class Prop0, class Allocator0, 00397 class Prop1, class Allocator1, 00398 class Prop2, class Allocator2> 00399 void MltAdd(const complex<double> alpha, 00400 const SeldonTranspose& TransA, 00401 const Matrix<complex<double>, Prop0, RowMajor, Allocator0>& A, 00402 const SeldonTranspose& TransB, 00403 const Matrix<complex<double>, Prop1, RowMajor, Allocator1>& B, 00404 const complex<double> beta, 00405 Matrix<complex<double>, Prop2, RowMajor, Allocator2>& C) 00406 { 00407 00408 #ifdef SELDON_CHECK_DIMENSIONS 00409 CheckDim(TransA, A, TransB, B, C, 00410 "MltAdd(alpha, TransA, A, TransB, B, beta, C)"); 00411 #endif 00412 00413 cblas_zgemm(CblasRowMajor, TransA, TransB, C.GetM(), C.GetN(), 00414 A.GetN(TransA), reinterpret_cast<const void*>(&alpha), 00415 reinterpret_cast<const void*>(A.GetData()), A.GetLD(), 00416 reinterpret_cast<const void*>(B.GetData()), B.GetLD(), 00417 reinterpret_cast<const void*>(&beta), 00418 reinterpret_cast<void*>(C.GetData()), C.GetLD()); 00419 } 00420 00421 00422 // MltAdd // 00424 00425 00426 00428 // MltAdd // 00429 00430 00431 /*** ColSym and Upper ***/ 00432 00433 00434 template <class Prop0, class Allocator0, 00435 class Prop1, class Allocator1, 00436 class Prop2, class Allocator2> 00437 void MltAdd(const SeldonSide& Side, 00438 const float alpha, 00439 const Matrix<float, Prop0, ColSym, Allocator0>& A, 00440 const Matrix<float, Prop1, ColMajor, Allocator1>& B, 00441 const float beta, 00442 Matrix<float, Prop2, ColMajor, Allocator2>& C) 00443 { 00444 00445 #ifdef SELDON_CHECK_DIMENSIONS 00446 CheckDim(Side, A, B, C, "MltAdd(side, alpha, A, B, beta, C)"); 00447 #endif 00448 00449 cblas_ssymm(CblasColMajor, Side, CblasUpper, 00450 C.GetM(), C.GetN(), 00451 alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM(), 00452 beta, C.GetData(), C.GetM()); 00453 } 00454 00455 00456 template <class Prop0, class Allocator0, 00457 class Prop1, class Allocator1, 00458 class Prop2, class Allocator2> 00459 void MltAdd(const SeldonSide& Side, 00460 const double alpha, 00461 const Matrix<double, Prop0, ColSym, Allocator0>& A, 00462 const Matrix<double, Prop1, ColMajor, Allocator1>& B, 00463 const double beta, 00464 Matrix<double, Prop2, ColMajor, Allocator2>& C) 00465 { 00466 00467 #ifdef SELDON_CHECK_DIMENSIONS 00468 CheckDim(Side, A, B, C, "MltAdd(side, alpha, A, B, beta, C)"); 00469 #endif 00470 00471 cblas_dsymm(CblasColMajor, Side, CblasUpper, 00472 C.GetM(), C.GetN(), 00473 alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM(), 00474 beta, C.GetData(), C.GetM()); 00475 } 00476 00477 00478 template <class Prop0, class Allocator0, 00479 class Prop1, class Allocator1, 00480 class Prop2, class Allocator2> 00481 void MltAdd(const SeldonSide& Side, 00482 const complex<float> alpha, 00483 const Matrix<complex<float>, Prop0, ColSym, Allocator0>& A, 00484 const Matrix<complex<float>, Prop1, ColMajor, Allocator1>& B, 00485 const complex<float> beta, 00486 Matrix<complex<float>, Prop2, ColMajor, Allocator2>& C) 00487 { 00488 00489 #ifdef SELDON_CHECK_DIMENSIONS 00490 CheckDim(Side, A, B, C, "MltAdd(side, alpha, A, B, beta, C)"); 00491 #endif 00492 00493 cblas_csymm(CblasColMajor, Side, CblasUpper, 00494 C.GetM(), C.GetN(), 00495 reinterpret_cast<const void*>(&alpha), 00496 reinterpret_cast<const void*>(A.GetData()), A.GetM(), 00497 reinterpret_cast<const void*>(B.GetData()), B.GetM(), 00498 reinterpret_cast<const void*>(&beta), 00499 reinterpret_cast<void*>(C.GetData()), C.GetM()); 00500 } 00501 00502 00503 template <class Prop0, class Allocator0, 00504 class Prop1, class Allocator1, 00505 class Prop2, class Allocator2> 00506 void MltAdd(const SeldonSide& Side, 00507 const complex<double> alpha, 00508 const Matrix<complex<double>, Prop0, ColSym, Allocator0>& A, 00509 const Matrix<complex<double>, Prop1, ColMajor, Allocator1>& B, 00510 const complex<double> beta, 00511 Matrix<complex<double>, Prop2, ColMajor, Allocator2>& C) 00512 { 00513 00514 #ifdef SELDON_CHECK_DIMENSIONS 00515 CheckDim(Side, A, B, C, "MltAdd(side, alpha, A, B, beta, C)"); 00516 #endif 00517 00518 cblas_zsymm(CblasColMajor, Side, CblasUpper, 00519 C.GetM(), C.GetN(), 00520 reinterpret_cast<const void*>(&alpha), 00521 reinterpret_cast<const void*>(A.GetData()), A.GetM(), 00522 reinterpret_cast<const void*>(B.GetData()), B.GetM(), 00523 reinterpret_cast<const void*>(&beta), 00524 reinterpret_cast<void*>(C.GetData()), C.GetM()); 00525 } 00526 00527 00528 /*** ColSym and UpLo ***/ 00529 00530 00531 template <class Prop0, class Allocator0, 00532 class Prop1, class Allocator1, 00533 class Prop2, class Allocator2> 00534 void MltAdd(const SeldonSide& Side, 00535 const float alpha, 00536 const SeldonUplo& Uplo, 00537 const Matrix<float, Prop0, ColSym, Allocator0>& A, 00538 const Matrix<float, Prop1, ColMajor, Allocator1>& B, 00539 const float beta, 00540 Matrix<float, Prop2, ColMajor, Allocator2>& C) 00541 { 00542 00543 #ifdef SELDON_CHECK_DIMENSIONS 00544 CheckDim(Side, A, B, C, "MltAdd(side, alpha, uplo, A, B, beta, C)"); 00545 #endif 00546 00547 cblas_ssymm(CblasColMajor, Side, Uplo, 00548 C.GetM(), C.GetN(), 00549 alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM(), 00550 beta, C.GetData(), C.GetM()); 00551 } 00552 00553 00554 template <class Prop0, class Allocator0, 00555 class Prop1, class Allocator1, 00556 class Prop2, class Allocator2> 00557 void MltAdd(const SeldonSide& Side, 00558 const double alpha, 00559 const SeldonUplo& Uplo, 00560 const Matrix<double, Prop0, ColSym, Allocator0>& A, 00561 const Matrix<double, Prop1, ColMajor, Allocator1>& B, 00562 const double beta, 00563 Matrix<double, Prop2, ColMajor, Allocator2>& C) 00564 { 00565 00566 #ifdef SELDON_CHECK_DIMENSIONS 00567 CheckDim(Side, A, B, C, "MltAdd(side, alpha, uplo, A, B, beta, C)"); 00568 #endif 00569 00570 cblas_dsymm(CblasColMajor, Side, Uplo, 00571 C.GetM(), C.GetN(), 00572 alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM(), 00573 beta, C.GetData(), C.GetM()); 00574 } 00575 00576 00577 template <class Prop0, class Allocator0, 00578 class Prop1, class Allocator1, 00579 class Prop2, class Allocator2> 00580 void MltAdd(const SeldonSide& Side, 00581 const complex<float> alpha, 00582 const SeldonUplo& Uplo, 00583 const Matrix<complex<float>, Prop0, ColSym, Allocator0>& A, 00584 const Matrix<complex<float>, Prop1, ColMajor, Allocator1>& B, 00585 const complex<float> beta, 00586 Matrix<complex<float>, Prop2, ColMajor, Allocator2>& C) 00587 { 00588 00589 #ifdef SELDON_CHECK_DIMENSIONS 00590 CheckDim(Side, A, B, C, "MltAdd(side, alpha, uplo, A, B, beta, C)"); 00591 #endif 00592 00593 cblas_csymm(CblasColMajor, Side, Uplo, 00594 C.GetM(), C.GetN(), 00595 reinterpret_cast<const void*>(&alpha), 00596 reinterpret_cast<const void*>(A.GetData()), A.GetM(), 00597 reinterpret_cast<const void*>(B.GetData()), B.GetM(), 00598 reinterpret_cast<const void*>(&beta), 00599 reinterpret_cast<void*>(C.GetData()), C.GetM()); 00600 } 00601 00602 00603 template <class Prop0, class Allocator0, 00604 class Prop1, class Allocator1, 00605 class Prop2, class Allocator2> 00606 void MltAdd(const SeldonSide& Side, 00607 const complex<double> alpha, 00608 const SeldonUplo& Uplo, 00609 const Matrix<complex<double>, Prop0, ColSym, Allocator0>& A, 00610 const Matrix<complex<double>, Prop1, ColMajor, Allocator1>& B, 00611 const complex<double> beta, 00612 Matrix<complex<double>, Prop2, ColMajor, Allocator2>& C) 00613 { 00614 00615 #ifdef SELDON_CHECK_DIMENSIONS 00616 CheckDim(Side, A, B, C, "MltAdd(side, alpha, uplo, A, B, beta, C)"); 00617 #endif 00618 00619 cblas_zsymm(CblasColMajor, Side, Uplo, 00620 C.GetM(), C.GetN(), 00621 reinterpret_cast<const void*>(&alpha), 00622 reinterpret_cast<const void*>(A.GetData()), A.GetM(), 00623 reinterpret_cast<const void*>(B.GetData()), B.GetM(), 00624 reinterpret_cast<const void*>(&beta), 00625 reinterpret_cast<void*>(C.GetData()), C.GetM()); 00626 } 00627 00628 00629 /*** RowSym and Upper ***/ 00630 00631 00632 template <class Prop0, class Allocator0, 00633 class Prop1, class Allocator1, 00634 class Prop2, class Allocator2> 00635 void MltAdd(const SeldonSide& Side, 00636 const float alpha, 00637 const Matrix<float, Prop0, RowSym, Allocator0>& A, 00638 const Matrix<float, Prop1, RowMajor, Allocator1>& B, 00639 const float beta, 00640 Matrix<float, Prop2, RowMajor, Allocator2>& C) 00641 { 00642 00643 #ifdef SELDON_CHECK_DIMENSIONS 00644 CheckDim(Side, A, B, C, "MltAdd(side, alpha, A, B, beta, C)"); 00645 #endif 00646 00647 cblas_ssymm(CblasRowMajor, Side, CblasUpper, 00648 C.GetM(), C.GetN(), 00649 alpha, A.GetData(), A.GetM(), B.GetData(), B.GetN(), 00650 beta, C.GetData(), C.GetN()); 00651 } 00652 00653 00654 template <class Prop0, class Allocator0, 00655 class Prop1, class Allocator1, 00656 class Prop2, class Allocator2> 00657 void MltAdd(const SeldonSide& Side, 00658 const double alpha, 00659 const Matrix<double, Prop0, RowSym, Allocator0>& A, 00660 const Matrix<double, Prop1, RowMajor, Allocator1>& B, 00661 const double beta, 00662 Matrix<double, Prop2, RowMajor, Allocator2>& C) 00663 { 00664 00665 #ifdef SELDON_CHECK_DIMENSIONS 00666 CheckDim(Side, A, B, C, "MltAdd(side, alpha, A, B, beta, C)"); 00667 #endif 00668 00669 cblas_dsymm(CblasRowMajor, Side, CblasUpper, 00670 C.GetM(), C.GetN(), 00671 alpha, A.GetData(), A.GetM(), B.GetData(), B.GetN(), 00672 beta, C.GetData(), C.GetN()); 00673 } 00674 00675 00676 template <class Prop0, class Allocator0, 00677 class Prop1, class Allocator1, 00678 class Prop2, class Allocator2> 00679 void MltAdd(const SeldonSide& Side, 00680 const complex<float> alpha, 00681 const Matrix<complex<float>, Prop0, RowSym, Allocator0>& A, 00682 const Matrix<complex<float>, Prop1, RowMajor, Allocator1>& B, 00683 const complex<float> beta, 00684 Matrix<complex<float>, Prop2, RowMajor, Allocator2>& C) 00685 { 00686 00687 #ifdef SELDON_CHECK_DIMENSIONS 00688 CheckDim(Side, A, B, C, "MltAdd(side, alpha, A, B, beta, C)"); 00689 #endif 00690 00691 cblas_csymm(CblasRowMajor, Side, CblasUpper, 00692 C.GetM(), C.GetN(), 00693 reinterpret_cast<const void*>(&alpha), 00694 reinterpret_cast<const void*>(A.GetData()), A.GetM(), 00695 reinterpret_cast<const void*>(B.GetData()), B.GetN(), 00696 reinterpret_cast<const void*>(&beta), 00697 reinterpret_cast<void*>(C.GetData()), C.GetN()); 00698 } 00699 00700 00701 template <class Prop0, class Allocator0, 00702 class Prop1, class Allocator1, 00703 class Prop2, class Allocator2> 00704 void MltAdd(const SeldonSide& Side, 00705 const complex<double> alpha, 00706 const Matrix<complex<double>, Prop0, RowSym, Allocator0>& A, 00707 const Matrix<complex<double>, Prop1, RowMajor, Allocator1>& B, 00708 const complex<double> beta, 00709 Matrix<complex<double>, Prop2, RowMajor, Allocator2>& C) 00710 { 00711 00712 #ifdef SELDON_CHECK_DIMENSIONS 00713 CheckDim(Side, A, B, C, "MltAdd(side, alpha, A, B, beta, C)"); 00714 #endif 00715 00716 cblas_zsymm(CblasRowMajor, Side, CblasUpper, 00717 C.GetM(), C.GetN(), 00718 reinterpret_cast<const void*>(&alpha), 00719 reinterpret_cast<const void*>(A.GetData()), A.GetM(), 00720 reinterpret_cast<const void*>(B.GetData()), B.GetN(), 00721 reinterpret_cast<const void*>(&beta), 00722 reinterpret_cast<void*>(C.GetData()), C.GetN()); 00723 } 00724 00725 00726 /*** RowSym and UpLo ***/ 00727 00728 00729 template <class Prop0, class Allocator0, 00730 class Prop1, class Allocator1, 00731 class Prop2, class Allocator2> 00732 void MltAdd(const SeldonSide& Side, 00733 const float alpha, 00734 const SeldonUplo& Uplo, 00735 const Matrix<float, Prop0, RowSym, Allocator0>& A, 00736 const Matrix<float, Prop1, RowMajor, Allocator1>& B, 00737 const float beta, 00738 Matrix<float, Prop2, RowMajor, Allocator2>& C) 00739 { 00740 00741 #ifdef SELDON_CHECK_DIMENSIONS 00742 CheckDim(Side, A, B, C, "MltAdd(side, alpha, uplo, A, B, beta, C)"); 00743 #endif 00744 00745 cblas_ssymm(CblasRowMajor, Side, Uplo, 00746 C.GetM(), C.GetN(), 00747 alpha, A.GetData(), A.GetM(), B.GetData(), B.GetN(), 00748 beta, C.GetData(), C.GetN()); 00749 } 00750 00751 00752 template <class Prop0, class Allocator0, 00753 class Prop1, class Allocator1, 00754 class Prop2, class Allocator2> 00755 void MltAdd(const SeldonSide& Side, 00756 const double alpha, 00757 const SeldonUplo& Uplo, 00758 const Matrix<double, Prop0, RowSym, Allocator0>& A, 00759 const Matrix<double, Prop1, RowMajor, Allocator1>& B, 00760 const double beta, 00761 Matrix<double, Prop2, RowMajor, Allocator2>& C) 00762 { 00763 00764 #ifdef SELDON_CHECK_DIMENSIONS 00765 CheckDim(Side, A, B, C, "MltAdd(side, alpha, uplo, A, B, beta, C)"); 00766 #endif 00767 00768 cblas_dsymm(CblasRowMajor, Side, Uplo, 00769 C.GetM(), C.GetN(), 00770 alpha, A.GetData(), A.GetM(), B.GetData(), B.GetN(), 00771 beta, C.GetData(), C.GetN()); 00772 } 00773 00774 00775 template <class Prop0, class Allocator0, 00776 class Prop1, class Allocator1, 00777 class Prop2, class Allocator2> 00778 void MltAdd(const SeldonSide& Side, 00779 const complex<float> alpha, 00780 const SeldonUplo& Uplo, 00781 const Matrix<complex<float>, Prop0, RowSym, Allocator0>& A, 00782 const Matrix<complex<float>, Prop1, RowMajor, Allocator1>& B, 00783 const complex<float> beta, 00784 Matrix<complex<float>, Prop2, RowMajor, Allocator2>& C) 00785 { 00786 00787 #ifdef SELDON_CHECK_DIMENSIONS 00788 CheckDim(Side, A, B, C, "MltAdd(side, alpha, uplo, A, B, beta, C)"); 00789 #endif 00790 00791 cblas_csymm(CblasRowMajor, Side, Uplo, 00792 C.GetM(), C.GetN(), 00793 reinterpret_cast<const void*>(&alpha), 00794 reinterpret_cast<const void*>(A.GetData()), A.GetM(), 00795 reinterpret_cast<const void*>(B.GetData()), B.GetN(), 00796 reinterpret_cast<const void*>(&beta), 00797 reinterpret_cast<void*>(C.GetData()), C.GetN()); 00798 } 00799 00800 00801 template <class Prop0, class Allocator0, 00802 class Prop1, class Allocator1, 00803 class Prop2, class Allocator2> 00804 void MltAdd(const SeldonSide& Side, 00805 const complex<double> alpha, 00806 const SeldonUplo& Uplo, 00807 const Matrix<complex<double>, Prop0, RowSym, Allocator0>& A, 00808 const Matrix<complex<double>, Prop1, RowMajor, Allocator1>& B, 00809 const complex<double> beta, 00810 Matrix<complex<double>, Prop2, RowMajor, Allocator2>& C) 00811 { 00812 00813 #ifdef SELDON_CHECK_DIMENSIONS 00814 CheckDim(Side, A, B, C, "MltAdd(side, alpha, uplo, A, B, beta, C)"); 00815 #endif 00816 00817 cblas_zsymm(CblasRowMajor, Side, Uplo, 00818 C.GetM(), C.GetN(), 00819 reinterpret_cast<const void*>(&alpha), 00820 reinterpret_cast<const void*>(A.GetData()), A.GetM(), 00821 reinterpret_cast<const void*>(B.GetData()), B.GetN(), 00822 reinterpret_cast<const void*>(&beta), 00823 reinterpret_cast<void*>(C.GetData()), C.GetN()); 00824 } 00825 00826 00827 // MltAdd // 00829 00830 00831 00833 // MltAdd // 00834 00835 00836 /*** ColHerm and Upper ***/ 00837 00838 00839 template <class Prop0, class Allocator0, 00840 class Prop1, class Allocator1, 00841 class Prop2, class Allocator2> 00842 void MltAdd(const SeldonSide& Side, 00843 const complex<float> alpha, 00844 const Matrix<complex<float>, Prop0, ColHerm, Allocator0>& A, 00845 const Matrix<complex<float>, Prop1, ColMajor, Allocator1>& B, 00846 const complex<float> beta, 00847 Matrix<complex<float>, Prop2, ColMajor, Allocator2>& C) 00848 { 00849 00850 #ifdef SELDON_CHECK_DIMENSIONS 00851 CheckDim(Side, A, B, C, "MltAdd(side, alpha, A, B, beta, C)"); 00852 #endif 00853 00854 cblas_chemm(CblasColMajor, Side, CblasUpper, 00855 C.GetM(), C.GetN(), 00856 reinterpret_cast<const void*>(&alpha), 00857 reinterpret_cast<const void*>(A.GetData()), A.GetM(), 00858 reinterpret_cast<const void*>(B.GetData()), B.GetM(), 00859 reinterpret_cast<const void*>(&beta), 00860 reinterpret_cast<void*>(C.GetData()), C.GetM()); 00861 } 00862 00863 00864 template <class Prop0, class Allocator0, 00865 class Prop1, class Allocator1, 00866 class Prop2, class Allocator2> 00867 void MltAdd(const SeldonSide& Side, 00868 const complex<double> alpha, 00869 const Matrix<complex<double>, Prop0, ColHerm, Allocator0>& A, 00870 const Matrix<complex<double>, Prop1, ColMajor, Allocator1>& B, 00871 const complex<double> beta, 00872 Matrix<complex<double>, Prop2, ColMajor, Allocator2>& C) 00873 { 00874 00875 #ifdef SELDON_CHECK_DIMENSIONS 00876 CheckDim(Side, A, B, C, "MltAdd(side, alpha, A, B, beta, C)"); 00877 #endif 00878 00879 cblas_zhemm(CblasColMajor, Side, CblasUpper, 00880 C.GetM(), C.GetN(), 00881 reinterpret_cast<const void*>(&alpha), 00882 reinterpret_cast<const void*>(A.GetData()), A.GetM(), 00883 reinterpret_cast<const void*>(B.GetData()), B.GetM(), 00884 reinterpret_cast<const void*>(&beta), 00885 reinterpret_cast<void*>(C.GetData()), C.GetM()); 00886 } 00887 00888 00889 /*** ColHerm and UpLo ***/ 00890 00891 00892 template <class Prop0, class Allocator0, 00893 class Prop1, class Allocator1, 00894 class Prop2, class Allocator2> 00895 void MltAdd(const SeldonSide& Side, 00896 const complex<float> alpha, 00897 const SeldonUplo& Uplo, 00898 const Matrix<complex<float>, Prop0, ColHerm, Allocator0>& A, 00899 const Matrix<complex<float>, Prop1, ColMajor, Allocator1>& B, 00900 const complex<float> beta, 00901 Matrix<complex<float>, Prop2, ColMajor, Allocator2>& C) 00902 { 00903 00904 #ifdef SELDON_CHECK_DIMENSIONS 00905 CheckDim(Side, A, B, C, "MltAdd(side, alpha, uplo, A, B, beta, C)"); 00906 #endif 00907 00908 cblas_chemm(CblasColMajor, Side, Uplo, 00909 C.GetM(), C.GetN(), 00910 reinterpret_cast<const void*>(&alpha), 00911 reinterpret_cast<const void*>(A.GetData()), A.GetM(), 00912 reinterpret_cast<const void*>(B.GetData()), B.GetM(), 00913 reinterpret_cast<const void*>(&beta), 00914 reinterpret_cast<void*>(C.GetData()), C.GetM()); 00915 } 00916 00917 00918 template <class Prop0, class Allocator0, 00919 class Prop1, class Allocator1, 00920 class Prop2, class Allocator2> 00921 void MltAdd(const SeldonSide& Side, 00922 const complex<double> alpha, 00923 const SeldonUplo& Uplo, 00924 const Matrix<complex<double>, Prop0, ColHerm, Allocator0>& A, 00925 const Matrix<complex<double>, Prop1, ColMajor, Allocator1>& B, 00926 const complex<double> beta, 00927 Matrix<complex<double>, Prop2, ColMajor, Allocator2>& C) 00928 { 00929 00930 #ifdef SELDON_CHECK_DIMENSIONS 00931 CheckDim(Side, A, B, C, "MltAdd(side, alpha, uplo, A, B, beta, C)"); 00932 #endif 00933 00934 cblas_zhemm(CblasColMajor, Side, Uplo, 00935 C.GetM(), C.GetN(), 00936 reinterpret_cast<const void*>(&alpha), 00937 reinterpret_cast<const void*>(A.GetData()), A.GetM(), 00938 reinterpret_cast<const void*>(B.GetData()), B.GetM(), 00939 reinterpret_cast<const void*>(&beta), 00940 reinterpret_cast<void*>(C.GetData()), C.GetM()); 00941 } 00942 00943 00944 /*** RowHerm and Upper ***/ 00945 00946 00947 template <class Prop0, class Allocator0, 00948 class Prop1, class Allocator1, 00949 class Prop2, class Allocator2> 00950 void MltAdd(const SeldonSide& Side, 00951 const complex<float> alpha, 00952 const Matrix<complex<float>, Prop0, RowHerm, Allocator0>& A, 00953 const Matrix<complex<float>, Prop1, RowMajor, Allocator1>& B, 00954 const complex<float> beta, 00955 Matrix<complex<float>, Prop2, RowMajor, Allocator2>& C) 00956 { 00957 00958 #ifdef SELDON_CHECK_DIMENSIONS 00959 CheckDim(Side, A, B, C, "MltAdd(side, alpha, A, B, beta, C)"); 00960 #endif 00961 00962 cblas_chemm(CblasRowMajor, Side, CblasUpper, 00963 C.GetM(), C.GetN(), 00964 reinterpret_cast<const void*>(&alpha), 00965 reinterpret_cast<const void*>(A.GetData()), A.GetM(), 00966 reinterpret_cast<const void*>(B.GetData()), B.GetN(), 00967 reinterpret_cast<const void*>(&beta), 00968 reinterpret_cast<void*>(C.GetData()), C.GetN()); 00969 } 00970 00971 00972 template <class Prop0, class Allocator0, 00973 class Prop1, class Allocator1, 00974 class Prop2, class Allocator2> 00975 void MltAdd(const SeldonSide& Side, 00976 const complex<double> alpha, 00977 const Matrix<complex<double>, Prop0, RowHerm, Allocator0>& A, 00978 const Matrix<complex<double>, Prop1, RowMajor, Allocator1>& B, 00979 const complex<double> beta, 00980 Matrix<complex<double>, Prop2, RowMajor, Allocator2>& C) 00981 { 00982 00983 #ifdef SELDON_CHECK_DIMENSIONS 00984 CheckDim(Side, A, B, C, "MltAdd(side, alpha, A, B, beta, C)"); 00985 #endif 00986 00987 cblas_zhemm(CblasRowMajor, Side, CblasUpper, 00988 C.GetM(), C.GetN(), 00989 reinterpret_cast<const void*>(&alpha), 00990 reinterpret_cast<const void*>(A.GetData()), A.GetM(), 00991 reinterpret_cast<const void*>(B.GetData()), B.GetN(), 00992 reinterpret_cast<const void*>(&beta), 00993 reinterpret_cast<void*>(C.GetData()), C.GetN()); 00994 } 00995 00996 00997 /*** RowHerm and UpLo ***/ 00998 00999 01000 template <class Prop0, class Allocator0, 01001 class Prop1, class Allocator1, 01002 class Prop2, class Allocator2> 01003 void MltAdd(const SeldonSide& Side, 01004 const complex<float> alpha, 01005 const SeldonUplo& Uplo, 01006 const Matrix<complex<float>, Prop0, RowHerm, Allocator0>& A, 01007 const Matrix<complex<float>, Prop1, RowMajor, Allocator1>& B, 01008 const complex<float> beta, 01009 Matrix<complex<float>, Prop2, RowMajor, Allocator2>& C) 01010 { 01011 01012 #ifdef SELDON_CHECK_DIMENSIONS 01013 CheckDim(Side, A, B, C, "MltAdd(side, alpha, uplo, A, B, beta, C)"); 01014 #endif 01015 01016 cblas_chemm(CblasRowMajor, Side, Uplo, 01017 C.GetM(), C.GetN(), 01018 reinterpret_cast<const void*>(&alpha), 01019 reinterpret_cast<const void*>(A.GetData()), A.GetM(), 01020 reinterpret_cast<const void*>(B.GetData()), B.GetN(), 01021 reinterpret_cast<const void*>(&beta), 01022 reinterpret_cast<void*>(C.GetData()), C.GetN()); 01023 } 01024 01025 01026 template <class Prop0, class Allocator0, 01027 class Prop1, class Allocator1, 01028 class Prop2, class Allocator2> 01029 void MltAdd(const SeldonSide& Side, 01030 const complex<double> alpha, 01031 const SeldonUplo& Uplo, 01032 const Matrix<complex<double>, Prop0, RowHerm, Allocator0>& A, 01033 const Matrix<complex<double>, Prop1, RowMajor, Allocator1>& B, 01034 const complex<double> beta, 01035 Matrix<complex<double>, Prop2, RowMajor, Allocator2>& C) 01036 { 01037 01038 #ifdef SELDON_CHECK_DIMENSIONS 01039 CheckDim(Side, A, B, C, "MltAdd(side, alpha, uplo, A, B, beta, C)"); 01040 #endif 01041 01042 cblas_zhemm(CblasRowMajor, Side, Uplo, 01043 C.GetM(), C.GetN(), 01044 reinterpret_cast<const void*>(&alpha), 01045 reinterpret_cast<const void*>(A.GetData()), A.GetM(), 01046 reinterpret_cast<const void*>(B.GetData()), B.GetN(), 01047 reinterpret_cast<const void*>(&beta), 01048 reinterpret_cast<void*>(C.GetData()), C.GetN()); 01049 } 01050 01051 01052 // MltAdd // 01054 01055 01056 01058 // Mlt // 01059 01060 01061 /*** ColUpTriang, NoTrans and NonUnit ***/ 01062 01063 01064 template <class Prop0, class Allocator0, 01065 class Prop1, class Allocator1> 01066 void Mlt(const SeldonSide& Side, 01067 const float alpha, 01068 const Matrix<float, Prop0, ColUpTriang, Allocator0>& A, 01069 Matrix<float, Prop1, ColMajor, Allocator1>& B) 01070 { 01071 01072 #ifdef SELDON_CHECK_DIMENSIONS 01073 CheckDim(Side, A, B, "Mlt(side, alpha, A, B)"); 01074 #endif 01075 01076 cblas_strmm(CblasColMajor, Side, CblasUpper, CblasNoTrans, CblasNonUnit, 01077 B.GetM(), B.GetN(), 01078 alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM()); 01079 } 01080 01081 01082 template <class Prop0, class Allocator0, 01083 class Prop1, class Allocator1> 01084 void Mlt(const SeldonSide& Side, 01085 const double alpha, 01086 const Matrix<double, Prop0, ColUpTriang, Allocator0>& A, 01087 Matrix<double, Prop1, ColMajor, Allocator1>& B) 01088 { 01089 01090 #ifdef SELDON_CHECK_DIMENSIONS 01091 CheckDim(Side, A, B, "Mlt(side, alpha, A, B)"); 01092 #endif 01093 01094 cblas_dtrmm(CblasColMajor, Side, CblasUpper, CblasNoTrans, CblasNonUnit, 01095 B.GetM(), B.GetN(), 01096 alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM()); 01097 } 01098 01099 01100 template <class Prop0, class Allocator0, 01101 class Prop1, class Allocator1> 01102 void Mlt(const SeldonSide& Side, 01103 const complex<float> alpha, 01104 const Matrix<complex<float>, Prop0, ColUpTriang, Allocator0>& A, 01105 Matrix<complex<float>, Prop1, ColMajor, Allocator1>& B) 01106 { 01107 01108 #ifdef SELDON_CHECK_DIMENSIONS 01109 CheckDim(Side, A, B, "Mlt(side, alpha, A, B)"); 01110 #endif 01111 01112 cblas_ctrmm(CblasColMajor, Side, CblasUpper, CblasNoTrans, CblasNonUnit, 01113 B.GetM(), B.GetN(), 01114 reinterpret_cast<const void*>(&alpha), 01115 reinterpret_cast<const void*>(A.GetData()), A.GetM(), 01116 reinterpret_cast<void*>(B.GetData()), B.GetM()); 01117 } 01118 01119 01120 template <class Prop0, class Allocator0, 01121 class Prop1, class Allocator1> 01122 void Mlt(const SeldonSide& Side, 01123 const complex<double> alpha, 01124 const Matrix<complex<double>, Prop0, ColUpTriang, Allocator0>& A, 01125 Matrix<complex<double>, Prop1, ColMajor, Allocator1>& B) 01126 { 01127 01128 #ifdef SELDON_CHECK_DIMENSIONS 01129 CheckDim(Side, A, B, "Mlt(side, alpha, A, B)"); 01130 #endif 01131 01132 cblas_ztrmm(CblasColMajor, Side, CblasUpper, CblasNoTrans, CblasNonUnit, 01133 B.GetM(), B.GetN(), 01134 reinterpret_cast<const void*>(&alpha), 01135 reinterpret_cast<const void*>(A.GetData()), A.GetM(), 01136 reinterpret_cast<void*>(B.GetData()), B.GetM()); 01137 } 01138 01139 01140 /*** ColUpTriang ***/ 01141 01142 01143 template <class Prop0, class Allocator0, 01144 class Prop1, class Allocator1> 01145 void Mlt(const SeldonSide& Side, 01146 const float alpha, 01147 const SeldonTranspose& TransA, 01148 const SeldonDiag& DiagA, 01149 const Matrix<float, Prop0, ColUpTriang, Allocator0>& A, 01150 Matrix<float, Prop1, ColMajor, Allocator1>& B) 01151 { 01152 01153 #ifdef SELDON_CHECK_DIMENSIONS 01154 CheckDim(Side, A, B, "Mlt(side, alpha, status, diag, A, B)"); 01155 #endif 01156 01157 cblas_strmm(CblasColMajor, Side, CblasUpper, TransA, DiagA, 01158 B.GetM(), B.GetN(), 01159 alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM()); 01160 } 01161 01162 01163 template <class Prop0, class Allocator0, 01164 class Prop1, class Allocator1> 01165 void Mlt(const SeldonSide& Side, 01166 const double alpha, 01167 const SeldonTranspose& TransA, 01168 const SeldonDiag& DiagA, 01169 const Matrix<double, Prop0, ColUpTriang, Allocator0>& A, 01170 Matrix<double, Prop1, ColMajor, Allocator1>& B) 01171 { 01172 01173 #ifdef SELDON_CHECK_DIMENSIONS 01174 CheckDim(Side, A, B, "Mlt(side, alpha, status, diag, A, B)"); 01175 #endif 01176 01177 cblas_dtrmm(CblasColMajor, Side, CblasUpper, TransA, DiagA, 01178 B.GetM(), B.GetN(), 01179 alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM()); 01180 } 01181 01182 01183 template <class Prop0, class Allocator0, 01184 class Prop1, class Allocator1> 01185 void Mlt(const SeldonSide& Side, 01186 const complex<float> alpha, 01187 const SeldonTranspose& TransA, 01188 const SeldonDiag& DiagA, 01189 const Matrix<complex<float>, Prop0, ColUpTriang, Allocator0>& A, 01190 Matrix<complex<float>, Prop1, ColMajor, Allocator1>& B) 01191 { 01192 01193 #ifdef SELDON_CHECK_DIMENSIONS 01194 CheckDim(Side, A, B, "Mlt(side, alpha, status, diag, A, B)"); 01195 #endif 01196 01197 cblas_ctrmm(CblasColMajor, Side, CblasUpper, TransA, DiagA, 01198 B.GetM(), B.GetN(), 01199 reinterpret_cast<const void*>(&alpha), 01200 reinterpret_cast<const void*>(A.GetData()), A.GetM(), 01201 reinterpret_cast<void*>(B.GetData()), B.GetM()); 01202 } 01203 01204 01205 template <class Prop0, class Allocator0, 01206 class Prop1, class Allocator1> 01207 void Mlt(const SeldonSide& Side, 01208 const complex<double> alpha, 01209 const SeldonTranspose& TransA, 01210 const SeldonDiag& DiagA, 01211 const Matrix<complex<double>, Prop0, ColUpTriang, Allocator0>& A, 01212 Matrix<complex<double>, Prop1, ColMajor, Allocator1>& B) 01213 { 01214 01215 #ifdef SELDON_CHECK_DIMENSIONS 01216 CheckDim(Side, A, B, "Mlt(side, alpha, status, diag, A, B)"); 01217 #endif 01218 01219 cblas_ztrmm(CblasColMajor, Side, CblasUpper, TransA, DiagA, 01220 B.GetM(), B.GetN(), 01221 reinterpret_cast<const void*>(&alpha), 01222 reinterpret_cast<const void*>(A.GetData()), A.GetM(), 01223 reinterpret_cast<void*>(B.GetData()), B.GetM()); 01224 } 01225 01226 01227 /*** ColLoTriang, NoTrans and NonUnit ***/ 01228 01229 01230 template <class Prop0, class Allocator0, 01231 class Prop1, class Allocator1> 01232 void Mlt(const SeldonSide& Side, 01233 const float alpha, 01234 const Matrix<float, Prop0, ColLoTriang, Allocator0>& A, 01235 Matrix<float, Prop1, ColMajor, Allocator1>& B) 01236 { 01237 01238 #ifdef SELDON_CHECK_DIMENSIONS 01239 CheckDim(Side, A, B, "Mlt(side, alpha, A, B)"); 01240 #endif 01241 01242 cblas_strmm(CblasColMajor, Side, CblasLower, CblasNoTrans, CblasNonUnit, 01243 B.GetM(), B.GetN(), 01244 alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM()); 01245 } 01246 01247 01248 template <class Prop0, class Allocator0, 01249 class Prop1, class Allocator1> 01250 void Mlt(const SeldonSide& Side, 01251 const double alpha, 01252 const Matrix<double, Prop0, ColLoTriang, Allocator0>& A, 01253 Matrix<double, Prop1, ColMajor, Allocator1>& B) 01254 { 01255 01256 #ifdef SELDON_CHECK_DIMENSIONS 01257 CheckDim(Side, A, B, "Mlt(side, alpha, A, B)"); 01258 #endif 01259 01260 cblas_dtrmm(CblasColMajor, Side, CblasLower, CblasNoTrans, CblasNonUnit, 01261 B.GetM(), B.GetN(), 01262 alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM()); 01263 } 01264 01265 01266 template <class Prop0, class Allocator0, 01267 class Prop1, class Allocator1> 01268 void Mlt(const SeldonSide& Side, 01269 const complex<float> alpha, 01270 const Matrix<complex<float>, Prop0, ColLoTriang, Allocator0>& A, 01271 Matrix<complex<float>, Prop1, ColMajor, Allocator1>& B) 01272 { 01273 01274 #ifdef SELDON_CHECK_DIMENSIONS 01275 CheckDim(Side, A, B, "Mlt(side, alpha, A, B)"); 01276 #endif 01277 01278 cblas_ctrmm(CblasColMajor, Side, CblasLower, CblasNoTrans, CblasNonUnit, 01279 B.GetM(), B.GetN(), 01280 reinterpret_cast<const void*>(&alpha), 01281 reinterpret_cast<const void*>(A.GetData()), A.GetM(), 01282 reinterpret_cast<void*>(B.GetData()), B.GetM()); 01283 } 01284 01285 01286 template <class Prop0, class Allocator0, 01287 class Prop1, class Allocator1> 01288 void Mlt(const SeldonSide& Side, 01289 const complex<double> alpha, 01290 const Matrix<complex<double>, Prop0, ColLoTriang, Allocator0>& A, 01291 Matrix<complex<double>, Prop1, ColMajor, Allocator1>& B) 01292 { 01293 01294 #ifdef SELDON_CHECK_DIMENSIONS 01295 CheckDim(Side, A, B, "Mlt(side, alpha, A, B)"); 01296 #endif 01297 01298 cblas_ztrmm(CblasColMajor, Side, CblasLower, CblasNoTrans, CblasNonUnit, 01299 B.GetM(), B.GetN(), 01300 reinterpret_cast<const void*>(&alpha), 01301 reinterpret_cast<const void*>(A.GetData()), A.GetM(), 01302 reinterpret_cast<void*>(B.GetData()), B.GetM()); 01303 } 01304 01305 01306 /*** ColLoTriang ***/ 01307 01308 01309 template <class Prop0, class Allocator0, 01310 class Prop1, class Allocator1> 01311 void Mlt(const SeldonSide& Side, 01312 const float alpha, 01313 const SeldonTranspose& TransA, 01314 const SeldonDiag& DiagA, 01315 const Matrix<float, Prop0, ColLoTriang, Allocator0>& A, 01316 Matrix<float, Prop1, ColMajor, Allocator1>& B) 01317 { 01318 01319 #ifdef SELDON_CHECK_DIMENSIONS 01320 CheckDim(Side, A, B, "Mlt(side, alpha, status, diag, A, B)"); 01321 #endif 01322 01323 cblas_strmm(CblasColMajor, Side, CblasLower, TransA, DiagA, 01324 B.GetM(), B.GetN(), 01325 alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM()); 01326 } 01327 01328 01329 template <class Prop0, class Allocator0, 01330 class Prop1, class Allocator1> 01331 void Mlt(const SeldonSide& Side, 01332 const double alpha, 01333 const SeldonTranspose& TransA, 01334 const SeldonDiag& DiagA, 01335 const Matrix<double, Prop0, ColLoTriang, Allocator0>& A, 01336 Matrix<double, Prop1, ColMajor, Allocator1>& B) 01337 { 01338 01339 #ifdef SELDON_CHECK_DIMENSIONS 01340 CheckDim(Side, A, B, "Mlt(side, alpha, status, diag, A, B)"); 01341 #endif 01342 01343 cblas_dtrmm(CblasColMajor, Side, CblasLower, TransA, DiagA, 01344 B.GetM(), B.GetN(), 01345 alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM()); 01346 } 01347 01348 01349 template <class Prop0, class Allocator0, 01350 class Prop1, class Allocator1> 01351 void Mlt(const SeldonSide& Side, 01352 const complex<float> alpha, 01353 const SeldonTranspose& TransA, 01354 const SeldonDiag& DiagA, 01355 const Matrix<complex<float>, Prop0, ColLoTriang, Allocator0>& A, 01356 Matrix<complex<float>, Prop1, ColMajor, Allocator1>& B) 01357 { 01358 01359 #ifdef SELDON_CHECK_DIMENSIONS 01360 CheckDim(Side, A, B, "Mlt(side, alpha, status, diag, A, B)"); 01361 #endif 01362 01363 cblas_ctrmm(CblasColMajor, Side, CblasLower, TransA, DiagA, 01364 B.GetM(), B.GetN(), 01365 reinterpret_cast<const void*>(&alpha), 01366 reinterpret_cast<const void*>(A.GetData()), A.GetM(), 01367 reinterpret_cast<void*>(B.GetData()), B.GetM()); 01368 } 01369 01370 01371 template <class Prop0, class Allocator0, 01372 class Prop1, class Allocator1> 01373 void Mlt(const SeldonSide& Side, 01374 const complex<double> alpha, 01375 const SeldonTranspose& TransA, 01376 const SeldonDiag& DiagA, 01377 const Matrix<complex<double>, Prop0, ColLoTriang, Allocator0>& A, 01378 Matrix<complex<double>, Prop1, ColMajor, Allocator1>& B) 01379 { 01380 01381 #ifdef SELDON_CHECK_DIMENSIONS 01382 CheckDim(Side, A, B, "Mlt(side, alpha, status, diag, A, B)"); 01383 #endif 01384 01385 cblas_ztrmm(CblasColMajor, Side, CblasLower, TransA, DiagA, 01386 B.GetM(), B.GetN(), 01387 reinterpret_cast<const void*>(&alpha), 01388 reinterpret_cast<const void*>(A.GetData()), A.GetM(), 01389 reinterpret_cast<void*>(B.GetData()), B.GetM()); 01390 } 01391 01392 01393 /*** RowUpTriang, NoTrans and NonUnit ***/ 01394 01395 01396 template <class Prop0, class Allocator0, 01397 class Prop1, class Allocator1> 01398 void Mlt(const SeldonSide& Side, 01399 const float alpha, 01400 const Matrix<float, Prop0, RowUpTriang, Allocator0>& A, 01401 Matrix<float, Prop1, RowMajor, Allocator1>& B) 01402 { 01403 01404 #ifdef SELDON_CHECK_DIMENSIONS 01405 CheckDim(Side, A, B, "Mlt(side, alpha, A, B)"); 01406 #endif 01407 01408 cblas_strmm(CblasRowMajor, Side, CblasUpper, CblasNoTrans, CblasNonUnit, 01409 B.GetM(), B.GetN(), 01410 alpha, A.GetData(), A.GetN(), B.GetData(), B.GetN()); 01411 } 01412 01413 01414 template <class Prop0, class Allocator0, 01415 class Prop1, class Allocator1> 01416 void Mlt(const SeldonSide& Side, 01417 const double alpha, 01418 const Matrix<double, Prop0, RowUpTriang, Allocator0>& A, 01419 Matrix<double, Prop1, RowMajor, Allocator1>& B) 01420 { 01421 01422 #ifdef SELDON_CHECK_DIMENSIONS 01423 CheckDim(Side, A, B, "Mlt(side, alpha, A, B)"); 01424 #endif 01425 01426 cblas_dtrmm(CblasRowMajor, Side, CblasUpper, CblasNoTrans, CblasNonUnit, 01427 B.GetM(), B.GetN(), 01428 alpha, A.GetData(), A.GetN(), B.GetData(), B.GetN()); 01429 } 01430 01431 01432 template <class Prop0, class Allocator0, 01433 class Prop1, class Allocator1> 01434 void Mlt(const SeldonSide& Side, 01435 const complex<float> alpha, 01436 const Matrix<complex<float>, Prop0, RowUpTriang, Allocator0>& A, 01437 Matrix<complex<float>, Prop1, RowMajor, Allocator1>& B) 01438 { 01439 01440 #ifdef SELDON_CHECK_DIMENSIONS 01441 CheckDim(Side, A, B, "Mlt(side, alpha, A, B)"); 01442 #endif 01443 01444 cblas_ctrmm(CblasRowMajor, Side, CblasUpper, CblasNoTrans, CblasNonUnit, 01445 B.GetM(), B.GetN(), 01446 reinterpret_cast<const void*>(&alpha), 01447 reinterpret_cast<const void*>(A.GetData()), A.GetN(), 01448 reinterpret_cast<void*>(B.GetData()), B.GetN()); 01449 } 01450 01451 01452 template <class Prop0, class Allocator0, 01453 class Prop1, class Allocator1> 01454 void Mlt(const SeldonSide& Side, 01455 const complex<double> alpha, 01456 const Matrix<complex<double>, Prop0, RowUpTriang, Allocator0>& A, 01457 Matrix<complex<double>, Prop1, RowMajor, Allocator1>& B) 01458 { 01459 01460 #ifdef SELDON_CHECK_DIMENSIONS 01461 CheckDim(Side, A, B, "Mlt(side, alpha, A, B)"); 01462 #endif 01463 01464 cblas_ztrmm(CblasRowMajor, Side, CblasUpper, CblasNoTrans, CblasNonUnit, 01465 B.GetM(), B.GetN(), 01466 reinterpret_cast<const void*>(&alpha), 01467 reinterpret_cast<const void*>(A.GetData()), A.GetN(), 01468 reinterpret_cast<void*>(B.GetData()), B.GetN()); 01469 } 01470 01471 01472 /*** RowUpTriang ***/ 01473 01474 01475 template <class Prop0, class Allocator0, 01476 class Prop1, class Allocator1> 01477 void Mlt(const SeldonSide& Side, 01478 const float alpha, 01479 const SeldonTranspose& TransA, 01480 const SeldonDiag& DiagA, 01481 const Matrix<float, Prop0, RowUpTriang, Allocator0>& A, 01482 Matrix<float, Prop1, RowMajor, Allocator1>& B) 01483 { 01484 01485 #ifdef SELDON_CHECK_DIMENSIONS 01486 CheckDim(Side, A, B, "Mlt(side, alpha, status, diag, A, B)"); 01487 #endif 01488 01489 cblas_strmm(CblasRowMajor, Side, CblasUpper, TransA, DiagA, 01490 B.GetM(), B.GetN(), 01491 alpha, A.GetData(), A.GetN(), B.GetData(), B.GetN()); 01492 } 01493 01494 01495 template <class Prop0, class Allocator0, 01496 class Prop1, class Allocator1> 01497 void Mlt(const SeldonSide& Side, 01498 const double alpha, 01499 const SeldonTranspose& TransA, 01500 const SeldonDiag& DiagA, 01501 const Matrix<double, Prop0, RowUpTriang, Allocator0>& A, 01502 Matrix<double, Prop1, RowMajor, Allocator1>& B) 01503 { 01504 01505 #ifdef SELDON_CHECK_DIMENSIONS 01506 CheckDim(Side, A, B, "Mlt(side, alpha, status, diag, A, B)"); 01507 #endif 01508 01509 cblas_dtrmm(CblasRowMajor, Side, CblasUpper, TransA, DiagA, 01510 B.GetM(), B.GetN(), 01511 alpha, A.GetData(), A.GetN(), B.GetData(), B.GetN()); 01512 } 01513 01514 01515 template <class Prop0, class Allocator0, 01516 class Prop1, class Allocator1> 01517 void Mlt(const SeldonSide& Side, 01518 const complex<float> alpha, 01519 const SeldonTranspose& TransA, 01520 const SeldonDiag& DiagA, 01521 const Matrix<complex<float>, Prop0, RowUpTriang, Allocator0>& A, 01522 Matrix<complex<float>, Prop1, RowMajor, Allocator1>& B) 01523 { 01524 01525 #ifdef SELDON_CHECK_DIMENSIONS 01526 CheckDim(Side, A, B, "Mlt(side, alpha, status, diag, A, B)"); 01527 #endif 01528 01529 cblas_ctrmm(CblasRowMajor, Side, CblasUpper, TransA, DiagA, 01530 B.GetM(), B.GetN(), 01531 reinterpret_cast<const void*>(&alpha), 01532 reinterpret_cast<const void*>(A.GetData()), A.GetN(), 01533 reinterpret_cast<void*>(B.GetData()), B.GetN()); 01534 } 01535 01536 01537 template <class Prop0, class Allocator0, 01538 class Prop1, class Allocator1> 01539 void Mlt(const SeldonSide& Side, 01540 const complex<double> alpha, 01541 const SeldonTranspose& TransA, 01542 const SeldonDiag& DiagA, 01543 const Matrix<complex<double>, Prop0, RowUpTriang, Allocator0>& A, 01544 Matrix<complex<double>, Prop1, RowMajor, Allocator1>& B) 01545 { 01546 01547 #ifdef SELDON_CHECK_DIMENSIONS 01548 CheckDim(Side, A, B, "Mlt(side, alpha, status, diag, A, B)"); 01549 #endif 01550 01551 cblas_ztrmm(CblasRowMajor, Side, CblasUpper, TransA, DiagA, 01552 B.GetM(), B.GetN(), 01553 reinterpret_cast<const void*>(&alpha), 01554 reinterpret_cast<const void*>(A.GetData()), A.GetN(), 01555 reinterpret_cast<void*>(B.GetData()), B.GetN()); 01556 } 01557 01558 01559 /*** RowLoTriang, NoTrans and NonUnit ***/ 01560 01561 01562 template <class Prop0, class Allocator0, 01563 class Prop1, class Allocator1> 01564 void Mlt(const SeldonSide& Side, 01565 const float alpha, 01566 const Matrix<float, Prop0, RowLoTriang, Allocator0>& A, 01567 Matrix<float, Prop1, RowMajor, Allocator1>& B) 01568 { 01569 01570 #ifdef SELDON_CHECK_DIMENSIONS 01571 CheckDim(Side, A, B, "Mlt(side, alpha, A, B)"); 01572 #endif 01573 01574 cblas_strmm(CblasRowMajor, Side, CblasLower, CblasNoTrans, CblasNonUnit, 01575 B.GetM(), B.GetN(), 01576 alpha, A.GetData(), A.GetN(), B.GetData(), B.GetN()); 01577 } 01578 01579 01580 template <class Prop0, class Allocator0, 01581 class Prop1, class Allocator1> 01582 void Mlt(const SeldonSide& Side, 01583 const double alpha, 01584 const Matrix<double, Prop0, RowLoTriang, Allocator0>& A, 01585 Matrix<double, Prop1, RowMajor, Allocator1>& B) 01586 { 01587 01588 #ifdef SELDON_CHECK_DIMENSIONS 01589 CheckDim(Side, A, B, "Mlt(side, alpha, A, B)"); 01590 #endif 01591 01592 cblas_dtrmm(CblasRowMajor, Side, CblasLower, CblasNoTrans, CblasNonUnit, 01593 B.GetM(), B.GetN(), 01594 alpha, A.GetData(), A.GetN(), B.GetData(), B.GetN()); 01595 } 01596 01597 01598 template <class Prop0, class Allocator0, 01599 class Prop1, class Allocator1> 01600 void Mlt(const SeldonSide& Side, 01601 const complex<float> alpha, 01602 const Matrix<complex<float>, Prop0, RowLoTriang, Allocator0>& A, 01603 Matrix<complex<float>, Prop1, RowMajor, Allocator1>& B) 01604 { 01605 01606 #ifdef SELDON_CHECK_DIMENSIONS 01607 CheckDim(Side, A, B, "Mlt(side, alpha, A, B)"); 01608 #endif 01609 01610 cblas_ctrmm(CblasRowMajor, Side, CblasLower, CblasNoTrans, CblasNonUnit, 01611 B.GetM(), B.GetN(), 01612 reinterpret_cast<const void*>(&alpha), 01613 reinterpret_cast<const void*>(A.GetData()), A.GetN(), 01614 reinterpret_cast<void*>(B.GetData()), B.GetN()); 01615 } 01616 01617 01618 template <class Prop0, class Allocator0, 01619 class Prop1, class Allocator1> 01620 void Mlt(const SeldonSide& Side, 01621 const complex<double> alpha, 01622 const Matrix<complex<double>, Prop0, RowLoTriang, Allocator0>& A, 01623 Matrix<complex<double>, Prop1, RowMajor, Allocator1>& B) 01624 { 01625 01626 #ifdef SELDON_CHECK_DIMENSIONS 01627 CheckDim(Side, A, B, "Mlt(side, alpha, A, B)"); 01628 #endif 01629 01630 cblas_ztrmm(CblasRowMajor, Side, CblasLower, CblasNoTrans, CblasNonUnit, 01631 B.GetM(), B.GetN(), 01632 reinterpret_cast<const void*>(&alpha), 01633 reinterpret_cast<const void*>(A.GetData()), A.GetN(), 01634 reinterpret_cast<void*>(B.GetData()), B.GetN()); 01635 } 01636 01637 01638 /*** RowLoTriang ***/ 01639 01640 01641 template <class Prop0, class Allocator0, 01642 class Prop1, class Allocator1> 01643 void Mlt(const SeldonSide& Side, 01644 const float alpha, 01645 const SeldonTranspose& TransA, 01646 const SeldonDiag& DiagA, 01647 const Matrix<float, Prop0, RowLoTriang, Allocator0>& A, 01648 Matrix<float, Prop1, RowMajor, Allocator1>& B) 01649 { 01650 01651 #ifdef SELDON_CHECK_DIMENSIONS 01652 CheckDim(Side, A, B, "Mlt(side, alpha, status, diag, A, B)"); 01653 #endif 01654 01655 cblas_strmm(CblasRowMajor, Side, CblasLower, TransA, DiagA, 01656 B.GetM(), B.GetN(), 01657 alpha, A.GetData(), A.GetN(), B.GetData(), B.GetN()); 01658 } 01659 01660 01661 template <class Prop0, class Allocator0, 01662 class Prop1, class Allocator1> 01663 void Mlt(const SeldonSide& Side, 01664 const double alpha, 01665 const SeldonTranspose& TransA, 01666 const SeldonDiag& DiagA, 01667 const Matrix<double, Prop0, RowLoTriang, Allocator0>& A, 01668 Matrix<double, Prop1, RowMajor, Allocator1>& B) 01669 { 01670 01671 #ifdef SELDON_CHECK_DIMENSIONS 01672 CheckDim(Side, A, B, "Mlt(side, alpha, status, diag, A, B)"); 01673 #endif 01674 01675 cblas_dtrmm(CblasRowMajor, Side, CblasLower, TransA, DiagA, 01676 B.GetM(), B.GetN(), 01677 alpha, A.GetData(), A.GetN(), B.GetData(), B.GetN()); 01678 } 01679 01680 01681 template <class Prop0, class Allocator0, 01682 class Prop1, class Allocator1> 01683 void Mlt(const SeldonSide& Side, 01684 const complex<float> alpha, 01685 const SeldonTranspose& TransA, 01686 const SeldonDiag& DiagA, 01687 const Matrix<complex<float>, Prop0, RowLoTriang, Allocator0>& A, 01688 Matrix<complex<float>, Prop1, RowMajor, Allocator1>& B) 01689 { 01690 01691 #ifdef SELDON_CHECK_DIMENSIONS 01692 CheckDim(Side, A, B, "Mlt(side, alpha, status, diag, A, B)"); 01693 #endif 01694 01695 cblas_ctrmm(CblasRowMajor, Side, CblasLower, TransA, DiagA, 01696 B.GetM(), B.GetN(), 01697 reinterpret_cast<const void*>(&alpha), 01698 reinterpret_cast<const void*>(A.GetData()), A.GetN(), 01699 reinterpret_cast<void*>(B.GetData()), B.GetN()); 01700 } 01701 01702 01703 template <class Prop0, class Allocator0, 01704 class Prop1, class Allocator1> 01705 void Mlt(const SeldonSide& Side, 01706 const complex<double> alpha, 01707 const SeldonTranspose& TransA, 01708 const SeldonDiag& DiagA, 01709 const Matrix<complex<double>, Prop0, RowLoTriang, Allocator0>& A, 01710 Matrix<complex<double>, Prop1, RowMajor, Allocator1>& B) 01711 { 01712 01713 #ifdef SELDON_CHECK_DIMENSIONS 01714 CheckDim(Side, A, B, "Mlt(side, alpha, status, diag, A, B)"); 01715 #endif 01716 01717 cblas_ztrmm(CblasRowMajor, Side, CblasLower, TransA, DiagA, 01718 B.GetM(), B.GetN(), 01719 reinterpret_cast<const void*>(&alpha), 01720 reinterpret_cast<const void*>(A.GetData()), A.GetN(), 01721 reinterpret_cast<void*>(B.GetData()), B.GetN()); 01722 } 01723 01724 01725 // Mlt // 01727 01728 01729 01731 // Solve // 01732 01733 01734 /*** ColUpTriang, NoTrans and NonUnit ***/ 01735 01736 01737 template <class Prop0, class Allocator0, 01738 class Prop1, class Allocator1> 01739 void Solve(const SeldonSide& Side, 01740 const float alpha, 01741 const Matrix<float, Prop0, ColUpTriang, Allocator0>& A, 01742 Matrix<float, Prop1, ColMajor, Allocator1>& B) 01743 { 01744 01745 #ifdef SELDON_CHECK_DIMENSIONS 01746 CheckDim(Side, A, B, "Solve(side, alpha, A, B)"); 01747 #endif 01748 01749 cblas_strsm(CblasColMajor, Side, CblasUpper, CblasNoTrans, CblasNonUnit, 01750 B.GetM(), B.GetN(), 01751 alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM()); 01752 } 01753 01754 01755 template <class Prop0, class Allocator0, 01756 class Prop1, class Allocator1> 01757 void Solve(const SeldonSide& Side, 01758 const double alpha, 01759 const Matrix<double, Prop0, ColUpTriang, Allocator0>& A, 01760 Matrix<double, Prop1, ColMajor, Allocator1>& B) 01761 { 01762 01763 #ifdef SELDON_CHECK_DIMENSIONS 01764 CheckDim(Side, A, B, "Solve(side, alpha, A, B)"); 01765 #endif 01766 01767 cblas_dtrsm(CblasColMajor, Side, CblasUpper, CblasNoTrans, CblasNonUnit, 01768 B.GetM(), B.GetN(), 01769 alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM()); 01770 } 01771 01772 01773 template <class Prop0, class Allocator0, 01774 class Prop1, class Allocator1> 01775 void Solve(const SeldonSide& Side, 01776 const complex<float> alpha, 01777 const Matrix<complex<float>, Prop0, ColUpTriang, Allocator0>& A, 01778 Matrix<complex<float>, Prop1, ColMajor, Allocator1>& B) 01779 { 01780 01781 #ifdef SELDON_CHECK_DIMENSIONS 01782 CheckDim(Side, A, B, "Solve(side, alpha, A, B)"); 01783 #endif 01784 01785 cblas_ctrsm(CblasColMajor, Side, CblasUpper, CblasNoTrans, CblasNonUnit, 01786 B.GetM(), B.GetN(), 01787 reinterpret_cast<const void*>(&alpha), 01788 reinterpret_cast<const void*>(A.GetData()), A.GetM(), 01789 reinterpret_cast<void*>(B.GetData()), B.GetM()); 01790 } 01791 01792 01793 template <class Prop0, class Allocator0, 01794 class Prop1, class Allocator1> 01795 void Solve(const SeldonSide& Side, 01796 const complex<double> alpha, 01797 const Matrix<complex<double>, Prop0, ColUpTriang, Allocator0>& A, 01798 Matrix<complex<double>, Prop1, ColMajor, Allocator1>& B) 01799 { 01800 01801 #ifdef SELDON_CHECK_DIMENSIONS 01802 CheckDim(Side, A, B, "Solve(side, alpha, A, B)"); 01803 #endif 01804 01805 cblas_ztrsm(CblasColMajor, Side, CblasUpper, CblasNoTrans, CblasNonUnit, 01806 B.GetM(), B.GetN(), 01807 reinterpret_cast<const void*>(&alpha), 01808 reinterpret_cast<const void*>(A.GetData()), A.GetM(), 01809 reinterpret_cast<void*>(B.GetData()), B.GetM()); 01810 } 01811 01812 01813 /*** ColUpTriang ***/ 01814 01815 01816 template <class Prop0, class Allocator0, 01817 class Prop1, class Allocator1> 01818 void Solve(const SeldonSide& Side, 01819 const float alpha, 01820 const SeldonTranspose& TransA, 01821 const SeldonDiag& DiagA, 01822 const Matrix<float, Prop0, ColUpTriang, Allocator0>& A, 01823 Matrix<float, Prop1, ColMajor, Allocator1>& B) 01824 { 01825 01826 #ifdef SELDON_CHECK_DIMENSIONS 01827 CheckDim(Side, A, B, "Solve(side, alpha, status, diag, A, B)"); 01828 #endif 01829 01830 cblas_strsm(CblasColMajor, Side, CblasUpper, TransA, DiagA, 01831 B.GetM(), B.GetN(), 01832 alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM()); 01833 } 01834 01835 01836 template <class Prop0, class Allocator0, 01837 class Prop1, class Allocator1> 01838 void Solve(const SeldonSide& Side, 01839 const double alpha, 01840 const SeldonTranspose& TransA, 01841 const SeldonDiag& DiagA, 01842 const Matrix<double, Prop0, ColUpTriang, Allocator0>& A, 01843 Matrix<double, Prop1, ColMajor, Allocator1>& B) 01844 { 01845 01846 #ifdef SELDON_CHECK_DIMENSIONS 01847 CheckDim(Side, A, B, "Solve(side, alpha, status, diag, A, B)"); 01848 #endif 01849 01850 cblas_dtrsm(CblasColMajor, Side, CblasUpper, TransA, DiagA, 01851 B.GetM(), B.GetN(), 01852 alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM()); 01853 } 01854 01855 01856 template <class Prop0, class Allocator0, 01857 class Prop1, class Allocator1> 01858 void Solve(const SeldonSide& Side, 01859 const complex<float> alpha, 01860 const SeldonTranspose& TransA, 01861 const SeldonDiag& DiagA, 01862 const Matrix<complex<float>, Prop0, ColUpTriang, Allocator0>& A, 01863 Matrix<complex<float>, Prop1, ColMajor, Allocator1>& B) 01864 { 01865 01866 #ifdef SELDON_CHECK_DIMENSIONS 01867 CheckDim(Side, A, B, "Solve(side, alpha, status, diag, A, B)"); 01868 #endif 01869 01870 cblas_ctrsm(CblasColMajor, Side, CblasUpper, TransA, DiagA, 01871 B.GetM(), B.GetN(), 01872 reinterpret_cast<const void*>(&alpha), 01873 reinterpret_cast<const void*>(A.GetData()), A.GetM(), 01874 reinterpret_cast<void*>(B.GetData()), B.GetM()); 01875 } 01876 01877 01878 template <class Prop0, class Allocator0, 01879 class Prop1, class Allocator1> 01880 void Solve(const SeldonSide& Side, 01881 const complex<double> alpha, 01882 const SeldonTranspose& TransA, 01883 const SeldonDiag& DiagA, 01884 const Matrix<complex<double>, Prop0, ColUpTriang, Allocator0>& A, 01885 Matrix<complex<double>, Prop1, ColMajor, Allocator1>& B) 01886 { 01887 01888 #ifdef SELDON_CHECK_DIMENSIONS 01889 CheckDim(Side, A, B, "Solve(side, alpha, status, diag, A, B)"); 01890 #endif 01891 01892 cblas_ztrsm(CblasColMajor, Side, CblasUpper, TransA, DiagA, 01893 B.GetM(), B.GetN(), 01894 reinterpret_cast<const void*>(&alpha), 01895 reinterpret_cast<const void*>(A.GetData()), A.GetM(), 01896 reinterpret_cast<void*>(B.GetData()), B.GetM()); 01897 } 01898 01899 01900 /*** ColLoTriang, NoTrans and NonUnit ***/ 01901 01902 01903 template <class Prop0, class Allocator0, 01904 class Prop1, class Allocator1> 01905 void Solve(const SeldonSide& Side, 01906 const float alpha, 01907 const Matrix<float, Prop0, ColLoTriang, Allocator0>& A, 01908 Matrix<float, Prop1, ColMajor, Allocator1>& B) 01909 { 01910 01911 #ifdef SELDON_CHECK_DIMENSIONS 01912 CheckDim(Side, A, B, "Solve(side, alpha, A, B)"); 01913 #endif 01914 01915 cblas_strsm(CblasColMajor, Side, CblasLower, CblasNoTrans, CblasNonUnit, 01916 B.GetM(), B.GetN(), 01917 alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM()); 01918 } 01919 01920 01921 template <class Prop0, class Allocator0, 01922 class Prop1, class Allocator1> 01923 void Solve(const SeldonSide& Side, 01924 const double alpha, 01925 const Matrix<double, Prop0, ColLoTriang, Allocator0>& A, 01926 Matrix<double, Prop1, ColMajor, Allocator1>& B) 01927 { 01928 01929 #ifdef SELDON_CHECK_DIMENSIONS 01930 CheckDim(Side, A, B, "Solve(side, alpha, A, B)"); 01931 #endif 01932 01933 cblas_dtrsm(CblasColMajor, Side, CblasLower, CblasNoTrans, CblasNonUnit, 01934 B.GetM(), B.GetN(), 01935 alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM()); 01936 } 01937 01938 01939 template <class Prop0, class Allocator0, 01940 class Prop1, class Allocator1> 01941 void Solve(const SeldonSide& Side, 01942 const complex<float> alpha, 01943 const Matrix<complex<float>, Prop0, ColLoTriang, Allocator0>& A, 01944 Matrix<complex<float>, Prop1, ColMajor, Allocator1>& B) 01945 { 01946 01947 #ifdef SELDON_CHECK_DIMENSIONS 01948 CheckDim(Side, A, B, "Solve(side, alpha, A, B)"); 01949 #endif 01950 01951 cblas_ctrsm(CblasColMajor, Side, CblasLower, CblasNoTrans, CblasNonUnit, 01952 B.GetM(), B.GetN(), 01953 reinterpret_cast<const void*>(&alpha), 01954 reinterpret_cast<const void*>(A.GetData()), A.GetM(), 01955 reinterpret_cast<void*>(B.GetData()), B.GetM()); 01956 } 01957 01958 01959 template <class Prop0, class Allocator0, 01960 class Prop1, class Allocator1> 01961 void Solve(const SeldonSide& Side, 01962 const complex<double> alpha, 01963 const Matrix<complex<double>, Prop0, ColLoTriang, Allocator0>& A, 01964 Matrix<complex<double>, Prop1, ColMajor, Allocator1>& B) 01965 { 01966 01967 #ifdef SELDON_CHECK_DIMENSIONS 01968 CheckDim(Side, A, B, "Solve(side, alpha, A, B)"); 01969 #endif 01970 01971 cblas_ztrsm(CblasColMajor, Side, CblasLower, CblasNoTrans, CblasNonUnit, 01972 B.GetM(), B.GetN(), 01973 reinterpret_cast<const void*>(&alpha), 01974 reinterpret_cast<const void*>(A.GetData()), A.GetM(), 01975 reinterpret_cast<void*>(B.GetData()), B.GetM()); 01976 } 01977 01978 01979 /*** ColLoTriang ***/ 01980 01981 01982 template <class Prop0, class Allocator0, 01983 class Prop1, class Allocator1> 01984 void Solve(const SeldonSide& Side, 01985 const float alpha, 01986 const SeldonTranspose& TransA, 01987 const SeldonDiag& DiagA, 01988 const Matrix<float, Prop0, ColLoTriang, Allocator0>& A, 01989 Matrix<float, Prop1, ColMajor, Allocator1>& B) 01990 { 01991 01992 #ifdef SELDON_CHECK_DIMENSIONS 01993 CheckDim(Side, A, B, "Solve(side, alpha, status, diag, A, B)"); 01994 #endif 01995 01996 cblas_strsm(CblasColMajor, Side, CblasLower, TransA, DiagA, 01997 B.GetM(), B.GetN(), 01998 alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM()); 01999 } 02000 02001 02002 template <class Prop0, class Allocator0, 02003 class Prop1, class Allocator1> 02004 void Solve(const SeldonSide& Side, 02005 const double alpha, 02006 const SeldonTranspose& TransA, 02007 const SeldonDiag& DiagA, 02008 const Matrix<double, Prop0, ColLoTriang, Allocator0>& A, 02009 Matrix<double, Prop1, ColMajor, Allocator1>& B) 02010 { 02011 02012 #ifdef SELDON_CHECK_DIMENSIONS 02013 CheckDim(Side, A, B, "Solve(side, alpha, status, diag, A, B)"); 02014 #endif 02015 02016 cblas_dtrsm(CblasColMajor, Side, CblasLower, TransA, DiagA, 02017 B.GetM(), B.GetN(), 02018 alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM()); 02019 } 02020 02021 02022 template <class Prop0, class Allocator0, 02023 class Prop1, class Allocator1> 02024 void Solve(const SeldonSide& Side, 02025 const complex<float> alpha, 02026 const SeldonTranspose& TransA, 02027 const SeldonDiag& DiagA, 02028 const Matrix<complex<float>, Prop0, ColLoTriang, Allocator0>& A, 02029 Matrix<complex<float>, Prop1, ColMajor, Allocator1>& B) 02030 { 02031 02032 #ifdef SELDON_CHECK_DIMENSIONS 02033 CheckDim(Side, A, B, "Solve(side, alpha, status, diag, A, B)"); 02034 #endif 02035 02036 cblas_ctrsm(CblasColMajor, Side, CblasLower, TransA, DiagA, 02037 B.GetM(), B.GetN(), 02038 reinterpret_cast<const void*>(&alpha), 02039 reinterpret_cast<const void*>(A.GetData()), A.GetM(), 02040 reinterpret_cast<void*>(B.GetData()), B.GetM()); 02041 } 02042 02043 02044 template <class Prop0, class Allocator0, 02045 class Prop1, class Allocator1> 02046 void Solve(const SeldonSide& Side, 02047 const complex<double> alpha, 02048 const SeldonTranspose& TransA, 02049 const SeldonDiag& DiagA, 02050 const Matrix<complex<double>, Prop0, ColLoTriang, Allocator0>& A, 02051 Matrix<complex<double>, Prop1, ColMajor, Allocator1>& B) 02052 { 02053 02054 #ifdef SELDON_CHECK_DIMENSIONS 02055 CheckDim(Side, A, B, "Solve(side, alpha, status, diag, A, B)"); 02056 #endif 02057 02058 cblas_ztrsm(CblasColMajor, Side, CblasLower, TransA, DiagA, 02059 B.GetM(), B.GetN(), 02060 reinterpret_cast<const void*>(&alpha), 02061 reinterpret_cast<const void*>(A.GetData()), A.GetM(), 02062 reinterpret_cast<void*>(B.GetData()), B.GetM()); 02063 } 02064 02065 02066 /*** RowUpTriang, NoTrans and NonUnit ***/ 02067 02068 02069 template <class Prop0, class Allocator0, 02070 class Prop1, class Allocator1> 02071 void Solve(const SeldonSide& Side, 02072 const float alpha, 02073 const Matrix<float, Prop0, RowUpTriang, Allocator0>& A, 02074 Matrix<float, Prop1, RowMajor, Allocator1>& B) 02075 { 02076 02077 #ifdef SELDON_CHECK_DIMENSIONS 02078 CheckDim(Side, A, B, "Solve(side, alpha, A, B)"); 02079 #endif 02080 02081 cblas_strsm(CblasRowMajor, Side, CblasUpper, CblasNoTrans, CblasNonUnit, 02082 B.GetM(), B.GetN(), 02083 alpha, A.GetData(), A.GetN(), B.GetData(), B.GetN()); 02084 } 02085 02086 02087 template <class Prop0, class Allocator0, 02088 class Prop1, class Allocator1> 02089 void Solve(const SeldonSide& Side, 02090 const double alpha, 02091 const Matrix<double, Prop0, RowUpTriang, Allocator0>& A, 02092 Matrix<double, Prop1, RowMajor, Allocator1>& B) 02093 { 02094 02095 #ifdef SELDON_CHECK_DIMENSIONS 02096 CheckDim(Side, A, B, "Solve(side, alpha, A, B)"); 02097 #endif 02098 02099 cblas_dtrsm(CblasRowMajor, Side, CblasUpper, CblasNoTrans, CblasNonUnit, 02100 B.GetM(), B.GetN(), 02101 alpha, A.GetData(), A.GetN(), B.GetData(), B.GetN()); 02102 } 02103 02104 02105 template <class Prop0, class Allocator0, 02106 class Prop1, class Allocator1> 02107 void Solve(const SeldonSide& Side, 02108 const complex<float> alpha, 02109 const Matrix<complex<float>, Prop0, RowUpTriang, Allocator0>& A, 02110 Matrix<complex<float>, Prop1, RowMajor, Allocator1>& B) 02111 { 02112 02113 #ifdef SELDON_CHECK_DIMENSIONS 02114 CheckDim(Side, A, B, "Solve(side, alpha, A, B)"); 02115 #endif 02116 02117 cblas_ctrsm(CblasRowMajor, Side, CblasUpper, CblasNoTrans, CblasNonUnit, 02118 B.GetM(), B.GetN(), 02119 reinterpret_cast<const void*>(&alpha), 02120 reinterpret_cast<const void*>(A.GetData()), A.GetN(), 02121 reinterpret_cast<void*>(B.GetData()), B.GetN()); 02122 } 02123 02124 02125 template <class Prop0, class Allocator0, 02126 class Prop1, class Allocator1> 02127 void Solve(const SeldonSide& Side, 02128 const complex<double> alpha, 02129 const Matrix<complex<double>, Prop0, RowUpTriang, Allocator0>& A, 02130 Matrix<complex<double>, Prop1, RowMajor, Allocator1>& B) 02131 { 02132 02133 #ifdef SELDON_CHECK_DIMENSIONS 02134 CheckDim(Side, A, B, "Solve(side, alpha, A, B)"); 02135 #endif 02136 02137 cblas_ztrsm(CblasRowMajor, Side, CblasUpper, CblasNoTrans, CblasNonUnit, 02138 B.GetM(), B.GetN(), 02139 reinterpret_cast<const void*>(&alpha), 02140 reinterpret_cast<const void*>(A.GetData()), A.GetN(), 02141 reinterpret_cast<void*>(B.GetData()), B.GetN()); 02142 } 02143 02144 02145 /*** RowUpTriang ***/ 02146 02147 02148 template <class Prop0, class Allocator0, 02149 class Prop1, class Allocator1> 02150 void Solve(const SeldonSide& Side, 02151 const float alpha, 02152 const SeldonTranspose& TransA, 02153 const SeldonDiag& DiagA, 02154 const Matrix<float, Prop0, RowUpTriang, Allocator0>& A, 02155 Matrix<float, Prop1, RowMajor, Allocator1>& B) 02156 { 02157 02158 #ifdef SELDON_CHECK_DIMENSIONS 02159 CheckDim(Side, A, B, "Solve(side, alpha, status, diag, A, B)"); 02160 #endif 02161 02162 cblas_strsm(CblasRowMajor, Side, CblasUpper, TransA, DiagA, 02163 B.GetM(), B.GetN(), 02164 alpha, A.GetData(), A.GetN(), B.GetData(), B.GetN()); 02165 } 02166 02167 02168 template <class Prop0, class Allocator0, 02169 class Prop1, class Allocator1> 02170 void Solve(const SeldonSide& Side, 02171 const double alpha, 02172 const SeldonTranspose& TransA, 02173 const SeldonDiag& DiagA, 02174 const Matrix<double, Prop0, RowUpTriang, Allocator0>& A, 02175 Matrix<double, Prop1, RowMajor, Allocator1>& B) 02176 { 02177 02178 #ifdef SELDON_CHECK_DIMENSIONS 02179 CheckDim(Side, A, B, "Solve(side, alpha, status, diag, A, B)"); 02180 #endif 02181 02182 cblas_dtrsm(CblasRowMajor, Side, CblasUpper, TransA, DiagA, 02183 B.GetM(), B.GetN(), 02184 alpha, A.GetData(), A.GetN(), B.GetData(), B.GetN()); 02185 } 02186 02187 02188 template <class Prop0, class Allocator0, 02189 class Prop1, class Allocator1> 02190 void Solve(const SeldonSide& Side, 02191 const complex<float> alpha, 02192 const SeldonTranspose& TransA, 02193 const SeldonDiag& DiagA, 02194 const Matrix<complex<float>, Prop0, RowUpTriang, Allocator0>& A, 02195 Matrix<complex<float>, Prop1, RowMajor, Allocator1>& B) 02196 { 02197 02198 #ifdef SELDON_CHECK_DIMENSIONS 02199 CheckDim(Side, A, B, "Solve(side, alpha, status, diag, A, B)"); 02200 #endif 02201 02202 cblas_ctrsm(CblasRowMajor, Side, CblasUpper, TransA, DiagA, 02203 B.GetM(), B.GetN(), 02204 reinterpret_cast<const void*>(&alpha), 02205 reinterpret_cast<const void*>(A.GetData()), A.GetN(), 02206 reinterpret_cast<void*>(B.GetData()), B.GetN()); 02207 } 02208 02209 02210 template <class Prop0, class Allocator0, 02211 class Prop1, class Allocator1> 02212 void Solve(const SeldonSide& Side, 02213 const complex<double> alpha, 02214 const SeldonTranspose& TransA, 02215 const SeldonDiag& DiagA, 02216 const Matrix<complex<double>, Prop0, RowUpTriang, Allocator0>& A, 02217 Matrix<complex<double>, Prop1, RowMajor, Allocator1>& B) 02218 { 02219 02220 #ifdef SELDON_CHECK_DIMENSIONS 02221 CheckDim(Side, A, B, "Solve(side, alpha, status, diag, A, B)"); 02222 #endif 02223 02224 cblas_ztrsm(CblasRowMajor, Side, CblasUpper, TransA, DiagA, 02225 B.GetM(), B.GetN(), 02226 reinterpret_cast<const void*>(&alpha), 02227 reinterpret_cast<const void*>(A.GetData()), A.GetN(), 02228 reinterpret_cast<void*>(B.GetData()), B.GetN()); 02229 } 02230 02231 02232 /*** RowLoTriang, NoTrans and NonUnit ***/ 02233 02234 02235 template <class Prop0, class Allocator0, 02236 class Prop1, class Allocator1> 02237 void Solve(const SeldonSide& Side, 02238 const float alpha, 02239 const Matrix<float, Prop0, RowLoTriang, Allocator0>& A, 02240 Matrix<float, Prop1, RowMajor, Allocator1>& B) 02241 { 02242 02243 #ifdef SELDON_CHECK_DIMENSIONS 02244 CheckDim(Side, A, B, "Solve(side, alpha, A, B)"); 02245 #endif 02246 02247 cblas_strsm(CblasRowMajor, Side, CblasLower, CblasNoTrans, CblasNonUnit, 02248 B.GetM(), B.GetN(), 02249 alpha, A.GetData(), A.GetN(), B.GetData(), B.GetN()); 02250 } 02251 02252 02253 template <class Prop0, class Allocator0, 02254 class Prop1, class Allocator1> 02255 void Solve(const SeldonSide& Side, 02256 const double alpha, 02257 const Matrix<double, Prop0, RowLoTriang, Allocator0>& A, 02258 Matrix<double, Prop1, RowMajor, Allocator1>& B) 02259 { 02260 02261 #ifdef SELDON_CHECK_DIMENSIONS 02262 CheckDim(Side, A, B, "Solve(side, alpha, A, B)"); 02263 #endif 02264 02265 cblas_dtrsm(CblasRowMajor, Side, CblasLower, CblasNoTrans, CblasNonUnit, 02266 B.GetM(), B.GetN(), 02267 alpha, A.GetData(), A.GetN(), B.GetData(), B.GetN()); 02268 } 02269 02270 02271 template <class Prop0, class Allocator0, 02272 class Prop1, class Allocator1> 02273 void Solve(const SeldonSide& Side, 02274 const complex<float> alpha, 02275 const Matrix<complex<float>, Prop0, RowLoTriang, Allocator0>& A, 02276 Matrix<complex<float>, Prop1, RowMajor, Allocator1>& B) 02277 { 02278 02279 #ifdef SELDON_CHECK_DIMENSIONS 02280 CheckDim(Side, A, B, "Solve(side, alpha, A, B)"); 02281 #endif 02282 02283 cblas_ctrsm(CblasRowMajor, Side, CblasLower, CblasNoTrans, CblasNonUnit, 02284 B.GetM(), B.GetN(), 02285 reinterpret_cast<const void*>(&alpha), 02286 reinterpret_cast<const void*>(A.GetData()), A.GetN(), 02287 reinterpret_cast<void*>(B.GetData()), B.GetN()); 02288 } 02289 02290 02291 template <class Prop0, class Allocator0, 02292 class Prop1, class Allocator1> 02293 void Solve(const SeldonSide& Side, 02294 const complex<double> alpha, 02295 const Matrix<complex<double>, Prop0, RowLoTriang, Allocator0>& A, 02296 Matrix<complex<double>, Prop1, RowMajor, Allocator1>& B) 02297 { 02298 02299 #ifdef SELDON_CHECK_DIMENSIONS 02300 CheckDim(Side, A, B, "Solve(side, alpha, A, B)"); 02301 #endif 02302 02303 cblas_ztrsm(CblasRowMajor, Side, CblasLower, CblasNoTrans, CblasNonUnit, 02304 B.GetM(), B.GetN(), 02305 reinterpret_cast<const void*>(&alpha), 02306 reinterpret_cast<const void*>(A.GetData()), A.GetN(), 02307 reinterpret_cast<void*>(B.GetData()), B.GetN()); 02308 } 02309 02310 02311 /*** RowLoTriang ***/ 02312 02313 02314 template <class Prop0, class Allocator0, 02315 class Prop1, class Allocator1> 02316 void Solve(const SeldonSide& Side, 02317 const float alpha, 02318 const SeldonTranspose& TransA, 02319 const SeldonDiag& DiagA, 02320 const Matrix<float, Prop0, RowLoTriang, Allocator0>& A, 02321 Matrix<float, Prop1, RowMajor, Allocator1>& B) 02322 { 02323 02324 #ifdef SELDON_CHECK_DIMENSIONS 02325 CheckDim(Side, A, B, "Solve(side, alpha, status, diag, A, B)"); 02326 #endif 02327 02328 cblas_strsm(CblasRowMajor, Side, CblasLower, TransA, DiagA, 02329 B.GetM(), B.GetN(), 02330 alpha, A.GetData(), A.GetN(), B.GetData(), B.GetN()); 02331 } 02332 02333 02334 template <class Prop0, class Allocator0, 02335 class Prop1, class Allocator1> 02336 void Solve(const SeldonSide& Side, 02337 const double alpha, 02338 const SeldonTranspose& TransA, 02339 const SeldonDiag& DiagA, 02340 const Matrix<double, Prop0, RowLoTriang, Allocator0>& A, 02341 Matrix<double, Prop1, RowMajor, Allocator1>& B) 02342 { 02343 02344 #ifdef SELDON_CHECK_DIMENSIONS 02345 CheckDim(Side, A, B, "Solve(side, alpha, status, diag, A, B)"); 02346 #endif 02347 02348 cblas_dtrsm(CblasRowMajor, Side, CblasLower, TransA, DiagA, 02349 B.GetM(), B.GetN(), 02350 alpha, A.GetData(), A.GetN(), B.GetData(), B.GetN()); 02351 } 02352 02353 02354 template <class Prop0, class Allocator0, 02355 class Prop1, class Allocator1> 02356 void Solve(const SeldonSide& Side, 02357 const complex<float> alpha, 02358 const SeldonTranspose& TransA, 02359 const SeldonDiag& DiagA, 02360 const Matrix<complex<float>, Prop0, RowLoTriang, Allocator0>& A, 02361 Matrix<complex<float>, Prop1, RowMajor, Allocator1>& B) 02362 { 02363 02364 #ifdef SELDON_CHECK_DIMENSIONS 02365 CheckDim(Side, A, B, "Solve(side, alpha, status, diag, A, B)"); 02366 #endif 02367 02368 cblas_ctrsm(CblasRowMajor, Side, CblasLower, TransA, DiagA, 02369 B.GetM(), B.GetN(), 02370 reinterpret_cast<const void*>(&alpha), 02371 reinterpret_cast<const void*>(A.GetData()), A.GetN(), 02372 reinterpret_cast<void*>(B.GetData()), B.GetN()); 02373 } 02374 02375 02376 template <class Prop0, class Allocator0, 02377 class Prop1, class Allocator1> 02378 void Solve(const SeldonSide& Side, 02379 const complex<double> alpha, 02380 const SeldonTranspose& TransA, 02381 const SeldonDiag& DiagA, 02382 const Matrix<complex<double>, Prop0, RowLoTriang, Allocator0>& A, 02383 Matrix<complex<double>, Prop1, RowMajor, Allocator1>& B) 02384 { 02385 02386 #ifdef SELDON_CHECK_DIMENSIONS 02387 CheckDim(Side, A, B, "Solve(side, alpha, status, diag, A, B)"); 02388 #endif 02389 02390 cblas_ztrsm(CblasRowMajor, Side, CblasLower, TransA, DiagA, 02391 B.GetM(), B.GetN(), 02392 reinterpret_cast<const void*>(&alpha), 02393 reinterpret_cast<const void*>(A.GetData()), A.GetN(), 02394 reinterpret_cast<void*>(B.GetData()), B.GetN()); 02395 } 02396 02397 02398 // Solve // 02400 02401 02402 } // namespace Seldon. 02403 02404 #define SELDON_FILE_BLAS_3_CXX 02405 #endif