toon-members
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Toon-members] TooN LU.h Lapack_Cholesky.h QR_Lapack.h SymEige...


From: Edward Rosten
Subject: [Toon-members] TooN LU.h Lapack_Cholesky.h QR_Lapack.h SymEige...
Date: Wed, 25 Jan 2012 14:57:03 +0000

CVSROOT:        /cvsroot/toon
Module name:    TooN
Changes by:     Edward Rosten <edrosten>        12/01/25 14:57:03

Modified files:
        .              : LU.h Lapack_Cholesky.h QR_Lapack.h SymEigen.h 
                         TooN.h lapack.h 
        internal       : config.hh 

Log message:
        Add compatibility with CLAPACK.
        
        In normal FORTRAN, int maps to Integer (on 32 and 64 bit systems).
        
        In CLAPACK, long maps to Integer. Note that CLAPACK cannot be used out 
of
        the box with TooN as it requires libf2c which defines main().
        
        To set the FORTRAN integer type use -DTOON_CLAPACK (to make it long 
int)  or
        -DTOON_FORTRAN_INTEGER=long to set it to an arbitrary type.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/TooN/LU.h?cvsroot=toon&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/TooN/Lapack_Cholesky.h?cvsroot=toon&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/TooN/QR_Lapack.h?cvsroot=toon&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/TooN/SymEigen.h?cvsroot=toon&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/TooN/TooN.h?cvsroot=toon&r1=1.63&r2=1.64
http://cvs.savannah.gnu.org/viewcvs/TooN/lapack.h?cvsroot=toon&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/TooN/internal/config.hh?cvsroot=toon&r1=1.31&r2=1.32

Patches:
Index: LU.h
===================================================================
RCS file: /cvsroot/toon/TooN/LU.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- LU.h        22 Jun 2009 15:33:58 -0000      1.20
+++ LU.h        25 Jan 2012 14:57:02 -0000      1.21
@@ -86,9 +86,9 @@
        
                //Make a local copy. This is guaranteed contiguous
                my_lu=m;
-               int lda = m.num_rows();
-               int M = m.num_rows();
-               int N = m.num_rows();
+               FortranInteger lda = m.num_rows();
+               FortranInteger M = m.num_rows();
+               FortranInteger N = m.num_rows();
 
                getrf_(&M,&N,&my_lu[0][0],&lda,&my_IPIV[0],&my_info);
 
@@ -106,11 +106,11 @@
        
                Matrix<Size, NRHS, Precision> result(rhs);
 
-               int M=rhs.num_cols();
-               int N=my_lu.num_rows();
+               FortranInteger M=rhs.num_cols();
+               FortranInteger N=my_lu.num_rows();
                double alpha=1;
-               int lda=my_lu.num_rows();
-               int ldb=rhs.num_cols();
+               FortranInteger lda=my_lu.num_rows();
+               FortranInteger ldb=rhs.num_cols();
                
trsm_("R","U","N","N",&M,&N,&alpha,&my_lu[0][0],&lda,&result[0][0],&ldb);
                
trsm_("R","L","N","U",&M,&N,&alpha,&my_lu[0][0],&lda,&result[0][0],&ldb);
 
@@ -135,11 +135,11 @@
        
                Vector<Size, Precision> result(rhs);
 
-               int M=1;
-               int N=my_lu.num_rows();
+               FortranInteger M=1;
+               FortranInteger N=my_lu.num_rows();
                double alpha=1;
-               int lda=my_lu.num_rows();
-               int ldb=1;
+               FortranInteger lda=my_lu.num_rows();
+               FortranInteger ldb=1;
                
trsm_("R","U","N","N",&M,&N,&alpha,&my_lu[0][0],&lda,&result[0],&ldb);
                
trsm_("R","L","N","U",&M,&N,&alpha,&my_lu[0][0],&lda,&result[0],&ldb);
 
@@ -157,12 +157,12 @@
        /// multiply it by a matrix or a vector, use one of the backsub() 
