VIOTA.M
Vector Iota
VIOTA.M vd, vs2, vm
Writes the index of the active element to the destination. Useful for parallel prefix sums.
Details
Writes to each element of vd the sum of set mask bits in vs2 at positions less than the current element index.
Pseudocode Operation
count = 0; foreach(i < vl): if vm[i]: vd[i] = count++;
Example
VIOTA.M v1, v4, v0.t
Encoding
Binary Layout
010100
31:26
vm
25
vs2
24:20
10000
19:15
010
14:12
vd
11:7
1010111
6:0
Operands
-
vd
Destination vector register -
vs2
Mask Src