You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Vector512 CopyTo<T>(this Vector512<T> vector, T[] destination, int startIndex) incorrect #94743
The current implementation of Vector512.CopyTo uses a byte offset into the array instead of an offset for the size of the given type. This causes unexpected results for all types outside of byte.
Activity
huoyaoyuan commentedon Nov 15, 2023
The implementation for Vector256:
Which correctly adds offset in T.
For Vector512:
Which incorrectly adds offset in bytes.
The correct and optimal implementation would be swapping
Unsafe.AddandUnsafe.As: