HPCombi
High Performance Combinatorics in C++ using vector instructions v1.0.1
Loading...
Searching...
No Matches
common_first_diff Class Reference

The first difference between two HPCombi::epu8. More...

#include <epu8.hpp>

Detailed Description

The first difference between two HPCombi::epu8.

Parameters
a,b: two HPCombi::epu8
bound: a size_t
Returns
the smallest index \(i<bound\) such that a[i] and b[i] differ, 16 if there is no differences before bound.
Example:
epu8 a { 5, 5, 2, 5, 1, 6,12, 4, 0, 3, 2,11,12,13,14,15};
epu8 b { 5, 5, 2, 9, 1, 6,12, 4, 0, 4, 4, 4,12,13,14,15};
uint8_t __attribute__((vector_size(16))) epu8
SIMD vector of 16 unsigned bytes.
Definition epu8.hpp:45
then first_diff(a, b) returns 3, first_diff(a, b, 3) returns 16, first_diff(a, b, 4) returns 3, first_diff(a, b, 7) returns 3.
Warning
bound is assumed to be smaller or equal than 16

The documentation for this class was generated from the following file: