Apply a bitwise or to two inputs and return the result as a Buffer. The inputs are treated as bitmaps, meaning that offsets and length are specified in number of bits. # See Also [`BooleanBuffer::from_bitwise_binary_op`] for creating `BooleanBuffer`s directly
(
left: &Buffer,
left_offset_in_bits: usize,
right: &Buffer,
right_offset_in_bits: usize,
len_in_bits: usize,
)
| 175 | /// # See Also |
| 176 | /// * [`BooleanBuffer::from_bitwise_binary_op`] for creating `BooleanBuffer`s directly |
| 177 | pub fn buffer_bin_or( |
| 178 | left: &Buffer, |
| 179 | left_offset_in_bits: usize, |
| 180 | right: &Buffer, |
| 181 | right_offset_in_bits: usize, |
| 182 | len_in_bits: usize, |
| 183 | ) -> Buffer { |
| 184 | let result = BooleanBuffer::from_bitwise_binary_op( |
| 185 | left, |
| 186 | left_offset_in_bits, |
| 187 | right, |
| 188 | right_offset_in_bits, |
| 189 | len_in_bits, |
| 190 | |a, b| a | b, |
| 191 | ); |
| 192 | // Normalize non-zero BooleanBuffer offsets back to a zero-offset Buffer. |
| 193 | if result.offset() == 0 { |
| 194 | result.into_inner() |
| 195 | } else { |
| 196 | result.sliced() |
| 197 | } |
| 198 | } |
| 199 | |
| 200 | /// Apply a bitwise xor to two inputs and return the result as a Buffer. |
| 201 | /// The inputs are treated as bitmaps, meaning that offsets and length are specified in number of bits. |
no test coverage detected