changeset 10361:b4f67ca318d8

eigs-base.cc: fix prototypes for arpack functions
author John W. Eaton <jwe@octave.org>
date Thu, 25 Feb 2010 15:41:20 -0500
parents 9126d71f53aa
children b47ab50a6aa8
files liboctave/ChangeLog liboctave/eigs-base.cc
diffstat 2 files changed, 40 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/ChangeLog	Thu Feb 25 12:02:39 2010 -0500
+++ b/liboctave/ChangeLog	Thu Feb 25 15:41:20 2010 -0500
@@ -1,3 +1,14 @@
+2010-02-25  John W. Eaton  <jwe@octave.org>
+
+	* eigs-base.cc: Use octave_idx_type for Fortran LOGICAL values
+	in function prototypes.
+	(EigsRealSymmetricMatrix, EigsRealSymmetricMatrixShift,
+	EigsRealSymmetricFunc, EigsRealNonSymmetricMatrix,
+	EigsRealNonSymmetricMatrixShift, EigsRealNonSymmetricFunc,
+	EigsComplexNonSymmetricMatrix, EigsComplexNonSymmetricMatrixShift,
+	EigsComplexNonSymmetricFunc): Declare rvec argument as bool, not int.
+	Fix explicit instantiations to match.
+
 2010-02-25  Jaroslav Hajek  <highegg@gmail.com>
 
 	* oct-mem.h (safe_size_comp): New helper func.
--- a/liboctave/eigs-base.cc	Thu Feb 25 12:02:39 2010 -0500
+++ b/liboctave/eigs-base.cc	Thu Feb 25 15:41:20 2010 -0500
@@ -63,7 +63,7 @@
                              F77_CHAR_ARG_LEN_DECL F77_CHAR_ARG_LEN_DECL);
 
   F77_RET_T
-  F77_FUNC (dseupd, DSEUPD) (const int&, F77_CONST_CHAR_ARG_DECL,
+  F77_FUNC (dseupd, DSEUPD) (const octave_idx_type&, F77_CONST_CHAR_ARG_DECL,
                              octave_idx_type*, double*, double*,
                              const octave_idx_type&, const double&,
                              F77_CONST_CHAR_ARG_DECL, const octave_idx_type&, 
@@ -86,7 +86,7 @@
                              F77_CHAR_ARG_LEN_DECL F77_CHAR_ARG_LEN_DECL);
 
   F77_RET_T
-  F77_FUNC (dneupd, DNEUPD) (const int&, F77_CONST_CHAR_ARG_DECL,
+  F77_FUNC (dneupd, DNEUPD) (const octave_idx_type&, F77_CONST_CHAR_ARG_DECL,
                              octave_idx_type*, double*, double*,
                              double*, const octave_idx_type&, const double&,
                              const double&, double*, F77_CONST_CHAR_ARG_DECL, 
@@ -110,7 +110,7 @@
                              F77_CHAR_ARG_LEN_DECL F77_CHAR_ARG_LEN_DECL);
 
   F77_RET_T
-  F77_FUNC (zneupd, ZNEUPD) (const int&, F77_CONST_CHAR_ARG_DECL,
+  F77_FUNC (zneupd, ZNEUPD) (const octave_idx_type&, F77_CONST_CHAR_ARG_DECL,
                              octave_idx_type*, Complex*, Complex*, 
                              const octave_idx_type&, const Complex&,
                              Complex*, F77_CONST_CHAR_ARG_DECL,
@@ -752,7 +752,7 @@
                          octave_idx_type &info, Matrix &eig_vec,
                          ColumnVector &eig_val, const M& _b,
                          ColumnVector &permB, ColumnVector &resid, 
-                         std::ostream& os, double tol, int rvec, 
+                         std::ostream& os, double tol, bool rvec, 
                          bool cholB, int disp, int maxit)
 {
   M b(_b);
@@ -1073,7 +1073,7 @@
                               octave_idx_type &info, Matrix &eig_vec, 
                               ColumnVector &eig_val, const M& _b,
                               ColumnVector &permB, ColumnVector &resid, 
-                              std::ostream& os, double tol, int rvec, 
+                              std::ostream& os, double tol, bool rvec, 
                               bool cholB, int disp, int maxit)
 {
   M b(_b);
@@ -1400,7 +1400,7 @@
                        octave_idx_type k, octave_idx_type p, 
                        octave_idx_type &info, Matrix &eig_vec, 
                        ColumnVector &eig_val, ColumnVector &resid, 
-                       std::ostream& os, double tol, int rvec,
+                       std::ostream& os, double tol, bool rvec,
                        bool /* cholB */, int disp, int maxit)
 {
   std::string typ (_typ);
@@ -1665,7 +1665,7 @@
                             octave_idx_type &info, ComplexMatrix &eig_vec,
                             ComplexColumnVector &eig_val, const M& _b,
                             ColumnVector &permB, ColumnVector &resid, 
-                            std::ostream& os, double tol, int rvec, 
+                            std::ostream& os, double tol, bool rvec, 
                             bool cholB, int disp, int maxit)
 {
   M b(_b);
@@ -2028,7 +2028,7 @@
                                  ComplexMatrix &eig_vec, 
                                  ComplexColumnVector &eig_val, const M& _b,
                                  ColumnVector &permB, ColumnVector &resid, 
-                                 std::ostream& os, double tol, int rvec, 
+                                 std::ostream& os, double tol, bool rvec, 
                                  bool cholB, int disp, int maxit)
 {
   M b(_b);
@@ -2402,7 +2402,7 @@
                           octave_idx_type k, octave_idx_type p, 
                           octave_idx_type &info, ComplexMatrix &eig_vec, 
                           ComplexColumnVector &eig_val, ColumnVector &resid, 
-                          std::ostream& os, double tol, int rvec,
+                          std::ostream& os, double tol, bool rvec,
                           bool /* cholB */, int disp, int maxit)
 {
   std::string typ (_typ);
@@ -2709,7 +2709,7 @@
                                ComplexColumnVector &eig_val, const M& _b,
                                ColumnVector &permB, 
                                ComplexColumnVector &cresid, 
-                               std::ostream& os, double tol, int rvec, 
+                               std::ostream& os, double tol, bool rvec, 
                                bool cholB, int disp, int maxit)
 {
   M b(_b);
@@ -3031,7 +3031,7 @@
                                     ComplexColumnVector &eig_val, const M& _b,
                                     ColumnVector &permB, 
                                     ComplexColumnVector &cresid, 
-                                    std::ostream& os, double tol, int rvec, 
+                                    std::ostream& os, double tol, bool rvec, 
                                     bool cholB, int disp, int maxit)
 {
   M b(_b);
@@ -3366,7 +3366,7 @@
                              octave_idx_type &info, ComplexMatrix &eig_vec, 
                              ComplexColumnVector &eig_val, 
                              ComplexColumnVector &cresid, std::ostream& os, 
-                             double tol, int rvec, bool /* cholB */,
+                             double tol, bool rvec, bool /* cholB */,
                              int disp, int maxit)
 {
   std::string typ (_typ);
@@ -3631,7 +3631,7 @@
                          ColumnVector &eig_val, const Matrix& b,
                          ColumnVector &permB, ColumnVector &resid, 
                          std::ostream &os, double tol = DBL_EPSILON,
-                         int rvec = 0, bool cholB = 0, int disp = 0,
+                         bool rvec = false, bool cholB = 0, int disp = 0,
                          int maxit = 300);
 
 extern octave_idx_type
@@ -3641,7 +3641,7 @@
                          ColumnVector &eig_val, const SparseMatrix& b,
                          ColumnVector &permB, ColumnVector &resid, 
                          std::ostream& os, double tol = DBL_EPSILON,
-                         int rvec = 0, bool cholB = 0, int disp = 0, 
+                         bool rvec = false, bool cholB = 0, int disp = 0, 
                          int maxit = 300);
 
 extern octave_idx_type
@@ -3651,7 +3651,7 @@
                               ColumnVector &eig_val, const Matrix& b,
                               ColumnVector &permB, ColumnVector &resid, 
                               std::ostream &os, double tol = DBL_EPSILON,
-                              int rvec = 0, bool cholB = 0, int disp = 0, 
+                              bool rvec = false, bool cholB = 0, int disp = 0, 
                               int maxit = 300);
 
 extern octave_idx_type
@@ -3661,7 +3661,7 @@
                               ColumnVector &eig_val, const SparseMatrix& b,
                               ColumnVector &permB, ColumnVector &resid, 
                               std::ostream &os, double tol = DBL_EPSILON,
-                              int rvec = 0, bool cholB = 0, int disp = 0, 
+                              bool rvec = false, bool cholB = 0, int disp = 0, 
                               int maxit = 300);
 
 extern octave_idx_type
@@ -3671,7 +3671,7 @@
                        octave_idx_type &info,
                        Matrix &eig_vec, ColumnVector &eig_val, 
                        ColumnVector &resid, std::ostream &os,
