comparison src/data.cc @ 8756:d0755c9db5ed

implement fast logical sum (counting)
author Jaroslav Hajek <highegg@gmail.com>
date Mon, 16 Feb 2009 12:41:55 +0100
parents 767ed8cc6634
children ea76466605ba
comparison
equal deleted inserted replaced
8755:59c0fde890a0 8756:d0755c9db5ed
1333 else if NATIVE_REDUCTION_1 (FCN, uint64, dim) \ 1333 else if NATIVE_REDUCTION_1 (FCN, uint64, dim) \
1334 else if NATIVE_REDUCTION_1 (FCN, int8, dim) \ 1334 else if NATIVE_REDUCTION_1 (FCN, int8, dim) \
1335 else if NATIVE_REDUCTION_1 (FCN, int16, dim) \ 1335 else if NATIVE_REDUCTION_1 (FCN, int16, dim) \
1336 else if NATIVE_REDUCTION_1 (FCN, int32, dim) \ 1336 else if NATIVE_REDUCTION_1 (FCN, int32, dim) \
1337 else if NATIVE_REDUCTION_1 (FCN, int64, dim) \ 1337 else if NATIVE_REDUCTION_1 (FCN, int64, dim) \
1338 else if NATIVE_REDUCTION_1 (FCN, bool, dim) \ 1338 else if (arg.is_bool_type ()) \
1339 { \
1340 boolNDArray tmp = arg. bool_array_value (); \
1341 if (! error_state) \
1342 retval = tmp.any (dim); \
1343 } \
1344 \
1339 else if (arg.is_char_matrix ()) \ 1345 else if (arg.is_char_matrix ()) \
1340 { \ 1346 { \
1341 error (#FCN, ": invalid char type"); \ 1347 error (#FCN, ": invalid char type"); \
1342 } \ 1348 } \
1343 else if (!isdouble && arg.is_single_type ()) \ 1349 else if (!isdouble && arg.is_single_type ()) \
1375 else \ 1381 else \
1376 { \ 1382 { \
1377 gripe_wrong_type_arg (#FCN, arg); \ 1383 gripe_wrong_type_arg (#FCN, arg); \
1378 return retval; \ 1384 return retval; \
1379 } \ 1385 } \
1386 } \
1387 else if (arg.is_bool_type ()) \
1388 { \
1389 boolNDArray tmp = arg.bool_array_value (); \
1390 if (! error_state) \
1391 retval = tmp.FCN (dim); \
1380 } \ 1392 } \
1381 else if (!isdouble && arg.is_single_type ()) \ 1393 else if (!isdouble && arg.is_single_type ()) \
1382 { \ 1394 { \
1383 if (arg.is_real_type ()) \ 1395 if (arg.is_real_type ()) \
1384 { \ 1396 { \