Skip to content

[API Proposal]: SVE2 Scatterstores are non-temporal #122033

@a74nh

Description

@a74nh

Background and motivation

See here for background: #94023 (comment)

The SVE2 scatterstores were all approved in #94023

/// VectorT Summary
public abstract partial class Sve2 : AdvSimd /// Feature: FEAT_SVE2  Category: scatterstores
{

  /// T: [int, uint], [long, ulong]
  public static unsafe void Scatter16BitNarrowing(Vector<T> mask, Vector<T2> addresses, Vector<T> data); // STNT1H

  /// T: uint, ulong
  public static unsafe void Scatter16BitNarrowing(Vector<T> mask, Vector<T> addresses, Vector<T> data); // STNT1H

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

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

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

  public static unsafe void Scatter16BitWithByteOffsetsNarrowing(Vector<ulong> mask, ushort* address, Vector<long> offsets, Vector<ulong> data); // STNT1H

  public static unsafe void Scatter16BitWithByteOffsetsNarrowing(Vector<long> mask, short* address, Vector<long> indexes, Vector<long> data); // STNT1H

  public static unsafe void Scatter16BitWithByteOffsetsNarrowing(Vector<ulong> mask, ushort* address, Vector<long> indexes, Vector<ulong> data); // STNT1H

  public static unsafe void Scatter16BitWithByteOffsetsNarrowing(Vector<long> mask, short* address, Vector<ulong> indexes, Vector<long> data); // STNT1H

  public static unsafe void Scatter16BitWithByteOffsetsNarrowing(Vector<ulong> mask, ushort* address, Vector<ulong> indexes, Vector<ulong> data); // STNT1H

  public static unsafe void Scatter32BitNarrowing(Vector<long> mask, Vector<ulong> addresses, Vector<long> data); // STNT1W

  public static unsafe void Scatter32BitNarrowing(Vector<ulong> mask, Vector<ulong> addresses, Vector<ulong> data); // STNT1W

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

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

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

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

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

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

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

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

  /// T: [int, uint], [long, ulong]
  public static unsafe void Scatter8BitNarrowing(Vector<T> mask, Vector<T2> addresses, Vector<T> data); // STNT1B

  /// T: uint, ulong
  public static unsafe void Scatter8BitNarrowing(Vector<T> mask, Vector<T> addresses, Vector<T> data); // STNT1B

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

  /// T: uint, ulong
  public static unsafe void Scatter8BitWithByteOffsetsNarrowing(Vector<T> mask, byte* address, Vector<T> offsets, Vector<T> data); // STNT1B

  public static unsafe void Scatter8BitWithByteOffsetsNarrowing(Vector<long> mask, sbyte* address, Vector<long> offsets, Vector<long> data); // STNT1B

  public static unsafe void Scatter8BitWithByteOffsetsNarrowing(Vector<ulong> mask, byte* address, Vector<long> offsets, Vector<ulong> data); // STNT1B

  /// T: [float, uint], [int, uint], [double, ulong], [long, ulong]
  public static unsafe void ScatterNonTemporal(Vector<T> mask, Vector<T2> addresses, Vector<T> data); // STNT1W or STNT1D

  /// T: uint, ulong
  public static unsafe void ScatterNonTemporal(Vector<T> mask, Vector<T> addresses, Vector<T> data); // STNT1W or STNT1D

  /// T: [float, uint], [int, uint], [double, long], [ulong, long], [double, ulong], [long, ulong]
  public static unsafe void ScatterNonTemporal(Vector<T> mask, T* address, Vector<T2> offsets, Vector<T> data); // STNT1W or STNT1D

  /// T: uint, long, ulong
  public static unsafe void ScatterNonTemporal(Vector<T> mask, T* address, Vector<T> offsets, Vector<T> data); // STNT1W or STNT1D

  /// T: [double, long], [ulong, long], [double, ulong], [long, ulong]
  public static unsafe void ScatterNonTemporal(Vector<T> mask, T* address, Vector<T2> indexes, Vector<T> data); // STNT1D

  /// T: long, ulong
  public static unsafe void ScatterNonTemporal(Vector<T> mask, T* address, Vector<T> indexes, Vector<T> data); // STNT1D

  /// total method signatures: 32

}

Note that all of the instructions have NT in the name. This means they are all non-temporal. This should be reflected in the API naming. Without doing this, then they clash with the existing SVE1 APIs with the exact same functionality and arguments (except they are not non-temporal).

API Proposal

/// VectorT Summary
public abstract partial class Sve2 : AdvSimd /// Feature: FEAT_SVE2  Category: scatterstores
{

  /// T: [int, uint], [long, ulong]
  public static unsafe void Scatter16BitNarrowingNonTemporal(Vector<T> mask, Vector<T2> addresses, Vector<T> data); // STNT1H

