Skip to content

Update when Vector256<T>.IsHardwareAccelerated returns true #64309

Description

@stephentoub

As outlined by @tannergooding in #63285 (comment), we need to:

update Vector256.IsHardwareAccelerated to only return true on AVX2+ where both floating-point and integer operations can be accelerated using "single instructions

These uses of Avx2.IsSupported then need to be changed to Vector256.IsHardwareAccelerated:

if (Avx2.IsSupported && searchSpaceMinusValueTailLength - Vector256<byte>.Count >= 0)

if (Avx2.IsSupported && searchSpaceMinusValueTailLength >= Vector256<byte>.Count)

if (Avx2.IsSupported && searchSpaceMinusValueTailLength - Vector256<ushort>.Count >= 0)

if (Avx2.IsSupported && searchSpaceMinusValueTailLength >= Vector256<ushort>.Count)

cc: @EgorBo

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions