Add new HLSL >, >=, <, <=, ==, !=, % operators

このコミットが含まれているのは:
Sergio Pedri committed 2022-04-24 22:55:51 +02:00
1 親 ebf906c062
コミット 34afa9a37d
37ファイル変更
+5656 -12

検索条件に一致するファイルはありません

+69
ファイルの表示
@@ -8,6 +8,7 @@ using MemoryMarshal = ComputeSharp.Core.NetStandard.System.Runtime.InteropServic
#endif
#nullable enable
#pragma warning disable CS0660, CS0661
namespace ComputeSharp;
@@ -4159,6 +4160,7 @@ public unsafe partial struct Int4
/// Negates a <see cref="Int4"/> value.
/// </summary>
/// <param name="xyzw">The <see cref="Int4"/> value to negate.</param>
/// <returns>The negated value of <paramref name="xyzw"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int4 operator -(Int4 xyzw) => default;
@@ -4167,6 +4169,7 @@ public unsafe partial struct Int4
/// </summary>
/// <param name="left">The first <see cref="Int4"/> value to sum.</param>
/// <param name="right">The second <see cref="Int4"/> value to sum.</param>
/// <returns>The result of adding <paramref name="left"/> and <paramref name="right"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int4 operator +(Int4 left, Int4 right) => default;
@@ -4175,14 +4178,25 @@ public unsafe partial struct Int4
/// </summary>
/// <param name="left">The first <see cref="Int4"/> value to divide.</param>
/// <param name="right">The second <see cref="Int4"/> value to divide.</param>
/// <returns>The result of dividing <paramref name="left"/> and <paramref name="right"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int4 operator /(Int4 left, Int4 right) => default;
/// <summary>
/// Calculates the remainder of the division between two <see cref="Int4"/> values.
/// </summary>
/// <param name="left">The first <see cref="Int4"/> value to divide.</param>
/// <param name="right">The second <see cref="Int4"/> value to divide.</param>
/// <returns>The remainder of dividing <paramref name="left"/> and <paramref name="right"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int4 operator %(Int4 left, Int4 right) => default;
/// <summary>
/// Multiplies two <see cref="Int4"/> values.
/// </summary>
/// <param name="left">The first <see cref="Int4"/> value to multiply.</param>
/// <param name="right">The second <see cref="Int4"/> value to multiply.</param>
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int4 operator *(Int4 left, Int4 right) => default;
@@ -4191,6 +4205,61 @@ public unsafe partial struct Int4
/// </summary>
/// <param name="left">The first <see cref="Int4"/> value to subtract.</param>
/// <param name="right">The second <see cref="Int4"/> value to subtract.</param>
/// <returns>The result of subtracting <paramref name="left"/> and <paramref name="right"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int4 operator -(Int4 left, Int4 right) => default;
/// <summary>
/// Compares two <see cref="Int4"/> values to see if the first is greater than the second.
/// </summary>
/// <param name="left">The first <see cref="Int4"/> value to compare.</param>
/// <param name="right">The second <see cref="Int4"/> value to compare.</param>
/// <returns>The result of comparing <paramref name="left"/> and <paramref name="right"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Bool4 operator >(Int4 left, Int4 right) => default;
/// <summary>
/// Compares two <see cref="Int4"/> values to see if the first is greater than or equal to the second.
/// </summary>
/// <param name="left">The first <see cref="Int4"/> value to compare.</param>
/// <param name="right">The second <see cref="Int4"/> value to compare.</param>
/// <returns>The result of comparing <paramref name="left"/> and <paramref name="right"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Bool4 operator >=(Int4 left, Int4 right) => default;
/// <summary>
/// Compares two <see cref="Int4"/> values to see if the first is lower than the second.
/// </summary>
/// <param name="left">The first <see cref="Int4"/> value to compare.</param>
/// <param name="right">The second <see cref="Int4"/> value to compare.</param>
/// <returns>The result of comparing <paramref name="left"/> and <paramref name="right"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Bool4 operator <(Int4 left, Int4 right) => default;
/// <summary>
/// Compares two <see cref="Int4"/> values to see if the first is lower than or equal to the second.
/// </summary>
/// <param name="left">The first <see cref="Int4"/> value to compare.</param>
/// <param name="right">The second <see cref="Int4"/> value to compare.</param>
/// <returns>The result of comparing <paramref name="left"/> and <paramref name="right"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Bool4 operator <=(Int4 left, Int4 right) => default;
/// <summary>
/// Compares two <see cref="Int4"/> values to see if they are equal.
/// </summary>
/// <param name="left">The first <see cref="Int4"/> value to compare.</param>
/// <param name="right">The second <see cref="Int4"/> value to compare.</param>
/// <returns>The result of comparing <paramref name="left"/> and <paramref name="right"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Bool4 operator ==(Int4 left, Int4 right) => default;
/// <summary>
/// Compares two <see cref="Int4"/> values to see if they are not equal.
/// </summary>
/// <param name="left">The first <see cref="Int4"/> value to compare.</param>
/// <param name="right">The second <see cref="Int4"/> value to compare.</param>
/// <returns>The result of comparing <paramref name="left"/> and <paramref name="right"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Bool4 operator !=(Int4 left, Int4 right) => default;
}