Skip to content

Arm64 SVE: Rename arguments for SVE CreateBreak/CreateMask APIs #115225

Closed

Description

@a74nh

During implementation, the naming of the default value arguments changed from what was reviewed. Original API approval was in #98184

This issue should either approve the differences, or they should be rejected and a PR to fix up the code should be raised.
The implemented APIs need changing to match what was approved.

Approved APIs:

namespace System.Runtime.Intrinsics.Arm;

/// VectorT Summary
public abstract partial class Sve : AdvSimd /// Feature: FEAT_SVE  Category: mask
{
  /// T: sbyte, short, int, long, byte, ushort, uint, ulong
  public static unsafe Vector<T> CreateBreakAfterMask(Vector<T> totalMask, Vector<T> fromMask); // BRKA // predicated

  /// T: sbyte, short, int, long, byte, ushort, uint, ulong
  public static unsafe Vector<T> CreateBreakBeforeMask(Vector<T> totalMask, Vector<T> fromMask); // BRKB // predicated

  /// T: byte, ushort, uint, ulong
  public static unsafe Vector<T> CreateMaskForNextActiveElement(Vector<T> totalMask, Vector<T> fromMask); // PNEXT

  /// T: sbyte, short, int, long, byte, ushort, uint, ulong
  public static unsafe Vector<T> CreateMaskForFirstActiveElement(Vector<T> totalMask, Vector<T> fromMask); // PFIRST

  public static unsafe Vector<T> CreateMaskForNextActiveElement(Vector<T> totalMask, Vector<T> fromMask); // PNEXT

public static unsafe Vector<T> CreateMaskForFirstActiveElement(Vector<T> totalMask, Vector<T> fromMask); // PFIRST

public static unsafe bool TestAnyTrue(Vector<T> mask, Vector<T> rightMask); // PTEST

public static unsafe bool TestFirstTrue(Vector<T> leftMask, Vector<T> rightMask); // PTEST

public static unsafe bool TestLastTrue(Vector<T> leftMask, Vector<T> rightMask); // PTEST
}

Currently implemented:

namespace System.Runtime.Intrinsics.Arm;

/// VectorT Summary
public abstract partial class Sve : AdvSimd /// Feature: FEAT_SVE  Category: mask
{
  /// T: sbyte, short, int, long, byte, ushort, uint, ulong
  public static unsafe Vector<T> CreateBreakAfterMask(Vector<T> mask, Vector<T> srcMask); // BRKA // predicated

  /// T: sbyte, short, int, long, byte, ushort, uint, ulong
  public static unsafe Vector<T> CreateBreakBeforeMask(Vector<T> mask, Vector<T> srcMask); // BRKB // predicated

  /// T: byte, ushort, uint, ulong
  public static unsafe Vector<T> CreateMaskForNextActiveElement(Vector<T> mask, Vector<T> srcMask); // PNEXT

  /// T: sbyte, short, int, long, byte, ushort, uint, ulong
  public static unsafe Vector<T> CreateMaskForFirstActiveElement(Vector<T> mask, Vector<T> srcMask); // PFIRST

  public static unsafe Vector<T> CreateMaskForNextActiveElement(Vector<T> totalMask, Vector<T> srcMask); // PNEXT

public static unsafe Vector<T> CreateMaskForFirstActiveElement(Vector<T> totalMask, Vector<T> srcMask); // PFIRST]

public static unsafe bool TestAnyTrue(Vector<T> mask, Vector<T> srcMask); // PTEST

public static unsafe bool TestFirstTrue(Vector<T> mask, Vector<T> srcMask); // PTEST

public static unsafe bool TestLastTrue(Vector<T> mask, Vector<T> srcMask); // PTEST
}

Activity

  1. added
    untriaged
    on May 1, 2025
  2. added
    arm-sve
    and removed
    untriaged
    on May 1, 2025
  3. dotnet-policy-service commented on May 1, 2025

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @dotnet/area-system-runtime-intrinsics
    See info in area-owners.md if you want to be subscribed.

  4. added
    api-suggestion
    untriaged
    on May 1, 2025
  5. a74nh commented on May 1, 2025

    @a74nh
    ContributorAuthor

    Looking at the changes, I suspect the reviewed versions (totalMask and fromMask) are the better options.

  6. changed the title [-][API Proposal]: Rename arguments for SVE CreateBreak APIs[/-] [+][API Proposal]: Rename arguments for SVE CreateBreak/CreateMask APIs[/+] on May 1, 2025
  7. kunalspathak commented on May 1, 2025

    @kunalspathak
    Contributor
  8. tannergooding commented on May 8, 2025

    @tannergooding
    Member

    @kunalspathak, looks like you reviewed the PR that introduced these: #104184

    Do you recall why it was changed? Without a good reason, I'd agree with @a74nh and say we should change it back to what was approved. Then this doesn't need to go back to API review.

  9. a74nh commented on May 9, 2025

    @a74nh
    ContributorAuthor

    @kunalspathak, looks like you reviewed the PR that introduced these: #104184

    Do you recall why it was changed? Without a good reason, I'd agree with @a74nh and say we should change it back to what was approved. Then this doesn't need to go back to API review.

    I suspect it was implemented using an older version of the auto generated code.

    I will Switch the title and description so that it's no longer an API suggestion change

  10. changed the title [-][API Proposal]: Rename arguments for SVE CreateBreak/CreateMask APIs[/-] [+]Arm64 SVE: Rename arguments for SVE CreateBreak/CreateMask APIs[/+] on May 9, 2025
  11. removed
    api-suggestion
    untriaged
    on May 9, 2025
  12. added this to the 10.0.0 milestone on May 30, 2025
  13. added a commit that references this issue on Jun 3, 2025
    a6abb7d
  14. added a commit that references this issue on Jun 10, 2025
    9a6b6c8
  15. locked and limited conversation to collaborators on Jul 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-System.Runtime.Intrinsicsarm-sve

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions