Mercurial > octave
changeset 22957:92c9f8ec4687
fix compilation of __pchip_deriv__.cc
* __pcup_deriv__.cc: Use F77_INT in calls to Fortran subroutines.
* lo-slatec-proto.h (dpchim, pchim): Correct declarations.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 26 Dec 2016 23:48:47 -0500 |
parents | f9e6259c5fc1 |
children | 12e4534d68b1 |
files | libinterp/corefcn/__pchip_deriv__.cc liboctave/numeric/lo-slatec-proto.h |
diffstat | 2 files changed, 12 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/__pchip_deriv__.cc Mon Dec 26 20:01:13 2016 -0800 +++ b/libinterp/corefcn/__pchip_deriv__.cc Mon Dec 26 23:48:47 2016 -0500 @@ -55,7 +55,7 @@ FloatColumnVector xvec (args(0).float_vector_value ()); FloatMatrix ymat (args(1).float_matrix_value ()); - octave_idx_type nx = xvec.numel (); + F77_INT nx = to_f77_int (xvec.numel ()); if (nx < 2) error ("__pchip_deriv__: X must be at least of length 2"); @@ -68,8 +68,8 @@ FloatMatrix dmat (nyr, nyc); - octave_idx_type ierr; - const octave_idx_type incfd = rows ? nyr : 1; + F77_INT ierr; + const F77_INT incfd = rows ? to_f77_int (nyr) : 1; volatile const octave_idx_type inc = rows ? 1 : nyr; volatile octave_idx_type k = 0; @@ -78,7 +78,7 @@ F77_XFCN (pchim, PCHIM, (nx, xvec.data (), ymat.data () + k * inc, dmat.fortran_vec () + k * inc, - incfd, &ierr)); + incfd, ierr)); k++; @@ -93,7 +93,7 @@ ColumnVector xvec (args(0).vector_value ()); Matrix ymat (args(1).matrix_value ()); - octave_idx_type nx = xvec.numel (); + F77_INT nx = to_f77_int (xvec.numel ()); if (nx < 2) error ("__pchip_deriv__: X must be at least of length 2"); @@ -106,7 +106,7 @@ Matrix dmat (nyr, nyc); - octave_idx_type ierr; + F77_INT ierr; const octave_idx_type incfd = rows ? nyr : 1; volatile const octave_idx_type inc = rows ? 1 : nyr; volatile octave_idx_type k = 0; @@ -116,7 +116,7 @@ F77_XFCN (dpchim, DPCHIM, (nx, xvec.data (), ymat.data () + k * inc, dmat.fortran_vec () + k * inc, - incfd, &ierr)); + incfd, ierr)); k++; if (ierr < 0)
--- a/liboctave/numeric/lo-slatec-proto.h Mon Dec 26 20:01:13 2016 -0800 +++ b/liboctave/numeric/lo-slatec-proto.h Mon Dec 26 23:48:47 2016 -0500 @@ -106,14 +106,14 @@ // PCHIM F77_RET_T - F77_FUNC (dpchim, DPCHIM) (const F77_INT& n, const F77_DBLE& x, - const F77_DBLE& f, F77_DBLE& d, - const F77_INT &incfd, + F77_FUNC (dpchim, DPCHIM) (const F77_INT& n, const F77_DBLE *x, + const F77_DBLE *f, F77_DBLE *d, + const F77_INT& incfd, F77_INT& ierr); F77_RET_T - F77_FUNC (pchim, PCHIM) (const F77_INT& n, const F77_REAL& x, - const F77_REAL& f, F77_REAL& d, + F77_FUNC (pchim, PCHIM) (const F77_INT& n, const F77_REAL *x, + const F77_REAL *f, F77_REAL *d, const F77_INT& incfd, F77_INT& ierr);