forked from tsai/mathnet-numerics
28 changed files with 574 additions and 9347 deletions
@ -1,98 +0,0 @@ |
|||||
#include "acml.h" |
|
||||
#include "wrapper_common.h" |
|
||||
|
|
||||
enum TRANSPOSE {CblasNoTrans=111, CblasTrans=112, CblasConjTrans=113, CblasConjNoTrans=114}; |
|
||||
char getTransChar(TRANSPOSE); |
|
||||
|
|
||||
DLLEXPORT void s_axpy(const int n, const float alpha, float x[], float y[]){ |
|
||||
saxpy(n, alpha, x, 1, y, 1); |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT void d_axpy(const int n, const double alpha, double x[], double y[]){ |
|
||||
daxpy(n, alpha, x, 1, y, 1); |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT void c_axpy(const int n, complex alpha, complex x[], complex y[]){ |
|
||||
caxpy(n, &alpha, x, 1, y, 1); |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT void z_axpy(const int n, doublecomplex alpha, doublecomplex x[], doublecomplex y[]){ |
|
||||
zaxpy(n, &alpha, x, 1, y, 1); |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT void s_scale(const int n, const float alpha, float x[]){ |
|
||||
sscal(n, alpha, x, 1); |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT void d_scale(const int n, const double alpha, double x[]){ |
|
||||
dscal(n, alpha, x, 1); |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT void c_scale(const int n, complex alpha, complex x[]){ |
|
||||
cscal(n, &alpha, x, 1); |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT void z_scale(const int n, doublecomplex alpha, doublecomplex x[]){ |
|
||||
zscal(n, &alpha, x, 1); |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT float s_dot_product(const int n, float x[], float y[]){ |
|
||||
return sdot(n, x, 1, y, 1); |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT double d_dot_product(const int n, double x[], double y[]){ |
|
||||
return ddot(n, x, 1, y, 1); |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT complex c_dot_product(const int n, complex x[], complex y[]){ |
|
||||
return cdotu(n, x, 1, y, 1); |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT doublecomplex z_dot_product(int n, doublecomplex x[], doublecomplex y[]){ |
|
||||
return zdotu(n, x, 1, y, 1); |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT void s_matrix_multiply(const enum TRANSPOSE transA, const enum TRANSPOSE transB, const int m, const int n, const int k, float alpha, float x[], float y[], float beta, float c[]){ |
|
||||
int lda = transA == CblasNoTrans ? m : k; |
|
||||
int ldb = transB == CblasNoTrans ? k : n; |
|
||||
char transAchar = getTransChar(transA); |
|
||||
char transBchar = getTransChar(transB); |
|
||||
sgemm(transAchar, transBchar, m, n, k, alpha, x, lda, y, ldb, beta, c, m); |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT void d_matrix_multiply(const enum TRANSPOSE transA, const enum TRANSPOSE transB, const int m, const int n, const int k, double alpha, double x[], double y[], double beta, double c[]){ |
|
||||
int lda = transA == CblasNoTrans ? m : k; |
|
||||
int ldb = transB == CblasNoTrans ? k : n; |
|
||||
char transAchar = getTransChar(transA); |
|
||||
char transBchar = getTransChar(transB); |
|
||||
dgemm(transAchar, transBchar, m, n, k, alpha, x, lda, y, ldb, beta, c, m); |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT void c_matrix_multiply(const enum TRANSPOSE transA, const enum TRANSPOSE transB, const int m, const int n, const int k, complex alpha, complex x[], complex y[], complex beta, complex c[]){ |
|
||||
int lda = transA == CblasNoTrans ? m : k; |
|
||||
int ldb = transB == CblasNoTrans ? k : n; |
|
||||
char transAchar = getTransChar(transA); |
|
||||
char transBchar = getTransChar(transB); |
|
||||
cgemm(transAchar, transBchar, m, n, k, &alpha, x, lda, y, ldb, &beta, c, m); |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT void z_matrix_multiply(const enum TRANSPOSE transA, const enum TRANSPOSE transB, const int m, const int n, const int k, doublecomplex alpha, doublecomplex x[], doublecomplex y[], doublecomplex beta, doublecomplex c[]){ |
|
||||
int lda = transA == CblasNoTrans ? m : k; |
|
||||
int ldb = transB == CblasNoTrans ? k : n; |
|
||||
char transAchar = getTransChar(transA); |
|
||||
char transBchar = getTransChar(transB); |
|
||||
zgemm(transAchar, transBchar, m, n, k, &alpha, x, lda, y, ldb, &beta, c, m); |
|
||||
} |
|
||||
|
|
||||
char getTransChar(enum TRANSPOSE trans){ |
|
||||
char cTrans; |
|
||||
switch( trans ){ |
|
||||
case CblasNoTrans : cTrans = 'N'; |
|
||||
break; |
|
||||
case CblasTrans : cTrans = 'T'; |
|
||||
break; |
|
||||
case CblasConjTrans : cTrans = 'C'; |
|
||||
break; |
|
||||
} |
|
||||
return cTrans; |
|
||||
} |
|
||||
@ -1,927 +0,0 @@ |
|||||
#include "acml.h" |
|
||||
#include "wrapper_common.h" |
|
||||
#include <algorithm> |
|
||||
|
|
||||
extern "C"{ |
|
||||
|
|
||||
DLLEXPORT int s_lu_factor(int m, float a[], int ipiv[]) |
|
||||
{ |
|
||||
int info = 0; |
|
||||
sgetrf(m, m, a, m,ipiv,&info); |
|
||||
for(int i = 0; i < m; ++i ){ |
|
||||
ipiv[i] -= 1; |
|
||||
} |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int d_lu_factor(int m, double a[], int ipiv[]) |
|
||||
{ |
|
||||
int info = 0; |
|
||||
dgetrf(m, m,a, m, ipiv, &info); |
|
||||
for(int i = 0; i < m; ++i ){ |
|
||||
ipiv[i] -= 1; |
|
||||
} |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int c_lu_factor(int m, complex a[], int ipiv[]) |
|
||||
{ |
|
||||
int info = 0; |
|
||||
cgetrf(m, m, a, m,ipiv, &info); |
|
||||
for(int i = 0; i < m; ++i ){ |
|
||||
ipiv[i] -= 1; |
|
||||
} |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int z_lu_factor(int m, doublecomplex a[], int ipiv[]) |
|
||||
{ |
|
||||
int info = 0; |
|
||||
zgetrf(m, m, a, m, ipiv, &info); |
|
||||
for(int i = 0; i < m; ++i ){ |
|
||||
ipiv[i] -= 1; |
|
||||
} |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int s_lu_inverse(int n, float a[], float work[], int lwork) |
|
||||
{ |
|
||||
int* ipiv = new int[n]; |
|
||||
int info = 0; |
|
||||
sgetrf(n, n, a, n, ipiv, &info); |
|
||||
|
|
||||
if (info != 0){ |
|
||||
delete[] ipiv; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
SGETRI(&n, a, &n, ipiv, work, &lwork, &info); |
|
||||
delete[] ipiv; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int d_lu_inverse(int n, double a[], double work[], int lwork) |
|
||||
{ |
|
||||
int* ipiv = new int[n]; |
|
||||
int info = 0; |
|
||||
dgetrf(n, n, a, n, ipiv, &info); |
|
||||
|
|
||||
if (info != 0){ |
|
||||
delete[] ipiv; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DGETRI(&n, a, &n, ipiv, work, &lwork, &info); |
|
||||
delete[] ipiv; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int c_lu_inverse(int n, complex a[], complex work[], int lwork) |
|
||||
{ |
|
||||
int* ipiv = new int[n]; |
|
||||
int info = 0; |
|
||||
cgetrf(n, n, a, n, ipiv, &info); |
|
||||
|
|
||||
if (info != 0){ |
|
||||
delete[] ipiv; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
CGETRI(&n, a, &n, ipiv, work, &lwork, &info); |
|
||||
delete[] ipiv; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int z_lu_inverse(int n, doublecomplex a[], doublecomplex work[], int lwork) |
|
||||
{ |
|
||||
int* ipiv = new int[n]; |
|
||||
int info = 0; |
|
||||
zgetrf(n, n, a, n, ipiv, &info); |
|
||||
|
|
||||
if (info != 0){ |
|
||||
delete[] ipiv; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
ZGETRI(&n, a, &n, ipiv, work, &lwork, &info); |
|
||||
delete[] ipiv; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int s_lu_inverse_factored(int n, float a[], int ipiv[], float work[], int lwork) |
|
||||
{ |
|
||||
int i; |
|
||||
for(i = 0; i < n; ++i ){ |
|
||||
ipiv[i] += 1; |
|
||||
} |
|
||||
int info = 0; |
|
||||
SGETRI(&n, a, &n, ipiv, work, &lwork, &info); |
|
||||
|
|
||||
for(i = 0; i < n; ++i ){ |
|
||||
ipiv[i] -= 1; |
|
||||
} |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int d_lu_inverse_factored(int n, double a[], int ipiv[], double work[], int lwork) |
|
||||
{ |
|
||||
int i; |
|
||||
for(i = 0; i < n; ++i ){ |
|
||||
ipiv[i] += 1; |
|
||||
} |
|
||||
|
|
||||
int info = 0; |
|
||||
DGETRI(&n, a, &n, ipiv, work, &lwork, &info); |
|
||||
|
|
||||
for(i = 0; i < n; ++i ){ |
|
||||
ipiv[i] -= 1; |
|
||||
} |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int c_lu_inverse_factored(int n, complex a[], int ipiv[], complex work[], int lwork) |
|
||||
{ |
|
||||
int i; |
|
||||
for(i = 0; i < n; ++i ){ |
|
||||
ipiv[i] += 1; |
|
||||
} |
|
||||
|
|
||||
int info = 0; |
|
||||
CGETRI(&n, a, &n, ipiv, work, &lwork, &info); |
|
||||
|
|
||||
for(i = 0; i < n; ++i ){ |
|
||||
ipiv[i] -= 1; |
|
||||
} |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int z_lu_inverse_factored(int n, doublecomplex a[], int ipiv[], doublecomplex work[], int lwork) |
|
||||
{ |
|
||||
int i; |
|
||||
for(i = 0; i < n; ++i ){ |
|
||||
ipiv[i] += 1; |
|
||||
} |
|
||||
|
|
||||
int info = 0; |
|
||||
ZGETRI(&n, a, &n, ipiv, work, &lwork, &info); |
|
||||
|
|
||||
for(i = 0; i < n; ++i ){ |
|
||||
ipiv[i] -= 1; |
|
||||
} |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int s_lu_solve_factored(int n, int nrhs, float a[], int ipiv[], float b[]) |
|
||||
{ |
|
||||
int info = 0; |
|
||||
int i; |
|
||||
for(i = 0; i < n; ++i ){ |
|
||||
ipiv[i] += 1; |
|
||||
} |
|
||||
|
|
||||
char trans ='N'; |
|
||||
sgetrs(trans, n, nrhs, a, n, ipiv, b, n, &info); |
|
||||
for(i = 0; i < n; ++i ){ |
|
||||
ipiv[i] -= 1; |
|
||||
} |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int d_lu_solve_factored(int n, int nrhs, double a[], int ipiv[], double b[]) |
|
||||
{ |
|
||||
int info = 0; |
|
||||
int i; |
|
||||
for(i = 0; i < n; ++i ){ |
|
||||
ipiv[i] += 1; |
|
||||
} |
|
||||
|
|
||||
char trans ='N'; |
|
||||
dgetrs(trans, n, nrhs, a, n, ipiv, b, n, &info); |
|
||||
for(i = 0; i < n; ++i ){ |
|
||||
ipiv[i] -= 1; |
|
||||
} |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int c_lu_solve_factored(int n, int nrhs, complex a[], int ipiv[], complex b[]) |
|
||||
{ |
|
||||
int info = 0; |
|
||||
int i; |
|
||||
for(i = 0; i < n; ++i ){ |
|
||||
ipiv[i] += 1; |
|
||||
} |
|
||||
|
|
||||
char trans ='N'; |
|
||||
cgetrs(trans, n, nrhs, a, n, ipiv, b, n, &info); |
|
||||
for(i = 0; i < n; ++i ){ |
|
||||
ipiv[i] -= 1; |
|
||||
} |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int z_lu_solve_factored(int n, int nrhs, doublecomplex a[], int ipiv[], doublecomplex b[]) |
|
||||
{ |
|
||||
int info = 0; |
|
||||
int i; |
|
||||
for(i = 0; i < n; ++i ){ |
|
||||
ipiv[i] += 1; |
|
||||
} |
|
||||
|
|
||||
char trans ='N'; |
|
||||
zgetrs(trans, n, nrhs, a, n, ipiv, b, n, &info); |
|
||||
for(i = 0; i < n; ++i ){ |
|
||||
ipiv[i] -= 1; |
|
||||
} |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int s_lu_solve(int n, int nrhs, float a[], float b[]) |
|
||||
{ |
|
||||
float* clone = new float[n*n]; |
|
||||
std::memcpy(clone, a, n*n*sizeof(float)); |
|
||||
|
|
||||
int* ipiv = new int[n]; |
|
||||
int info = 0; |
|
||||
sgetrf(n, n, clone, n, ipiv, &info); |
|
||||
|
|
||||
if (info != 0){ |
|
||||
delete[] ipiv; |
|
||||
delete[] clone; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
char trans ='N'; |
|
||||
sgetrs(trans, n, nrhs, clone, n, ipiv, b, n, &info); |
|
||||
delete[] ipiv; |
|
||||
delete[] clone; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int d_lu_solve(int n, int nrhs, double a[], double b[]) |
|
||||
{ |
|
||||
double* clone = new double[n*n]; |
|
||||
std::memcpy(clone, a, n*n*sizeof(double)); |
|
||||
|
|
||||
int* ipiv = new int[n]; |
|
||||
int info = 0; |
|
||||
dgetrf(n, n, clone, n, ipiv, &info); |
|
||||
|
|
||||
if (info != 0){ |
|
||||
delete[] ipiv; |
|
||||
delete[] clone; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
char trans ='N'; |
|
||||
dgetrs(trans, n, nrhs, clone, n, ipiv, b, n, &info); |
|
||||
delete[] ipiv; |
|
||||
delete[] clone; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int c_lu_solve(int n, int nrhs, complex a[], complex b[]) |
|
||||
{ |
|
||||
complex* clone = new complex[n*n]; |
|
||||
std::memcpy(clone, a, n*n*sizeof(complex)); |
|
||||
|
|
||||
int* ipiv = new int[n]; |
|
||||
int info = 0; |
|
||||
cgetrf(n, n, clone, n, ipiv, &info); |
|
||||
|
|
||||
if (info != 0){ |
|
||||
delete[] ipiv; |
|
||||
delete[] clone; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
char trans ='N'; |
|
||||
cgetrs(trans, n, nrhs, clone, n, ipiv, b, n, &info); |
|
||||
delete[] ipiv; |
|
||||
delete[] clone; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int z_lu_solve(int n, int nrhs, doublecomplex a[], doublecomplex b[]) |
|
||||
{ |
|
||||
doublecomplex* clone = new doublecomplex[n*n]; |
|
||||
std::memcpy(clone, a, n*n*sizeof(doublecomplex)); |
|
||||
|
|
||||
int* ipiv = new int[n]; |
|
||||
int info = 0; |
|
||||
zgetrf(n, n, clone, n, ipiv, &info); |
|
||||
|
|
||||
if (info != 0){ |
|
||||
delete[] ipiv; |
|
||||
delete[] clone; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
char trans ='N'; |
|
||||
zgetrs(trans, n, nrhs, clone, n, ipiv, b, n, &info); |
|
||||
delete[] ipiv; |
|
||||
delete[] clone; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int s_cholesky_factor(int n, float a[]){ |
|
||||
char uplo = 'L'; |
|
||||
int info = 0; |
|
||||
spotrf(uplo, n, a, n, &info); |
|
||||
for (int i = 0; i < n; ++i) |
|
||||
{ |
|
||||
int index = i * n; |
|
||||
for (int j = 0; j < n && i > j; ++j) |
|
||||
{ |
|
||||
a[index + j] = 0; |
|
||||
} |
|
||||
} |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int d_cholesky_factor(int n, double* a){ |
|
||||
char uplo = 'L'; |
|
||||
int info = 0; |
|
||||
dpotrf(uplo, n, a, n, &info); |
|
||||
for (int i = 0; i < n; ++i) |
|
||||
{ |
|
||||
int index = i * n; |
|
||||
for (int j = 0; j < n && i > j; ++j) |
|
||||
{ |
|
||||
a[index + j] = 0; |
|
||||
} |
|
||||
} |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int c_cholesky_factor(int n, complex a[]){ |
|
||||
char uplo = 'L'; |
|
||||
int info = 0; |
|
||||
complex zero = {0.0f, 0.0f}; |
|
||||
cpotrf(uplo, n, a, n, &info); |
|
||||
for (int i = 0; i < n; ++i) |
|
||||
{ |
|
||||
int index = i * n; |
|
||||
for (int j = 0; j < n && i > j; ++j) |
|
||||
{ |
|
||||
a[index + j] = zero; |
|
||||
} |
|
||||
} |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int z_cholesky_factor(int n, doublecomplex a[]){ |
|
||||
char uplo = 'L'; |
|
||||
int info = 0; |
|
||||
doublecomplex zero = {0.0, 0.0}; |
|
||||
zpotrf(uplo, n, a, n, &info); |
|
||||
for (int i = 0; i < n; ++i) |
|
||||
{ |
|
||||
int index = i * n; |
|
||||
for (int j = 0; j < n && i > j; ++j) |
|
||||
{ |
|
||||
a[index + j] = zero; |
|
||||
} |
|
||||
} |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int s_cholesky_solve(int n, int nrhs, float a[], float b[]) |
|
||||
{ |
|
||||
float* clone = new float[n*n]; |
|
||||
std::memcpy(clone, a, n*n*sizeof(float)); |
|
||||
char uplo = 'L'; |
|
||||
int info = 0; |
|
||||
spotrf(uplo, n, clone, n, &info); |
|
||||
|
|
||||
if (info != 0){ |
|
||||
delete[] clone; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
spotrs(uplo, n, nrhs, clone, n, b, n, &info); |
|
||||
delete[] clone; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int d_cholesky_solve(int n, int nrhs, double a[], double b[]) |
|
||||
{ |
|
||||
double* clone = new double[n*n]; |
|
||||
std::memcpy(clone, a, n*n*sizeof(double)); |
|
||||
char uplo = 'L'; |
|
||||
int info = 0; |
|
||||
dpotrf(uplo, n, clone, n, &info); |
|
||||
|
|
||||
if (info != 0){ |
|
||||
delete[] clone; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
dpotrs(uplo, n, nrhs, clone, n, b, n, &info); |
|
||||
delete[] clone; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int c_cholesky_solve(int n, int nrhs, complex a[], complex b[]) |
|
||||
{ |
|
||||
complex* clone = new complex[n*n]; |
|
||||
std::memcpy(clone, a, n*n*sizeof(complex)); |
|
||||
char uplo = 'L'; |
|
||||
int info = 0; |
|
||||
cpotrf(uplo, n, clone, n, &info); |
|
||||
|
|
||||
if (info != 0){ |
|
||||
delete[] clone; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
cpotrs(uplo, n, nrhs, clone, n, b, n, &info); |
|
||||
delete[] clone; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int z_cholesky_solve(int n, int nrhs, doublecomplex a[], doublecomplex b[]) |
|
||||
{ |
|
||||
doublecomplex* clone = new doublecomplex[n*n]; |
|
||||
std::memcpy(clone, a, n*n*sizeof(doublecomplex)); |
|
||||
char uplo = 'L'; |
|
||||
int info = 0; |
|
||||
zpotrf(uplo, n, clone, n, &info); |
|
||||
|
|
||||
if (info != 0){ |
|
||||
delete[] clone; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
zpotrs(uplo, n, nrhs, clone, n, b, n, &info); |
|
||||
delete[] clone; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int s_cholesky_solve_factored(int n, int nrhs, float a[], float b[]) |
|
||||
{ |
|
||||
char uplo = 'L'; |
|
||||
int info = 0; |
|
||||
spotrs(uplo, n, nrhs, a, n, b, n, &info); |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int d_cholesky_solve_factored(int n, int nrhs, double a[], double b[]) |
|
||||
{ |
|
||||
char uplo = 'L'; |
|
||||
int info = 0; |
|
||||
dpotrs(uplo, n, nrhs, a, n, b, n, &info); |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int c_cholesky_solve_factored(int n, int nrhs, complex a[], complex b[]) |
|
||||
{ |
|
||||
char uplo = 'L'; |
|
||||
int info = 0; |
|
||||
cpotrs(uplo, n, nrhs, a, n, b, n, &info); |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int z_cholesky_solve_factored(int n, int nrhs, doublecomplex a[], doublecomplex b[]) |
|
||||
{ |
|
||||
char uplo = 'L'; |
|
||||
int info = 0; |
|
||||
zpotrs(uplo, n, nrhs, a, n, b, n, &info); |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int s_qr_factor(int m, int n, float r[], float tau[], float q[], float work[], int len) |
|
||||
{ |
|
||||
int info = 0; |
|
||||
SGEQRF(&m, &n, r, &m, tau, work, &len, &info); |
|
||||
|
|
||||
for (int i = 0; i < m; ++i) |
|
||||
{ |
|
||||
for (int j = 0; j < m && j < n; ++j) |
|
||||
{ |
|
||||
if (i > j) |
|
||||
{ |
|
||||
q[j * m + i] = r[j * m + i]; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
//compute the q elements explicitly
|
|
||||
if (m <= n) |
|
||||
{ |
|
||||
SORGQR(&m, &m, &m, q, &m, tau, work, &len, &info); |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
SORGQR(&m, &n, &n, q, &m, tau, work, &len, &info); |
|
||||
} |
|
||||
|
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int d_qr_factor(int m, int n, double r[], double tau[], double q[], double work[], int len) |
|
||||
{ |
|
||||
int info = 0; |
|
||||
DGEQRF(&m, &n, r, &m, tau, work, &len, &info); |
|
||||
|
|
||||
for (int i = 0; i < m; ++i) |
|
||||
{ |
|
||||
for (int j = 0; j < m && j < n; ++j) |
|
||||
{ |
|
||||
if (i > j) |
|
||||
{ |
|
||||
q[j * m + i] = r[j * m + i]; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
//compute the q elements explicitly
|
|
||||
if (m <= n) |
|
||||
{ |
|
||||
DORGQR(&m, &m, &m, q, &m, tau, work, &len, &info); |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
DORGQR(&m, &n, &n, q, &m, tau, work, &len, &info); |
|
||||
} |
|
||||
|
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int c_qr_factor(int m, int n, complex r[], complex tau[], complex q[], complex work[], int len) |
|
||||
{ |
|
||||
int info = 0; |
|
||||
CGEQRF(&m, &n, r, &m, tau, work, &len, &info); |
|
||||
|
|
||||
for (int i = 0; i < m; ++i) |
|
||||
{ |
|
||||
for (int j = 0; j < m && j < n; ++j) |
|
||||
{ |
|
||||
if (i > j) |
|
||||
{ |
|
||||
q[j * m + i] = r[j * m + i]; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
//compute the q elements explicitly
|
|
||||
if (m <= n) |
|
||||
{ |
|
||||
CUNGQR(&m, &m, &m, q, &m, tau, work, &len, &info); |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
CUNGQR(&m, &n, &n, q, &m, tau, work, &len, &info); |
|
||||
} |
|
||||
|
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int z_qr_factor(int m, int n, doublecomplex r[], doublecomplex tau[], doublecomplex q[], doublecomplex work[], int len) |
|
||||
{ |
|
||||
int info = 0; |
|
||||
ZGEQRF(&m, &n, r, &m, tau, work, &len, &info); |
|
||||
|
|
||||
for (int i = 0; i < m; ++i) |
|
||||
{ |
|
||||
for (int j = 0; j < m && j < n; ++j) |
|
||||
{ |
|
||||
if (i > j) |
|
||||
{ |
|
||||
q[j * m + i] = r[j * m + i]; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
//compute the q elements explicitly
|
|
||||
if (m <= n) |
|
||||
{ |
|
||||
ZUNGQR(&m, &m, &m, q, &m, tau, work, &len, &info); |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
ZUNGQR(&m, &n, &n, q, &m, tau, work, &len, &info); |
|
||||
} |
|
||||
|
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int s_qr_solve(int m, int n, int bn, float r[], float b[], float x[], float work[], int len) |
|
||||
{ |
|
||||
int info = 0; |
|
||||
float* clone_r = new float[m*n]; |
|
||||
std::memcpy(clone_r, r, m*n*sizeof(float)); |
|
||||
|
|
||||
float* tau = new float[std::max(1, std::min(m,n))]; |
|
||||
SGEQRF(&m, &n, clone_r, &m, tau, work, &len, &info); |
|
||||
|
|
||||
if (info != 0) |
|
||||
{ |
|
||||
delete[] clone_r; |
|
||||
delete[] tau; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
float* clone_b = new float[m*bn]; |
|
||||
std::memcpy(clone_b, b, m*bn*sizeof(float)); |
|
||||
|
|
||||
char side ='L'; |
|
||||
char tran = 'T'; |
|
||||
char upper = 'U'; |
|
||||
char not = 'N'; |
|
||||
SORMQR(&side, &tran, &m, &bn, &n, clone_r, &m, tau, clone_b, &m, work, &len, &info, 1, 1); |
|
||||
strsm(side, upper, not, not, n, bn, 1.0, clone_r, m, clone_b, m); |
|
||||
for (int i = 0; i < n; ++i) |
|
||||
{ |
|
||||
for (int j = 0; j < bn; ++j) |
|
||||
{ |
|
||||
x[j * n + i] = clone_b[j * m + i]; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
delete[] clone_r; |
|
||||
delete[] tau; |
|
||||
delete[] clone_b; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int d_qr_solve(int m, int n, int bn, double r[], double b[], double x[], double work[], int len) |
|
||||
{ |
|
||||
int info = 0; |
|
||||
double* clone_r = new double[m*n]; |
|
||||
std::memcpy(clone_r, r, m*n*sizeof(double)); |
|
||||
|
|
||||
double* tau = new double[std::max(1, std::min(m,n))]; |
|
||||
DGEQRF(&m, &n, clone_r, &m, tau, work, &len, &info); |
|
||||
|
|
||||
if (info != 0) |
|
||||
{ |
|
||||
delete[] clone_r; |
|
||||
delete[] tau; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
double* clone_b = new double[m*bn]; |
|
||||
std::memcpy(clone_b, b, m*bn*sizeof(double)); |
|
||||
|
|
||||
char side ='L'; |
|
||||
char tran = 'T'; |
|
||||
char upper = 'U'; |
|
||||
char not = 'N'; |
|
||||
|
|
||||
DORMQR(&side, &tran, &m, &bn, &n, clone_r, &m, tau, clone_b, &m, work, &len, &info, 1, 1); |
|
||||
dtrsm(side, upper, not, not, n, bn, 1.0, clone_r, m, clone_b, m); |
|
||||
for (int i = 0; i < n; ++i) |
|
||||
{ |
|
||||
for (int j = 0; j < bn; ++j) |
|
||||
{ |
|
||||
x[j * n + i] = clone_b[j * m + i]; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
delete[] clone_b; |
|
||||
delete[] tau; |
|
||||
delete[] clone_r; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int c_qr_solve(int m, int n, int bn, complex r[], complex b[], complex x[], complex work[], int len) |
|
||||
{ |
|
||||
int info = 0; |
|
||||
complex* clone_r = new complex[m*n]; |
|
||||
std::memcpy(clone_r, r, m*n*sizeof(complex)); |
|
||||
|
|
||||
complex* tau = new complex[std::min(m,n)]; |
|
||||
CGEQRF(&m, &n, clone_r, &m, tau, work, &len, &info); |
|
||||
|
|
||||
if (info != 0) |
|
||||
{ |
|
||||
delete[] clone_r; |
|
||||
delete[] tau; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
char side ='L'; |
|
||||
char tran = 'C'; |
|
||||
char upper = 'U'; |
|
||||
char not = 'N'; |
|
||||
|
|
||||
complex* clone_b = new complex[m*bn]; |
|
||||
std::memcpy(clone_b, b, m*bn*sizeof(complex)); |
|
||||
|
|
||||
CUNMQR(&side, &tran, &m, &bn, &n, clone_r, &m, tau, clone_b, &m, work, &len, &info, 1, 1); |
|
||||
complex one = {1.0, 0.0}; |
|
||||
ctrsm(side, upper, not, not, n, bn, &one, clone_r, m, clone_b, m); |
|
||||
|
|
||||
for (int i = 0; i < n; ++i) |
|
||||
{ |
|
||||
for (int j = 0; j < bn; ++j) |
|
||||
{ |
|
||||
x[j * n + i] = clone_b[j * m + i]; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
delete[] clone_r; |
|
||||
delete[] tau; |
|
||||
delete[] clone_b; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int z_qr_solve(int m, int n, int bn, doublecomplex r[], doublecomplex b[], doublecomplex x[], doublecomplex work[], int len) |
|
||||
{ |
|
||||
int info = 0; |
|
||||
doublecomplex* clone_r = new doublecomplex[m*n]; |
|
||||
std::memcpy(clone_r, r, m*n*sizeof(doublecomplex)); |
|
||||
|
|
||||
doublecomplex* tau = new doublecomplex[std::min(m,n)]; |
|
||||
ZGEQRF(&m, &n, clone_r, &m, tau, work, &len, &info); |
|
||||
|
|
||||
if (info != 0) |
|
||||
{ |
|
||||
delete[] clone_r; |
|
||||
delete[] tau; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
char side ='L'; |
|
||||
char tran = 'C'; |
|
||||
char upper = 'U'; |
|
||||
char not = 'N'; |
|
||||
|
|
||||
doublecomplex* clone_b = new doublecomplex[m*bn]; |
|
||||
std::memcpy(clone_b, b, m*bn*sizeof(doublecomplex)); |
|
||||
|
|
||||
ZUNMQR(&side, &tran, &m, &bn, &n, clone_r, &m, tau, clone_b, &m, work, &len, &info, 1, 1); |
|
||||
doublecomplex one = {1.0, 0.0}; |
|
||||
ztrsm(side, upper, not, not, n, bn, &one, clone_r, m, clone_b, m); |
|
||||
|
|
||||
for (int i = 0; i < n; ++i) |
|
||||
{ |
|
||||
for (int j = 0; j < bn; ++j) |
|
||||
{ |
|
||||
x[j * n + i] = clone_b[j * m + i]; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
delete[] clone_r; |
|
||||
delete[] tau; |
|
||||
delete[] clone_b; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int s_qr_solve_factored(int m, int n, int bn, float r[], float b[], float tau[], float x[], float work[], int len) |
|
||||
{ |
|
||||
char side ='L'; |
|
||||
char tran = 'T'; |
|
||||
char upper = 'U'; |
|
||||
char not = 'N'; |
|
||||
int info = 0; |
|
||||
|
|
||||
float* clone_b = new float[m*bn]; |
|
||||
std::memcpy(clone_b, b, m*bn*sizeof(float)); |
|
||||
|
|
||||
SORMQR(&side, &tran, &m, &bn, &n, r, &m, tau, clone_b, &m, work, &len, &info, 1, 1); |
|
||||
strsm(side, upper, not, not, n, bn, 1.0, r, m, clone_b, m); |
|
||||
for (int i = 0; i < n; ++i) |
|
||||
{ |
|
||||
for (int j = 0; j < bn; ++j) |
|
||||
{ |
|
||||
x[j * n + i] = clone_b[j * m + i]; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
delete[] clone_b; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int d_qr_solve_factored(int m, int n, int bn, double r[], double b[], double tau[], double x[], double work[], int len) |
|
||||
{ |
|
||||
char side ='L'; |
|
||||
char tran = 'T'; |
|
||||
char upper = 'U'; |
|
||||
char not = 'N'; |
|
||||
int info = 0; |
|
||||
|
|
||||
double* clone_b = new double[m*bn]; |
|
||||
std::memcpy(clone_b, b, m*bn*sizeof(double)); |
|
||||
|
|
||||
DORMQR(&side, &tran, &m, &bn, &n, r, &m, tau, clone_b, &m, work, &len, &info, 1, 1); |
|
||||
dtrsm(side, upper, not, not, n, bn, 1.0, r, m, clone_b, m); |
|
||||
for (int i = 0; i < n; ++i) |
|
||||
{ |
|
||||
for (int j = 0; j < bn; ++j) |
|
||||
{ |
|
||||
x[j * n + i] = clone_b[j * m + i]; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
delete[] clone_b; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int c_qr_solve_factored(int m, int n, int bn, complex r[], complex b[], complex tau[], complex x[], complex work[], int len) |
|
||||
{ |
|
||||
char side ='L'; |
|
||||
char tran = 'C'; |
|
||||
char upper = 'U'; |
|
||||
char not = 'N'; |
|
||||
int info = 0; |
|
||||
|
|
||||
complex* clone_b = new complex[m*bn]; |
|
||||
std::memcpy(clone_b, b, m*bn*sizeof(complex)); |
|
||||
|
|
||||
CUNMQR(&side, &tran, &m, &bn, &n, r, &m, tau, clone_b, &m, work, &len, &info, 1, 1); |
|
||||
complex one = {1.0f, 0.0f}; |
|
||||
ctrsm(side, upper, not, not, n, bn, &one, r, m, clone_b, m); |
|
||||
for (int i = 0; i < n; ++i) |
|
||||
{ |
|
||||
for (int j = 0; j < bn; ++j) |
|
||||
{ |
|
||||
x[j * n + i] = clone_b[j * m + i]; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
delete[] clone_b; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int z_qr_solve_factored(int m, int n, int bn, doublecomplex r[], doublecomplex b[], doublecomplex tau[], doublecomplex x[], doublecomplex work[], int len) |
|
||||
{ |
|
||||
char side ='L'; |
|
||||
char tran = 'C'; |
|
||||
char upper = 'U'; |
|
||||
char not = 'N'; |
|
||||
int info = 0; |
|
||||
|
|
||||
doublecomplex* clone_b = new doublecomplex[m*bn]; |
|
||||
std::memcpy(clone_b, b, m*bn*sizeof(doublecomplex)); |
|
||||
|
|
||||
ZUNMQR(&side, &tran, &m, &bn, &n, r, &m, tau, clone_b, &m, work, &len, &info, 1, 1); |
|
||||
doublecomplex one = {1.0, 0.0}; |
|
||||
ztrsm(side, upper, not, not, n, bn, &one, r, m, clone_b, m); |
|
||||
|
|
||||
for (int i = 0; i < n; ++i) |
|
||||
{ |
|
||||
for (int j = 0; j < bn; ++j) |
|
||||
{ |
|
||||
x[j * n + i] = clone_b[j * m + i]; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
delete[] clone_b; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int s_svd_factor(bool compute_vectors, int m, int n, float a[], float s[], float u[], float v[], float work[], int len) |
|
||||
{ |
|
||||
int info = 0; |
|
||||
char job = compute_vectors ? 'A' : 'N'; |
|
||||
SGESVD(&job, &job, &m, &n, a, &m, s, u, &m, v, &n, work, &len, &info, 1, 1); |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int d_svd_factor(bool compute_vectors, int m, int n, double a[], double s[], double u[], double v[], double work[], int len) |
|
||||
{ |
|
||||
int info = 0; |
|
||||
char job = compute_vectors ? 'A' : 'N'; |
|
||||
DGESVD(&job, &job, &m, &n, a, &m, s, u, &m, v, &n, work, &len, &info, 1, 1); |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int c_svd_factor(bool compute_vectors, int m, int n, complex a[], complex s[], complex u[], complex v[], complex work[], int len) |
|
||||
{ |
|
||||
int info = 0; |
|
||||
int dim_s = std::min(m,n); |
|
||||
float* rwork = new float[5 * dim_s]; |
|
||||
float* s_local = new float[dim_s]; |
|
||||
char job = compute_vectors ? 'A' : 'N'; |
|
||||
CGESVD(&job, &job, &m, &n, a, &m, s_local, u, &m, v, &n, work, &len, rwork, &info, 1 ,1); |
|
||||
|
|
||||
for(int index = 0; index < dim_s; ++index){ |
|
||||
complex value = {s_local[index], 0.0f}; |
|
||||
s[index] = value; |
|
||||
} |
|
||||
|
|
||||
delete[] rwork; |
|
||||
delete[] s_local; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT int z_svd_factor(bool compute_vectors, int m, int n, doublecomplex a[], doublecomplex s[], doublecomplex u[], doublecomplex v[], doublecomplex work[], int len) |
|
||||
{ |
|
||||
int info = 0; |
|
||||
int dim_s = std::min(m,n); |
|
||||
double* rwork = new double[5 * std::min(m, n)]; |
|
||||
double* s_local = new double[dim_s]; |
|
||||
char job = compute_vectors ? 'A' : 'N'; |
|
||||
ZGESVD(&job, &job, &m, &n, a, &m, s_local, u, &m, v, &n, work, &len, rwork, &info, 1, 1); |
|
||||
|
|
||||
for(int index = 0; index < dim_s; ++index){ |
|
||||
doublecomplex value = {s_local[index], 0.0f}; |
|
||||
s[index] = value; |
|
||||
} |
|
||||
|
|
||||
delete[] rwork; |
|
||||
delete[] s_local; |
|
||||
return info; |
|
||||
} |
|
||||
} |
|
||||
@ -1,124 +0,0 @@ |
|||||
#include "wrapper_common.h" |
|
||||
#include "f2c.h" |
|
||||
|
|
||||
enum TRANSPOSE {CblasNoTrans=111, CblasTrans=112, CblasConjTrans=113, CblasConjNoTrans=114}; |
|
||||
|
|
||||
void SAXPY(integer*, float*, float *x, integer* incx, float *y, integer* incy); |
|
||||
void DAXPY(integer*, double*, double *x, integer* incx, double *y, integer* incy); |
|
||||
void CAXPY(integer*, complex*, complex *x, integer* incx, complex *y, integer* incy); |
|
||||
void ZAXPY(integer*, doublecomplex*, doublecomplex *x, integer* incx, doublecomplex *y, integer* incy); |
|
||||
|
|
||||
void SSCAL(integer*, float* alpha, float*, integer*); |
|
||||
void DSCAL(integer*, double* alpha, double*, integer*); |
|
||||
void CSCAL(integer*, complex* alpha, complex*, integer*); |
|
||||
void ZSCAL(integer*, doublecomplex* alpha, doublecomplex*, integer*); |
|
||||
|
|
||||
float SDOT(integer*, float*, integer*, float*, integer*); |
|
||||
double DDOT(integer*, double*, integer*, double*, integer*); |
|
||||
complex CDOTU(integer*, complex*, integer*, complex*, integer*); |
|
||||
doublecomplex ZDOTU(integer*, doublecomplex*, integer*, doublecomplex*, integer*); |
|
||||
|
|
||||
void SGEMM(char*, char*, integer*, integer*, integer*, float*, float*, integer*, float*, integer*, float*, float*, integer*); |
|
||||
void DGEMM(char*, char*, integer*, integer*, integer*, double*, double*, integer*, double*, integer*, double*, double*, integer*); |
|
||||
void CGEMM(char*, char*, integer*, integer*, integer*, complex*, complex*, integer*, complex*, integer*, complex*, complex*, integer*); |
|
||||
void ZGEMM(char*, char*, integer*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*, doublecomplex*, doublecomplex*, integer*); |
|
||||
|
|
||||
char getTransChar(TRANSPOSE); |
|
||||
|
|
||||
|
|
||||
integer one = 1; |
|
||||
|
|
||||
DLLEXPORT void s_axpy(integer n, float alpha, float x[], float y[]){ |
|
||||
|
|
||||
SAXPY(&n, &alpha, x, &one, y, &one); |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT void d_axpy(integer n, double alpha, double x[], double y[]){ |
|
||||
DAXPY(&n, &alpha, x, &one, y, &one); |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT void c_axpy(integer n, complex alpha, complex x[], complex y[]){ |
|
||||
CAXPY(&n, &alpha, x, &one, y, &one); |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT void z_axpy(integer n, doublecomplex alpha, doublecomplex x[], doublecomplex y[]){ |
|
||||
ZAXPY(&n, &alpha, x, &one, y, &one); |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT void s_scale(integer n, float alpha, float x[]){ |
|
||||
SSCAL(&n, &alpha, x, &one); |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT void d_scale(integer n, double alpha, double x[]){ |
|
||||
DSCAL(&n, &alpha, x, &one); |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT void c_scale(integer n, complex alpha, complex x[]){ |
|
||||
CSCAL(&n, &alpha, x, &one); |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT void z_scale(integer n, doublecomplex alpha, doublecomplex x[]){ |
|
||||
ZSCAL(&n, &alpha, x, &one); |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT float s_dot_product(integer n, float x[], float y[]){ |
|
||||
return SDOT(&n, x, &one, y, &one); |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT double d_dot_product(integer n, double x[], double y[]){ |
|
||||
return DDOT(&n, x, &one, y, &one); |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT complex c_dot_product(integer n, complex x[], complex y[]){ |
|
||||
return CDOTU(&n, x, &one, y, &one); |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT doublecomplex z_dot_product(integer n, doublecomplex x[], doublecomplex y[]){ |
|
||||
return ZDOTU(&n, x, &one, y, &one); |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT void s_matrix_multiply(enum TRANSPOSE transA, enum TRANSPOSE transB, integer m, integer n, integer k, float alpha, float x[], float y[], float beta, float c[]){ |
|
||||
integer lda = transA == CblasNoTrans ? m : k; |
|
||||
integer ldb = transB == CblasNoTrans ? k : n; |
|
||||
char transAchar = getTransChar(transA); |
|
||||
char transBchar = getTransChar(transB); |
|
||||
SGEMM(&transAchar, &transBchar, &m, &n, &k, &alpha, x, &lda, y, &ldb, &beta, c, &m); |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT void d_matrix_multiply(enum TRANSPOSE transA, enum TRANSPOSE transB, integer m, integer n, integer k, double alpha, double x[], double y[], double beta, double c[]){ |
|
||||
integer lda = transA == CblasNoTrans ? m : k; |
|
||||
integer ldb = transB == CblasNoTrans ? k : n; |
|
||||
char transAchar = getTransChar(transA); |
|
||||
char transBchar = getTransChar(transB); |
|
||||
DGEMM(&transAchar, &transBchar, &m, &n, &k, &alpha, x, &lda, y, &ldb, &beta, c, &m); |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT void c_matrix_multiply(enum TRANSPOSE transA, enum TRANSPOSE transB, integer m, integer n, integer k, complex alpha, complex x[], complex y[], complex beta, complex c[]){ |
|
||||
integer lda = transA == CblasNoTrans ? m : k; |
|
||||
integer ldb = transB == CblasNoTrans ? k : n; |
|
||||
char transAchar = getTransChar(transA); |
|
||||
char transBchar = getTransChar(transB); |
|
||||
CGEMM(&transAchar, &transBchar, &m, &n, &k, &alpha, x, &lda, y, &ldb, &beta, c, &m); |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT void z_matrix_multiply(enum TRANSPOSE transA, enum TRANSPOSE transB, integer m, integer n, integer k, doublecomplex alpha, doublecomplex x[], doublecomplex y[], doublecomplex beta, doublecomplex c[]){ |
|
||||
integer lda = transA == CblasNoTrans ? m : k; |
|
||||
integer ldb = transB == CblasNoTrans ? k : n; |
|
||||
char transAchar = getTransChar(transA); |
|
||||
char transBchar = getTransChar(transB); |
|
||||
ZGEMM(&transAchar, &transBchar, &m, &n, &k, &alpha, x, &lda, y, &ldb, &beta, c, &m); |
|
||||
} |
|
||||
|
|
||||
char getTransChar(enum TRANSPOSE trans){ |
|
||||
char cTrans; |
|
||||
switch( trans ){ |
|
||||
case CblasNoTrans : cTrans = 'N'; |
|
||||
break; |
|
||||
case CblasTrans : cTrans = 'T'; |
|
||||
break; |
|
||||
case CblasConjTrans : cTrans = 'C'; |
|
||||
break; |
|
||||
} |
|
||||
return cTrans; |
|
||||
} |
|
||||
|
|
||||
@ -1,283 +0,0 @@ |
|||||
#ifndef CBLAS_H |
|
||||
#define CBLAS_H |
|
||||
#ifdef __cplusplus |
|
||||
extern "C" { /* Assume C declarations for C++ */ |
|
||||
#endif /* __cplusplus */ |
|
||||
#define CBLAS_INDEX int |
|
||||
#define blasint int |
|
||||
#define _Complex |
|
||||
#define Complex8 float |
|
||||
#define Complex16 double |
|
||||
|
|
||||
enum CBLAS_ORDER {CblasRowMajor=101, CblasColMajor=102}; |
|
||||
enum CBLAS_TRANSPOSE {CblasNoTrans=111, CblasTrans=112, CblasConjTrans=113, CblasConjNoTrans=114}; |
|
||||
enum CBLAS_UPLO {CblasUpper=121, CblasLower=122}; |
|
||||
enum CBLAS_DIAG {CblasNonUnit=131, CblasUnit=132}; |
|
||||
enum CBLAS_SIDE {CblasLeft=141, CblasRight=142}; |
|
||||
|
|
||||
float cblas_sdsdot(blasint n, float, float *x, blasint incx, float *y, blasint incy); |
|
||||
double cblas_dsdot (blasint n, float *x, blasint incx, float *y, blasint incy); |
|
||||
float cblas_sdot(blasint n, float *x, blasint incx, float *y, blasint incy); |
|
||||
double cblas_ddot(blasint n, double *x, blasint incx, double *y, blasint incy); |
|
||||
|
|
||||
float _Complex cblas_cdotu(blasint n, float *x, blasint incx, float *y, blasint incy); |
|
||||
float _Complex cblas_cdotc(blasint n, float *x, blasint incx, float *y, blasint incy); |
|
||||
double _Complex cblas_zdotu(blasint n, double *x, blasint incx, double *y, blasint incy); |
|
||||
double _Complex cblas_zdotc(blasint n, double *x, blasint incx, double *y, blasint incy); |
|
||||
|
|
||||
void cblas_cdotu_sub(blasint n, float *x, blasint incx, float *y, blasint incy, float _Complex *ret); |
|
||||
void cblas_cdotc_sub(blasint n, float *x, blasint incx, float *y, blasint incy, float _Complex *ret); |
|
||||
void cblas_zdotu_sub(blasint n, double *x, blasint incx, double *y, blasint incy, double _Complex *ret); |
|
||||
void cblas_zdotc_sub(blasint n, double *x, blasint incx, double *y, blasint incy, double _Complex *ret); |
|
||||
|
|
||||
float cblas_sasum (blasint n, float *x, blasint incx); |
|
||||
double cblas_dasum (blasint n, double *x, blasint incx); |
|
||||
float cblas_scasum(blasint n, float *x, blasint incx); |
|
||||
double cblas_dzasum(blasint n, double *x, blasint incx); |
|
||||
|
|
||||
float cblas_snrm2 (blasint N, float *X, blasint incX); |
|
||||
double cblas_dnrm2 (blasint N, double *X, blasint incX); |
|
||||
float cblas_scnrm2(blasint N, float *X, blasint incX); |
|
||||
double cblas_dznrm2(blasint N, double *X, blasint incX); |
|
||||
|
|
||||
CBLAS_INDEX cblas_isamax(blasint n, float *x, blasint incx); |
|
||||
CBLAS_INDEX cblas_idamax(blasint n, double *x, blasint incx); |
|
||||
CBLAS_INDEX cblas_icamax(blasint n, float *x, blasint incx); |
|
||||
CBLAS_INDEX cblas_izamax(blasint n, double *x, blasint incx); |
|
||||
|
|
||||
void cblas_saxpy(blasint n, float, float *x, blasint incx, float *y, blasint incy); |
|
||||
void cblas_daxpy(blasint n, double, double *x, blasint incx, double *y, blasint incy); |
|
||||
void cblas_caxpy(blasint n, float *, float *x, blasint incx, float *y, blasint incy); |
|
||||
void cblas_zaxpy(blasint n, double *, double *x, blasint incx, double *y, blasint incy); |
|
||||
|
|
||||
void cblas_scopy(blasint n, float *x, blasint incx, float *y, blasint incy); |
|
||||
void cblas_dcopy(blasint n, double *x, blasint incx, double *y, blasint incy); |
|
||||
void cblas_ccopy(blasint n, float *x, blasint incx, float *y, blasint incy); |
|
||||
void cblas_zcopy(blasint n, double *x, blasint incx, double *y, blasint incy); |
|
||||
|
|
||||
void cblas_sswap(blasint n, float *x, blasint incx, float *y, blasint incy); |
|
||||
void cblas_dswap(blasint n, double *x, blasint incx, double *y, blasint incy); |
|
||||
void cblas_cswap(blasint n, float *x, blasint incx, float *y, blasint incy); |
|
||||
void cblas_zswap(blasint n, double *x, blasint incx, double *y, blasint incy); |
|
||||
|
|
||||
void cblas_srot(blasint N, float *X, blasint incX, float *Y, blasint incY, float c, float s); |
|
||||
void cblas_drot(blasint N, double *X, blasint incX, double *Y, blasint incY, double c, double s); |
|
||||
|
|
||||
void cblas_srotg(float *a, float *b, float *c, float *s); |
|
||||
void cblas_drotg(double *a, double *b, double *c, double *s); |
|
||||
|
|
||||
void cblas_srotm(blasint N, float *X, blasint incX, float *Y, blasint incY, float *P); |
|
||||
void cblas_drotm(blasint N, double *X, blasint incX, double *Y, blasint incY, double *P); |
|
||||
|
|
||||
void cblas_srotmg(float *d1, float *d2, float *b1, float b2, float *P); |
|
||||
void cblas_drotmg(double *d1, double *d2, double *b1, double b2, double *P); |
|
||||
|
|
||||
void cblas_sscal(blasint N, float alpha, float *X, blasint incX); |
|
||||
void cblas_dscal(blasint N, double alpha, double *X, blasint incX); |
|
||||
void cblas_cscal(blasint N, float *alpha, float *X, blasint incX); |
|
||||
void cblas_zscal(blasint N, double *alpha, double *X, blasint incX); |
|
||||
void cblas_csscal(blasint N, float alpha, float *X, blasint incX); |
|
||||
void cblas_zdscal(blasint N, double alpha, double *X, blasint incX); |
|
||||
|
|
||||
void cblas_sgemv(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE trans, blasint m, blasint n, |
|
||||
float alpha, float *a, blasint lda, float *x, blasint incx, float beta, float *y, blasint incy); |
|
||||
void cblas_dgemv(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE trans, blasint m, blasint n, |
|
||||
double alpha, double *a, blasint lda, double *x, blasint incx, double beta, double *y, blasint incy); |
|
||||
void cblas_cgemv(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE trans, blasint m, blasint n, |
|
||||
float *alpha, float *a, blasint lda, float *x, blasint incx, float *beta, float *y, blasint incy); |
|
||||
void cblas_zgemv(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE trans, blasint m, blasint n, |
|
||||
double *alpha, double *a, blasint lda, double *x, blasint incx, double *beta, double *y, blasint incy); |
|
||||
|
|
||||
void cblas_sger (enum CBLAS_ORDER order, blasint M, blasint N, float alpha, float *X, blasint incX, float *Y, blasint incY, float *A, blasint lda); |
|
||||
void cblas_dger (enum CBLAS_ORDER order, blasint M, blasint N, double alpha, double *X, blasint incX, double *Y, blasint incY, double *A, blasint lda); |
|
||||
void cblas_cgeru(enum CBLAS_ORDER order, blasint M, blasint N, float *alpha, float *X, blasint incX, float *Y, blasint incY, float *A, blasint lda); |
|
||||
void cblas_cgerc(enum CBLAS_ORDER order, blasint M, blasint N, float *alpha, float *X, blasint incX, float *Y, blasint incY, float *A, blasint lda); |
|
||||
void cblas_zgeru(enum CBLAS_ORDER order, blasint M, blasint N, double *alpha, double *X, blasint incX, double *Y, blasint incY, double *A, blasint lda); |
|
||||
void cblas_zgerc(enum CBLAS_ORDER order, blasint M, blasint N, double *alpha, double *X, blasint incX, double *Y, blasint incY, double *A, blasint lda); |
|
||||
|
|
||||
void cblas_strsv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, blasint N, float *A, blasint lda, float *X, blasint incX); |
|
||||
void cblas_dtrsv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, blasint N, double *A, blasint lda, double *X, blasint incX); |
|
||||
void cblas_ctrsv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, blasint N, float *A, blasint lda, float *X, blasint incX); |
|
||||
void cblas_ztrsv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, blasint N, double *A, blasint lda, double *X, blasint incX); |
|
||||
|
|
||||
void cblas_strmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, blasint N, float *A, blasint lda, float *X, blasint incX); |
|
||||
void cblas_dtrmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, blasint N, double *A, blasint lda, double *X, blasint incX); |
|
||||
void cblas_ctrmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, blasint N, float *A, blasint lda, float *X, blasint incX); |
|
||||
void cblas_ztrmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, blasint N, double *A, blasint lda, double *X, blasint incX); |
|
||||
|
|
||||
void cblas_ssyr(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, float alpha, float *X, blasint incX, float *A, blasint lda); |
|
||||
void cblas_dsyr(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, double alpha, double *X, blasint incX, double *A, blasint lda); |
|
||||
void cblas_cher(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, float alpha, float *X, blasint incX, float *A, blasint lda); |
|
||||
void cblas_zher(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, double alpha, double *X, blasint incX, double *A, blasint lda); |
|
||||
|
|
||||
void cblas_ssyr2(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo,blasint N, float alpha, float *X, |
|
||||
blasint incX, float *Y, blasint incY, float *A, blasint lda); |
|
||||
void cblas_dsyr2(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, double alpha, double *X, |
|
||||
blasint incX, double *Y, blasint incY, double *A, blasint lda); |
|
||||
void cblas_cher2(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, float *alpha, float *X, blasint incX, |
|
||||
float *Y, blasint incY, float *A, blasint lda); |
|
||||
void cblas_zher2(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, double *alpha, double *X, blasint incX, |
|
||||
double *Y, blasint incY, double *A, blasint lda); |
|
||||
|
|
||||
void cblas_sgbmv(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE TransA, blasint M, blasint N, |
|
||||
blasint KL, blasint KU, float alpha, float *A, blasint lda, float *X, blasint incX, float beta, float *Y, blasint incY); |
|
||||
void cblas_dgbmv(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE TransA, blasint M, blasint N, |
|
||||
blasint KL, blasint KU, double alpha, double *A, blasint lda, double *X, blasint incX, double beta, double *Y, blasint incY); |
|
||||
void cblas_cgbmv(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE TransA, blasint M, blasint N, |
|
||||
blasint KL, blasint KU, float *alpha, float *A, blasint lda, float *X, blasint incX, float *beta, float *Y, blasint incY); |
|
||||
void cblas_zgbmv(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE TransA, blasint M, blasint N, |
|
||||
blasint KL, blasint KU, double *alpha, double *A, blasint lda, double *X, blasint incX, double *beta, double *Y, blasint incY); |
|
||||
|
|
||||
void cblas_ssbmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, blasint K, float alpha, float *A, |
|
||||
blasint lda, float *X, blasint incX, float beta, float *Y, blasint incY); |
|
||||
void cblas_dsbmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, blasint K, double alpha, double *A, |
|
||||
blasint lda, double *X, blasint incX, double beta, double *Y, blasint incY); |
|
||||
|
|
||||
|
|
||||
void cblas_stbmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, |
|
||||
blasint N, blasint K, float *A, blasint lda, float *X, blasint incX); |
|
||||
void cblas_dtbmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, |
|
||||
blasint N, blasint K, double *A, blasint lda, double *X, blasint incX); |
|
||||
void cblas_ctbmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, |
|
||||
blasint N, blasint K, float *A, blasint lda, float *X, blasint incX); |
|
||||
void cblas_ztbmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, |
|
||||
blasint N, blasint K, double *A, blasint lda, double *X, blasint incX); |
|
||||
|
|
||||
void cblas_stbsv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, |
|
||||
blasint N, blasint K, float *A, blasint lda, float *X, blasint incX); |
|
||||
void cblas_dtbsv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, |
|
||||
blasint N, blasint K, double *A, blasint lda, double *X, blasint incX); |
|
||||
void cblas_ctbsv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, |
|
||||
blasint N, blasint K, float *A, blasint lda, float *X, blasint incX); |
|
||||
void cblas_ztbsv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, |
|
||||
blasint N, blasint K, double *A, blasint lda, double *X, blasint incX); |
|
||||
|
|
||||
void cblas_stpmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, |
|
||||
blasint N, float *Ap, float *X, blasint incX); |
|
||||
void cblas_dtpmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, |
|
||||
blasint N, double *Ap, double *X, blasint incX); |
|
||||
void cblas_ctpmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, |
|
||||
blasint N, float *Ap, float *X, blasint incX); |
|
||||
void cblas_ztpmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, |
|
||||
blasint N, double *Ap, double *X, blasint incX); |
|
||||
|
|
||||
void cblas_stpsv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, |
|
||||
blasint N, float *Ap, float *X, blasint incX); |
|
||||
void cblas_dtpsv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, |
|
||||
blasint N, double *Ap, double *X, blasint incX); |
|
||||
void cblas_ctpsv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, |
|
||||
blasint N, float *Ap, float *X, blasint incX); |
|
||||
void cblas_ztpsv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, enum CBLAS_DIAG Diag, |
|
||||
blasint N, double *Ap, double *X, blasint incX); |
|
||||
|
|
||||
void cblas_ssymv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, float alpha, float *A, |
|
||||
blasint lda, float *X, blasint incX, float beta, float *Y, blasint incY); |
|
||||
void cblas_dsymv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, double alpha, double *A, |
|
||||
blasint lda, double *X, blasint incX, double beta, double *Y, blasint incY); |
|
||||
void cblas_chemv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, float *alpha, float *A, |
|
||||
blasint lda, float *X, blasint incX, float *beta, float *Y, blasint incY); |
|
||||
void cblas_zhemv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, double *alpha, double *A, |
|
||||
blasint lda, double *X, blasint incX, double *beta, double *Y, blasint incY); |
|
||||
|
|
||||
|
|
||||
void cblas_sspmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, float alpha, float *Ap, |
|
||||
float *X, blasint incX, float beta, float *Y, blasint incY); |
|
||||
void cblas_dspmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, double alpha, double *Ap, |
|
||||
double *X, blasint incX, double beta, double *Y, blasint incY); |
|
||||
|
|
||||
void cblas_sspr(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, float alpha, float *X, blasint incX, float *Ap); |
|
||||
void cblas_dspr(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, double alpha, double *X, blasint incX, double *Ap); |
|
||||
|
|
||||
void cblas_chpr(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, float alpha, float *X, blasint incX, float *A); |
|
||||
void cblas_zhpr(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, double alpha, double *X,blasint incX, double *A); |
|
||||
|
|
||||
void cblas_sspr2(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, float alpha, float *X, blasint incX, float *Y, blasint incY, float *A); |
|
||||
void cblas_dspr2(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, double alpha, double *X, blasint incX, double *Y, blasint incY, double *A); |
|
||||
void cblas_chpr2(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, float *alpha, float *X, blasint incX, float *Y, blasint incY, float *Ap); |
|
||||
void cblas_zhpr2(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, double *alpha, double *X, blasint incX, double *Y, blasint incY, double *Ap); |
|
||||
|
|
||||
void cblas_chbmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, blasint K, |
|
||||
float *alpha, float *A, blasint lda, float *X, blasint incX, float *beta, float *Y, blasint incY); |
|
||||
void cblas_zhbmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, blasint K, |
|
||||
double *alpha, double *A, blasint lda, double *X, blasint incX, double *beta, double *Y, blasint incY); |
|
||||
|
|
||||
void cblas_chpmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, |
|
||||
float *alpha, float *Ap, float *X, blasint incX, float *beta, float *Y, blasint incY); |
|
||||
void cblas_zhpmv(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint N, |
|
||||
double *alpha, double *Ap, double *X, blasint incX, double *beta, double *Y, blasint incY); |
|
||||
|
|
||||
void cblas_sgemm(enum CBLAS_ORDER Order, enum CBLAS_TRANSPOSE TransA, enum CBLAS_TRANSPOSE TransB, blasint M, blasint N, blasint K, |
|
||||
float alpha, float *A, blasint lda, float *B, blasint ldb, float beta, float *C, blasint ldc); |
|
||||
void cblas_dgemm(enum CBLAS_ORDER Order, enum CBLAS_TRANSPOSE TransA, enum CBLAS_TRANSPOSE TransB, blasint M, blasint N, blasint K, |
|
||||
double alpha, double *A, blasint lda, double *B, blasint ldb, double beta, double *C, blasint ldc); |
|
||||
void cblas_cgemm(enum CBLAS_ORDER Order, enum CBLAS_TRANSPOSE TransA, enum CBLAS_TRANSPOSE TransB, blasint M, blasint N, blasint K, |
|
||||
float *alpha, float *A, blasint lda, float *B, blasint ldb, float *beta, float *C, blasint ldc); |
|
||||
void cblas_zgemm(enum CBLAS_ORDER Order, enum CBLAS_TRANSPOSE TransA, enum CBLAS_TRANSPOSE TransB, blasint M, blasint N, blasint K, |
|
||||
double *alpha, double *A, blasint lda, double *B, blasint ldb, double *beta, double *C, blasint ldc); |
|
||||
|
|
||||
void cblas_ssymm(enum CBLAS_ORDER Order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, blasint M, blasint N, |
|
||||
float alpha, float *A, blasint lda, float *B, blasint ldb, float beta, float *C, blasint ldc); |
|
||||
void cblas_dsymm(enum CBLAS_ORDER Order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, blasint M, blasint N, |
|
||||
double alpha, double *A, blasint lda, double *B, blasint ldb, double beta, double *C, blasint ldc); |
|
||||
void cblas_csymm(enum CBLAS_ORDER Order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, blasint M, blasint N, |
|
||||
float *alpha, float *A, blasint lda, float *B, blasint ldb, float *beta, float *C, blasint ldc); |
|
||||
void cblas_zsymm(enum CBLAS_ORDER Order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, blasint M, blasint N, |
|
||||
double *alpha, double *A, blasint lda, double *B, blasint ldb, double *beta, double *C, blasint ldc); |
|
||||
|
|
||||
void cblas_ssyrk(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Trans, |
|
||||
blasint N, blasint K, float alpha, float *A, blasint lda, float beta, float *C, blasint ldc); |
|
||||
void cblas_dsyrk(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Trans, |
|
||||
blasint N, blasint K, double alpha, double *A, blasint lda, double beta, double *C, blasint ldc); |
|
||||
void cblas_csyrk(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Trans, |
|
||||
blasint N, blasint K, float *alpha, float *A, blasint lda, float *beta, float *C, blasint ldc); |
|
||||
void cblas_zsyrk(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Trans, |
|
||||
blasint N, blasint K, double *alpha, double *A, blasint lda, double *beta, double *C, blasint ldc); |
|
||||
|
|
||||
void cblas_ssyr2k(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Trans, |
|
||||
blasint N, blasint K, float alpha, float *A, blasint lda, float *B, blasint ldb, float beta, float *C, blasint ldc); |
|
||||
void cblas_dsyr2k(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Trans, |
|
||||
blasint N, blasint K, double alpha, double *A, blasint lda, double *B, blasint ldb, double beta, double *C, blasint ldc); |
|
||||
void cblas_csyr2k(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Trans, |
|
||||
blasint N, blasint K, float *alpha, float *A, blasint lda, float *B, blasint ldb, float *beta, float *C, blasint ldc); |
|
||||
void cblas_zsyr2k(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Trans, |
|
||||
blasint N, blasint K, double *alpha, double *A, blasint lda, double *B, blasint ldb, double *beta, double *C, blasint ldc); |
|
||||
|
|
||||
void cblas_strmm(enum CBLAS_ORDER Order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, |
|
||||
enum CBLAS_DIAG Diag, blasint M, blasint N, float alpha, float *A, blasint lda, float *B, blasint ldb); |
|
||||
void cblas_dtrmm(enum CBLAS_ORDER Order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, |
|
||||
enum CBLAS_DIAG Diag, blasint M, blasint N, double alpha, double *A, blasint lda, double *B, blasint ldb); |
|
||||
void cblas_ctrmm(enum CBLAS_ORDER Order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, |
|
||||
enum CBLAS_DIAG Diag, blasint M, blasint N, float *alpha, float *A, blasint lda, float *B, blasint ldb); |
|
||||
void cblas_ztrmm(enum CBLAS_ORDER Order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, |
|
||||
enum CBLAS_DIAG Diag, blasint M, blasint N, double *alpha, double *A, blasint lda, double *B, blasint ldb); |
|
||||
|
|
||||
void cblas_strsm(enum CBLAS_ORDER Order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, |
|
||||
enum CBLAS_DIAG Diag, blasint M, blasint N, float alpha, float *A, blasint lda, float *B, blasint ldb); |
|
||||
void cblas_dtrsm(enum CBLAS_ORDER Order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, |
|
||||
enum CBLAS_DIAG Diag, blasint M, blasint N, double alpha, double *A, blasint lda, double *B, blasint ldb); |
|
||||
void cblas_ctrsm(enum CBLAS_ORDER Order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, |
|
||||
enum CBLAS_DIAG Diag, blasint M, blasint N, float *alpha, float *A, blasint lda, float *B, blasint ldb); |
|
||||
void cblas_ztrsm(enum CBLAS_ORDER Order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE TransA, |
|
||||
enum CBLAS_DIAG Diag, blasint M, blasint N, double *alpha, double *A, blasint lda, double *B, blasint ldb); |
|
||||
|
|
||||
void cblas_chemm(enum CBLAS_ORDER Order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, blasint M, blasint N, |
|
||||
float *alpha, float *A, blasint lda, float *B, blasint ldb, float *beta, float *C, blasint ldc); |
|
||||
void cblas_zhemm(enum CBLAS_ORDER Order, enum CBLAS_SIDE Side, enum CBLAS_UPLO Uplo, blasint M, blasint N, |
|
||||
double *alpha, double *A, blasint lda, double *B, blasint ldb, double *beta, double *C, blasint ldc); |
|
||||
|
|
||||
void cblas_cherk(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Trans, blasint N, blasint K, |
|
||||
float alpha, float *A, blasint lda, float beta, float *C, blasint ldc); |
|
||||
void cblas_zherk(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Trans, blasint N, blasint K, |
|
||||
double alpha, double *A, blasint lda, double beta, double *C, blasint ldc); |
|
||||
|
|
||||
void cblas_cher2k(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Trans, blasint N, blasint K, |
|
||||
float *alpha, float *A, blasint lda, float *B, blasint ldb, float beta, float *C, blasint ldc); |
|
||||
void cblas_zher2k(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANSPOSE Trans, blasint N, blasint K, |
|
||||
double *alpha, double *A, blasint lda, double *B, blasint ldb, double beta, double *C, blasint ldc); |
|
||||
|
|
||||
void cblas_xerbla(blasint p, char *rout, char *form, ...); |
|
||||
#ifdef __cplusplus |
|
||||
} |
|
||||
#endif /* __cplusplus */ |
|
||||
#endif |
|
||||
|
|
||||
File diff suppressed because it is too large
@ -1,224 +0,0 @@ |
|||||
/* f2c.h -- Standard Fortran to C header file */ |
|
||||
|
|
||||
/** barf [ba:rf] 2. "He suggested using FORTRAN, and everybody barfed."
|
|
||||
|
|
||||
- From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) */ |
|
||||
|
|
||||
#ifndef F2C_INCLUDE |
|
||||
#define F2C_INCLUDE |
|
||||
|
|
||||
typedef long int integer; |
|
||||
|
|
||||
typedef unsigned long int uinteger; |
|
||||
typedef char *address; |
|
||||
typedef short int shortint; |
|
||||
typedef float real; |
|
||||
typedef double doublereal; |
|
||||
typedef struct { real r, i; } complex; |
|
||||
typedef struct { doublereal r, i; } doublecomplex; |
|
||||
typedef long int logical; |
|
||||
typedef short int shortlogical; |
|
||||
typedef char logical1; |
|
||||
typedef char integer1; |
|
||||
#ifdef INTEGER_STAR_8 /* Adjust for integer*8. */ |
|
||||
typedef long long longint; /* system-dependent */ |
|
||||
typedef unsigned long long ulongint; /* system-dependent */ |
|
||||
#define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b))) |
|
||||
#define qbit_set(a,b) ((a) | ((ulongint)1 << (b))) |
|
||||
#endif |
|
||||
|
|
||||
#define TRUE_ (1) |
|
||||
#define FALSE_ (0) |
|
||||
|
|
||||
/* Extern is for use with -E */ |
|
||||
#ifndef Extern |
|
||||
#define Extern extern |
|
||||
#endif |
|
||||
|
|
||||
/* I/O stuff */ |
|
||||
|
|
||||
#ifdef f2c_i2 |
|
||||
/* for -i2 */ |
|
||||
typedef short flag; |
|
||||
typedef short ftnlen; |
|
||||
typedef short ftnint; |
|
||||
#else |
|
||||
typedef long int flag; |
|
||||
typedef long int ftnlen; |
|
||||
typedef long int ftnint; |
|
||||
#endif |
|
||||
|
|
||||
/*external read, write*/ |
|
||||
typedef struct |
|
||||
{ flag cierr; |
|
||||
ftnint ciunit; |
|
||||
flag ciend; |
|
||||
char *cifmt; |
|
||||
ftnint cirec; |
|
||||
} cilist; |
|
||||
|
|
||||
/*internal read, write*/ |
|
||||
typedef struct |
|
||||
{ flag icierr; |
|
||||
char *iciunit; |
|
||||
flag iciend; |
|
||||
char *icifmt; |
|
||||
ftnint icirlen; |
|
||||
ftnint icirnum; |
|
||||
} icilist; |
|
||||
|
|
||||
/*open*/ |
|
||||
typedef struct |
|
||||
{ flag oerr; |
|
||||
ftnint ounit; |
|
||||
char *ofnm; |
|
||||
ftnlen ofnmlen; |
|
||||
char *osta; |
|
||||
char *oacc; |
|
||||
char *ofm; |
|
||||
ftnint orl; |
|
||||
char *oblnk; |
|
||||
} olist; |
|
||||
|
|
||||
/*close*/ |
|
||||
typedef struct |
|
||||
{ flag cerr; |
|
||||
ftnint cunit; |
|
||||
char *csta; |
|
||||
} cllist; |
|
||||
|
|
||||
/*rewind, backspace, endfile*/ |
|
||||
typedef struct |
|
||||
{ flag aerr; |
|
||||
ftnint aunit; |
|
||||
} alist; |
|
||||
|
|
||||
/* inquire */ |
|
||||
typedef struct |
|
||||
{ flag inerr; |
|
||||
ftnint inunit; |
|
||||
char *infile; |
|
||||
ftnlen infilen; |
|
||||
ftnint *inex; /*parameters in standard's order*/ |
|
||||
ftnint *inopen; |
|
||||
ftnint *innum; |
|
||||
ftnint *innamed; |
|
||||
char *inname; |
|
||||
ftnlen innamlen; |
|
||||
char *inacc; |
|
||||
ftnlen inacclen; |
|
||||
char *inseq; |
|
||||
ftnlen inseqlen; |
|
||||
char *indir; |
|
||||
ftnlen indirlen; |
|
||||
char *infmt; |
|
||||
ftnlen infmtlen; |
|
||||
char *inform; |
|
||||
ftnint informlen; |
|
||||
char *inunf; |
|
||||
ftnlen inunflen; |
|
||||
ftnint *inrecl; |
|
||||
ftnint *innrec; |
|
||||
char *inblank; |
|
||||
ftnlen inblanklen; |
|
||||
} inlist; |
|
||||
|
|
||||
#define VOID void |
|
||||
|
|
||||
union Multitype { /* for multiple entry points */ |
|
||||
integer1 g; |
|
||||
shortint h; |
|
||||
integer i; |
|
||||
/* longint j; */ |
|
||||
real r; |
|
||||
doublereal d; |
|
||||
complex c; |
|
||||
doublecomplex z; |
|
||||
}; |
|
||||
|
|
||||
typedef union Multitype Multitype; |
|
||||
|
|
||||
/*typedef long int Long;*/ /* No longer used; formerly in Namelist */ |
|
||||
|
|
||||
struct Vardesc { /* for Namelist */ |
|
||||
char *name; |
|
||||
char *addr; |
|
||||
ftnlen *dims; |
|
||||
int type; |
|
||||
}; |
|
||||
typedef struct Vardesc Vardesc; |
|
||||
|
|
||||
struct Namelist { |
|
||||
char *name; |
|
||||
Vardesc **vars; |
|
||||
int nvars; |
|
||||
}; |
|
||||
typedef struct Namelist Namelist; |
|
||||
|
|
||||
#define abs(x) ((x) >= 0 ? (x) : -(x)) |
|
||||
#define dabs(x) (doublereal)abs(x) |
|
||||
#define min(a,b) ((a) <= (b) ? (a) : (b)) |
|
||||
#define max(a,b) ((a) >= (b) ? (a) : (b)) |
|
||||
#define dmin(a,b) (doublereal)min(a,b) |
|
||||
#define dmax(a,b) (doublereal)max(a,b) |
|
||||
#define bit_test(a,b) ((a) >> (b) & 1) |
|
||||
#define bit_clear(a,b) ((a) & ~((uinteger)1 << (b))) |
|
||||
#define bit_set(a,b) ((a) | ((uinteger)1 << (b))) |
|
||||
|
|
||||
/* procedure parameter types for -A and -C++ */ |
|
||||
|
|
||||
#define F2C_proc_par_types 1 |
|
||||
#ifdef __cplusplus |
|
||||
typedef int /* Unknown procedure type */ (*U_fp)(...); |
|
||||
typedef shortint (*J_fp)(...); |
|
||||
typedef integer (*I_fp)(...); |
|
||||
typedef real (*R_fp)(...); |
|
||||
typedef doublereal (*D_fp)(...), (*E_fp)(...); |
|
||||
typedef /* Complex */ VOID (*C_fp)(...); |
|
||||
typedef /* Double Complex */ VOID (*Z_fp)(...); |
|
||||
typedef logical (*L_fp)(...); |
|
||||
typedef shortlogical (*K_fp)(...); |
|
||||
typedef /* Character */ VOID (*H_fp)(...); |
|
||||
typedef /* Subroutine */ int (*S_fp)(...); |
|
||||
#else |
|
||||
typedef int /* Unknown procedure type */ (*U_fp)(); |
|
||||
typedef shortint (*J_fp)(); |
|
||||
typedef integer (*I_fp)(); |
|
||||
typedef real (*R_fp)(); |
|
||||
typedef doublereal (*D_fp)(), (*E_fp)(); |
|
||||
typedef /* Complex */ VOID (*C_fp)(); |
|
||||
typedef /* Double Complex */ VOID (*Z_fp)(); |
|
||||
typedef logical (*L_fp)(); |
|
||||
typedef shortlogical (*K_fp)(); |
|
||||
typedef /* Character */ VOID (*H_fp)(); |
|
||||
typedef /* Subroutine */ int (*S_fp)(); |
|
||||
#endif |
|
||||
/* E_fp is for real functions when -R is not specified */ |
|
||||
typedef VOID C_f; /* complex function */ |
|
||||
typedef VOID H_f; /* character function */ |
|
||||
typedef VOID Z_f; /* double complex function */ |
|
||||
typedef doublereal E_f; /* real function with -R not specified */ |
|
||||
|
|
||||
/* undef any lower-case symbols that your C compiler predefines, e.g.: */ |
|
||||
|
|
||||
#ifndef Skip_f2c_Undefs |
|
||||
#undef cray |
|
||||
#undef gcos |
|
||||
#undef mc68010 |
|
||||
#undef mc68020 |
|
||||
#undef mips |
|
||||
#undef pdp11 |
|
||||
#undef sgi |
|
||||
#undef sparc |
|
||||
#undef sun |
|
||||
#undef sun2 |
|
||||
#undef sun3 |
|
||||
#undef sun4 |
|
||||
#undef u370 |
|
||||
#undef u3b |
|
||||
#undef u3b2 |
|
||||
#undef u3b5 |
|
||||
#undef unix |
|
||||
#undef vax |
|
||||
#endif |
|
||||
#endif |
|
||||
@ -1,954 +0,0 @@ |
|||||
#include "wrapper_common.h" |
|
||||
#include <algorithm> |
|
||||
#include "lapack.h" |
|
||||
|
|
||||
extern "C"{ |
|
||||
void STRSM(char*, char*, char*, char*, integer*, integer*, float*, float*, integer*, float*, integer*); |
|
||||
void DTRSM(char*, char*, char*, char*, integer*, integer*, double*, double*, integer*, double*, integer*); |
|
||||
void CTRSM(char*, char*, char*, char*, integer*, integer*, complex*, complex*, integer*, complex*, integer*); |
|
||||
void ZTRSM(char*, char*, char*, char*, integer*, integer*, doublecomplex*, doublecomplex*, integer*, doublecomplex*, integer*); |
|
||||
|
|
||||
|
|
||||
DLLEXPORT float s_matrix_norm(char norm, integer m, integer n, float a[], float work[]) |
|
||||
{ |
|
||||
return slange_(&norm, &m, &n, a, &m, work); |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT double d_matrix_norm(char norm, integer m, integer n, double a[], double work[]) |
|
||||
{ |
|
||||
return dlange_(&norm, &m, &n, a, &m, work); |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT float c_matrix_norm(char norm, integer m, integer n, complex a[], float work[]) |
|
||||
{ |
|
||||
return clange_(&norm, &m, &n, a, &m, work); |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT double z_matrix_norm(char norm, integer m, integer n, doublecomplex a[], double work[]) |
|
||||
{ |
|
||||
return zlange_(&norm, &m, &n, a, &m, work); |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer s_lu_factor(integer m, float a[], integer ipiv[]) |
|
||||
{ |
|
||||
integer info = 0; |
|
||||
sgetrf_(&m,&m,a,&m,ipiv,&info); |
|
||||
for(integer i = 0; i < m; ++i ){ |
|
||||
ipiv[i] -= 1; |
|
||||
} |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer d_lu_factor(integer m, double a[], integer ipiv[]) |
|
||||
{ |
|
||||
integer info = 0; |
|
||||
dgetrf_(&m,&m,a,&m,ipiv,&info); |
|
||||
for(integer i = 0; i < m; ++i ){ |
|
||||
ipiv[i] -= 1; |
|
||||
} |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer c_lu_factor(integer m, complex a[], integer ipiv[]) |
|
||||
{ |
|
||||
integer info = 0; |
|
||||
cgetrf_(&m,&m,a,&m,ipiv,&info); |
|
||||
for(integer i = 0; i < m; ++i ){ |
|
||||
ipiv[i] -= 1; |
|
||||
} |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer z_lu_factor(integer m, doublecomplex a[], integer ipiv[]) |
|
||||
{ |
|
||||
integer info = 0; |
|
||||
zgetrf_(&m,&m,a,&m,ipiv,&info); |
|
||||
for(integer i = 0; i < m; ++i ){ |
|
||||
ipiv[i] -= 1; |
|
||||
} |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer s_lu_inverse(integer n, float a[], float work[], integer lwork) |
|
||||
{ |
|
||||
integer* ipiv = new integer[n]; |
|
||||
integer info = 0; |
|
||||
sgetrf_(&n,&n,a,&n,ipiv,&info); |
|
||||
|
|
||||
if (info != 0){ |
|
||||
delete[] ipiv; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
sgetri_(&n,a,&n,ipiv,work,&lwork,&info); |
|
||||
delete[] ipiv; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer d_lu_inverse(integer n, double a[], double work[], integer lwork) |
|
||||
{ |
|
||||
integer* ipiv = new integer[n]; |
|
||||
integer info = 0; |
|
||||
dgetrf_(&n,&n,a,&n,ipiv,&info); |
|
||||
|
|
||||
if (info != 0){ |
|
||||
delete[] ipiv; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
dgetri_(&n,a,&n,ipiv,work,&lwork,&info); |
|
||||
delete[] ipiv; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer c_lu_inverse(integer n, complex a[], complex work[], integer lwork) |
|
||||
{ |
|
||||
integer* ipiv = new integer[n]; |
|
||||
integer info = 0; |
|
||||
cgetrf_(&n,&n,a,&n,ipiv,&info); |
|
||||
|
|
||||
if (info != 0){ |
|
||||
delete[] ipiv; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
cgetri_(&n,a,&n,ipiv,work,&lwork,&info); |
|
||||
delete[] ipiv; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer z_lu_inverse(integer n, doublecomplex a[], doublecomplex work[], integer lwork) |
|
||||
{ |
|
||||
integer* ipiv = new integer[n]; |
|
||||
integer info = 0; |
|
||||
zgetrf_(&n,&n,a,&n,ipiv,&info); |
|
||||
|
|
||||
if (info != 0){ |
|
||||
delete[] ipiv; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
zgetri_(&n,a,&n,ipiv,work,&lwork,&info); |
|
||||
delete[] ipiv; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer s_lu_inverse_factored(integer n, float a[], integer ipiv[], float work[], integer lwork) |
|
||||
{ |
|
||||
integer i; |
|
||||
for(i = 0; i < n; ++i ){ |
|
||||
ipiv[i] += 1; |
|
||||
} |
|
||||
integer info = 0; |
|
||||
sgetri_(&n,a,&n,ipiv,work,&lwork,&info); |
|
||||
|
|
||||
for(i = 0; i < n; ++i ){ |
|
||||
ipiv[i] -= 1; |
|
||||
} |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer d_lu_inverse_factored(integer n, double a[], integer ipiv[], double work[], integer lwork) |
|
||||
{ |
|
||||
integer i; |
|
||||
for(i = 0; i < n; ++i ){ |
|
||||
ipiv[i] += 1; |
|
||||
} |
|
||||
|
|
||||
integer info = 0; |
|
||||
dgetri_(&n,a,&n,ipiv,work,&lwork,&info); |
|
||||
|
|
||||
for(i = 0; i < n; ++i ){ |
|
||||
ipiv[i] -= 1; |
|
||||
} |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer c_lu_inverse_factored(integer n, complex a[], integer ipiv[], complex work[], integer lwork) |
|
||||
{ |
|
||||
integer i; |
|
||||
for(i = 0; i < n; ++i ){ |
|
||||
ipiv[i] += 1; |
|
||||
} |
|
||||
|
|
||||
integer info = 0; |
|
||||
cgetri_(&n,a,&n,ipiv,work,&lwork,&info); |
|
||||
|
|
||||
for(i = 0; i < n; ++i ){ |
|
||||
ipiv[i] -= 1; |
|
||||
} |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer z_lu_inverse_factored(integer n, doublecomplex a[], integer ipiv[], doublecomplex work[], integer lwork) |
|
||||
{ |
|
||||
integer i; |
|
||||
for(i = 0; i < n; ++i ){ |
|
||||
ipiv[i] += 1; |
|
||||
} |
|
||||
|
|
||||
integer info = 0; |
|
||||
zgetri_(&n,a,&n,ipiv,work,&lwork,&info); |
|
||||
|
|
||||
for(i = 0; i < n; ++i ){ |
|
||||
ipiv[i] -= 1; |
|
||||
} |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer s_lu_solve_factored(integer n, integer nrhs, float a[], integer ipiv[], float b[]) |
|
||||
{ |
|
||||
integer info = 0; |
|
||||
integer i; |
|
||||
for(i = 0; i < n; ++i ){ |
|
||||
ipiv[i] += 1; |
|
||||
} |
|
||||
|
|
||||
char trans ='N'; |
|
||||
sgetrs_(&trans, &n, &nrhs, a, &n, ipiv, b, &n, &info); |
|
||||
for(i = 0; i < n; ++i ){ |
|
||||
ipiv[i] -= 1; |
|
||||
} |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer d_lu_solve_factored(integer n, integer nrhs, double a[], integer ipiv[], double b[]) |
|
||||
{ |
|
||||
integer info = 0; |
|
||||
integer i; |
|
||||
for(i = 0; i < n; ++i ){ |
|
||||
ipiv[i] += 1; |
|
||||
} |
|
||||
|
|
||||
char trans ='N'; |
|
||||
dgetrs_(&trans, &n, &nrhs, a, &n, ipiv, b, &n, &info); |
|
||||
for(i = 0; i < n; ++i ){ |
|
||||
ipiv[i] -= 1; |
|
||||
} |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer c_lu_solve_factored(integer n, integer nrhs, complex a[], integer ipiv[], complex b[]) |
|
||||
{ |
|
||||
integer info = 0; |
|
||||
integer i; |
|
||||
for(i = 0; i < n; ++i ){ |
|
||||
ipiv[i] += 1; |
|
||||
} |
|
||||
|
|
||||
char trans ='N'; |
|
||||
cgetrs_(&trans, &n, &nrhs, a, &n, ipiv, b, &n, &info); |
|
||||
for(i = 0; i < n; ++i ){ |
|
||||
ipiv[i] -= 1; |
|
||||
} |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer z_lu_solve_factored(integer n, integer nrhs, doublecomplex a[], integer ipiv[], doublecomplex b[]) |
|
||||
{ |
|
||||
integer info = 0; |
|
||||
integer i; |
|
||||
for(i = 0; i < n; ++i ){ |
|
||||
ipiv[i] += 1; |
|
||||
} |
|
||||
|
|
||||
char trans ='N'; |
|
||||
zgetrs_(&trans, &n, &nrhs, a, &n, ipiv, b, &n, &info); |
|
||||
for(i = 0; i < n; ++i ){ |
|
||||
ipiv[i] -= 1; |
|
||||
} |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer s_lu_solve(integer n, integer nrhs, float a[], float b[]) |
|
||||
{ |
|
||||
float* clone = new float[n*n]; |
|
||||
memcpy(clone, a, n*n*sizeof(float)); |
|
||||
|
|
||||
integer* ipiv = new integer[n]; |
|
||||
integer info = 0; |
|
||||
sgetrf_(&n, &n, clone, &n, ipiv, &info); |
|
||||
|
|
||||
if (info != 0){ |
|
||||
delete[] ipiv; |
|
||||
delete[] clone; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
char trans ='N'; |
|
||||
sgetrs_(&trans, &n, &nrhs, clone, &n, ipiv, b, &n, &info); |
|
||||
delete[] ipiv; |
|
||||
delete[] clone; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer d_lu_solve(integer n, integer nrhs, double a[], double b[]) |
|
||||
{ |
|
||||
double* clone = new double[n*n]; |
|
||||
memcpy(clone, a, n*n*sizeof(double)); |
|
||||
|
|
||||
integer* ipiv = new integer[n]; |
|
||||
integer info = 0; |
|
||||
dgetrf_(&n, &n, clone, &n, ipiv, &info); |
|
||||
|
|
||||
if (info != 0){ |
|
||||
delete[] ipiv; |
|
||||
delete[] clone; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
char trans ='N'; |
|
||||
dgetrs_(&trans, &n, &nrhs, clone, &n, ipiv, b, &n, &info); |
|
||||
delete[] ipiv; |
|
||||
delete[] clone; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer c_lu_solve(integer n, integer nrhs, complex a[], complex b[]) |
|
||||
{ |
|
||||
complex* clone = new complex[n*n]; |
|
||||
memcpy(clone, a, n*n*sizeof(complex)); |
|
||||
|
|
||||
integer* ipiv = new integer[n]; |
|
||||
integer info = 0; |
|
||||
cgetrf_(&n, &n, clone, &n, ipiv, &info); |
|
||||
|
|
||||
if (info != 0){ |
|
||||
delete[] ipiv; |
|
||||
delete[] clone; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
char trans ='N'; |
|
||||
cgetrs_(&trans, &n, &nrhs, clone, &n, ipiv, b, &n, &info); |
|
||||
delete[] ipiv; |
|
||||
delete[] clone; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer z_lu_solve(integer n, integer nrhs, doublecomplex a[], doublecomplex b[]) |
|
||||
{ |
|
||||
doublecomplex* clone = new doublecomplex[n*n]; |
|
||||
memcpy(clone, a, n*n*sizeof(doublecomplex)); |
|
||||
|
|
||||
integer* ipiv = new integer[n]; |
|
||||
integer info = 0; |
|
||||
zgetrf_(&n, &n, clone, &n, ipiv, &info); |
|
||||
|
|
||||
if (info != 0){ |
|
||||
delete[] ipiv; |
|
||||
delete[] clone; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
char trans ='N'; |
|
||||
zgetrs_(&trans, &n, &nrhs, clone, &n, ipiv, b, &n, &info); |
|
||||
delete[] ipiv; |
|
||||
delete[] clone; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer s_cholesky_factor(integer n, float a[]){ |
|
||||
char uplo = 'L'; |
|
||||
integer info = 0; |
|
||||
spotrf_(&uplo, &n, a, &n, &info); |
|
||||
for (integer i = 0; i < n; ++i) |
|
||||
{ |
|
||||
integer index = i * n; |
|
||||
for (integer j = 0; j < n && i > j; ++j) |
|
||||
{ |
|
||||
a[index + j] = 0; |
|
||||
} |
|
||||
} |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer d_cholesky_factor(integer n, double* a){ |
|
||||
char uplo = 'L'; |
|
||||
integer info = 0; |
|
||||
dpotrf_(&uplo, &n, a, &n, &info); |
|
||||
for (integer i = 0; i < n; ++i) |
|
||||
{ |
|
||||
integer index = i * n; |
|
||||
for (integer j = 0; j < n && i > j; ++j) |
|
||||
{ |
|
||||
a[index + j] = 0; |
|
||||
} |
|
||||
} |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer c_cholesky_factor(integer n, complex a[]){ |
|
||||
char uplo = 'L'; |
|
||||
integer info = 0; |
|
||||
complex zero = {0.0f, 0.0f}; |
|
||||
cpotrf_(&uplo, &n, a, &n, &info); |
|
||||
for (integer i = 0; i < n; ++i) |
|
||||
{ |
|
||||
integer index = i * n; |
|
||||
for (integer j = 0; j < n && i > j; ++j) |
|
||||
{ |
|
||||
a[index + j] = zero; |
|
||||
} |
|
||||
} |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer z_cholesky_factor(integer n, doublecomplex a[]){ |
|
||||
char uplo = 'L'; |
|
||||
integer info = 0; |
|
||||
doublecomplex zero = {0.0, 0.0}; |
|
||||
zpotrf_(&uplo, &n, a, &n, &info); |
|
||||
for (integer i = 0; i < n; ++i) |
|
||||
{ |
|
||||
integer index = i * n; |
|
||||
for (integer j = 0; j < n && i > j; ++j) |
|
||||
{ |
|
||||
a[index + j] = zero; |
|
||||
} |
|
||||
} |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer s_cholesky_solve(integer n, integer nrhs, float a[], float b[]) |
|
||||
{ |
|
||||
float* clone = new float[n*n]; |
|
||||
memcpy(clone, a, n*n*sizeof(float)); |
|
||||
char uplo = 'L'; |
|
||||
integer info = 0; |
|
||||
spotrf_(&uplo, &n, clone, &n, &info); |
|
||||
|
|
||||
if (info != 0){ |
|
||||
delete[] clone; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
spotrs_(&uplo, &n, &nrhs, clone, &n, b, &n, &info); |
|
||||
delete[] clone; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer d_cholesky_solve(integer n, integer nrhs, double a[], double b[]) |
|
||||
{ |
|
||||
double* clone = new double[n*n]; |
|
||||
memcpy(clone, a, n*n*sizeof(double)); |
|
||||
char uplo = 'L'; |
|
||||
integer info = 0; |
|
||||
dpotrf_(&uplo, &n, clone, &n, &info); |
|
||||
|
|
||||
if (info != 0){ |
|
||||
delete[] clone; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
dpotrs_(&uplo, &n, &nrhs, clone, &n, b, &n, &info); |
|
||||
delete[] clone; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer c_cholesky_solve(integer n, integer nrhs, complex a[], complex b[]) |
|
||||
{ |
|
||||
complex* clone = new complex[n*n]; |
|
||||
memcpy(clone, a, n*n*sizeof(complex)); |
|
||||
char uplo = 'L'; |
|
||||
integer info = 0; |
|
||||
cpotrf_(&uplo, &n, clone, &n, &info); |
|
||||
|
|
||||
if (info != 0){ |
|
||||
delete[] clone; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
cpotrs_(&uplo, &n, &nrhs, clone, &n, b, &n, &info); |
|
||||
delete[] clone; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer z_cholesky_solve(integer n, integer nrhs, doublecomplex a[], doublecomplex b[]) |
|
||||
{ |
|
||||
doublecomplex* clone = new doublecomplex[n*n]; |
|
||||
memcpy(clone, a, n*n*sizeof(doublecomplex)); |
|
||||
char uplo = 'L'; |
|
||||
integer info = 0; |
|
||||
zpotrf_(&uplo, &n, clone, &n, &info); |
|
||||
|
|
||||
if (info != 0){ |
|
||||
delete[] clone; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
zpotrs_(&uplo, &n, &nrhs, clone, &n, b, &n, &info); |
|
||||
delete[] clone; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer s_cholesky_solve_factored(integer n, integer nrhs, float a[], float b[]) |
|
||||
{ |
|
||||
char uplo = 'L'; |
|
||||
integer info = 0; |
|
||||
spotrs_(&uplo, &n, &nrhs, a, &n, b, &n, &info); |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer d_cholesky_solve_factored(integer n, integer nrhs, double a[], double b[]) |
|
||||
{ |
|
||||
char uplo = 'L'; |
|
||||
integer info = 0; |
|
||||
dpotrs_(&uplo, &n, &nrhs, a, &n, b, &n, &info); |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer c_cholesky_solve_factored(integer n, integer nrhs, complex a[], complex b[]) |
|
||||
{ |
|
||||
char uplo = 'L'; |
|
||||
integer info = 0; |
|
||||
cpotrs_(&uplo, &n, &nrhs, a, &n, b, &n, &info); |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer z_cholesky_solve_factored(integer n, integer nrhs, doublecomplex a[], doublecomplex b[]) |
|
||||
{ |
|
||||
char uplo = 'L'; |
|
||||
integer info = 0; |
|
||||
zpotrs_(&uplo, &n, &nrhs, a, &n, b, &n, &info); |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer s_qr_factor(integer m, integer n, float r[], float tau[], float q[], float work[], integer len) |
|
||||
{ |
|
||||
integer info = 0; |
|
||||
sgeqrf_(&m, &n, r, &m, tau, work, &len, &info); |
|
||||
|
|
||||
for (integer i = 0; i < m; ++i) |
|
||||
{ |
|
||||
for (integer j = 0; j < m && j < n; ++j) |
|
||||
{ |
|
||||
if (i > j) |
|
||||
{ |
|
||||
q[j * m + i] = r[j * m + i]; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
//compute the q elements explicitly
|
|
||||
if (m <= n) |
|
||||
{ |
|
||||
sorgqr_(&m, &m, &m, q, &m, tau, work, &len, &info); |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
sorgqr_(&m, &n, &n, q, &m, tau, work, &len, &info); |
|
||||
} |
|
||||
|
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer d_qr_factor(integer m, integer n, double r[], double tau[], double q[], double work[], integer len) |
|
||||
{ |
|
||||
integer info = 0; |
|
||||
dgeqrf_(&m, &n, r, &m, tau, work, &len, &info); |
|
||||
|
|
||||
for (integer i = 0; i < m; ++i) |
|
||||
{ |
|
||||
for (integer j = 0; j < m && j < n; ++j) |
|
||||
{ |
|
||||
if (i > j) |
|
||||
{ |
|
||||
q[j * m + i] = r[j * m + i]; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
//compute the q elements explicitly
|
|
||||
if (m <= n) |
|
||||
{ |
|
||||
dorgqr_(&m, &m, &m, q, &m, tau, work, &len, &info); |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
dorgqr_(&m, &n, &n, q, &m, tau, work, &len, &info); |
|
||||
} |
|
||||
|
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer c_qr_factor(integer m, integer n, complex r[], complex tau[], complex q[], complex work[], integer len) |
|
||||
{ |
|
||||
integer info = 0; |
|
||||
cgeqrf_(&m, &n, r, &m, tau, work, &len, &info); |
|
||||
|
|
||||
for (integer i = 0; i < m; ++i) |
|
||||
{ |
|
||||
for (integer j = 0; j < m && j < n; ++j) |
|
||||
{ |
|
||||
if (i > j) |
|
||||
{ |
|
||||
q[j * m + i] = r[j * m + i]; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
//compute the q elements explicitly
|
|
||||
if (m <= n) |
|
||||
{ |
|
||||
cungqr_(&m, &m, &m, q, &m, tau, work, &len, &info); |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
cungqr_(&m, &n, &n, q, &m, tau, work, &len, &info); |
|
||||
} |
|
||||
|
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer z_qr_factor(integer m, integer n, doublecomplex r[], doublecomplex tau[], doublecomplex q[], doublecomplex work[], integer len) |
|
||||
{ |
|
||||
integer info = 0; |
|
||||
zgeqrf_(&m, &n, r, &m, tau, work, &len, &info); |
|
||||
|
|
||||
for (integer i = 0; i < m; ++i) |
|
||||
{ |
|
||||
for (integer j = 0; j < m && j < n; ++j) |
|
||||
{ |
|
||||
if (i > j) |
|
||||
{ |
|
||||
q[j * m + i] = r[j * m + i]; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
//compute the q elements explicitly
|
|
||||
if (m <= n) |
|
||||
{ |
|
||||
zungqr_(&m, &m, &m, q, &m, tau, work, &len, &info); |
|
||||
} |
|
||||
else |
|
||||
{ |
|
||||
zungqr_(&m, &n, &n, q, &m, tau, work, &len, &info); |
|
||||
} |
|
||||
|
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer s_qr_solve(integer m, integer n, integer bn, float r[], float b[], float x[], float work[], integer len) |
|
||||
{ |
|
||||
integer info = 0; |
|
||||
float* clone_r = new float[m*n]; |
|
||||
memcpy(clone_r, r, m*n*sizeof(float)); |
|
||||
|
|
||||
float* tau = new float[max(1, min(m,n))]; |
|
||||
sgeqrf_(&m, &n, clone_r, &m, tau, work, &len, &info); |
|
||||
|
|
||||
if (info != 0) |
|
||||
{ |
|
||||
delete[] clone_r; |
|
||||
delete[] tau; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
float* clone_b = new float[m*bn]; |
|
||||
memcpy(clone_b, b, m*bn*sizeof(float)); |
|
||||
|
|
||||
char side ='L'; |
|
||||
char tran = 'T'; |
|
||||
char upper = 'U'; |
|
||||
char no = 'N'; |
|
||||
float one = 1.f; |
|
||||
sormqr_(&side, &tran, &m, &bn, &n, clone_r, &m, tau, clone_b, &m, work, &len, &info); |
|
||||
STRSM(&side, &upper, &no, &no, &n, &bn, &one, clone_r, &m, clone_b, &m); |
|
||||
for (integer i = 0; i < n; ++i) |
|
||||
{ |
|
||||
for (integer j = 0; j < bn; ++j) |
|
||||
{ |
|
||||
x[j * n + i] = clone_b[j * m + i]; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
delete[] clone_r; |
|
||||
delete[] tau; |
|
||||
delete[] clone_b; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer d_qr_solve(integer m, integer n, integer bn, double r[], double b[], double x[], double work[], integer len) |
|
||||
{ |
|
||||
integer info = 0; |
|
||||
double* clone_r = new double[m*n]; |
|
||||
memcpy(clone_r, r, m*n*sizeof(double)); |
|
||||
|
|
||||
double* tau = new double[max(1, min(m,n))]; |
|
||||
dgeqrf_(&m, &n, clone_r, &m, tau, work, &len, &info); |
|
||||
|
|
||||
if (info != 0) |
|
||||
{ |
|
||||
delete[] clone_r; |
|
||||
delete[] tau; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
double* clone_b = new double[m*bn]; |
|
||||
memcpy(clone_b, b, m*bn*sizeof(double)); |
|
||||
|
|
||||
char side ='L'; |
|
||||
char tran = 'T'; |
|
||||
char upper = 'U'; |
|
||||
char no = 'N'; |
|
||||
double one = 1.; |
|
||||
|
|
||||
dormqr_(&side, &tran, &m, &bn, &n, clone_r, &m, tau, clone_b, &m, work, &len, &info); |
|
||||
DTRSM(&side, &upper, &no, &no, &n, &bn, &one, clone_r, &m, clone_b, &m); |
|
||||
for (integer i = 0; i < n; ++i) |
|
||||
{ |
|
||||
for (integer j = 0; j < bn; ++j) |
|
||||
{ |
|
||||
x[j * n + i] = clone_b[j * m + i]; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
delete[] clone_b; |
|
||||
delete[] tau; |
|
||||
delete[] clone_r; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer c_qr_solve(integer m, integer n, integer bn, complex r[], complex b[], complex x[], complex work[], integer len) |
|
||||
{ |
|
||||
integer info = 0; |
|
||||
complex* clone_r = new complex[m*n]; |
|
||||
memcpy(clone_r, r, m*n*sizeof(complex)); |
|
||||
|
|
||||
complex* tau = new complex[min(m,n)]; |
|
||||
cgeqrf_(&m, &n, clone_r, &m, tau, work, &len, &info); |
|
||||
|
|
||||
if (info != 0) |
|
||||
{ |
|
||||
delete[] clone_r; |
|
||||
delete[] tau; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
char side ='L'; |
|
||||
char tran = 'C'; |
|
||||
char upper = 'U'; |
|
||||
char no = 'N'; |
|
||||
complex* clone_b = new complex[m*bn]; |
|
||||
memcpy(clone_b, b, m*bn*sizeof(complex)); |
|
||||
|
|
||||
cunmqr_(&side, &tran, &m, &bn, &n, clone_r, &m, tau, clone_b, &m, work, &len, &info); |
|
||||
complex one = {1.0, 0.0}; |
|
||||
CTRSM(&side, &upper, &no, &no, &n, &bn, &one, clone_r, &m, clone_b, &m); |
|
||||
|
|
||||
for (integer i = 0; i < n; ++i) |
|
||||
{ |
|
||||
for (integer j = 0; j < bn; ++j) |
|
||||
{ |
|
||||
x[j * n + i] = clone_b[j * m + i]; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
delete[] clone_r; |
|
||||
delete[] tau; |
|
||||
delete[] clone_b; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer z_qr_solve(integer m, integer n, integer bn, doublecomplex r[], doublecomplex b[], doublecomplex x[], doublecomplex work[], integer len) |
|
||||
{ |
|
||||
integer info = 0; |
|
||||
doublecomplex* clone_r = new doublecomplex[m*n]; |
|
||||
memcpy(clone_r, r, m*n*sizeof(doublecomplex)); |
|
||||
|
|
||||
doublecomplex* tau = new doublecomplex[min(m,n)]; |
|
||||
zgeqrf_(&m, &n, clone_r, &m, tau, work, &len, &info); |
|
||||
|
|
||||
if (info != 0) |
|
||||
{ |
|
||||
delete[] clone_r; |
|
||||
delete[] tau; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
char side ='L'; |
|
||||
char tran = 'C'; |
|
||||
char upper = 'U'; |
|
||||
char no = 'N'; |
|
||||
doublecomplex* clone_b = new doublecomplex[m*bn]; |
|
||||
memcpy(clone_b, b, m*bn*sizeof(doublecomplex)); |
|
||||
|
|
||||
zunmqr_(&side, &tran, &m, &bn, &n, clone_r, &m, tau, clone_b, &m, work, &len, &info); |
|
||||
doublecomplex one = {1.0, 0.0}; |
|
||||
ZTRSM(&side, &upper, &no, &no, &n, &bn, &one, clone_r, &m, clone_b, &m); |
|
||||
|
|
||||
for (integer i = 0; i < n; ++i) |
|
||||
{ |
|
||||
for (integer j = 0; j < bn; ++j) |
|
||||
{ |
|
||||
x[j * n + i] = clone_b[j * m + i]; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
delete[] clone_r; |
|
||||
delete[] tau; |
|
||||
delete[] clone_b; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer s_qr_solve_factored(integer m, integer n, integer bn, float r[], float b[], float tau[], float x[], float work[], integer len) |
|
||||
{ |
|
||||
char side ='L'; |
|
||||
char tran = 'T'; |
|
||||
integer info = 0; |
|
||||
char upper = 'U'; |
|
||||
char no = 'N'; |
|
||||
float one = 1.f; |
|
||||
|
|
||||
float* clone_b = new float[m*bn]; |
|
||||
memcpy(clone_b, b, m*bn*sizeof(float)); |
|
||||
|
|
||||
sormqr_(&side, &tran, &m, &bn, &n, r, &m, tau, clone_b, &m, work, &len, &info); |
|
||||
STRSM(&side, &upper, &no, &no, &n, &bn, &one, r, &m, clone_b, &m); |
|
||||
for (integer i = 0; i < n; ++i) |
|
||||
{ |
|
||||
for (integer j = 0; j < bn; ++j) |
|
||||
{ |
|
||||
x[j * n + i] = clone_b[j * m + i]; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
delete[] clone_b; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer d_qr_solve_factored(integer m, integer n, integer bn, double r[], double b[], double tau[], double x[], double work[], integer len) |
|
||||
{ |
|
||||
char side ='L'; |
|
||||
char tran = 'T'; |
|
||||
integer info = 0; |
|
||||
char upper = 'U'; |
|
||||
char no = 'N'; |
|
||||
double one = 1.; |
|
||||
|
|
||||
double* clone_b = new double[m*bn]; |
|
||||
memcpy(clone_b, b, m*bn*sizeof(double)); |
|
||||
|
|
||||
dormqr_(&side, &tran, &m, &bn, &n, r, &m, tau, clone_b, &m, work, &len, &info); |
|
||||
DTRSM(&side, &upper, &no, &no, &n, &bn, &one, r, &m, clone_b, &m); |
|
||||
for (integer i = 0; i < n; ++i) |
|
||||
{ |
|
||||
for (integer j = 0; j < bn; ++j) |
|
||||
{ |
|
||||
x[j * n + i] = clone_b[j * m + i]; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
delete[] clone_b; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer c_qr_solve_factored(integer m, integer n, integer bn, complex r[], complex b[], complex tau[], complex x[], complex work[], integer len) |
|
||||
{ |
|
||||
char side ='L'; |
|
||||
char tran = 'C'; |
|
||||
integer info = 0; |
|
||||
char upper = 'U'; |
|
||||
char no = 'N'; |
|
||||
|
|
||||
complex* clone_b = new complex[m*bn]; |
|
||||
memcpy(clone_b, b, m*bn*sizeof(complex)); |
|
||||
|
|
||||
cunmqr_(&side, &tran, &m, &bn, &n, r, &m, tau, clone_b, &m, work, &len, &info); |
|
||||
complex one = {1.0f, 0.0f}; |
|
||||
CTRSM(&side, &upper, &no, &no, &n, &bn, &one, r, &m, clone_b, &m); |
|
||||
for (integer i = 0; i < n; ++i) |
|
||||
{ |
|
||||
for (integer j = 0; j < bn; ++j) |
|
||||
{ |
|
||||
x[j * n + i] = clone_b[j * m + i]; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
delete[] clone_b; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer z_qr_solve_factored(integer m, integer n, integer bn, doublecomplex r[], doublecomplex b[], doublecomplex tau[], doublecomplex x[], doublecomplex work[], integer len) |
|
||||
{ |
|
||||
char side ='L'; |
|
||||
char tran = 'C'; |
|
||||
integer info = 0; |
|
||||
char upper = 'U'; |
|
||||
char no = 'N'; |
|
||||
|
|
||||
doublecomplex* clone_b = new doublecomplex[m*bn]; |
|
||||
memcpy(clone_b, b, m*bn*sizeof(doublecomplex)); |
|
||||
|
|
||||
zunmqr_(&side, &tran, &m, &bn, &n, r, &m, tau, clone_b, &m, work, &len, &info); |
|
||||
doublecomplex one = {1.0, 0.0}; |
|
||||
ZTRSM(&side, &upper, &no, &no, &n, &bn, &one, r, &m, clone_b, &m); |
|
||||
|
|
||||
for (integer i = 0; i < n; ++i) |
|
||||
{ |
|
||||
for (integer j = 0; j < bn; ++j) |
|
||||
{ |
|
||||
x[j * n + i] = clone_b[j * m + i]; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
delete[] clone_b; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer s_svd_factor(bool compute_vectors, integer m, integer n, float a[], float s[], float u[], float v[], float work[], integer len) |
|
||||
{ |
|
||||
integer info = 0; |
|
||||
char job = compute_vectors ? 'A' : 'N'; |
|
||||
sgesvd_(&job, &job, &m, &n, a, &m, s, u, &m, v, &n, work, &len, &info); |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer d_svd_factor(bool compute_vectors, integer m, integer n, double a[], double s[], double u[], double v[], double work[], integer len) |
|
||||
{ |
|
||||
integer info = 0; |
|
||||
char job = compute_vectors ? 'A' : 'N'; |
|
||||
dgesvd_(&job, &job, &m, &n, a, &m, s, u, &m, v, &n, work, &len, &info); |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer c_svd_factor(bool compute_vectors, integer m, integer n, complex a[], complex s[], complex u[], complex v[], complex work[], integer len) |
|
||||
{ |
|
||||
integer info = 0; |
|
||||
integer dim_s = min(m,n); |
|
||||
float* rwork = new float[5 * dim_s]; |
|
||||
float* s_local = new float[dim_s]; |
|
||||
char job = compute_vectors ? 'A' : 'N'; |
|
||||
cgesvd_(&job, &job, &m, &n, a, &m, s_local, u, &m, v, &n, work, &len, rwork, &info); |
|
||||
|
|
||||
for(integer index = 0; index < dim_s; ++index){ |
|
||||
complex value = {s_local[index], 0.0f}; |
|
||||
s[index] = value; |
|
||||
} |
|
||||
|
|
||||
delete[] rwork; |
|
||||
delete[] s_local; |
|
||||
return info; |
|
||||
} |
|
||||
|
|
||||
DLLEXPORT integer z_svd_factor(bool compute_vectors, integer m, integer n, doublecomplex a[], doublecomplex s[], doublecomplex u[], doublecomplex v[], doublecomplex work[], integer len) |
|
||||
{ |
|
||||
integer info = 0; |
|
||||
integer dim_s = min(m,n); |
|
||||
double* rwork = new double[5 * min(m, n)]; |
|
||||
double* s_local = new double[dim_s]; |
|
||||
char job = compute_vectors ? 'A' : 'N'; |
|
||||
zgesvd_(&job, &job, &m, &n, a, &m, s_local, u, &m, v, &n, work, &len, rwork, &info); |
|
||||
|
|
||||
for(integer index = 0; index < dim_s; ++index){ |
|
||||
doublecomplex value = {s_local[index], 0.0f}; |
|
||||
s[index] = value; |
|
||||
} |
|
||||
|
|
||||
delete[] rwork; |
|
||||
delete[] s_local; |
|
||||
return info; |
|
||||
} |
|
||||
} |
|
||||
@ -1,27 +0,0 @@ |
|||||
#ifndef LAPACK_H |
|
||||
#define LAPACK_H |
|
||||
|
|
||||
extern "C"{ |
|
||||
#include "f2c.h" |
|
||||
#include "clapack.h" |
|
||||
|
|
||||
enum CBLAS_ORDER {CblasRowMajor=101, CblasColMajor=102}; |
|
||||
enum CBLAS_TRANSPOSE {CblasNoTrans=111, CblasTrans=112, CblasConjTrans=113, CblasConjNoTrans=114}; |
|
||||
enum CBLAS_UPLO {CblasUpper=121, CblasLower=122}; |
|
||||
enum CBLAS_DIAG {CblasNonUnit=131, CblasUnit=132}; |
|
||||
enum CBLAS_SIDE {CblasLeft=141, CblasRight=142}; |
|
||||
|
|
||||
float slange_(char*, integer*, integer*, float*, integer*, float*); |
|
||||
float dlange_(char*, integer*, integer*, double*, integer*, double*); |
|
||||
float clange_(char*, integer*, integer*, complex*, integer*, float*); |
|
||||
float zlange_(char*, integer*, integer*, doublecomplex*, integer*, double*); |
|
||||
|
|
||||
void cblas_strsm(CBLAS_ORDER, CBLAS_SIDE, CBLAS_UPLO, CBLAS_TRANSPOSE, CBLAS_DIAG, integer, integer, float, float*, integer, float*, integer); |
|
||||
void cblas_dtrsm(CBLAS_ORDER, CBLAS_SIDE, CBLAS_UPLO, CBLAS_TRANSPOSE, CBLAS_DIAG, integer, integer, double, double*, integer, double*, integer); |
|
||||
void cblas_ctrsm(CBLAS_ORDER, CBLAS_SIDE, CBLAS_UPLO, CBLAS_TRANSPOSE, CBLAS_DIAG, integer, integer, complex*, complex*, integer, complex*, integer); |
|
||||
void cblas_ztrsm(CBLAS_ORDER, CBLAS_SIDE, CBLAS_UPLO, CBLAS_TRANSPOSE, CBLAS_DIAG, integer, integer, doublecomplex*, doublecomplex*, integer, doublecomplex*, integer); |
|
||||
|
|
||||
} |
|
||||
|
|
||||
#endif |
|
||||
|
|
||||
@ -1,180 +0,0 @@ |
|||||
<?xml version="1.0" encoding="Windows-1252"?> |
|
||||
<VisualStudioProject |
|
||||
ProjectType="Visual C++" |
|
||||
Version="9.00" |
|
||||
Name="ACMLWrapper" |
|
||||
ProjectGUID="{434AB06D-DD34-4E12-A296-9B3E72CD56E2}" |
|
||||
RootNamespace="ACMLWrapper" |
|
||||
TargetFrameworkVersion="196613" |
|
||||
> |
|
||||
<Platforms> |
|
||||
<Platform |
|
||||
Name="Win32" |
|
||||
/> |
|
||||
</Platforms> |
|
||||
<ToolFiles> |
|
||||
</ToolFiles> |
|
||||
<Configurations> |
|
||||
<Configuration |
|
||||
Name="Debug|Win32" |
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)" |
|
||||
IntermediateDirectory="$(ConfigurationName)" |
|
||||
ConfigurationType="1" |
|
||||
CharacterSet="2" |
|
||||
> |
|
||||
<Tool |
|
||||
Name="VCPreBuildEventTool" |
|
||||
/> |
|
||||
<Tool |
|
||||
Name="VCCustomBuildTool" |
|
||||
/> |
|
||||
<Tool |
|
||||
Name="VCXMLDataGeneratorTool" |
|
||||
/> |
|
||||
<Tool |
|
||||
Name="VCWebServiceProxyGeneratorTool" |
|
||||
/> |
|
||||
<Tool |
|
||||
Name="VCMIDLTool" |
|
||||
/> |
|
||||
<Tool |
|
||||
Name="VCCLCompilerTool" |
|
||||
Optimization="0" |
|
||||
MinimalRebuild="true" |
|
||||
BasicRuntimeChecks="3" |
|
||||
RuntimeLibrary="3" |
|
||||
WarningLevel="3" |
|
||||
DebugInformationFormat="4" |
|
||||
/> |
|
||||
<Tool |
|
||||
Name="VCManagedResourceCompilerTool" |
|
||||
/> |
|
||||
<Tool |
|
||||
Name="VCResourceCompilerTool" |
|
||||
/> |
|
||||
<Tool |
|
||||
Name="VCPreLinkEventTool" |
|
||||
/> |
|
||||
<Tool |
|
||||
Name="VCLinkerTool" |
|
||||
GenerateDebugInformation="true" |
|
||||
TargetMachine="1" |
|
||||
/> |
|
||||
<Tool |
|
||||
Name="VCALinkTool" |
|
||||
/> |
|
||||
<Tool |
|
||||
Name="VCManifestTool" |
|
||||
/> |
|
||||
<Tool |
|
||||
Name="VCXDCMakeTool" |
|
||||
/> |
|
||||
<Tool |
|
||||
Name="VCBscMakeTool" |
|
||||
/> |
|
||||
<Tool |
|
||||
Name="VCFxCopTool" |
|
||||
/> |
|
||||
<Tool |
|
||||
Name="VCAppVerifierTool" |
|
||||
/> |
|
||||
<Tool |
|
||||
Name="VCPostBuildEventTool" |
|
||||
/> |
|
||||
</Configuration> |
|
||||
<Configuration |
|
||||
Name="Release|Win32" |
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)" |
|
||||
IntermediateDirectory="$(ConfigurationName)" |
|
||||
ConfigurationType="1" |
|
||||
CharacterSet="2" |
|
||||
WholeProgramOptimization="1" |
|
||||
> |
|
||||
<Tool |
|
||||
Name="VCPreBuildEventTool" |
|
||||
/> |
|
||||
<Tool |
|
||||
Name="VCCustomBuildTool" |
|
||||
/> |
|
||||
<Tool |
|
||||
Name="VCXMLDataGeneratorTool" |
|
||||
/> |
|
||||
<Tool |
|
||||
Name="VCWebServiceProxyGeneratorTool" |
|
||||
/> |
|
||||
<Tool |
|
||||
Name="VCMIDLTool" |
|
||||
/> |
|
||||
<Tool |
|
||||
Name="VCCLCompilerTool" |
|
||||
Optimization="2" |
|
||||
EnableIntrinsicFunctions="true" |
|
||||
RuntimeLibrary="2" |
|
||||
EnableFunctionLevelLinking="true" |
|
||||
WarningLevel="3" |
|
||||
DebugInformationFormat="3" |
|
||||
/> |
|
||||
<Tool |
|
||||
Name="VCManagedResourceCompilerTool" |
|
||||
/> |
|
||||
<Tool |
|
||||
Name="VCResourceCompilerTool" |
|
||||
/> |
|
||||
<Tool |
|
||||
Name="VCPreLinkEventTool" |
|
||||
/> |
|
||||
<Tool |
|
||||
Name="VCLinkerTool" |
|
||||
GenerateDebugInformation="true" |
|
||||
OptimizeReferences="2" |
|
||||
EnableCOMDATFolding="2" |
|
||||
TargetMachine="1" |
|
||||
/> |
|
||||
<Tool |
|
||||
Name="VCALinkTool" |
|
||||
/> |
|
||||
<Tool |
|
||||
Name="VCManifestTool" |
|
||||
/> |
|
||||
<Tool |
|
||||
Name="VCXDCMakeTool" |
|
||||
/> |
|
||||
<Tool |
|
||||
Name="VCBscMakeTool" |
|
||||
/> |
|
||||
<Tool |
|
||||
Name="VCFxCopTool" |
|
||||
/> |
|
||||
<Tool |
|
||||
Name="VCAppVerifierTool" |
|
||||
/> |
|
||||
<Tool |
|
||||
Name="VCPostBuildEventTool" |
|
||||
/> |
|
||||
</Configuration> |
|
||||
</Configurations> |
|
||||
<References> |
|
||||
</References> |
|
||||
<Files> |
|
||||
<Filter |
|
||||
Name="Source Files" |
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" |
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" |
|
||||
> |
|
||||
</Filter> |
|
||||
<Filter |
|
||||
Name="Header Files" |
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd" |
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" |
|
||||
> |
|
||||
</Filter> |
|
||||
<Filter |
|
||||
Name="Resource Files" |
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" |
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" |
|
||||
> |
|
||||
</Filter> |
|
||||
</Files> |
|
||||
<Globals> |
|
||||
</Globals> |
|
||||
</VisualStudioProject> |
|
||||
@ -1,165 +0,0 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
<ItemGroup Label="ProjectConfigurations"> |
|
||||
<ProjectConfiguration Include="Debug|Win32"> |
|
||||
<Configuration>Debug</Configuration> |
|
||||
<Platform>Win32</Platform> |
|
||||
</ProjectConfiguration> |
|
||||
<ProjectConfiguration Include="Debug|x64"> |
|
||||
<Configuration>Debug</Configuration> |
|
||||
<Platform>x64</Platform> |
|
||||
</ProjectConfiguration> |
|
||||
<ProjectConfiguration Include="Release|Win32"> |
|
||||
<Configuration>Release</Configuration> |
|
||||
<Platform>Win32</Platform> |
|
||||
</ProjectConfiguration> |
|
||||
<ProjectConfiguration Include="Release|x64"> |
|
||||
<Configuration>Release</Configuration> |
|
||||
<Platform>x64</Platform> |
|
||||
</ProjectConfiguration> |
|
||||
</ItemGroup> |
|
||||
<PropertyGroup Label="Globals"> |
|
||||
<ProjectGuid>{8774BCBE-27D0-44D2-A1B3-8ED705E252CB}</ProjectGuid> |
|
||||
<Keyword>Win32Proj</Keyword> |
|
||||
<RootNamespace>ACMKWrapper</RootNamespace> |
|
||||
<ProjectName>ACMLWrapper</ProjectName> |
|
||||
</PropertyGroup> |
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> |
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType> |
|
||||
<UseDebugLibraries>true</UseDebugLibraries> |
|
||||
<CharacterSet>Unicode</CharacterSet> |
|
||||
<PlatformToolset>v110</PlatformToolset> |
|
||||
</PropertyGroup> |
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> |
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType> |
|
||||
<UseDebugLibraries>true</UseDebugLibraries> |
|
||||
<CharacterSet>Unicode</CharacterSet> |
|
||||
<PlatformToolset>v110</PlatformToolset> |
|
||||
</PropertyGroup> |
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> |
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType> |
|
||||
<UseDebugLibraries>false</UseDebugLibraries> |
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization> |
|
||||
<CharacterSet>Unicode</CharacterSet> |
|
||||
<PlatformToolset>v110</PlatformToolset> |
|
||||
</PropertyGroup> |
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> |
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType> |
|
||||
<UseDebugLibraries>false</UseDebugLibraries> |
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization> |
|
||||
<CharacterSet>Unicode</CharacterSet> |
|
||||
<PlatformToolset>v110</PlatformToolset> |
|
||||
</PropertyGroup> |
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
|
||||
<ImportGroup Label="ExtensionSettings"> |
|
||||
</ImportGroup> |
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
|
||||
</ImportGroup> |
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> |
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
|
||||
</ImportGroup> |
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
|
||||
</ImportGroup> |
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> |
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
|
||||
</ImportGroup> |
|
||||
<PropertyGroup Label="UserMacros" /> |
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
|
||||
<LinkIncremental>true</LinkIncremental> |
|
||||
</PropertyGroup> |
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
|
||||
<LinkIncremental>true</LinkIncremental> |
|
||||
</PropertyGroup> |
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
|
||||
<LinkIncremental>false</LinkIncremental> |
|
||||
</PropertyGroup> |
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
|
||||
<LinkIncremental>false</LinkIncremental> |
|
||||
</PropertyGroup> |
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
|
||||
<ClCompile> |
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
|
||||
<WarningLevel>Level3</WarningLevel> |
|
||||
<Optimization>Disabled</Optimization> |
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;ACMKWRAPPER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
|
||||
<AdditionalIncludeDirectories>..\..\Common;C:\AMD\acml4.4.0\ifort32_mp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
|
||||
</ClCompile> |
|
||||
<Link> |
|
||||
<SubSystem>Windows</SubSystem> |
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation> |
|
||||
<AdditionalLibraryDirectories>C:\AMD\acml4.4.0\ifort32_mp\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
|
||||
<AdditionalDependencies>libacml_mp_dll.lib;kernel32.lib;user32.lib;</AdditionalDependencies> |
|
||||
<OutputFile>$(OutDir)MathNET.Numerics.ACML.dll</OutputFile> |
|
||||
</Link> |
|
||||
</ItemDefinitionGroup> |
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
|
||||
<ClCompile> |
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
|
||||
<WarningLevel>Level3</WarningLevel> |
|
||||
<Optimization>Disabled</Optimization> |
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;ACMKWRAPPER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
|
||||
<AdditionalIncludeDirectories>..\..\Common;C:\AMD\acml4.4.0\ifort64_mp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
|
||||
</ClCompile> |
|
||||
<Link> |
|
||||
<SubSystem>Windows</SubSystem> |
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation> |
|
||||
<AdditionalLibraryDirectories>C:\AMD\acml4.4.0\ifort64_mp\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
|
||||
<AdditionalDependencies>libacml_mp_dll.lib;kernel32.lib;user32.lib;</AdditionalDependencies> |
|
||||
<OutputFile>$(OutDir)MathNET.Numerics.ACML.dll</OutputFile> |
|
||||
</Link> |
|
||||
</ItemDefinitionGroup> |
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
|
||||
<ClCompile> |
|
||||
<WarningLevel>Level3</WarningLevel> |
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
|
||||
<Optimization>MaxSpeed</Optimization> |
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking> |
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions> |
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;ACMKWRAPPER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
|
||||
<AdditionalIncludeDirectories>..\..\Common;C:\AMD\acml4.4.0\ifort32_mp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
|
||||
</ClCompile> |
|
||||
<Link> |
|
||||
<SubSystem>Windows</SubSystem> |
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation> |
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding> |
|
||||
<OptimizeReferences>true</OptimizeReferences> |
|
||||
<AdditionalLibraryDirectories>C:\AMD\acml4.4.0\ifort32_mp\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
|
||||
<AdditionalDependencies>libacml_mp_dll.lib;kernel32.lib;user32.lib;</AdditionalDependencies> |
|
||||
<OutputFile>$(OutDir)MathNET.Numerics.ACML.dll</OutputFile> |
|
||||
</Link> |
|
||||
</ItemDefinitionGroup> |
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
|
||||
<ClCompile> |
|
||||
<WarningLevel>Level3</WarningLevel> |
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
|
||||
<Optimization>MaxSpeed</Optimization> |
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking> |
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions> |
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;ACMKWRAPPER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
|
||||
<AdditionalIncludeDirectories>..\..\Common;C:\AMD\acml4.4.0\ifort64_mp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
|
||||
</ClCompile> |
|
||||
<Link> |
|
||||
<SubSystem>Windows</SubSystem> |
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation> |
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding> |
|
||||
<OptimizeReferences>true</OptimizeReferences> |
|
||||
<AdditionalLibraryDirectories>C:\AMD\acml4.4.0\ifort64_mp\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
|
||||
<AdditionalDependencies>libacml_mp_dll.lib;kernel32.lib;user32.lib;</AdditionalDependencies> |
|
||||
<OutputFile>$(OutDir)MathNET.Numerics.ACML.dll</OutputFile> |
|
||||
</Link> |
|
||||
</ItemDefinitionGroup> |
|
||||
<ItemGroup> |
|
||||
<ResourceCompile Include="..\..\Common\resource.rc" /> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup> |
|
||||
<ClCompile Include="..\..\ACML\blas.c" /> |
|
||||
<ClCompile Include="..\..\ACML\lapack.cpp" /> |
|
||||
<ClCompile Include="..\..\Common\WindowsDLL.cpp" /> |
|
||||
</ItemGroup> |
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
|
||||
<ImportGroup Label="ExtensionTargets"> |
|
||||
</ImportGroup> |
|
||||
</Project> |
|
||||
@ -1,102 +0,0 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
<PropertyGroup> |
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|
||||
<ProductVersion>8.0.30703</ProductVersion> |
|
||||
<SchemaVersion>2.0</SchemaVersion> |
|
||||
<ProjectGuid>{8A42A7F3-23C0-46D9-9DBA-B9039EB3C8EB}</ProjectGuid> |
|
||||
<OutputType>Library</OutputType> |
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder> |
|
||||
<RootNamespace>ACMLWrapperTests</RootNamespace> |
|
||||
<AssemblyName>ACMLWrapperTests</AssemblyName> |
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> |
|
||||
<FileAlignment>512</FileAlignment> |
|
||||
</PropertyGroup> |
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|
||||
<DebugSymbols>true</DebugSymbols> |
|
||||
<DebugType>full</DebugType> |
|
||||
<Optimize>false</Optimize> |
|
||||
<OutputPath>bin\Debug\</OutputPath> |
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|
||||
<ErrorReport>prompt</ErrorReport> |
|
||||
<WarningLevel>4</WarningLevel> |
|
||||
</PropertyGroup> |
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|
||||
<DebugType>pdbonly</DebugType> |
|
||||
<Optimize>true</Optimize> |
|
||||
<OutputPath>bin\Release\</OutputPath> |
|
||||
<DefineConstants>TRACE</DefineConstants> |
|
||||
<ErrorReport>prompt</ErrorReport> |
|
||||
<WarningLevel>4</WarningLevel> |
|
||||
<PlatformTarget>x86</PlatformTarget> |
|
||||
</PropertyGroup> |
|
||||
<ItemGroup> |
|
||||
<Reference Include="MathNet.Numerics"> |
|
||||
<HintPath>..\..\..\..\out\debug\Net40\MathNet.Numerics.dll</HintPath> |
|
||||
</Reference> |
|
||||
<Reference Include="nunit.framework"> |
|
||||
<HintPath>..\..\..\..\packages\NUnit.2.6.2\lib\nunit.framework.dll</HintPath> |
|
||||
</Reference> |
|
||||
<Reference Include="System" /> |
|
||||
<Reference Include="System.Core" /> |
|
||||
<Reference Include="System.Numerics" /> |
|
||||
<Reference Include="System.Xml.Linq" /> |
|
||||
<Reference Include="System.Data.DataSetExtensions" /> |
|
||||
<Reference Include="Microsoft.CSharp" /> |
|
||||
<Reference Include="System.Data" /> |
|
||||
<Reference Include="System.Xml" /> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup> |
|
||||
<Compile Include="..\..\..\UnitTests\AssertHelpers.cs"> |
|
||||
<Link>AssertHelpers.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\..\..\UnitTests\LinearAlgebraProviderTests\Complex32\LinearAlgebraProviderTests.cs"> |
|
||||
<Link>Complex32\LinearAlgebraProviderTests.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\..\..\UnitTests\LinearAlgebraProviderTests\Complex\LinearAlgebraProviderTests.cs"> |
|
||||
<Link>Complex\LinearAlgebraProviderTests.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\..\..\UnitTests\LinearAlgebraProviderTests\Double\LinearAlgebraProviderTests.cs"> |
|
||||
<Link>Double\LinearAlgebraProviderTests.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\..\..\UnitTests\LinearAlgebraProviderTests\Single\LinearAlgebraProviderTests.cs"> |
|
||||
<Link>Single\LinearAlgebraProviderTests.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="Complex32\AcmlLinearAlgebraProviderTests.cs" /> |
|
||||
<Compile Include="Complex\AcmlLinearAlgebraProviderTests.cs" /> |
|
||||
<Compile Include="Double\AcmlLinearAlgebraProviderTests.cs" /> |
|
||||
<Compile Include="Properties\AssemblyInfo.cs" /> |
|
||||
<Compile Include="Single\AcmlLinearAlgebraProviderTests.cs" /> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup> |
|
||||
<Content Include="..\Release\MathNET.Numerics.ACML.dll"> |
|
||||
<Link>MathNET.Numerics.ACML.dll</Link> |
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
|
||||
</Content> |
|
||||
<Content Include="C:\AMD\acml4.4.0\ifort32_mp\lib\libacml_mp_dll.dll"> |
|
||||
<Link>libacml_mp_dll.dll</Link> |
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
|
||||
</Content> |
|
||||
<Content Include="C:\AMD\acml4.4.0\ifort32_mp\lib\libifcoremd.dll"> |
|
||||
<Link>libifcoremd.dll</Link> |
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
|
||||
</Content> |
|
||||
<Content Include="C:\AMD\acml4.4.0\ifort32_mp\lib\libiomp5md.dll"> |
|
||||
<Link>libiomp5md.dll</Link> |
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
|
||||
</Content> |
|
||||
<Content Include="C:\AMD\acml4.4.0\ifort32_mp\lib\libmmd.dll"> |
|
||||
<Link>libmmd.dll</Link> |
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
|
||||
</Content> |
|
||||
</ItemGroup> |
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. |
|
||||
Other similar extension points exist, see Microsoft.Common.targets. |
|
||||
<Target Name="BeforeBuild"> |
|
||||
</Target> |
|
||||
<Target Name="AfterBuild"> |
|
||||
</Target> |
|
||||
--> |
|
||||
</Project> |
|
||||
@ -1,51 +0,0 @@ |
|||||
// <copyright file="AcmlLinearAlgebraProviderTests.cs" company="Math.NET">
|
|
||||
// Math.NET Numerics, part of the Math.NET Project
|
|
||||
// http://numerics.mathdotnet.com
|
|
||||
// http://github.com/mathnet/mathnet-numerics
|
|
||||
// http://mathnetnumerics.codeplex.com
|
|
||||
//
|
|
||||
// Copyright (c) 2009-2010 Math.NET
|
|
||||
//
|
|
||||
// Permission is hereby granted, free of charge, to any person
|
|
||||
// obtaining a copy of this software and associated documentation
|
|
||||
// files (the "Software"), to deal in the Software without
|
|
||||
// restriction, including without limitation the rights to use,
|
|
||||
// copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||
// copies of the Software, and to permit persons to whom the
|
|
||||
// Software is furnished to do so, subject to the following
|
|
||||
// conditions:
|
|
||||
//
|
|
||||
// The above copyright notice and this permission notice shall be
|
|
||||
// included in all copies or substantial portions of the Software.
|
|
||||
//
|
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
||||
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
||||
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
||||
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
|
||||
// </copyright>
|
|
||||
|
|
||||
using MathNet.Numerics.UnitTests.LinearAlgebraProviderTests.Complex; |
|
||||
|
|
||||
namespace MathNet.Numerics.AcmlBlasWrapperTests.LinearAlgebra.Complex |
|
||||
{ |
|
||||
using NUnit.Framework; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Unit test container for the ACML linear algebra provider.
|
|
||||
/// </summary>
|
|
||||
[TestFixture] |
|
||||
public class AcmlLinearAlgebraProviderTests : LinearAlgebraProviderTests |
|
||||
{ |
|
||||
/// <summary>
|
|
||||
/// Initializes a new instance of the <see cref="AcmlLinearAlgebraProviderTests"/> class.
|
|
||||
/// </summary>
|
|
||||
public AcmlLinearAlgebraProviderTests() |
|
||||
{ |
|
||||
Control.LinearAlgebraProvider = new Algorithms.LinearAlgebra.Acml.AcmlLinearAlgebraProvider(); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,51 +0,0 @@ |
|||||
// <copyright file="AcmlLinearAlgebraProviderTests.cs" company="Math.NET">
|
|
||||
// Math.NET Numerics, part of the Math.NET Project
|
|
||||
// http://numerics.mathdotnet.com
|
|
||||
// http://github.com/mathnet/mathnet-numerics
|
|
||||
// http://mathnetnumerics.codeplex.com
|
|
||||
//
|
|
||||
// Copyright (c) 2009-2010 Math.NET
|
|
||||
//
|
|
||||
// Permission is hereby granted, free of charge, to any person
|
|
||||
// obtaining a copy of this software and associated documentation
|
|
||||
// files (the "Software"), to deal in the Software without
|
|
||||
// restriction, including without limitation the rights to use,
|
|
||||
// copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||
// copies of the Software, and to permit persons to whom the
|
|
||||
// Software is furnished to do so, subject to the following
|
|
||||
// conditions:
|
|
||||
//
|
|
||||
// The above copyright notice and this permission notice shall be
|
|
||||
// included in all copies or substantial portions of the Software.
|
|
||||
//
|
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
||||
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
||||
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
||||
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
|
||||
// </copyright>
|
|
||||
|
|
||||
using MathNet.Numerics.UnitTests.LinearAlgebraProviderTests.Complex; |
|
||||
|
|
||||
namespace MathNet.Numerics.AcmlBlasWrapperTests.LinearAlgebra.Complex32 |
|
||||
{ |
|
||||
using NUnit.Framework; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Unit test container for the ACML linear algebra provider.
|
|
||||
/// </summary>
|
|
||||
[TestFixture] |
|
||||
public class AcmlLinearAlgebraProviderTests : LinearAlgebraProviderTests |
|
||||
{ |
|
||||
/// <summary>
|
|
||||
/// Initializes a new instance of the <see cref="AcmlLinearAlgebraProviderTests"/> class.
|
|
||||
/// </summary>
|
|
||||
public AcmlLinearAlgebraProviderTests() |
|
||||
{ |
|
||||
Control.LinearAlgebraProvider = new Algorithms.LinearAlgebra.Acml.AcmlLinearAlgebraProvider(); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,51 +0,0 @@ |
|||||
// <copyright file="AcmlLinearAlgebraProviderTests.cs" company="Math.NET">
|
|
||||
// Math.NET Numerics, part of the Math.NET Project
|
|
||||
// http://numerics.mathdotnet.com
|
|
||||
// http://github.com/mathnet/mathnet-numerics
|
|
||||
// http://mathnetnumerics.codeplex.com
|
|
||||
//
|
|
||||
// Copyright (c) 2009-2010 Math.NET
|
|
||||
//
|
|
||||
// Permission is hereby granted, free of charge, to any person
|
|
||||
// obtaining a copy of this software and associated documentation
|
|
||||
// files (the "Software"), to deal in the Software without
|
|
||||
// restriction, including without limitation the rights to use,
|
|
||||
// copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||
// copies of the Software, and to permit persons to whom the
|
|
||||
// Software is furnished to do so, subject to the following
|
|
||||
// conditions:
|
|
||||
//
|
|
||||
// The above copyright notice and this permission notice shall be
|
|
||||
// included in all copies or substantial portions of the Software.
|
|
||||
//
|
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
||||
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
||||
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
||||
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
|
||||
// </copyright>
|
|
||||
|
|
||||
using MathNet.Numerics.UnitTests.LinearAlgebraProviderTests.Complex; |
|
||||
|
|
||||
namespace MathNet.Numerics.AcmlBlasWrapperTests.LinearAlgebra.Double |
|
||||
{ |
|
||||
using NUnit.Framework; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Unit test container for the ACML linear algebra provider.
|
|
||||
/// </summary>
|
|
||||
[TestFixture] |
|
||||
public class AcmlLinearAlgebraProviderTests : LinearAlgebraProviderTests |
|
||||
{ |
|
||||
/// <summary>
|
|
||||
/// Initializes a new instance of the <see cref="AcmlLinearAlgebraProviderTests"/> class.
|
|
||||
/// </summary>
|
|
||||
public AcmlLinearAlgebraProviderTests() |
|
||||
{ |
|
||||
Control.LinearAlgebraProvider = new Algorithms.LinearAlgebra.Acml.AcmlLinearAlgebraProvider(); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,36 +0,0 @@ |
|||||
using System.Reflection; |
|
||||
using System.Runtime.CompilerServices; |
|
||||
using System.Runtime.InteropServices; |
|
||||
|
|
||||
// General Information about an assembly is controlled through the following
|
|
||||
// set of attributes. Change these attribute values to modify the information
|
|
||||
// associated with an assembly.
|
|
||||
[assembly: AssemblyTitle("ACMLWrapperTests")] |
|
||||
[assembly: AssemblyDescription("")] |
|
||||
[assembly: AssemblyConfiguration("")] |
|
||||
[assembly: AssemblyCompany("Microsoft")] |
|
||||
[assembly: AssemblyProduct("ACMLWrapperTests")] |
|
||||
[assembly: AssemblyCopyright("Copyright © Microsoft 2011")] |
|
||||
[assembly: AssemblyTrademark("")] |
|
||||
[assembly: AssemblyCulture("")] |
|
||||
|
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
|
||||
// to COM components. If you need to access a type in this assembly from
|
|
||||
// COM, set the ComVisible attribute to true on that type.
|
|
||||
[assembly: ComVisible(false)] |
|
||||
|
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
|
||||
[assembly: Guid("83801bc7-d554-4669-aede-db11d009d283")] |
|
||||
|
|
||||
// Version information for an assembly consists of the following four values:
|
|
||||
//
|
|
||||
// Major Version
|
|
||||
// Minor Version
|
|
||||
// Build Number
|
|
||||
// Revision
|
|
||||
//
|
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
|
||||
// by using the '*' as shown below:
|
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
|
||||
[assembly: AssemblyVersion("1.0.0.0")] |
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")] |
|
||||
@ -1,51 +0,0 @@ |
|||||
// <copyright file="AcmlLinearAlgebraProviderTests.cs" company="Math.NET">
|
|
||||
// Math.NET Numerics, part of the Math.NET Project
|
|
||||
// http://numerics.mathdotnet.com
|
|
||||
// http://github.com/mathnet/mathnet-numerics
|
|
||||
// http://mathnetnumerics.codeplex.com
|
|
||||
//
|
|
||||
// Copyright (c) 2009-2010 Math.NET
|
|
||||
//
|
|
||||
// Permission is hereby granted, free of charge, to any person
|
|
||||
// obtaining a copy of this software and associated documentation
|
|
||||
// files (the "Software"), to deal in the Software without
|
|
||||
// restriction, including without limitation the rights to use,
|
|
||||
// copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||
// copies of the Software, and to permit persons to whom the
|
|
||||
// Software is furnished to do so, subject to the following
|
|
||||
// conditions:
|
|
||||
//
|
|
||||
// The above copyright notice and this permission notice shall be
|
|
||||
// included in all copies or substantial portions of the Software.
|
|
||||
//
|
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
||||
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
||||
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
||||
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
|
||||
// </copyright>
|
|
||||
|
|
||||
using MathNet.Numerics.UnitTests.LinearAlgebraProviderTests.Complex; |
|
||||
|
|
||||
namespace MathNet.Numerics.AcmlBlasWrapperTests.LinearAlgebra.Single |
|
||||
{ |
|
||||
using NUnit.Framework; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Unit test container for the ACML linear algebra provider.
|
|
||||
/// </summary>
|
|
||||
[TestFixture] |
|
||||
public class AcmlLinearAlgebraProviderTests : LinearAlgebraProviderTests |
|
||||
{ |
|
||||
/// <summary>
|
|
||||
/// Initializes a new instance of the <see cref="AcmlLinearAlgebraProviderTests"/> class.
|
|
||||
/// </summary>
|
|
||||
public AcmlLinearAlgebraProviderTests() |
|
||||
{ |
|
||||
Control.LinearAlgebraProvider = new Algorithms.LinearAlgebra.Acml.AcmlLinearAlgebraProvider(); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,170 +0,0 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
<ItemGroup Label="ProjectConfigurations"> |
|
||||
<ProjectConfiguration Include="Debug|Win32"> |
|
||||
<Configuration>Debug</Configuration> |
|
||||
<Platform>Win32</Platform> |
|
||||
</ProjectConfiguration> |
|
||||
<ProjectConfiguration Include="Debug|x64"> |
|
||||
<Configuration>Debug</Configuration> |
|
||||
<Platform>x64</Platform> |
|
||||
</ProjectConfiguration> |
|
||||
<ProjectConfiguration Include="Release|Win32"> |
|
||||
<Configuration>Release</Configuration> |
|
||||
<Platform>Win32</Platform> |
|
||||
</ProjectConfiguration> |
|
||||
<ProjectConfiguration Include="Release|x64"> |
|
||||
<Configuration>Release</Configuration> |
|
||||
<Platform>x64</Platform> |
|
||||
</ProjectConfiguration> |
|
||||
</ItemGroup> |
|
||||
<PropertyGroup Label="Globals"> |
|
||||
<ProjectGuid>{507FF69E-32A6-495A-9DE2-20EC10EE8963}</ProjectGuid> |
|
||||
<Keyword>Win32Proj</Keyword> |
|
||||
<RootNamespace>GotoBLAS2Wrapper</RootNamespace> |
|
||||
</PropertyGroup> |
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> |
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType> |
|
||||
<UseDebugLibraries>true</UseDebugLibraries> |
|
||||
<CharacterSet>Unicode</CharacterSet> |
|
||||
</PropertyGroup> |
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> |
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType> |
|
||||
<UseDebugLibraries>true</UseDebugLibraries> |
|
||||
<CharacterSet>Unicode</CharacterSet> |
|
||||
</PropertyGroup> |
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> |
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType> |
|
||||
<UseDebugLibraries>false</UseDebugLibraries> |
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization> |
|
||||
<CharacterSet>Unicode</CharacterSet> |
|
||||
</PropertyGroup> |
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> |
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType> |
|
||||
<UseDebugLibraries>false</UseDebugLibraries> |
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization> |
|
||||
<CharacterSet>Unicode</CharacterSet> |
|
||||
</PropertyGroup> |
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
|
||||
<ImportGroup Label="ExtensionSettings"> |
|
||||
</ImportGroup> |
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
|
||||
</ImportGroup> |
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> |
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
|
||||
</ImportGroup> |
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
|
||||
</ImportGroup> |
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> |
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
|
||||
</ImportGroup> |
|
||||
<PropertyGroup Label="UserMacros" /> |
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
|
||||
<LinkIncremental>true</LinkIncremental> |
|
||||
</PropertyGroup> |
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
|
||||
<LinkIncremental>true</LinkIncremental> |
|
||||
</PropertyGroup> |
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
|
||||
<LinkIncremental>false</LinkIncremental> |
|
||||
</PropertyGroup> |
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
|
||||
<LinkIncremental>false</LinkIncremental> |
|
||||
</PropertyGroup> |
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
|
||||
<ClCompile> |
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
|
||||
<WarningLevel>Level3</WarningLevel> |
|
||||
<Optimization>Disabled</Optimization> |
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;GOTOBLAS2WRAPPER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
|
||||
<AdditionalIncludeDirectories>..\..\Common;..\..\GotoBLAS2;.\include;</AdditionalIncludeDirectories> |
|
||||
</ClCompile> |
|
||||
<Link> |
|
||||
<SubSystem>Windows</SubSystem> |
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation> |
|
||||
<AdditionalLibraryDirectories>..\..\..\..\lib\GotoBLAS2\x86;</AdditionalLibraryDirectories> |
|
||||
<AdditionalDependencies>libgoto2.lib;libf2c_x86.lib;%(AdditionalDependencies)</AdditionalDependencies> |
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> |
|
||||
<OutputFile>$(OutDir)MathNET.Numerics.GotoBLAS2.dll</OutputFile> |
|
||||
</Link> |
|
||||
</ItemDefinitionGroup> |
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
|
||||
<ClCompile> |
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
|
||||
<WarningLevel>Level3</WarningLevel> |
|
||||
<Optimization>Disabled</Optimization> |
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;GOTOBLAS2WRAPPER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
|
||||
<AdditionalIncludeDirectories>..\..\Common;..\..\GotoBLAS2;.\include;</AdditionalIncludeDirectories> |
|
||||
</ClCompile> |
|
||||
<Link> |
|
||||
<SubSystem>Windows</SubSystem> |
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation> |
|
||||
<AdditionalLibraryDirectories>..\..\..\..\lib\GotoBLAS2;</AdditionalLibraryDirectories> |
|
||||
<AdditionalDependencies>libgoto2_core2p-r1.13_x86_64.lib;libf2c_x86_64.lib;lapack_x86_64.lib;%(AdditionalDependencies)</AdditionalDependencies> |
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> |
|
||||
<OutputFile>$(OutDir)MathNET.Numerics.GotoBLAS2.dll</OutputFile> |
|
||||
</Link> |
|
||||
</ItemDefinitionGroup> |
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
|
||||
<ClCompile> |
|
||||
<WarningLevel>Level3</WarningLevel> |
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
|
||||
<Optimization>MaxSpeed</Optimization> |
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking> |
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions> |
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;GOTOBLAS2WRAPPER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
|
||||
<AdditionalIncludeDirectories>..\..\Common;..\..\GotoBLAS2;.\include;</AdditionalIncludeDirectories> |
|
||||
</ClCompile> |
|
||||
<Link> |
|
||||
<SubSystem>Windows</SubSystem> |
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation> |
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding> |
|
||||
<OptimizeReferences>true</OptimizeReferences> |
|
||||
<AdditionalLibraryDirectories>..\..\..\..\lib\GotoBLAS2\x86;</AdditionalLibraryDirectories> |
|
||||
<AdditionalDependencies>libgoto2.lib;%(AdditionalDependencies)</AdditionalDependencies> |
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> |
|
||||
<OutputFile>$(OutDir)MathNET.Numerics.GotoBLAS2.dll</OutputFile> |
|
||||
</Link> |
|
||||
</ItemDefinitionGroup> |
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
|
||||
<ClCompile> |
|
||||
<WarningLevel>Level3</WarningLevel> |
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
|
||||
<Optimization>MaxSpeed</Optimization> |
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking> |
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions> |
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;GOTOBLAS2WRAPPER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
|
||||
<AdditionalIncludeDirectories>..\..\Common;..\..\GotoBLAS2;.\include;</AdditionalIncludeDirectories> |
|
||||
</ClCompile> |
|
||||
<Link> |
|
||||
<SubSystem>Windows</SubSystem> |
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation> |
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding> |
|
||||
<OptimizeReferences>true</OptimizeReferences> |
|
||||
<AdditionalLibraryDirectories>..\..\..\..\lib\GotoBLAS2;</AdditionalLibraryDirectories> |
|
||||
<AdditionalDependencies>libgoto2_core2p-r1.13_x86_64.lib;libf2c_x86_64.lib;lapack_x86_64.lib;%(AdditionalDependencies)</AdditionalDependencies> |
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> |
|
||||
<OutputFile>$(OutDir)MathNET.Numerics.GotoBLAS2.dll</OutputFile> |
|
||||
</Link> |
|
||||
</ItemDefinitionGroup> |
|
||||
<ItemGroup> |
|
||||
<ResourceCompile Include="..\..\Common\resource.rc" /> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup> |
|
||||
<ClInclude Include="..\..\Common\wrapper_common.h" /> |
|
||||
<ClInclude Include="..\..\GotoBlas2\clapack.h" /> |
|
||||
<ClInclude Include="..\..\GotoBlas2\f2c.h" /> |
|
||||
<ClInclude Include="..\..\GotoBlas2\lapack.h" /> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup> |
|
||||
<ClCompile Include="..\..\Common\WindowsDLL.cpp" /> |
|
||||
<ClCompile Include="..\..\GotoBlas2\blas.c" /> |
|
||||
<ClCompile Include="..\..\GotoBlas2\lapack.cpp" /> |
|
||||
</ItemGroup> |
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
|
||||
<ImportGroup Label="ExtensionTargets"> |
|
||||
</ImportGroup> |
|
||||
</Project> |
|
||||
@ -1,47 +0,0 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
<ItemGroup> |
|
||||
<Filter Include="Source Files"> |
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> |
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> |
|
||||
</Filter> |
|
||||
<Filter Include="Header Files"> |
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> |
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> |
|
||||
</Filter> |
|
||||
<Filter Include="Resource Files"> |
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> |
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions> |
|
||||
</Filter> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup> |
|
||||
<ResourceCompile Include="..\..\Common\resource.rc"> |
|
||||
<Filter>Resource Files</Filter> |
|
||||
</ResourceCompile> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup> |
|
||||
<ClInclude Include="..\..\Common\wrapper_common.h"> |
|
||||
<Filter>Header Files</Filter> |
|
||||
</ClInclude> |
|
||||
<ClInclude Include="..\..\GotoBlas2\lapack.h"> |
|
||||
<Filter>Header Files</Filter> |
|
||||
</ClInclude> |
|
||||
<ClInclude Include="..\..\GotoBlas2\clapack.h"> |
|
||||
<Filter>Header Files</Filter> |
|
||||
</ClInclude> |
|
||||
<ClInclude Include="..\..\GotoBlas2\f2c.h"> |
|
||||
<Filter>Header Files</Filter> |
|
||||
</ClInclude> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup> |
|
||||
<ClCompile Include="..\..\Common\WindowsDLL.cpp"> |
|
||||
<Filter>Source Files</Filter> |
|
||||
</ClCompile> |
|
||||
<ClCompile Include="..\..\GotoBlas2\blas.c"> |
|
||||
<Filter>Source Files</Filter> |
|
||||
</ClCompile> |
|
||||
<ClCompile Include="..\..\GotoBlas2\lapack.cpp"> |
|
||||
<Filter>Source Files</Filter> |
|
||||
</ClCompile> |
|
||||
</ItemGroup> |
|
||||
</Project> |
|
||||
@ -1,51 +0,0 @@ |
|||||
// <copyright file="MklLinearAlgebraProviderTests.cs" company="Math.NET">
|
|
||||
// Math.NET Numerics, part of the Math.NET Project
|
|
||||
// http://numerics.mathdotnet.com
|
|
||||
// http://github.com/mathnet/mathnet-numerics
|
|
||||
// http://mathnetnumerics.codeplex.com
|
|
||||
//
|
|
||||
// Copyright (c) 2009-2010 Math.NET
|
|
||||
//
|
|
||||
// Permission is hereby granted, free of charge, to any person
|
|
||||
// obtaining a copy of this software and associated documentation
|
|
||||
// files (the "Software"), to deal in the Software without
|
|
||||
// restriction, including without limitation the rights to use,
|
|
||||
// copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||
// copies of the Software, and to permit persons to whom the
|
|
||||
// Software is furnished to do so, subject to the following
|
|
||||
// conditions:
|
|
||||
//
|
|
||||
// The above copyright notice and this permission notice shall be
|
|
||||
// included in all copies or substantial portions of the Software.
|
|
||||
//
|
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
||||
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
||||
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
||||
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
|
||||
// </copyright>
|
|
||||
|
|
||||
using MathNet.Numerics.UnitTests.LinearAlgebraProviderTests.Complex; |
|
||||
|
|
||||
namespace MathNet.Numerics.GotoBlasWrapperTests.LinearAlgebra.Complex |
|
||||
{ |
|
||||
using NUnit.Framework; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Unit test container for the GotoBLAS2 linear algebra provider.
|
|
||||
/// </summary>
|
|
||||
[TestFixture] |
|
||||
public class GotoBlasLinearAlgebraProviderTests : LinearAlgebraProviderTests |
|
||||
{ |
|
||||
/// <summary>
|
|
||||
/// Initializes a new instance of the <see cref="GotoBlasLinearAlgebraProviderTests"/> class.
|
|
||||
/// </summary>
|
|
||||
public GotoBlasLinearAlgebraProviderTests() |
|
||||
{ |
|
||||
Control.LinearAlgebraProvider = new Algorithms.LinearAlgebra.GotoBlas.GotoBlasLinearAlgebraProvider(); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,51 +0,0 @@ |
|||||
// <copyright file="MklLinearAlgebraProviderTests.cs" company="Math.NET">
|
|
||||
// Math.NET Numerics, part of the Math.NET Project
|
|
||||
// http://numerics.mathdotnet.com
|
|
||||
// http://github.com/mathnet/mathnet-numerics
|
|
||||
// http://mathnetnumerics.codeplex.com
|
|
||||
//
|
|
||||
// Copyright (c) 2009-2010 Math.NET
|
|
||||
//
|
|
||||
// Permission is hereby granted, free of charge, to any person
|
|
||||
// obtaining a copy of this software and associated documentation
|
|
||||
// files (the "Software"), to deal in the Software without
|
|
||||
// restriction, including without limitation the rights to use,
|
|
||||
// copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||
// copies of the Software, and to permit persons to whom the
|
|
||||
// Software is furnished to do so, subject to the following
|
|
||||
// conditions:
|
|
||||
//
|
|
||||
// The above copyright notice and this permission notice shall be
|
|
||||
// included in all copies or substantial portions of the Software.
|
|
||||
//
|
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
||||
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
||||
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
||||
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
|
||||
// </copyright>
|
|
||||
|
|
||||
using MathNet.Numerics.UnitTests.LinearAlgebraProviderTests.Complex32; |
|
||||
|
|
||||
namespace MathNet.Numerics.GotoBlasWrapperTests.LinearAlgebra.Complex32 |
|
||||
{ |
|
||||
using NUnit.Framework; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Unit test container for the GotoBLAS2 linear algebra provider.
|
|
||||
/// </summary>
|
|
||||
[TestFixture] |
|
||||
public class GotoBlasLinearAlgebraProviderTests : LinearAlgebraProviderTests |
|
||||
{ |
|
||||
/// <summary>
|
|
||||
/// Initializes a new instance of the <see cref="GotoBlasLinearAlgebraProviderTests"/> class.
|
|
||||
/// </summary>
|
|
||||
public GotoBlasLinearAlgebraProviderTests() |
|
||||
{ |
|
||||
Control.LinearAlgebraProvider = new Algorithms.LinearAlgebra.GotoBlas.GotoBlasLinearAlgebraProvider(); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,51 +0,0 @@ |
|||||
// <copyright file="MklLinearAlgebraProviderTests.cs" company="Math.NET">
|
|
||||
// Math.NET Numerics, part of the Math.NET Project
|
|
||||
// http://numerics.mathdotnet.com
|
|
||||
// http://github.com/mathnet/mathnet-numerics
|
|
||||
// http://mathnetnumerics.codeplex.com
|
|
||||
//
|
|
||||
// Copyright (c) 2009-2010 Math.NET
|
|
||||
//
|
|
||||
// Permission is hereby granted, free of charge, to any person
|
|
||||
// obtaining a copy of this software and associated documentation
|
|
||||
// files (the "Software"), to deal in the Software without
|
|
||||
// restriction, including without limitation the rights to use,
|
|
||||
// copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||
// copies of the Software, and to permit persons to whom the
|
|
||||
// Software is furnished to do so, subject to the following
|
|
||||
// conditions:
|
|
||||
//
|
|
||||
// The above copyright notice and this permission notice shall be
|
|
||||
// included in all copies or substantial portions of the Software.
|
|
||||
//
|
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
||||
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
||||
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
||||
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
|
||||
// </copyright>
|
|
||||
|
|
||||
using MathNet.Numerics.UnitTests.LinearAlgebraProviderTests.Double; |
|
||||
|
|
||||
namespace MathNet.Numerics.GotoBlasWrapperTests.LinearAlgebra.Double |
|
||||
{ |
|
||||
using NUnit.Framework; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Unit test container for the GotoBLAS2 linear algebra provider.
|
|
||||
/// </summary>
|
|
||||
[TestFixture] |
|
||||
public class GotoBlasLinearAlgebraProviderTests : LinearAlgebraProviderTests |
|
||||
{ |
|
||||
/// <summary>
|
|
||||
/// Initializes a new instance of the <see cref="GotoBlasLinearAlgebraProviderTests"/> class.
|
|
||||
/// </summary>
|
|
||||
public GotoBlasLinearAlgebraProviderTests() |
|
||||
{ |
|
||||
Control.LinearAlgebraProvider = new Algorithms.LinearAlgebra.GotoBlas.GotoBlasLinearAlgebraProvider(); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,124 +0,0 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
||||
<PropertyGroup> |
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|
||||
<ProductVersion>8.0.30703</ProductVersion> |
|
||||
<SchemaVersion>2.0</SchemaVersion> |
|
||||
<ProjectGuid>{56FFAB18-CAA6-4913-8123-610872BFD60A}</ProjectGuid> |
|
||||
<OutputType>Library</OutputType> |
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder> |
|
||||
<RootNamespace>GotoBLAS2WrapperTests</RootNamespace> |
|
||||
<AssemblyName>GotoBLAS2WrapperTests</AssemblyName> |
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> |
|
||||
<FileAlignment>512</FileAlignment> |
|
||||
</PropertyGroup> |
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|
||||
<DebugSymbols>true</DebugSymbols> |
|
||||
<DebugType>full</DebugType> |
|
||||
<Optimize>false</Optimize> |
|
||||
<OutputPath>bin\Debug\</OutputPath> |
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|
||||
<ErrorReport>prompt</ErrorReport> |
|
||||
<WarningLevel>4</WarningLevel> |
|
||||
</PropertyGroup> |
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|
||||
<DebugType>pdbonly</DebugType> |
|
||||
<Optimize>true</Optimize> |
|
||||
<OutputPath>bin\Release\</OutputPath> |
|
||||
<DefineConstants>TRACE</DefineConstants> |
|
||||
<ErrorReport>prompt</ErrorReport> |
|
||||
<WarningLevel>4</WarningLevel> |
|
||||
<PlatformTarget>x86</PlatformTarget> |
|
||||
</PropertyGroup> |
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> |
|
||||
<DebugSymbols>true</DebugSymbols> |
|
||||
<OutputPath>bin\x86\Debug\</OutputPath> |
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|
||||
<DebugType>full</DebugType> |
|
||||
<PlatformTarget>x86</PlatformTarget> |
|
||||
<CodeAnalysisLogFile>bin\Debug\GotoBLAS2WrapperTests.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile> |
|
||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression> |
|
||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile> |
|
||||
<ErrorReport>prompt</ErrorReport> |
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> |
|
||||
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories> |
|
||||
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets> |
|
||||
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories> |
|
||||
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules> |
|
||||
<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules> |
|
||||
</PropertyGroup> |
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> |
|
||||
<OutputPath>bin\x86\Release\</OutputPath> |
|
||||
<DefineConstants>TRACE</DefineConstants> |
|
||||
<Optimize>true</Optimize> |
|
||||
<DebugType>pdbonly</DebugType> |
|
||||
<PlatformTarget>x86</PlatformTarget> |
|
||||
<CodeAnalysisLogFile>bin\Release\GotoBLAS2WrapperTests.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile> |
|
||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression> |
|
||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile> |
|
||||
<ErrorReport>prompt</ErrorReport> |
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> |
|
||||
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories> |
|
||||
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets> |
|
||||
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories> |
|
||||
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules> |
|
||||
</PropertyGroup> |
|
||||
<ItemGroup> |
|
||||
<Reference Include="MathNet.Numerics, Version=2011.4.1.635, Culture=neutral, PublicKeyToken=cd8b63ad3d691a37, processorArchitecture=MSIL"> |
|
||||
<SpecificVersion>False</SpecificVersion> |
|
||||
<HintPath>..\..\..\..\out\debug\Net40\MathNet.Numerics.dll</HintPath> |
|
||||
</Reference> |
|
||||
<Reference Include="nunit.framework"> |
|
||||
<HintPath>..\..\..\..\lib\NUnit.2.5.9\nunit.framework.dll</HintPath> |
|
||||
</Reference> |
|
||||
<Reference Include="System" /> |
|
||||
<Reference Include="System.Core" /> |
|
||||
<Reference Include="System.Numerics" /> |
|
||||
<Reference Include="System.Xml.Linq" /> |
|
||||
<Reference Include="System.Data.DataSetExtensions" /> |
|
||||
<Reference Include="Microsoft.CSharp" /> |
|
||||
<Reference Include="System.Data" /> |
|
||||
<Reference Include="System.Xml" /> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup> |
|
||||
<Compile Include="..\..\..\UnitTests\AssertHelpers.cs"> |
|
||||
<Link>AssertHelpers.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\..\..\unittests\linearalgebraprovidertests\complex32\LinearAlgebraProviderTests.cs"> |
|
||||
<Link>Complex32\LinearAlgebraProviderTests.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\..\..\unittests\linearalgebraprovidertests\complex\LinearAlgebraProviderTests.cs"> |
|
||||
<Link>Complex\LinearAlgebraProviderTests.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\..\..\unittests\linearalgebraprovidertests\double\LinearAlgebraProviderTests.cs"> |
|
||||
<Link>Double\LinearAlgebraProviderTests.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="..\..\..\unittests\linearalgebraprovidertests\single\LinearAlgebraProviderTests.cs"> |
|
||||
<Link>Single\LinearAlgebraProviderTests.cs</Link> |
|
||||
</Compile> |
|
||||
<Compile Include="Complex32\GotoBlasLinearAlgebraProviderTests.cs" /> |
|
||||
<Compile Include="Complex\GotoBlasLinearAlgebraProviderTests.cs" /> |
|
||||
<Compile Include="Double\GotoBlasLinearAlgebraProviderTests.cs" /> |
|
||||
<Compile Include="Properties\AssemblyInfo.cs" /> |
|
||||
<Compile Include="Single\GotoBlasLinearAlgebraProviderTests.cs" /> |
|
||||
</ItemGroup> |
|
||||
<ItemGroup> |
|
||||
<Content Include="..\..\..\..\lib\GotoBLAS2\x86\libgoto2.dll"> |
|
||||
<Link>libgoto2.dll</Link> |
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
|
||||
</Content> |
|
||||
<Content Include="..\Release\MathNET.Numerics.GotoBLAS2.dll"> |
|
||||
<Link>MathNET.Numerics.GotoBLAS2.dll</Link> |
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
|
||||
</Content> |
|
||||
</ItemGroup> |
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. |
|
||||
Other similar extension points exist, see Microsoft.Common.targets. |
|
||||
<Target Name="BeforeBuild"> |
|
||||
</Target> |
|
||||
<Target Name="AfterBuild"> |
|
||||
</Target> |
|
||||
--> |
|
||||
</Project> |
|
||||
@ -1,36 +0,0 @@ |
|||||
using System.Reflection; |
|
||||
using System.Runtime.CompilerServices; |
|
||||
using System.Runtime.InteropServices; |
|
||||
|
|
||||
// General Information about an assembly is controlled through the following
|
|
||||
// set of attributes. Change these attribute values to modify the information
|
|
||||
// associated with an assembly.
|
|
||||
[assembly: AssemblyTitle("GotoBLAS2WrapperTests")] |
|
||||
[assembly: AssemblyDescription("")] |
|
||||
[assembly: AssemblyConfiguration("")] |
|
||||
[assembly: AssemblyCompany("Microsoft")] |
|
||||
[assembly: AssemblyProduct("GotoBLAS2WrapperTests")] |
|
||||
[assembly: AssemblyCopyright("Copyright © Microsoft 2011")] |
|
||||
[assembly: AssemblyTrademark("")] |
|
||||
[assembly: AssemblyCulture("")] |
|
||||
|
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
|
||||
// to COM components. If you need to access a type in this assembly from
|
|
||||
// COM, set the ComVisible attribute to true on that type.
|
|
||||
[assembly: ComVisible(false)] |
|
||||
|
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
|
||||
[assembly: Guid("eea98ed9-b5a4-4c81-ac6b-808eecd4bedf")] |
|
||||
|
|
||||
// Version information for an assembly consists of the following four values:
|
|
||||
//
|
|
||||
// Major Version
|
|
||||
// Minor Version
|
|
||||
// Build Number
|
|
||||
// Revision
|
|
||||
//
|
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
|
||||
// by using the '*' as shown below:
|
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
|
||||
[assembly: AssemblyVersion("1.0.0.0")] |
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")] |
|
||||
@ -1,51 +0,0 @@ |
|||||
// <copyright file="MklLinearAlgebraProviderTests.cs" company="Math.NET">
|
|
||||
// Math.NET Numerics, part of the Math.NET Project
|
|
||||
// http://numerics.mathdotnet.com
|
|
||||
// http://github.com/mathnet/mathnet-numerics
|
|
||||
// http://mathnetnumerics.codeplex.com
|
|
||||
//
|
|
||||
// Copyright (c) 2009-2010 Math.NET
|
|
||||
//
|
|
||||
// Permission is hereby granted, free of charge, to any person
|
|
||||
// obtaining a copy of this software and associated documentation
|
|
||||
// files (the "Software"), to deal in the Software without
|
|
||||
// restriction, including without limitation the rights to use,
|
|
||||
// copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||
// copies of the Software, and to permit persons to whom the
|
|
||||
// Software is furnished to do so, subject to the following
|
|
||||
// conditions:
|
|
||||
//
|
|
||||
// The above copyright notice and this permission notice shall be
|
|
||||
// included in all copies or substantial portions of the Software.
|
|
||||
//
|
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
||||
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
||||
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
||||
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
|
||||
// </copyright>
|
|
||||
|
|
||||
using MathNet.Numerics.UnitTests.LinearAlgebraProviderTests.Single; |
|
||||
|
|
||||
namespace MathNet.Numerics.GotoBlasWrapperTests.LinearAlgebra.Single |
|
||||
{ |
|
||||
using NUnit.Framework; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Unit test container for the GotoBLAS2 linear algebra provider.
|
|
||||
/// </summary>
|
|
||||
[TestFixture] |
|
||||
public class GotoBlasLinearAlgebraProviderTests : LinearAlgebraProviderTests |
|
||||
{ |
|
||||
/// <summary>
|
|
||||
/// Initializes a new instance of the <see cref="GotoBlasLinearAlgebraProviderTests"/> class.
|
|
||||
/// </summary>
|
|
||||
public GotoBlasLinearAlgebraProviderTests() |
|
||||
{ |
|
||||
Control.LinearAlgebraProvider = new Algorithms.LinearAlgebra.GotoBlas.GotoBlasLinearAlgebraProvider(); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
Loading…
Reference in new issue