MCPcopy Create free account
hub / github.com/ComputationalRobotics/XM-code / DnMatDnMatBatch

Function DnMatDnMatBatch

XM/include/Dense/matmul.h:92–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90// op() is either identity or transpose
91template <typename T>
92inline void DnMatDnMatBatch(
93 DeviceBlasHandle& cublas_H,
94 DeviceDnTen<T>& matC, const DeviceDnTen<T>& matA, const DeviceDnTen<T>& matB,
95 const size_s m, const size_s k, const size_s n, const size_s num_mat,
96 const cublasOperation_t transa = CUBLAS_OP_N, const cublasOperation_t transb = CUBLAS_OP_N,
97 const double alpha = 1.0, const double beta = 0.0
98) {
99 const size_l strideA = m*k;
100 const size_l strideB = k*n;
101 const size_l strideC = m*n;
102 CHECK_CUBLAS(cublasDgemmStridedBatched(
103 cublas_H.cublas_handle, transa, transb,
104 m,n,k,
105 &alpha, matA.vals, matA.dimensions[0], strideA, matB.vals, matB.dimensions[0], strideB,
106 &beta, matC.vals, matC.dimensions[0], strideC,
107 num_mat
108 ) );
109 return;
110}
111
112#endif

Callers 1

XMtrustregionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected