#include <eve/module/algo/algo/transform_keep_if.hpp>
Defined in Header
#include <eve/module/algo.hpp>
Conditionally copies values that pass a predicate to the beginning of the range, transforming them in the process. Values past the returned sentinel are to be considered garbage.
- Note
- If the scalar operation is cheap enough, ::keep_if + views::map might be slightly faster.
-
See ::transform_copy_if and ::keep_if for more details.
{
template<relaxed_range Rng, typename Func>
}
unaligned_t< iterator_t< R > > unaligned_iterator_t
Unaligned iterator for a relaxed range.
Definition ranges_types.hpp:68
constexpr auto transform_keep_if
In-place version of eve::algo::transform_copy_if.
Definition transform_keep_if.hpp:114
Parameters
- rng: Range to modify
- func: Function that takes elements from rng as SIMD registers and returns a pair of:
- the transformed values
- a logical mask
Return value
Iterator past the last written element.
- See also
- keep_if
-
copy_if
-
remove_if
-
transform_copy_if
-
transform_inplace
-
views::map