... | @@ -92,10 +92,16 @@ Lane detection is a recursive binary process. The first step is to determine if |
... | @@ -92,10 +92,16 @@ Lane detection is a recursive binary process. The first step is to determine if |
|
|
|
|
|
To determine whether a shuffle vector pattern may be divided into lanes, the following algorithm is applied.
|
|
To determine whether a shuffle vector pattern may be divided into lanes, the following algorithm is applied.
|
|
|
|
|
|
1. Given a shuffle vector mask of 2n elements labelled m0, ... m2n-1, form the two submask vectors m0, m2n-1-1 and m2n-1, ... m2n-1.
|
|
1. Given a shuffle vector mask of $`2^k`$ elements labelled $`m_0, \ldots, m_{2^k-1}`$, form the two submask vectors:
|
|
|
|
```math
|
|
|
|
P = m_0, \ldots, m_{2^{k-1}-1}
|
|
|
|
```
|
|
|
|
```math
|
|
|
|
Q = m_{2^{k-1}}, \ldots, m_{2^k-1}
|
|
|
|
```
|
|
1. Compare the two vectors, element by element. The mask is ruled a laned operation if the following conditions hold in each case.
|
|
1. Compare the two vectors, element by element. The mask is ruled a laned operation if the following conditions hold in each case.
|
|
The value of m2n-1+i - mi = 2n-1, or
|
|
The value of $`Q_i - P_i = 2^{k-1}`$, or
|
|
The value of m2n-1+i = mi = 2n, and vector 2 is a constant splat.
|
|
The value of $`Q_i = P_i = 2^{k}`$ and vector 2 is a constant splat.
|
|
|
|
|
|
### Useful Functions
|
|
### Useful Functions
|
|
|
|
|
... | | ... | |