|
inlineconstexpr |
Defined in Header
If this function doesn't work for you, maybe you are looking for eve::compress_store or eve::compress. However this function is faster.
You can think about this function as std::copy_if
but instead of a predicate, you pass in logical_simd_value. Similar to std::copy_if
it returns you a pointer to where the output ended.
There are the following two modifiers:
mask.size()
elements, even if not all are selected. Those values are undefined. safe is not allowed to perform those writes, at the price of being slower for certain usecases.safe
version only touch selected elements. So, for example, other threads can read/write them without a race condition.Very often the mask is computed based on the values loaded from input. We would expect the optimizer to eliminate duplicated loads, but for some very complex pointer-like it might not be able to.
So we provide overloads where you can pass an already preloaded value. It should match loaded value from in, otherwise the behaviour is unspecified.
You can pass up to two eve::relative_conditional_expr ignore modifiers. 1st is the input side ignore:
o + offset
. followed by keep_first(count) Example: if the eve::ignore_extrema(1, L::size() - 2)
is passed,