36 template <
typename scalar_t>
38 CBLAS_TRANSPOSE trans_A,
39 CBLAS_TRANSPOSE trans_B,
44 const scalar_t *A_data,
46 const scalar_t *B_data,
56 CBLAS_TRANSPOSE trans_A,
57 CBLAS_TRANSPOSE trans_B,
69 cblas_sgemm(layout, trans_A, trans_B, m, n, k, alpha, A_data, lda, B_data,
70 ldb, beta, C_data, ldc);
75 CBLAS_TRANSPOSE trans_A,
76 CBLAS_TRANSPOSE trans_B,
88 cblas_dgemm(layout, trans_A, trans_B, m, n, k, alpha, A_data, lda, B_data,
89 ldb, beta, C_data, ldc);
92 #ifdef BUILD_CUDA_MODULE 93 template <
typename scalar_t>
94 inline cublasStatus_t gemm_cuda(cublasHandle_t handle,
95 cublasOperation_t transa,
96 cublasOperation_t transb,
100 const scalar_t *alpha,
101 const scalar_t *A_data,
103 const scalar_t *B_data,
105 const scalar_t *beta,
109 return CUBLAS_STATUS_NOT_SUPPORTED;
112 template <
typename scalar_t>
113 inline cublasStatus_t trsm_cuda(cublasHandle_t handle,
114 cublasSideMode_t side,
115 cublasFillMode_t uplo,
116 cublasOperation_t trans,
117 cublasDiagType_t diag,
120 const scalar_t *alpha,
126 return CUBLAS_STATUS_NOT_SUPPORTED;
130 inline cublasStatus_t gemm_cuda<float>(cublasHandle_t handle,
131 cublasOperation_t transa,
132 cublasOperation_t transb,
144 return cublasSgemm(handle, transa,
147 alpha, static_cast<const float *>(A_data), lda,
148 static_cast<const float *>(B_data),
150 beta, static_cast<float *>(C_data), ldc);
154 inline cublasStatus_t gemm_cuda<double>(cublasHandle_t handle,
155 cublasOperation_t transa,
156 cublasOperation_t transb,
161 const double *A_data,
163 const double *B_data,
168 return cublasDgemm(handle, transa,
171 alpha, static_cast<const double *>(A_data), lda,
172 static_cast<const double *>(B_data),
174 beta, static_cast<double *>(C_data), ldc);
178 inline cublasStatus_t trsm_cuda<float>(cublasHandle_t handle,
179 cublasSideMode_t side,
180 cublasFillMode_t uplo,
181 cublasOperation_t trans,
182 cublasDiagType_t diag,
190 return cublasStrsm(handle, side, uplo, trans, diag, m, n, alpha, A, lda, B,
195 inline cublasStatus_t trsm_cuda<double>(cublasHandle_t handle,
196 cublasSideMode_t side,
197 cublasFillMode_t uplo,
198 cublasOperation_t trans,
199 cublasDiagType_t diag,
207 return cublasDtrsm(handle, side, uplo, trans, diag, m, n, alpha, A, lda, B,
void gemm_cpu< double >(CBLAS_LAYOUT layout, CBLAS_TRANSPOSE trans_A, CBLAS_TRANSPOSE trans_B, OPEN3D_CPU_LINALG_INT m, OPEN3D_CPU_LINALG_INT n, OPEN3D_CPU_LINALG_INT k, double alpha, const double *A_data, OPEN3D_CPU_LINALG_INT lda, const double *B_data, OPEN3D_CPU_LINALG_INT ldb, double beta, double *C_data, OPEN3D_CPU_LINALG_INT ldc)
Definition: BlasWrapper.h:74
void LogError(const char *format, const Args &... args)
Definition: Console.h:176
void gemm_cpu(CBLAS_LAYOUT layout, CBLAS_TRANSPOSE trans_A, CBLAS_TRANSPOSE trans_B, OPEN3D_CPU_LINALG_INT m, OPEN3D_CPU_LINALG_INT n, OPEN3D_CPU_LINALG_INT k, scalar_t alpha, const scalar_t *A_data, OPEN3D_CPU_LINALG_INT lda, const scalar_t *B_data, OPEN3D_CPU_LINALG_INT ldb, scalar_t beta, scalar_t *C_data, OPEN3D_CPU_LINALG_INT ldc)
Definition: BlasWrapper.h:37
void gemm_cpu< float >(CBLAS_LAYOUT layout, CBLAS_TRANSPOSE trans_A, CBLAS_TRANSPOSE trans_B, OPEN3D_CPU_LINALG_INT m, OPEN3D_CPU_LINALG_INT n, OPEN3D_CPU_LINALG_INT k, float alpha, const float *A_data, OPEN3D_CPU_LINALG_INT lda, const float *B_data, OPEN3D_CPU_LINALG_INT ldb, float beta, float *C_data, OPEN3D_CPU_LINALG_INT ldc)
Definition: BlasWrapper.h:55
Definition: PinholeCameraIntrinsic.cpp:35