Tag: magma

在mex文件matlab中使用magma_dysevd

我尝试在matlab中编写使用magma库,所以我基本上编写了一个mex函数,它使用magma函数合并了c代码,然后将这个mex函数编译成mexa64文件,因此我可以在matlab中使用。 mexfunction或source c代码如下:(称为eig_magma) #include #include #include #include #include #include // includes, project #include “flops.h” #include “magma.h” #include “magma_lapack.h” #include “testings.h” #include #include “mex.h” #define A(i,j) A[i + j*lda] extern “C” void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { #define L_OUT plhs[0] #define A_IN prhs[0] #define S_OUT plhs[1] magma_init(); real_Double_t gpu_perf, gpu_time; double […]