functions, which will be faster.
        Matrix<Size,Size,Precision> get_inverse(){
                Matrix<Size,Size,Precision> Inverse(my_lu);
-               int N = my_lu.num_rows();
-               int lda=my_lu.num_rows();
-               int lwork=-1;
+               FortranInteger N = my_lu.num_rows();
+               FortranInteger lda=my_lu.num_rows();
+               FortranInteger lwork=-1;
                Precision size;
                getri_(&N, &Inverse[0][0], &lda, &my_IPIV[0], &size, &lwork, 
&my_info);
-               lwork=int(size);
+               lwork=FortranInteger(size);
                Precision* WORK = new Precision[lwork];
                getri_(&N, &Inverse[0][0], &lda, &my_IPIV[0], WORK, &lwork, 
&my_info);
                delete [] WORK;
@@ -203,8 +203,8 @@
  private:
 
        Matrix<Size,Size,Precision> my_lu;
-       int my_info;
-       Vector<Size, int> my_IPIV;      //Convenient static-or-dynamic array of 
ints :-)
+       FortranInteger my_info;
+       Vector<Size, FortranInteger> my_IPIV;   //Convenient static-or-dynamic 
array of ints :-)
 
 };
 }

Index: Lapack_Cholesky.h
===================================================================
RCS file: /cvsroot/toon/TooN/Lapack_Cholesky.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- Lapack_Cholesky.h   13 Sep 2011 13:00:50 -0000      1.9
+++ Lapack_Cholesky.h   25 Jan 2012 14:57:02 -0000      1.10
@@ -94,8 +94,8 @@
 
 
        void do_compute(){
-               int N = my_cholesky.num_rows();
-               int info;
+               FortranInteger N = my_cholesky.num_rows();
+               FortranInteger info;
                potrf_("L", &N, my_cholesky_lapack.my_data, &N, &info);
                for (int i=0;i<N;i++) {
                  int j;
@@ -123,9 +123,9 @@
                SizeMismatch<Size,Size2>::test(my_cholesky.num_cols(), 
v.size());
 
                Vector<Size, Precision> result(v);
-               int N=my_cholesky.num_rows();
-               int NRHS=1;
-               int info;
+               FortranInteger N=my_cholesky.num_rows();
+               FortranInteger NRHS=1;
+               FortranInteger info;
                potrs_("L", &N, &NRHS, my_cholesky_lapack.my_data, &N, 
result.my_data, &N, &info);     
                assert(info==0);
                return result;
@@ -136,9 +136,9 @@
                SizeMismatch<Size,Size2>::test(my_cholesky.num_cols(), 
m.num_rows());
 
                Matrix<Size, Cols2, Precision, ColMajor> result(m);
-               int N=my_cholesky.num_rows();
-               int NRHS=m.num_cols();
-               int info;
+               FortranInteger N=my_cholesky.num_rows();
+               FortranInteger NRHS=m.num_cols();
+               FortranInteger info;
                potrs_("L", &N, &NRHS, my_cholesky_lapack.my_data, &N, 
result.my_data, &N, &info);     
                assert(info==0);
                return result;
@@ -163,8 +163,8 @@
        Matrix<> get_inverse() const {
                Matrix<Size, Size, Precision> 
M(my_cholesky.num_rows(),my_cholesky.num_rows());
                M=my_cholesky_lapack;
-               int N = my_cholesky.num_rows();
-               int info;
+               FortranInteger N = my_cholesky.num_rows();
+               FortranInteger info;
                potri_("L", &N, M.my_data, &N, &info);
                assert(info == 0);
                for (int i=1;i<N;i++) {
@@ -178,7 +178,7 @@
 private:
        Matrix<Size,Size,Precision> my_cholesky;     
        Matrix<Size,Size,Precision> my_cholesky_lapack;     
-       int my_rank;
+       FortranInteger my_rank;
 };
 
 

Index: QR_Lapack.h
===================================================================
RCS file: /cvsroot/toon/TooN/QR_Lapack.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- QR_Lapack.h 29 Jun 2010 14:03:06 -0000      1.3
+++ QR_Lapack.h 25 Jan 2012 14:57:02 -0000      1.4
@@ -71,12 +71,12 @@
 
                void compute()
                {       
-                       int M = copy.num_rows();
-                       int N = copy.num_cols();
+                       FortranInteger M = copy.num_rows();
+                       FortranInteger N = copy.num_cols();
                        
-                       int LWORK=-1;
-                       int INFO;
-                       int lda = M;
+                       FortranInteger LWORK=-1;
+                       FortranInteger INFO;
+                       FortranInteger lda = M;
 
                        Precision size;
                        
@@ -91,7 +91,7 @@
                        //Compute the working space
                        geqp3_(&M, &N, copy.get_data_ptr(), &lda, 
pivot.get_data_ptr(), tau.get_data_ptr(), &size, &LWORK, &INFO);
 
-                       LWORK = (int) size;
+                       LWORK = (FortranInteger) size;
 
                        Precision* work = new Precision[LWORK];
                        
@@ -107,7 +107,7 @@
                        //LAPACK provides a handy function to do the 
reconstruction
                        Q = copy.template slice<0,0,square_Size, 
square_Size>(0,0,square_size(), square_size());
                        
-                       int K = square_size();
+                       FortranInteger K = square_size();
                        M=K;
                        N=K;
                        lda = K;
@@ -133,7 +133,7 @@
                Vector<square_Size, Precision> tau;
                Matrix<square_Size, square_Size, Precision, ColMajor> Q;
                bool do_pivoting;
-               Vector<Cols, int> pivot;
+               Vector<Cols, FortranInteger> pivot;
                
 
                int square_size()

Index: SymEigen.h
===================================================================
RCS file: /cvsroot/toon/TooN/SymEigen.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- SymEigen.h  19 Apr 2011 09:43:43 -0000      1.28
+++ SymEigen.h  25 Jan 2012 14:57:02 -0000      1.29
@@ -68,10 +68,10 @@
                        
 
                        evectors = m;
-                       int N = evalues.size();
-                       int lda = evalues.size();
-                       int info;
-                       int lwork=-1;
+                       FortranInteger N = evalues.size();
+                       FortranInteger lda = evalues.size();
+                       FortranInteger info;
+                       FortranInteger lwork=-1;
                        P size;
 
                        // find out how much space fortran needs

Index: TooN.h
===================================================================
RCS file: /cvsroot/toon/TooN/TooN.h,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -b -r1.63 -r1.64
--- TooN.h      13 Oct 2011 22:20:46 -0000      1.63
+++ TooN.h      25 Jan 2012 14:57:02 -0000      1.64
@@ -302,6 +302,17 @@
 #else
        typedef TOON_DEFAULT_PRECISION DefaultPrecision;
 #endif
+
+#if defined  TOON_FORTRAN_INTEGER && defined TOON_CLAPACK
+       #error Error: both TOON_FORTRAN_INTEGER and TOON_CLAPACK defined
+#elif defined TOON_CLAPACK
+       typedef long FortranInteger;
+#elif defined TOON_FORTRAN_INTEGER
+       typedef TOON_FORTRAN_INTEGER FortranInteger;
+#else
+       typedef int FortranInteger;
+#endif
+
 }
 
 #include <TooN/internal/debug.hh>

Index: lapack.h
===================================================================
RCS file: /cvsroot/toon/TooN/lapack.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- lapack.h    7 Apr 2010 13:09:59 -0000       1.18
+++ lapack.h    25 Jan 2012 14:57:02 -0000      1.19
@@ -30,59 +30,61 @@
 #ifndef TOON_INCLUDE_LAPCK_H
 #define TOON_INCLUDE_LAPCK_H
 
+#include <TooN/TooN.h>
+
 // LAPACK and BLAS routines
 namespace TooN {
 
        extern "C" {
                // LU decomoposition of a general matrix
-               void dgetrf_(int* M, int *N, double* A, int* lda, int* IPIV, 
int* INFO);
-               void sgetrf_(int* M, int *N, float* A, int* lda, int* IPIV, 
int* INFO);
+               void dgetrf_(FortranInteger* M, FortranInteger *N, double* A, 
FortranInteger* lda, FortranInteger* IPIV, FortranInteger* INFO);
+               void sgetrf_(FortranInteger* M, FortranInteger *N, float* A, 
FortranInteger* lda, FortranInteger* IPIV, FortranInteger* INFO);
 
                // generate inverse of a matrix given its LU decomposition
-               void dgetri_(int* N, double* A, int* lda, int* IPIV, double* 
WORK, int* lwork, int* INFO);
-               void sgetri_(int* N, float* A, int* lda, int* IPIV, float* 
WORK, int* lwork, int* INFO);
+               void dgetri_(FortranInteger* N, double* A, FortranInteger* lda, 
FortranInteger* IPIV, double* WORK, FortranInteger* lwork, FortranInteger* 
INFO);
+               void sgetri_(FortranInteger* N, float* A, FortranInteger* lda, 
FortranInteger* IPIV, float* WORK, FortranInteger* lwork, FortranInteger* INFO);
 
                // inverse of a triangular matrix * a vector (BLAS level 2)
-               void dtrsm_(char* SIDE, char* UPLO, char* TRANSA, char* DIAG, 
int* M, int* N, double* alpha, double* A, int* lda, double* B, int* ldb);
-               void strsm_(char* SIDE, char* UPLO, char* TRANSA, char* DIAG, 
int* M, int* N, float* alpha, float* A, int* lda, float* B, int* ldb);
+               void dtrsm_(char* SIDE, char* UPLO, char* TRANSA, char* DIAG, 
FortranInteger* M, FortranInteger* N, double* alpha, double* A, FortranInteger* 
lda, double* B, FortranInteger* ldb);
+               void strsm_(char* SIDE, char* UPLO, char* TRANSA, char* DIAG, 
FortranInteger* M, FortranInteger* N, float* alpha, float* A, FortranInteger* 
lda, float* B, FortranInteger* ldb);
   
 
                // SVD of a general matrix
-               void dgesvd_(const char* JOBU, const char* JOBVT, int* M, int 
*N, double* A, int* lda,
-                                        double* S, double *U, int* ldu, 
double* VT, int* ldvt,
-                                        double* WORK, int* lwork, int* INFO);
-
-               void sgesvd_(const char* JOBU, const char* JOBVT, int* M, int 
*N, float* A, int* lda,
-                                        float* S, float *U, int* ldu, float* 
VT, int* ldvt,
-                                        float* WORK, int* lwork, int* INFO);
+               void dgesvd_(const char* JOBU, const char* JOBVT, 
FortranInteger* M, FortranInteger *N, double* A, FortranInteger* lda,
+                                        double* S, double *U, FortranInteger* 
ldu, double* VT, FortranInteger* ldvt,
+                                        double* WORK, FortranInteger* lwork, 
FortranInteger* INFO);
+
+               void sgesvd_(const char* JOBU, const char* JOBVT, 
FortranInteger* M, FortranInteger *N, float* A, FortranInteger* lda,
+                                        float* S, float *U, FortranInteger* 
ldu, float* VT, FortranInteger* ldvt,
+                                        float* WORK, FortranInteger* lwork, 
FortranInteger* INFO);
 
                // Eigen decomposition of a symmetric matrix
-               void dsyev_(const char* JOBZ, const char* UPLO, int* N, double* 
A, int* lda, double* W, double* WORK, int* LWORK, int* INFO);
-               void ssyev_(const char* JOBZ, const char* UPLO, int* N, float* 
A, int* lda, float* W, float* WORK, int* LWORK, int* INFO);
+               void dsyev_(const char* JOBZ, const char* UPLO, FortranInteger* 
N, double* A, FortranInteger* lda, double* W, double* WORK, FortranInteger* 
LWORK, FortranInteger* INFO);
+               void ssyev_(const char* JOBZ, const char* UPLO, FortranInteger* 
N, float* A, FortranInteger* lda, float* W, float* WORK, FortranInteger* LWORK, 
FortranInteger* INFO);
 
                // Eigen decomposition of a non-symmetric matrix
-               void dgeev_(const char* JOBVL, const char* JOBVR, int* N, 
double* A, int* lda, double* WR, double* WI, double* VL, int* LDVL, double* VR, 
int* LDVR , double* WORK, int* LWORK, int* INFO);
-               void sgeev_(const char* JOBVL, const char* JOBVR, int* N, 
float* A, int* lda, float* WR, float* WI, float* VL, int* LDVL, float* VR, int* 
LDVR , float* WORK, int* LWORK, int* INFO);
+               void dgeev_(const char* JOBVL, const char* JOBVR, 
FortranInteger* N, double* A, FortranInteger* lda, double* WR, double* WI, 
double* VL, FortranInteger* LDVL, double* VR, FortranInteger* LDVR , double* 
WORK, FortranInteger* LWORK, FortranInteger* INFO);
+               void sgeev_(const char* JOBVL, const char* JOBVR, 
FortranInteger* N, float* A, FortranInteger* lda, float* WR, float* WI, float* 
VL, FortranInteger* LDVL, float* VR, FortranInteger* LDVR , float* WORK, 
FortranInteger* LWORK, FortranInteger* INFO);
 
                // Cholesky decomposition
-               void dpotrf_(const char* UPLO, const int* N, double* A, const 
int* LDA, int* INFO);
-               void spotrf_(const char* UPLO, const int* N, float* A, const 
int* LDA, int* INFO);
+               void dpotrf_(const char* UPLO, const FortranInteger* N, double* 
A, const FortranInteger* LDA, FortranInteger* INFO);
+               void spotrf_(const char* UPLO, const FortranInteger* N, float* 
A, const FortranInteger* LDA, FortranInteger* INFO);
 
                // Cholesky solve AX=B given decomposition
-               void dpotrs_(const char* UPLO, const int* N, const int* NRHS, 
const double* A, const int* LDA, double* B, const int* LDB, int* INFO);
-               void spotrs_(const char* UPLO, const int* N, const int* NRHS, 
const float* A, const int* LDA, float* B, const int* LDB, int* INFO);
+               void dpotrs_(const char* UPLO, const FortranInteger* N, const 
FortranInteger* NRHS, const double* A, const FortranInteger* LDA, double* B, 
const FortranInteger* LDB, FortranInteger* INFO);
+               void spotrs_(const char* UPLO, const FortranInteger* N, const 
FortranInteger* NRHS, const float* A, const FortranInteger* LDA, float* B, 
const FortranInteger* LDB, FortranInteger* INFO);
 
                // Cholesky inverse given decomposition
-               void dpotri_(const char* UPLO, const int* N, double* A, const 
int* LDA, int* INFO);
-               void spotri_(const char* UPLO, const int* N, float* A, const 
int* LDA, int* INFO);
+               void dpotri_(const char* UPLO, const FortranInteger* N, double* 
A, const FortranInteger* LDA, FortranInteger* INFO);
+               void spotri_(const char* UPLO, const FortranInteger* N, float* 
A, const FortranInteger* LDA, FortranInteger* INFO);
                
                // Computes a QR decomposition of a general rectangular matrix 
with column pivoting
-               void sgeqp3_(int* M, int* N, float* A, int* LDA, int* JPVT, 
float* TAU, float* WORK, int* LWORK, int* INFO );
-               void dgeqp3_(int* M, int* N, double* A, int* LDA, int* JPVT, 
double* TAU, double* WORK, int* LWORK, int* INFO );
+               void sgeqp3_(FortranInteger* M, FortranInteger* N, float* A, 
FortranInteger* LDA, FortranInteger* JPVT, float* TAU, float* WORK, 
FortranInteger* LWORK, FortranInteger* INFO );
+               void dgeqp3_(FortranInteger* M, FortranInteger* N, double* A, 
FortranInteger* LDA, FortranInteger* JPVT, double* TAU, double* WORK, 
FortranInteger* LWORK, FortranInteger* INFO );
                
                //Reconstruct Q from a QR decomposition
-               void sorgqr_(int* M,int* N,int* K, float* A, int* LDA, float* 
TAU, float* WORK, int* LWORK, int* INFO );
-               void dorgqr_(int* M,int* N,int* K, double* A, int* LDA, double* 
TAU, double* WORK, int* LWORK, int* INFO );
+               void sorgqr_(FortranInteger* M,FortranInteger* 
N,FortranInteger* K, float* A, FortranInteger* LDA, float* TAU, float* WORK, 
FortranInteger* LWORK, FortranInteger* INFO );
+               void dorgqr_(FortranInteger* M,FortranInteger* 
N,FortranInteger* K, double* A, FortranInteger* LDA, double* TAU, double* WORK, 
FortranInteger* LWORK, FortranInteger* INFO );
        }
 
 
@@ -90,103 +92,103 @@
        // C++ overloaded functions to access single and double precision 
automatically //
        
//////////////////////////////////////////////////////////////////////////////////
 
-       inline void getrf_(int* M, int *N, float* A, int* lda, int* IPIV, int* 
INFO){
+       inline void getrf_(FortranInteger* M, FortranInteger *N, float* A, 
FortranInteger* lda, FortranInteger* IPIV, FortranInteger* INFO){
                sgetrf_(M, N, A, lda, IPIV, INFO);
        }
 
-       inline void getrf_(int* M, int *N, double* A, int* lda, int* IPIV, int* 
INFO){
+       inline void getrf_(FortranInteger* M, FortranInteger *N, double* A, 
FortranInteger* lda, FortranInteger* IPIV, FortranInteger* INFO){
                dgetrf_(M, N, A, lda, IPIV, INFO);
        }
 
-       inline void trsm_(const char* SIDE, const char* UPLO, const char* 
TRANSA, const char* DIAG, int* M, int* N, float* alpha, float* A, int* lda, 
float* B, int* ldb) { 
+       inline void trsm_(const char* SIDE, const char* UPLO, const char* 
TRANSA, const char* DIAG, FortranInteger* M, FortranInteger* N, float* alpha, 
float* A, FortranInteger* lda, float* B, FortranInteger* ldb) { 
                strsm_(const_cast<char*>(SIDE), const_cast<char*>(UPLO), 
const_cast<char*>(TRANSA), const_cast<char*>(DIAG), M, N, alpha, A, lda, B, 
ldb);
        }
 
-       inline void trsm_(const char* SIDE, const char* UPLO, const char* 
TRANSA, const char* DIAG, int* M, int* N, double* alpha, double* A, int* lda, 
double* B, int* ldb) {
+       inline void trsm_(const char* SIDE, const char* UPLO, const char* 
TRANSA, const char* DIAG, FortranInteger* M, FortranInteger* N, double* alpha, 
double* A, FortranInteger* lda, double* B, FortranInteger* ldb) {
                dtrsm_(const_cast<char*>(SIDE), const_cast<char*>(UPLO), 
const_cast<char*>(TRANSA), const_cast<char*>(DIAG), M, N, alpha, A, lda, B, 
ldb);
        }
 
-       inline void getri_(int* N, double* A, int* lda, int* IPIV, double* 
WORK, int* lwork, int* INFO){
+       inline void getri_(FortranInteger* N, double* A, FortranInteger* lda, 
FortranInteger* IPIV, double* WORK, FortranInteger* lwork, FortranInteger* 
INFO){
                dgetri_(N, A, lda, IPIV, WORK, lwork, INFO);
        }
 
-       inline void getri_(int* N, float* A, int* lda, int* IPIV, float* WORK, 
int* lwork, int* INFO){
+       inline void getri_(FortranInteger* N, float* A, FortranInteger* lda, 
FortranInteger* IPIV, float* WORK, FortranInteger* lwork, FortranInteger* INFO){
                sgetri_(N, A, lda, IPIV, WORK, lwork, INFO);
        }
 
-       inline void potrf_(const char * UPLO, const int* N, double* A, const 
int* LDA, int* INFO){
+       inline void potrf_(const char * UPLO, const FortranInteger* N, double* 
A, const FortranInteger* LDA, FortranInteger* INFO){
                dpotrf_(UPLO, N, A, LDA, INFO);
        }
 
-       inline void potrf_(const char * UPLO, const int* N, float* A, const 
int* LDA, int* INFO){
+       inline void potrf_(const char * UPLO, const FortranInteger* N, float* 
A, const FortranInteger* LDA, FortranInteger* INFO){
                spotrf_(UPLO, N, A, LDA, INFO);
        }
 
        // SVD
-       inline void gesvd_(const char* JOBU, const char* JOBVT, int* M, int *N, 
double* A, int* lda,
-                               double* S, double *U, int* ldu, double* VT, 
int* ldvt,
-                               double* WORK, int* lwork, int* INFO){
+       inline void gesvd_(const char* JOBU, const char* JOBVT, FortranInteger* 
M, FortranInteger *N, double* A, FortranInteger* lda,
+                               double* S, double *U, FortranInteger* ldu, 
double* VT, FortranInteger* ldvt,
+                               double* WORK, FortranInteger* lwork, 
FortranInteger* INFO){
                dgesvd_(JOBU, JOBVT, M, N, A, lda, S, U, ldu, VT, ldvt, WORK, 
lwork, INFO);
        }
 
-       inline void gesvd_(const char* JOBU, const char* JOBVT, int* M, int *N, 
float* A, int* lda,
-                                        float* S, float *U, int* ldu, float* 
VT, int* ldvt,
-                                        float* WORK, int* lwork, int* INFO){
+       inline void gesvd_(const char* JOBU, const char* JOBVT, FortranInteger* 
M, FortranInteger *N, float* A, FortranInteger* lda,
+                                        float* S, float *U, FortranInteger* 
ldu, float* VT, FortranInteger* ldvt,
+                                        float* WORK, FortranInteger* lwork, 
FortranInteger* INFO){
                sgesvd_(JOBU, JOBVT, M, N, A, lda, S, U, ldu, VT, ldvt, WORK, 
lwork, INFO);
        }
 
        // Cholesky solve AX=B given decomposition
-       inline void potrs_(const char* UPLO, const int* N, const int* NRHS, 
const double* A, const int* LDA, double* B, const int* LDB, int* INFO){
+       inline void potrs_(const char* UPLO, const FortranInteger* N, const 
FortranInteger* NRHS, const double* A, const FortranInteger* LDA, double* B, 
const FortranInteger* LDB, FortranInteger* INFO){
                dpotrs_(UPLO, N, NRHS, A, LDA, B, LDB, INFO);
        }
 
-       inline void potrs_(const char* UPLO, const int* N, const int* NRHS, 
const float* A, const int* LDA, float* B, const int* LDB, int* INFO){
+       inline void potrs_(const char* UPLO, const FortranInteger* N, const 
FortranInteger* NRHS, const float* A, const FortranInteger* LDA, float* B, 
const FortranInteger* LDB, FortranInteger* INFO){
                spotrs_(UPLO, N, NRHS, A, LDA, B, LDB, INFO);
        }
 
        // Cholesky inverse given decomposition
-       inline void potri_(const char* UPLO, const int* N, double* A, const 
int* LDA, int* INFO){
+       inline void potri_(const char* UPLO, const FortranInteger* N, double* 
A, const FortranInteger* LDA, FortranInteger* INFO){
                dpotri_(UPLO, N, A, LDA, INFO);
        }
 
-       inline void potri_(const char* UPLO, const int* N, float* A, const int* 
LDA, int* INFO){
+       inline void potri_(const char* UPLO, const FortranInteger* N, float* A, 
const FortranInteger* LDA, FortranInteger* INFO){
                spotri_(UPLO, N, A, LDA, INFO);
        }
 
-       inline void syev_(const char* JOBZ, const char* UPLO, int* N, double* 
A, int* lda, double* W, double* WORK, int* LWORK, int* INFO){
+       inline void syev_(const char* JOBZ, const char* UPLO, FortranInteger* 
N, double* A, FortranInteger* lda, double* W, double* WORK, FortranInteger* 
LWORK, FortranInteger* INFO){
                dsyev_(JOBZ, UPLO, N, A, lda, W, WORK, LWORK, INFO);
        }
-       inline void syev_(const char* JOBZ, const char* UPLO, int* N, float* A, 
int* lda, float* W, float* WORK, int* LWORK, int* INFO){
+       inline void syev_(const char* JOBZ, const char* UPLO, FortranInteger* 
N, float* A, FortranInteger* lda, float* W, float* WORK, FortranInteger* LWORK, 
FortranInteger* INFO){
                ssyev_(JOBZ, UPLO, N, A, lda, W, WORK, LWORK, INFO);
        }
 
        //QR decomposition
-       inline void geqp3_(int* M, int* N, float* A, int* LDA, int* JPVT, 
float* TAU, float* WORK, int* LWORK, int* INFO )
+       inline void geqp3_(FortranInteger* M, FortranInteger* N, float* A, 
FortranInteger* LDA, FortranInteger* JPVT, float* TAU, float* WORK, 
FortranInteger* LWORK, FortranInteger* INFO )
        {
                sgeqp3_(M, N, A, LDA, JPVT, TAU, WORK, LWORK, INFO);
        }
 
-       inline void geqp3_(int* M, int* N, double* A, int* LDA, int* JPVT, 
double* TAU, double* WORK, int* LWORK, int* INFO )
+       inline void geqp3_(FortranInteger* M, FortranInteger* N, double* A, 
FortranInteger* LDA, FortranInteger* JPVT, double* TAU, double* WORK, 
FortranInteger* LWORK, FortranInteger* INFO )
        {
                dgeqp3_(M, N, A, LDA, JPVT, TAU, WORK, LWORK, INFO);
        }
        
-       inline void orgqr_(int* M,int* N,int* K, float* A, int* LDA, float* 
TAU, float* WORK, int* LWORK, int* INFO )
+       inline void orgqr_(FortranInteger* M,FortranInteger* N,FortranInteger* 
K, float* A, FortranInteger* LDA, float* TAU, float* WORK, FortranInteger* 
LWORK, FortranInteger* INFO )
        {
                sorgqr_(M, N, K, A, LDA, TAU, WORK, LWORK, INFO);
        }
 
-       inline void orgqr_(int* M,int* N,int* K, double* A, int* LDA, double* 
TAU, double* WORK, int* LWORK, int* INFO )
+       inline void orgqr_(FortranInteger* M,FortranInteger* N,FortranInteger* 
K, double* A, FortranInteger* LDA, double* TAU, double* WORK, FortranInteger* 
LWORK, FortranInteger* INFO )
        {
                dorgqr_(M, N, K, A, LDA, TAU, WORK, LWORK, INFO);
        }
 
        //Non symmetric (general) eigen decomposition
-       inline void geev_(const char* JOBVL, const char* JOBVR, int* N, double* 
A, int* lda, double* WR, double* WI, double* VL, int* LDVL, double* VR, int* 
LDVR , double* WORK, int* LWORK, int* INFO){
+       inline void geev_(const char* JOBVL, const char* JOBVR, FortranInteger* 
N, double* A, FortranInteger* lda, double* WR, double* WI, double* VL, 
FortranInteger* LDVL, double* VR, FortranInteger* LDVR , double* WORK, 
FortranInteger* LWORK, FortranInteger* INFO){
                dgeev_(JOBVL, JOBVR, N,  A,  lda,  WR,  WI,  VL,  LDVL,  VR,  
LDVR ,  WORK,  LWORK,  INFO);
        }
 
-       inline void geev_(const char* JOBVL, const char* JOBVR, int* N, float* 
A,  int* lda, float* WR,  float* WI,  float* VL,  int* LDVL, float* VR,  int* 
LDVR , float* WORK,  int* LWORK, int* INFO){
+       inline void geev_(const char* JOBVL, const char* JOBVR, FortranInteger* 
N, float* A,  FortranInteger* lda, float* WR,  float* WI,  float* VL,  
FortranInteger* LDVL, float* VR,  FortranInteger* LDVR , float* WORK,  
FortranInteger* LWORK, FortranInteger* INFO){
                sgeev_(JOBVL, JOBVR, N,  A,  lda,  WR,  WI,  VL,  LDVL,  VR,  
LDVR ,  WORK,  LWORK,  INFO);
        }
 }

Index: internal/config.hh
===================================================================
RCS file: /cvsroot/toon/TooN/internal/config.hh,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- internal/config.hh  30 Jul 2010 18:45:16 -0000      1.31
+++ internal/config.hh  25 Jan 2012 14:57:03 -0000      1.32
@@ -0,0 +1,16 @@
+/* internal/config.hh.  Generated from config.hh.in by configure.  */
+/* #undef TOON_TYPEOF_DECLTYPE */
+
+/* #undef TOON_TYPEOF_TYPEOF */
+
+#define TOON_TYPEOF___TYPEOF__ 1
+
+/* #undef TOON_TYPEOF_BOOST */
+
+/* #undef TOON_TYPEOF_BUILTIN */
+
+#define TOON_DEPRECATED_GCC 1
+
+#define TOON_USE_LAPACK
+
+/* #undef TOON_DEFAULT_PRECISION */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]