3 ms·
The Vector<T> type in dotnet core works precisely like this. Just yesterday I tried it for some spatial map aggregation filters and calculations, and it worked
by jiggawatts 1y ago
The Vector<T> type in dotnet core works precisely like this. Just yesterday I tried it for some spatial map aggregation filters and calculations, and it worked great.
On my older PC it used AVX2 instructions and 256-bits at a time processing, on my newer laptop it automatically switched to AVX-512 and its speed improved 4x without a single line of code having to change!
I.e.: Vector<int> has 8x "int" elements on older processors, but it has 16x elements on newer ones. You can retrieve the count with Vector<int>.Count and use that to split your data.
The only issue is that swizzles and scatter/gather is unavailable for these generic types.
- the__alchemist 1y agoVery cool! I'm obviously doing the hard-coded types approach for now bc it's all I can get working!