44 #ifndef TPETRA_DETAILS_GEMM_HPP 45 #define TPETRA_DETAILS_GEMM_HPP 64 #include <type_traits> 72 template<
class ViewType1,
75 class CoefficientType,
77 const bool canUseBlasLibrary =
78 Lib::GemmCanUseLib<ViewType1, ViewType2, ViewType3, CoefficientType, IndexType>::value,
79 const bool canUseCublas =
80 Cublas::GemmCanUseCublas<ViewType1, ViewType2, ViewType3, CoefficientType, IndexType>::value,
81 const bool canUseMkl =
82 Mkl::GemmCanUseMkl<ViewType1, ViewType2, ViewType3, CoefficientType, IndexType>::value>
85 gemm (
const char transA,
87 const CoefficientType& alpha,
90 const CoefficientType& beta,
93 ::Tpetra::Details::Blas::Default::gemm (transA, transB, alpha, A, B, beta, C);
98 template<
class ViewType1,
101 class CoefficientType,
103 struct Gemm<ViewType1, ViewType2, ViewType3, CoefficientType, IndexType,
106 gemm (
const char transA,
108 const CoefficientType& alpha,
111 const CoefficientType& beta,
114 ::Tpetra::Details::Blas::Cublas::gemm (transA, transB, alpha, A, B, beta, C);
119 template<
class ViewType1,
122 class CoefficientType,
124 struct Gemm<ViewType1, ViewType2, ViewType3, CoefficientType, IndexType,
127 gemm (
const char transA,
129 const CoefficientType& alpha,
132 const CoefficientType& beta,
135 ::Tpetra::Details::Blas::Mkl::gemm (transA, transB, alpha, A, B, beta, C);
140 template<
class ViewType1,
143 class CoefficientType,
145 struct Gemm<ViewType1, ViewType2, ViewType3, CoefficientType, IndexType,
146 true, false, false> {
148 gemm (
const char transA,
150 const CoefficientType& alpha,
153 const CoefficientType& beta,
156 ::Tpetra::Details::Blas::Lib::gemm (transA, transB, alpha, A, B, beta, C);
174 template<
class ViewType1,
177 class CoefficientType,
178 class IndexType =
int>
180 gemm (
const char transA,
182 const CoefficientType& alpha,
185 const CoefficientType& beta,
188 typedef Impl::Gemm<ViewType1, ViewType2, ViewType3,
189 CoefficientType, IndexType> impl_type;
190 impl_type::gemm (transA, transB, alpha, A, B, beta, C);
197 #endif // TPETRA_DETAILS_GEMM_HPP Namespace Tpetra contains the class and methods constituting the Tpetra library.
Type traits for Tpetra's BLAS wrappers; an implementation detail of Tpetra::MultiVector.
Wrappers for the BLAS library's implementation of _GEMM; implementation detail of Tpetra::MultiVector...
Implementation details of Tpetra.
Implementation detail of Tpetra::MultiVector.
Default implementation of local (but process-global) GEMM (dense matrix-matrix multiply), for Tpetra::MultiVector.
Implementation of ::Tpetra::Details::Blas::gemm.
Implementation detail of Tpetra::MultiVector.