imaging_lapack.hpp

00001 // This file is part of the imaging2 class library. 
00002 // 
00003 // University of Innsbruck, Infmath Imaging, 2009.
00004 // http://infmath.uibk.ac.at
00005 //
00006 // All rights reserved.
00007 
00009 
00010 
00011 #ifndef IMAGING_LAPACK_H
00012 #define IMAGING_LAPACK_H
00013 
00014 
00015 #ifdef LAPACK_ACML
00016 
00017 #include <acml.h>
00018 
00019 #define IMAGING_DGETRI(n, a, lda, ipiv, work, lwork, info) dgetri(n, a, lda, ipiv, info)
00020 #define IMAGING_SGETRI(n, a, lda, ipiv, work, lwork, info) sgetri(n, a, lda, ipiv, info)
00021 
00022 #define IMAGING_DGETRF(m, n, a, lda, ipiv, info) dgetrf(m, n, a, lda, ipiv, info)
00023 #define IMAGING_SGETRF(m, n, a, lda, ipiv, info) sgetrf(m, n, a, lda, ipiv, info)
00024 
00025 #define IMAGING_DGESV(n, nrhs, a, lda, ipiv, b, ldb, info) dgesv(n, nrhs, a, lda, ipiv, b, ldb, info)
00026 #define IMAGING_SGESV(n, nrhs, a, lda, ipiv, b, ldb, info) sgesv(n, nrhs, a, lda, ipiv, b, ldb, info)
00027 
00028 #define IMAGING_DORGTR(uplo, n, a, lda, tau, work, lwork, info) dorgtr(uplo, n, a, lda, tau, info)
00029 #define IMAGING_SORGTR(uplo, n, a, lda, tau, work, lwork, info) sorgtr(uplo, n, a, lda, tau, info)
00030 
00031 #define IMAGING_DSYTRD(uplo, n, a, lda, d, e, tau, work, lwork, info) dsytrd(uplo, n, a, lda, d, e, tau, info)
00032 #define IMAGING_SSYTRD(uplo, n, a, lda, d, e, tau, work, lwork, info) ssytrd(uplo, n, a, lda, d, e, tau, info)
00033 
00034 #define IMAGING_DSTEQR(compz, n, d, e, z, ldz, work, info) dsteqr(compz, n, d, e, z, ldz, info)
00035 #define IMAGING_SSTEQR(compz, n, d, e, z, ldz, work, info) ssteqr(compz, n, d, e, z, ldz, info)
00036 
00037 #else
00038 
00039 #define IMAGING_DGETRI(n, a, lda, ipiv, work, lwork, info) dgetri_(&n, a, &lda, ipiv, work, &lwork, info)
00040 #define IMAGING_SGETRI(n, a, lda, ipiv, work, lwork, info) sgetri_(&n, a, &lda, ipiv, work, &lwork, info)
00041 
00042 #define IMAGING_DGETRF(m, n, a, lda, ipiv, info) dgetrf_(&m, &n, a, &lda, ipiv, info)
00043 #define IMAGING_SGETRF(m, n, a, lda, ipiv, info) sgetrf_(&m, &n, a, &lda, ipiv, info)
00044 
00045 #define IMAGING_DGESV(n, nrhs, a, lda, ipiv, b, ldb, info) dgesv_(&n, &nrhs, a, &lda, ipiv, b, &ldb, info)
00046 #define IMAGING_SGESV(n, nrhs, a, lda, ipiv, b, ldb, info) sgesv_(&n, &nrhs, a, &lda, ipiv, b, &ldb, info)
00047 
00048 #define IMAGING_DORGTR(uplo, n, a, lda, tau, work, lwork, info) dorgtr_(&uplo, &n, a, &lda, tau, work, &lwork, info)
00049 #define IMAGING_SORGTR(uplo, n, a, lda, tau, work, lwork, info) sorgtr_(&uplo, &n, a, &lda, tau, work, &lwork, info)
00050 
00051 #define IMAGING_DSYTRD(uplo, n, a, lda, d, e, tau, work, lwork, info) dsytrd_(&uplo, &n, a, &lda, d, e, tau, work, &lwork, info)
00052 #define IMAGING_SSYTRD(uplo, n, a, lda, d, e, tau, work, lwork, info) ssytrd_(&uplo, &n, a, &lda, d, e, tau, work, &lwork, info)
00053 
00054 #define IMAGING_DSTEQR(compz, n, d, e, z, ldz, work, info) dsteqr_(&compz, &n, d, e, z, &ldz, work, info)
00055 #define IMAGING_SSTEQR(compz, n, d, e, z, ldz, work, info) ssteqr_(&compz, &n, d, e, z, &ldz, work, info)
00056 
00057 #endif /* LAPACK_ACML */
00058 
00059 
00060 
00061 extern "C" {
00062 void dgetri_(int *n, double *a, int *lda, int *ipiv, double *work, int *lwork, int *info);
00063 void sgetri_(int *n, float *a, int *lda, int *ipiv, float *work, int *lwork, int *info);
00064 
00065 void dgetrf_(int *m,int *n, double *a, int *lda, int *ipiv, int *info);
00066 void sgetrf_(int *m,int *n, float *a, int *lda, int *ipiv, int *info);
00067 
00068 void dgesv_(int *n,int *nrhs,double *a,int *lda,int *ipiv,double *b,int *ldb,int *info);
00069 void sgesv_(int *n,int *nrhs,float *a,int *lda,int *ipiv,float *b,int *ldb,int *info);
00070 
00071 void dorgtr_(char *uplo, int *n, double *a, int *lda, double *tau,
00072        double *work, int *lwork, int *info);
00073 void sorgtr_(char *uplo, int *n, float *a, int *lda, float *tau,
00074       float *work, int *lwork, int *info);
00075 
00076 void dsytrd_(char *uplo, int *n, double *a, int *lda, double *d, double *e, 
00077           double *tau, double *work, int *lwork, int *info);
00078 void ssytrd_(char *uplo, int *n, float *a, int *lda, float *d, float *e, 
00079           float *tau, float *work, int *lwork, int *info);
00080 
00081 void dsteqr_(char *compz, int *n,double *d, double *e, 
00082           double *z, int *ldz, double *work, int *info); 
00083 void ssteqr_(char *compz,int *n, float *d, float *e, 
00084           float *z, int *ldz, float *work, int *info); 
00085 }
00086 
00087 #endif

Generated on Tue Feb 10 10:01:30 2009 for imaging2 by  doxygen 1.5.5