29 static constexpr bool known_sparse = (op_ != CompareOperation::EQUAL &&
30 op_ != CompareOperation::GREATER_THAN_OR_EQUAL &&
31 op_ != CompareOperation::LESS_THAN_OR_EQUAL);
33 static constexpr bool is_basic =
false;
42 template<
typename Index_,
typename InputValue_,
typename OutputValue_>
43 void dense(
bool, Index_, Index_, Index_ length,
const InputValue_* left_buffer,
const InputValue_* right_buffer, OutputValue_* output_buffer)
const {
44 for (Index_ i = 0; i < length; ++i) {
45 if constexpr(std::is_same<InputValue_, OutputValue_>::value) {
46 auto& val = output_buffer[i];
47 val = delayed_compare<op_>(val, right_buffer[i]);
49 output_buffer[i] = delayed_compare<op_>(left_buffer[i], right_buffer[i]);
54 template<
typename Index_,
typename InputValue_,
typename OutputValue_>
55 void dense(
bool, Index_,
const std::vector<Index_>& indices,
const InputValue_* left_buffer,
const InputValue_* right_buffer, OutputValue_* output_buffer)
const {
56 Index_ length = indices.size();
57 for (Index_ i = 0; i < length; ++i) {
58 if constexpr(std::is_same<InputValue_, OutputValue_>::value) {
59 auto& val = output_buffer[i];
60 val = delayed_compare<op_>(val, right_buffer[i]);
62 output_buffer[i] = delayed_compare<op_>(left_buffer[i], right_buffer[i]);
67 template<
typename Index_,
typename InputValue_,
typename OutputValue_>
71 return delayed_binary_isometric_sparse_operation<false>(
78 [](InputValue_ l, InputValue_ r) ->
auto {
79 return delayed_compare<op_>(l, r);
84 template<
typename OutputValue_,
typename InputValue_,
typename Index_>
85 OutputValue_ fill(
bool, Index_)
const {
86 if constexpr(known_sparse) {
93 bool is_sparse()
const {