Array operations

Contents

Array operations#

template<typename Policies, Rank rank>
auto cell_index(Policies const &policies, PartitionedArray<policy::InputElementT<Policies, 0>, rank> const &condition, Index const dimension_idx) -> PartitionedArray<policy::OutputElementT<Policies, 0>, rank>#

Return an array with for each valid true value in condition, the cell index along the dimension dimension_idx.

All elements with a non-valid or false value in condition will become non-valid in the result.

Cell indices don’t vary along the dimension dimension_idx. They range from [0, array_shape[dimension_idx] - 1].