Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[API Proposal]: Rename arguments for SVE CreateBreak/CreateMask APIs #115225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Tracked by #115331
a74nh opened this issue May 1, 2025 · 3 comments
Open
Tracked by #115331

[API Proposal]: Rename arguments for SVE CreateBreak/CreateMask APIs #115225

a74nh opened this issue May 1, 2025 · 3 comments
Labels
api-suggestion Early API idea and discussion, it is NOT ready for implementation area-System.Runtime.Intrinsics arm-sve Work related to arm64 SVE/SVE2 support untriaged New issue has not been triaged by the area owner

Comments

@a74nh
Copy link
Contributor

a74nh commented May 1, 2025

Background and motivation

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.

API Proposal

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
}

Previously 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
}
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label May 1, 2025
@a74nh a74nh added arm-sve Work related to arm64 SVE/SVE2 support area-System.Runtime.Intrinsics and removed area-System.Numerics untriaged New issue has not been triaged by the area owner labels May 1, 2025
Copy link
Contributor

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

@a74nh a74nh added api-suggestion Early API idea and discussion, it is NOT ready for implementation untriaged New issue has not been triaged by the area owner labels May 1, 2025
@a74nh
Copy link
Contributor Author

a74nh commented May 1, 2025

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

@a74nh a74nh changed the title [API Proposal]: Rename arguments for SVE CreateBreak APIs [API Proposal]: Rename arguments for SVE CreateBreak/CreateMask APIs May 1, 2025
@kunalspathak
Copy link
Member

@tannergooding

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-suggestion Early API idea and discussion, it is NOT ready for implementation area-System.Runtime.Intrinsics arm-sve Work related to arm64 SVE/SVE2 support untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

No branches or pull requests

2 participants