  /// T: uint, ulong
  public static unsafe void Scatter16BitNarrowingNonTemporal(Vector<T> mask, Vector<T> addresses, Vector<T> data); // STNT1H

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

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

  public static unsafe void Scatter16BitWithByteOffsetsNarrowingNonTemporal(Vector<long> mask, short* address, Vector<long> offsets, Vector<long> data); // STNT1H

  public static unsafe void Scatter16BitWithByteOffsetsNarrowingNonTemporal(Vector<ulong> mask, ushort* address, Vector<long> offsets, Vector<ulong> data); // STNT1H

  public static unsafe void Scatter16BitWithByteOffsetsNarrowingNonTemporal(Vector<long> mask, short* address, Vector<long> indexes, Vector<long> data); // STNT1H

  public static unsafe void Scatter16BitWithByteOffsetsNarrowingNonTemporal(Vector<ulong> mask, ushort* address, Vector<long> indexes, Vector<ulong> data); // STNT1H

  public static unsafe void Scatter16BitWithByteOffsetsNarrowingNonTemporal(Vector<long> mask, short* address, Vector<ulong> indexes, Vector<long> data); // STNT1H

  public static unsafe void Scatter16BitWithByteOffsetsNarrowingNonTemporal(Vector<ulong> mask, ushort* address, Vector<ulong> indexes, Vector<ulong> data); // STNT1H

  public static unsafe void Scatter32BitNarrowingNonTemporal(Vector<long> mask, Vector<ulong> addresses, Vector<long> data); // STNT1W

  public static unsafe void Scatter32BitNarrowingNonTemporal(Vector<ulong> mask, Vector<ulong> addresses, Vector<ulong> data); // STNT1W

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

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

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

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

  public static unsafe void Scatter32BitWithByteOffsetsNarrowingNonTemporal(Vector<long> mask, int* address, Vector<long> indexes, Vector<long> data); // STNT1W

  public static unsafe void Scatter32BitWithByteOffsetsNarrowingNonTemporal(Vector<ulong> mask, uint* address, Vector<long> indexes, Vector<ulong> data); // STNT1W

  public static unsafe void Scatter32BitWithByteOffsetsNarrowingNonTemporal(Vector<long> mask, int* address, Vector<ulong> indexes, Vector<long> data); // STNT1W

  public static unsafe void Scatter32BitWithByteOffsetsNarrowingNonTemporal(Vector<ulong> mask, uint* address, Vector<ulong> indexes, Vector<ulong> data); // STNT1W

  /// T: [int, uint], [long, ulong]
  public static unsafe void Scatter8BitNarrowingNonTemporal(Vector<T> mask, Vector<T2> addresses, Vector<T> data); // STNT1B

  /// T: uint, ulong
  public static unsafe void Scatter8BitNarrowingNonTemporal(Vector<T> mask, Vector<T> addresses, Vector<T> data); // STNT1B

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

  /// T: uint, ulong
  public static unsafe void Scatter8BitWithByteOffsetsNarrowingNonTemporal(Vector<T> mask, byte* address, Vector<T> offsets, Vector<T> data); // STNT1B

  public static unsafe void Scatter8BitWithByteOffsetsNarrowingNonTemporal(Vector<long> mask, sbyte* address, Vector<long> offsets, Vector<long> data); // STNT1B

  public static unsafe void Scatter8BitWithByteOffsetsNarrowingNonTemporal(Vector<ulong> mask, byte* address, Vector<long> offsets, Vector<ulong> data); // STNT1B

  /// T: [float, uint], [int, uint], [double, ulong], [long, ulong]
  public static unsafe void ScatterNonTemporal(Vector<T> mask, Vector<T2> addresses, Vector<T> data); // STNT1W or STNT1D

  /// T: uint, ulong
  public static unsafe void ScatterNonTemporal(Vector<T> mask, Vector<T> addresses, Vector<T> data); // STNT1W or STNT1D

  /// T: [float, uint], [int, uint], [double, long], [ulong, long], [double, ulong], [long, ulong]
  public static unsafe void ScatterNonTemporal(Vector<T> mask, T* address, Vector<T2> offsets, Vector<T> data); // STNT1W or STNT1D

  /// T: uint, long, ulong
  public static unsafe void ScatterNonTemporal(Vector<T> mask, T* address, Vector<T> offsets, Vector<T> data); // STNT1W or STNT1D

  /// T: [double, long], [ulong, long], [double, ulong], [long, ulong]
  public static unsafe void ScatterNonTemporal(Vector<T> mask, T* address, Vector<T2> indexes, Vector<T> data); // STNT1D

  /// T: long, ulong
  public static unsafe void ScatterNonTemporal(Vector<T> mask, T* address, Vector<T> indexes, Vector<T> data); // STNT1D

  /// total method signatures: 32

}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions