Mercurial > octave
changeset 27108:2e5d8cdc7087
eliminate remaining uses of BEGIN_INTERRUPT_WITH_EXCEPTIONS macro
All uses of the BEGIN_INTERRUPT_WITH_EXCEPTIONS and
END_INTERRUPT_WITH_EXCEPTIONS should have been removed in Octave at
the same time that they were defined to { and }, respectively, but
some were missed.
Files affected: __ode15__.cc, ov-java.cc, DASPK.cc, DASRT.cc,
DASSL.cc, LSODE.cc, and Quad.cc.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 24 May 2019 17:55:48 +0000 |
parents | 6bc32e6a1b4f |
children | c3d5afa00588 |
files | libinterp/dldfcn/__ode15__.cc libinterp/octave-value/ov-java.cc liboctave/numeric/DASPK.cc liboctave/numeric/DASRT.cc liboctave/numeric/DASSL.cc liboctave/numeric/LSODE.cc liboctave/numeric/Quad.cc |
diffstat | 7 files changed, 0 insertions(+), 64 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/dldfcn/__ode15__.cc Thu May 23 21:21:59 2019 +0200 +++ b/libinterp/dldfcn/__ode15__.cc Fri May 24 17:55:48 2019 +0000 @@ -367,8 +367,6 @@ IDA::resfun_impl (realtype t, N_Vector& yy, N_Vector& yyp, N_Vector& rr) { - BEGIN_INTERRUPT_WITH_EXCEPTIONS; - ColumnVector y = IDA::NVecToCol (yy, num); ColumnVector yp = IDA::NVecToCol (yyp, num); @@ -379,8 +377,6 @@ for (octave_idx_type i = 0; i < num; i++) puntrr[i] = res(i); - - END_INTERRUPT_WITH_EXCEPTIONS; } void @@ -437,8 +433,6 @@ N_Vector& yy, N_Vector& yyp, SUNMatrix& JJ) { - BEGIN_INTERRUPT_WITH_EXCEPTIONS; - long int Neq = NV_LENGTH_S(yy); ColumnVector y = NVecToCol (yy, Neq); @@ -455,8 +449,6 @@ std::copy (jac.fortran_vec (), jac.fortran_vec () + jac.numel (), SUNDenseMatrix_Data(JJ)); - - END_INTERRUPT_WITH_EXCEPTIONS; } # if defined (HAVE_SUNDIALS_SUNLINSOL_KLU) @@ -465,8 +457,6 @@ SUNMatrix& Jac) { - BEGIN_INTERRUPT_WITH_EXCEPTIONS; - ColumnVector y = NVecToCol (yy, num); ColumnVector yp = NVecToCol (yyp, num); @@ -491,8 +481,6 @@ rowvals[i] = jac.ridx(i); d[i] = jac.data(i); } - - END_INTERRUPT_WITH_EXCEPTIONS; } # endif
--- a/libinterp/octave-value/ov-java.cc Thu May 23 21:21:59 2019 +0200 +++ b/libinterp/octave-value/ov-java.cc Fri May 24 17:55:48 2019 +0000 @@ -2027,8 +2027,6 @@ oct_args(i) = box (env, jobj, nullptr); } - BEGIN_INTERRUPT_WITH_EXCEPTIONS; - if (val.is_function_handle ()) { octave_function *fcn = val.function_value (); @@ -2048,8 +2046,6 @@ } else error ("trying to invoke non-invocable object"); - - END_INTERRUPT_WITH_EXCEPTIONS; } }
--- a/liboctave/numeric/DASPK.cc Thu May 23 21:21:59 2019 +0200 +++ b/liboctave/numeric/DASPK.cc Fri May 24 17:55:48 2019 +0000 @@ -66,8 +66,6 @@ ddaspk_f (const double& time, const double *state, const double *deriv, const double&, double *delta, F77_INT& ires, double *, F77_INT *) { - BEGIN_INTERRUPT_WITH_EXCEPTIONS; - ColumnVector tmp_deriv (nn); ColumnVector tmp_state (nn); ColumnVector tmp_delta (nn); @@ -95,8 +93,6 @@ } } - END_INTERRUPT_WITH_EXCEPTIONS; - return 0; } @@ -109,12 +105,8 @@ const double *, double *, F77_INT *, double *, const double&, F77_INT&, double *, F77_INT*) { - BEGIN_INTERRUPT_WITH_EXCEPTIONS; - (*current_liboctave_error_handler) ("daspk: PSOL is not implemented"); - END_INTERRUPT_WITH_EXCEPTIONS; - return 0; } @@ -122,8 +114,6 @@ ddaspk_j (const double& time, const double *state, const double *deriv, double *pd, const double& cj, double *, F77_INT *) { - BEGIN_INTERRUPT_WITH_EXCEPTIONS; - // FIXME: would be nice to avoid copying the data. ColumnVector tmp_state (nn); @@ -141,8 +131,6 @@ for (F77_INT i = 0; i < nn; i++) pd[nn * j + i] = tmp_pd.elem (i, j); - END_INTERRUPT_WITH_EXCEPTIONS; - return 0; }
--- a/liboctave/numeric/DASRT.cc Thu May 23 21:21:59 2019 +0200 +++ b/liboctave/numeric/DASRT.cc Fri May 24 17:55:48 2019 +0000 @@ -64,8 +64,6 @@ ddasrt_f (const double& t, const double *state, const double *deriv, double *delta, F77_INT& ires, double *, F77_INT *) { - BEGIN_INTERRUPT_WITH_EXCEPTIONS; - ColumnVector tmp_state (nn); ColumnVector tmp_deriv (nn); @@ -89,8 +87,6 @@ delta[i] = tmp_fval(i); } - END_INTERRUPT_WITH_EXCEPTIONS; - return 0; } @@ -98,8 +94,6 @@ ddasrt_j (const double& time, const double *state, const double *deriv, double *pd, const double& cj, double *, F77_INT *) { - BEGIN_INTERRUPT_WITH_EXCEPTIONS; - // FIXME: would be nice to avoid copying the data. ColumnVector tmp_state (nn); @@ -117,8 +111,6 @@ for (F77_INT i = 0; i < nn; i++) pd[nn * j + i] = tmp_pd.elem (i, j); - END_INTERRUPT_WITH_EXCEPTIONS; - return 0; } @@ -126,8 +118,6 @@ ddasrt_g (const F77_INT& neq, const double& t, const double *state, const F77_INT& ng, double *gout, double *, F77_INT *) { - BEGIN_INTERRUPT_WITH_EXCEPTIONS; - F77_INT n = neq; ColumnVector tmp_state (n); @@ -139,8 +129,6 @@ for (F77_INT i = 0; i < ng; i++) gout[i] = tmp_fval(i); - END_INTERRUPT_WITH_EXCEPTIONS; - return 0; }
--- a/liboctave/numeric/DASSL.cc Thu May 23 21:21:59 2019 +0200 +++ b/liboctave/numeric/DASSL.cc Fri May 24 17:55:48 2019 +0000 @@ -61,8 +61,6 @@ ddassl_f (const double& time, const double *state, const double *deriv, double *delta, F77_INT& ires, double *, F77_INT *) { - BEGIN_INTERRUPT_WITH_EXCEPTIONS; - // FIXME: would be nice to avoid copying the data. ColumnVector tmp_deriv (nn); @@ -92,8 +90,6 @@ } } - END_INTERRUPT_WITH_EXCEPTIONS; - return 0; } @@ -101,8 +97,6 @@ ddassl_j (const double& time, const double *state, const double *deriv, double *pd, const double& cj, double *, F77_INT *) { - BEGIN_INTERRUPT_WITH_EXCEPTIONS; - // FIXME: would be nice to avoid copying the data. ColumnVector tmp_state (nn); @@ -120,8 +114,6 @@ for (F77_INT i = 0; i < nn; i++) pd[nn * j + i] = tmp_pd.elem (i, j); - END_INTERRUPT_WITH_EXCEPTIONS; - return 0; }
--- a/liboctave/numeric/LSODE.cc Thu May 23 21:21:59 2019 +0200 +++ b/liboctave/numeric/LSODE.cc Fri May 24 17:55:48 2019 +0000 @@ -57,8 +57,6 @@ lsode_f (const F77_INT& neq, const double& time, double *, double *deriv, F77_INT& ierr) { - BEGIN_INTERRUPT_WITH_EXCEPTIONS; - ColumnVector tmp_deriv; // NOTE: this won't work if LSODE passes copies of the state vector. @@ -75,8 +73,6 @@ deriv[i] = tmp_deriv.elem (i); } - END_INTERRUPT_WITH_EXCEPTIONS; - return 0; } @@ -84,8 +80,6 @@ lsode_j (const F77_INT& neq, const double& time, double *, const F77_INT&, const F77_INT&, double *pd, const F77_INT& nrowpd) { - BEGIN_INTERRUPT_WITH_EXCEPTIONS; - Matrix tmp_jac (neq, neq); // NOTE: this won't work if LSODE passes copies of the state vector. @@ -98,8 +92,6 @@ for (F77_INT i = 0; i < neq; i++) pd[nrowpd * j + i] = tmp_jac (i, j); - END_INTERRUPT_WITH_EXCEPTIONS; - return 0; }
--- a/liboctave/numeric/Quad.cc Thu May 23 21:21:59 2019 +0200 +++ b/liboctave/numeric/Quad.cc Fri May 24 17:55:48 2019 +0000 @@ -81,8 +81,6 @@ static F77_INT user_function (const double& x, int& ierr, double& result) { - BEGIN_INTERRUPT_WITH_EXCEPTIONS; - quad_integration_error = 0; result = (*user_fcn) (x); @@ -90,16 +88,12 @@ if (quad_integration_error) ierr = -1; - END_INTERRUPT_WITH_EXCEPTIONS; - return 0; } static F77_INT float_user_function (const float& x, int& ierr, float& result) { - BEGIN_INTERRUPT_WITH_EXCEPTIONS; - quad_integration_error = 0; result = (*float_user_fcn) (x); @@ -107,8 +101,6 @@ if (quad_integration_error) ierr = -1; - END_INTERRUPT_WITH_EXCEPTIONS; - return 0; }