36 #include <visp3/core/vpConfig.h> 37 #include <visp3/core/vpMatrix.h> 39 #ifndef DOXYGEN_SHOULD_SKIP_THIS 41 #if defined(VISP_HAVE_LAPACK) && !defined(VISP_HAVE_LAPACK_BUILT_IN) 45 void vpMatrix::blas_dgemm(
char trans_a,
char trans_b,
int M_,
int N_,
int K_,
double alpha,
46 double *a_data,
int lda_,
double *b_data,
int ldb_,
double beta,
double *c_data,
49 MKL_INT M = (MKL_INT)M_, K = (MKL_INT)K_, N = (MKL_INT)N_;
50 MKL_INT lda = (MKL_INT)lda_, ldb = (MKL_INT)ldb_, ldc = (MKL_INT)ldc_;
52 dgemm(&trans_a, &trans_b, &M, &N, &K, &alpha, a_data, &lda, b_data, &ldb, &beta, c_data, &ldc);
55 void vpMatrix::blas_dgemv(
char trans,
int M_,
int N_,
double alpha,
double *a_data,
int lda_,
56 double *x_data,
int incx_,
double beta,
double *y_data,
int incy_)
58 MKL_INT M = (MKL_INT)M_, N = (MKL_INT)N_;
59 MKL_INT lda = (MKL_INT)lda_, incx = (MKL_INT)incx_, incy = (MKL_INT)incy_;
61 dgemv(&trans, &M, &N, &alpha, a_data, &lda, x_data, &incx, &beta, y_data, &incy);
66 extern "C" void dgemm_(
char *transa,
char *transb, integer *M, integer *N, integer *K,
double *alpha,
double *a,
67 integer *lda,
double *b, integer *ldb,
double *beta,
double *c, integer *ldc);
69 extern "C" void dgemv_(
char *trans, integer *M, integer *N,
double *alpha,
double *a, integer *lda,
double *x,
70 integer *incx,
double *beta,
double *y, integer *incy);
72 void vpMatrix::blas_dgemm(
char trans_a,
char trans_b,
int M_,
int N_,
int K_,
double alpha,
73 double *a_data,
int lda_,
double *b_data,
int ldb_,
double beta,
double *c_data,
76 integer M = (integer)M_, K = (integer)K_, N = (integer)N_;
77 integer lda = (integer)lda_, ldb = (integer)ldb_, ldc = (integer)ldc_;
79 dgemm_(&trans_a, &trans_b, &M, &N, &K, &alpha, a_data, &lda, b_data, &ldb, &beta, c_data, &ldc);
82 void vpMatrix::blas_dgemv(
char trans,
int M_,
int N_,
double alpha,
double *a_data,
int lda_,
83 double *x_data,
int incx_,
double beta,
double *y_data,
int incy_)
85 integer M = (integer)M_, N = (integer)N_;
86 integer lda = (integer)lda_, incx = (integer)incx_, incy = (integer)incy_;
88 dgemv_(&trans, &M, &N, &alpha, a_data, &lda, x_data, &incx, &beta, y_data, &incy);
94 void dummy_vpMatrix_blas() {};
97 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS