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

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

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

+3 -1
ファイルの表示
@@ -1,4 +1,6 @@
namespace ComputeSharp;
#pragma warning disable CS0660, CS0661
namespace ComputeSharp;
/// <summary>
/// A <see langword="struct"/> that maps the <see langword="uint2"/> HLSL type.
+68
ファイルの表示
@@ -8,6 +8,7 @@ using MemoryMarshal = ComputeSharp.Core.NetStandard.System.Runtime.InteropServic
#endif
#nullable enable
#pragma warning disable CS0660, CS0661
namespace ComputeSharp;
@@ -438,6 +439,7 @@ public unsafe partial struct UInt2
/// </summary>
/// <param name="left">The first <see cref="UInt2"/> value to sum.</param>
/// <param name="right">The second <see cref="UInt2"/> 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 UInt2 operator +(UInt2 left, UInt2 right) => default;
@@ -446,14 +448,25 @@ public unsafe partial struct UInt2
/// </summary>
/// <param name="left">The first <see cref="UInt2"/> value to divide.</param>
/// <param name="right">The second <see cref="UInt2"/> 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 UInt2 operator /(UInt2 left, UInt2 right) => default;
/// <summary>
/// Calculates the remainder of the division between two <see cref="UInt2"/> values.
/// </summary>
/// <param name="left">The first <see cref="UInt2"/> value to divide.</param>
/// <param name="right">The second <see cref="UInt2"/> 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 UInt2 operator %(UInt2 left, UInt2 right) => default;
/// <summary>
/// Multiplies two <see cref="UInt2"/> values.
/// </summary>
/// <param name="left">The first <see cref="UInt2"/> value to multiply.</param>
/// <param name="right">The second <see cref="UInt2"/> 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 UInt2 operator *(UInt2 left, UInt2 right) => default;
@@ -462,6 +475,61 @@ public unsafe partial struct UInt2
/// </summary>
/// <param name="left">The first <see cref="UInt2"/> value to subtract.</param>
/// <param name="right">The second <see cref="UInt2"/> 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 UInt2 operator -(UInt2 left, UInt2 right) => default;
/// <summary>
/// Compares two <see cref="UInt2"/> values to see if the first is greater than the second.
/// </summary>
/// <param name="left">The first <see cref="UInt2"/> value to compare.</param>
/// <param name="right">The second <see cref="UInt2"/> 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 Bool2 operator >(UInt2 left, UInt2 right) => default;
/// <summary>
/// Compares two <see cref="UInt2"/> values to see if the first is greater than or equal to the second.
/// </summary>
/// <param name="left">The first <see cref="UInt2"/> value to compare.</param>
/// <param name="right">The second <see cref="UInt2"/> 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 Bool2 operator >=(UInt2 left, UInt2 right) => default;
/// <summary>
/// Compares two <see cref="UInt2"/> values to see if the first is lower than the second.
/// </summary>
/// <param name="left">The first <see cref="UInt2"/> value to compare.</param>
/// <param name="right">The second <see cref="UInt2"/> 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 Bool2 operator <(UInt2 left, UInt2 right) => default;
/// <summary>
/// Compares two <see cref="UInt2"/> values to see if the first is lower than or equal to the second.
/// </summary>
/// <param name="left">The first <see cref="UInt2"/> value to compare.</param>
/// <param name="right">The second <see cref="UInt2"/> 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 Bool2 operator <=(UInt2 left, UInt2 right) => default;
/// <summary>
/// Compares two <see cref="UInt2"/> values to see if they are equal.
/// </summary>
/// <param name="left">The first <see cref="UInt2"/> value to compare.</param>
/// <param name="right">The second <see cref="UInt2"/> 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 Bool2 operator ==(UInt2 left, UInt2 right) => default;
/// <summary>
/// Compares two <see cref="UInt2"/> values to see if they are not equal.
/// </summary>
/// <param name="left">The first <see cref="UInt2"/> value to compare.</param>
/// <param name="right">The second <see cref="UInt2"/> 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 Bool2 operator !=(UInt2 left, UInt2 right) => default;
}
+3 -1
ファイルの表示
@@ -1,4 +1,6 @@
namespace ComputeSharp;
#pragma warning disable CS0660, CS0661
namespace ComputeSharp;
/// <summary>
/// A <see langword="struct"/> that maps the <see langword="uint3"/> HLSL type.
+68
ファイルの表示
@@ -8,6 +8,7 @@ using MemoryMarshal = ComputeSharp.Core.NetStandard.System.Runtime.InteropServic
#endif
#nullable enable
#pragma warning disable CS0660, CS0661
namespace ComputeSharp;
@@ -1519,6 +1520,7 @@ public unsafe partial struct UInt3
/// </summary>
/// <param name="left">The first <see cref="UInt3"/> value to sum.</param>
/// <param name="right">The second <see cref="UInt3"/> 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 UInt3 operator +(UInt3 left, UInt3 right) => default;
@@ -1527,14 +1529,25 @@ public unsafe partial struct UInt3
/// </summary>
/// <param name="left">The first <see cref="UInt3"/> value to divide.</param>
/// <param name="right">The second <see cref="UInt3"/> 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 UInt3 operator /(UInt3 left, UInt3 right) => default;
/// <summary>
/// Calculates the remainder of the division between two <see cref="UInt3"/> values.
/// </summary>
/// <param name="left">The first <see cref="UInt3"/> value to divide.</param>
/// <param name="right">The second <see cref="UInt3"/> 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 UInt3 operator %(UInt3 left, UInt3 right) => default;
/// <summary>
/// Multiplies two <see cref="UInt3"/> values.
/// </summary>
/// <param name="left">The first <see cref="UInt3"/> value to multiply.</param>
/// <param name="right">The second <see cref="UInt3"/> 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 UInt3 operator *(UInt3 left, UInt3 right) => default;
@@ -1543,6 +1556,61 @@ public unsafe partial struct UInt3
/// </summary>
/// <param name="left">The first <see cref="UInt3"/> value to subtract.</param>
/// <param name="right">The second <see cref="UInt3"/> 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 UInt3 operator -(UInt3 left, UInt3 right) => default;
/// <summary>
/// Compares two <see cref="UInt3"/> values to see if the first is greater than the second.
/// </summary>
/// <param name="left">The first <see cref="UInt3"/> value to compare.</param>
/// <param name="right">The second <see cref="UInt3"/> 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 Bool3 operator >(UInt3 left, UInt3 right) => default;
/// <summary>
/// Compares two <see cref="UInt3"/> values to see if the first is greater than or equal to the second.
/// </summary>
/// <param name="left">The first <see cref="UInt3"/> value to compare.</param>
/// <param name="right">The second <see cref="UInt3"/> 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 Bool3 operator >=(UInt3 left, UInt3 right) => default;
/// <summary>
/// Compares two <see cref="UInt3"/> values to see if the first is lower than the second.
/// </summary>
/// <param name="left">The first <see cref="UInt3"/> value to compare.</param>
/// <param name="right">The second <see cref="UInt3"/> 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 Bool3 operator <(UInt3 left, UInt3 right) => default;
/// <summary>
/// Compares two <see cref="UInt3"/> values to see if the first is lower than or equal to the second.
/// </summary>
/// <param name="left">The first <see cref="UInt3"/> value to compare.</param>
/// <param name="right">The second <see cref="UInt3"/> 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 Bool3 operator <=(UInt3 left, UInt3 right) => default;
/// <summary>
/// Compares two <see cref="UInt3"/> values to see if they are equal.
/// </summary>
/// <param name="left">The first <see cref="UInt3"/> value to compare.</param>
/// <param name="right">The second <see cref="UInt3"/> 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 Bool3 operator ==(UInt3 left, UInt3 right) => default;
/// <summary>
/// Compares two <see cref="UInt3"/> values to see if they are not equal.
/// </summary>
/// <param name="left">The first <see cref="UInt3"/> value to compare.</param>
/// <param name="right">The second <see cref="UInt3"/> 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 Bool3 operator !=(UInt3 left, UInt3 right) => default;
}
+3 -1
ファイルの表示
@@ -1,4 +1,6 @@
namespace ComputeSharp;
#pragma warning disable CS0660, CS0661
namespace ComputeSharp;
/// <summary>
/// A <see langword="struct"/> that maps the <see langword="uint4"/> HLSL type.
+68
ファイルの表示
@@ -8,6 +8,7 @@ using MemoryMarshal = ComputeSharp.Core.NetStandard.System.Runtime.InteropServic
#endif
#nullable enable
#pragma warning disable CS0660, CS0661
namespace ComputeSharp;
@@ -4160,6 +4161,7 @@ public unsafe partial struct UInt4
/// </summary>
/// <param name="left">The first <see cref="UInt4"/> value to sum.</param>
/// <param name="right">The second <see cref="UInt4"/> 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 UInt4 operator +(UInt4 left, UInt4 right) => default;
@@ -4168,14 +4170,25 @@ public unsafe partial struct UInt4
/// </summary>
/// <param name="left">The first <see cref="UInt4"/> value to divide.</param>
/// <param name="right">The second <see cref="UInt4"/> 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 UInt4 operator /(UInt4 left, UInt4 right) => default;
/// <summary>
/// Calculates the remainder of the division between two <see cref="UInt4"/> values.
/// </summary>
/// <param name="left">The first <see cref="UInt4"/> value to divide.</param>
/// <param name="right">The second <see cref="UInt4"/> 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 UInt4 operator %(UInt4 left, UInt4 right) => default;
/// <summary>
/// Multiplies two <see cref="UInt4"/> values.
/// </summary>
/// <param name="left">The first <see cref="UInt4"/> value to multiply.</param>
/// <param name="right">The second <see cref="UInt4"/> 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 UInt4 operator *(UInt4 left, UInt4 right) => default;
@@ -4184,6 +4197,61 @@ public unsafe partial struct UInt4
/// </summary>
/// <param name="left">The first <see cref="UInt4"/> value to subtract.</param>
/// <param name="right">The second <see cref="UInt4"/> 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 UInt4 operator -(UInt4 left, UInt4 right) => default;
/// <summary>
/// Compares two <see cref="UInt4"/> values to see if the first is greater than the second.
/// </summary>
/// <param name="left">The first <see cref="UInt4"/> value to compare.</param>
/// <param name="right">The second <see cref="UInt4"/> 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 >(UInt4 left, UInt4 right) => default;
/// <summary>
/// Compares two <see cref="UInt4"/> values to see if the first is greater than or equal to the second.
/// </summary>
/// <param name="left">The first <see cref="UInt4"/> value to compare.</param>
/// <param name="right">The second <see cref="UInt4"/> 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 >=(UInt4 left, UInt4 right) => default;
/// <summary>
/// Compares two <see cref="UInt4"/> values to see if the first is lower than the second.
/// </summary>
/// <param name="left">The first <see cref="UInt4"/> value to compare.</param>
/// <param name="right">The second <see cref="UInt4"/> 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 <(UInt4 left, UInt4 right) => default;
/// <summary>
/// Compares two <see cref="UInt4"/> values to see if the first is lower than or equal to the second.
/// </summary>
/// <param name="left">The first <see cref="UInt4"/> value to compare.</param>
/// <param name="right">The second <see cref="UInt4"/> 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 <=(UInt4 left, UInt4 right) => default;
/// <summary>
/// Compares two <see cref="UInt4"/> values to see if they are equal.
/// </summary>
/// <param name="left">The first <see cref="UInt4"/> value to compare.</param>
/// <param name="right">The second <see cref="UInt4"/> 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 ==(UInt4 left, UInt4 right) => default;
/// <summary>
/// Compares two <see cref="UInt4"/> values to see if they are not equal.
/// </summary>
/// <param name="left">The first <see cref="UInt4"/> value to compare.</param>
/// <param name="right">The second <see cref="UInt4"/> 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 !=(UInt4 left, UInt4 right) => default;
}
ファイル差分が大きすぎるため表示されません。 差分を読み込み