-                       double tol = DBL_EPSILON, int rvec = 0,
+                       double tol = DBL_EPSILON, bool rvec = false,
                        bool cholB = 0, int disp = 0, int maxit = 300);
 
 extern octave_idx_type
@@ -3681,7 +3681,7 @@
                             ComplexColumnVector &eig_val, const Matrix& b,
                             ColumnVector &permB, ColumnVector &resid, 
                             std::ostream &os, double tol = DBL_EPSILON,
-                            int rvec = 0, bool cholB = 0, int disp = 0,
+                            bool rvec = false, bool cholB = 0, int disp = 0,
                             int maxit = 300);
 
 extern octave_idx_type
@@ -3692,7 +3692,7 @@
                             const SparseMatrix& b,
                             ColumnVector &permB, ColumnVector &resid, 
                             std::ostream &os, double tol = DBL_EPSILON,
-                            int rvec = 0, bool cholB = 0, int disp = 0,
+                            bool rvec = false, bool cholB = 0, int disp = 0,
                             int maxit = 300);
 
 extern octave_idx_type
@@ -3703,8 +3703,8 @@
                                  ComplexColumnVector &eig_val, const Matrix& b,
                                  ColumnVector &permB, ColumnVector &resid, 
                                  std::ostream &os, double tol = DBL_EPSILON,
-                                 int rvec = 0, bool cholB = 0, int disp = 0, 
-                                 int maxit = 300);
+                                 bool rvec = false, bool cholB = 0,
+                                 int disp = 0, int maxit = 300);
 
 extern octave_idx_type
 EigsRealNonSymmetricMatrixShift (const SparseMatrix& m, double sigma,
@@ -3715,8 +3715,8 @@
                                  const SparseMatrix& b,
                                  ColumnVector &permB, ColumnVector &resid, 
                                  std::ostream &os, double tol = DBL_EPSILON,
-                                 int rvec = 0, bool cholB = 0, int disp = 0, 
-                                 int maxit = 300);
+                                 bool rvec = false, bool cholB = 0,
+                                 int disp = 0, int maxit = 300);
 
 extern octave_idx_type
 EigsRealNonSymmetricFunc (EigsFunc fun, octave_idx_type n,
@@ -3725,7 +3725,7 @@
                           octave_idx_type &info, ComplexMatrix &eig_vec, 
                           ComplexColumnVector &eig_val, 
                           ColumnVector &resid, std::ostream& os, 
-                          double tol = DBL_EPSILON, int rvec = 0,
+                          double tol = DBL_EPSILON, bool rvec = false,
                           bool cholB = 0, int disp = 0, int maxit = 300);
 
 extern octave_idx_type
@@ -3736,7 +3736,7 @@
                                const ComplexMatrix& b, ColumnVector &permB, 
                                ComplexColumnVector &resid, 
                                std::ostream &os, double tol = DBL_EPSILON,
-                               int rvec = 0, bool cholB = 0, int disp = 0, 
+                               bool rvec = false, bool cholB = 0, int disp = 0, 
                                int maxit = 300);
 
 extern octave_idx_type
@@ -3749,7 +3749,7 @@
                                ColumnVector &permB,
                                ComplexColumnVector &resid, 
                                std::ostream &os, double tol = DBL_EPSILON,
-                               int rvec = 0, bool cholB = 0, int disp = 0, 
+                               bool rvec = false, bool cholB = 0, int disp = 0, 
                                int maxit = 300);
 
 extern octave_idx_type
@@ -3762,7 +3762,7 @@
                                     ColumnVector &permB,
                                     ComplexColumnVector &resid, 
                                     std::ostream &os, double tol = DBL_EPSILON,
-                                    int rvec = 0, bool cholB = 0,
+                                    bool rvec = false, bool cholB = 0,
                                     int disp = 0, int maxit = 300);
 
 extern octave_idx_type
@@ -3776,7 +3776,7 @@
                                     ColumnVector &permB,
                                     ComplexColumnVector &resid, 
                                     std::ostream &os, double tol = DBL_EPSILON,
-                                    int rvec = 0, bool cholB = 0,
+                                    bool rvec = false, bool cholB = 0,
                                     int disp = 0, int maxit = 300);
 
 extern octave_idx_type
@@ -3786,7 +3786,7 @@
                              octave_idx_type &info, ComplexMatrix &eig_vec, 
                              ComplexColumnVector &eig_val, 
                              ComplexColumnVector &resid, std::ostream& os, 
-                             double tol = DBL_EPSILON, int rvec = 0,
+                             double tol = DBL_EPSILON, bool rvec = false,
                              bool cholB = 0, int disp = 0, int maxit = 300);
 #endif