MCPcopy Create free account
hub / github.com/NGSolve/ngsolve / CudaMultMatMat2

Function CudaMultMatMat2

ngscuda/cuda_ngbla.hpp:222–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220
221 template <ORDERING ORDA, ORDERING ORDB>
222 void CudaMultMatMat2 (SliceMatrix<Dev<double>, ORDA> a, SliceMatrix<Dev<double>,ORDB> b,
223 SliceMatrix<Dev<double>, ORDERING::ColMajor> c,
224 double alpha, double beta)
225 {
226 static Timer t("cublasDgemm");
227 CudaRegionTimer rt(t);
228 cublasSetStream(ngla::Get_CuBlas_Handle(), ngs_cuda_stream);
229 cublasStatus_t stat =
230 cublasDgemm(ngla::Get_CuBlas_Handle(),
231 ORDA==ORDERING::RowMajor ? CUBLAS_OP_T : CUBLAS_OP_N,
232 ORDB==ORDERING::RowMajor ? CUBLAS_OP_T : CUBLAS_OP_N,
233 c.Height(), c.Width(), a.Width(),
234 &alpha, (double*)a.Data(), a.Dist(), (double*)b.Data(), b.Dist(),
235 &beta, (double*)c.Data(), c.Dist());
236 }
237
238 template <ORDERING ORDA, ORDERING ORDB>
239 void CudaMultMatMat2 (SliceMatrix<Dev<double>, ORDA> a, SliceMatrix<Dev<double>,ORDB> b,

Callers 1

MultMatMatFunction · 0.85

Calls 6

Get_CuBlas_HandleFunction · 0.85
TransFunction · 0.50
HeightMethod · 0.45
WidthMethod · 0.45
DataMethod · 0.45
DistMethod · 0.45

Tested by

no test coverage detected