Mercurial > hg > octave-jordi
changeset 10682:7b4ffe27bbb4
Specify template arguments explicitely [MSVC].
author | Michael Goffioul <michael.goffioul@gmail.com> |
---|---|
date | Sun, 06 Jun 2010 16:52:01 +0100 |
parents | 0ba9bd294421 |
children | 4fdb36ffa066 |
files | liboctave/ChangeLog liboctave/mx-op-defs.h src/ChangeLog src/data.cc |
diffstat | 4 files changed, 24 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,10 @@ +2010-06-06 Michael Goffioul <michael.goffioul@gmail.com> + + * mx-op-defs.h (MNANCHK): Add matrix element type argument and use it + to specify template argument for mx_inline_any_nan. + (MS_BOOL_OP, SM_BOOL_OP, MM_BOOL_OP, NDS_BOOL_OP, SND_BOOL_OP, + NDND_BOOL_OP): Specify new MNANCHK argument. + 2010-06-04 Jaroslav Hajek <highegg@gmail.com> * dim-vector.cc: New source.
--- a/liboctave/mx-op-defs.h +++ b/liboctave/mx-op-defs.h @@ -33,8 +33,8 @@ if (xisnan (s)) \ gripe_nan_to_logical_conversion () -#define MNANCHK(m) \ - if (do_mx_check (m, mx_inline_any_nan)) \ +#define MNANCHK(m, MT) \ + if (do_mx_check (m, mx_inline_any_nan<MT>)) \ gripe_nan_to_logical_conversion () // vector by scalar operations. @@ -116,7 +116,7 @@ boolMatrix \ F (const M& m, const S& s) \ { \ - MNANCHK (m); \ + MNANCHK (m, M::element_type); \ SNANCHK (s); \ return do_ms_binary_op<bool, M::element_type, S> (m, s, OP); \ } @@ -160,7 +160,7 @@ F (const S& s, const M& m) \ { \ SNANCHK (s); \ - MNANCHK (m); \ + MNANCHK (m, M::element_type); \ return do_sm_binary_op<bool, S, M::element_type> (s, m, OP); \ } @@ -202,8 +202,8 @@ boolMatrix \ F (const M1& m1, const M2& m2) \ { \ - MNANCHK (m1); \ - MNANCHK (m2); \ + MNANCHK (m1, M1::element_type); \ + MNANCHK (m2, M2::element_type); \ return do_mm_binary_op<bool, M1::element_type, M2::element_type> (m1, m2, OP, #F); \ } @@ -245,7 +245,7 @@ boolNDArray \ F (const ND& m, const S& s) \ { \ - MNANCHK (m); \ + MNANCHK (m, ND::element_type); \ SNANCHK (s); \ return do_ms_binary_op<bool, ND::element_type, S> (m, s, OP); \ } @@ -293,7 +293,7 @@ F (const S& s, const ND& m) \ { \ SNANCHK (s); \ - MNANCHK (m); \ + MNANCHK (m, ND::element_type); \ return do_sm_binary_op<bool, S, ND::element_type> (s, m, OP); \ } @@ -339,8 +339,8 @@ boolNDArray \ F (const ND1& m1, const ND2& m2) \ { \ - MNANCHK (m1); \ - MNANCHK (m2); \ + MNANCHK (m1, ND1::element_type); \ + MNANCHK (m2, ND2::element_type); \ return do_mm_binary_op<bool, ND1::element_type, ND2::element_type> (m1, m2, OP, #F); \ }
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-06-06 Michael Goffioul <michael.goffioul@gmail.com> + + * data.cc (Frem, Fmod): Specify template arguments of binmap + explicitely. + 2010-06-02 Jaroslav Hajek <highegg@gmail.com> * DLD-FUNCTIONS/strfind.cc (Fqs_replace): Allow overlapped matches.
--- a/src/data.cc +++ b/src/data.cc @@ -541,7 +541,7 @@ { \ X##NDArray a0 = args(0).X##_array_value (); \ X##NDArray a1 = args(1).X##_array_value (); \ - retval = binmap<octave_##X> (a0, a1, rem, "rem"); \ + retval = binmap<octave_##X,octave_##X,octave_##X> (a0, a1, rem, "rem"); \ } \ break MAKE_INT_BRANCH (int8); @@ -673,7 +673,7 @@ { \ X##NDArray a0 = args(0).X##_array_value (); \ X##NDArray a1 = args(1).X##_array_value (); \ - retval = binmap<octave_##X> (a0, a1, mod, "mod"); \ + retval = binmap<octave_##X,octave_##X,octave_##X> (a0, a1, mod, "mod"); \ } \ break MAKE_INT_BRANCH (int8);