diff --git a/src/ComputeSharp/ComputeSharp.csproj b/src/ComputeSharp/ComputeSharp.csproj
index fa5033e9..156c3f9b 100644
--- a/src/ComputeSharp/ComputeSharp.csproj
+++ b/src/ComputeSharp/ComputeSharp.csproj
@@ -45,6 +45,11 @@
True
Bool4.tt
+
+ True
+ True
+ BoolMxN.tt
+
True
True
@@ -60,6 +65,11 @@
True
Double4.tt
+
+ True
+ True
+ DoubleMxN.tt
+
True
True
@@ -75,7 +85,7 @@
True
Float4.tt
-
+
True
True
FloatMxN.tt
@@ -95,6 +105,11 @@
True
Int4.tt
+
+ True
+ True
+ IntMxN.tt
+
True
True
@@ -110,6 +125,11 @@
True
UInt4.tt
+
+ True
+ True
+ UIntMxN.tt
+
@@ -125,6 +145,10 @@
TextTemplatingFileGenerator
Bool4.g.cs
+
+ TextTemplatingFileGenerator
+ BoolMxN.g.cs
+
TextTemplatingFileGenerator
Double2.g.cs
@@ -137,6 +161,10 @@
TextTemplatingFileGenerator
Double4.g.cs
+
+ TextTemplatingFileGenerator
+ DoubleMxN.g.cs
+
TextTemplatingFileGenerator
Float2.g.cs
@@ -149,7 +177,7 @@
TextTemplatingFileGenerator
Float4.g.cs
-
+
TextTemplatingFileGenerator
FloatMxN.g.cs
@@ -165,6 +193,10 @@
TextTemplatingFileGenerator
Int4.g.cs
+
+ TextTemplatingFileGenerator
+ IntMxN.g.cs
+
TextTemplatingFileGenerator
UInt2.g.cs
@@ -177,6 +209,10 @@
TextTemplatingFileGenerator
UInt4.g.cs
+
+ TextTemplatingFileGenerator
+ UIntMxN.g.cs
+
diff --git a/src/ComputeSharp/Core/Primitives/Bool/BoolMxN.g.cs b/src/ComputeSharp/Core/Primitives/Bool/BoolMxN.g.cs
new file mode 100644
index 00000000..7c50f12b
--- /dev/null
+++ b/src/ComputeSharp/Core/Primitives/Bool/BoolMxN.g.cs
@@ -0,0 +1,1892 @@
+using System.Runtime.InteropServices;
+using ComputeSharp.Exceptions;
+
+namespace ComputeSharp
+{
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 4)]
+ public partial struct Bool1x1
+ {
+ [FieldOffset(0)]
+ private bool m11;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ public Bool1x1(bool m11)
+ {
+ this.m11 = m11;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref bool this[int row] => throw new InvalidExecutionContextException($"{nameof(Bool1x1)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Bool2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Bool1x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Bool3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Bool1x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Bool4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Bool1x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Bool1x1 operator -(Bool1x1 matrix) => throw new InvalidExecutionContextException($"{nameof(Bool1x1)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Bool1x1 operator +(Bool1x1 left, Bool1x1 right) => throw new InvalidExecutionContextException($"{nameof(Bool1x1)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Bool1x1 operator /(Bool1x1 left, Bool1x1 right) => throw new InvalidExecutionContextException($"{nameof(Bool1x1)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Bool1x1 operator *(Bool1x1 left, Bool1x1 right) => throw new InvalidExecutionContextException($"{nameof(Bool1x1)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Bool1x1 operator -(Bool1x1 left, Bool1x1 right) => throw new InvalidExecutionContextException($"{nameof(Bool1x1)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 8)]
+ public partial struct Bool1x2
+ {
+ [FieldOffset(0)]
+ private bool m11;
+
+ [FieldOffset(4)]
+ private bool m12;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ public Bool1x2(bool m11, bool m12)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Bool2 this[int row] => throw new InvalidExecutionContextException($"{nameof(Bool1x2)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Bool2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Bool1x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Bool3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Bool1x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Bool4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Bool1x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Bool1x2 operator -(Bool1x2 matrix) => throw new InvalidExecutionContextException($"{nameof(Bool1x2)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Bool1x2 operator +(Bool1x2 left, Bool1x2 right) => throw new InvalidExecutionContextException($"{nameof(Bool1x2)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Bool1x2 operator /(Bool1x2 left, Bool1x2 right) => throw new InvalidExecutionContextException($"{nameof(Bool1x2)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Bool1x2 operator *(Bool1x2 left, Bool1x2 right) => throw new InvalidExecutionContextException($"{nameof(Bool1x2)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Bool1x2 operator -(Bool1x2 left, Bool1x2 right) => throw new InvalidExecutionContextException($"{nameof(Bool1x2)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 12)]
+ public partial struct Bool1x3
+ {
+ [FieldOffset(0)]
+ private bool m11;
+
+ [FieldOffset(4)]
+ private bool m12;
+
+ [FieldOffset(8)]
+ private bool m13;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [1, 3].
+ public Bool1x3(bool m11, bool m12, bool m13)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m13 = m13;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Bool3 this[int row] => throw new InvalidExecutionContextException($"{nameof(Bool1x3)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Bool2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Bool1x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Bool3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Bool1x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Bool4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Bool1x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Bool1x3 operator -(Bool1x3 matrix) => throw new InvalidExecutionContextException($"{nameof(Bool1x3)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Bool1x3 operator +(Bool1x3 left, Bool1x3 right) => throw new InvalidExecutionContextException($"{nameof(Bool1x3)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Bool1x3 operator /(Bool1x3 left, Bool1x3 right) => throw new InvalidExecutionContextException($"{nameof(Bool1x3)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Bool1x3 operator *(Bool1x3 left, Bool1x3 right) => throw new InvalidExecutionContextException($"{nameof(Bool1x3)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Bool1x3 operator -(Bool1x3 left, Bool1x3 right) => throw new InvalidExecutionContextException($"{nameof(Bool1x3)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 16)]
+ public partial struct Bool1x4
+ {
+ [FieldOffset(0)]
+ private bool m11;
+
+ [FieldOffset(4)]
+ private bool m12;
+
+ [FieldOffset(8)]
+ private bool m13;
+
+ [FieldOffset(12)]
+ private bool m14;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [1, 3].
+ /// The value to assign to the component at position [1, 4].
+ public Bool1x4(bool m11, bool m12, bool m13, bool m14)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m13 = m13;
+ this.m14 = m14;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Bool4 this[int row] => throw new InvalidExecutionContextException($"{nameof(Bool1x4)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Bool2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Bool1x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Bool3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Bool1x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Bool4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Bool1x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Bool1x4 operator -(Bool1x4 matrix) => throw new InvalidExecutionContextException($"{nameof(Bool1x4)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Bool1x4 operator +(Bool1x4 left, Bool1x4 right) => throw new InvalidExecutionContextException($"{nameof(Bool1x4)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Bool1x4 operator /(Bool1x4 left, Bool1x4 right) => throw new InvalidExecutionContextException($"{nameof(Bool1x4)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Bool1x4 operator *(Bool1x4 left, Bool1x4 right) => throw new InvalidExecutionContextException($"{nameof(Bool1x4)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Bool1x4 operator -(Bool1x4 left, Bool1x4 right) => throw new InvalidExecutionContextException($"{nameof(Bool1x4)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 8)]
+ public partial struct Bool2x1
+ {
+ [FieldOffset(0)]
+ private bool m11;
+
+ [FieldOffset(4)]
+ private bool m21;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [2, 1].
+ public Bool2x1(bool m11, bool m21)
+ {
+ this.m11 = m11;
+ this.m21 = m21;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref bool this[int row] => throw new InvalidExecutionContextException($"{nameof(Bool2x1)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Bool2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Bool2x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Bool3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Bool2x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Bool4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Bool2x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Bool2x1 operator -(Bool2x1 matrix) => throw new InvalidExecutionContextException($"{nameof(Bool2x1)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Bool2x1 operator +(Bool2x1 left, Bool2x1 right) => throw new InvalidExecutionContextException($"{nameof(Bool2x1)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Bool2x1 operator /(Bool2x1 left, Bool2x1 right) => throw new InvalidExecutionContextException($"{nameof(Bool2x1)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Bool2x1 operator *(Bool2x1 left, Bool2x1 right) => throw new InvalidExecutionContextException($"{nameof(Bool2x1)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Bool2x1 operator -(Bool2x1 left, Bool2x1 right) => throw new InvalidExecutionContextException($"{nameof(Bool2x1)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 16)]
+ public partial struct Bool2x2
+ {
+ [FieldOffset(0)]
+ private bool m11;
+
+ [FieldOffset(4)]
+ private bool m12;
+
+ [FieldOffset(8)]
+ private bool m21;
+
+ [FieldOffset(12)]
+ private bool m22;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ public Bool2x2(bool m11, bool m12, bool m21, bool m22)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m21 = m21;
+ this.m22 = m22;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ public Bool2x2(Bool2 row1, Bool2 row2)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Bool2 this[int row] => throw new InvalidExecutionContextException($"{nameof(Bool2x2)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Bool2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Bool2x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Bool3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Bool2x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Bool4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Bool2x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Bool2x2 operator -(Bool2x2 matrix) => throw new InvalidExecutionContextException($"{nameof(Bool2x2)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Bool2x2 operator +(Bool2x2 left, Bool2x2 right) => throw new InvalidExecutionContextException($"{nameof(Bool2x2)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Bool2x2 operator /(Bool2x2 left, Bool2x2 right) => throw new InvalidExecutionContextException($"{nameof(Bool2x2)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Bool2x2 operator *(Bool2x2 left, Bool2x2 right) => throw new InvalidExecutionContextException($"{nameof(Bool2x2)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Bool2x2 operator -(Bool2x2 left, Bool2x2 right) => throw new InvalidExecutionContextException($"{nameof(Bool2x2)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 24)]
+ public partial struct Bool2x3
+ {
+ [FieldOffset(0)]
+ private bool m11;
+
+ [FieldOffset(4)]
+ private bool m12;
+
+ [FieldOffset(8)]
+ private bool m13;
+
+ [FieldOffset(12)]
+ private bool m21;
+
+ [FieldOffset(16)]
+ private bool m22;
+
+ [FieldOffset(20)]
+ private bool m23;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [1, 3].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ /// The value to assign to the component at position [2, 3].
+ public Bool2x3(bool m11, bool m12, bool m13, bool m21, bool m22, bool m23)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m13 = m13;
+ this.m21 = m21;
+ this.m22 = m22;
+ this.m23 = m23;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ public Bool2x3(Bool3 row1, Bool3 row2)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m13 = row1.Z;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ this.m23 = row2.Z;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Bool3 this[int row] => throw new InvalidExecutionContextException($"{nameof(Bool2x3)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Bool2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Bool2x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Bool3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Bool2x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Bool4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Bool2x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Bool2x3 operator -(Bool2x3 matrix) => throw new InvalidExecutionContextException($"{nameof(Bool2x3)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Bool2x3 operator +(Bool2x3 left, Bool2x3 right) => throw new InvalidExecutionContextException($"{nameof(Bool2x3)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Bool2x3 operator /(Bool2x3 left, Bool2x3 right) => throw new InvalidExecutionContextException($"{nameof(Bool2x3)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Bool2x3 operator *(Bool2x3 left, Bool2x3 right) => throw new InvalidExecutionContextException($"{nameof(Bool2x3)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Bool2x3 operator -(Bool2x3 left, Bool2x3 right) => throw new InvalidExecutionContextException($"{nameof(Bool2x3)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 32)]
+ public partial struct Bool2x4
+ {
+ [FieldOffset(0)]
+ private bool m11;
+
+ [FieldOffset(4)]
+ private bool m12;
+
+ [FieldOffset(8)]
+ private bool m13;
+
+ [FieldOffset(12)]
+ private bool m14;
+
+ [FieldOffset(16)]
+ private bool m21;
+
+ [FieldOffset(20)]
+ private bool m22;
+
+ [FieldOffset(24)]
+ private bool m23;
+
+ [FieldOffset(28)]
+ private bool m24;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [1, 3].
+ /// The value to assign to the component at position [1, 4].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ /// The value to assign to the component at position [2, 3].
+ /// The value to assign to the component at position [2, 4].
+ public Bool2x4(bool m11, bool m12, bool m13, bool m14, bool m21, bool m22, bool m23, bool m24)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m13 = m13;
+ this.m14 = m14;
+ this.m21 = m21;
+ this.m22 = m22;
+ this.m23 = m23;
+ this.m24 = m24;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ public Bool2x4(Bool4 row1, Bool4 row2)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m13 = row1.Z;
+ this.m14 = row1.W;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ this.m23 = row2.Z;
+ this.m24 = row2.W;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Bool4 this[int row] => throw new InvalidExecutionContextException($"{nameof(Bool2x4)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Bool2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Bool2x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Bool3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Bool2x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Bool4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Bool2x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Bool2x4 operator -(Bool2x4 matrix) => throw new InvalidExecutionContextException($"{nameof(Bool2x4)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Bool2x4 operator +(Bool2x4 left, Bool2x4 right) => throw new InvalidExecutionContextException($"{nameof(Bool2x4)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Bool2x4 operator /(Bool2x4 left, Bool2x4 right) => throw new InvalidExecutionContextException($"{nameof(Bool2x4)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Bool2x4 operator *(Bool2x4 left, Bool2x4 right) => throw new InvalidExecutionContextException($"{nameof(Bool2x4)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Bool2x4 operator -(Bool2x4 left, Bool2x4 right) => throw new InvalidExecutionContextException($"{nameof(Bool2x4)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 12)]
+ public partial struct Bool3x1
+ {
+ [FieldOffset(0)]
+ private bool m11;
+
+ [FieldOffset(4)]
+ private bool m21;
+
+ [FieldOffset(8)]
+ private bool m31;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [3, 1].
+ public Bool3x1(bool m11, bool m21, bool m31)
+ {
+ this.m11 = m11;
+ this.m21 = m21;
+ this.m31 = m31;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref bool this[int row] => throw new InvalidExecutionContextException($"{nameof(Bool3x1)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Bool2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Bool3x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Bool3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Bool3x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Bool4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Bool3x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Bool3x1 operator -(Bool3x1 matrix) => throw new InvalidExecutionContextException($"{nameof(Bool3x1)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Bool3x1 operator +(Bool3x1 left, Bool3x1 right) => throw new InvalidExecutionContextException($"{nameof(Bool3x1)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Bool3x1 operator /(Bool3x1 left, Bool3x1 right) => throw new InvalidExecutionContextException($"{nameof(Bool3x1)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Bool3x1 operator *(Bool3x1 left, Bool3x1 right) => throw new InvalidExecutionContextException($"{nameof(Bool3x1)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Bool3x1 operator -(Bool3x1 left, Bool3x1 right) => throw new InvalidExecutionContextException($"{nameof(Bool3x1)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 24)]
+ public partial struct Bool3x2
+ {
+ [FieldOffset(0)]
+ private bool m11;
+
+ [FieldOffset(4)]
+ private bool m12;
+
+ [FieldOffset(8)]
+ private bool m21;
+
+ [FieldOffset(12)]
+ private bool m22;
+
+ [FieldOffset(16)]
+ private bool m31;
+
+ [FieldOffset(20)]
+ private bool m32;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ /// The value to assign to the component at position [3, 1].
+ /// The value to assign to the component at position [3, 2].
+ public Bool3x2(bool m11, bool m12, bool m21, bool m22, bool m31, bool m32)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m21 = m21;
+ this.m22 = m22;
+ this.m31 = m31;
+ this.m32 = m32;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ /// The value to assign to the row at position [3].
+ public Bool3x2(Bool2 row1, Bool2 row2, Bool2 row3)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ this.m31 = row3.X;
+ this.m32 = row3.Y;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Bool2 this[int row] => throw new InvalidExecutionContextException($"{nameof(Bool3x2)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Bool2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Bool3x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Bool3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Bool3x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Bool4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Bool3x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Bool3x2 operator -(Bool3x2 matrix) => throw new InvalidExecutionContextException($"{nameof(Bool3x2)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Bool3x2 operator +(Bool3x2 left, Bool3x2 right) => throw new InvalidExecutionContextException($"{nameof(Bool3x2)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Bool3x2 operator /(Bool3x2 left, Bool3x2 right) => throw new InvalidExecutionContextException($"{nameof(Bool3x2)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Bool3x2 operator *(Bool3x2 left, Bool3x2 right) => throw new InvalidExecutionContextException($"{nameof(Bool3x2)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Bool3x2 operator -(Bool3x2 left, Bool3x2 right) => throw new InvalidExecutionContextException($"{nameof(Bool3x2)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 36)]
+ public partial struct Bool3x3
+ {
+ [FieldOffset(0)]
+ private bool m11;
+
+ [FieldOffset(4)]
+ private bool m12;
+
+ [FieldOffset(8)]
+ private bool m13;
+
+ [FieldOffset(12)]
+ private bool m21;
+
+ [FieldOffset(16)]
+ private bool m22;
+
+ [FieldOffset(20)]
+ private bool m23;
+
+ [FieldOffset(24)]
+ private bool m31;
+
+ [FieldOffset(28)]
+ private bool m32;
+
+ [FieldOffset(32)]
+ private bool m33;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [1, 3].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ /// The value to assign to the component at position [2, 3].
+ /// The value to assign to the component at position [3, 1].
+ /// The value to assign to the component at position [3, 2].
+ /// The value to assign to the component at position [3, 3].
+ public Bool3x3(bool m11, bool m12, bool m13, bool m21, bool m22, bool m23, bool m31, bool m32, bool m33)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m13 = m13;
+ this.m21 = m21;
+ this.m22 = m22;
+ this.m23 = m23;
+ this.m31 = m31;
+ this.m32 = m32;
+ this.m33 = m33;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ /// The value to assign to the row at position [3].
+ public Bool3x3(Bool3 row1, Bool3 row2, Bool3 row3)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m13 = row1.Z;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ this.m23 = row2.Z;
+ this.m31 = row3.X;
+ this.m32 = row3.Y;
+ this.m33 = row3.Z;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Bool3 this[int row] => throw new InvalidExecutionContextException($"{nameof(Bool3x3)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Bool2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Bool3x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Bool3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Bool3x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Bool4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Bool3x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Bool3x3 operator -(Bool3x3 matrix) => throw new InvalidExecutionContextException($"{nameof(Bool3x3)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Bool3x3 operator +(Bool3x3 left, Bool3x3 right) => throw new InvalidExecutionContextException($"{nameof(Bool3x3)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Bool3x3 operator /(Bool3x3 left, Bool3x3 right) => throw new InvalidExecutionContextException($"{nameof(Bool3x3)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Bool3x3 operator *(Bool3x3 left, Bool3x3 right) => throw new InvalidExecutionContextException($"{nameof(Bool3x3)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Bool3x3 operator -(Bool3x3 left, Bool3x3 right) => throw new InvalidExecutionContextException($"{nameof(Bool3x3)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 48)]
+ public partial struct Bool3x4
+ {
+ [FieldOffset(0)]
+ private bool m11;
+
+ [FieldOffset(4)]
+ private bool m12;
+
+ [FieldOffset(8)]
+ private bool m13;
+
+ [FieldOffset(12)]
+ private bool m14;
+
+ [FieldOffset(16)]
+ private bool m21;
+
+ [FieldOffset(20)]
+ private bool m22;
+
+ [FieldOffset(24)]
+ private bool m23;
+
+ [FieldOffset(28)]
+ private bool m24;
+
+ [FieldOffset(32)]
+ private bool m31;
+
+ [FieldOffset(36)]
+ private bool m32;
+
+ [FieldOffset(40)]
+ private bool m33;
+
+ [FieldOffset(44)]
+ private bool m34;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [1, 3].
+ /// The value to assign to the component at position [1, 4].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ /// The value to assign to the component at position [2, 3].
+ /// The value to assign to the component at position [2, 4].
+ /// The value to assign to the component at position [3, 1].
+ /// The value to assign to the component at position [3, 2].
+ /// The value to assign to the component at position [3, 3].
+ /// The value to assign to the component at position [3, 4].
+ public Bool3x4(bool m11, bool m12, bool m13, bool m14, bool m21, bool m22, bool m23, bool m24, bool m31, bool m32, bool m33, bool m34)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m13 = m13;
+ this.m14 = m14;
+ this.m21 = m21;
+ this.m22 = m22;
+ this.m23 = m23;
+ this.m24 = m24;
+ this.m31 = m31;
+ this.m32 = m32;
+ this.m33 = m33;
+ this.m34 = m34;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ /// The value to assign to the row at position [3].
+ public Bool3x4(Bool4 row1, Bool4 row2, Bool4 row3)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m13 = row1.Z;
+ this.m14 = row1.W;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ this.m23 = row2.Z;
+ this.m24 = row2.W;
+ this.m31 = row3.X;
+ this.m32 = row3.Y;
+ this.m33 = row3.Z;
+ this.m34 = row3.W;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Bool4 this[int row] => throw new InvalidExecutionContextException($"{nameof(Bool3x4)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Bool2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Bool3x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Bool3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Bool3x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Bool4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Bool3x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Bool3x4 operator -(Bool3x4 matrix) => throw new InvalidExecutionContextException($"{nameof(Bool3x4)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Bool3x4 operator +(Bool3x4 left, Bool3x4 right) => throw new InvalidExecutionContextException($"{nameof(Bool3x4)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Bool3x4 operator /(Bool3x4 left, Bool3x4 right) => throw new InvalidExecutionContextException($"{nameof(Bool3x4)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Bool3x4 operator *(Bool3x4 left, Bool3x4 right) => throw new InvalidExecutionContextException($"{nameof(Bool3x4)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Bool3x4 operator -(Bool3x4 left, Bool3x4 right) => throw new InvalidExecutionContextException($"{nameof(Bool3x4)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 16)]
+ public partial struct Bool4x1
+ {
+ [FieldOffset(0)]
+ private bool m11;
+
+ [FieldOffset(4)]
+ private bool m21;
+
+ [FieldOffset(8)]
+ private bool m31;
+
+ [FieldOffset(12)]
+ private bool m41;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [3, 1].
+ /// The value to assign to the component at position [4, 1].
+ public Bool4x1(bool m11, bool m21, bool m31, bool m41)
+ {
+ this.m11 = m11;
+ this.m21 = m21;
+ this.m31 = m31;
+ this.m41 = m41;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref bool this[int row] => throw new InvalidExecutionContextException($"{nameof(Bool4x1)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Bool2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Bool4x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Bool3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Bool4x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Bool4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Bool4x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Bool4x1 operator -(Bool4x1 matrix) => throw new InvalidExecutionContextException($"{nameof(Bool4x1)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Bool4x1 operator +(Bool4x1 left, Bool4x1 right) => throw new InvalidExecutionContextException($"{nameof(Bool4x1)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Bool4x1 operator /(Bool4x1 left, Bool4x1 right) => throw new InvalidExecutionContextException($"{nameof(Bool4x1)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Bool4x1 operator *(Bool4x1 left, Bool4x1 right) => throw new InvalidExecutionContextException($"{nameof(Bool4x1)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Bool4x1 operator -(Bool4x1 left, Bool4x1 right) => throw new InvalidExecutionContextException($"{nameof(Bool4x1)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 32)]
+ public partial struct Bool4x2
+ {
+ [FieldOffset(0)]
+ private bool m11;
+
+ [FieldOffset(4)]
+ private bool m12;
+
+ [FieldOffset(8)]
+ private bool m21;
+
+ [FieldOffset(12)]
+ private bool m22;
+
+ [FieldOffset(16)]
+ private bool m31;
+
+ [FieldOffset(20)]
+ private bool m32;
+
+ [FieldOffset(24)]
+ private bool m41;
+
+ [FieldOffset(28)]
+ private bool m42;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ /// The value to assign to the component at position [3, 1].
+ /// The value to assign to the component at position [3, 2].
+ /// The value to assign to the component at position [4, 1].
+ /// The value to assign to the component at position [4, 2].
+ public Bool4x2(bool m11, bool m12, bool m21, bool m22, bool m31, bool m32, bool m41, bool m42)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m21 = m21;
+ this.m22 = m22;
+ this.m31 = m31;
+ this.m32 = m32;
+ this.m41 = m41;
+ this.m42 = m42;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ /// The value to assign to the row at position [3].
+ /// The value to assign to the row at position [4].
+ public Bool4x2(Bool2 row1, Bool2 row2, Bool2 row3, Bool2 row4)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ this.m31 = row3.X;
+ this.m32 = row3.Y;
+ this.m41 = row4.X;
+ this.m42 = row4.Y;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Bool2 this[int row] => throw new InvalidExecutionContextException($"{nameof(Bool4x2)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Bool2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Bool4x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Bool3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Bool4x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Bool4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Bool4x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Bool4x2 operator -(Bool4x2 matrix) => throw new InvalidExecutionContextException($"{nameof(Bool4x2)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Bool4x2 operator +(Bool4x2 left, Bool4x2 right) => throw new InvalidExecutionContextException($"{nameof(Bool4x2)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Bool4x2 operator /(Bool4x2 left, Bool4x2 right) => throw new InvalidExecutionContextException($"{nameof(Bool4x2)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Bool4x2 operator *(Bool4x2 left, Bool4x2 right) => throw new InvalidExecutionContextException($"{nameof(Bool4x2)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Bool4x2 operator -(Bool4x2 left, Bool4x2 right) => throw new InvalidExecutionContextException($"{nameof(Bool4x2)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 48)]
+ public partial struct Bool4x3
+ {
+ [FieldOffset(0)]
+ private bool m11;
+
+ [FieldOffset(4)]
+ private bool m12;
+
+ [FieldOffset(8)]
+ private bool m13;
+
+ [FieldOffset(12)]
+ private bool m21;
+
+ [FieldOffset(16)]
+ private bool m22;
+
+ [FieldOffset(20)]
+ private bool m23;
+
+ [FieldOffset(24)]
+ private bool m31;
+
+ [FieldOffset(28)]
+ private bool m32;
+
+ [FieldOffset(32)]
+ private bool m33;
+
+ [FieldOffset(36)]
+ private bool m41;
+
+ [FieldOffset(40)]
+ private bool m42;
+
+ [FieldOffset(44)]
+ private bool m43;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [1, 3].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ /// The value to assign to the component at position [2, 3].
+ /// The value to assign to the component at position [3, 1].
+ /// The value to assign to the component at position [3, 2].
+ /// The value to assign to the component at position [3, 3].
+ /// The value to assign to the component at position [4, 1].
+ /// The value to assign to the component at position [4, 2].
+ /// The value to assign to the component at position [4, 3].
+ public Bool4x3(bool m11, bool m12, bool m13, bool m21, bool m22, bool m23, bool m31, bool m32, bool m33, bool m41, bool m42, bool m43)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m13 = m13;
+ this.m21 = m21;
+ this.m22 = m22;
+ this.m23 = m23;
+ this.m31 = m31;
+ this.m32 = m32;
+ this.m33 = m33;
+ this.m41 = m41;
+ this.m42 = m42;
+ this.m43 = m43;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ /// The value to assign to the row at position [3].
+ /// The value to assign to the row at position [4].
+ public Bool4x3(Bool3 row1, Bool3 row2, Bool3 row3, Bool3 row4)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m13 = row1.Z;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ this.m23 = row2.Z;
+ this.m31 = row3.X;
+ this.m32 = row3.Y;
+ this.m33 = row3.Z;
+ this.m41 = row4.X;
+ this.m42 = row4.Y;
+ this.m43 = row4.Z;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Bool3 this[int row] => throw new InvalidExecutionContextException($"{nameof(Bool4x3)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Bool2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Bool4x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Bool3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Bool4x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Bool4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Bool4x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Bool4x3 operator -(Bool4x3 matrix) => throw new InvalidExecutionContextException($"{nameof(Bool4x3)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Bool4x3 operator +(Bool4x3 left, Bool4x3 right) => throw new InvalidExecutionContextException($"{nameof(Bool4x3)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Bool4x3 operator /(Bool4x3 left, Bool4x3 right) => throw new InvalidExecutionContextException($"{nameof(Bool4x3)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Bool4x3 operator *(Bool4x3 left, Bool4x3 right) => throw new InvalidExecutionContextException($"{nameof(Bool4x3)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Bool4x3 operator -(Bool4x3 left, Bool4x3 right) => throw new InvalidExecutionContextException($"{nameof(Bool4x3)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 64)]
+ public partial struct Bool4x4
+ {
+ [FieldOffset(0)]
+ private bool m11;
+
+ [FieldOffset(4)]
+ private bool m12;
+
+ [FieldOffset(8)]
+ private bool m13;
+
+ [FieldOffset(12)]
+ private bool m14;
+
+ [FieldOffset(16)]
+ private bool m21;
+
+ [FieldOffset(20)]
+ private bool m22;
+
+ [FieldOffset(24)]
+ private bool m23;
+
+ [FieldOffset(28)]
+ private bool m24;
+
+ [FieldOffset(32)]
+ private bool m31;
+
+ [FieldOffset(36)]
+ private bool m32;
+
+ [FieldOffset(40)]
+ private bool m33;
+
+ [FieldOffset(44)]
+ private bool m34;
+
+ [FieldOffset(48)]
+ private bool m41;
+
+ [FieldOffset(52)]
+ private bool m42;
+
+ [FieldOffset(56)]
+ private bool m43;
+
+ [FieldOffset(60)]
+ private bool m44;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [1, 3].
+ /// The value to assign to the component at position [1, 4].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ /// The value to assign to the component at position [2, 3].
+ /// The value to assign to the component at position [2, 4].
+ /// The value to assign to the component at position [3, 1].
+ /// The value to assign to the component at position [3, 2].
+ /// The value to assign to the component at position [3, 3].
+ /// The value to assign to the component at position [3, 4].
+ /// The value to assign to the component at position [4, 1].
+ /// The value to assign to the component at position [4, 2].
+ /// The value to assign to the component at position [4, 3].
+ /// The value to assign to the component at position [4, 4].
+ public Bool4x4(bool m11, bool m12, bool m13, bool m14, bool m21, bool m22, bool m23, bool m24, bool m31, bool m32, bool m33, bool m34, bool m41, bool m42, bool m43, bool m44)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m13 = m13;
+ this.m14 = m14;
+ this.m21 = m21;
+ this.m22 = m22;
+ this.m23 = m23;
+ this.m24 = m24;
+ this.m31 = m31;
+ this.m32 = m32;
+ this.m33 = m33;
+ this.m34 = m34;
+ this.m41 = m41;
+ this.m42 = m42;
+ this.m43 = m43;
+ this.m44 = m44;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ /// The value to assign to the row at position [3].
+ /// The value to assign to the row at position [4].
+ public Bool4x4(Bool4 row1, Bool4 row2, Bool4 row3, Bool4 row4)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m13 = row1.Z;
+ this.m14 = row1.W;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ this.m23 = row2.Z;
+ this.m24 = row2.W;
+ this.m31 = row3.X;
+ this.m32 = row3.Y;
+ this.m33 = row3.Z;
+ this.m34 = row3.W;
+ this.m41 = row4.X;
+ this.m42 = row4.Y;
+ this.m43 = row4.Z;
+ this.m44 = row4.W;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Bool4 this[int row] => throw new InvalidExecutionContextException($"{nameof(Bool4x4)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Bool2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Bool4x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Bool3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Bool4x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Bool4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Bool4x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Bool4x4 operator -(Bool4x4 matrix) => throw new InvalidExecutionContextException($"{nameof(Bool4x4)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Bool4x4 operator +(Bool4x4 left, Bool4x4 right) => throw new InvalidExecutionContextException($"{nameof(Bool4x4)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Bool4x4 operator /(Bool4x4 left, Bool4x4 right) => throw new InvalidExecutionContextException($"{nameof(Bool4x4)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Bool4x4 operator *(Bool4x4 left, Bool4x4 right) => throw new InvalidExecutionContextException($"{nameof(Bool4x4)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Bool4x4 operator -(Bool4x4 left, Bool4x4 right) => throw new InvalidExecutionContextException($"{nameof(Bool4x4)}.-");
+ }
+}
diff --git a/src/ComputeSharp/Core/Primitives/Bool/BoolMxN.tt b/src/ComputeSharp/Core/Primitives/Bool/BoolMxN.tt
new file mode 100644
index 00000000..76a0d8bc
--- /dev/null
+++ b/src/ComputeSharp/Core/Primitives/Bool/BoolMxN.tt
@@ -0,0 +1,4 @@
+<#@include file="..\MatrixType.ttinclude" #>
+<#
+GenerateAllMatrixProperties("Bool", sizeof(int));
+#>
\ No newline at end of file
diff --git a/src/ComputeSharp/Core/Primitives/Double/DoubleMxN.g.cs b/src/ComputeSharp/Core/Primitives/Double/DoubleMxN.g.cs
new file mode 100644
index 00000000..3da845e4
--- /dev/null
+++ b/src/ComputeSharp/Core/Primitives/Double/DoubleMxN.g.cs
@@ -0,0 +1,1892 @@
+using System.Runtime.InteropServices;
+using ComputeSharp.Exceptions;
+
+namespace ComputeSharp
+{
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 8)]
+ public partial struct Double1x1
+ {
+ [FieldOffset(0)]
+ private double m11;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ public Double1x1(double m11)
+ {
+ this.m11 = m11;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref double this[int row] => throw new InvalidExecutionContextException($"{nameof(Double1x1)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Double2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Double1x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Double3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Double1x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Double4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Double1x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Double1x1 operator -(Double1x1 matrix) => throw new InvalidExecutionContextException($"{nameof(Double1x1)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Double1x1 operator +(Double1x1 left, Double1x1 right) => throw new InvalidExecutionContextException($"{nameof(Double1x1)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Double1x1 operator /(Double1x1 left, Double1x1 right) => throw new InvalidExecutionContextException($"{nameof(Double1x1)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Double1x1 operator *(Double1x1 left, Double1x1 right) => throw new InvalidExecutionContextException($"{nameof(Double1x1)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Double1x1 operator -(Double1x1 left, Double1x1 right) => throw new InvalidExecutionContextException($"{nameof(Double1x1)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 16)]
+ public partial struct Double1x2
+ {
+ [FieldOffset(0)]
+ private double m11;
+
+ [FieldOffset(8)]
+ private double m12;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ public Double1x2(double m11, double m12)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Double2 this[int row] => throw new InvalidExecutionContextException($"{nameof(Double1x2)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Double2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Double1x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Double3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Double1x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Double4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Double1x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Double1x2 operator -(Double1x2 matrix) => throw new InvalidExecutionContextException($"{nameof(Double1x2)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Double1x2 operator +(Double1x2 left, Double1x2 right) => throw new InvalidExecutionContextException($"{nameof(Double1x2)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Double1x2 operator /(Double1x2 left, Double1x2 right) => throw new InvalidExecutionContextException($"{nameof(Double1x2)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Double1x2 operator *(Double1x2 left, Double1x2 right) => throw new InvalidExecutionContextException($"{nameof(Double1x2)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Double1x2 operator -(Double1x2 left, Double1x2 right) => throw new InvalidExecutionContextException($"{nameof(Double1x2)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 24)]
+ public partial struct Double1x3
+ {
+ [FieldOffset(0)]
+ private double m11;
+
+ [FieldOffset(8)]
+ private double m12;
+
+ [FieldOffset(16)]
+ private double m13;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [1, 3].
+ public Double1x3(double m11, double m12, double m13)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m13 = m13;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Double3 this[int row] => throw new InvalidExecutionContextException($"{nameof(Double1x3)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Double2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Double1x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Double3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Double1x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Double4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Double1x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Double1x3 operator -(Double1x3 matrix) => throw new InvalidExecutionContextException($"{nameof(Double1x3)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Double1x3 operator +(Double1x3 left, Double1x3 right) => throw new InvalidExecutionContextException($"{nameof(Double1x3)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Double1x3 operator /(Double1x3 left, Double1x3 right) => throw new InvalidExecutionContextException($"{nameof(Double1x3)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Double1x3 operator *(Double1x3 left, Double1x3 right) => throw new InvalidExecutionContextException($"{nameof(Double1x3)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Double1x3 operator -(Double1x3 left, Double1x3 right) => throw new InvalidExecutionContextException($"{nameof(Double1x3)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 32)]
+ public partial struct Double1x4
+ {
+ [FieldOffset(0)]
+ private double m11;
+
+ [FieldOffset(8)]
+ private double m12;
+
+ [FieldOffset(16)]
+ private double m13;
+
+ [FieldOffset(24)]
+ private double m14;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [1, 3].
+ /// The value to assign to the component at position [1, 4].
+ public Double1x4(double m11, double m12, double m13, double m14)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m13 = m13;
+ this.m14 = m14;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Double4 this[int row] => throw new InvalidExecutionContextException($"{nameof(Double1x4)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Double2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Double1x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Double3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Double1x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Double4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Double1x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Double1x4 operator -(Double1x4 matrix) => throw new InvalidExecutionContextException($"{nameof(Double1x4)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Double1x4 operator +(Double1x4 left, Double1x4 right) => throw new InvalidExecutionContextException($"{nameof(Double1x4)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Double1x4 operator /(Double1x4 left, Double1x4 right) => throw new InvalidExecutionContextException($"{nameof(Double1x4)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Double1x4 operator *(Double1x4 left, Double1x4 right) => throw new InvalidExecutionContextException($"{nameof(Double1x4)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Double1x4 operator -(Double1x4 left, Double1x4 right) => throw new InvalidExecutionContextException($"{nameof(Double1x4)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 16)]
+ public partial struct Double2x1
+ {
+ [FieldOffset(0)]
+ private double m11;
+
+ [FieldOffset(8)]
+ private double m21;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [2, 1].
+ public Double2x1(double m11, double m21)
+ {
+ this.m11 = m11;
+ this.m21 = m21;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref double this[int row] => throw new InvalidExecutionContextException($"{nameof(Double2x1)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Double2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Double2x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Double3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Double2x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Double4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Double2x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Double2x1 operator -(Double2x1 matrix) => throw new InvalidExecutionContextException($"{nameof(Double2x1)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Double2x1 operator +(Double2x1 left, Double2x1 right) => throw new InvalidExecutionContextException($"{nameof(Double2x1)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Double2x1 operator /(Double2x1 left, Double2x1 right) => throw new InvalidExecutionContextException($"{nameof(Double2x1)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Double2x1 operator *(Double2x1 left, Double2x1 right) => throw new InvalidExecutionContextException($"{nameof(Double2x1)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Double2x1 operator -(Double2x1 left, Double2x1 right) => throw new InvalidExecutionContextException($"{nameof(Double2x1)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 32)]
+ public partial struct Double2x2
+ {
+ [FieldOffset(0)]
+ private double m11;
+
+ [FieldOffset(8)]
+ private double m12;
+
+ [FieldOffset(16)]
+ private double m21;
+
+ [FieldOffset(24)]
+ private double m22;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ public Double2x2(double m11, double m12, double m21, double m22)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m21 = m21;
+ this.m22 = m22;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ public Double2x2(Double2 row1, Double2 row2)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Double2 this[int row] => throw new InvalidExecutionContextException($"{nameof(Double2x2)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Double2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Double2x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Double3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Double2x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Double4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Double2x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Double2x2 operator -(Double2x2 matrix) => throw new InvalidExecutionContextException($"{nameof(Double2x2)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Double2x2 operator +(Double2x2 left, Double2x2 right) => throw new InvalidExecutionContextException($"{nameof(Double2x2)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Double2x2 operator /(Double2x2 left, Double2x2 right) => throw new InvalidExecutionContextException($"{nameof(Double2x2)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Double2x2 operator *(Double2x2 left, Double2x2 right) => throw new InvalidExecutionContextException($"{nameof(Double2x2)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Double2x2 operator -(Double2x2 left, Double2x2 right) => throw new InvalidExecutionContextException($"{nameof(Double2x2)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 48)]
+ public partial struct Double2x3
+ {
+ [FieldOffset(0)]
+ private double m11;
+
+ [FieldOffset(8)]
+ private double m12;
+
+ [FieldOffset(16)]
+ private double m13;
+
+ [FieldOffset(24)]
+ private double m21;
+
+ [FieldOffset(32)]
+ private double m22;
+
+ [FieldOffset(40)]
+ private double m23;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [1, 3].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ /// The value to assign to the component at position [2, 3].
+ public Double2x3(double m11, double m12, double m13, double m21, double m22, double m23)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m13 = m13;
+ this.m21 = m21;
+ this.m22 = m22;
+ this.m23 = m23;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ public Double2x3(Double3 row1, Double3 row2)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m13 = row1.Z;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ this.m23 = row2.Z;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Double3 this[int row] => throw new InvalidExecutionContextException($"{nameof(Double2x3)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Double2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Double2x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Double3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Double2x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Double4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Double2x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Double2x3 operator -(Double2x3 matrix) => throw new InvalidExecutionContextException($"{nameof(Double2x3)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Double2x3 operator +(Double2x3 left, Double2x3 right) => throw new InvalidExecutionContextException($"{nameof(Double2x3)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Double2x3 operator /(Double2x3 left, Double2x3 right) => throw new InvalidExecutionContextException($"{nameof(Double2x3)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Double2x3 operator *(Double2x3 left, Double2x3 right) => throw new InvalidExecutionContextException($"{nameof(Double2x3)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Double2x3 operator -(Double2x3 left, Double2x3 right) => throw new InvalidExecutionContextException($"{nameof(Double2x3)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 64)]
+ public partial struct Double2x4
+ {
+ [FieldOffset(0)]
+ private double m11;
+
+ [FieldOffset(8)]
+ private double m12;
+
+ [FieldOffset(16)]
+ private double m13;
+
+ [FieldOffset(24)]
+ private double m14;
+
+ [FieldOffset(32)]
+ private double m21;
+
+ [FieldOffset(40)]
+ private double m22;
+
+ [FieldOffset(48)]
+ private double m23;
+
+ [FieldOffset(56)]
+ private double m24;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [1, 3].
+ /// The value to assign to the component at position [1, 4].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ /// The value to assign to the component at position [2, 3].
+ /// The value to assign to the component at position [2, 4].
+ public Double2x4(double m11, double m12, double m13, double m14, double m21, double m22, double m23, double m24)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m13 = m13;
+ this.m14 = m14;
+ this.m21 = m21;
+ this.m22 = m22;
+ this.m23 = m23;
+ this.m24 = m24;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ public Double2x4(Double4 row1, Double4 row2)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m13 = row1.Z;
+ this.m14 = row1.W;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ this.m23 = row2.Z;
+ this.m24 = row2.W;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Double4 this[int row] => throw new InvalidExecutionContextException($"{nameof(Double2x4)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Double2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Double2x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Double3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Double2x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Double4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Double2x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Double2x4 operator -(Double2x4 matrix) => throw new InvalidExecutionContextException($"{nameof(Double2x4)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Double2x4 operator +(Double2x4 left, Double2x4 right) => throw new InvalidExecutionContextException($"{nameof(Double2x4)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Double2x4 operator /(Double2x4 left, Double2x4 right) => throw new InvalidExecutionContextException($"{nameof(Double2x4)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Double2x4 operator *(Double2x4 left, Double2x4 right) => throw new InvalidExecutionContextException($"{nameof(Double2x4)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Double2x4 operator -(Double2x4 left, Double2x4 right) => throw new InvalidExecutionContextException($"{nameof(Double2x4)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 24)]
+ public partial struct Double3x1
+ {
+ [FieldOffset(0)]
+ private double m11;
+
+ [FieldOffset(8)]
+ private double m21;
+
+ [FieldOffset(16)]
+ private double m31;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [3, 1].
+ public Double3x1(double m11, double m21, double m31)
+ {
+ this.m11 = m11;
+ this.m21 = m21;
+ this.m31 = m31;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref double this[int row] => throw new InvalidExecutionContextException($"{nameof(Double3x1)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Double2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Double3x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Double3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Double3x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Double4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Double3x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Double3x1 operator -(Double3x1 matrix) => throw new InvalidExecutionContextException($"{nameof(Double3x1)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Double3x1 operator +(Double3x1 left, Double3x1 right) => throw new InvalidExecutionContextException($"{nameof(Double3x1)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Double3x1 operator /(Double3x1 left, Double3x1 right) => throw new InvalidExecutionContextException($"{nameof(Double3x1)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Double3x1 operator *(Double3x1 left, Double3x1 right) => throw new InvalidExecutionContextException($"{nameof(Double3x1)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Double3x1 operator -(Double3x1 left, Double3x1 right) => throw new InvalidExecutionContextException($"{nameof(Double3x1)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 48)]
+ public partial struct Double3x2
+ {
+ [FieldOffset(0)]
+ private double m11;
+
+ [FieldOffset(8)]
+ private double m12;
+
+ [FieldOffset(16)]
+ private double m21;
+
+ [FieldOffset(24)]
+ private double m22;
+
+ [FieldOffset(32)]
+ private double m31;
+
+ [FieldOffset(40)]
+ private double m32;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ /// The value to assign to the component at position [3, 1].
+ /// The value to assign to the component at position [3, 2].
+ public Double3x2(double m11, double m12, double m21, double m22, double m31, double m32)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m21 = m21;
+ this.m22 = m22;
+ this.m31 = m31;
+ this.m32 = m32;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ /// The value to assign to the row at position [3].
+ public Double3x2(Double2 row1, Double2 row2, Double2 row3)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ this.m31 = row3.X;
+ this.m32 = row3.Y;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Double2 this[int row] => throw new InvalidExecutionContextException($"{nameof(Double3x2)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Double2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Double3x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Double3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Double3x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Double4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Double3x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Double3x2 operator -(Double3x2 matrix) => throw new InvalidExecutionContextException($"{nameof(Double3x2)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Double3x2 operator +(Double3x2 left, Double3x2 right) => throw new InvalidExecutionContextException($"{nameof(Double3x2)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Double3x2 operator /(Double3x2 left, Double3x2 right) => throw new InvalidExecutionContextException($"{nameof(Double3x2)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Double3x2 operator *(Double3x2 left, Double3x2 right) => throw new InvalidExecutionContextException($"{nameof(Double3x2)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Double3x2 operator -(Double3x2 left, Double3x2 right) => throw new InvalidExecutionContextException($"{nameof(Double3x2)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 72)]
+ public partial struct Double3x3
+ {
+ [FieldOffset(0)]
+ private double m11;
+
+ [FieldOffset(8)]
+ private double m12;
+
+ [FieldOffset(16)]
+ private double m13;
+
+ [FieldOffset(24)]
+ private double m21;
+
+ [FieldOffset(32)]
+ private double m22;
+
+ [FieldOffset(40)]
+ private double m23;
+
+ [FieldOffset(48)]
+ private double m31;
+
+ [FieldOffset(56)]
+ private double m32;
+
+ [FieldOffset(64)]
+ private double m33;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [1, 3].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ /// The value to assign to the component at position [2, 3].
+ /// The value to assign to the component at position [3, 1].
+ /// The value to assign to the component at position [3, 2].
+ /// The value to assign to the component at position [3, 3].
+ public Double3x3(double m11, double m12, double m13, double m21, double m22, double m23, double m31, double m32, double m33)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m13 = m13;
+ this.m21 = m21;
+ this.m22 = m22;
+ this.m23 = m23;
+ this.m31 = m31;
+ this.m32 = m32;
+ this.m33 = m33;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ /// The value to assign to the row at position [3].
+ public Double3x3(Double3 row1, Double3 row2, Double3 row3)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m13 = row1.Z;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ this.m23 = row2.Z;
+ this.m31 = row3.X;
+ this.m32 = row3.Y;
+ this.m33 = row3.Z;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Double3 this[int row] => throw new InvalidExecutionContextException($"{nameof(Double3x3)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Double2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Double3x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Double3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Double3x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Double4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Double3x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Double3x3 operator -(Double3x3 matrix) => throw new InvalidExecutionContextException($"{nameof(Double3x3)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Double3x3 operator +(Double3x3 left, Double3x3 right) => throw new InvalidExecutionContextException($"{nameof(Double3x3)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Double3x3 operator /(Double3x3 left, Double3x3 right) => throw new InvalidExecutionContextException($"{nameof(Double3x3)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Double3x3 operator *(Double3x3 left, Double3x3 right) => throw new InvalidExecutionContextException($"{nameof(Double3x3)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Double3x3 operator -(Double3x3 left, Double3x3 right) => throw new InvalidExecutionContextException($"{nameof(Double3x3)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 96)]
+ public partial struct Double3x4
+ {
+ [FieldOffset(0)]
+ private double m11;
+
+ [FieldOffset(8)]
+ private double m12;
+
+ [FieldOffset(16)]
+ private double m13;
+
+ [FieldOffset(24)]
+ private double m14;
+
+ [FieldOffset(32)]
+ private double m21;
+
+ [FieldOffset(40)]
+ private double m22;
+
+ [FieldOffset(48)]
+ private double m23;
+
+ [FieldOffset(56)]
+ private double m24;
+
+ [FieldOffset(64)]
+ private double m31;
+
+ [FieldOffset(72)]
+ private double m32;
+
+ [FieldOffset(80)]
+ private double m33;
+
+ [FieldOffset(88)]
+ private double m34;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [1, 3].
+ /// The value to assign to the component at position [1, 4].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ /// The value to assign to the component at position [2, 3].
+ /// The value to assign to the component at position [2, 4].
+ /// The value to assign to the component at position [3, 1].
+ /// The value to assign to the component at position [3, 2].
+ /// The value to assign to the component at position [3, 3].
+ /// The value to assign to the component at position [3, 4].
+ public Double3x4(double m11, double m12, double m13, double m14, double m21, double m22, double m23, double m24, double m31, double m32, double m33, double m34)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m13 = m13;
+ this.m14 = m14;
+ this.m21 = m21;
+ this.m22 = m22;
+ this.m23 = m23;
+ this.m24 = m24;
+ this.m31 = m31;
+ this.m32 = m32;
+ this.m33 = m33;
+ this.m34 = m34;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ /// The value to assign to the row at position [3].
+ public Double3x4(Double4 row1, Double4 row2, Double4 row3)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m13 = row1.Z;
+ this.m14 = row1.W;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ this.m23 = row2.Z;
+ this.m24 = row2.W;
+ this.m31 = row3.X;
+ this.m32 = row3.Y;
+ this.m33 = row3.Z;
+ this.m34 = row3.W;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Double4 this[int row] => throw new InvalidExecutionContextException($"{nameof(Double3x4)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Double2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Double3x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Double3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Double3x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Double4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Double3x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Double3x4 operator -(Double3x4 matrix) => throw new InvalidExecutionContextException($"{nameof(Double3x4)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Double3x4 operator +(Double3x4 left, Double3x4 right) => throw new InvalidExecutionContextException($"{nameof(Double3x4)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Double3x4 operator /(Double3x4 left, Double3x4 right) => throw new InvalidExecutionContextException($"{nameof(Double3x4)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Double3x4 operator *(Double3x4 left, Double3x4 right) => throw new InvalidExecutionContextException($"{nameof(Double3x4)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Double3x4 operator -(Double3x4 left, Double3x4 right) => throw new InvalidExecutionContextException($"{nameof(Double3x4)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 32)]
+ public partial struct Double4x1
+ {
+ [FieldOffset(0)]
+ private double m11;
+
+ [FieldOffset(8)]
+ private double m21;
+
+ [FieldOffset(16)]
+ private double m31;
+
+ [FieldOffset(24)]
+ private double m41;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [3, 1].
+ /// The value to assign to the component at position [4, 1].
+ public Double4x1(double m11, double m21, double m31, double m41)
+ {
+ this.m11 = m11;
+ this.m21 = m21;
+ this.m31 = m31;
+ this.m41 = m41;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref double this[int row] => throw new InvalidExecutionContextException($"{nameof(Double4x1)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Double2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Double4x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Double3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Double4x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Double4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Double4x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Double4x1 operator -(Double4x1 matrix) => throw new InvalidExecutionContextException($"{nameof(Double4x1)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Double4x1 operator +(Double4x1 left, Double4x1 right) => throw new InvalidExecutionContextException($"{nameof(Double4x1)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Double4x1 operator /(Double4x1 left, Double4x1 right) => throw new InvalidExecutionContextException($"{nameof(Double4x1)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Double4x1 operator *(Double4x1 left, Double4x1 right) => throw new InvalidExecutionContextException($"{nameof(Double4x1)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Double4x1 operator -(Double4x1 left, Double4x1 right) => throw new InvalidExecutionContextException($"{nameof(Double4x1)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 64)]
+ public partial struct Double4x2
+ {
+ [FieldOffset(0)]
+ private double m11;
+
+ [FieldOffset(8)]
+ private double m12;
+
+ [FieldOffset(16)]
+ private double m21;
+
+ [FieldOffset(24)]
+ private double m22;
+
+ [FieldOffset(32)]
+ private double m31;
+
+ [FieldOffset(40)]
+ private double m32;
+
+ [FieldOffset(48)]
+ private double m41;
+
+ [FieldOffset(56)]
+ private double m42;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ /// The value to assign to the component at position [3, 1].
+ /// The value to assign to the component at position [3, 2].
+ /// The value to assign to the component at position [4, 1].
+ /// The value to assign to the component at position [4, 2].
+ public Double4x2(double m11, double m12, double m21, double m22, double m31, double m32, double m41, double m42)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m21 = m21;
+ this.m22 = m22;
+ this.m31 = m31;
+ this.m32 = m32;
+ this.m41 = m41;
+ this.m42 = m42;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ /// The value to assign to the row at position [3].
+ /// The value to assign to the row at position [4].
+ public Double4x2(Double2 row1, Double2 row2, Double2 row3, Double2 row4)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ this.m31 = row3.X;
+ this.m32 = row3.Y;
+ this.m41 = row4.X;
+ this.m42 = row4.Y;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Double2 this[int row] => throw new InvalidExecutionContextException($"{nameof(Double4x2)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Double2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Double4x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Double3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Double4x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Double4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Double4x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Double4x2 operator -(Double4x2 matrix) => throw new InvalidExecutionContextException($"{nameof(Double4x2)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Double4x2 operator +(Double4x2 left, Double4x2 right) => throw new InvalidExecutionContextException($"{nameof(Double4x2)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Double4x2 operator /(Double4x2 left, Double4x2 right) => throw new InvalidExecutionContextException($"{nameof(Double4x2)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Double4x2 operator *(Double4x2 left, Double4x2 right) => throw new InvalidExecutionContextException($"{nameof(Double4x2)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Double4x2 operator -(Double4x2 left, Double4x2 right) => throw new InvalidExecutionContextException($"{nameof(Double4x2)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 96)]
+ public partial struct Double4x3
+ {
+ [FieldOffset(0)]
+ private double m11;
+
+ [FieldOffset(8)]
+ private double m12;
+
+ [FieldOffset(16)]
+ private double m13;
+
+ [FieldOffset(24)]
+ private double m21;
+
+ [FieldOffset(32)]
+ private double m22;
+
+ [FieldOffset(40)]
+ private double m23;
+
+ [FieldOffset(48)]
+ private double m31;
+
+ [FieldOffset(56)]
+ private double m32;
+
+ [FieldOffset(64)]
+ private double m33;
+
+ [FieldOffset(72)]
+ private double m41;
+
+ [FieldOffset(80)]
+ private double m42;
+
+ [FieldOffset(88)]
+ private double m43;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [1, 3].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ /// The value to assign to the component at position [2, 3].
+ /// The value to assign to the component at position [3, 1].
+ /// The value to assign to the component at position [3, 2].
+ /// The value to assign to the component at position [3, 3].
+ /// The value to assign to the component at position [4, 1].
+ /// The value to assign to the component at position [4, 2].
+ /// The value to assign to the component at position [4, 3].
+ public Double4x3(double m11, double m12, double m13, double m21, double m22, double m23, double m31, double m32, double m33, double m41, double m42, double m43)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m13 = m13;
+ this.m21 = m21;
+ this.m22 = m22;
+ this.m23 = m23;
+ this.m31 = m31;
+ this.m32 = m32;
+ this.m33 = m33;
+ this.m41 = m41;
+ this.m42 = m42;
+ this.m43 = m43;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ /// The value to assign to the row at position [3].
+ /// The value to assign to the row at position [4].
+ public Double4x3(Double3 row1, Double3 row2, Double3 row3, Double3 row4)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m13 = row1.Z;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ this.m23 = row2.Z;
+ this.m31 = row3.X;
+ this.m32 = row3.Y;
+ this.m33 = row3.Z;
+ this.m41 = row4.X;
+ this.m42 = row4.Y;
+ this.m43 = row4.Z;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Double3 this[int row] => throw new InvalidExecutionContextException($"{nameof(Double4x3)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Double2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Double4x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Double3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Double4x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Double4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Double4x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Double4x3 operator -(Double4x3 matrix) => throw new InvalidExecutionContextException($"{nameof(Double4x3)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Double4x3 operator +(Double4x3 left, Double4x3 right) => throw new InvalidExecutionContextException($"{nameof(Double4x3)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Double4x3 operator /(Double4x3 left, Double4x3 right) => throw new InvalidExecutionContextException($"{nameof(Double4x3)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Double4x3 operator *(Double4x3 left, Double4x3 right) => throw new InvalidExecutionContextException($"{nameof(Double4x3)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Double4x3 operator -(Double4x3 left, Double4x3 right) => throw new InvalidExecutionContextException($"{nameof(Double4x3)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 128)]
+ public partial struct Double4x4
+ {
+ [FieldOffset(0)]
+ private double m11;
+
+ [FieldOffset(8)]
+ private double m12;
+
+ [FieldOffset(16)]
+ private double m13;
+
+ [FieldOffset(24)]
+ private double m14;
+
+ [FieldOffset(32)]
+ private double m21;
+
+ [FieldOffset(40)]
+ private double m22;
+
+ [FieldOffset(48)]
+ private double m23;
+
+ [FieldOffset(56)]
+ private double m24;
+
+ [FieldOffset(64)]
+ private double m31;
+
+ [FieldOffset(72)]
+ private double m32;
+
+ [FieldOffset(80)]
+ private double m33;
+
+ [FieldOffset(88)]
+ private double m34;
+
+ [FieldOffset(96)]
+ private double m41;
+
+ [FieldOffset(104)]
+ private double m42;
+
+ [FieldOffset(112)]
+ private double m43;
+
+ [FieldOffset(120)]
+ private double m44;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [1, 3].
+ /// The value to assign to the component at position [1, 4].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ /// The value to assign to the component at position [2, 3].
+ /// The value to assign to the component at position [2, 4].
+ /// The value to assign to the component at position [3, 1].
+ /// The value to assign to the component at position [3, 2].
+ /// The value to assign to the component at position [3, 3].
+ /// The value to assign to the component at position [3, 4].
+ /// The value to assign to the component at position [4, 1].
+ /// The value to assign to the component at position [4, 2].
+ /// The value to assign to the component at position [4, 3].
+ /// The value to assign to the component at position [4, 4].
+ public Double4x4(double m11, double m12, double m13, double m14, double m21, double m22, double m23, double m24, double m31, double m32, double m33, double m34, double m41, double m42, double m43, double m44)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m13 = m13;
+ this.m14 = m14;
+ this.m21 = m21;
+ this.m22 = m22;
+ this.m23 = m23;
+ this.m24 = m24;
+ this.m31 = m31;
+ this.m32 = m32;
+ this.m33 = m33;
+ this.m34 = m34;
+ this.m41 = m41;
+ this.m42 = m42;
+ this.m43 = m43;
+ this.m44 = m44;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ /// The value to assign to the row at position [3].
+ /// The value to assign to the row at position [4].
+ public Double4x4(Double4 row1, Double4 row2, Double4 row3, Double4 row4)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m13 = row1.Z;
+ this.m14 = row1.W;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ this.m23 = row2.Z;
+ this.m24 = row2.W;
+ this.m31 = row3.X;
+ this.m32 = row3.Y;
+ this.m33 = row3.Z;
+ this.m34 = row3.W;
+ this.m41 = row4.X;
+ this.m42 = row4.Y;
+ this.m43 = row4.Z;
+ this.m44 = row4.W;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Double4 this[int row] => throw new InvalidExecutionContextException($"{nameof(Double4x4)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Double2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Double4x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Double3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Double4x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Double4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Double4x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Double4x4 operator -(Double4x4 matrix) => throw new InvalidExecutionContextException($"{nameof(Double4x4)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Double4x4 operator +(Double4x4 left, Double4x4 right) => throw new InvalidExecutionContextException($"{nameof(Double4x4)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Double4x4 operator /(Double4x4 left, Double4x4 right) => throw new InvalidExecutionContextException($"{nameof(Double4x4)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Double4x4 operator *(Double4x4 left, Double4x4 right) => throw new InvalidExecutionContextException($"{nameof(Double4x4)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Double4x4 operator -(Double4x4 left, Double4x4 right) => throw new InvalidExecutionContextException($"{nameof(Double4x4)}.-");
+ }
+}
diff --git a/src/ComputeSharp/Core/Primitives/Double/DoubleMxN.tt b/src/ComputeSharp/Core/Primitives/Double/DoubleMxN.tt
new file mode 100644
index 00000000..6ecc4f82
--- /dev/null
+++ b/src/ComputeSharp/Core/Primitives/Double/DoubleMxN.tt
@@ -0,0 +1,4 @@
+<#@include file="..\MatrixType.ttinclude" #>
+<#
+GenerateAllMatrixProperties("Double", sizeof(double));
+#>
\ No newline at end of file
diff --git a/src/ComputeSharp/Core/Primitives/Float/Matrix/FloatMxN.g.cs b/src/ComputeSharp/Core/Primitives/Float/FloatMxN.g.cs
similarity index 100%
rename from src/ComputeSharp/Core/Primitives/Float/Matrix/FloatMxN.g.cs
rename to src/ComputeSharp/Core/Primitives/Float/FloatMxN.g.cs
diff --git a/src/ComputeSharp/Core/Primitives/Float/Matrix/FloatMxN.tt b/src/ComputeSharp/Core/Primitives/Float/FloatMxN.tt
similarity index 53%
rename from src/ComputeSharp/Core/Primitives/Float/Matrix/FloatMxN.tt
rename to src/ComputeSharp/Core/Primitives/Float/FloatMxN.tt
index 5806eb41..97755751 100644
--- a/src/ComputeSharp/Core/Primitives/Float/Matrix/FloatMxN.tt
+++ b/src/ComputeSharp/Core/Primitives/Float/FloatMxN.tt
@@ -1,4 +1,4 @@
-<#@include file="..\..\MatrixType.ttinclude" #>
+<#@include file="..\MatrixType.ttinclude" #>
<#
GenerateAllMatrixProperties("Float", sizeof(float));
#>
\ No newline at end of file
diff --git a/src/ComputeSharp/Core/Primitives/Int/IntMxN.g.cs b/src/ComputeSharp/Core/Primitives/Int/IntMxN.g.cs
new file mode 100644
index 00000000..cbf693cb
--- /dev/null
+++ b/src/ComputeSharp/Core/Primitives/Int/IntMxN.g.cs
@@ -0,0 +1,1892 @@
+using System.Runtime.InteropServices;
+using ComputeSharp.Exceptions;
+
+namespace ComputeSharp
+{
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 4)]
+ public partial struct Int1x1
+ {
+ [FieldOffset(0)]
+ private int m11;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ public Int1x1(int m11)
+ {
+ this.m11 = m11;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref int this[int row] => throw new InvalidExecutionContextException($"{nameof(Int1x1)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Int2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Int1x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Int3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Int1x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Int4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Int1x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Int1x1 operator -(Int1x1 matrix) => throw new InvalidExecutionContextException($"{nameof(Int1x1)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Int1x1 operator +(Int1x1 left, Int1x1 right) => throw new InvalidExecutionContextException($"{nameof(Int1x1)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Int1x1 operator /(Int1x1 left, Int1x1 right) => throw new InvalidExecutionContextException($"{nameof(Int1x1)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Int1x1 operator *(Int1x1 left, Int1x1 right) => throw new InvalidExecutionContextException($"{nameof(Int1x1)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Int1x1 operator -(Int1x1 left, Int1x1 right) => throw new InvalidExecutionContextException($"{nameof(Int1x1)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 8)]
+ public partial struct Int1x2
+ {
+ [FieldOffset(0)]
+ private int m11;
+
+ [FieldOffset(4)]
+ private int m12;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ public Int1x2(int m11, int m12)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Int2 this[int row] => throw new InvalidExecutionContextException($"{nameof(Int1x2)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Int2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Int1x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Int3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Int1x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Int4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Int1x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Int1x2 operator -(Int1x2 matrix) => throw new InvalidExecutionContextException($"{nameof(Int1x2)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Int1x2 operator +(Int1x2 left, Int1x2 right) => throw new InvalidExecutionContextException($"{nameof(Int1x2)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Int1x2 operator /(Int1x2 left, Int1x2 right) => throw new InvalidExecutionContextException($"{nameof(Int1x2)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Int1x2 operator *(Int1x2 left, Int1x2 right) => throw new InvalidExecutionContextException($"{nameof(Int1x2)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Int1x2 operator -(Int1x2 left, Int1x2 right) => throw new InvalidExecutionContextException($"{nameof(Int1x2)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 12)]
+ public partial struct Int1x3
+ {
+ [FieldOffset(0)]
+ private int m11;
+
+ [FieldOffset(4)]
+ private int m12;
+
+ [FieldOffset(8)]
+ private int m13;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [1, 3].
+ public Int1x3(int m11, int m12, int m13)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m13 = m13;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Int3 this[int row] => throw new InvalidExecutionContextException($"{nameof(Int1x3)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Int2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Int1x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Int3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Int1x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Int4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Int1x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Int1x3 operator -(Int1x3 matrix) => throw new InvalidExecutionContextException($"{nameof(Int1x3)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Int1x3 operator +(Int1x3 left, Int1x3 right) => throw new InvalidExecutionContextException($"{nameof(Int1x3)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Int1x3 operator /(Int1x3 left, Int1x3 right) => throw new InvalidExecutionContextException($"{nameof(Int1x3)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Int1x3 operator *(Int1x3 left, Int1x3 right) => throw new InvalidExecutionContextException($"{nameof(Int1x3)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Int1x3 operator -(Int1x3 left, Int1x3 right) => throw new InvalidExecutionContextException($"{nameof(Int1x3)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 16)]
+ public partial struct Int1x4
+ {
+ [FieldOffset(0)]
+ private int m11;
+
+ [FieldOffset(4)]
+ private int m12;
+
+ [FieldOffset(8)]
+ private int m13;
+
+ [FieldOffset(12)]
+ private int m14;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [1, 3].
+ /// The value to assign to the component at position [1, 4].
+ public Int1x4(int m11, int m12, int m13, int m14)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m13 = m13;
+ this.m14 = m14;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Int4 this[int row] => throw new InvalidExecutionContextException($"{nameof(Int1x4)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Int2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Int1x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Int3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Int1x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Int4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Int1x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Int1x4 operator -(Int1x4 matrix) => throw new InvalidExecutionContextException($"{nameof(Int1x4)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Int1x4 operator +(Int1x4 left, Int1x4 right) => throw new InvalidExecutionContextException($"{nameof(Int1x4)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Int1x4 operator /(Int1x4 left, Int1x4 right) => throw new InvalidExecutionContextException($"{nameof(Int1x4)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Int1x4 operator *(Int1x4 left, Int1x4 right) => throw new InvalidExecutionContextException($"{nameof(Int1x4)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Int1x4 operator -(Int1x4 left, Int1x4 right) => throw new InvalidExecutionContextException($"{nameof(Int1x4)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 8)]
+ public partial struct Int2x1
+ {
+ [FieldOffset(0)]
+ private int m11;
+
+ [FieldOffset(4)]
+ private int m21;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [2, 1].
+ public Int2x1(int m11, int m21)
+ {
+ this.m11 = m11;
+ this.m21 = m21;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref int this[int row] => throw new InvalidExecutionContextException($"{nameof(Int2x1)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Int2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Int2x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Int3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Int2x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Int4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Int2x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Int2x1 operator -(Int2x1 matrix) => throw new InvalidExecutionContextException($"{nameof(Int2x1)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Int2x1 operator +(Int2x1 left, Int2x1 right) => throw new InvalidExecutionContextException($"{nameof(Int2x1)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Int2x1 operator /(Int2x1 left, Int2x1 right) => throw new InvalidExecutionContextException($"{nameof(Int2x1)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Int2x1 operator *(Int2x1 left, Int2x1 right) => throw new InvalidExecutionContextException($"{nameof(Int2x1)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Int2x1 operator -(Int2x1 left, Int2x1 right) => throw new InvalidExecutionContextException($"{nameof(Int2x1)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 16)]
+ public partial struct Int2x2
+ {
+ [FieldOffset(0)]
+ private int m11;
+
+ [FieldOffset(4)]
+ private int m12;
+
+ [FieldOffset(8)]
+ private int m21;
+
+ [FieldOffset(12)]
+ private int m22;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ public Int2x2(int m11, int m12, int m21, int m22)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m21 = m21;
+ this.m22 = m22;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ public Int2x2(Int2 row1, Int2 row2)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Int2 this[int row] => throw new InvalidExecutionContextException($"{nameof(Int2x2)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Int2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Int2x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Int3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Int2x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Int4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Int2x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Int2x2 operator -(Int2x2 matrix) => throw new InvalidExecutionContextException($"{nameof(Int2x2)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Int2x2 operator +(Int2x2 left, Int2x2 right) => throw new InvalidExecutionContextException($"{nameof(Int2x2)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Int2x2 operator /(Int2x2 left, Int2x2 right) => throw new InvalidExecutionContextException($"{nameof(Int2x2)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Int2x2 operator *(Int2x2 left, Int2x2 right) => throw new InvalidExecutionContextException($"{nameof(Int2x2)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Int2x2 operator -(Int2x2 left, Int2x2 right) => throw new InvalidExecutionContextException($"{nameof(Int2x2)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 24)]
+ public partial struct Int2x3
+ {
+ [FieldOffset(0)]
+ private int m11;
+
+ [FieldOffset(4)]
+ private int m12;
+
+ [FieldOffset(8)]
+ private int m13;
+
+ [FieldOffset(12)]
+ private int m21;
+
+ [FieldOffset(16)]
+ private int m22;
+
+ [FieldOffset(20)]
+ private int m23;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [1, 3].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ /// The value to assign to the component at position [2, 3].
+ public Int2x3(int m11, int m12, int m13, int m21, int m22, int m23)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m13 = m13;
+ this.m21 = m21;
+ this.m22 = m22;
+ this.m23 = m23;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ public Int2x3(Int3 row1, Int3 row2)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m13 = row1.Z;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ this.m23 = row2.Z;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Int3 this[int row] => throw new InvalidExecutionContextException($"{nameof(Int2x3)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Int2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Int2x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Int3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Int2x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Int4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Int2x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Int2x3 operator -(Int2x3 matrix) => throw new InvalidExecutionContextException($"{nameof(Int2x3)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Int2x3 operator +(Int2x3 left, Int2x3 right) => throw new InvalidExecutionContextException($"{nameof(Int2x3)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Int2x3 operator /(Int2x3 left, Int2x3 right) => throw new InvalidExecutionContextException($"{nameof(Int2x3)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Int2x3 operator *(Int2x3 left, Int2x3 right) => throw new InvalidExecutionContextException($"{nameof(Int2x3)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Int2x3 operator -(Int2x3 left, Int2x3 right) => throw new InvalidExecutionContextException($"{nameof(Int2x3)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 32)]
+ public partial struct Int2x4
+ {
+ [FieldOffset(0)]
+ private int m11;
+
+ [FieldOffset(4)]
+ private int m12;
+
+ [FieldOffset(8)]
+ private int m13;
+
+ [FieldOffset(12)]
+ private int m14;
+
+ [FieldOffset(16)]
+ private int m21;
+
+ [FieldOffset(20)]
+ private int m22;
+
+ [FieldOffset(24)]
+ private int m23;
+
+ [FieldOffset(28)]
+ private int m24;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [1, 3].
+ /// The value to assign to the component at position [1, 4].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ /// The value to assign to the component at position [2, 3].
+ /// The value to assign to the component at position [2, 4].
+ public Int2x4(int m11, int m12, int m13, int m14, int m21, int m22, int m23, int m24)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m13 = m13;
+ this.m14 = m14;
+ this.m21 = m21;
+ this.m22 = m22;
+ this.m23 = m23;
+ this.m24 = m24;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ public Int2x4(Int4 row1, Int4 row2)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m13 = row1.Z;
+ this.m14 = row1.W;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ this.m23 = row2.Z;
+ this.m24 = row2.W;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Int4 this[int row] => throw new InvalidExecutionContextException($"{nameof(Int2x4)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Int2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Int2x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Int3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Int2x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Int4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Int2x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Int2x4 operator -(Int2x4 matrix) => throw new InvalidExecutionContextException($"{nameof(Int2x4)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Int2x4 operator +(Int2x4 left, Int2x4 right) => throw new InvalidExecutionContextException($"{nameof(Int2x4)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Int2x4 operator /(Int2x4 left, Int2x4 right) => throw new InvalidExecutionContextException($"{nameof(Int2x4)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Int2x4 operator *(Int2x4 left, Int2x4 right) => throw new InvalidExecutionContextException($"{nameof(Int2x4)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Int2x4 operator -(Int2x4 left, Int2x4 right) => throw new InvalidExecutionContextException($"{nameof(Int2x4)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 12)]
+ public partial struct Int3x1
+ {
+ [FieldOffset(0)]
+ private int m11;
+
+ [FieldOffset(4)]
+ private int m21;
+
+ [FieldOffset(8)]
+ private int m31;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [3, 1].
+ public Int3x1(int m11, int m21, int m31)
+ {
+ this.m11 = m11;
+ this.m21 = m21;
+ this.m31 = m31;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref int this[int row] => throw new InvalidExecutionContextException($"{nameof(Int3x1)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Int2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Int3x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Int3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Int3x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Int4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Int3x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Int3x1 operator -(Int3x1 matrix) => throw new InvalidExecutionContextException($"{nameof(Int3x1)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Int3x1 operator +(Int3x1 left, Int3x1 right) => throw new InvalidExecutionContextException($"{nameof(Int3x1)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Int3x1 operator /(Int3x1 left, Int3x1 right) => throw new InvalidExecutionContextException($"{nameof(Int3x1)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Int3x1 operator *(Int3x1 left, Int3x1 right) => throw new InvalidExecutionContextException($"{nameof(Int3x1)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Int3x1 operator -(Int3x1 left, Int3x1 right) => throw new InvalidExecutionContextException($"{nameof(Int3x1)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 24)]
+ public partial struct Int3x2
+ {
+ [FieldOffset(0)]
+ private int m11;
+
+ [FieldOffset(4)]
+ private int m12;
+
+ [FieldOffset(8)]
+ private int m21;
+
+ [FieldOffset(12)]
+ private int m22;
+
+ [FieldOffset(16)]
+ private int m31;
+
+ [FieldOffset(20)]
+ private int m32;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ /// The value to assign to the component at position [3, 1].
+ /// The value to assign to the component at position [3, 2].
+ public Int3x2(int m11, int m12, int m21, int m22, int m31, int m32)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m21 = m21;
+ this.m22 = m22;
+ this.m31 = m31;
+ this.m32 = m32;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ /// The value to assign to the row at position [3].
+ public Int3x2(Int2 row1, Int2 row2, Int2 row3)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ this.m31 = row3.X;
+ this.m32 = row3.Y;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Int2 this[int row] => throw new InvalidExecutionContextException($"{nameof(Int3x2)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Int2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Int3x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Int3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Int3x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Int4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Int3x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Int3x2 operator -(Int3x2 matrix) => throw new InvalidExecutionContextException($"{nameof(Int3x2)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Int3x2 operator +(Int3x2 left, Int3x2 right) => throw new InvalidExecutionContextException($"{nameof(Int3x2)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Int3x2 operator /(Int3x2 left, Int3x2 right) => throw new InvalidExecutionContextException($"{nameof(Int3x2)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Int3x2 operator *(Int3x2 left, Int3x2 right) => throw new InvalidExecutionContextException($"{nameof(Int3x2)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Int3x2 operator -(Int3x2 left, Int3x2 right) => throw new InvalidExecutionContextException($"{nameof(Int3x2)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 36)]
+ public partial struct Int3x3
+ {
+ [FieldOffset(0)]
+ private int m11;
+
+ [FieldOffset(4)]
+ private int m12;
+
+ [FieldOffset(8)]
+ private int m13;
+
+ [FieldOffset(12)]
+ private int m21;
+
+ [FieldOffset(16)]
+ private int m22;
+
+ [FieldOffset(20)]
+ private int m23;
+
+ [FieldOffset(24)]
+ private int m31;
+
+ [FieldOffset(28)]
+ private int m32;
+
+ [FieldOffset(32)]
+ private int m33;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [1, 3].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ /// The value to assign to the component at position [2, 3].
+ /// The value to assign to the component at position [3, 1].
+ /// The value to assign to the component at position [3, 2].
+ /// The value to assign to the component at position [3, 3].
+ public Int3x3(int m11, int m12, int m13, int m21, int m22, int m23, int m31, int m32, int m33)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m13 = m13;
+ this.m21 = m21;
+ this.m22 = m22;
+ this.m23 = m23;
+ this.m31 = m31;
+ this.m32 = m32;
+ this.m33 = m33;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ /// The value to assign to the row at position [3].
+ public Int3x3(Int3 row1, Int3 row2, Int3 row3)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m13 = row1.Z;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ this.m23 = row2.Z;
+ this.m31 = row3.X;
+ this.m32 = row3.Y;
+ this.m33 = row3.Z;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Int3 this[int row] => throw new InvalidExecutionContextException($"{nameof(Int3x3)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Int2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Int3x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Int3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Int3x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Int4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Int3x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Int3x3 operator -(Int3x3 matrix) => throw new InvalidExecutionContextException($"{nameof(Int3x3)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Int3x3 operator +(Int3x3 left, Int3x3 right) => throw new InvalidExecutionContextException($"{nameof(Int3x3)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Int3x3 operator /(Int3x3 left, Int3x3 right) => throw new InvalidExecutionContextException($"{nameof(Int3x3)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Int3x3 operator *(Int3x3 left, Int3x3 right) => throw new InvalidExecutionContextException($"{nameof(Int3x3)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Int3x3 operator -(Int3x3 left, Int3x3 right) => throw new InvalidExecutionContextException($"{nameof(Int3x3)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 48)]
+ public partial struct Int3x4
+ {
+ [FieldOffset(0)]
+ private int m11;
+
+ [FieldOffset(4)]
+ private int m12;
+
+ [FieldOffset(8)]
+ private int m13;
+
+ [FieldOffset(12)]
+ private int m14;
+
+ [FieldOffset(16)]
+ private int m21;
+
+ [FieldOffset(20)]
+ private int m22;
+
+ [FieldOffset(24)]
+ private int m23;
+
+ [FieldOffset(28)]
+ private int m24;
+
+ [FieldOffset(32)]
+ private int m31;
+
+ [FieldOffset(36)]
+ private int m32;
+
+ [FieldOffset(40)]
+ private int m33;
+
+ [FieldOffset(44)]
+ private int m34;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [1, 3].
+ /// The value to assign to the component at position [1, 4].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ /// The value to assign to the component at position [2, 3].
+ /// The value to assign to the component at position [2, 4].
+ /// The value to assign to the component at position [3, 1].
+ /// The value to assign to the component at position [3, 2].
+ /// The value to assign to the component at position [3, 3].
+ /// The value to assign to the component at position [3, 4].
+ public Int3x4(int m11, int m12, int m13, int m14, int m21, int m22, int m23, int m24, int m31, int m32, int m33, int m34)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m13 = m13;
+ this.m14 = m14;
+ this.m21 = m21;
+ this.m22 = m22;
+ this.m23 = m23;
+ this.m24 = m24;
+ this.m31 = m31;
+ this.m32 = m32;
+ this.m33 = m33;
+ this.m34 = m34;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ /// The value to assign to the row at position [3].
+ public Int3x4(Int4 row1, Int4 row2, Int4 row3)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m13 = row1.Z;
+ this.m14 = row1.W;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ this.m23 = row2.Z;
+ this.m24 = row2.W;
+ this.m31 = row3.X;
+ this.m32 = row3.Y;
+ this.m33 = row3.Z;
+ this.m34 = row3.W;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Int4 this[int row] => throw new InvalidExecutionContextException($"{nameof(Int3x4)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Int2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Int3x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Int3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Int3x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Int4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Int3x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Int3x4 operator -(Int3x4 matrix) => throw new InvalidExecutionContextException($"{nameof(Int3x4)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Int3x4 operator +(Int3x4 left, Int3x4 right) => throw new InvalidExecutionContextException($"{nameof(Int3x4)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Int3x4 operator /(Int3x4 left, Int3x4 right) => throw new InvalidExecutionContextException($"{nameof(Int3x4)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Int3x4 operator *(Int3x4 left, Int3x4 right) => throw new InvalidExecutionContextException($"{nameof(Int3x4)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Int3x4 operator -(Int3x4 left, Int3x4 right) => throw new InvalidExecutionContextException($"{nameof(Int3x4)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 16)]
+ public partial struct Int4x1
+ {
+ [FieldOffset(0)]
+ private int m11;
+
+ [FieldOffset(4)]
+ private int m21;
+
+ [FieldOffset(8)]
+ private int m31;
+
+ [FieldOffset(12)]
+ private int m41;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [3, 1].
+ /// The value to assign to the component at position [4, 1].
+ public Int4x1(int m11, int m21, int m31, int m41)
+ {
+ this.m11 = m11;
+ this.m21 = m21;
+ this.m31 = m31;
+ this.m41 = m41;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref int this[int row] => throw new InvalidExecutionContextException($"{nameof(Int4x1)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Int2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Int4x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Int3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Int4x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Int4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Int4x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Int4x1 operator -(Int4x1 matrix) => throw new InvalidExecutionContextException($"{nameof(Int4x1)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Int4x1 operator +(Int4x1 left, Int4x1 right) => throw new InvalidExecutionContextException($"{nameof(Int4x1)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Int4x1 operator /(Int4x1 left, Int4x1 right) => throw new InvalidExecutionContextException($"{nameof(Int4x1)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Int4x1 operator *(Int4x1 left, Int4x1 right) => throw new InvalidExecutionContextException($"{nameof(Int4x1)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Int4x1 operator -(Int4x1 left, Int4x1 right) => throw new InvalidExecutionContextException($"{nameof(Int4x1)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 32)]
+ public partial struct Int4x2
+ {
+ [FieldOffset(0)]
+ private int m11;
+
+ [FieldOffset(4)]
+ private int m12;
+
+ [FieldOffset(8)]
+ private int m21;
+
+ [FieldOffset(12)]
+ private int m22;
+
+ [FieldOffset(16)]
+ private int m31;
+
+ [FieldOffset(20)]
+ private int m32;
+
+ [FieldOffset(24)]
+ private int m41;
+
+ [FieldOffset(28)]
+ private int m42;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ /// The value to assign to the component at position [3, 1].
+ /// The value to assign to the component at position [3, 2].
+ /// The value to assign to the component at position [4, 1].
+ /// The value to assign to the component at position [4, 2].
+ public Int4x2(int m11, int m12, int m21, int m22, int m31, int m32, int m41, int m42)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m21 = m21;
+ this.m22 = m22;
+ this.m31 = m31;
+ this.m32 = m32;
+ this.m41 = m41;
+ this.m42 = m42;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ /// The value to assign to the row at position [3].
+ /// The value to assign to the row at position [4].
+ public Int4x2(Int2 row1, Int2 row2, Int2 row3, Int2 row4)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ this.m31 = row3.X;
+ this.m32 = row3.Y;
+ this.m41 = row4.X;
+ this.m42 = row4.Y;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Int2 this[int row] => throw new InvalidExecutionContextException($"{nameof(Int4x2)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Int2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Int4x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Int3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Int4x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Int4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Int4x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Int4x2 operator -(Int4x2 matrix) => throw new InvalidExecutionContextException($"{nameof(Int4x2)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Int4x2 operator +(Int4x2 left, Int4x2 right) => throw new InvalidExecutionContextException($"{nameof(Int4x2)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Int4x2 operator /(Int4x2 left, Int4x2 right) => throw new InvalidExecutionContextException($"{nameof(Int4x2)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Int4x2 operator *(Int4x2 left, Int4x2 right) => throw new InvalidExecutionContextException($"{nameof(Int4x2)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Int4x2 operator -(Int4x2 left, Int4x2 right) => throw new InvalidExecutionContextException($"{nameof(Int4x2)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 48)]
+ public partial struct Int4x3
+ {
+ [FieldOffset(0)]
+ private int m11;
+
+ [FieldOffset(4)]
+ private int m12;
+
+ [FieldOffset(8)]
+ private int m13;
+
+ [FieldOffset(12)]
+ private int m21;
+
+ [FieldOffset(16)]
+ private int m22;
+
+ [FieldOffset(20)]
+ private int m23;
+
+ [FieldOffset(24)]
+ private int m31;
+
+ [FieldOffset(28)]
+ private int m32;
+
+ [FieldOffset(32)]
+ private int m33;
+
+ [FieldOffset(36)]
+ private int m41;
+
+ [FieldOffset(40)]
+ private int m42;
+
+ [FieldOffset(44)]
+ private int m43;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [1, 3].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ /// The value to assign to the component at position [2, 3].
+ /// The value to assign to the component at position [3, 1].
+ /// The value to assign to the component at position [3, 2].
+ /// The value to assign to the component at position [3, 3].
+ /// The value to assign to the component at position [4, 1].
+ /// The value to assign to the component at position [4, 2].
+ /// The value to assign to the component at position [4, 3].
+ public Int4x3(int m11, int m12, int m13, int m21, int m22, int m23, int m31, int m32, int m33, int m41, int m42, int m43)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m13 = m13;
+ this.m21 = m21;
+ this.m22 = m22;
+ this.m23 = m23;
+ this.m31 = m31;
+ this.m32 = m32;
+ this.m33 = m33;
+ this.m41 = m41;
+ this.m42 = m42;
+ this.m43 = m43;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ /// The value to assign to the row at position [3].
+ /// The value to assign to the row at position [4].
+ public Int4x3(Int3 row1, Int3 row2, Int3 row3, Int3 row4)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m13 = row1.Z;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ this.m23 = row2.Z;
+ this.m31 = row3.X;
+ this.m32 = row3.Y;
+ this.m33 = row3.Z;
+ this.m41 = row4.X;
+ this.m42 = row4.Y;
+ this.m43 = row4.Z;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Int3 this[int row] => throw new InvalidExecutionContextException($"{nameof(Int4x3)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Int2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Int4x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Int3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Int4x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Int4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Int4x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Int4x3 operator -(Int4x3 matrix) => throw new InvalidExecutionContextException($"{nameof(Int4x3)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Int4x3 operator +(Int4x3 left, Int4x3 right) => throw new InvalidExecutionContextException($"{nameof(Int4x3)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Int4x3 operator /(Int4x3 left, Int4x3 right) => throw new InvalidExecutionContextException($"{nameof(Int4x3)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Int4x3 operator *(Int4x3 left, Int4x3 right) => throw new InvalidExecutionContextException($"{nameof(Int4x3)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Int4x3 operator -(Int4x3 left, Int4x3 right) => throw new InvalidExecutionContextException($"{nameof(Int4x3)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 64)]
+ public partial struct Int4x4
+ {
+ [FieldOffset(0)]
+ private int m11;
+
+ [FieldOffset(4)]
+ private int m12;
+
+ [FieldOffset(8)]
+ private int m13;
+
+ [FieldOffset(12)]
+ private int m14;
+
+ [FieldOffset(16)]
+ private int m21;
+
+ [FieldOffset(20)]
+ private int m22;
+
+ [FieldOffset(24)]
+ private int m23;
+
+ [FieldOffset(28)]
+ private int m24;
+
+ [FieldOffset(32)]
+ private int m31;
+
+ [FieldOffset(36)]
+ private int m32;
+
+ [FieldOffset(40)]
+ private int m33;
+
+ [FieldOffset(44)]
+ private int m34;
+
+ [FieldOffset(48)]
+ private int m41;
+
+ [FieldOffset(52)]
+ private int m42;
+
+ [FieldOffset(56)]
+ private int m43;
+
+ [FieldOffset(60)]
+ private int m44;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [1, 3].
+ /// The value to assign to the component at position [1, 4].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ /// The value to assign to the component at position [2, 3].
+ /// The value to assign to the component at position [2, 4].
+ /// The value to assign to the component at position [3, 1].
+ /// The value to assign to the component at position [3, 2].
+ /// The value to assign to the component at position [3, 3].
+ /// The value to assign to the component at position [3, 4].
+ /// The value to assign to the component at position [4, 1].
+ /// The value to assign to the component at position [4, 2].
+ /// The value to assign to the component at position [4, 3].
+ /// The value to assign to the component at position [4, 4].
+ public Int4x4(int m11, int m12, int m13, int m14, int m21, int m22, int m23, int m24, int m31, int m32, int m33, int m34, int m41, int m42, int m43, int m44)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m13 = m13;
+ this.m14 = m14;
+ this.m21 = m21;
+ this.m22 = m22;
+ this.m23 = m23;
+ this.m24 = m24;
+ this.m31 = m31;
+ this.m32 = m32;
+ this.m33 = m33;
+ this.m34 = m34;
+ this.m41 = m41;
+ this.m42 = m42;
+ this.m43 = m43;
+ this.m44 = m44;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ /// The value to assign to the row at position [3].
+ /// The value to assign to the row at position [4].
+ public Int4x4(Int4 row1, Int4 row2, Int4 row3, Int4 row4)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m13 = row1.Z;
+ this.m14 = row1.W;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ this.m23 = row2.Z;
+ this.m24 = row2.W;
+ this.m31 = row3.X;
+ this.m32 = row3.Y;
+ this.m33 = row3.Z;
+ this.m34 = row3.W;
+ this.m41 = row4.X;
+ this.m42 = row4.Y;
+ this.m43 = row4.Z;
+ this.m44 = row4.W;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref Int4 this[int row] => throw new InvalidExecutionContextException($"{nameof(Int4x4)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref Int2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(Int4x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref Int3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(Int4x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref Int4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Int4x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static Int4x4 operator -(Int4x4 matrix) => throw new InvalidExecutionContextException($"{nameof(Int4x4)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static Int4x4 operator +(Int4x4 left, Int4x4 right) => throw new InvalidExecutionContextException($"{nameof(Int4x4)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static Int4x4 operator /(Int4x4 left, Int4x4 right) => throw new InvalidExecutionContextException($"{nameof(Int4x4)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static Int4x4 operator *(Int4x4 left, Int4x4 right) => throw new InvalidExecutionContextException($"{nameof(Int4x4)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static Int4x4 operator -(Int4x4 left, Int4x4 right) => throw new InvalidExecutionContextException($"{nameof(Int4x4)}.-");
+ }
+}
diff --git a/src/ComputeSharp/Core/Primitives/Int/IntMxN.tt b/src/ComputeSharp/Core/Primitives/Int/IntMxN.tt
new file mode 100644
index 00000000..bf70cf4d
--- /dev/null
+++ b/src/ComputeSharp/Core/Primitives/Int/IntMxN.tt
@@ -0,0 +1,4 @@
+<#@include file="..\MatrixType.ttinclude" #>
+<#
+GenerateAllMatrixProperties("Int", sizeof(int));
+#>
\ No newline at end of file
diff --git a/src/ComputeSharp/Core/Primitives/UInt/UIntMxN.g.cs b/src/ComputeSharp/Core/Primitives/UInt/UIntMxN.g.cs
new file mode 100644
index 00000000..48e9e25e
--- /dev/null
+++ b/src/ComputeSharp/Core/Primitives/UInt/UIntMxN.g.cs
@@ -0,0 +1,1892 @@
+using System.Runtime.InteropServices;
+using ComputeSharp.Exceptions;
+
+namespace ComputeSharp
+{
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 4)]
+ public partial struct UInt1x1
+ {
+ [FieldOffset(0)]
+ private uint m11;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ public UInt1x1(uint m11)
+ {
+ this.m11 = m11;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref uint this[int row] => throw new InvalidExecutionContextException($"{nameof(UInt1x1)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref UInt2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(UInt1x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref UInt3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(UInt1x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref UInt4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(UInt1x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static UInt1x1 operator -(UInt1x1 matrix) => throw new InvalidExecutionContextException($"{nameof(UInt1x1)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static UInt1x1 operator +(UInt1x1 left, UInt1x1 right) => throw new InvalidExecutionContextException($"{nameof(UInt1x1)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static UInt1x1 operator /(UInt1x1 left, UInt1x1 right) => throw new InvalidExecutionContextException($"{nameof(UInt1x1)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static UInt1x1 operator *(UInt1x1 left, UInt1x1 right) => throw new InvalidExecutionContextException($"{nameof(UInt1x1)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static UInt1x1 operator -(UInt1x1 left, UInt1x1 right) => throw new InvalidExecutionContextException($"{nameof(UInt1x1)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 8)]
+ public partial struct UInt1x2
+ {
+ [FieldOffset(0)]
+ private uint m11;
+
+ [FieldOffset(4)]
+ private uint m12;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ public UInt1x2(uint m11, uint m12)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref UInt2 this[int row] => throw new InvalidExecutionContextException($"{nameof(UInt1x2)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref UInt2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(UInt1x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref UInt3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(UInt1x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref UInt4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(UInt1x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static UInt1x2 operator -(UInt1x2 matrix) => throw new InvalidExecutionContextException($"{nameof(UInt1x2)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static UInt1x2 operator +(UInt1x2 left, UInt1x2 right) => throw new InvalidExecutionContextException($"{nameof(UInt1x2)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static UInt1x2 operator /(UInt1x2 left, UInt1x2 right) => throw new InvalidExecutionContextException($"{nameof(UInt1x2)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static UInt1x2 operator *(UInt1x2 left, UInt1x2 right) => throw new InvalidExecutionContextException($"{nameof(UInt1x2)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static UInt1x2 operator -(UInt1x2 left, UInt1x2 right) => throw new InvalidExecutionContextException($"{nameof(UInt1x2)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 12)]
+ public partial struct UInt1x3
+ {
+ [FieldOffset(0)]
+ private uint m11;
+
+ [FieldOffset(4)]
+ private uint m12;
+
+ [FieldOffset(8)]
+ private uint m13;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [1, 3].
+ public UInt1x3(uint m11, uint m12, uint m13)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m13 = m13;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref UInt3 this[int row] => throw new InvalidExecutionContextException($"{nameof(UInt1x3)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref UInt2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(UInt1x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref UInt3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(UInt1x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref UInt4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(UInt1x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static UInt1x3 operator -(UInt1x3 matrix) => throw new InvalidExecutionContextException($"{nameof(UInt1x3)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static UInt1x3 operator +(UInt1x3 left, UInt1x3 right) => throw new InvalidExecutionContextException($"{nameof(UInt1x3)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static UInt1x3 operator /(UInt1x3 left, UInt1x3 right) => throw new InvalidExecutionContextException($"{nameof(UInt1x3)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static UInt1x3 operator *(UInt1x3 left, UInt1x3 right) => throw new InvalidExecutionContextException($"{nameof(UInt1x3)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static UInt1x3 operator -(UInt1x3 left, UInt1x3 right) => throw new InvalidExecutionContextException($"{nameof(UInt1x3)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 16)]
+ public partial struct UInt1x4
+ {
+ [FieldOffset(0)]
+ private uint m11;
+
+ [FieldOffset(4)]
+ private uint m12;
+
+ [FieldOffset(8)]
+ private uint m13;
+
+ [FieldOffset(12)]
+ private uint m14;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [1, 3].
+ /// The value to assign to the component at position [1, 4].
+ public UInt1x4(uint m11, uint m12, uint m13, uint m14)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m13 = m13;
+ this.m14 = m14;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref UInt4 this[int row] => throw new InvalidExecutionContextException($"{nameof(UInt1x4)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref UInt2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(UInt1x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref UInt3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(UInt1x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref UInt4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(UInt1x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static UInt1x4 operator -(UInt1x4 matrix) => throw new InvalidExecutionContextException($"{nameof(UInt1x4)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static UInt1x4 operator +(UInt1x4 left, UInt1x4 right) => throw new InvalidExecutionContextException($"{nameof(UInt1x4)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static UInt1x4 operator /(UInt1x4 left, UInt1x4 right) => throw new InvalidExecutionContextException($"{nameof(UInt1x4)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static UInt1x4 operator *(UInt1x4 left, UInt1x4 right) => throw new InvalidExecutionContextException($"{nameof(UInt1x4)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static UInt1x4 operator -(UInt1x4 left, UInt1x4 right) => throw new InvalidExecutionContextException($"{nameof(UInt1x4)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 8)]
+ public partial struct UInt2x1
+ {
+ [FieldOffset(0)]
+ private uint m11;
+
+ [FieldOffset(4)]
+ private uint m21;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [2, 1].
+ public UInt2x1(uint m11, uint m21)
+ {
+ this.m11 = m11;
+ this.m21 = m21;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref uint this[int row] => throw new InvalidExecutionContextException($"{nameof(UInt2x1)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref UInt2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(UInt2x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref UInt3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(UInt2x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref UInt4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(UInt2x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static UInt2x1 operator -(UInt2x1 matrix) => throw new InvalidExecutionContextException($"{nameof(UInt2x1)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static UInt2x1 operator +(UInt2x1 left, UInt2x1 right) => throw new InvalidExecutionContextException($"{nameof(UInt2x1)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static UInt2x1 operator /(UInt2x1 left, UInt2x1 right) => throw new InvalidExecutionContextException($"{nameof(UInt2x1)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static UInt2x1 operator *(UInt2x1 left, UInt2x1 right) => throw new InvalidExecutionContextException($"{nameof(UInt2x1)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static UInt2x1 operator -(UInt2x1 left, UInt2x1 right) => throw new InvalidExecutionContextException($"{nameof(UInt2x1)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 16)]
+ public partial struct UInt2x2
+ {
+ [FieldOffset(0)]
+ private uint m11;
+
+ [FieldOffset(4)]
+ private uint m12;
+
+ [FieldOffset(8)]
+ private uint m21;
+
+ [FieldOffset(12)]
+ private uint m22;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ public UInt2x2(uint m11, uint m12, uint m21, uint m22)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m21 = m21;
+ this.m22 = m22;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ public UInt2x2(UInt2 row1, UInt2 row2)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref UInt2 this[int row] => throw new InvalidExecutionContextException($"{nameof(UInt2x2)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref UInt2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(UInt2x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref UInt3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(UInt2x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref UInt4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(UInt2x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static UInt2x2 operator -(UInt2x2 matrix) => throw new InvalidExecutionContextException($"{nameof(UInt2x2)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static UInt2x2 operator +(UInt2x2 left, UInt2x2 right) => throw new InvalidExecutionContextException($"{nameof(UInt2x2)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static UInt2x2 operator /(UInt2x2 left, UInt2x2 right) => throw new InvalidExecutionContextException($"{nameof(UInt2x2)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static UInt2x2 operator *(UInt2x2 left, UInt2x2 right) => throw new InvalidExecutionContextException($"{nameof(UInt2x2)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static UInt2x2 operator -(UInt2x2 left, UInt2x2 right) => throw new InvalidExecutionContextException($"{nameof(UInt2x2)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 24)]
+ public partial struct UInt2x3
+ {
+ [FieldOffset(0)]
+ private uint m11;
+
+ [FieldOffset(4)]
+ private uint m12;
+
+ [FieldOffset(8)]
+ private uint m13;
+
+ [FieldOffset(12)]
+ private uint m21;
+
+ [FieldOffset(16)]
+ private uint m22;
+
+ [FieldOffset(20)]
+ private uint m23;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [1, 3].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ /// The value to assign to the component at position [2, 3].
+ public UInt2x3(uint m11, uint m12, uint m13, uint m21, uint m22, uint m23)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m13 = m13;
+ this.m21 = m21;
+ this.m22 = m22;
+ this.m23 = m23;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ public UInt2x3(UInt3 row1, UInt3 row2)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m13 = row1.Z;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ this.m23 = row2.Z;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref UInt3 this[int row] => throw new InvalidExecutionContextException($"{nameof(UInt2x3)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref UInt2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(UInt2x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref UInt3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(UInt2x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref UInt4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(UInt2x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static UInt2x3 operator -(UInt2x3 matrix) => throw new InvalidExecutionContextException($"{nameof(UInt2x3)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static UInt2x3 operator +(UInt2x3 left, UInt2x3 right) => throw new InvalidExecutionContextException($"{nameof(UInt2x3)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static UInt2x3 operator /(UInt2x3 left, UInt2x3 right) => throw new InvalidExecutionContextException($"{nameof(UInt2x3)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static UInt2x3 operator *(UInt2x3 left, UInt2x3 right) => throw new InvalidExecutionContextException($"{nameof(UInt2x3)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static UInt2x3 operator -(UInt2x3 left, UInt2x3 right) => throw new InvalidExecutionContextException($"{nameof(UInt2x3)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 32)]
+ public partial struct UInt2x4
+ {
+ [FieldOffset(0)]
+ private uint m11;
+
+ [FieldOffset(4)]
+ private uint m12;
+
+ [FieldOffset(8)]
+ private uint m13;
+
+ [FieldOffset(12)]
+ private uint m14;
+
+ [FieldOffset(16)]
+ private uint m21;
+
+ [FieldOffset(20)]
+ private uint m22;
+
+ [FieldOffset(24)]
+ private uint m23;
+
+ [FieldOffset(28)]
+ private uint m24;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [1, 3].
+ /// The value to assign to the component at position [1, 4].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ /// The value to assign to the component at position [2, 3].
+ /// The value to assign to the component at position [2, 4].
+ public UInt2x4(uint m11, uint m12, uint m13, uint m14, uint m21, uint m22, uint m23, uint m24)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m13 = m13;
+ this.m14 = m14;
+ this.m21 = m21;
+ this.m22 = m22;
+ this.m23 = m23;
+ this.m24 = m24;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ public UInt2x4(UInt4 row1, UInt4 row2)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m13 = row1.Z;
+ this.m14 = row1.W;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ this.m23 = row2.Z;
+ this.m24 = row2.W;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref UInt4 this[int row] => throw new InvalidExecutionContextException($"{nameof(UInt2x4)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref UInt2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(UInt2x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref UInt3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(UInt2x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref UInt4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(UInt2x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static UInt2x4 operator -(UInt2x4 matrix) => throw new InvalidExecutionContextException($"{nameof(UInt2x4)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static UInt2x4 operator +(UInt2x4 left, UInt2x4 right) => throw new InvalidExecutionContextException($"{nameof(UInt2x4)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static UInt2x4 operator /(UInt2x4 left, UInt2x4 right) => throw new InvalidExecutionContextException($"{nameof(UInt2x4)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static UInt2x4 operator *(UInt2x4 left, UInt2x4 right) => throw new InvalidExecutionContextException($"{nameof(UInt2x4)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static UInt2x4 operator -(UInt2x4 left, UInt2x4 right) => throw new InvalidExecutionContextException($"{nameof(UInt2x4)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 12)]
+ public partial struct UInt3x1
+ {
+ [FieldOffset(0)]
+ private uint m11;
+
+ [FieldOffset(4)]
+ private uint m21;
+
+ [FieldOffset(8)]
+ private uint m31;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [3, 1].
+ public UInt3x1(uint m11, uint m21, uint m31)
+ {
+ this.m11 = m11;
+ this.m21 = m21;
+ this.m31 = m31;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref uint this[int row] => throw new InvalidExecutionContextException($"{nameof(UInt3x1)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref UInt2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(UInt3x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref UInt3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(UInt3x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref UInt4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(UInt3x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static UInt3x1 operator -(UInt3x1 matrix) => throw new InvalidExecutionContextException($"{nameof(UInt3x1)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static UInt3x1 operator +(UInt3x1 left, UInt3x1 right) => throw new InvalidExecutionContextException($"{nameof(UInt3x1)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static UInt3x1 operator /(UInt3x1 left, UInt3x1 right) => throw new InvalidExecutionContextException($"{nameof(UInt3x1)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static UInt3x1 operator *(UInt3x1 left, UInt3x1 right) => throw new InvalidExecutionContextException($"{nameof(UInt3x1)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static UInt3x1 operator -(UInt3x1 left, UInt3x1 right) => throw new InvalidExecutionContextException($"{nameof(UInt3x1)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 24)]
+ public partial struct UInt3x2
+ {
+ [FieldOffset(0)]
+ private uint m11;
+
+ [FieldOffset(4)]
+ private uint m12;
+
+ [FieldOffset(8)]
+ private uint m21;
+
+ [FieldOffset(12)]
+ private uint m22;
+
+ [FieldOffset(16)]
+ private uint m31;
+
+ [FieldOffset(20)]
+ private uint m32;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ /// The value to assign to the component at position [3, 1].
+ /// The value to assign to the component at position [3, 2].
+ public UInt3x2(uint m11, uint m12, uint m21, uint m22, uint m31, uint m32)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m21 = m21;
+ this.m22 = m22;
+ this.m31 = m31;
+ this.m32 = m32;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ /// The value to assign to the row at position [3].
+ public UInt3x2(UInt2 row1, UInt2 row2, UInt2 row3)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ this.m31 = row3.X;
+ this.m32 = row3.Y;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref UInt2 this[int row] => throw new InvalidExecutionContextException($"{nameof(UInt3x2)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref UInt2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(UInt3x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref UInt3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(UInt3x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref UInt4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(UInt3x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static UInt3x2 operator -(UInt3x2 matrix) => throw new InvalidExecutionContextException($"{nameof(UInt3x2)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static UInt3x2 operator +(UInt3x2 left, UInt3x2 right) => throw new InvalidExecutionContextException($"{nameof(UInt3x2)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static UInt3x2 operator /(UInt3x2 left, UInt3x2 right) => throw new InvalidExecutionContextException($"{nameof(UInt3x2)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static UInt3x2 operator *(UInt3x2 left, UInt3x2 right) => throw new InvalidExecutionContextException($"{nameof(UInt3x2)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static UInt3x2 operator -(UInt3x2 left, UInt3x2 right) => throw new InvalidExecutionContextException($"{nameof(UInt3x2)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 36)]
+ public partial struct UInt3x3
+ {
+ [FieldOffset(0)]
+ private uint m11;
+
+ [FieldOffset(4)]
+ private uint m12;
+
+ [FieldOffset(8)]
+ private uint m13;
+
+ [FieldOffset(12)]
+ private uint m21;
+
+ [FieldOffset(16)]
+ private uint m22;
+
+ [FieldOffset(20)]
+ private uint m23;
+
+ [FieldOffset(24)]
+ private uint m31;
+
+ [FieldOffset(28)]
+ private uint m32;
+
+ [FieldOffset(32)]
+ private uint m33;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [1, 3].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ /// The value to assign to the component at position [2, 3].
+ /// The value to assign to the component at position [3, 1].
+ /// The value to assign to the component at position [3, 2].
+ /// The value to assign to the component at position [3, 3].
+ public UInt3x3(uint m11, uint m12, uint m13, uint m21, uint m22, uint m23, uint m31, uint m32, uint m33)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m13 = m13;
+ this.m21 = m21;
+ this.m22 = m22;
+ this.m23 = m23;
+ this.m31 = m31;
+ this.m32 = m32;
+ this.m33 = m33;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ /// The value to assign to the row at position [3].
+ public UInt3x3(UInt3 row1, UInt3 row2, UInt3 row3)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m13 = row1.Z;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ this.m23 = row2.Z;
+ this.m31 = row3.X;
+ this.m32 = row3.Y;
+ this.m33 = row3.Z;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref UInt3 this[int row] => throw new InvalidExecutionContextException($"{nameof(UInt3x3)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref UInt2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(UInt3x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref UInt3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(UInt3x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref UInt4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(UInt3x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static UInt3x3 operator -(UInt3x3 matrix) => throw new InvalidExecutionContextException($"{nameof(UInt3x3)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static UInt3x3 operator +(UInt3x3 left, UInt3x3 right) => throw new InvalidExecutionContextException($"{nameof(UInt3x3)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static UInt3x3 operator /(UInt3x3 left, UInt3x3 right) => throw new InvalidExecutionContextException($"{nameof(UInt3x3)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static UInt3x3 operator *(UInt3x3 left, UInt3x3 right) => throw new InvalidExecutionContextException($"{nameof(UInt3x3)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static UInt3x3 operator -(UInt3x3 left, UInt3x3 right) => throw new InvalidExecutionContextException($"{nameof(UInt3x3)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 48)]
+ public partial struct UInt3x4
+ {
+ [FieldOffset(0)]
+ private uint m11;
+
+ [FieldOffset(4)]
+ private uint m12;
+
+ [FieldOffset(8)]
+ private uint m13;
+
+ [FieldOffset(12)]
+ private uint m14;
+
+ [FieldOffset(16)]
+ private uint m21;
+
+ [FieldOffset(20)]
+ private uint m22;
+
+ [FieldOffset(24)]
+ private uint m23;
+
+ [FieldOffset(28)]
+ private uint m24;
+
+ [FieldOffset(32)]
+ private uint m31;
+
+ [FieldOffset(36)]
+ private uint m32;
+
+ [FieldOffset(40)]
+ private uint m33;
+
+ [FieldOffset(44)]
+ private uint m34;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [1, 3].
+ /// The value to assign to the component at position [1, 4].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ /// The value to assign to the component at position [2, 3].
+ /// The value to assign to the component at position [2, 4].
+ /// The value to assign to the component at position [3, 1].
+ /// The value to assign to the component at position [3, 2].
+ /// The value to assign to the component at position [3, 3].
+ /// The value to assign to the component at position [3, 4].
+ public UInt3x4(uint m11, uint m12, uint m13, uint m14, uint m21, uint m22, uint m23, uint m24, uint m31, uint m32, uint m33, uint m34)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m13 = m13;
+ this.m14 = m14;
+ this.m21 = m21;
+ this.m22 = m22;
+ this.m23 = m23;
+ this.m24 = m24;
+ this.m31 = m31;
+ this.m32 = m32;
+ this.m33 = m33;
+ this.m34 = m34;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ /// The value to assign to the row at position [3].
+ public UInt3x4(UInt4 row1, UInt4 row2, UInt4 row3)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m13 = row1.Z;
+ this.m14 = row1.W;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ this.m23 = row2.Z;
+ this.m24 = row2.W;
+ this.m31 = row3.X;
+ this.m32 = row3.Y;
+ this.m33 = row3.Z;
+ this.m34 = row3.W;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref UInt4 this[int row] => throw new InvalidExecutionContextException($"{nameof(UInt3x4)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref UInt2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(UInt3x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref UInt3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(UInt3x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref UInt4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(UInt3x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static UInt3x4 operator -(UInt3x4 matrix) => throw new InvalidExecutionContextException($"{nameof(UInt3x4)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static UInt3x4 operator +(UInt3x4 left, UInt3x4 right) => throw new InvalidExecutionContextException($"{nameof(UInt3x4)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static UInt3x4 operator /(UInt3x4 left, UInt3x4 right) => throw new InvalidExecutionContextException($"{nameof(UInt3x4)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static UInt3x4 operator *(UInt3x4 left, UInt3x4 right) => throw new InvalidExecutionContextException($"{nameof(UInt3x4)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static UInt3x4 operator -(UInt3x4 left, UInt3x4 right) => throw new InvalidExecutionContextException($"{nameof(UInt3x4)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 16)]
+ public partial struct UInt4x1
+ {
+ [FieldOffset(0)]
+ private uint m11;
+
+ [FieldOffset(4)]
+ private uint m21;
+
+ [FieldOffset(8)]
+ private uint m31;
+
+ [FieldOffset(12)]
+ private uint m41;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [3, 1].
+ /// The value to assign to the component at position [4, 1].
+ public UInt4x1(uint m11, uint m21, uint m31, uint m41)
+ {
+ this.m11 = m11;
+ this.m21 = m21;
+ this.m31 = m31;
+ this.m41 = m41;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref uint this[int row] => throw new InvalidExecutionContextException($"{nameof(UInt4x1)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref UInt2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(UInt4x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref UInt3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(UInt4x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref UInt4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(UInt4x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static UInt4x1 operator -(UInt4x1 matrix) => throw new InvalidExecutionContextException($"{nameof(UInt4x1)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static UInt4x1 operator +(UInt4x1 left, UInt4x1 right) => throw new InvalidExecutionContextException($"{nameof(UInt4x1)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static UInt4x1 operator /(UInt4x1 left, UInt4x1 right) => throw new InvalidExecutionContextException($"{nameof(UInt4x1)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static UInt4x1 operator *(UInt4x1 left, UInt4x1 right) => throw new InvalidExecutionContextException($"{nameof(UInt4x1)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static UInt4x1 operator -(UInt4x1 left, UInt4x1 right) => throw new InvalidExecutionContextException($"{nameof(UInt4x1)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 32)]
+ public partial struct UInt4x2
+ {
+ [FieldOffset(0)]
+ private uint m11;
+
+ [FieldOffset(4)]
+ private uint m12;
+
+ [FieldOffset(8)]
+ private uint m21;
+
+ [FieldOffset(12)]
+ private uint m22;
+
+ [FieldOffset(16)]
+ private uint m31;
+
+ [FieldOffset(20)]
+ private uint m32;
+
+ [FieldOffset(24)]
+ private uint m41;
+
+ [FieldOffset(28)]
+ private uint m42;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ /// The value to assign to the component at position [3, 1].
+ /// The value to assign to the component at position [3, 2].
+ /// The value to assign to the component at position [4, 1].
+ /// The value to assign to the component at position [4, 2].
+ public UInt4x2(uint m11, uint m12, uint m21, uint m22, uint m31, uint m32, uint m41, uint m42)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m21 = m21;
+ this.m22 = m22;
+ this.m31 = m31;
+ this.m32 = m32;
+ this.m41 = m41;
+ this.m42 = m42;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ /// The value to assign to the row at position [3].
+ /// The value to assign to the row at position [4].
+ public UInt4x2(UInt2 row1, UInt2 row2, UInt2 row3, UInt2 row4)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ this.m31 = row3.X;
+ this.m32 = row3.Y;
+ this.m41 = row4.X;
+ this.m42 = row4.Y;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref UInt2 this[int row] => throw new InvalidExecutionContextException($"{nameof(UInt4x2)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref UInt2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(UInt4x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref UInt3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(UInt4x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref UInt4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(UInt4x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static UInt4x2 operator -(UInt4x2 matrix) => throw new InvalidExecutionContextException($"{nameof(UInt4x2)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static UInt4x2 operator +(UInt4x2 left, UInt4x2 right) => throw new InvalidExecutionContextException($"{nameof(UInt4x2)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static UInt4x2 operator /(UInt4x2 left, UInt4x2 right) => throw new InvalidExecutionContextException($"{nameof(UInt4x2)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static UInt4x2 operator *(UInt4x2 left, UInt4x2 right) => throw new InvalidExecutionContextException($"{nameof(UInt4x2)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static UInt4x2 operator -(UInt4x2 left, UInt4x2 right) => throw new InvalidExecutionContextException($"{nameof(UInt4x2)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 48)]
+ public partial struct UInt4x3
+ {
+ [FieldOffset(0)]
+ private uint m11;
+
+ [FieldOffset(4)]
+ private uint m12;
+
+ [FieldOffset(8)]
+ private uint m13;
+
+ [FieldOffset(12)]
+ private uint m21;
+
+ [FieldOffset(16)]
+ private uint m22;
+
+ [FieldOffset(20)]
+ private uint m23;
+
+ [FieldOffset(24)]
+ private uint m31;
+
+ [FieldOffset(28)]
+ private uint m32;
+
+ [FieldOffset(32)]
+ private uint m33;
+
+ [FieldOffset(36)]
+ private uint m41;
+
+ [FieldOffset(40)]
+ private uint m42;
+
+ [FieldOffset(44)]
+ private uint m43;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [1, 3].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ /// The value to assign to the component at position [2, 3].
+ /// The value to assign to the component at position [3, 1].
+ /// The value to assign to the component at position [3, 2].
+ /// The value to assign to the component at position [3, 3].
+ /// The value to assign to the component at position [4, 1].
+ /// The value to assign to the component at position [4, 2].
+ /// The value to assign to the component at position [4, 3].
+ public UInt4x3(uint m11, uint m12, uint m13, uint m21, uint m22, uint m23, uint m31, uint m32, uint m33, uint m41, uint m42, uint m43)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m13 = m13;
+ this.m21 = m21;
+ this.m22 = m22;
+ this.m23 = m23;
+ this.m31 = m31;
+ this.m32 = m32;
+ this.m33 = m33;
+ this.m41 = m41;
+ this.m42 = m42;
+ this.m43 = m43;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ /// The value to assign to the row at position [3].
+ /// The value to assign to the row at position [4].
+ public UInt4x3(UInt3 row1, UInt3 row2, UInt3 row3, UInt3 row4)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m13 = row1.Z;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ this.m23 = row2.Z;
+ this.m31 = row3.X;
+ this.m32 = row3.Y;
+ this.m33 = row3.Z;
+ this.m41 = row4.X;
+ this.m42 = row4.Y;
+ this.m43 = row4.Z;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref UInt3 this[int row] => throw new InvalidExecutionContextException($"{nameof(UInt4x3)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref UInt2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(UInt4x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref UInt3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(UInt4x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref UInt4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(UInt4x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static UInt4x3 operator -(UInt4x3 matrix) => throw new InvalidExecutionContextException($"{nameof(UInt4x3)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static UInt4x3 operator +(UInt4x3 left, UInt4x3 right) => throw new InvalidExecutionContextException($"{nameof(UInt4x3)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static UInt4x3 operator /(UInt4x3 left, UInt4x3 right) => throw new InvalidExecutionContextException($"{nameof(UInt4x3)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static UInt4x3 operator *(UInt4x3 left, UInt4x3 right) => throw new InvalidExecutionContextException($"{nameof(UInt4x3)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static UInt4x3 operator -(UInt4x3 left, UInt4x3 right) => throw new InvalidExecutionContextException($"{nameof(UInt4x3)}.-");
+ }
+
+ ///
+ [StructLayout(LayoutKind.Explicit, Size = 64)]
+ public partial struct UInt4x4
+ {
+ [FieldOffset(0)]
+ private uint m11;
+
+ [FieldOffset(4)]
+ private uint m12;
+
+ [FieldOffset(8)]
+ private uint m13;
+
+ [FieldOffset(12)]
+ private uint m14;
+
+ [FieldOffset(16)]
+ private uint m21;
+
+ [FieldOffset(20)]
+ private uint m22;
+
+ [FieldOffset(24)]
+ private uint m23;
+
+ [FieldOffset(28)]
+ private uint m24;
+
+ [FieldOffset(32)]
+ private uint m31;
+
+ [FieldOffset(36)]
+ private uint m32;
+
+ [FieldOffset(40)]
+ private uint m33;
+
+ [FieldOffset(44)]
+ private uint m34;
+
+ [FieldOffset(48)]
+ private uint m41;
+
+ [FieldOffset(52)]
+ private uint m42;
+
+ [FieldOffset(56)]
+ private uint m43;
+
+ [FieldOffset(60)]
+ private uint m44;
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the component at position [1, 1].
+ /// The value to assign to the component at position [1, 2].
+ /// The value to assign to the component at position [1, 3].
+ /// The value to assign to the component at position [1, 4].
+ /// The value to assign to the component at position [2, 1].
+ /// The value to assign to the component at position [2, 2].
+ /// The value to assign to the component at position [2, 3].
+ /// The value to assign to the component at position [2, 4].
+ /// The value to assign to the component at position [3, 1].
+ /// The value to assign to the component at position [3, 2].
+ /// The value to assign to the component at position [3, 3].
+ /// The value to assign to the component at position [3, 4].
+ /// The value to assign to the component at position [4, 1].
+ /// The value to assign to the component at position [4, 2].
+ /// The value to assign to the component at position [4, 3].
+ /// The value to assign to the component at position [4, 4].
+ public UInt4x4(uint m11, uint m12, uint m13, uint m14, uint m21, uint m22, uint m23, uint m24, uint m31, uint m32, uint m33, uint m34, uint m41, uint m42, uint m43, uint m44)
+ {
+ this.m11 = m11;
+ this.m12 = m12;
+ this.m13 = m13;
+ this.m14 = m14;
+ this.m21 = m21;
+ this.m22 = m22;
+ this.m23 = m23;
+ this.m24 = m24;
+ this.m31 = m31;
+ this.m32 = m32;
+ this.m33 = m33;
+ this.m34 = m34;
+ this.m41 = m41;
+ this.m42 = m42;
+ this.m43 = m43;
+ this.m44 = m44;
+ }
+
+ ///
+ /// Creates a new instance with the specified parameters.
+ ///
+ /// The value to assign to the row at position [1].
+ /// The value to assign to the row at position [2].
+ /// The value to assign to the row at position [3].
+ /// The value to assign to the row at position [4].
+ public UInt4x4(UInt4 row1, UInt4 row2, UInt4 row3, UInt4 row4)
+ {
+ this.m11 = row1.X;
+ this.m12 = row1.Y;
+ this.m13 = row1.Z;
+ this.m14 = row1.W;
+ this.m21 = row2.X;
+ this.m22 = row2.Y;
+ this.m23 = row2.Z;
+ this.m24 = row2.W;
+ this.m31 = row3.X;
+ this.m32 = row3.Y;
+ this.m33 = row3.Z;
+ this.m34 = row3.W;
+ this.m41 = row4.X;
+ this.m42 = row4.Y;
+ this.m43 = row4.Z;
+ this.m44 = row4.W;
+ }
+
+ ///
+ /// Gets a reference to a specific row in the current instance.
+ ///
+ /// The row to access.
+ public ref UInt4 this[int row] => throw new InvalidExecutionContextException($"{nameof(UInt4x4)}[int]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ public ref UInt2 this[MatrixIndex xy0, MatrixIndex xy1] => throw new InvalidExecutionContextException($"{nameof(UInt4x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ public ref UInt3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => throw new InvalidExecutionContextException($"{nameof(UInt4x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Gets a swizzled reference to a specific sequence of items in the current instance.
+ ///
+ /// The identifier of the first item to index.
+ /// The identifier of the second item to index.
+ /// The identifier of the third item to index.
+ /// The identifier of the fourth item to index.
+ public ref UInt4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(UInt4x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
+
+ ///
+ /// Negates a value.
+ ///
+ /// The value to negate.
+ public static UInt4x4 operator -(UInt4x4 matrix) => throw new InvalidExecutionContextException($"{nameof(UInt4x4)}.-");
+
+ ///
+ /// Sums two values.
+ ///
+ /// The first value to sum.
+ /// The second value to sum.
+ public static UInt4x4 operator +(UInt4x4 left, UInt4x4 right) => throw new InvalidExecutionContextException($"{nameof(UInt4x4)}.+");
+
+ ///
+ /// Divides two values (elementwise division).
+ ///
+ /// The first value to divide.
+ /// The second value to divide.
+ public static UInt4x4 operator /(UInt4x4 left, UInt4x4 right) => throw new InvalidExecutionContextException($"{nameof(UInt4x4)}./");
+
+ ///
+ /// Multiplies two values (elementwise product).
+ ///
+ /// The first value to multiply.
+ /// The second value to multiply.
+ public static UInt4x4 operator *(UInt4x4 left, UInt4x4 right) => throw new InvalidExecutionContextException($"{nameof(UInt4x4)}.*");
+
+ ///
+ /// Subtracts two values.
+ ///
+ /// The first value to subtract.
+ /// The second value to subtract.
+ public static UInt4x4 operator -(UInt4x4 left, UInt4x4 right) => throw new InvalidExecutionContextException($"{nameof(UInt4x4)}.-");
+ }
+}
diff --git a/src/ComputeSharp/Core/Primitives/UInt/UIntMxN.tt b/src/ComputeSharp/Core/Primitives/UInt/UIntMxN.tt
new file mode 100644
index 00000000..59d27cd9
--- /dev/null
+++ b/src/ComputeSharp/Core/Primitives/UInt/UIntMxN.tt
@@ -0,0 +1,4 @@
+<#@include file="..\MatrixType.ttinclude" #>
+<#
+GenerateAllMatrixProperties("UInt", sizeof(uint));
+#>
\ No newline at end of file