Mercurial > octave
diff liboctave/operators/mx-inlines.cc @ 18084:8e056300994b
Follow coding convention of defining and initializing only 1 variable per line in liboctave.
* liboctave/array/Array-b.cc, liboctave/array/Array-util.cc,
liboctave/array/Array.cc, liboctave/array/CDiagMatrix.cc,
liboctave/array/CMatrix.cc, liboctave/array/CSparse.cc,
liboctave/array/MDiagArray2.cc, liboctave/array/MatrixType.cc,
liboctave/array/PermMatrix.cc, liboctave/array/Sparse.cc,
liboctave/array/Sparse.h, liboctave/array/boolSparse.cc,
liboctave/array/dDiagMatrix.cc, liboctave/array/dMatrix.cc,
liboctave/array/dSparse.cc, liboctave/array/dim-vector.cc,
liboctave/array/fCDiagMatrix.cc, liboctave/array/fCMatrix.cc,
liboctave/array/fDiagMatrix.cc, liboctave/array/fMatrix.cc,
liboctave/array/idx-vector.cc, liboctave/array/idx-vector.h,
liboctave/numeric/CmplxLU.cc, liboctave/numeric/CmplxQR.cc,
liboctave/numeric/base-qr.cc, liboctave/numeric/bsxfun-defs.cc,
liboctave/numeric/bsxfun.h, liboctave/numeric/dbleLU.cc,
liboctave/numeric/dbleQR.cc, liboctave/numeric/fCmplxLU.cc,
liboctave/numeric/fCmplxQR.cc, liboctave/numeric/floatLU.cc,
liboctave/numeric/floatQR.cc, liboctave/numeric/lo-specfun.cc,
liboctave/numeric/oct-convn.cc, liboctave/numeric/oct-norm.cc,
liboctave/numeric/sparse-dmsolve.cc, liboctave/operators/mx-inlines.cc,
liboctave/operators/mx-op-defs.h, liboctave/util/caseless-str.h,
liboctave/util/kpse.cc, liboctave/util/lo-utils.cc,
liboctave/util/oct-binmap.h, liboctave/util/oct-cmplx.h,
liboctave/util/oct-inttypes.cc, liboctave/util/oct-inttypes.h,
liboctave/util/oct-sort.cc:
Follow coding convention of defining and initializing only 1 variable per line in liboctave.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 04 Dec 2013 22:13:18 -0800 |
parents | 49a5a4be04a1 |
children | 6c706a83070f |
line wrap: on
line diff
--- a/liboctave/operators/mx-inlines.cc Wed Dec 04 18:56:47 2013 -0800 +++ b/liboctave/operators/mx-inlines.cc Wed Dec 04 22:13:18 2013 -0800 @@ -365,7 +365,8 @@ void (*op2) (size_t, R *, const X *, Y) throw (), const char *opname) { - dim_vector dx = x.dims (), dy = y.dims (); + dim_vector dx = x.dims (); + dim_vector dy = y.dims (); if (dx == dy) { Array<R> r (dx); @@ -410,7 +411,8 @@ void (*op1) (size_t, R *, X) throw (), const char *opname) { - dim_vector dr = r.dims (), dx = x.dims (); + dim_vector dr = r.dims (); + dim_vector dx = x.dims (); if (dr == dx) { op (r.length (), r.fortran_vec (), x.data ()); @@ -856,7 +858,8 @@ { \ if (! n) return; \ T tmp = v[0]; \ - octave_idx_type i = 1, j = 0; \ + octave_idx_type i = 1; \ + octave_idx_type j = 0; \ if (xisnan (tmp)) \ { \ for (; i < n && xisnan (v[i]); i++) ; \ @@ -876,7 +879,8 @@ { \ if (! n) return; \ T tmp = v[0]; octave_idx_type tmpi = 0; \ - octave_idx_type i = 1, j = 0; \ + octave_idx_type i = 1; \ + octave_idx_type j = 0; \ if (xisnan (tmp)) \ { \ for (; i < n && xisnan (v[i]); i++) ; \ @@ -1330,7 +1334,9 @@ inline void twosum_accum (T& s, T& e, const T& x) { - T s1 = s + x, t = s1 - s, e1 = (s - (s1 - t)) + (x - t); + T s1 = s + x; + T t = s1 - s; + T e1 = (s - (s1 - t)) + (x - t); s = s1; e += e1; } @@ -1339,7 +1345,8 @@ inline T mx_inline_xsum (const T *v, octave_idx_type n) { - T s = 0, e = 0; + T s = 0; + T e = 0; for (octave_idx_type i = 0; i < n; i++) twosum_accum (s, e, v[i]);