1 #ifndef CBLAS_ALT_TEMPLATE_H 2 #define CBLAS_ALT_TEMPLATE_H 14 typedef ptrdiff_t
INTT;
61 #define dtrtri_ dtrtri 62 #define strtri_ strtri 63 #define idamax_ idamax 64 #define isamax_ isamax 65 #define dsytrf_ dsytrf 66 #define ssytrf_ ssytrf 67 #define dsytri_ dsytri 68 #define ssytri_ ssytri 69 #define dlasrt_ dlasrt 70 #define slasrt_ slasrt 71 #define dgesvd_ dgesvd 72 #define sgesvd_ sgesvd 78 #ifdef HAVE_MKL // obsolete 89 void vdSqr(
int n,
double* vecIn,
double* vecOut);
90 void vsSqr(
int n,
float* vecIn,
float* vecOut);
91 void vdSqrt(
int n,
double* vecIn,
double* vecOut);
92 void vsSqrt(
int n,
float* vecIn,
float* vecOut);
93 void vdInvSqrt(
int n,
double* vecIn,
double* vecOut);
94 void vsInvSqrt(
int n,
float* vecIn,
float* vecOut);
95 void vdSub(
int n,
double* vecIn,
double* vecIn2,
double* vecOut);
96 void vsSub(
int n,
float* vecIn,
float* vecIn2,
float* vecOut);
97 void vdDiv(
int n,
double* vecIn,
double* vecIn2,
double* vecOut);
98 void vsDiv(
int n,
float* vecIn,
float* vecIn2,
float* vecOut);
99 void vdExp(
int n,
double* vecIn,
double* vecOut);
100 void vsExp(
int n,
float* vecIn,
float* vecOut);
101 void vdInv(
int n,
double* vecIn,
double* vecOut);
102 void vsInv(
int n,
float* vecIn,
float* vecOut);
103 void vdAdd(
int n,
double* vecIn,
double* vecIn2,
double* vecOut);
104 void vsAdd(
int n,
float* vecIn,
float* vecIn2,
float* vecOut);
105 void vdMul(
int n,
double* vecIn,
double* vecIn2,
double* vecOut);
106 void vsMul(
int n,
float* vecIn,
float* vecIn2,
float* vecOut);
107 void vdAbs(
int n,
double* vecIn,
double* vecOut);
108 void vsAbs(
int n,
float* vecIn,
float* vecOut);
140 INTT N, T alpha, T *A,
INTT lda, T *X,
154 T alpha, T *A,
INTT lda, T *X,
164 T beta, T *C,
INTT ldc);
168 T alpha, T *A,
INTT lda,
169 T beta, T*C,
INTT ldc);
183 template <
typename T>
void vSqrt(
int n, T* vecIn, T* vecOut);
185 template <
typename T>
void vInvSqrt(
int n, T* vecIn, T* vecOut);
187 template <
typename T>
void vSqr(
int n, T* vecIn, T* vecOut);
189 template <
typename T>
void vSub(
int n, T* vecIn, T* vecIn2, T* vecOut);
191 template <
typename T>
void vDiv(
int n, T* vecIn, T* vecIn2, T* vecOut);
193 template <
typename T>
void vExp(
int n, T* vecIn, T* vecOut);
195 template <
typename T>
void vInv(
int n, T* vecIn, T* vecOut);
197 template <
typename T>
void vAdd(
int n, T* vecIn, T* vecIn2, T* vecOut);
199 template <
typename T>
void vMul(
int n, T* vecIn, T* vecIn2, T* vecOut);
201 template <
typename T>
void vAbs(
int n, T* vecIn, T* vecOut);
205 template <
typename T>
void trtri(
char& uplo,
char& diag,
208 template <
typename T>
void sytri(
char& uplo,
INTT n, T* a,
INTT lda);
212 template <
typename T>
void lasrt(
char&
id,
INTT n, T *d);
214 template <
typename T>
void gesvd(
char& jobu,
char& jobvt,
INTT m,
217 template <
typename T>
void syev(
char& jobz,
char& uplo,
INTT n,
218 T* a,
INTT lda, T* w);
227 #if !defined(_MKL_LAPACK_H_) && !defined(_LAPACKE_H_) 233 double* work,
INTT* lwork,
INTT* info);
235 float* work,
INTT* lwork,
INTT* info);
237 double* work,
INTT* info);
239 float* work,
INTT* info);
243 INTT *lda,
double *s,
double *u,
INTT *ldu,
double *vt,
246 INTT *lda,
float *s,
float *u,
INTT *ldu,
float *vt,
248 void dsyev_(
char *jobz,
char *uplo,
INTT *n,
double *a,
INTT *lda,
249 double *w,
double *work,
INTT *lwork,
INTT *info);
251 float *w,
float *work,
INTT *lwork,
INTT *info);
265 void dgemv_(
char *trans,
INTT *m,
INTT *n,
double *alpha,
double *a,
266 INTT *lda,
double *x,
INTT *incx,
double *beta,
double *y,
INTT *incy);
267 void sgemv_(
char *trans,
INTT *m,
INTT *n,
float *alpha,
float *a,
268 INTT *lda,
float *x,
INTT *incx,
float *beta,
float *y,
INTT *incy);
270 double *y,
INTT *incy,
double *a,
INTT *lda);
272 float *y,
INTT *incy,
float *a,
INTT *lda);
273 void dtrmv_(
char *uplo,
char *trans,
char *diag,
INTT *n,
double *a,
275 void strmv_(
char *uplo,
char *trans,
char *diag,
INTT *n,
float *a,
277 void dsyr_(
char *uplo,
INTT *n,
double *alpha,
double *x,
INTT *incx,
278 double *a,
INTT *lda);
279 void ssyr_(
char *uplo,
INTT *n,
float *alpha,
float *x,
INTT *incx,
280 float *a,
INTT *lda);
281 void dsymv_(
char *uplo,
INTT *n,
double *alpha,
double *a,
INTT *lda,
282 double *x,
INTT *incx,
double *beta,
double *y,
INTT *incy);
283 void ssymv_(
char *uplo,
INTT *n,
float *alpha,
float *a,
INTT *lda,
284 float *x,
INTT *incx,
float *beta,
float *y,
INTT *incy);
286 double *alpha,
double *a,
INTT *lda,
double *b,
INTT *ldb,
double *beta,
287 double *c,
INTT *ldc);
289 float *alpha,
float *a,
INTT *lda,
float *b,
INTT *ldb,
float *beta,
290 float *c,
INTT *ldc);
291 void dsyrk_(
char *uplo,
char *trans,
INTT *n,
INTT *k,
double *alpha,
292 double *a,
INTT *lda,
double *beta,
double *c,
INTT *ldc);
293 void ssyrk_(
char *uplo,
char *trans,
INTT *n,
INTT *k,
float *alpha,
294 float *a,
INTT *lda,
float *beta,
float *c,
INTT *ldc);
295 void dtrmm_(
char *side,
char *uplo,
char *transa,
char *diag,
INTT *m,
296 INTT *n,
double *alpha,
double *a,
INTT *lda,
double *b,
298 void strmm_(
char *side,
char *uplo,
char *transa,
char *diag,
INTT *m,
299 INTT *n,
float *alpha,
float *a,
INTT *lda,
float *b,
311 return dnrm2_(&n,X,&incX);
317 return snrm2_(&n,X,&incX);
323 dcopy_(&n,X,&incX,Y,&incY);
327 float* Y,
INTT incY) {
329 scopy_(&n,X,&incX,Y,&incY);
334 for (
int i = 0; i<n; ++i)
339 bool* Y,
INTT incY) {
340 for (
int i = 0; i<n; ++i)
348 daxpy_(&n,&a,X,&incX,Y,&incY);
354 saxpy_(&n,&a,X,&incX,Y,&incY);
360 for (
int i = 0; i<n; ++i)
367 for (
int i = 0; i<n; ++i)
387 for (
int i = 0; i<n; ++i) X[i*incX]*=a;
398 return dasum_(&n,X,&incX);
403 return sasum_(&n,X,&incX);
409 return ddot_(&n,X,&incX,Y,&incY);
415 return sdot_(&n,X,&incX,Y,&incY);
422 for (i = 0; i<n; ++i) {
423 total+=X[i*incX]*Y[j];
440 double alpha,
double *A,
INTT lda,
441 double *X,
INTT incX,
double beta,
442 double *Y,
INTT incY) {
444 dgemv_(
cblas_transpose(TransA),&M,&N,&alpha,A,&lda,X,&incX,&beta,Y,&incY);
449 float alpha,
float *A,
INTT lda,
450 float *X,
INTT incX,
float beta,
451 float *Y,
INTT incY) {
453 sgemv_(
cblas_transpose(TransA),&M,&N,&alpha,A,&lda,X,&incX,&beta,Y,&incY);
458 int alpha,
int *A,
INTT lda,
459 int *X,
INTT incX,
int beta,
466 bool alpha,
bool *A,
INTT lda,
467 bool *X,
INTT incX,
bool beta,
468 bool *Y,
INTT incY) {
475 double* Y,
INTT incY,
double *A,
INTT lda) {
477 dger_(&M,&N,&alpha,X,&incX,Y,&incY,A,&lda);
482 float* Y,
INTT incY,
float *A,
INTT lda) {
484 sger_(&M,&N,&alpha,X,&incX,Y,&incY,A,&lda);
489 double *A,
INTT lda,
double *X,
INTT incX) {
496 float *A,
INTT lda,
float *X,
INTT incX) {
503 INTT N,
double alpha,
double*X,
511 INTT N,
float alpha,
float*X,
519 float alpha,
float *A,
INTT lda,
float *X,
520 INTT incX,
float beta,
float *Y,
INTT incY) {
527 double alpha,
double *A,
INTT lda,
double *X,
528 INTT incX,
double beta,
double *Y,
INTT incY) {
539 double *A,
INTT lda,
double *B,
INTT ldb,
540 double beta,
double *C,
INTT ldc) {
542 dgemm_(
cblas_transpose(TransA),
cblas_transpose(TransB),&M,&N,&K,&alpha,A,&lda,B,&ldb,&beta,C,&ldc);
548 float *A,
INTT lda,
float *B,
INTT ldb,
549 float beta,
float *C,
INTT ldc) {
551 sgemm_(
cblas_transpose(TransA),
cblas_transpose(TransB),&M,&N,&K,&alpha,A,&lda,B,&ldb,&beta,C,&ldc);
557 int beta,
int *C,
INTT ldc) {
564 bool *A,
INTT lda,
bool *B,
INTT ldb,
565 bool beta,
bool *C,
INTT ldc) {
572 double alpha,
double *A,
INTT lda,
573 double beta,
double *C,
INTT ldc) {
580 float alpha,
float *A,
INTT lda,
581 float beta,
float *C,
INTT ldc) {
588 int alpha,
int *A,
INTT lda,
589 int beta,
int *C,
INTT ldc) {
595 bool alpha,
bool *A,
INTT lda,
596 bool beta,
bool *C,
INTT ldc) {
605 double *A,
INTT lda,
double *B,
INTT ldb) {
607 dtrmm_(
cblas_side(Side),
cblas_uplo(Uplo),
cblas_transpose(TransA),
cblas_diag(Diag),&M,&N,&alpha,A,&lda,B,&ldb);
614 float *A,
INTT lda,
float *B,
INTT ldb) {
616 strmm_(
cblas_side(Side),
cblas_uplo(Uplo),
cblas_transpose(TransA),
cblas_diag(Diag),&M,&N,&alpha,A,&lda,B,&ldb);
622 return static_cast<int>(
idamax_(&n,X,&incX)-1);
628 return static_cast<int>(
isamax_(&n,X,&incX)-1);
651 double* query, *work;
652 query =
new double[1];
654 lwork=
static_cast<INTT>(*query);
656 work =
new double[
static_cast<int>(lwork)];
659 work =
new double[
static_cast<int>(2*n)];
669 query =
new float[1];
671 lwork=
static_cast<INTT>(*query);
673 work =
new float[
static_cast<int>(lwork)];
676 work =
new float[
static_cast<int>(2*n)];
682 template <>
inline void lasrt(
char&
id,
INTT n,
double *d) {
687 template <>
inline void lasrt(
char&
id,
INTT n,
float *d) {
700 template <>
void inline gesvd(
char& jobu,
char& jobvt,
INTT m,
701 INTT n,
double* a,
INTT lda,
double* s,
702 double* u,
INTT ldu,
double* vt,
INTT ldvt) {
703 double* query =
new double[1];
705 dgesvd_(&jobu, &jobvt, &m, &n, a, &lda, s, u, &ldu, vt, &ldvt,
706 query, &lwork, &
info );
707 lwork=
static_cast<INTT>(*query);
709 double* work =
new double[
static_cast<int>(lwork)];
710 dgesvd_(&jobu, &jobvt, &m, &n, a, &lda, s, u, &ldu, vt, &ldvt,
711 work, &lwork, &
info );
714 template <>
void inline gesvd(
char& jobu,
char& jobvt,
INTT m,
715 INTT n,
float* a,
INTT lda,
float* s,
716 float* u,
INTT ldu,
float* vt,
INTT ldvt) {
717 float* query =
new float[1];
719 sgesvd_(&jobu, &jobvt, &m, &n, a, &lda, s, u, &ldu, vt, &ldvt,
720 query, &lwork, &
info );
721 lwork=
static_cast<INTT>(*query);
723 float* work =
new float[
static_cast<int>(lwork)];
724 sgesvd_(&jobu, &jobvt, &m, &n, a, &lda, s, u, &ldu, vt, &ldvt,
725 work, &lwork, &
info );
729 template <>
void inline syev(
char& jobz,
char& uplo,
INTT n,
730 float* a,
INTT lda,
float* w) {
731 float* query =
new float[1];
733 ssyev_(&jobz,&uplo,&n,a,&lda,w,query,&lwork,&
info);
734 lwork=
static_cast<INTT>(*query);
736 float* work =
new float[
static_cast<int>(lwork)];
737 ssyev_(&jobz,&uplo,&n,a,&lda,w,work,&lwork,&
info);
741 template <>
void inline syev(
char& jobz,
char& uplo,
INTT n,
742 double* a,
INTT lda,
double* w) {
743 double* query =
new double[1];
745 dsyev_(&jobz,&uplo,&n,a,&lda,w,query,&lwork,&
info);
746 lwork=
static_cast<INTT>(*query);
748 double* work =
new double[
static_cast<int>(lwork)];
749 dsyev_(&jobz,&uplo,&n,a,&lda,w,work,&lwork,&
info);
758 template <>
inline void vSqr<double>(
int n,
double* vecIn,
761 vdSqr(n,vecIn,vecOut);
764 template <>
inline void vSqr<float>(
int n,
float* vecIn,
766 vsSqr(n,vecIn,vecOut);
768 template <>
inline void vSqrt<double>(
int n,
double* vecIn,
770 vdSqrt(n,vecIn,vecOut);
773 template <>
inline void vSqrt<float>(
int n,
float* vecIn,
775 vsSqrt(n,vecIn,vecOut);
777 template <>
inline void vInvSqrt<double>(
int n,
double* vecIn,
779 vdInvSqrt(n,vecIn,vecOut);
782 template <>
inline void vInvSqrt<float>(
int n,
float* vecIn,
784 vsInvSqrt(n,vecIn,vecOut);
788 template <>
inline void vSub<double>(
int n,
double* vecIn,
789 double* vecIn2,
double* vecOut) {
790 vdSub(n,vecIn,vecIn2,vecOut);
793 template <>
inline void vSub<float>(
int n,
float* vecIn,
794 float* vecIn2,
float* vecOut) {
795 vsSub(n,vecIn,vecIn2,vecOut);
798 template <>
inline void vDiv<double>(
int n,
double* vecIn,
799 double* vecIn2,
double* vecOut) {
800 vdDiv(n,vecIn,vecIn2,vecOut);
803 template <>
inline void vDiv<float>(
int n,
float* vecIn,
804 float* vecIn2,
float* vecOut) {
805 vsDiv(n,vecIn,vecIn2,vecOut);
808 template <>
inline void vExp<double>(
int n,
double* vecIn,
810 vdExp(n,vecIn,vecOut);
813 template <>
inline void vExp<float>(
int n,
float* vecIn,
815 vsExp(n,vecIn,vecOut);
818 template <>
inline void vInv<double>(
int n,
double* vecIn,
820 vdInv(n,vecIn,vecOut);
823 template <>
inline void vInv<float>(
int n,
float* vecIn,
825 vsInv(n,vecIn,vecOut);
828 template <>
inline void vAdd<double>(
int n,
double* vecIn,
829 double* vecIn2,
double* vecOut) {
830 vdAdd(n,vecIn,vecIn2,vecOut);
833 template <>
inline void vAdd<float>(
int n,
float* vecIn,
834 float* vecIn2,
float* vecOut) {
835 vsAdd(n,vecIn,vecIn2,vecOut);
838 template <>
inline void vMul<double>(
int n,
double* vecIn,
839 double* vecIn2,
double* vecOut) {
840 vdMul(n,vecIn,vecIn2,vecOut);
843 template <>
inline void vMul<float>(
int n,
float* vecIn,
844 float* vecIn2,
float* vecOut) {
845 vsMul(n,vecIn,vecIn2,vecOut);
849 template <>
inline void vAbs(
int n,
double* vecIn,
851 vdAbs(n,vecIn,vecOut);
854 template <>
inline void vAbs(
int n,
float* vecIn,
856 vsAbs(n,vecIn,vecOut);
862 template <>
inline int cblas_iamin<double>(
int n,
double* x,
868 template <>
inline int cblas_iamin<float>(
int n,
float* x,
874 template <
typename T>
inline void vSqr(
int n, T* vecIn, T* vecOut) {
876 for (
int i = 0; i<n; ++i) vecOut[i]=vecIn[i]*vecIn[i];
878 template <
typename T>
inline void vSqrt(
int n, T* vecIn, T* vecOut) {
879 for (
int i = 0; i<n; ++i) vecOut[i]=spams::sqr<T>(vecIn[i]);
881 template <
typename T>
inline void vInvSqrt(
int n, T* vecIn, T* vecOut) {
882 for (
int i = 0; i<n; ++i) vecOut[i]=T(1.0)/spams::sqr<T>(vecIn[i]);
886 template <
typename T>
inline void vSub(
int n, T* vecIn1,
887 T* vecIn2, T* vecOut) {
888 for (
int i = 0; i<n; ++i) vecOut[i]=vecIn1[i]-vecIn2[i];
891 template <
typename T>
inline void vInv(
int n, T* vecIn, T* vecOut) {
892 for (
int i = 0; i<n; ++i) vecOut[i]=1.0/vecIn[i];
895 template <
typename T>
inline void vExp(
int n, T* vecIn, T* vecOut) {
896 for (
int i = 0; i<n; ++i) vecOut[i]=exp(vecIn[i]);
899 template <
typename T>
inline void vAdd(
int n, T* vecIn1,
900 T* vecIn2, T* vecOut) {
901 for (
int i = 0; i<n; ++i) vecOut[i]=vecIn1[i]+vecIn2[i];
904 template <
typename T>
inline void vMul(
int n, T* vecIn1,
905 T* vecIn2, T* vecOut) {
906 for (
int i = 0; i<n; ++i) vecOut[i]=vecIn1[i]*vecIn2[i];
909 template <
typename T>
inline void vDiv(
int n, T* vecIn1,
910 T* vecIn2, T* vecOut) {
911 for (
int i = 0; i<n; ++i) vecOut[i]=vecIn1[i]/vecIn2[i];
914 template <
typename T>
inline void vAbs(
int n, T* vecIn,
916 for (
int i = 0; i<n; ++i) vecOut[i]=spams::abs<T>(vecIn[i]);
922 double min=fabs(X[0]);
923 for (
int j = 1; j<n; j+=incX) {
924 double cur = fabs(X[j]);
float cblas_nrm2< float >(INTT n, float *X, INTT incX)
Implementation of the INTTerface for cblas_snrm2.
void strtri_(char *uplo, char *diag, INTT *n, float *a, INTT *lda, INTT *info)
void cblas_trmv< double >(CBLAS_ORDER order, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag, INTT N, double *A, INTT lda, double *X, INTT incX)
Implementation of the INTTerface for cblas_dtrmv.
void cblas_trmm< double >(CBLAS_ORDER order, CBLAS_SIDE Side, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag, INTT M, INTT N, double alpha, double *A, INTT lda, double *B, INTT ldb)
Implementation of the INTTerface for cblas_dtrmm.
void vAbs(int n, T *vecIn, T *vecOut)
interface to v*Abs
T cblas_nrm2(INTT n, T *X, INTT incX)
INTTerface to cblas_*nrm2.
bool cblas_dot< bool >(INTT n, bool *X, INTT incX, bool *Y, INTT incY)
Implementation of the INTTerface for cblas_sdot.
void vExp(int n, T *vecIn, T *vecOut)
interface to v*Exp
void cblas_axpy< int >(INTT n, int a, int *X, INTT incX, int *Y, INTT incY)
Implementation of the INTTerface for cblas_saxpy.
double dasum_(INTT *n, double *x, INTT *incX)
void dgesvd_(char *jobu, char *jobvt, INTT *m, INTT *n, double *a, INTT *lda, double *s, double *u, INTT *ldu, double *vt, INTT *ldvt, double *work, INTT *lwork, INTT *info)
void cblas_copy< bool >(INTT n, bool *X, INTT incX, bool *Y, INTT incY)
Implementation of the INTTerface for cblas_scopy.
void dtrmv_(char *uplo, char *trans, char *diag, INTT *n, double *a, INTT *lda, double *x, INTT *incx)
void ssyr_(char *uplo, INTT *n, float *alpha, float *x, INTT *incx, float *a, INTT *lda)
void cblas_syrk< float >(CBLAS_ORDER order, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE Trans, INTT N, INTT K, float alpha, float *A, INTT lda, float beta, float *C, INTT ldc)
Implementation of the INTTerface for cblas_ssyrk.
void dscal_(INTT *n, double *a, double *x, INTT *incX)
void cblas_scal< bool >(INTT n, bool a, bool *X, INTT incX)
Implementation of the INTTerface for cblas_sscal.
float sasum_(INTT *n, float *x, INTT *incX)
void vAdd(int n, T *vecIn, T *vecIn2, T *vecOut)
interface to v*Add
int cblas_iamax(INTT n, T *X, INTT incX)
interface to cblas_i*amax
void cblas_trmv< float >(CBLAS_ORDER order, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag, INTT N, float *A, INTT lda, float *X, INTT incX)
Implementation of the INTTerface for cblas_strmv.
vcl_size_t cblas_idamin(int n, double *X, int incX)
external functions
void dgemm_(char *transa, char *transb, INTT *m, INTT *n, INTT *k, double *alpha, double *a, INTT *lda, double *b, INTT *ldb, double *beta, double *c, INTT *ldc)
int cblas_iamax< double >(INTT n, double *X, INTT incX)
Implementation of the interface for cblas_idamax.
void cblas_ger(CBLAS_ORDER order, INTT M, INTT N, T alpha, T *X, INTT incX, T *Y, INTT incY, T *A, INTT lda)
INTTerface to cblas_*ger.
char * cblas_side(CBLAS_SIDE Side)
void dsyrk_(char *uplo, char *trans, INTT *n, INTT *k, double *alpha, double *a, INTT *lda, double *beta, double *c, INTT *ldc)
double ddot_(INTT *n, double *x, INTT *incX, double *y, INTT *incY)
void trtri(char &uplo, char &diag, INTT n, T *a, INTT lda)
interface to *trtri
void cblas_gemv< float >(CBLAS_ORDER order, CBLAS_TRANSPOSE TransA, INTT M, INTT N, float alpha, float *A, INTT lda, float *X, INTT incX, float beta, float *Y, INTT incY)
Implementation of the INTTerface for cblas_sgemv.
void cblas_gemv< int >(CBLAS_ORDER order, CBLAS_TRANSPOSE TransA, INTT M, INTT N, int alpha, int *A, INTT lda, int *X, INTT incX, int beta, int *Y, INTT incY)
Implementation of the INTTerface for cblas_sgemv.
vcl_size_t cblas_isamin(int n, float *X, int incX)
void dsytri_(char *uplo, INTT *n, double *a, INTT *lda, INTT *ipiv, double *work, INTT *info)
void sgemv_(char *trans, INTT *m, INTT *n, float *alpha, float *a, INTT *lda, float *x, INTT *incx, float *beta, float *y, INTT *incy)
void cblas_ger< double >(CBLAS_ORDER order, INTT M, INTT N, double alpha, double *X, INTT incX, double *Y, INTT incY, double *A, INTT lda)
Implementation of the INTTerface for cblas_dger.
void cblas_axpy< float >(INTT n, float a, float *X, INTT incX, float *Y, INTT incY)
Implementation of the INTTerface for cblas_saxpy.
void sytri< float >(char &uplo, INTT n, float *a, INTT lda)
Implemenation of the interface for ssytri.
static char low
a few static variables for lapack
void gesvd(char &jobu, char &jobvt, INTT m, INTT n, T *a, INTT lda, T *s, T *u, INTT ldu, T *vt, INTT ldvt)
void vInvSqrt(int n, T *vecIn, T *vecOut)
interface to v*Sqr
char * cblas_transpose(CBLAS_TRANSPOSE TransA)
void cblas_copy< double >(INTT n, double *X, INTT incX, double *Y, INTT incY)
Implementation of the INTTerface for cblas_dcopy.
void cblas_trmm(CBLAS_ORDER order, CBLAS_SIDE Side, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag, INTT M, INTT N, T alpha, T *A, INTT lda, T *B, INTT ldb)
INTTerface to cblas_*trmm.
void ssytrf_(char *uplo, INTT *n, float *a, INTT *lda, INTT *ipiv, float *work, INTT *lwork, INTT *info)
void cblas_gemm< double >(CBLAS_ORDER order, CBLAS_TRANSPOSE TransA, CBLAS_TRANSPOSE TransB, INTT M, INTT N, INTT K, double alpha, double *A, INTT lda, double *B, INTT ldb, double beta, double *C, INTT ldc)
Implementation of the INTTerface for cblas_dgemm.
void ssyrk_(char *uplo, char *trans, INTT *n, INTT *k, float *alpha, float *a, INTT *lda, float *beta, float *c, INTT *ldc)
void dsyev_(char *jobz, char *uplo, INTT *n, double *a, INTT *lda, double *w, double *work, INTT *lwork, INTT *info)
const T & min(const T &a, const T &b)
Return the minimum between a and b.
void slasrt_(char *id, INTT *n, float *d, INTT *info)
void cblas_syr(CBLAS_ORDER order, CBLAS_UPLO Uplo, INTT N, T alpha, T *X, INTT incX, T *A, INTT lda)
INTTerface to cblas_*syr.
void dsymv_(char *uplo, INTT *n, double *alpha, double *a, INTT *lda, double *x, INTT *incx, double *beta, double *y, INTT *incy)
INTT isamax_(INTT *n, float *dx, INTT *incx)
void cblas_gemm< int >(CBLAS_ORDER order, CBLAS_TRANSPOSE TransA, CBLAS_TRANSPOSE TransB, INTT M, INTT N, INTT K, int alpha, int *A, INTT lda, int *B, INTT ldb, int beta, int *C, INTT ldc)
void cblas_axpy< double >(INTT n, double a, double *X, INTT incX, double *Y, INTT incY)
Implementation of the INTTerface for cblas_daxpy.
void ssymv_(char *uplo, INTT *n, float *alpha, float *a, INTT *lda, float *x, INTT *incx, float *beta, float *y, INTT *incy)
void cblas_trmv(CBLAS_ORDER order, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag, INTT N, T *A, INTT lda, T *X, INTT incX)
INTTerface to cblas_*trmv.
void cblas_scal< double >(INTT n, double a, double *X, INTT incX)
Implementation of the INTTerface for cblas_dscal.
void syev(char &jobz, char &uplo, INTT n, T *a, INTT lda, T *w)
float sdot_(INTT *n, float *x, INTT *incX, float *y, INTT *incY)
void cblas_gemv(CBLAS_ORDER order, CBLAS_TRANSPOSE TransA, INTT M, INTT N, T alpha, T *A, INTT lda, T *X, INTT incX, T beta, T *Y, INTT incY)
INTTerface to cblas_*gemv.
double cblas_dot< double >(INTT n, double *X, INTT incX, double *Y, INTT incY)
Implementation of the INTTerface for cblas_ddot.
void cblas_symv(CBLAS_ORDER order, CBLAS_UPLO Uplo, INTT N, T alpha, T *A, INTT lda, T *X, INTT incX, T beta, T *Y, INTT incY)
INTTerface to cblas_*symv.
INTT idamax_(INTT *n, double *dx, INTT *incx)
void dger_(INTT *m, INTT *n, double *alpha, double *x, INTT *incx, double *y, INTT *incy, double *a, INTT *lda)
void sytri(char &uplo, INTT n, T *a, INTT lda)
interface to *sytri // call sytrf
void cblas_syrk< double >(CBLAS_ORDER order, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE Trans, INTT N, INTT K, double alpha, double *A, INTT lda, double beta, double *C, INTT ldc)
Implementation of the INTTerface for cblas_dsyrk.
void vInv(int n, T *vecIn, T *vecOut)
interface to v*Inv
void cblas_gemm(CBLAS_ORDER order, CBLAS_TRANSPOSE TransA, CBLAS_TRANSPOSE TransB, INTT M, INTT N, INTT K, T alpha, T *A, INTT lda, T *B, INTT ldb, T beta, T *C, INTT ldc)
INTTerface to cblas_*gemm.
void sytri< double >(char &uplo, INTT n, double *a, INTT lda)
Implemenation of the interface for dsytri.
void dtrmm_(char *side, char *uplo, char *transa, char *diag, INTT *m, INTT *n, double *alpha, double *a, INTT *lda, double *b, INTT *ldb)
void cblas_copy< float >(INTT n, float *X, INTT incX, float *Y, INTT incY)
Implementation of the INTTerface for cblas_scopy.
double dnrm2_(INTT *n, double *x, INTT *incX)
void dlasrt_(char *id, INTT *n, double *d, INTT *info)
void saxpy_(INTT *n, float *a, float *x, INTT *incX, float *y, INTT *incY)
void scopy_(INTT *n, float *x, INTT *incX, float *y, INTT *incY)
void cblas_axpy(INTT n, T a, T *X, INTT incX, T *Y, INTT incY)
INTTerface to cblas_*axpy.
void cblas_gemm< float >(CBLAS_ORDER order, CBLAS_TRANSPOSE TransA, CBLAS_TRANSPOSE TransB, INTT M, INTT N, INTT K, float alpha, float *A, INTT lda, float *B, INTT ldb, float beta, float *C, INTT ldc)
Implementation of the INTTerface for cblas_sgemm.
void cblas_copy(INTT n, T *X, INTT incX, T *Y, INTT incY)
INTTerface to cblas_*copy.
void ssytri_(char *uplo, INTT *n, float *a, INTT *lda, INTT *ipiv, float *work, INTT *info)
float cblas_dot< float >(INTT n, float *X, INTT incX, float *Y, INTT incY)
Implementation of the INTTerface for cblas_sdot.
void vSqr(int n, T *vecIn, T *vecOut)
interface to v*Sqr
void trtri< double >(char &uplo, char &diag, INTT n, double *a, INTT lda)
Implemenation of the interface for dtrtri.
void dsytrf_(char *uplo, INTT *n, double *a, INTT *lda, INTT *ipiv, double *work, INTT *lwork, INTT *info)
void cblas_syrk< int >(CBLAS_ORDER order, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE Trans, INTT N, INTT K, int alpha, int *A, INTT lda, int beta, int *C, INTT ldc)
Implementation of the INTTerface for cblas_ssyrk.
void sgemm_(char *transa, char *transb, INTT *m, INTT *n, INTT *k, float *alpha, float *a, INTT *lda, float *b, INTT *ldb, float *beta, float *c, INTT *ldc)
void cblas_scal< float >(INTT n, float a, float *X, INTT incX)
Implementation of the INTTerface for cblas_sscal.
T cblas_asum(INTT n, T *X, INTT incX)
INTTerface to cblas_*asum.
void sgesvd_(char *jobu, char *jobvt, INTT *m, INTT *n, float *a, INTT *lda, float *s, float *u, INTT *ldu, float *vt, INTT *ldvt, float *work, INTT *lwork, INTT *info)
void cblas_syrk(CBLAS_ORDER order, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE Trans, INTT N, INTT K, T alpha, T *A, INTT lda, T beta, T *C, INTT ldc)
INTTerface to cblas_*syrk.
char * cblas_uplo(CBLAS_UPLO Uplo)
void strmv_(char *uplo, char *trans, char *diag, INTT *n, float *a, INTT *lda, float *x, INTT *incx)
void vDiv(int n, T *vecIn, T *vecIn2, T *vecOut)
interface to v*Div
int cblas_dot< int >(INTT n, int *X, INTT incX, int *Y, INTT incY)
void dsyr_(char *uplo, INTT *n, double *alpha, double *x, INTT *incx, double *a, INTT *lda)
void dtrtri_(char *uplo, char *diag, INTT *n, double *a, INTT *lda, INTT *info)
void vSqrt(int n, T *vecIn, T *vecOut)
interface to v*Sqr
void cblas_ger< float >(CBLAS_ORDER order, INTT M, INTT N, float alpha, float *X, INTT incX, float *Y, INTT incY, float *A, INTT lda)
Implementation of the INTTerface for cblas_sger.
void dcopy_(INTT *n, double *x, INTT *incX, double *y, INTT *incY)
void vSub(int n, T *vecIn, T *vecIn2, T *vecOut)
interface to v*Sub
void cblas_scal< int >(INTT n, int a, int *X, INTT incX)
Implementation of the INTTerface for cblas_sscal.
char * cblas_diag(CBLAS_DIAG Diag)
void cblas_copy< int >(INTT n, int *X, INTT incX, int *Y, INTT incY)
Implementation of the INTTerface for cblas_scopy.
void sger_(INTT *m, INTT *n, float *alpha, float *x, INTT *incx, float *y, INTT *incy, float *a, INTT *lda)
T cblas_dot(INTT n, T *X, INTT incX, T *Y, INTT incY)
INTTerface to cblas_*adot.
double cblas_nrm2< double >(INTT n, double *X, INTT incX)
Implementation of the INTTerface for cblas_dnrm2.
void lasrt(char &id, INTT n, T *d)
interaface to *lasrt
void cblas_axpy< bool >(INTT n, bool a, bool *X, INTT incX, bool *Y, INTT incY)
Implementation of the INTTerface for cblas_saxpy.
void trtri< float >(char &uplo, char &diag, INTT n, float *a, INTT lda)
Implemenation of the interface for strtri.
void dgemv_(char *trans, INTT *m, INTT *n, double *alpha, double *a, INTT *lda, double *x, INTT *incx, double *beta, double *y, INTT *incy)
void cblas_scal(INTT n, T a, T *X, INTT incX)
INTTerface to cblas_*scal.
void cblas_trmm< float >(CBLAS_ORDER order, CBLAS_SIDE Side, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag, INTT M, INTT N, float alpha, float *A, INTT lda, float *B, INTT ldb)
Implementation of the INTTerface for cblas_strmm.
void cblas_gemv< double >(CBLAS_ORDER order, CBLAS_TRANSPOSE TransA, INTT M, INTT N, double alpha, double *A, INTT lda, double *X, INTT incX, double beta, double *Y, INTT incY)
Implementation of the INTTerface for cblas_dgemv.
void daxpy_(INTT *n, double *a, double *x, INTT *incX, double *y, INTT *incY)
void cblas_gemm< bool >(CBLAS_ORDER order, CBLAS_TRANSPOSE TransA, CBLAS_TRANSPOSE TransB, INTT M, INTT N, INTT K, bool alpha, bool *A, INTT lda, bool *B, INTT ldb, bool beta, bool *C, INTT ldc)
Implementation of the INTTerface for cblas_sgemm.
void ssyev_(char *jobz, char *uplo, INTT *n, float *a, INTT *lda, float *w, float *work, INTT *lwork, INTT *info)
int cblas_iamin(INTT n, T *X, INTT incX)
interface to cblas_i*amin
int cblas_iamax< float >(INTT n, float *X, INTT incX)
Implementation of the interface for cblas_isamax.
void vMul(int n, T *vecIn, T *vecIn2, T *vecOut)
interface to v*Mul
void cblas_syrk< bool >(CBLAS_ORDER order, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE Trans, INTT N, INTT K, bool alpha, bool *A, INTT lda, bool beta, bool *C, INTT ldc)
Implementation of the INTTerface for cblas_ssyrk.
void cblas_gemv< bool >(CBLAS_ORDER order, CBLAS_TRANSPOSE TransA, INTT M, INTT N, bool alpha, bool *A, INTT lda, bool *X, INTT incX, bool beta, bool *Y, INTT incY)
Implementation of the INTTerface for cblas_sgemv.
void sscal_(INTT *n, float *a, float *x, INTT *incX)
float snrm2_(INTT *n, float *x, INTT *incX)
void strmm_(char *side, char *uplo, char *transa, char *diag, INTT *m, INTT *n, float *alpha, float *a, INTT *lda, float *b, INTT *ldb)
float cblas_asum< float >(INTT n, float *X, INTT incX)
Implementation of the INTTerface for cblas_sasum.
double cblas_asum< double >(INTT n, double *X, INTT incX)
Implementation of the INTTerface for cblas_dasum.