Skip to content

Update BitArray.CopyTo to use the xplat intrinsics #116079

Description

@tannergooding

As per #114818 (comment), BitArray.CopyTo could benefit from using the cross platform intrinsic APIs rather than the platform specific ones.

This can be achieved by swapping out these API calls:

  • Avx512BW.IsSupported -> Vector512.IsHardwareAccelerated
  • Avx512BW.Shuffle(x, y) -> Vector512.Shuffle(x, y)
  • Avx512F.And(x, y) -> x & y
  • Avx512BW.Min(x, y) -> Vector512.Min(x, y)
  • Avx512F.Store(x, y) -> y.Store(x)

Similar changes could also be made to the Avx2 path (using Vector256) and so on.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions