Skip to content

Implement `all()` only for vectors (no relational arguments)

Ryan Curtin requested to merge rcurtin/bandicoot-code:all into unstable

Like pretty much everything else, I way underanticipated the amount of work for all(), but this is a first step. This MR provides all() for vector objects only, although it does stub out some framework for more. A bunch of changes were needed:

  • Objects now have traits that can tell at compile time whether something is a vector. This is done in the same way as Armadillo, with Op_traits.
  • generic_reduce() is adapted to support reduces that return a different type than the input memory type.
  • A new kind of kernels, oneway_integral, is added. This is for kernels that should only be compiled for integral types.
  • mtop_all is added, but only all_vec() is implemented. (Note that this differs from Armadillo's op_all. I chose to do this because all() is technically an mtOp, but it required adding a uword parameter to mtOp.)

Merge request reports