diff --git a/src/ComputeSharp.Core/Primitives/Bool/Bool2.cs b/src/ComputeSharp.Core/Primitives/Bool/Bool2.cs index b9305ab0..9e78758f 100644 --- a/src/ComputeSharp.Core/Primitives/Bool/Bool2.cs +++ b/src/ComputeSharp.Core/Primitives/Bool/Bool2.cs @@ -7,26 +7,6 @@ namespace ComputeSharp; /// public partial struct Bool2 { - /// - /// Gets an value with all components set to . - /// - public static Bool2 False => false; - - /// - /// Gets an value with all components set to . - /// - public static Bool2 True => true; - - /// - /// Gets an value with the component set to , and the others to . - /// - public static Bool2 TrueX => new(true, false); - - /// - /// Gets an value with the component set to , and the others to . - /// - public static Bool2 TrueY => new(false, true); - /// /// Creates a new instance with the specified parameters. /// diff --git a/src/ComputeSharp.Core/Primitives/Bool/Bool2.g.cs b/src/ComputeSharp.Core/Primitives/Bool/Bool2.g.cs index 75399fac..34d874b1 100644 --- a/src/ComputeSharp.Core/Primitives/Bool/Bool2.g.cs +++ b/src/ComputeSharp.Core/Primitives/Bool/Bool2.g.cs @@ -32,6 +32,26 @@ public unsafe partial struct Bool2 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public readonly ref bool this[int i] => ref *(bool*)UndefinedData; + /// + /// Gets a value with all components set to . + /// + public static Bool2 False => false; + + /// + /// Gets a value with all components set to . + /// + public static Bool2 True => true; + + /// + /// Gets a value with the component set to , and the others to . + /// + public static Bool2 TrueX => new(true, false); + + /// + /// Gets a value with the component set to , and the others to . + /// + public static Bool2 TrueY => new(false, true); + /// /// Gets a reference to the value representing the X component. /// diff --git a/src/ComputeSharp.Core/Primitives/Bool/Bool3.cs b/src/ComputeSharp.Core/Primitives/Bool/Bool3.cs index 34cdffc1..8d861f35 100644 --- a/src/ComputeSharp.Core/Primitives/Bool/Bool3.cs +++ b/src/ComputeSharp.Core/Primitives/Bool/Bool3.cs @@ -7,31 +7,6 @@ namespace ComputeSharp; /// public partial struct Bool3 { - /// - /// Gets an value with all components set to . - /// - public static Bool3 False => false; - - /// - /// Gets an value with all components set to . - /// - public static Bool3 True => true; - - /// - /// Gets an value with the component set to , and the others to . - /// - public static Bool3 TrueX => new(true, false, false); - - /// - /// Gets an value with the component set to , and the others to . - /// - public static Bool3 TrueY => new(false, true, false); - - /// - /// Gets an value with the component set to , and the others to . - /// - public static Bool3 TrueZ => new(false, false, true); - /// /// Creates a new instance with the specified parameters. /// diff --git a/src/ComputeSharp.Core/Primitives/Bool/Bool3.g.cs b/src/ComputeSharp.Core/Primitives/Bool/Bool3.g.cs index 87322361..43b366c4 100644 --- a/src/ComputeSharp.Core/Primitives/Bool/Bool3.g.cs +++ b/src/ComputeSharp.Core/Primitives/Bool/Bool3.g.cs @@ -35,6 +35,31 @@ public unsafe partial struct Bool3 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public readonly ref bool this[int i] => ref *(bool*)UndefinedData; + /// + /// Gets a value with all components set to . + /// + public static Bool3 False => false; + + /// + /// Gets a value with all components set to . + /// + public static Bool3 True => true; + + /// + /// Gets a value with the component set to , and the others to . + /// + public static Bool3 TrueX => new(true, false, false); + + /// + /// Gets a value with the component set to , and the others to . + /// + public static Bool3 TrueY => new(false, true, false); + + /// + /// Gets a value with the component set to , and the others to . + /// + public static Bool3 TrueZ => new(false, false, true); + /// /// Gets a reference to the value representing the X component. /// diff --git a/src/ComputeSharp.Core/Primitives/Bool/Bool4.cs b/src/ComputeSharp.Core/Primitives/Bool/Bool4.cs index fcf9f11a..050a9d0c 100644 --- a/src/ComputeSharp.Core/Primitives/Bool/Bool4.cs +++ b/src/ComputeSharp.Core/Primitives/Bool/Bool4.cs @@ -7,36 +7,6 @@ namespace ComputeSharp; /// public partial struct Bool4 { - /// - /// Gets an value with all components set to . - /// - public static Bool4 False => false; - - /// - /// Gets an value with all components set to . - /// - public static Bool4 True => true; - - /// - /// Gets an value with the component set to , and the others to . - /// - public static Bool4 TrueX => new(true, false, false, false); - - /// - /// Gets an value with the component set to , and the others to . - /// - public static Bool4 TrueY => new(false, true, false, false); - - /// - /// Gets an value with the component set to , and the others to . - /// - public static Bool4 TrueZ => new(false, false, true, false); - - /// - /// Gets an value with the component set to , and the others to . - /// - public static Bool4 TrueW => new(false, false, false, true); - /// /// Creates a new instance with the specified parameters. /// diff --git a/src/ComputeSharp.Core/Primitives/Bool/Bool4.g.cs b/src/ComputeSharp.Core/Primitives/Bool/Bool4.g.cs index c7728eb3..13e9c565 100644 --- a/src/ComputeSharp.Core/Primitives/Bool/Bool4.g.cs +++ b/src/ComputeSharp.Core/Primitives/Bool/Bool4.g.cs @@ -38,6 +38,36 @@ public unsafe partial struct Bool4 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public readonly ref bool this[int i] => ref *(bool*)UndefinedData; + /// + /// Gets a value with all components set to . + /// + public static Bool4 False => false; + + /// + /// Gets a value with all components set to . + /// + public static Bool4 True => true; + + /// + /// Gets a value with the component set to , and the others to . + /// + public static Bool4 TrueX => new(true, false, false, false); + + /// + /// Gets a value with the component set to , and the others to . + /// + public static Bool4 TrueY => new(false, true, false, false); + + /// + /// Gets a value with the component set to , and the others to . + /// + public static Bool4 TrueZ => new(false, false, true, false); + + /// + /// Gets a value with the component set to , and the others to . + /// + public static Bool4 TrueW => new(false, false, false, true); + /// /// Gets a reference to the value representing the X component. /// diff --git a/src/ComputeSharp.Core/Primitives/Double/Double2.cs b/src/ComputeSharp.Core/Primitives/Double/Double2.cs index e43f3e40..15bec764 100644 --- a/src/ComputeSharp.Core/Primitives/Double/Double2.cs +++ b/src/ComputeSharp.Core/Primitives/Double/Double2.cs @@ -7,26 +7,6 @@ namespace ComputeSharp; /// public partial struct Double2 { - /// - /// Gets an value with all components set to 0. - /// - public static Double2 Zero => 0; - - /// - /// Gets an value with all components set to 1. - /// - public static Double2 One => 1; - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static Double2 UnitX => new(1, 0); - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static Double2 UnitY => new(0, 1); - /// /// Creates a new instance with the specified parameters. /// diff --git a/src/ComputeSharp.Core/Primitives/Double/Double2.g.cs b/src/ComputeSharp.Core/Primitives/Double/Double2.g.cs index 0717e604..da4767ab 100644 --- a/src/ComputeSharp.Core/Primitives/Double/Double2.g.cs +++ b/src/ComputeSharp.Core/Primitives/Double/Double2.g.cs @@ -37,6 +37,26 @@ public unsafe partial struct Double2 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public readonly ref double this[int i] => ref *(double*)UndefinedData; + /// + /// Gets a value with all components set to 0. + /// + public static Double2 Zero => 0; + + /// + /// Gets a value with all components set to 1. + /// + public static Double2 One => 1; + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static Double2 UnitX => new(1, 0); + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static Double2 UnitY => new(0, 1); + /// /// Gets a reference to the value representing the X component. /// diff --git a/src/ComputeSharp.Core/Primitives/Double/Double3.cs b/src/ComputeSharp.Core/Primitives/Double/Double3.cs index 326a25f5..aadd36e5 100644 --- a/src/ComputeSharp.Core/Primitives/Double/Double3.cs +++ b/src/ComputeSharp.Core/Primitives/Double/Double3.cs @@ -7,31 +7,6 @@ namespace ComputeSharp; /// public partial struct Double3 { - /// - /// Gets an value with all components set to 0. - /// - public static Double3 Zero => 0; - - /// - /// Gets an value with all components set to 1. - /// - public static Double3 One => 1; - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static Double3 UnitX => new(1, 0, 0); - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static Double3 UnitY => new(0, 1, 0); - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static Double3 UnitZ => new(0, 0, 1); - /// /// Creates a new instance with the specified parameters. /// diff --git a/src/ComputeSharp.Core/Primitives/Double/Double3.g.cs b/src/ComputeSharp.Core/Primitives/Double/Double3.g.cs index 42662832..1dcfc3a3 100644 --- a/src/ComputeSharp.Core/Primitives/Double/Double3.g.cs +++ b/src/ComputeSharp.Core/Primitives/Double/Double3.g.cs @@ -40,6 +40,31 @@ public unsafe partial struct Double3 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public readonly ref double this[int i] => ref *(double*)UndefinedData; + /// + /// Gets a value with all components set to 0. + /// + public static Double3 Zero => 0; + + /// + /// Gets a value with all components set to 1. + /// + public static Double3 One => 1; + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static Double3 UnitX => new(1, 0, 0); + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static Double3 UnitY => new(0, 1, 0); + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static Double3 UnitZ => new(0, 0, 1); + /// /// Gets a reference to the value representing the X component. /// diff --git a/src/ComputeSharp.Core/Primitives/Double/Double4.cs b/src/ComputeSharp.Core/Primitives/Double/Double4.cs index 634dc47a..345e51a9 100644 --- a/src/ComputeSharp.Core/Primitives/Double/Double4.cs +++ b/src/ComputeSharp.Core/Primitives/Double/Double4.cs @@ -7,36 +7,6 @@ namespace ComputeSharp; /// public partial struct Double4 { - /// - /// Gets an value with all components set to 0. - /// - public static Double4 Zero => 0; - - /// - /// Gets an value with all components set to 1. - /// - public static Double4 One => 1; - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static Double4 UnitX => new(1, 0, 0, 0); - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static Double4 UnitY => new(0, 1, 0, 0); - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static Double4 UnitZ => new(0, 0, 1, 0); - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static Double4 UnitW => new(0, 0, 0, 1); - /// /// Creates a new instance with the specified parameters. /// diff --git a/src/ComputeSharp.Core/Primitives/Double/Double4.g.cs b/src/ComputeSharp.Core/Primitives/Double/Double4.g.cs index edbb0676..6aa4489a 100644 --- a/src/ComputeSharp.Core/Primitives/Double/Double4.g.cs +++ b/src/ComputeSharp.Core/Primitives/Double/Double4.g.cs @@ -43,6 +43,36 @@ public unsafe partial struct Double4 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public readonly ref double this[int i] => ref *(double*)UndefinedData; + /// + /// Gets a value with all components set to 0. + /// + public static Double4 Zero => 0; + + /// + /// Gets a value with all components set to 1. + /// + public static Double4 One => 1; + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static Double4 UnitX => new(1, 0, 0, 0); + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static Double4 UnitY => new(0, 1, 0, 0); + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static Double4 UnitZ => new(0, 0, 1, 0); + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static Double4 UnitW => new(0, 0, 0, 1); + /// /// Gets a reference to the value representing the X component. /// diff --git a/src/ComputeSharp.Core/Primitives/Float/Float2.cs b/src/ComputeSharp.Core/Primitives/Float/Float2.cs index b8e667cb..aa9a566f 100644 --- a/src/ComputeSharp.Core/Primitives/Float/Float2.cs +++ b/src/ComputeSharp.Core/Primitives/Float/Float2.cs @@ -9,26 +9,6 @@ namespace ComputeSharp; /// public partial struct Float2 { - /// - /// Gets an value with all components set to 0. - /// - public static Float2 Zero => 0; - - /// - /// Gets an value with all components set to 1. - /// - public static Float2 One => 1; - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static Float2 UnitX => new(1, 0); - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static Float2 UnitY => new(0, 1); - /// /// Creates a new instance with the specified parameters. /// diff --git a/src/ComputeSharp.Core/Primitives/Float/Float2.g.cs b/src/ComputeSharp.Core/Primitives/Float/Float2.g.cs index 9094132f..b6d8ddde 100644 --- a/src/ComputeSharp.Core/Primitives/Float/Float2.g.cs +++ b/src/ComputeSharp.Core/Primitives/Float/Float2.g.cs @@ -37,6 +37,26 @@ public unsafe partial struct Float2 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public readonly ref float this[int i] => ref *(float*)UndefinedData; + /// + /// Gets a value with all components set to 0. + /// + public static Float2 Zero => 0; + + /// + /// Gets a value with all components set to 1. + /// + public static Float2 One => 1; + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static Float2 UnitX => new(1, 0); + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static Float2 UnitY => new(0, 1); + /// /// Gets a reference to the value representing the X component. /// diff --git a/src/ComputeSharp.Core/Primitives/Float/Float3.cs b/src/ComputeSharp.Core/Primitives/Float/Float3.cs index 16693e7e..b934c43b 100644 --- a/src/ComputeSharp.Core/Primitives/Float/Float3.cs +++ b/src/ComputeSharp.Core/Primitives/Float/Float3.cs @@ -9,31 +9,6 @@ namespace ComputeSharp; /// public partial struct Float3 { - /// - /// Gets an value with all components set to 0. - /// - public static Float3 Zero => 0; - - /// - /// Gets an value with all components set to 1. - /// - public static Float3 One => 1; - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static Float3 UnitX => new(1, 0, 0); - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static Float3 UnitY => new(0, 1, 0); - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static Float3 UnitZ => new(0, 0, 1); - /// /// Creates a new instance with the specified parameters. /// diff --git a/src/ComputeSharp.Core/Primitives/Float/Float3.g.cs b/src/ComputeSharp.Core/Primitives/Float/Float3.g.cs index 557b29b4..2ae26205 100644 --- a/src/ComputeSharp.Core/Primitives/Float/Float3.g.cs +++ b/src/ComputeSharp.Core/Primitives/Float/Float3.g.cs @@ -40,6 +40,31 @@ public unsafe partial struct Float3 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public readonly ref float this[int i] => ref *(float*)UndefinedData; + /// + /// Gets a value with all components set to 0. + /// + public static Float3 Zero => 0; + + /// + /// Gets a value with all components set to 1. + /// + public static Float3 One => 1; + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static Float3 UnitX => new(1, 0, 0); + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static Float3 UnitY => new(0, 1, 0); + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static Float3 UnitZ => new(0, 0, 1); + /// /// Gets a reference to the value representing the X component. /// diff --git a/src/ComputeSharp.Core/Primitives/Float/Float4.cs b/src/ComputeSharp.Core/Primitives/Float/Float4.cs index 18a16673..8796eda4 100644 --- a/src/ComputeSharp.Core/Primitives/Float/Float4.cs +++ b/src/ComputeSharp.Core/Primitives/Float/Float4.cs @@ -9,36 +9,6 @@ namespace ComputeSharp; /// public partial struct Float4 { - /// - /// Gets an value with all components set to 0. - /// - public static Float4 Zero => 0; - - /// - /// Gets an value with all components set to 1. - /// - public static Float4 One => 1; - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static Float4 UnitX => new(1, 0, 0, 0); - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static Float4 UnitY => new(0, 1, 0, 0); - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static Float4 UnitZ => new(0, 0, 1, 0); - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static Float4 UnitW => new(0, 0, 0, 1); - /// /// Creates a new instance with the specified parameters. /// diff --git a/src/ComputeSharp.Core/Primitives/Float/Float4.g.cs b/src/ComputeSharp.Core/Primitives/Float/Float4.g.cs index e011344e..4f079788 100644 --- a/src/ComputeSharp.Core/Primitives/Float/Float4.g.cs +++ b/src/ComputeSharp.Core/Primitives/Float/Float4.g.cs @@ -43,6 +43,36 @@ public unsafe partial struct Float4 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public readonly ref float this[int i] => ref *(float*)UndefinedData; + /// + /// Gets a value with all components set to 0. + /// + public static Float4 Zero => 0; + + /// + /// Gets a value with all components set to 1. + /// + public static Float4 One => 1; + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static Float4 UnitX => new(1, 0, 0, 0); + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static Float4 UnitY => new(0, 1, 0, 0); + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static Float4 UnitZ => new(0, 0, 1, 0); + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static Float4 UnitW => new(0, 0, 0, 1); + /// /// Gets a reference to the value representing the X component. /// diff --git a/src/ComputeSharp.Core/Primitives/Int/Int2.cs b/src/ComputeSharp.Core/Primitives/Int/Int2.cs index 2441d744..2093f902 100644 --- a/src/ComputeSharp.Core/Primitives/Int/Int2.cs +++ b/src/ComputeSharp.Core/Primitives/Int/Int2.cs @@ -7,26 +7,6 @@ namespace ComputeSharp; /// public partial struct Int2 { - /// - /// Gets an value with all components set to 0. - /// - public static Int2 Zero => 0; - - /// - /// Gets an value with all components set to 1. - /// - public static Int2 One => 1; - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static Int2 UnitX => new(1, 0); - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static Int2 UnitY => new(0, 1); - /// /// Creates a new instance with the specified parameters. /// diff --git a/src/ComputeSharp.Core/Primitives/Int/Int2.g.cs b/src/ComputeSharp.Core/Primitives/Int/Int2.g.cs index 27a71a8f..0fb6dc1b 100644 --- a/src/ComputeSharp.Core/Primitives/Int/Int2.g.cs +++ b/src/ComputeSharp.Core/Primitives/Int/Int2.g.cs @@ -37,6 +37,26 @@ public unsafe partial struct Int2 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public readonly ref int this[int i] => ref *(int*)UndefinedData; + /// + /// Gets a value with all components set to 0. + /// + public static Int2 Zero => 0; + + /// + /// Gets a value with all components set to 1. + /// + public static Int2 One => 1; + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static Int2 UnitX => new(1, 0); + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static Int2 UnitY => new(0, 1); + /// /// Gets a reference to the value representing the X component. /// @@ -523,6 +543,106 @@ public unsafe partial struct Int2 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool2 operator <=(Int2 left, Int2 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2 operator ~(Int2 xy) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2 operator >>(Int2 xy, Int2 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2 operator >>(Int2 xy, UInt2 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2 operator <<(Int2 xy, Int2 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2 operator <<(Int2 xy, UInt2 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2 operator &(Int2 left, Int2 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2 operator &(Int2 left, UInt2 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2 operator |(Int2 left, Int2 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2 operator |(Int2 left, UInt2 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2 operator ^(Int2 left, Int2 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2 operator ^(Int2 left, UInt2 right) => default; + /// /// Compares two values to see if they are equal. /// diff --git a/src/ComputeSharp.Core/Primitives/Int/Int3.cs b/src/ComputeSharp.Core/Primitives/Int/Int3.cs index 74f26765..cdfd9641 100644 --- a/src/ComputeSharp.Core/Primitives/Int/Int3.cs +++ b/src/ComputeSharp.Core/Primitives/Int/Int3.cs @@ -7,31 +7,6 @@ namespace ComputeSharp; /// public partial struct Int3 { - /// - /// Gets an value with all components set to 0. - /// - public static Int3 Zero => 0; - - /// - /// Gets an value with all components set to 1. - /// - public static Int3 One => 1; - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static Int3 UnitX => new(1, 0, 0); - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static Int3 UnitY => new(0, 1, 0); - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static Int3 UnitZ => new(0, 0, 1); - /// /// Creates a new instance with the specified parameters. /// diff --git a/src/ComputeSharp.Core/Primitives/Int/Int3.g.cs b/src/ComputeSharp.Core/Primitives/Int/Int3.g.cs index a5d0d39b..086c6910 100644 --- a/src/ComputeSharp.Core/Primitives/Int/Int3.g.cs +++ b/src/ComputeSharp.Core/Primitives/Int/Int3.g.cs @@ -40,6 +40,31 @@ public unsafe partial struct Int3 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public readonly ref int this[int i] => ref *(int*)UndefinedData; + /// + /// Gets a value with all components set to 0. + /// + public static Int3 Zero => 0; + + /// + /// Gets a value with all components set to 1. + /// + public static Int3 One => 1; + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static Int3 UnitX => new(1, 0, 0); + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static Int3 UnitY => new(0, 1, 0); + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static Int3 UnitZ => new(0, 0, 1); + /// /// Gets a reference to the value representing the X component. /// @@ -1604,6 +1629,106 @@ public unsafe partial struct Int3 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool3 operator <=(Int3 left, Int3 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3 operator ~(Int3 xyz) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3 operator >>(Int3 xyz, Int3 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3 operator >>(Int3 xyz, UInt3 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3 operator <<(Int3 xyz, Int3 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3 operator <<(Int3 xyz, UInt3 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3 operator &(Int3 left, Int3 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3 operator &(Int3 left, UInt3 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3 operator |(Int3 left, Int3 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3 operator |(Int3 left, UInt3 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3 operator ^(Int3 left, Int3 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3 operator ^(Int3 left, UInt3 right) => default; + /// /// Compares two values to see if they are equal. /// diff --git a/src/ComputeSharp.Core/Primitives/Int/Int4.cs b/src/ComputeSharp.Core/Primitives/Int/Int4.cs index 744a6c7d..d5f44c49 100644 --- a/src/ComputeSharp.Core/Primitives/Int/Int4.cs +++ b/src/ComputeSharp.Core/Primitives/Int/Int4.cs @@ -7,36 +7,6 @@ namespace ComputeSharp; /// public partial struct Int4 { - /// - /// Gets an value with all components set to 0. - /// - public static Int4 Zero => 0; - - /// - /// Gets an value with all components set to 1. - /// - public static Int4 One => 1; - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static Int4 UnitX => new(1, 0, 0, 0); - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static Int4 UnitY => new(0, 1, 0, 0); - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static Int4 UnitZ => new(0, 0, 1, 0); - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static Int4 UnitW => new(0, 0, 0, 1); - /// /// Creates a new instance with the specified parameters. /// diff --git a/src/ComputeSharp.Core/Primitives/Int/Int4.g.cs b/src/ComputeSharp.Core/Primitives/Int/Int4.g.cs index 408a4435..fbcf0214 100644 --- a/src/ComputeSharp.Core/Primitives/Int/Int4.g.cs +++ b/src/ComputeSharp.Core/Primitives/Int/Int4.g.cs @@ -43,6 +43,36 @@ public unsafe partial struct Int4 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public readonly ref int this[int i] => ref *(int*)UndefinedData; + /// + /// Gets a value with all components set to 0. + /// + public static Int4 Zero => 0; + + /// + /// Gets a value with all components set to 1. + /// + public static Int4 One => 1; + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static Int4 UnitX => new(1, 0, 0, 0); + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static Int4 UnitY => new(0, 1, 0, 0); + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static Int4 UnitZ => new(0, 0, 1, 0); + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static Int4 UnitW => new(0, 0, 0, 1); + /// /// Gets a reference to the value representing the X component. /// @@ -4245,6 +4275,106 @@ public unsafe partial struct Int4 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool4 operator <=(Int4 left, Int4 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4 operator ~(Int4 xyzw) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4 operator >>(Int4 xyzw, Int4 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4 operator >>(Int4 xyzw, UInt4 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4 operator <<(Int4 xyzw, Int4 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4 operator <<(Int4 xyzw, UInt4 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4 operator &(Int4 left, Int4 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4 operator &(Int4 left, UInt4 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4 operator |(Int4 left, Int4 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4 operator |(Int4 left, UInt4 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4 operator ^(Int4 left, Int4 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4 operator ^(Int4 left, UInt4 right) => default; + /// /// Compares two values to see if they are equal. /// diff --git a/src/ComputeSharp.Core/Primitives/Int/IntMxN.g.cs b/src/ComputeSharp.Core/Primitives/Int/IntMxN.g.cs index bb2411c6..d6bde9d3 100644 --- a/src/ComputeSharp.Core/Primitives/Int/IntMxN.g.cs +++ b/src/ComputeSharp.Core/Primitives/Int/IntMxN.g.cs @@ -170,6 +170,106 @@ public unsafe partial struct Int1x1 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool1x1 operator <=(Int1x1 left, Int1x1 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x1 operator ~(Int1x1 matrix) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x1 operator >>(Int1x1 matrix, Int1x1 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x1 operator >>(Int1x1 matrix, UInt1x1 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x1 operator <<(Int1x1 matrix, Int1x1 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x1 operator <<(Int1x1 matrix, UInt1x1 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x1 operator &(Int1x1 left, Int1x1 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x1 operator &(Int1x1 left, UInt1x1 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x1 operator |(Int1x1 left, Int1x1 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x1 operator |(Int1x1 left, UInt1x1 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x1 operator ^(Int1x1 left, Int1x1 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x1 operator ^(Int1x1 left, UInt1x1 right) => default; + /// /// Compares two values to see if they are equal. /// @@ -361,6 +461,106 @@ public unsafe partial struct Int1x2 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool1x2 operator <=(Int1x2 left, Int1x2 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x2 operator ~(Int1x2 matrix) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x2 operator >>(Int1x2 matrix, Int1x2 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x2 operator >>(Int1x2 matrix, UInt1x2 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x2 operator <<(Int1x2 matrix, Int1x2 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x2 operator <<(Int1x2 matrix, UInt1x2 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x2 operator &(Int1x2 left, Int1x2 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x2 operator &(Int1x2 left, UInt1x2 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x2 operator |(Int1x2 left, Int1x2 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x2 operator |(Int1x2 left, UInt1x2 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x2 operator ^(Int1x2 left, Int1x2 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x2 operator ^(Int1x2 left, UInt1x2 right) => default; + /// /// Compares two values to see if they are equal. /// @@ -569,6 +769,106 @@ public unsafe partial struct Int1x3 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool1x3 operator <=(Int1x3 left, Int1x3 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x3 operator ~(Int1x3 matrix) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x3 operator >>(Int1x3 matrix, Int1x3 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x3 operator >>(Int1x3 matrix, UInt1x3 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x3 operator <<(Int1x3 matrix, Int1x3 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x3 operator <<(Int1x3 matrix, UInt1x3 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x3 operator &(Int1x3 left, Int1x3 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x3 operator &(Int1x3 left, UInt1x3 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x3 operator |(Int1x3 left, Int1x3 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x3 operator |(Int1x3 left, UInt1x3 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x3 operator ^(Int1x3 left, Int1x3 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x3 operator ^(Int1x3 left, UInt1x3 right) => default; + /// /// Compares two values to see if they are equal. /// @@ -788,6 +1088,106 @@ public unsafe partial struct Int1x4 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool1x4 operator <=(Int1x4 left, Int1x4 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x4 operator ~(Int1x4 matrix) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x4 operator >>(Int1x4 matrix, Int1x4 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x4 operator >>(Int1x4 matrix, UInt1x4 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x4 operator <<(Int1x4 matrix, Int1x4 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x4 operator <<(Int1x4 matrix, UInt1x4 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x4 operator &(Int1x4 left, Int1x4 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x4 operator &(Int1x4 left, UInt1x4 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x4 operator |(Int1x4 left, Int1x4 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x4 operator |(Int1x4 left, UInt1x4 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x4 operator ^(Int1x4 left, Int1x4 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int1x4 operator ^(Int1x4 left, UInt1x4 right) => default; + /// /// Compares two values to see if they are equal. /// @@ -985,6 +1385,106 @@ public unsafe partial struct Int2x1 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool2x1 operator <=(Int2x1 left, Int2x1 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x1 operator ~(Int2x1 matrix) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x1 operator >>(Int2x1 matrix, Int2x1 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x1 operator >>(Int2x1 matrix, UInt2x1 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x1 operator <<(Int2x1 matrix, Int2x1 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x1 operator <<(Int2x1 matrix, UInt2x1 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x1 operator &(Int2x1 left, Int2x1 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x1 operator &(Int2x1 left, UInt2x1 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x1 operator |(Int2x1 left, Int2x1 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x1 operator |(Int2x1 left, UInt2x1 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x1 operator ^(Int2x1 left, Int2x1 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x1 operator ^(Int2x1 left, UInt2x1 right) => default; + /// /// Compares two values to see if they are equal. /// @@ -1217,6 +1717,106 @@ public unsafe partial struct Int2x2 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool2x2 operator <=(Int2x2 left, Int2x2 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x2 operator ~(Int2x2 matrix) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x2 operator >>(Int2x2 matrix, Int2x2 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x2 operator >>(Int2x2 matrix, UInt2x2 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x2 operator <<(Int2x2 matrix, Int2x2 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x2 operator <<(Int2x2 matrix, UInt2x2 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x2 operator &(Int2x2 left, Int2x2 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x2 operator &(Int2x2 left, UInt2x2 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x2 operator |(Int2x2 left, Int2x2 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x2 operator |(Int2x2 left, UInt2x2 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x2 operator ^(Int2x2 left, Int2x2 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x2 operator ^(Int2x2 left, UInt2x2 right) => default; + /// /// Compares two values to see if they are equal. /// @@ -1467,6 +2067,106 @@ public unsafe partial struct Int2x3 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool2x3 operator <=(Int2x3 left, Int2x3 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x3 operator ~(Int2x3 matrix) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x3 operator >>(Int2x3 matrix, Int2x3 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x3 operator >>(Int2x3 matrix, UInt2x3 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x3 operator <<(Int2x3 matrix, Int2x3 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x3 operator <<(Int2x3 matrix, UInt2x3 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x3 operator &(Int2x3 left, Int2x3 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x3 operator &(Int2x3 left, UInt2x3 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x3 operator |(Int2x3 left, Int2x3 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x3 operator |(Int2x3 left, UInt2x3 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x3 operator ^(Int2x3 left, Int2x3 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x3 operator ^(Int2x3 left, UInt2x3 right) => default; + /// /// Compares two values to see if they are equal. /// @@ -1741,6 +2441,106 @@ public unsafe partial struct Int2x4 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool2x4 operator <=(Int2x4 left, Int2x4 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x4 operator ~(Int2x4 matrix) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x4 operator >>(Int2x4 matrix, Int2x4 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x4 operator >>(Int2x4 matrix, UInt2x4 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x4 operator <<(Int2x4 matrix, Int2x4 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x4 operator <<(Int2x4 matrix, UInt2x4 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x4 operator &(Int2x4 left, Int2x4 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x4 operator &(Int2x4 left, UInt2x4 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x4 operator |(Int2x4 left, Int2x4 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x4 operator |(Int2x4 left, UInt2x4 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x4 operator ^(Int2x4 left, Int2x4 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int2x4 operator ^(Int2x4 left, UInt2x4 right) => default; + /// /// Compares two values to see if they are equal. /// @@ -1943,6 +2743,106 @@ public unsafe partial struct Int3x1 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool3x1 operator <=(Int3x1 left, Int3x1 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x1 operator ~(Int3x1 matrix) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x1 operator >>(Int3x1 matrix, Int3x1 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x1 operator >>(Int3x1 matrix, UInt3x1 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x1 operator <<(Int3x1 matrix, Int3x1 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x1 operator <<(Int3x1 matrix, UInt3x1 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x1 operator &(Int3x1 left, Int3x1 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x1 operator &(Int3x1 left, UInt3x1 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x1 operator |(Int3x1 left, Int3x1 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x1 operator |(Int3x1 left, UInt3x1 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x1 operator ^(Int3x1 left, Int3x1 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x1 operator ^(Int3x1 left, UInt3x1 right) => default; + /// /// Compares two values to see if they are equal. /// @@ -2200,6 +3100,106 @@ public unsafe partial struct Int3x2 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool3x2 operator <=(Int3x2 left, Int3x2 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x2 operator ~(Int3x2 matrix) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x2 operator >>(Int3x2 matrix, Int3x2 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x2 operator >>(Int3x2 matrix, UInt3x2 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x2 operator <<(Int3x2 matrix, Int3x2 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x2 operator <<(Int3x2 matrix, UInt3x2 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x2 operator &(Int3x2 left, Int3x2 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x2 operator &(Int3x2 left, UInt3x2 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x2 operator |(Int3x2 left, Int3x2 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x2 operator |(Int3x2 left, UInt3x2 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x2 operator ^(Int3x2 left, Int3x2 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x2 operator ^(Int3x2 left, UInt3x2 right) => default; + /// /// Compares two values to see if they are equal. /// @@ -2487,6 +3487,106 @@ public unsafe partial struct Int3x3 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool3x3 operator <=(Int3x3 left, Int3x3 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x3 operator ~(Int3x3 matrix) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x3 operator >>(Int3x3 matrix, Int3x3 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x3 operator >>(Int3x3 matrix, UInt3x3 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x3 operator <<(Int3x3 matrix, Int3x3 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x3 operator <<(Int3x3 matrix, UInt3x3 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x3 operator &(Int3x3 left, Int3x3 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x3 operator &(Int3x3 left, UInt3x3 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x3 operator |(Int3x3 left, Int3x3 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x3 operator |(Int3x3 left, UInt3x3 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x3 operator ^(Int3x3 left, Int3x3 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x3 operator ^(Int3x3 left, UInt3x3 right) => default; + /// /// Compares two values to see if they are equal. /// @@ -2810,6 +3910,106 @@ public unsafe partial struct Int3x4 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool3x4 operator <=(Int3x4 left, Int3x4 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x4 operator ~(Int3x4 matrix) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x4 operator >>(Int3x4 matrix, Int3x4 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x4 operator >>(Int3x4 matrix, UInt3x4 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x4 operator <<(Int3x4 matrix, Int3x4 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x4 operator <<(Int3x4 matrix, UInt3x4 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x4 operator &(Int3x4 left, Int3x4 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x4 operator &(Int3x4 left, UInt3x4 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x4 operator |(Int3x4 left, Int3x4 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x4 operator |(Int3x4 left, UInt3x4 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x4 operator ^(Int3x4 left, Int3x4 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int3x4 operator ^(Int3x4 left, UInt3x4 right) => default; + /// /// Compares two values to see if they are equal. /// @@ -3023,6 +4223,106 @@ public unsafe partial struct Int4x1 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool4x1 operator <=(Int4x1 left, Int4x1 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x1 operator ~(Int4x1 matrix) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x1 operator >>(Int4x1 matrix, Int4x1 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x1 operator >>(Int4x1 matrix, UInt4x1 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x1 operator <<(Int4x1 matrix, Int4x1 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x1 operator <<(Int4x1 matrix, UInt4x1 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x1 operator &(Int4x1 left, Int4x1 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x1 operator &(Int4x1 left, UInt4x1 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x1 operator |(Int4x1 left, Int4x1 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x1 operator |(Int4x1 left, UInt4x1 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x1 operator ^(Int4x1 left, Int4x1 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x1 operator ^(Int4x1 left, UInt4x1 right) => default; + /// /// Compares two values to see if they are equal. /// @@ -3305,6 +4605,106 @@ public unsafe partial struct Int4x2 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool4x2 operator <=(Int4x2 left, Int4x2 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x2 operator ~(Int4x2 matrix) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x2 operator >>(Int4x2 matrix, Int4x2 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x2 operator >>(Int4x2 matrix, UInt4x2 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x2 operator <<(Int4x2 matrix, Int4x2 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x2 operator <<(Int4x2 matrix, UInt4x2 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x2 operator &(Int4x2 left, Int4x2 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x2 operator &(Int4x2 left, UInt4x2 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x2 operator |(Int4x2 left, Int4x2 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x2 operator |(Int4x2 left, UInt4x2 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x2 operator ^(Int4x2 left, Int4x2 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x2 operator ^(Int4x2 left, UInt4x2 right) => default; + /// /// Compares two values to see if they are equal. /// @@ -3629,6 +5029,106 @@ public unsafe partial struct Int4x3 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool4x3 operator <=(Int4x3 left, Int4x3 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x3 operator ~(Int4x3 matrix) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x3 operator >>(Int4x3 matrix, Int4x3 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x3 operator >>(Int4x3 matrix, UInt4x3 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x3 operator <<(Int4x3 matrix, Int4x3 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x3 operator <<(Int4x3 matrix, UInt4x3 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x3 operator &(Int4x3 left, Int4x3 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x3 operator &(Int4x3 left, UInt4x3 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x3 operator |(Int4x3 left, Int4x3 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x3 operator |(Int4x3 left, UInt4x3 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x3 operator ^(Int4x3 left, Int4x3 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x3 operator ^(Int4x3 left, UInt4x3 right) => default; + /// /// Compares two values to see if they are equal. /// @@ -4001,6 +5501,106 @@ public unsafe partial struct Int4x4 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool4x4 operator <=(Int4x4 left, Int4x4 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x4 operator ~(Int4x4 matrix) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x4 operator >>(Int4x4 matrix, Int4x4 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x4 operator >>(Int4x4 matrix, UInt4x4 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x4 operator <<(Int4x4 matrix, Int4x4 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x4 operator <<(Int4x4 matrix, UInt4x4 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x4 operator &(Int4x4 left, Int4x4 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x4 operator &(Int4x4 left, UInt4x4 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x4 operator |(Int4x4 left, Int4x4 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x4 operator |(Int4x4 left, UInt4x4 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x4 operator ^(Int4x4 left, Int4x4 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static Int4x4 operator ^(Int4x4 left, UInt4x4 right) => default; + /// /// Compares two values to see if they are equal. /// diff --git a/src/ComputeSharp.Core/Primitives/MatrixType.ttinclude b/src/ComputeSharp.Core/Primitives/MatrixType.ttinclude index 074a3c70..552b6a55 100644 --- a/src/ComputeSharp.Core/Primitives/MatrixType.ttinclude +++ b/src/ComputeSharp.Core/Primitives/MatrixType.ttinclude @@ -301,6 +301,113 @@ public unsafe partial struct <#=fullTypeName#> <# } + // Generate the bitwise operators + if (typeName == "Int" || typeName == "UInt") + { + WriteLine(""); +#> + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static <#=fullTypeName#> operator ~(<#=fullTypeName#> matrix) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static <#=fullTypeName#> operator >>(<#=fullTypeName#> matrix, Int<#=rows#>x<#=columns#> amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static <#=fullTypeName#> operator >>(<#=fullTypeName#> matrix, UInt<#=rows#>x<#=columns#> amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static <#=fullTypeName#> operator <<(<#=fullTypeName#> matrix, Int<#=rows#>x<#=columns#> amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static <#=fullTypeName#> operator <<(<#=fullTypeName#> matrix, UInt<#=rows#>x<#=columns#> amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static <#=fullTypeName#> operator &(<#=fullTypeName#> left, Int<#=rows#>x<#=columns#> right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static <#=fullTypeName#> operator &(<#=fullTypeName#> left, UInt<#=rows#>x<#=columns#> right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static <#=fullTypeName#> operator |(<#=fullTypeName#> left, Int<#=rows#>x<#=columns#> right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static <#=fullTypeName#> operator |(<#=fullTypeName#> left, UInt<#=rows#>x<#=columns#> right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static <#=fullTypeName#> operator ^(<#=fullTypeName#> left, Int<#=rows#>x<#=columns#> right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static <#=fullTypeName#> operator ^(<#=fullTypeName#> left, UInt<#=rows#>x<#=columns#> right) => default; +<# + } + WriteLine(""); #> /// diff --git a/src/ComputeSharp.Core/Primitives/UInt/UInt2.cs b/src/ComputeSharp.Core/Primitives/UInt/UInt2.cs index 2cf71c34..782624e7 100644 --- a/src/ComputeSharp.Core/Primitives/UInt/UInt2.cs +++ b/src/ComputeSharp.Core/Primitives/UInt/UInt2.cs @@ -7,26 +7,6 @@ namespace ComputeSharp; /// public partial struct UInt2 { - /// - /// Gets an value with all components set to 0. - /// - public static UInt2 Zero => 0; - - /// - /// Gets an value with all components set to 1. - /// - public static UInt2 One => 1; - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static UInt2 UnitX => new(1, 0); - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static UInt2 UnitY => new(0, 1); - /// /// Creates a new instance with the specified parameters. /// diff --git a/src/ComputeSharp.Core/Primitives/UInt/UInt2.g.cs b/src/ComputeSharp.Core/Primitives/UInt/UInt2.g.cs index 454e74f3..7fdeb3ec 100644 --- a/src/ComputeSharp.Core/Primitives/UInt/UInt2.g.cs +++ b/src/ComputeSharp.Core/Primitives/UInt/UInt2.g.cs @@ -37,6 +37,26 @@ public unsafe partial struct UInt2 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public readonly ref uint this[int i] => ref *(uint*)UndefinedData; + /// + /// Gets a value with all components set to 0. + /// + public static UInt2 Zero => 0; + + /// + /// Gets a value with all components set to 1. + /// + public static UInt2 One => 1; + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static UInt2 UnitX => new(1, 0); + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static UInt2 UnitY => new(0, 1); + /// /// Gets a reference to the value representing the X component. /// @@ -515,6 +535,106 @@ public unsafe partial struct UInt2 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool2 operator <=(UInt2 left, UInt2 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2 operator ~(UInt2 xy) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2 operator >>(UInt2 xy, Int2 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2 operator >>(UInt2 xy, UInt2 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2 operator <<(UInt2 xy, Int2 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2 operator <<(UInt2 xy, UInt2 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2 operator &(UInt2 left, Int2 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2 operator &(UInt2 left, UInt2 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2 operator |(UInt2 left, Int2 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2 operator |(UInt2 left, UInt2 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2 operator ^(UInt2 left, Int2 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2 operator ^(UInt2 left, UInt2 right) => default; + /// /// Compares two values to see if they are equal. /// diff --git a/src/ComputeSharp.Core/Primitives/UInt/UInt3.cs b/src/ComputeSharp.Core/Primitives/UInt/UInt3.cs index 806a92ad..88fab923 100644 --- a/src/ComputeSharp.Core/Primitives/UInt/UInt3.cs +++ b/src/ComputeSharp.Core/Primitives/UInt/UInt3.cs @@ -7,31 +7,6 @@ namespace ComputeSharp; /// public partial struct UInt3 { - /// - /// Gets an value with all components set to 0. - /// - public static UInt3 Zero => 0; - - /// - /// Gets an value with all components set to 1. - /// - public static UInt3 One => 1; - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static UInt3 UnitX => new(1, 0, 0); - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static UInt3 UnitY => new(0, 1, 0); - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static UInt3 UnitZ => new(0, 0, 1); - /// /// Creates a new instance with the specified parameters. /// diff --git a/src/ComputeSharp.Core/Primitives/UInt/UInt3.g.cs b/src/ComputeSharp.Core/Primitives/UInt/UInt3.g.cs index d7e02e90..8afabad5 100644 --- a/src/ComputeSharp.Core/Primitives/UInt/UInt3.g.cs +++ b/src/ComputeSharp.Core/Primitives/UInt/UInt3.g.cs @@ -40,6 +40,31 @@ public unsafe partial struct UInt3 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public readonly ref uint this[int i] => ref *(uint*)UndefinedData; + /// + /// Gets a value with all components set to 0. + /// + public static UInt3 Zero => 0; + + /// + /// Gets a value with all components set to 1. + /// + public static UInt3 One => 1; + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static UInt3 UnitX => new(1, 0, 0); + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static UInt3 UnitY => new(0, 1, 0); + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static UInt3 UnitZ => new(0, 0, 1); + /// /// Gets a reference to the value representing the X component. /// @@ -1596,6 +1621,106 @@ public unsafe partial struct UInt3 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool3 operator <=(UInt3 left, UInt3 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3 operator ~(UInt3 xyz) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3 operator >>(UInt3 xyz, Int3 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3 operator >>(UInt3 xyz, UInt3 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3 operator <<(UInt3 xyz, Int3 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3 operator <<(UInt3 xyz, UInt3 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3 operator &(UInt3 left, Int3 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3 operator &(UInt3 left, UInt3 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3 operator |(UInt3 left, Int3 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3 operator |(UInt3 left, UInt3 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3 operator ^(UInt3 left, Int3 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3 operator ^(UInt3 left, UInt3 right) => default; + /// /// Compares two values to see if they are equal. /// diff --git a/src/ComputeSharp.Core/Primitives/UInt/UInt4.cs b/src/ComputeSharp.Core/Primitives/UInt/UInt4.cs index 2327cca4..3be7d78d 100644 --- a/src/ComputeSharp.Core/Primitives/UInt/UInt4.cs +++ b/src/ComputeSharp.Core/Primitives/UInt/UInt4.cs @@ -7,36 +7,6 @@ namespace ComputeSharp; /// public partial struct UInt4 { - /// - /// Gets an value with all components set to 0. - /// - public static UInt4 Zero => 0; - - /// - /// Gets an value with all components set to 1. - /// - public static UInt4 One => 1; - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static UInt4 UnitX => new(1, 0, 0, 0); - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static UInt4 UnitY => new(0, 1, 0, 0); - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static UInt4 UnitZ => new(0, 0, 1, 0); - - /// - /// Gets an value with the component set to 1, and the others to 0. - /// - public static UInt4 UnitW => new(0, 0, 0, 1); - /// /// Creates a new instance with the specified parameters. /// diff --git a/src/ComputeSharp.Core/Primitives/UInt/UInt4.g.cs b/src/ComputeSharp.Core/Primitives/UInt/UInt4.g.cs index d7475dda..83db512a 100644 --- a/src/ComputeSharp.Core/Primitives/UInt/UInt4.g.cs +++ b/src/ComputeSharp.Core/Primitives/UInt/UInt4.g.cs @@ -43,6 +43,36 @@ public unsafe partial struct UInt4 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public readonly ref uint this[int i] => ref *(uint*)UndefinedData; + /// + /// Gets a value with all components set to 0. + /// + public static UInt4 Zero => 0; + + /// + /// Gets a value with all components set to 1. + /// + public static UInt4 One => 1; + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static UInt4 UnitX => new(1, 0, 0, 0); + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static UInt4 UnitY => new(0, 1, 0, 0); + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static UInt4 UnitZ => new(0, 0, 1, 0); + + /// + /// Gets a value with the component set to 1, and the others to 0. + /// + public static UInt4 UnitW => new(0, 0, 0, 1); + /// /// Gets a reference to the value representing the X component. /// @@ -4237,6 +4267,106 @@ public unsafe partial struct UInt4 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool4 operator <=(UInt4 left, UInt4 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4 operator ~(UInt4 xyzw) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4 operator >>(UInt4 xyzw, Int4 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4 operator >>(UInt4 xyzw, UInt4 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4 operator <<(UInt4 xyzw, Int4 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4 operator <<(UInt4 xyzw, UInt4 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4 operator &(UInt4 left, Int4 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4 operator &(UInt4 left, UInt4 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4 operator |(UInt4 left, Int4 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4 operator |(UInt4 left, UInt4 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4 operator ^(UInt4 left, Int4 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4 operator ^(UInt4 left, UInt4 right) => default; + /// /// Compares two values to see if they are equal. /// diff --git a/src/ComputeSharp.Core/Primitives/UInt/UIntMxN.g.cs b/src/ComputeSharp.Core/Primitives/UInt/UIntMxN.g.cs index 4527f17f..4a5fefa6 100644 --- a/src/ComputeSharp.Core/Primitives/UInt/UIntMxN.g.cs +++ b/src/ComputeSharp.Core/Primitives/UInt/UIntMxN.g.cs @@ -163,6 +163,106 @@ public unsafe partial struct UInt1x1 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool1x1 operator <=(UInt1x1 left, UInt1x1 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x1 operator ~(UInt1x1 matrix) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x1 operator >>(UInt1x1 matrix, Int1x1 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x1 operator >>(UInt1x1 matrix, UInt1x1 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x1 operator <<(UInt1x1 matrix, Int1x1 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x1 operator <<(UInt1x1 matrix, UInt1x1 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x1 operator &(UInt1x1 left, Int1x1 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x1 operator &(UInt1x1 left, UInt1x1 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x1 operator |(UInt1x1 left, Int1x1 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x1 operator |(UInt1x1 left, UInt1x1 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x1 operator ^(UInt1x1 left, Int1x1 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x1 operator ^(UInt1x1 left, UInt1x1 right) => default; + /// /// Compares two values to see if they are equal. /// @@ -347,6 +447,106 @@ public unsafe partial struct UInt1x2 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool1x2 operator <=(UInt1x2 left, UInt1x2 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x2 operator ~(UInt1x2 matrix) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x2 operator >>(UInt1x2 matrix, Int1x2 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x2 operator >>(UInt1x2 matrix, UInt1x2 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x2 operator <<(UInt1x2 matrix, Int1x2 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x2 operator <<(UInt1x2 matrix, UInt1x2 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x2 operator &(UInt1x2 left, Int1x2 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x2 operator &(UInt1x2 left, UInt1x2 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x2 operator |(UInt1x2 left, Int1x2 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x2 operator |(UInt1x2 left, UInt1x2 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x2 operator ^(UInt1x2 left, Int1x2 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x2 operator ^(UInt1x2 left, UInt1x2 right) => default; + /// /// Compares two values to see if they are equal. /// @@ -548,6 +748,106 @@ public unsafe partial struct UInt1x3 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool1x3 operator <=(UInt1x3 left, UInt1x3 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x3 operator ~(UInt1x3 matrix) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x3 operator >>(UInt1x3 matrix, Int1x3 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x3 operator >>(UInt1x3 matrix, UInt1x3 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x3 operator <<(UInt1x3 matrix, Int1x3 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x3 operator <<(UInt1x3 matrix, UInt1x3 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x3 operator &(UInt1x3 left, Int1x3 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x3 operator &(UInt1x3 left, UInt1x3 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x3 operator |(UInt1x3 left, Int1x3 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x3 operator |(UInt1x3 left, UInt1x3 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x3 operator ^(UInt1x3 left, Int1x3 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x3 operator ^(UInt1x3 left, UInt1x3 right) => default; + /// /// Compares two values to see if they are equal. /// @@ -760,6 +1060,106 @@ public unsafe partial struct UInt1x4 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool1x4 operator <=(UInt1x4 left, UInt1x4 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x4 operator ~(UInt1x4 matrix) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x4 operator >>(UInt1x4 matrix, Int1x4 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x4 operator >>(UInt1x4 matrix, UInt1x4 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x4 operator <<(UInt1x4 matrix, Int1x4 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x4 operator <<(UInt1x4 matrix, UInt1x4 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x4 operator &(UInt1x4 left, Int1x4 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x4 operator &(UInt1x4 left, UInt1x4 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x4 operator |(UInt1x4 left, Int1x4 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x4 operator |(UInt1x4 left, UInt1x4 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x4 operator ^(UInt1x4 left, Int1x4 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt1x4 operator ^(UInt1x4 left, UInt1x4 right) => default; + /// /// Compares two values to see if they are equal. /// @@ -950,6 +1350,106 @@ public unsafe partial struct UInt2x1 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool2x1 operator <=(UInt2x1 left, UInt2x1 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x1 operator ~(UInt2x1 matrix) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x1 operator >>(UInt2x1 matrix, Int2x1 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x1 operator >>(UInt2x1 matrix, UInt2x1 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x1 operator <<(UInt2x1 matrix, Int2x1 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x1 operator <<(UInt2x1 matrix, UInt2x1 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x1 operator &(UInt2x1 left, Int2x1 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x1 operator &(UInt2x1 left, UInt2x1 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x1 operator |(UInt2x1 left, Int2x1 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x1 operator |(UInt2x1 left, UInt2x1 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x1 operator ^(UInt2x1 left, Int2x1 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x1 operator ^(UInt2x1 left, UInt2x1 right) => default; + /// /// Compares two values to see if they are equal. /// @@ -1175,6 +1675,106 @@ public unsafe partial struct UInt2x2 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool2x2 operator <=(UInt2x2 left, UInt2x2 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x2 operator ~(UInt2x2 matrix) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x2 operator >>(UInt2x2 matrix, Int2x2 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x2 operator >>(UInt2x2 matrix, UInt2x2 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x2 operator <<(UInt2x2 matrix, Int2x2 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x2 operator <<(UInt2x2 matrix, UInt2x2 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x2 operator &(UInt2x2 left, Int2x2 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x2 operator &(UInt2x2 left, UInt2x2 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x2 operator |(UInt2x2 left, Int2x2 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x2 operator |(UInt2x2 left, UInt2x2 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x2 operator ^(UInt2x2 left, Int2x2 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x2 operator ^(UInt2x2 left, UInt2x2 right) => default; + /// /// Compares two values to see if they are equal. /// @@ -1418,6 +2018,106 @@ public unsafe partial struct UInt2x3 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool2x3 operator <=(UInt2x3 left, UInt2x3 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x3 operator ~(UInt2x3 matrix) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x3 operator >>(UInt2x3 matrix, Int2x3 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x3 operator >>(UInt2x3 matrix, UInt2x3 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x3 operator <<(UInt2x3 matrix, Int2x3 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x3 operator <<(UInt2x3 matrix, UInt2x3 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x3 operator &(UInt2x3 left, Int2x3 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x3 operator &(UInt2x3 left, UInt2x3 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x3 operator |(UInt2x3 left, Int2x3 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x3 operator |(UInt2x3 left, UInt2x3 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x3 operator ^(UInt2x3 left, Int2x3 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x3 operator ^(UInt2x3 left, UInt2x3 right) => default; + /// /// Compares two values to see if they are equal. /// @@ -1685,6 +2385,106 @@ public unsafe partial struct UInt2x4 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool2x4 operator <=(UInt2x4 left, UInt2x4 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x4 operator ~(UInt2x4 matrix) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x4 operator >>(UInt2x4 matrix, Int2x4 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x4 operator >>(UInt2x4 matrix, UInt2x4 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x4 operator <<(UInt2x4 matrix, Int2x4 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x4 operator <<(UInt2x4 matrix, UInt2x4 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x4 operator &(UInt2x4 left, Int2x4 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x4 operator &(UInt2x4 left, UInt2x4 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x4 operator |(UInt2x4 left, Int2x4 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x4 operator |(UInt2x4 left, UInt2x4 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x4 operator ^(UInt2x4 left, Int2x4 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt2x4 operator ^(UInt2x4 left, UInt2x4 right) => default; + /// /// Compares two values to see if they are equal. /// @@ -1880,6 +2680,106 @@ public unsafe partial struct UInt3x1 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool3x1 operator <=(UInt3x1 left, UInt3x1 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x1 operator ~(UInt3x1 matrix) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x1 operator >>(UInt3x1 matrix, Int3x1 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x1 operator >>(UInt3x1 matrix, UInt3x1 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x1 operator <<(UInt3x1 matrix, Int3x1 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x1 operator <<(UInt3x1 matrix, UInt3x1 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x1 operator &(UInt3x1 left, Int3x1 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x1 operator &(UInt3x1 left, UInt3x1 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x1 operator |(UInt3x1 left, Int3x1 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x1 operator |(UInt3x1 left, UInt3x1 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x1 operator ^(UInt3x1 left, Int3x1 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x1 operator ^(UInt3x1 left, UInt3x1 right) => default; + /// /// Compares two values to see if they are equal. /// @@ -2130,6 +3030,106 @@ public unsafe partial struct UInt3x2 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool3x2 operator <=(UInt3x2 left, UInt3x2 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x2 operator ~(UInt3x2 matrix) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x2 operator >>(UInt3x2 matrix, Int3x2 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x2 operator >>(UInt3x2 matrix, UInt3x2 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x2 operator <<(UInt3x2 matrix, Int3x2 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x2 operator <<(UInt3x2 matrix, UInt3x2 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x2 operator &(UInt3x2 left, Int3x2 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x2 operator &(UInt3x2 left, UInt3x2 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x2 operator |(UInt3x2 left, Int3x2 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x2 operator |(UInt3x2 left, UInt3x2 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x2 operator ^(UInt3x2 left, Int3x2 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x2 operator ^(UInt3x2 left, UInt3x2 right) => default; + /// /// Compares two values to see if they are equal. /// @@ -2410,6 +3410,106 @@ public unsafe partial struct UInt3x3 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool3x3 operator <=(UInt3x3 left, UInt3x3 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x3 operator ~(UInt3x3 matrix) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x3 operator >>(UInt3x3 matrix, Int3x3 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x3 operator >>(UInt3x3 matrix, UInt3x3 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x3 operator <<(UInt3x3 matrix, Int3x3 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x3 operator <<(UInt3x3 matrix, UInt3x3 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x3 operator &(UInt3x3 left, Int3x3 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x3 operator &(UInt3x3 left, UInt3x3 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x3 operator |(UInt3x3 left, Int3x3 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x3 operator |(UInt3x3 left, UInt3x3 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x3 operator ^(UInt3x3 left, Int3x3 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x3 operator ^(UInt3x3 left, UInt3x3 right) => default; + /// /// Compares two values to see if they are equal. /// @@ -2726,6 +3826,106 @@ public unsafe partial struct UInt3x4 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool3x4 operator <=(UInt3x4 left, UInt3x4 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x4 operator ~(UInt3x4 matrix) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x4 operator >>(UInt3x4 matrix, Int3x4 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x4 operator >>(UInt3x4 matrix, UInt3x4 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x4 operator <<(UInt3x4 matrix, Int3x4 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x4 operator <<(UInt3x4 matrix, UInt3x4 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x4 operator &(UInt3x4 left, Int3x4 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x4 operator &(UInt3x4 left, UInt3x4 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x4 operator |(UInt3x4 left, Int3x4 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x4 operator |(UInt3x4 left, UInt3x4 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x4 operator ^(UInt3x4 left, Int3x4 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt3x4 operator ^(UInt3x4 left, UInt3x4 right) => default; + /// /// Compares two values to see if they are equal. /// @@ -2932,6 +4132,106 @@ public unsafe partial struct UInt4x1 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool4x1 operator <=(UInt4x1 left, UInt4x1 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x1 operator ~(UInt4x1 matrix) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x1 operator >>(UInt4x1 matrix, Int4x1 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x1 operator >>(UInt4x1 matrix, UInt4x1 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x1 operator <<(UInt4x1 matrix, Int4x1 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x1 operator <<(UInt4x1 matrix, UInt4x1 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x1 operator &(UInt4x1 left, Int4x1 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x1 operator &(UInt4x1 left, UInt4x1 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x1 operator |(UInt4x1 left, Int4x1 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x1 operator |(UInt4x1 left, UInt4x1 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x1 operator ^(UInt4x1 left, Int4x1 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x1 operator ^(UInt4x1 left, UInt4x1 right) => default; + /// /// Compares two values to see if they are equal. /// @@ -3207,6 +4507,106 @@ public unsafe partial struct UInt4x2 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool4x2 operator <=(UInt4x2 left, UInt4x2 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x2 operator ~(UInt4x2 matrix) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x2 operator >>(UInt4x2 matrix, Int4x2 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x2 operator >>(UInt4x2 matrix, UInt4x2 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x2 operator <<(UInt4x2 matrix, Int4x2 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x2 operator <<(UInt4x2 matrix, UInt4x2 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x2 operator &(UInt4x2 left, Int4x2 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x2 operator &(UInt4x2 left, UInt4x2 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x2 operator |(UInt4x2 left, Int4x2 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x2 operator |(UInt4x2 left, UInt4x2 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x2 operator ^(UInt4x2 left, Int4x2 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x2 operator ^(UInt4x2 left, UInt4x2 right) => default; + /// /// Compares two values to see if they are equal. /// @@ -3524,6 +4924,106 @@ public unsafe partial struct UInt4x3 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool4x3 operator <=(UInt4x3 left, UInt4x3 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x3 operator ~(UInt4x3 matrix) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x3 operator >>(UInt4x3 matrix, Int4x3 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x3 operator >>(UInt4x3 matrix, UInt4x3 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x3 operator <<(UInt4x3 matrix, Int4x3 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x3 operator <<(UInt4x3 matrix, UInt4x3 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x3 operator &(UInt4x3 left, Int4x3 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x3 operator &(UInt4x3 left, UInt4x3 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x3 operator |(UInt4x3 left, Int4x3 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x3 operator |(UInt4x3 left, UInt4x3 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x3 operator ^(UInt4x3 left, Int4x3 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x3 operator ^(UInt4x3 left, UInt4x3 right) => default; + /// /// Compares two values to see if they are equal. /// @@ -3889,6 +5389,106 @@ public unsafe partial struct UInt4x4 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Bool4x4 operator <=(UInt4x4 left, UInt4x4 right) => default; + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x4 operator ~(UInt4x4 matrix) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x4 operator >>(UInt4x4 matrix, Int4x4 amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x4 operator >>(UInt4x4 matrix, UInt4x4 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x4 operator <<(UInt4x4 matrix, Int4x4 amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x4 operator <<(UInt4x4 matrix, UInt4x4 amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x4 operator &(UInt4x4 left, Int4x4 right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x4 operator &(UInt4x4 left, UInt4x4 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x4 operator |(UInt4x4 left, Int4x4 right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x4 operator |(UInt4x4 left, UInt4x4 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x4 operator ^(UInt4x4 left, Int4x4 right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static UInt4x4 operator ^(UInt4x4 left, UInt4x4 right) => default; + /// /// Compares two values to see if they are equal. /// diff --git a/src/ComputeSharp.Core/Primitives/VectorType.ttinclude b/src/ComputeSharp.Core/Primitives/VectorType.ttinclude index a0876551..e2258729 100644 --- a/src/ComputeSharp.Core/Primitives/VectorType.ttinclude +++ b/src/ComputeSharp.Core/Primitives/VectorType.ttinclude @@ -108,7 +108,72 @@ public unsafe partial struct <#=typeName#> /// The index of the component to access. /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public readonly ref <#=hlslElementTypeName#> this[int i] => ref *(<#=hlslElementTypeName#>*)UndefinedData; + <# + // Generate the true/false and zero/one properties + if (elementTypeName == "Bool") + { +#> + /// + /// Gets a value with all components set to . + /// + public static <#=typeName#> False => false; + + /// + /// Gets a value with all components set to . + /// + public static <#=typeName#> True => true; +<# + } + else + { +#> + /// + /// Gets a value with all components set to 0. + /// + public static <#=typeName#> Zero => 0; + + /// + /// Gets a value with all components set to 1. + /// + public static <#=typeName#> One => 1; +<# + } + + string unitName, unitOne, unitZero, unitOneXmlName, unitZeroXmlName; + + if (elementTypeName == "Bool") + { + unitName = "True"; + unitOne = "true"; + unitZero = "false"; + unitOneXmlName = ""; + unitZeroXmlName = ""; + } + else + { + unitName = "Unit"; + unitOne = "1"; + unitZero = "0"; + unitOneXmlName = "1"; + unitZeroXmlName = "0"; + } + + // Generate the True and Unit properties + for (int j = 0; j < i; j++) + { + string unitComponentName = ("XYZW"[j]).ToString(); + string[] unitArguments = Enumerable.Range(0, i).Select(x => x == j ? unitOne : unitZero).ToArray(); + string unitArgumentExpression = string.Join(", ", unitArguments); +#> + + /// + /// Gets a value with the component set to <#=unitOneXmlName#>, and the others to <#=unitZeroXmlName#>. + /// + public static <#=typeName#> <#=unitName#><#=unitComponentName#> => new(<#=unitArgumentExpression#>); +<# + } + PushIndent(" "); // Generate the combinatorial swizzling properties @@ -161,7 +226,6 @@ public unsafe partial struct <#=typeName#> #if !SOURCE_GENERATOR <# - if (elementTypeName == "Bool") { #> @@ -222,7 +286,6 @@ public unsafe partial struct <#=typeName#> #endif <# - // Generate the negation operator if (elementTypeName != "UInt") { @@ -329,6 +392,115 @@ public unsafe partial struct <#=typeName#> <# } + // Generate the bitwise operators + if (elementTypeName == "Int" || elementTypeName == "UInt") + { + string argumentName = "xyzw".Substring(0, i); + + WriteLine(""); +#> + /// + /// Bitwise negates a value. + /// + /// The value to bitwise negate. + /// The bitwise negated value of . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static <#=typeName#> operator ~(<#=typeName#> <#=argumentName#>) => default; + +#if NEEDS_CSHARP_11 + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static <#=typeName#> operator >>(<#=typeName#> <#=argumentName#>, Int<#=i#> amount) => default; + + /// + /// Shifts right a value. + /// + /// The value to shift right. + /// The amount to shift each element right by. + /// The result of shifting right by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static <#=typeName#> operator >>(<#=typeName#> <#=argumentName#>, UInt<#=i#> amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static <#=typeName#> operator <<(<#=typeName#> <#=argumentName#>, Int<#=i#> amount) => default; + + /// + /// Shifts left a value. + /// + /// The value to shift left. + /// The amount to shift each element left by. + /// The result of shifting left by . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static <#=typeName#> operator <<(<#=typeName#> <#=argumentName#>, UInt<#=i#> amount) => default; +#endif + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static <#=typeName#> operator &(<#=typeName#> left, Int<#=i#> right) => default; + + /// + /// Bitwise ands a value. + /// + /// The value to bitwise and. + /// The value to combine. + /// The result of performing the bitwise and between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static <#=typeName#> operator &(<#=typeName#> left, UInt<#=i#> right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static <#=typeName#> operator |(<#=typeName#> left, Int<#=i#> right) => default; + + /// + /// Bitwise ors a value. + /// + /// The value to bitwise or. + /// The value to combine. + /// The result of performing the bitwise or between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static <#=typeName#> operator |(<#=typeName#> left, UInt<#=i#> right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static <#=typeName#> operator ^(<#=typeName#> left, Int<#=i#> right) => default; + + /// + /// Bitwise xors a value. + /// + /// The value to bitwise xor. + /// The value to combine. + /// The result of performing the bitwise xor between and . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + public static <#=typeName#> operator ^(<#=typeName#> left, UInt<#=i#> right) => default; +<# + } + WriteLine(""); #> /// diff --git a/tests/ComputeSharp.Tests/ShaderRewriterTests.cs b/tests/ComputeSharp.Tests/ShaderRewriterTests.cs index ff9876a1..80dac267 100644 --- a/tests/ComputeSharp.Tests/ShaderRewriterTests.cs +++ b/tests/ComputeSharp.Tests/ShaderRewriterTests.cs @@ -130,6 +130,67 @@ public partial class ShaderRewriterTests } } + // See: https://github.com/Sergio0694/ComputeSharp/issues/361 + [CombinatorialTestMethod] + [AllDevices] + public void BitwiseHlslOperators(Device device) + { + int[] data = { 186456131, 215486738, unchecked((int)416439712738), unchecked((int)1437124371243), 0, 0, 0, 0 }; + + using ReadWriteBuffer buffer = device.Get().AllocateReadWriteBuffer(data); + + device.Get().For(1, new BitwiseOperatorsShader(buffer)); + + int[] results = buffer.ToArray(); + + int2 a = new(data[0], data[1]); + uint2 b = new((uint)data[2], (uint)data[3]); + + int2 c = new(~a.X, ~a.Y); + int2 d = new(a.X & (int)b.X, a.Y & (int)b.Y); + int2 e = new(a.X | (int)b.X, a.Y | (int)b.Y); + int2 f = new(a.X ^ (int)b.X, a.Y ^ (int)b.Y); + + Assert.AreEqual(results[0], c.X); + Assert.AreEqual(results[1], c.Y); + Assert.AreEqual(results[2], d.X); + Assert.AreEqual(results[3], d.Y); + Assert.AreEqual(results[4], e.X); + Assert.AreEqual(results[5], e.Y); + Assert.AreEqual(results[6], f.X); + Assert.AreEqual(results[7], f.Y); + } + + [AutoConstructor] + internal readonly partial struct BitwiseOperatorsShader : IComputeShader + { + public readonly ReadWriteBuffer buffer; + + public void Execute() + { + int2 a = new(buffer[0], buffer[1]); + uint2 b = new((uint)buffer[2], (uint)buffer[3]); + + int2 c = ~a; + int2 d = a & b; + int2 e = a | b; + int2 f = a ^ b; + +#if NEEDS_CSHARP_11 + // TODO: add bit shifting tests +#endif + + buffer[0] = c.X; + buffer[1] = c.Y; + buffer[2] = d.X; + buffer[3] = d.Y; + buffer[4] = e.X; + buffer[5] = e.Y; + buffer[6] = f.X; + buffer[7] = f.Y; + } + } + // See: https://github.com/Sergio0694/ComputeSharp/issues/259 [CombinatorialTestMethod] [AllDevices]