Vc
Vc copied to clipboard
Masked gather in AoS layout
| Vc version / revision | Operating System | Compiler & Version | Compiler Flags | Assembler & Version | CPU |
|---|---|---|---|---|---|
| 1.4.1 | Centos7 | gcc9.2 | avx2+fma -O3 | Intel Xeon Silver 42140 |
Testcase
struct bla {
int one{0};
int two{0};
}
Vc::vector<bla> test={bla1, bla2, bla3, bla4, bla5, bla6, bla7, bla8, bla9, bla10};
Vc::int_v::IndexType indices = Vc::int_v::IndexesFromZero() + 4;
Vc::int_m mask = indices < (test.size() - 1);
// how can I apply the mask here?
auto blibla = test[indices][&bla::one];
The gather and scatter methods which allow for masks are deprecated. How can I still use masked gather and scatter? Any help is much appreciated :)