DMRITool  v0.1.1-139-g860d86b4
Diffusion MRI Tool
utlMKL.h
Go to the documentation of this file.
1 
18 #ifndef __utlMKL_h
19 #define __utlMKL_h
20 
21 #include <iostream>
22 #include <complex>
23 
24 #define MKL_Complex16 std::complex<double>
25 #define MKL_Complex8 std::complex<float>
26 #include "mkl_service.h"
27 #include "mkl.h"
28 
29 namespace utl
30 {
31 
36 template <class T> inline void
37 mkl_imatcopy(const char ordering, const char trans, const int rows, const int cols, const T alpha, T* A, const int lda, const int ldb);
38 
40 template <class T> inline void
41 mkl_omatcopy(const char ordering, const char trans, const int rows, const int cols, const T alpha, const T* A, const int lda, T* B, const int ldb);
42 
43 template <> inline void
44 mkl_imatcopy<double>(const char ordering, const char trans, const int rows, const int cols, const double alpha, double* A, const int lda, const int ldb)
45 {
46  mkl_dimatcopy(ordering,trans,rows,cols,alpha,A,lda,ldb);
47 }
48 template <> inline void
49 mkl_imatcopy<float>(const char ordering, const char trans, const int rows, const int cols, const float alpha, float* A, const int lda, const int ldb)
50 {
51  mkl_simatcopy(ordering,trans,rows,cols,alpha,A,lda,ldb);
52 }
53 template <> inline void
54 mkl_imatcopy<std::complex<double> >(const char ordering, const char trans, const int rows, const int cols, const std::complex<double> alpha, std::complex<double>* A, const int lda, const int ldb)
55 {
56  mkl_zimatcopy(ordering,trans,rows,cols,alpha,A,lda,ldb);
57 }
58 template <> inline void
59 mkl_imatcopy<std::complex<float> >(const char ordering, const char trans, const int rows, const int cols, const std::complex<float> alpha, std::complex<float>* A, const int lda, const int ldb)
60 {
61  mkl_cimatcopy(ordering,trans,rows,cols,alpha,A,lda,ldb);
62 }
63 
64 template <> inline void
65 mkl_omatcopy<double>(const char ordering, const char trans, const int rows, const int cols, const double alpha, const double* A, const int lda, double* B, const int ldb)
66 {
67  mkl_domatcopy(ordering,trans,rows,cols,alpha,A,lda,B,ldb);
68 }
69 template <> inline void
70 mkl_omatcopy<float>(const char ordering, const char trans, const int rows, const int cols, const float alpha, const float* A, const int lda, float* B, const int ldb)
71 {
72  mkl_somatcopy(ordering,trans,rows,cols,alpha,A,lda,B,ldb);
73 }
74 template <> inline void
75 mkl_omatcopy<std::complex<double> >(const char ordering, const char trans, const int rows, const int cols, const std::complex<double> alpha, const std::complex<double>* A, const int lda, std::complex<double>* B, const int ldb)
76 {
77  mkl_zomatcopy(ordering,trans,rows,cols,alpha,A,lda,B,ldb);
78 }
79 template <> inline void
80 mkl_omatcopy<std::complex<float> >(const char ordering, const char trans, const int rows, const int cols, const std::complex<float> alpha, const std::complex<float>* A, const int lda, std::complex<float>* B, const int ldb)
81 {
82  mkl_comatcopy(ordering,trans,rows,cols,alpha,A,lda,B,ldb);
83 }
84 
87 }
88 
89 #endif
void mkl_imatcopy< float >(const char ordering, const char trans, const int rows, const int cols, const float alpha, float *A, const int lda, const int ldb)
Definition: utlMKL.h:49
void mkl_omatcopy(const char ordering, const char trans, const int rows, const int cols, const T alpha, const T *A, const int lda, T *B, const int ldb)
Definition: utl.h:90
void mkl_omatcopy< double >(const char ordering, const char trans, const int rows, const int cols, const double alpha, const double *A, const int lda, double *B, const int ldb)
Definition: utlMKL.h:65
void mkl_imatcopy(const char ordering, const char trans, const int rows, const int cols, const T alpha, T *A, const int lda, const int ldb)
void mkl_imatcopy< double >(const char ordering, const char trans, const int rows, const int cols, const double alpha, double *A, const int lda, const int ldb)
Definition: utlMKL.h:44
void mkl_omatcopy< float >(const char ordering, const char trans, const int rows, const int cols, const float alpha, const float *A, const int lda, float *B, const int ldb)
Definition: utlMKL.h:70