Mercurial > hg > octave-nkf
changeset 9227:8145f2255276
use explicit template qualifs to please Intel C++ and MSVC++
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Mon, 02 Mar 2009 08:07:48 +0100 |
parents | 50c7d87ecfa1 |
children | ab40ef1e232f |
files | liboctave/CMatrix.cc liboctave/CNDArray.cc liboctave/ChangeLog liboctave/boolMatrix.cc liboctave/boolNDArray.cc liboctave/chMatrix.cc liboctave/chNDArray.cc liboctave/dMatrix.cc liboctave/dNDArray.cc liboctave/fCMatrix.cc liboctave/fCNDArray.cc liboctave/fMatrix.cc liboctave/fNDArray.cc liboctave/intNDArray.cc |
diffstat | 14 files changed, 118 insertions(+), 70 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/CMatrix.cc +++ b/liboctave/CMatrix.cc @@ -3232,43 +3232,43 @@ boolMatrix ComplexMatrix::all (int dim) const { - return do_mx_red_op<boolMatrix> (*this, dim, mx_inline_all); + return do_mx_red_op<boolMatrix, Complex> (*this, dim, mx_inline_all); } boolMatrix ComplexMatrix::any (int dim) const { - return do_mx_red_op<boolMatrix> (*this, dim, mx_inline_any); + return do_mx_red_op<boolMatrix, Complex> (*this, dim, mx_inline_any); } ComplexMatrix ComplexMatrix::cumprod (int dim) const { - return do_mx_cum_op<ComplexMatrix> (*this, dim, mx_inline_cumprod); + return do_mx_cum_op<ComplexMatrix, Complex> (*this, dim, mx_inline_cumprod); } ComplexMatrix ComplexMatrix::cumsum (int dim) const { - return do_mx_cum_op<ComplexMatrix> (*this, dim, mx_inline_cumsum); + return do_mx_cum_op<ComplexMatrix, Complex> (*this, dim, mx_inline_cumsum); } ComplexMatrix ComplexMatrix::prod (int dim) const { - return do_mx_red_op<ComplexMatrix> (*this, dim, mx_inline_prod); + return do_mx_red_op<ComplexMatrix, Complex> (*this, dim, mx_inline_prod); } ComplexMatrix ComplexMatrix::sum (int dim) const { - return do_mx_red_op<ComplexMatrix> (*this, dim, mx_inline_sum); + return do_mx_red_op<ComplexMatrix, Complex> (*this, dim, mx_inline_sum); } ComplexMatrix ComplexMatrix::sumsq (int dim) const { - return do_mx_red_op<Matrix> (*this, dim, mx_inline_sumsq); + return do_mx_red_op<Matrix, Complex> (*this, dim, mx_inline_sumsq); } Matrix ComplexMatrix::abs (void) const
--- a/liboctave/CNDArray.cc +++ b/liboctave/CNDArray.cc @@ -632,43 +632,43 @@ boolNDArray ComplexNDArray::all (int dim) const { - return do_mx_red_op<boolNDArray> (*this, dim, mx_inline_all); + return do_mx_red_op<boolNDArray, Complex> (*this, dim, mx_inline_all); } boolNDArray ComplexNDArray::any (int dim) const { - return do_mx_red_op<boolNDArray> (*this, dim, mx_inline_any); + return do_mx_red_op<boolNDArray, Complex> (*this, dim, mx_inline_any); } ComplexNDArray ComplexNDArray::cumprod (int dim) const { - return do_mx_cum_op<ComplexNDArray> (*this, dim, mx_inline_cumprod); + return do_mx_cum_op<ComplexNDArray, Complex> (*this, dim, mx_inline_cumprod); } ComplexNDArray ComplexNDArray::cumsum (int dim) const { - return do_mx_cum_op<ComplexNDArray> (*this, dim, mx_inline_cumsum); + return do_mx_cum_op<ComplexNDArray, Complex> (*this, dim, mx_inline_cumsum); } ComplexNDArray ComplexNDArray::prod (int dim) const { - return do_mx_red_op<ComplexNDArray> (*this, dim, mx_inline_prod); + return do_mx_red_op<ComplexNDArray, Complex> (*this, dim, mx_inline_prod); } ComplexNDArray ComplexNDArray::sum (int dim) const { - return do_mx_red_op<ComplexNDArray> (*this, dim, mx_inline_sum); + return do_mx_red_op<ComplexNDArray, Complex> (*this, dim, mx_inline_sum); } ComplexNDArray ComplexNDArray::sumsq (int dim) const { - return do_mx_red_op<NDArray> (*this, dim, mx_inline_sumsq); + return do_mx_red_op<NDArray, Complex> (*this, dim, mx_inline_sumsq); } ComplexNDArray
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,51 @@ +2009-05-21 Jaroslav Hajek <highegg@gmail.com> + + + * CMatrix.cc + (ComplexMatrix::all, ComplexMatrix::any, ComplexMatrix::cumprod, + ComplexMatrix::cumsum, ComplexMatrix::prod, ComplexMatrix::sum, + ComplexMatrix::sumsq): Use explicit template qualifications + to workaround bugs in Intel C++ and MSVC++ compilers. + * CNDArray.cc + (ComplexNDArray::all, ComplexNDArray::any, ComplexNDArray::cumprod, + ComplexNDArray::cumsum, ComplexNDArray::prod, ComplexNDArray::sum, + ComplexNDArray::sumsq): Ditto. + * boolMatrix.cc + (boolMatrix::all, boolMatrix::any): Ditto. + * boolNDArray.cc + (boolNDArray::all, boolNDArray::any): Ditto. + * chMatrix.cc + (charMatrix::all, charMatrix::any): Ditto. + * chNDArray.cc + (charNDArray::all, charNDArray::any): Ditto. + * dMatrix.cc + (Matrix::all, Matrix::any, Matrix::cumprod, + Matrix::cumsum, Matrix::prod, Matrix::sum, + Matrix::sumsq): Ditto. + * dNDArray.cc + (NDArray::all, NDArray::any, NDArray::cumprod, + NDArray::cumsum, NDArray::prod, NDArray::sum, + NDArray::sumsq): Ditto. + * fCMatrix.cc + (FloatComplexMatrix::all, FloatComplexMatrix::any, FloatComplexMatrix::cumprod, + FloatComplexMatrix::cumsum, FloatComplexMatrix::prod, FloatComplexMatrix::sum, + FloatComplexMatrix::sumsq): Ditto. + * fCNDArray.cc + (FloatComplexNDArray::all, FloatComplexNDArray::any, FloatComplexNDArray::cumprod, + FloatComplexNDArray::cumsum, FloatComplexNDArray::prod, FloatComplexNDArray::sum, + FloatComplexNDArray::sumsq): Ditto. + * fMatrix.cc + (FloatMatrix::all, FloatMatrix::any, FloatMatrix::cumprod, + FloatMatrix::cumsum, FloatMatrix::prod, FloatMatrix::sum, + FloatMatrix::sumsq): Ditto. + * fNDArray.cc + (FloatNDArray::all, FloatNDArray::any, FloatNDArray::cumprod, + FloatNDArray::cumsum, FloatNDArray::prod, FloatNDArray::sum, + FloatNDArray::sumsq): Ditto. + * intNDArray.cc + (intNDArray<T>::all, intNDArray<T>::any, + intNDArray<T>::cumsum, intNDArray<T>::sum): Ditto. + 2009-05-20 Jaroslav Hajek <highegg@gmail.com> * Makefile.in: Remove reference to ArrayN-idx.h.
--- a/liboctave/boolMatrix.cc +++ b/liboctave/boolMatrix.cc @@ -90,13 +90,13 @@ boolMatrix boolMatrix::all (int dim) const { - return do_mx_red_op<boolMatrix> (*this, dim, mx_inline_all); + return do_mx_red_op<boolMatrix, bool> (*this, dim, mx_inline_all); } boolMatrix boolMatrix::any (int dim) const { - return do_mx_red_op<boolMatrix> (*this, dim, mx_inline_any); + return do_mx_red_op<boolMatrix, bool> (*this, dim, mx_inline_any); } MM_CMP_OPS (boolMatrix, , boolMatrix, )
--- a/liboctave/boolNDArray.cc +++ b/liboctave/boolNDArray.cc @@ -50,27 +50,27 @@ boolNDArray boolNDArray::all (int dim) const { - return do_mx_red_op<boolNDArray> (*this, dim, mx_inline_all); + return do_mx_red_op<boolNDArray, bool> (*this, dim, mx_inline_all); } boolNDArray boolNDArray::any (int dim) const { - return do_mx_red_op<boolNDArray> (*this, dim, mx_inline_any); + return do_mx_red_op<boolNDArray, bool> (*this, dim, mx_inline_any); } NDArray boolNDArray::sum (int dim) const { // NOTE: going via octave_idx_type is faster even though it requires a conversion. - return do_mx_red_op<Array<octave_idx_type> > (*this, dim, mx_inline_count); + return do_mx_red_op<Array<octave_idx_type> , bool> (*this, dim, mx_inline_count); } NDArray boolNDArray::cumsum (int dim) const { // NOTE: going via octave_idx_type is faster even though it requires a conversion. - return do_mx_cum_op<Array<octave_idx_type> > (*this, dim, mx_inline_cumcount); + return do_mx_cum_op<Array<octave_idx_type> , bool> (*this, dim, mx_inline_cumcount); } boolNDArray
--- a/liboctave/chMatrix.cc +++ b/liboctave/chMatrix.cc @@ -204,13 +204,13 @@ boolMatrix charMatrix::all (int dim) const { - return do_mx_red_op<boolMatrix> (*this, dim, mx_inline_all); + return do_mx_red_op<boolMatrix, char> (*this, dim, mx_inline_all); } boolMatrix charMatrix::any (int dim) const { - return do_mx_red_op<boolMatrix> (*this, dim, mx_inline_any); + return do_mx_red_op<boolMatrix, char> (*this, dim, mx_inline_any); } MS_CMP_OPS(charMatrix, , char, )
--- a/liboctave/chNDArray.cc +++ b/liboctave/chNDArray.cc @@ -37,13 +37,13 @@ boolNDArray charNDArray::all (int dim) const { - return do_mx_red_op<boolMatrix> (*this, dim, mx_inline_all); + return do_mx_red_op<boolMatrix, char> (*this, dim, mx_inline_all); } boolNDArray charNDArray::any (int dim) const { - return do_mx_red_op<boolMatrix> (*this, dim, mx_inline_any); + return do_mx_red_op<boolMatrix, char> (*this, dim, mx_inline_any); } charNDArray
--- a/liboctave/dMatrix.cc +++ b/liboctave/dMatrix.cc @@ -2765,43 +2765,43 @@ boolMatrix Matrix::all (int dim) const { - return do_mx_red_op<boolMatrix> (*this, dim, mx_inline_all); + return do_mx_red_op<boolMatrix, double> (*this, dim, mx_inline_all); } boolMatrix Matrix::any (int dim) const { - return do_mx_red_op<boolMatrix> (*this, dim, mx_inline_any); + return do_mx_red_op<boolMatrix, double> (*this, dim, mx_inline_any); } Matrix Matrix::cumprod (int dim) const { - return do_mx_cum_op<Matrix> (*this, dim, mx_inline_cumprod); + return do_mx_cum_op<Matrix, double> (*this, dim, mx_inline_cumprod); } Matrix Matrix::cumsum (int dim) const { - return do_mx_cum_op<Matrix> (*this, dim, mx_inline_cumsum); + return do_mx_cum_op<Matrix, double> (*this, dim, mx_inline_cumsum); } Matrix Matrix::prod (int dim) const { - return do_mx_red_op<Matrix> (*this, dim, mx_inline_prod); + return do_mx_red_op<Matrix, double> (*this, dim, mx_inline_prod); } Matrix Matrix::sum (int dim) const { - return do_mx_red_op<Matrix> (*this, dim, mx_inline_sum); + return do_mx_red_op<Matrix, double> (*this, dim, mx_inline_sum); } Matrix Matrix::sumsq (int dim) const { - return do_mx_red_op<Matrix> (*this, dim, mx_inline_sumsq); + return do_mx_red_op<Matrix, double> (*this, dim, mx_inline_sumsq); } Matrix
--- a/liboctave/dNDArray.cc +++ b/liboctave/dNDArray.cc @@ -699,43 +699,43 @@ boolNDArray NDArray::all (int dim) const { - return do_mx_red_op<boolNDArray> (*this, dim, mx_inline_all); + return do_mx_red_op<boolNDArray, double> (*this, dim, mx_inline_all); } boolNDArray NDArray::any (int dim) const { - return do_mx_red_op<boolNDArray> (*this, dim, mx_inline_any); + return do_mx_red_op<boolNDArray, double> (*this, dim, mx_inline_any); } NDArray NDArray::cumprod (int dim) const { - return do_mx_cum_op<NDArray> (*this, dim, mx_inline_cumprod); + return do_mx_cum_op<NDArray, double> (*this, dim, mx_inline_cumprod); } NDArray NDArray::cumsum (int dim) const { - return do_mx_cum_op<NDArray> (*this, dim, mx_inline_cumsum); + return do_mx_cum_op<NDArray, double> (*this, dim, mx_inline_cumsum); } NDArray NDArray::prod (int dim) const { - return do_mx_red_op<NDArray> (*this, dim, mx_inline_prod); + return do_mx_red_op<NDArray, double> (*this, dim, mx_inline_prod); } NDArray NDArray::sum (int dim) const { - return do_mx_red_op<NDArray> (*this, dim, mx_inline_sum); + return do_mx_red_op<NDArray, double> (*this, dim, mx_inline_sum); } NDArray NDArray::sumsq (int dim) const { - return do_mx_red_op<NDArray> (*this, dim, mx_inline_sumsq); + return do_mx_red_op<NDArray, double> (*this, dim, mx_inline_sumsq); } NDArray
--- a/liboctave/fCMatrix.cc +++ b/liboctave/fCMatrix.cc @@ -3225,43 +3225,43 @@ boolMatrix FloatComplexMatrix::all (int dim) const { - return do_mx_red_op<boolMatrix> (*this, dim, mx_inline_all); + return do_mx_red_op<boolMatrix, FloatComplex> (*this, dim, mx_inline_all); } boolMatrix FloatComplexMatrix::any (int dim) const { - return do_mx_red_op<boolMatrix> (*this, dim, mx_inline_any); + return do_mx_red_op<boolMatrix, FloatComplex> (*this, dim, mx_inline_any); } FloatComplexMatrix FloatComplexMatrix::cumprod (int dim) const { - return do_mx_cum_op<FloatComplexMatrix> (*this, dim, mx_inline_cumprod); + return do_mx_cum_op<FloatComplexMatrix, FloatComplex> (*this, dim, mx_inline_cumprod); } FloatComplexMatrix FloatComplexMatrix::cumsum (int dim) const { - return do_mx_cum_op<FloatComplexMatrix> (*this, dim, mx_inline_cumsum); + return do_mx_cum_op<FloatComplexMatrix, FloatComplex> (*this, dim, mx_inline_cumsum); } FloatComplexMatrix FloatComplexMatrix::prod (int dim) const { - return do_mx_red_op<FloatComplexMatrix> (*this, dim, mx_inline_prod); + return do_mx_red_op<FloatComplexMatrix, FloatComplex> (*this, dim, mx_inline_prod); } FloatComplexMatrix FloatComplexMatrix::sum (int dim) const { - return do_mx_red_op<FloatComplexMatrix> (*this, dim, mx_inline_sum); + return do_mx_red_op<FloatComplexMatrix, FloatComplex> (*this, dim, mx_inline_sum); } FloatComplexMatrix FloatComplexMatrix::sumsq (int dim) const { - return do_mx_red_op<FloatMatrix> (*this, dim, mx_inline_sumsq); + return do_mx_red_op<FloatMatrix, FloatComplex> (*this, dim, mx_inline_sumsq); } FloatMatrix FloatComplexMatrix::abs (void) const
--- a/liboctave/fCNDArray.cc +++ b/liboctave/fCNDArray.cc @@ -627,43 +627,43 @@ boolNDArray FloatComplexNDArray::all (int dim) const { - return do_mx_red_op<boolNDArray> (*this, dim, mx_inline_all); + return do_mx_red_op<boolNDArray, FloatComplex> (*this, dim, mx_inline_all); } boolNDArray FloatComplexNDArray::any (int dim) const { - return do_mx_red_op<boolNDArray> (*this, dim, mx_inline_any); + return do_mx_red_op<boolNDArray, FloatComplex> (*this, dim, mx_inline_any); } FloatComplexNDArray FloatComplexNDArray::cumprod (int dim) const { - return do_mx_cum_op<FloatComplexNDArray> (*this, dim, mx_inline_cumprod); + return do_mx_cum_op<FloatComplexNDArray, FloatComplex> (*this, dim, mx_inline_cumprod); } FloatComplexNDArray FloatComplexNDArray::cumsum (int dim) const { - return do_mx_cum_op<FloatComplexNDArray> (*this, dim, mx_inline_cumsum); + return do_mx_cum_op<FloatComplexNDArray, FloatComplex> (*this, dim, mx_inline_cumsum); } FloatComplexNDArray FloatComplexNDArray::prod (int dim) const { - return do_mx_red_op<FloatComplexNDArray> (*this, dim, mx_inline_prod); + return do_mx_red_op<FloatComplexNDArray, FloatComplex> (*this, dim, mx_inline_prod); } FloatComplexNDArray FloatComplexNDArray::sum (int dim) const { - return do_mx_red_op<FloatComplexNDArray> (*this, dim, mx_inline_sum); + return do_mx_red_op<FloatComplexNDArray, FloatComplex> (*this, dim, mx_inline_sum); } FloatComplexNDArray FloatComplexNDArray::sumsq (int dim) const { - return do_mx_red_op<FloatNDArray> (*this, dim, mx_inline_sumsq); + return do_mx_red_op<FloatNDArray, FloatComplex> (*this, dim, mx_inline_sumsq); } FloatComplexNDArray
--- a/liboctave/fMatrix.cc +++ b/liboctave/fMatrix.cc @@ -2764,43 +2764,43 @@ boolMatrix FloatMatrix::all (int dim) const { - return do_mx_red_op<boolMatrix> (*this, dim, mx_inline_all); + return do_mx_red_op<boolMatrix, float> (*this, dim, mx_inline_all); } boolMatrix FloatMatrix::any (int dim) const { - return do_mx_red_op<boolMatrix> (*this, dim, mx_inline_any); + return do_mx_red_op<boolMatrix, float> (*this, dim, mx_inline_any); } FloatMatrix FloatMatrix::cumprod (int dim) const { - return do_mx_cum_op<FloatMatrix> (*this, dim, mx_inline_cumprod); + return do_mx_cum_op<FloatMatrix, float> (*this, dim, mx_inline_cumprod); } FloatMatrix FloatMatrix::cumsum (int dim) const { - return do_mx_cum_op<FloatMatrix> (*this, dim, mx_inline_cumsum); + return do_mx_cum_op<FloatMatrix, float> (*this, dim, mx_inline_cumsum); } FloatMatrix FloatMatrix::prod (int dim) const { - return do_mx_red_op<FloatMatrix> (*this, dim, mx_inline_prod); + return do_mx_red_op<FloatMatrix, float> (*this, dim, mx_inline_prod); } FloatMatrix FloatMatrix::sum (int dim) const { - return do_mx_red_op<FloatMatrix> (*this, dim, mx_inline_sum); + return do_mx_red_op<FloatMatrix, float> (*this, dim, mx_inline_sum); } FloatMatrix FloatMatrix::sumsq (int dim) const { - return do_mx_red_op<FloatMatrix> (*this, dim, mx_inline_sumsq); + return do_mx_red_op<FloatMatrix, float> (*this, dim, mx_inline_sumsq); } FloatMatrix
--- a/liboctave/fNDArray.cc +++ b/liboctave/fNDArray.cc @@ -654,43 +654,43 @@ boolNDArray FloatNDArray::all (int dim) const { - return do_mx_red_op<boolNDArray> (*this, dim, mx_inline_all); + return do_mx_red_op<boolNDArray, float> (*this, dim, mx_inline_all); } boolNDArray FloatNDArray::any (int dim) const { - return do_mx_red_op<boolNDArray> (*this, dim, mx_inline_any); + return do_mx_red_op<boolNDArray, float> (*this, dim, mx_inline_any); } FloatNDArray FloatNDArray::cumprod (int dim) const { - return do_mx_cum_op<FloatNDArray> (*this, dim, mx_inline_cumprod); + return do_mx_cum_op<FloatNDArray, float> (*this, dim, mx_inline_cumprod); } FloatNDArray FloatNDArray::cumsum (int dim) const { - return do_mx_cum_op<FloatNDArray> (*this, dim, mx_inline_cumsum); + return do_mx_cum_op<FloatNDArray, float> (*this, dim, mx_inline_cumsum); } FloatNDArray FloatNDArray::prod (int dim) const { - return do_mx_red_op<FloatNDArray> (*this, dim, mx_inline_prod); + return do_mx_red_op<FloatNDArray, float> (*this, dim, mx_inline_prod); } FloatNDArray FloatNDArray::sum (int dim) const { - return do_mx_red_op<FloatNDArray> (*this, dim, mx_inline_sum); + return do_mx_red_op<FloatNDArray, float> (*this, dim, mx_inline_sum); } FloatNDArray FloatNDArray::sumsq (int dim) const { - return do_mx_red_op<FloatNDArray> (*this, dim, mx_inline_sumsq); + return do_mx_red_op<FloatNDArray, float> (*this, dim, mx_inline_sumsq); } FloatNDArray
--- a/liboctave/intNDArray.cc +++ b/liboctave/intNDArray.cc @@ -74,14 +74,14 @@ boolNDArray intNDArray<T>::all (int dim) const { - return do_mx_red_op<boolNDArray> (*this, dim, mx_inline_all); + return do_mx_red_op<boolNDArray, T > (*this, dim, mx_inline_all); } template <class T> boolNDArray intNDArray<T>::any (int dim) const { - return do_mx_red_op<boolNDArray> (*this, dim, mx_inline_any); + return do_mx_red_op<boolNDArray, T > (*this, dim, mx_inline_any); } template <class T> @@ -204,14 +204,14 @@ intNDArray<T> intNDArray<T>::sum (int dim) const { - return do_mx_red_op<intNDArray<T> > (*this, dim, mx_inline_sum); + return do_mx_red_op<intNDArray<T> , T > (*this, dim, mx_inline_sum); } template <class T> intNDArray<T> intNDArray<T>::cumsum (int dim) const { - return do_mx_cum_op<intNDArray<T> > (*this, dim, mx_inline_cumsum); + return do_mx_cum_op<intNDArray<T> , T > (*this, dim, mx_inline_cumsum); } template <class T>