blas_3.cxx

来自「Multivac 的Level set包」· CXX 代码 · 共 1,880 行 · 第 1/5 页

CXX
1,880 行
字号
		reinterpret_cast<const void*>(&beta),		reinterpret_cast<void*>(C.GetData()), C.GetM());  }  /*** RowHerm and Upper ***/  template <class Prop0, class Allocator0,	    class Prop1, class Allocator1,	    class Prop2, class Allocator2>  void MltAdd(const enum CBLAS_SIDE Side,	      const complex<float> alpha,	      const Matrix<complex<float>, Prop0, RowHerm, Allocator0>& A,	      const Matrix<complex<float>, Prop1, RowMajor, Allocator1>& B,	      const complex<float> beta,	      const Matrix<complex<float>, Prop2, RowMajor, Allocator2>& C)  {    cblas_chemm(CblasRowMajor, Side, CblasUpper,		C.GetM(), C.GetN(),		reinterpret_cast<const void*>(&alpha),		reinterpret_cast<const void*>(A.GetData()), A.GetM(),		reinterpret_cast<const void*>(B.GetData()), B.GetN(),		reinterpret_cast<const void*>(&beta),		reinterpret_cast<void*>(C.GetData()), C.GetN());  }  template <class Prop0, class Allocator0,	    class Prop1, class Allocator1,	    class Prop2, class Allocator2>  void MltAdd(const enum CBLAS_SIDE Side,	      const complex<double> alpha,	      const Matrix<complex<double>, Prop0, RowHerm, Allocator0>& A,	      const Matrix<complex<double>, Prop1, RowMajor, Allocator1>& B,	      const complex<double> beta,	      const Matrix<complex<double>, Prop2, RowMajor, Allocator2>& C)  {    cblas_zhemm(CblasRowMajor, Side, CblasUpper,		C.GetM(), C.GetN(),		reinterpret_cast<const void*>(&alpha),		reinterpret_cast<const void*>(A.GetData()), A.GetM(),		reinterpret_cast<const void*>(B.GetData()), B.GetN(),		reinterpret_cast<const void*>(&beta),		reinterpret_cast<void*>(C.GetData()), C.GetN());  }  /*** RowHerm and UpLo ***/  template <class Prop0, class Allocator0,	    class Prop1, class Allocator1,	    class Prop2, class Allocator2>  void MltAdd(const enum CBLAS_SIDE Side,	      const complex<float> alpha,	      const enum CBLAS_UPLO Uplo,	      const Matrix<complex<float>, Prop0, RowHerm, Allocator0>& A,	      const Matrix<complex<float>, Prop1, RowMajor, Allocator1>& B,	      const complex<float> beta,	      const Matrix<complex<float>, Prop2, RowMajor, Allocator2>& C)  {    cblas_chemm(CblasRowMajor, Side, Uplo,		C.GetM(), C.GetN(),		reinterpret_cast<const void*>(&alpha),		reinterpret_cast<const void*>(A.GetData()), A.GetM(),		reinterpret_cast<const void*>(B.GetData()), B.GetN(),		reinterpret_cast<const void*>(&beta),		reinterpret_cast<void*>(C.GetData()), C.GetN());  }  template <class Prop0, class Allocator0,	    class Prop1, class Allocator1,	    class Prop2, class Allocator2>  void MltAdd(const enum CBLAS_SIDE Side,	      const complex<double> alpha,	      const enum CBLAS_UPLO Uplo,	      const Matrix<complex<double>, Prop0, RowHerm, Allocator0>& A,	      const Matrix<complex<double>, Prop1, RowMajor, Allocator1>& B,	      const complex<double> beta,	      const Matrix<complex<double>, Prop2, RowMajor, Allocator2>& C)  {    cblas_zhemm(CblasRowMajor, Side, Uplo,		C.GetM(), C.GetN(),		reinterpret_cast<const void*>(&alpha),		reinterpret_cast<const void*>(A.GetData()), A.GetM(),		reinterpret_cast<const void*>(B.GetData()), B.GetN(),		reinterpret_cast<const void*>(&beta),		reinterpret_cast<void*>(C.GetData()), C.GetN());  }  // MltAdd //  ////////////  /////////  // Mlt //  /*** ColUpTriang, NoTrans and NonUnit ***/  template <class Prop0, class Allocator0,	    class Prop1, class Allocator1>  void Mlt(const enum CBLAS_SIDE Side,	   const float alpha,	   const Matrix<float, Prop0, ColUpTriang, Allocator0>& A,	   Matrix<float, Prop1, ColMajor, Allocator1>& B)  {    cblas_strmm(CblasColMajor, Side, CblasUpper, CblasNoTrans, CblasNonUnit,		B.GetM(), B.GetN(),		alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM());  }  template <class Prop0, class Allocator0,	    class Prop1, class Allocator1>  void Mlt(const enum CBLAS_SIDE Side,	   const double alpha,	   const Matrix<double, Prop0, ColUpTriang, Allocator0>& A,	   Matrix<double, Prop1, ColMajor, Allocator1>& B)  {    cblas_dtrmm(CblasColMajor, Side, CblasUpper, CblasNoTrans, CblasNonUnit,		B.GetM(), B.GetN(),		alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM());  }  template <class Prop0, class Allocator0,	    class Prop1, class Allocator1>  void Mlt(const enum CBLAS_SIDE Side,	   const complex<float> alpha,	   const Matrix<complex<float>, Prop0, ColUpTriang, Allocator0>& A,	   Matrix<complex<float>, Prop1, ColMajor, Allocator1>& B)  {    cblas_ctrmm(CblasColMajor, Side, CblasUpper, CblasNoTrans, CblasNonUnit,		B.GetM(), B.GetN(),		reinterpret_cast<const void*>(&alpha),		reinterpret_cast<const void*>(A.GetData()), A.GetM(),		reinterpret_cast<void*>(B.GetData()), B.GetM());  }  template <class Prop0, class Allocator0,	    class Prop1, class Allocator1>  void Mlt(const enum CBLAS_SIDE Side,	   const complex<double> alpha,	   const Matrix<complex<double>, Prop0, ColUpTriang, Allocator0>& A,	   Matrix<complex<double>, Prop1, ColMajor, Allocator1>& B)  {    cblas_ztrmm(CblasColMajor, Side, CblasUpper, CblasNoTrans, CblasNonUnit,		B.GetM(), B.GetN(),		reinterpret_cast<const void*>(&alpha),		reinterpret_cast<const void*>(A.GetData()), A.GetM(),		reinterpret_cast<void*>(B.GetData()), B.GetM());  }  /*** ColUpTriang ***/  template <class Prop0, class Allocator0,	    class Prop1, class Allocator1>  void Mlt(const enum CBLAS_SIDE Side,	   const float alpha,	   const enum CBLAS_TRANSPOSE TransA,	   const enum CBLAS_DIAG DiagA,	   const Matrix<float, Prop0, ColUpTriang, Allocator0>& A,	   Matrix<float, Prop1, ColMajor, Allocator1>& B)  {    cblas_strmm(CblasColMajor, Side, CblasUpper, TransA, DiagA,		B.GetM(), B.GetN(),		alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM());  }  template <class Prop0, class Allocator0,	    class Prop1, class Allocator1>  void Mlt(const enum CBLAS_SIDE Side,	   const double alpha,	   const enum CBLAS_TRANSPOSE TransA,	   const enum CBLAS_DIAG DiagA,	   const Matrix<double, Prop0, ColUpTriang, Allocator0>& A,	   Matrix<double, Prop1, ColMajor, Allocator1>& B)  {    cblas_dtrmm(CblasColMajor, Side, CblasUpper, TransA, DiagA,		B.GetM(), B.GetN(),		alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM());  }  template <class Prop0, class Allocator0,	    class Prop1, class Allocator1>  void Mlt(const enum CBLAS_SIDE Side,	   const complex<float> alpha,	   const enum CBLAS_TRANSPOSE TransA,	   const enum CBLAS_DIAG DiagA,	   const Matrix<complex<float>, Prop0, ColUpTriang, Allocator0>& A,	   Matrix<complex<float>, Prop1, ColMajor, Allocator1>& B)  {    cblas_ctrmm(CblasColMajor, Side, CblasUpper, TransA, DiagA,		B.GetM(), B.GetN(),		reinterpret_cast<const void*>(&alpha),		reinterpret_cast<const void*>(A.GetData()), A.GetM(),		reinterpret_cast<void*>(B.GetData()), B.GetM());  }  template <class Prop0, class Allocator0,	    class Prop1, class Allocator1>  void Mlt(const enum CBLAS_SIDE Side,	   const complex<double> alpha,	   const enum CBLAS_TRANSPOSE TransA,	   const enum CBLAS_DIAG DiagA,	   const Matrix<complex<double>, Prop0, ColUpTriang, Allocator0>& A,	   Matrix<complex<double>, Prop1, ColMajor, Allocator1>& B)  {    cblas_ztrmm(CblasColMajor, Side, CblasUpper, TransA, DiagA,		B.GetM(), B.GetN(),		reinterpret_cast<const void*>(&alpha),		reinterpret_cast<const void*>(A.GetData()), A.GetM(),		reinterpret_cast<void*>(B.GetData()), B.GetM());  }  /*** ColLoTriang, NoTrans and NonUnit ***/  template <class Prop0, class Allocator0,	    class Prop1, class Allocator1>  void Mlt(const enum CBLAS_SIDE Side,	   const float alpha,	   const Matrix<float, Prop0, ColLoTriang, Allocator0>& A,	   Matrix<float, Prop1, ColMajor, Allocator1>& B)  {    cblas_strmm(CblasColMajor, Side, CblasLower, CblasNoTrans, CblasNonUnit,		B.GetM(), B.GetN(),		alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM());  }  template <class Prop0, class Allocator0,	    class Prop1, class Allocator1>  void Mlt(const enum CBLAS_SIDE Side,	   const double alpha,	   const Matrix<double, Prop0, ColLoTriang, Allocator0>& A,	   Matrix<double, Prop1, ColMajor, Allocator1>& B)  {    cblas_dtrmm(CblasColMajor, Side, CblasLower, CblasNoTrans, CblasNonUnit,		B.GetM(), B.GetN(),		alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM());  }  template <class Prop0, class Allocator0,	    class Prop1, class Allocator1>  void Mlt(const enum CBLAS_SIDE Side,	   const complex<float> alpha,	   const Matrix<complex<float>, Prop0, ColLoTriang, Allocator0>& A,	   Matrix<complex<float>, Prop1, ColMajor, Allocator1>& B)  {    cblas_ctrmm(CblasColMajor, Side, CblasLower, CblasNoTrans, CblasNonUnit,		B.GetM(), B.GetN(),		reinterpret_cast<const void*>(&alpha),		reinterpret_cast<const void*>(A.GetData()), A.GetM(),		reinterpret_cast<void*>(B.GetData()), B.GetM());  }  template <class Prop0, class Allocator0,	    class Prop1, class Allocator1>  void Mlt(const enum CBLAS_SIDE Side,	   const complex<double> alpha,	   const Matrix<complex<double>, Prop0, ColLoTriang, Allocator0>& A,	   Matrix<complex<double>, Prop1, ColMajor, Allocator1>& B)  {    cblas_ztrmm(CblasColMajor, Side, CblasLower, CblasNoTrans, CblasNonUnit,		B.GetM(), B.GetN(),		reinterpret_cast<const void*>(&alpha),		reinterpret_cast<const void*>(A.GetData()), A.GetM(),		reinterpret_cast<void*>(B.GetData()), B.GetM());  }  /*** ColLoTriang ***/  template <class Prop0, class Allocator0,	    class Prop1, class Allocator1>  void Mlt(const enum CBLAS_SIDE Side,	   const float alpha,	   const enum CBLAS_TRANSPOSE TransA,	   const enum CBLAS_DIAG DiagA,	   const Matrix<float, Prop0, ColLoTriang, Allocator0>& A,	   Matrix<float, Prop1, ColMajor, Allocator1>& B)  {    cblas_strmm(CblasColMajor, Side, CblasLower, TransA, DiagA,		B.GetM(), B.GetN(),		alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM());  }  template <class Prop0, class Allocator0,	    class Prop1, class Allocator1>  void Mlt(const enum CBLAS_SIDE Side,	   const double alpha,	   const enum CBLAS_TRANSPOSE TransA,	   const enum CBLAS_DIAG DiagA,	   const Matrix<double, Prop0, ColLoTriang, Allocator0>& A,	   Matrix<double, Prop1, ColMajor, Allocator1>& B)  {    cblas_dtrmm(CblasColMajor, Side, CblasLower, TransA, DiagA,		B.GetM(), B.GetN(),		alpha, A.GetData(), A.GetM(), B.GetData(), B.GetM());  }  template <class Prop0, class Allocator0,	    class Prop1, class Allocator1>  void Mlt(const enum CBLAS_SIDE Side,	   const complex<float> alpha,	   const enum CBLAS_TRANSPOSE TransA,	   const enum CBLAS_DIAG DiagA,	   const Matrix<complex<float>, Prop0, ColLoTriang, Allocator0>& A,	   Matrix<complex<float>, Prop1, ColMajor, Allocator1>& B)  {    cblas_ctrmm(CblasColMajor, Side, CblasLower, TransA, DiagA,		B.GetM(), B.GetN(),		reinterpret_cast<const void*>(&alpha),		reinterpret_cast<const void*>(A.GetData()), A.GetM(),		reinterpret_cast<void*>(B.GetData()), B.GetM());  }  template <class Prop0, class Allocator0,	    class Prop1, class Allocator1>  void Mlt(const enum CBLAS_SIDE Side,	   const complex<double> alpha,	   const enum CBLAS_TRANSPOSE TransA,	   const enum CBLAS_DIAG DiagA,	   const Matrix<complex<double>, Prop0, ColLoTriang, Allocator0>& A,	   Matrix<complex<double>, Prop1, ColMajor, Allocator1>& B)  {    cblas_ztrmm(CblasColMajor, Side, CblasLower, TransA, DiagA,		B.GetM(), B.GetN(),		reinterpret_cast<const void*>(&alpha),		reinterpret_cast<const void*>(A.GetData()), A.GetM(),		reinterpret_cast<void*>(B.GetData()), B.GetM());  }  /*** RowUpTriang, NoTrans and NonUnit ***/  template <class Prop0, class Allocator0,	    class Prop1, class Allocator1>  void Mlt(const enum CBLAS_SIDE Side,	   const float alpha,	   const Matrix<float, Prop0, RowUpTriang, Allocator0>& A,	   Matrix<float, Prop1, RowMajor, Allocator1>& B)  {    cblas_strmm(CblasRowMajor, Side, CblasUpper, CblasNoTrans, CblasNonUnit,		B.GetM(), B.GetN(),		alpha, A.GetData(), A.GetN(), B.GetData(), B.GetN());  }  template <class Prop0, class Allocator0,	    class Prop1, class Allocator1>  void Mlt(const enum CBLAS_SIDE Side,	   const double alpha,	   const Matrix<double, Prop0, RowUpTriang, Allocator0>& A,	   Matrix<double, Prop1, RowMajor, Allocator1>& B)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?