Skip to content

[API Proposal]: Rename functions for SVE ScatterXBitWithByteOffsetsNarrowing #116100

Description

@a74nh

The following was approved in #94014:

  /// T: int, long
  public static unsafe void Scatter16BitWithByteOffsetsNarrowing(Vector<T> mask, short* address, Vector<T> offsets, Vector<T> data); // ST1H

  /// T: [uint, int], [ulong, long]
  public static unsafe void Scatter16BitWithByteOffsetsNarrowing(Vector<T> mask, ushort* address, Vector<T2> offsets, Vector<T> data); // ST1H

  /// T: [int, uint], [long, ulong]
  public static unsafe void Scatter16BitWithByteOffsetsNarrowing(Vector<T> mask, short* address, Vector<T2> offsets, Vector<T> data); // ST1H

  /// T: uint, ulong
  public static unsafe void Scatter16BitWithByteOffsetsNarrowing(Vector<T> mask, ushort* address, Vector<T> offsets, Vector<T> data); // ST1H

  /// T: int, long
  public static unsafe void Scatter16BitWithByteOffsetsNarrowing(Vector<T> mask, short* address, Vector<T> indices, Vector<T> data); // ST1H

  /// T: [uint, int], [ulong, long]
  public static unsafe void Scatter16BitWithByteOffsetsNarrowing(Vector<T> mask, ushort* address, Vector<T2> indices, Vector<T> data); // ST1H

  /// T: [int, uint], [long, ulong]
  public static unsafe void Scatter16BitWithByteOffsetsNarrowing(Vector<T> mask, short* address, Vector<T2> indices, Vector<T> data); // ST1H

  /// T: uint, ulong
  public static unsafe void Scatter16BitWithByteOffsetsNarrowing(Vector<T> mask, ushort* address, Vector<T> indices, Vector<T> data); // ST1H

  public static unsafe void Scatter32BitWithByteOffsetsNarrowing(Vector<long> mask, int* address, Vector<long> offsets, Vector<long> data); // ST1W

  public static unsafe void Scatter32BitWithByteOffsetsNarrowing(Vector<ulong> mask, uint* address, Vector<long> offsets, Vector<ulong> data); // ST1W

  public static unsafe void Scatter32BitWithByteOffsetsNarrowing(Vector<long> mask, int* address, Vector<ulong> offsets, Vector<long> data); // ST1W

  public static unsafe void Scatter32BitWithByteOffsetsNarrowing(Vector<ulong> mask, uint* address, Vector<ulong> offsets, Vector<ulong> data); // ST1W

  public static unsafe void Scatter32BitWithByteOffsetsNarrowing(Vector<long> mask, int* address, Vector<long> indices, Vector<long> data); // ST1W

  public static unsafe void Scatter32BitWithByteOffsetsNarrowing(Vector<ulong> mask, uint* address, Vector<long> indices, Vector<ulong> data); // ST1W

  public static unsafe void Scatter32BitWithByteOffsetsNarrowing(Vector<long> mask, int* address, Vector<ulong> indices, Vector<long> data); // ST1W

  public static unsafe void Scatter32BitWithByteOffsetsNarrowing(Vector<ulong> mask, uint* address, Vector<ulong> indices, Vector<ulong> data); // ST1W

Some of these APIs clash due to offsets and indices having the same type.

For .NET9 the Vector<uint> offsets version was implemented.

See https://docsmirror.github.io/A64/2024-03/st1h_z_p_bz.html, the "scaled offset" and "unscaled offset".

API proposal

  /// T: int, long
  public static unsafe void Scatter16BitWithByteOffsetsNarrowing(Vector<T> mask, short* address, Vector<T> offsets, Vector<T> data); // ST1H

  /// T: [uint, int], [ulong, long]
  public static unsafe void Scatter16BitWithByteOffsetsNarrowing(Vector<T> mask, ushort* address, Vector<T2> offsets, Vector<T> data); // ST1H

  /// T: [int, uint], [long, ulong]
  public static unsafe void Scatter16BitWithByteOffsetsNarrowing(Vector<T> mask, short* address, Vector<T2> offsets, Vector<T> data); // ST1H

  /// T: uint, ulong
  public static unsafe void Scatter16BitWithByteOffsetsNarrowing(Vector<T> mask, ushort* address, Vector<T> offsets, Vector<T> data); // ST1H

  /// T: int, long
  public static unsafe void Scatter16BitWithIndicesNarrowing(Vector<T> mask, short* address, Vector<T> indices, Vector<T> data); // ST1H

  /// T: [uint, int], [ulong, long]
  public static unsafe void Scatter16BitWithIndicesNarrowing(Vector<T> mask, ushort* address, Vector<T2> indices, Vector<T> data); // ST1H

  /// T: [int, uint], [long, ulong]
  public static unsafe void Scatter16BitWithIndicesNarrowing(Vector<T> mask, short* address, Vector<T2> indices, Vector<T> data); // ST1H

  /// T: uint, ulong
  public static unsafe void Scatter16BitWithIndicesNarrowing(Vector<T> mask, ushort* address, Vector<T> indices, Vector<T> data); // ST1H

  public static unsafe void Scatter32BitWithByteOffsetsNarrowing(Vector<long> mask, int* address, Vector<long> offsets, Vector<long> data); // ST1W

  public static unsafe void Scatter32BitWithByteOffsetsNarrowing(Vector<ulong> mask, uint* address, Vector<long> offsets, Vector<ulong> data); // ST1W

  public static unsafe void Scatter32BitWithByteOffsetsNarrowing(Vector<long> mask, int* address, Vector<ulong> offsets, Vector<long> data); // ST1W

  public static unsafe void Scatter32BitWithByteOffsetsNarrowing(Vector<ulong> mask, uint* address, Vector<ulong> offsets, Vector<ulong> data); // ST1W

  public static unsafe void Scatter32BitWithIndicesNarrowing(Vector<long> mask, int* address, Vector<long> indices, Vector<long> data); // ST1W

  public static unsafe void Scatter32BitWithIndicesNarrowing(Vector<ulong> mask, uint* address, Vector<long> indices, Vector<ulong> data); // ST1W

  public static unsafe void Scatter32BitWithIndicesNarrowing(Vector<long> mask, int* address, Vector<ulong> indices, Vector<long> data); // ST1W

  public static unsafe void Scatter32BitWithIndicesNarrowing(Vector<ulong> mask, uint* address, Vector<ulong> indices, Vector<ulong> data); // ST1W

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions