Add operator overloads for matrix types

このコミットが含まれているのは:
Sergio Pedri committed 2024-06-18 20:36:56 -07:00
1 親 d68fa70493
コミット ec90bec27c
3ファイル変更
+2970

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

ファイル差分が大きすぎるため表示されません。 差分を読み込み
+90
ファイルの表示
@@ -449,6 +449,24 @@ public unsafe partial struct <#=fullTypeName#>
/// <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 <#=fullTypeName#> operator ~(<#=fullTypeName#> matrix) => default;
/// <summary>
/// Shifts right a <see cref="<#=fullTypeName#>"/> value.
/// </summary>
/// <param name="matrix">The <see cref="<#=fullTypeName#>"/> value to shift right.</param>
/// <param name="amount">The amount to shift each element right by.</param>
/// <returns>The result of shifting <paramref name="matrix"/> right by <paramref name="amount"/>.</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 <#=fullTypeName#> operator >>(<#=fullTypeName#> matrix, int amount) => default;
/// <summary>
/// Shifts right a <see cref="<#=fullTypeName#>"/> value.
/// </summary>
/// <param name="matrix">The <see cref="<#=fullTypeName#>"/> value to shift right.</param>
/// <param name="amount">The amount to shift each element right by.</param>
/// <returns>The result of shifting <paramref name="matrix"/> right by <paramref name="amount"/>.</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 <#=fullTypeName#> operator >>(<#=fullTypeName#> matrix, uint amount) => default;
/// <summary>
/// Shifts right a <see cref="<#=fullTypeName#>"/> value.
/// </summary>
@@ -467,6 +485,24 @@ public unsafe partial struct <#=fullTypeName#>
/// <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 <#=fullTypeName#> operator >>(<#=fullTypeName#> matrix, UInt<#=rows#>x<#=columns#> amount) => default;
/// <summary>
/// Shifts left a <see cref="<#=fullTypeName#>"/> value.
/// </summary>
/// <param name="matrix">The <see cref="<#=fullTypeName#>"/> value to shift left.</param>
/// <param name="amount">The amount to shift each element left by.</param>
/// <returns>The result of shifting <paramref name="matrix"/> left by <paramref name="amount"/>.</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 <#=fullTypeName#> operator <<(<#=fullTypeName#> matrix, int amount) => default;
/// <summary>
/// Shifts left a <see cref="<#=fullTypeName#>"/> value.
/// </summary>
/// <param name="matrix">The <see cref="<#=fullTypeName#>"/> value to shift left.</param>
/// <param name="amount">The amount to shift each element left by.</param>
/// <returns>The result of shifting <paramref name="matrix"/> left by <paramref name="amount"/>.</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 <#=fullTypeName#> operator <<(<#=fullTypeName#> matrix, uint amount) => default;
/// <summary>
/// Shifts left a <see cref="<#=fullTypeName#>"/> value.
/// </summary>
@@ -485,6 +521,24 @@ public unsafe partial struct <#=fullTypeName#>
/// <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 <#=fullTypeName#> operator <<(<#=fullTypeName#> matrix, UInt<#=rows#>x<#=columns#> amount) => default;
/// <summary>
/// Bitwise ands a <see cref="<#=fullTypeName#>"/> value.
/// </summary>
/// <param name="left">The <see cref="<#=fullTypeName#>"/> value to bitwise and.</param>
/// <param name="right">The <see cref="int"/> value to combine.</param>
/// <returns>The result of performing the bitwise and between <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 <#=fullTypeName#> operator &(<#=fullTypeName#> left, int right) => default;
/// <summary>
/// Bitwise ands a <see cref="<#=fullTypeName#>"/> value.
/// </summary>
/// <param name="left">The <see cref="<#=fullTypeName#>"/> value to bitwise and.</param>
/// <param name="right">The <see cref="uint"/> value to combine.</param>
/// <returns>The result of performing the bitwise and between <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 <#=fullTypeName#> operator &(<#=fullTypeName#> left, uint right) => default;
/// <summary>
/// Bitwise ands a <see cref="<#=fullTypeName#>"/> value.
/// </summary>
@@ -503,6 +557,24 @@ public unsafe partial struct <#=fullTypeName#>
/// <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 <#=fullTypeName#> operator &(<#=fullTypeName#> left, UInt<#=rows#>x<#=columns#> right) => default;
/// <summary>
/// Bitwise ors a <see cref="<#=fullTypeName#>"/> value.
/// </summary>
/// <param name="left">The <see cref="<#=fullTypeName#>"/> value to bitwise or.</param>
/// <param name="right">The <see cref="int"/> value to combine.</param>
/// <returns>The result of performing the bitwise or between <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 <#=fullTypeName#> operator |(<#=fullTypeName#> left, int right) => default;
/// <summary>
/// Bitwise ors a <see cref="<#=fullTypeName#>"/> value.
/// </summary>
/// <param name="left">The <see cref="<#=fullTypeName#>"/> value to bitwise or.</param>
/// <param name="right">The <see cref="uint"/> value to combine.</param>
/// <returns>The result of performing the bitwise or between <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 <#=fullTypeName#> operator |(<#=fullTypeName#> left, uint right) => default;
/// <summary>
/// Bitwise ors a <see cref="<#=fullTypeName#>"/> value.
/// </summary>
@@ -521,6 +593,24 @@ public unsafe partial struct <#=fullTypeName#>
/// <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 <#=fullTypeName#> operator |(<#=fullTypeName#> left, UInt<#=rows#>x<#=columns#> right) => default;
/// <summary>
/// Bitwise xors a <see cref="<#=fullTypeName#>"/> value.
/// </summary>
/// <param name="left">The <see cref="<#=fullTypeName#>"/> value to bitwise xor.</param>
/// <param name="right">The <see cref="int"/> value to combine.</param>
/// <returns>The result of performing the bitwise xor between <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 <#=fullTypeName#> operator ^(<#=fullTypeName#> left, int right) => default;
/// <summary>
/// Bitwise xors a <see cref="<#=fullTypeName#>"/> value.
/// </summary>
/// <param name="left">The <see cref="<#=fullTypeName#>"/> value to bitwise xor.</param>
/// <param name="right">The <see cref="uint"/> value to combine.</param>
/// <returns>The result of performing the bitwise xor between <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 <#=fullTypeName#> operator ^(<#=fullTypeName#> left, uint right) => default;
/// <summary>
/// Bitwise xors a <see cref="<#=fullTypeName#>"/> value.
/// </summary>
ファイル差分が大きすぎるため表示されません。 差分を読み込み