Added matrix conversion operators from single value

このコミットが含まれているのは:
Sergio Pedri committed 2021-03-04 12:54:59 +01:00
1 親 c9a6b23a64
コミット 019a3b7813
6ファイル変更
+1488

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

+292
ファイルの表示
@@ -49,6 +49,19 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Bool1x1"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Bool1x1"/> instance.</param>
public static implicit operator Bool1x1(bool x)
{
Bool1x1 matrix;
matrix.m11 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Bool1x1"/> value.
/// </summary>
@@ -135,6 +148,20 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Bool1x2"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Bool1x2"/> instance.</param>
public static implicit operator Bool1x2(bool x)
{
Bool1x2 matrix;
matrix.m11 = x;
matrix.m12 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Bool1x2"/> value.
/// </summary>
@@ -232,6 +259,21 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Bool1x3"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Bool1x3"/> instance.</param>
public static implicit operator Bool1x3(bool x)
{
Bool1x3 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Bool1x3"/> value.
/// </summary>
@@ -334,6 +376,22 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Bool1x4"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Bool1x4"/> instance.</param>
public static implicit operator Bool1x4(bool x)
{
Bool1x4 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
matrix.m14 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Bool1x4"/> value.
/// </summary>
@@ -426,6 +484,20 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Bool2x1"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Bool2x1"/> instance.</param>
public static implicit operator Bool2x1(bool x)
{
Bool2x1 matrix;
matrix.m11 = x;
matrix.m21 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Bool2x1"/> value.
/// </summary>
@@ -541,6 +613,22 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Bool2x2"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Bool2x2"/> instance.</param>
public static implicit operator Bool2x2(bool x)
{
Bool2x2 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m21 = x;
matrix.m22 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Bool2x2"/> value.
/// </summary>
@@ -662,6 +750,24 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Bool2x3"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Bool2x3"/> instance.</param>
public static implicit operator Bool2x3(bool x)
{
Bool2x3 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m23 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Bool2x3"/> value.
/// </summary>
@@ -795,6 +901,26 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Bool2x4"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Bool2x4"/> instance.</param>
public static implicit operator Bool2x4(bool x)
{
Bool2x4 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
matrix.m14 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m23 = x;
matrix.m24 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Bool2x4"/> value.
/// </summary>
@@ -886,6 +1012,21 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Bool3x1"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Bool3x1"/> instance.</param>
public static implicit operator Bool3x1(bool x)
{
Bool3x1 matrix;
matrix.m11 = x;
matrix.m21 = x;
matrix.m31 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Bool3x1"/> value.
/// </summary>
@@ -1014,6 +1155,24 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Bool3x2"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Bool3x2"/> instance.</param>
public static implicit operator Bool3x2(bool x)
{
Bool3x2 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m31 = x;
matrix.m32 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Bool3x2"/> value.
/// </summary>
@@ -1154,6 +1313,27 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Bool3x3"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Bool3x3"/> instance.</param>
public static implicit operator Bool3x3(bool x)
{
Bool3x3 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m23 = x;
matrix.m31 = x;
matrix.m32 = x;
matrix.m33 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Bool3x3"/> value.
/// </summary>
@@ -1312,6 +1492,30 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Bool3x4"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Bool3x4"/> instance.</param>
public static implicit operator Bool3x4(bool x)
{
Bool3x4 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
matrix.m14 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m23 = x;
matrix.m24 = x;
matrix.m31 = x;
matrix.m32 = x;
matrix.m33 = x;
matrix.m34 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Bool3x4"/> value.
/// </summary>
@@ -1408,6 +1612,22 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Bool4x1"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Bool4x1"/> instance.</param>
public static implicit operator Bool4x1(bool x)
{
Bool4x1 matrix;
matrix.m11 = x;
matrix.m21 = x;
matrix.m31 = x;
matrix.m41 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Bool4x1"/> value.
/// </summary>
@@ -1549,6 +1769,26 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Bool4x2"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Bool4x2"/> instance.</param>
public static implicit operator Bool4x2(bool x)
{
Bool4x2 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m31 = x;
matrix.m32 = x;
matrix.m41 = x;
matrix.m42 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Bool4x2"/> value.
/// </summary>
@@ -1708,6 +1948,30 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Bool4x3"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Bool4x3"/> instance.</param>
public static implicit operator Bool4x3(bool x)
{
Bool4x3 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m23 = x;
matrix.m31 = x;
matrix.m32 = x;
matrix.m33 = x;
matrix.m41 = x;
matrix.m42 = x;
matrix.m43 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Bool4x3"/> value.
/// </summary>
@@ -1891,6 +2155,34 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Bool4x4"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Bool4x4"/> instance.</param>
public static implicit operator Bool4x4(bool x)
{
Bool4x4 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
matrix.m14 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m23 = x;
matrix.m24 = x;
matrix.m31 = x;
matrix.m32 = x;
matrix.m33 = x;
matrix.m34 = x;
matrix.m41 = x;
matrix.m42 = x;
matrix.m43 = x;
matrix.m44 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Bool4x4"/> value.
/// </summary>
+292
ファイルの表示
@@ -49,6 +49,19 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Double1x1"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Double1x1"/> instance.</param>
public static implicit operator Double1x1(double x)
{
Double1x1 matrix;
matrix.m11 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Double1x1"/> value.
/// </summary>
@@ -135,6 +148,20 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Double1x2"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Double1x2"/> instance.</param>
public static implicit operator Double1x2(double x)
{
Double1x2 matrix;
matrix.m11 = x;
matrix.m12 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Double1x2"/> value.
/// </summary>
@@ -232,6 +259,21 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Double1x3"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Double1x3"/> instance.</param>
public static implicit operator Double1x3(double x)
{
Double1x3 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Double1x3"/> value.
/// </summary>
@@ -334,6 +376,22 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Double1x4"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Double1x4"/> instance.</param>
public static implicit operator Double1x4(double x)
{
Double1x4 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
matrix.m14 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Double1x4"/> value.
/// </summary>
@@ -426,6 +484,20 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Double2x1"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Double2x1"/> instance.</param>
public static implicit operator Double2x1(double x)
{
Double2x1 matrix;
matrix.m11 = x;
matrix.m21 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Double2x1"/> value.
/// </summary>
@@ -541,6 +613,22 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Double2x2"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Double2x2"/> instance.</param>
public static implicit operator Double2x2(double x)
{
Double2x2 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m21 = x;
matrix.m22 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Double2x2"/> value.
/// </summary>
@@ -662,6 +750,24 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Double2x3"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Double2x3"/> instance.</param>
public static implicit operator Double2x3(double x)
{
Double2x3 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m23 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Double2x3"/> value.
/// </summary>
@@ -795,6 +901,26 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Double2x4"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Double2x4"/> instance.</param>
public static implicit operator Double2x4(double x)
{
Double2x4 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
matrix.m14 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m23 = x;
matrix.m24 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Double2x4"/> value.
/// </summary>
@@ -886,6 +1012,21 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Double3x1"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Double3x1"/> instance.</param>
public static implicit operator Double3x1(double x)
{
Double3x1 matrix;
matrix.m11 = x;
matrix.m21 = x;
matrix.m31 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Double3x1"/> value.
/// </summary>
@@ -1014,6 +1155,24 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Double3x2"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Double3x2"/> instance.</param>
public static implicit operator Double3x2(double x)
{
Double3x2 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m31 = x;
matrix.m32 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Double3x2"/> value.
/// </summary>
@@ -1154,6 +1313,27 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Double3x3"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Double3x3"/> instance.</param>
public static implicit operator Double3x3(double x)
{
Double3x3 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m23 = x;
matrix.m31 = x;
matrix.m32 = x;
matrix.m33 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Double3x3"/> value.
/// </summary>
@@ -1312,6 +1492,30 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Double3x4"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Double3x4"/> instance.</param>
public static implicit operator Double3x4(double x)
{
Double3x4 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
matrix.m14 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m23 = x;
matrix.m24 = x;
matrix.m31 = x;
matrix.m32 = x;
matrix.m33 = x;
matrix.m34 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Double3x4"/> value.
/// </summary>
@@ -1408,6 +1612,22 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Double4x1"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Double4x1"/> instance.</param>
public static implicit operator Double4x1(double x)
{
Double4x1 matrix;
matrix.m11 = x;
matrix.m21 = x;
matrix.m31 = x;
matrix.m41 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Double4x1"/> value.
/// </summary>
@@ -1549,6 +1769,26 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Double4x2"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Double4x2"/> instance.</param>
public static implicit operator Double4x2(double x)
{
Double4x2 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m31 = x;
matrix.m32 = x;
matrix.m41 = x;
matrix.m42 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Double4x2"/> value.
/// </summary>
@@ -1708,6 +1948,30 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Double4x3"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Double4x3"/> instance.</param>
public static implicit operator Double4x3(double x)
{
Double4x3 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m23 = x;
matrix.m31 = x;
matrix.m32 = x;
matrix.m33 = x;
matrix.m41 = x;
matrix.m42 = x;
matrix.m43 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Double4x3"/> value.
/// </summary>
@@ -1891,6 +2155,34 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Double4x4"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Double4x4"/> instance.</param>
public static implicit operator Double4x4(double x)
{
Double4x4 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
matrix.m14 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m23 = x;
matrix.m24 = x;
matrix.m31 = x;
matrix.m32 = x;
matrix.m33 = x;
matrix.m34 = x;
matrix.m41 = x;
matrix.m42 = x;
matrix.m43 = x;
matrix.m44 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Double4x4"/> value.
/// </summary>
+292
ファイルの表示
@@ -49,6 +49,19 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
public ref Float4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Float1x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
/// <summary>
/// Creates a new <see cref="Float1x1"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Float1x1"/> instance.</param>
public static implicit operator Float1x1(float x)
{
Float1x1 matrix;
matrix.m11 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Float1x1"/> value.
/// </summary>
@@ -135,6 +148,20 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
public ref Float4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Float1x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
/// <summary>
/// Creates a new <see cref="Float1x2"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Float1x2"/> instance.</param>
public static implicit operator Float1x2(float x)
{
Float1x2 matrix;
matrix.m11 = x;
matrix.m12 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Float1x2"/> value.
/// </summary>
@@ -232,6 +259,21 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
public ref Float4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Float1x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
/// <summary>
/// Creates a new <see cref="Float1x3"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Float1x3"/> instance.</param>
public static implicit operator Float1x3(float x)
{
Float1x3 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Float1x3"/> value.
/// </summary>
@@ -334,6 +376,22 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
public ref Float4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Float1x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
/// <summary>
/// Creates a new <see cref="Float1x4"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Float1x4"/> instance.</param>
public static implicit operator Float1x4(float x)
{
Float1x4 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
matrix.m14 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Float1x4"/> value.
/// </summary>
@@ -426,6 +484,20 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
public ref Float4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Float2x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
/// <summary>
/// Creates a new <see cref="Float2x1"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Float2x1"/> instance.</param>
public static implicit operator Float2x1(float x)
{
Float2x1 matrix;
matrix.m11 = x;
matrix.m21 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Float2x1"/> value.
/// </summary>
@@ -541,6 +613,22 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
public ref Float4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Float2x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
/// <summary>
/// Creates a new <see cref="Float2x2"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Float2x2"/> instance.</param>
public static implicit operator Float2x2(float x)
{
Float2x2 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m21 = x;
matrix.m22 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Float2x2"/> value.
/// </summary>
@@ -662,6 +750,24 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
public ref Float4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Float2x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
/// <summary>
/// Creates a new <see cref="Float2x3"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Float2x3"/> instance.</param>
public static implicit operator Float2x3(float x)
{
Float2x3 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m23 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Float2x3"/> value.
/// </summary>
@@ -795,6 +901,26 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
public ref Float4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Float2x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
/// <summary>
/// Creates a new <see cref="Float2x4"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Float2x4"/> instance.</param>
public static implicit operator Float2x4(float x)
{
Float2x4 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
matrix.m14 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m23 = x;
matrix.m24 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Float2x4"/> value.
/// </summary>
@@ -886,6 +1012,21 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
public ref Float4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Float3x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
/// <summary>
/// Creates a new <see cref="Float3x1"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Float3x1"/> instance.</param>
public static implicit operator Float3x1(float x)
{
Float3x1 matrix;
matrix.m11 = x;
matrix.m21 = x;
matrix.m31 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Float3x1"/> value.
/// </summary>
@@ -1014,6 +1155,24 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
public ref Float4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Float3x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
/// <summary>
/// Creates a new <see cref="Float3x2"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Float3x2"/> instance.</param>
public static implicit operator Float3x2(float x)
{
Float3x2 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m31 = x;
matrix.m32 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Float3x2"/> value.
/// </summary>
@@ -1154,6 +1313,27 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
public ref Float4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Float3x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
/// <summary>
/// Creates a new <see cref="Float3x3"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Float3x3"/> instance.</param>
public static implicit operator Float3x3(float x)
{
Float3x3 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m23 = x;
matrix.m31 = x;
matrix.m32 = x;
matrix.m33 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Float3x3"/> value.
/// </summary>
@@ -1312,6 +1492,30 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
public ref Float4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Float3x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
/// <summary>
/// Creates a new <see cref="Float3x4"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Float3x4"/> instance.</param>
public static implicit operator Float3x4(float x)
{
Float3x4 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
matrix.m14 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m23 = x;
matrix.m24 = x;
matrix.m31 = x;
matrix.m32 = x;
matrix.m33 = x;
matrix.m34 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Float3x4"/> value.
/// </summary>
@@ -1408,6 +1612,22 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
public ref Float4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Float4x1)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
/// <summary>
/// Creates a new <see cref="Float4x1"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Float4x1"/> instance.</param>
public static implicit operator Float4x1(float x)
{
Float4x1 matrix;
matrix.m11 = x;
matrix.m21 = x;
matrix.m31 = x;
matrix.m41 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Float4x1"/> value.
/// </summary>
@@ -1549,6 +1769,26 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
public ref Float4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Float4x2)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
/// <summary>
/// Creates a new <see cref="Float4x2"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Float4x2"/> instance.</param>
public static implicit operator Float4x2(float x)
{
Float4x2 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m31 = x;
matrix.m32 = x;
matrix.m41 = x;
matrix.m42 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Float4x2"/> value.
/// </summary>
@@ -1708,6 +1948,30 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
public ref Float4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Float4x3)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
/// <summary>
/// Creates a new <see cref="Float4x3"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Float4x3"/> instance.</param>
public static implicit operator Float4x3(float x)
{
Float4x3 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m23 = x;
matrix.m31 = x;
matrix.m32 = x;
matrix.m33 = x;
matrix.m41 = x;
matrix.m42 = x;
matrix.m43 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Float4x3"/> value.
/// </summary>
@@ -1891,6 +2155,34 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
public ref Float4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(Float4x4)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
/// <summary>
/// Creates a new <see cref="Float4x4"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Float4x4"/> instance.</param>
public static implicit operator Float4x4(float x)
{
Float4x4 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
matrix.m14 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m23 = x;
matrix.m24 = x;
matrix.m31 = x;
matrix.m32 = x;
matrix.m33 = x;
matrix.m34 = x;
matrix.m41 = x;
matrix.m42 = x;
matrix.m43 = x;
matrix.m44 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Float4x4"/> value.
/// </summary>
+292
ファイルの表示
@@ -49,6 +49,19 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Int1x1"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Int1x1"/> instance.</param>
public static implicit operator Int1x1(int x)
{
Int1x1 matrix;
matrix.m11 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Int1x1"/> value.
/// </summary>
@@ -135,6 +148,20 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Int1x2"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Int1x2"/> instance.</param>
public static implicit operator Int1x2(int x)
{
Int1x2 matrix;
matrix.m11 = x;
matrix.m12 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Int1x2"/> value.
/// </summary>
@@ -232,6 +259,21 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Int1x3"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Int1x3"/> instance.</param>
public static implicit operator Int1x3(int x)
{
Int1x3 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Int1x3"/> value.
/// </summary>
@@ -334,6 +376,22 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Int1x4"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Int1x4"/> instance.</param>
public static implicit operator Int1x4(int x)
{
Int1x4 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
matrix.m14 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Int1x4"/> value.
/// </summary>
@@ -426,6 +484,20 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Int2x1"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Int2x1"/> instance.</param>
public static implicit operator Int2x1(int x)
{
Int2x1 matrix;
matrix.m11 = x;
matrix.m21 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Int2x1"/> value.
/// </summary>
@@ -541,6 +613,22 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Int2x2"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Int2x2"/> instance.</param>
public static implicit operator Int2x2(int x)
{
Int2x2 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m21 = x;
matrix.m22 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Int2x2"/> value.
/// </summary>
@@ -662,6 +750,24 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Int2x3"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Int2x3"/> instance.</param>
public static implicit operator Int2x3(int x)
{
Int2x3 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m23 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Int2x3"/> value.
/// </summary>
@@ -795,6 +901,26 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Int2x4"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Int2x4"/> instance.</param>
public static implicit operator Int2x4(int x)
{
Int2x4 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
matrix.m14 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m23 = x;
matrix.m24 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Int2x4"/> value.
/// </summary>
@@ -886,6 +1012,21 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Int3x1"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Int3x1"/> instance.</param>
public static implicit operator Int3x1(int x)
{
Int3x1 matrix;
matrix.m11 = x;
matrix.m21 = x;
matrix.m31 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Int3x1"/> value.
/// </summary>
@@ -1014,6 +1155,24 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Int3x2"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Int3x2"/> instance.</param>
public static implicit operator Int3x2(int x)
{
Int3x2 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m31 = x;
matrix.m32 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Int3x2"/> value.
/// </summary>
@@ -1154,6 +1313,27 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Int3x3"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Int3x3"/> instance.</param>
public static implicit operator Int3x3(int x)
{
Int3x3 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m23 = x;
matrix.m31 = x;
matrix.m32 = x;
matrix.m33 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Int3x3"/> value.
/// </summary>
@@ -1312,6 +1492,30 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Int3x4"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Int3x4"/> instance.</param>
public static implicit operator Int3x4(int x)
{
Int3x4 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
matrix.m14 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m23 = x;
matrix.m24 = x;
matrix.m31 = x;
matrix.m32 = x;
matrix.m33 = x;
matrix.m34 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Int3x4"/> value.
/// </summary>
@@ -1408,6 +1612,22 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Int4x1"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Int4x1"/> instance.</param>
public static implicit operator Int4x1(int x)
{
Int4x1 matrix;
matrix.m11 = x;
matrix.m21 = x;
matrix.m31 = x;
matrix.m41 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Int4x1"/> value.
/// </summary>
@@ -1549,6 +1769,26 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Int4x2"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Int4x2"/> instance.</param>
public static implicit operator Int4x2(int x)
{
Int4x2 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m31 = x;
matrix.m32 = x;
matrix.m41 = x;
matrix.m42 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Int4x2"/> value.
/// </summary>
@@ -1708,6 +1948,30 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Int4x3"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Int4x3"/> instance.</param>
public static implicit operator Int4x3(int x)
{
Int4x3 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m23 = x;
matrix.m31 = x;
matrix.m32 = x;
matrix.m33 = x;
matrix.m41 = x;
matrix.m42 = x;
matrix.m43 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Int4x3"/> value.
/// </summary>
@@ -1891,6 +2155,34 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="Int4x4"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Int4x4"/> instance.</param>
public static implicit operator Int4x4(int x)
{
Int4x4 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
matrix.m14 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m23 = x;
matrix.m24 = x;
matrix.m31 = x;
matrix.m32 = x;
matrix.m33 = x;
matrix.m34 = x;
matrix.m41 = x;
matrix.m42 = x;
matrix.m43 = x;
matrix.m44 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="Int4x4"/> value.
/// </summary>
+28
ファイルの表示
@@ -146,7 +146,35 @@ void GenerateMatrixProperties(string typeName, int rows, int columns, int elemen
/// <param name="xy2">The identifier of the third item to index.</param>
/// <param name="xy3">The identifier of the fourth item to index.</param>
public ref <#=typeName#>4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => throw new InvalidExecutionContextException($"{nameof(<#=fullTypeName#>)}[{nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}, {nameof(MatrixIndex)}]");
/// <summary>
/// Creates a new <see cref="<#=fullTypeName#>"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="<#=fullTypeName#>"/> instance.</param>
public static implicit operator <#=fullTypeName#>(<#=elementTypeName#> x)
<#
// Complete the conversion operator above
PushIndent(" ");
PushIndent(" ");
WriteLine("{");
PushIndent(" ");
WriteLine($"{fullTypeName} matrix;");
WriteLine("");
for (int i = 1; i <= rows; i++)
for (int j = 1; j <= columns; j++)
{
WriteLine($"matrix.m{i}{j} = x;");
}
WriteLine("");
WriteLine("return matrix;");
PopIndent();
WriteLine("}");
PopIndent();
PopIndent();
// Generate the negation operator
if (elementTypeName != "Bool" && elementTypeName != "UInt")
{
+292
ファイルの表示
@@ -49,6 +49,19 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="UInt1x1"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="UInt1x1"/> instance.</param>
public static implicit operator UInt1x1(uint x)
{
UInt1x1 matrix;
matrix.m11 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="UInt1x1"/> value.
/// </summary>
@@ -135,6 +148,20 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="UInt1x2"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="UInt1x2"/> instance.</param>
public static implicit operator UInt1x2(uint x)
{
UInt1x2 matrix;
matrix.m11 = x;
matrix.m12 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="UInt1x2"/> value.
/// </summary>
@@ -232,6 +259,21 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="UInt1x3"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="UInt1x3"/> instance.</param>
public static implicit operator UInt1x3(uint x)
{
UInt1x3 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="UInt1x3"/> value.
/// </summary>
@@ -334,6 +376,22 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="UInt1x4"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="UInt1x4"/> instance.</param>
public static implicit operator UInt1x4(uint x)
{
UInt1x4 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
matrix.m14 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="UInt1x4"/> value.
/// </summary>
@@ -426,6 +484,20 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="UInt2x1"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="UInt2x1"/> instance.</param>
public static implicit operator UInt2x1(uint x)
{
UInt2x1 matrix;
matrix.m11 = x;
matrix.m21 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="UInt2x1"/> value.
/// </summary>
@@ -541,6 +613,22 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="UInt2x2"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="UInt2x2"/> instance.</param>
public static implicit operator UInt2x2(uint x)
{
UInt2x2 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m21 = x;
matrix.m22 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="UInt2x2"/> value.
/// </summary>
@@ -662,6 +750,24 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="UInt2x3"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="UInt2x3"/> instance.</param>
public static implicit operator UInt2x3(uint x)
{
UInt2x3 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m23 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="UInt2x3"/> value.
/// </summary>
@@ -795,6 +901,26 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="UInt2x4"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="UInt2x4"/> instance.</param>
public static implicit operator UInt2x4(uint x)
{
UInt2x4 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
matrix.m14 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m23 = x;
matrix.m24 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="UInt2x4"/> value.
/// </summary>
@@ -886,6 +1012,21 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="UInt3x1"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="UInt3x1"/> instance.</param>
public static implicit operator UInt3x1(uint x)
{
UInt3x1 matrix;
matrix.m11 = x;
matrix.m21 = x;
matrix.m31 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="UInt3x1"/> value.
/// </summary>
@@ -1014,6 +1155,24 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="UInt3x2"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="UInt3x2"/> instance.</param>
public static implicit operator UInt3x2(uint x)
{
UInt3x2 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m31 = x;
matrix.m32 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="UInt3x2"/> value.
/// </summary>
@@ -1154,6 +1313,27 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="UInt3x3"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="UInt3x3"/> instance.</param>
public static implicit operator UInt3x3(uint x)
{
UInt3x3 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m23 = x;
matrix.m31 = x;
matrix.m32 = x;
matrix.m33 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="UInt3x3"/> value.
/// </summary>
@@ -1312,6 +1492,30 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="UInt3x4"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="UInt3x4"/> instance.</param>
public static implicit operator UInt3x4(uint x)
{
UInt3x4 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
matrix.m14 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m23 = x;
matrix.m24 = x;
matrix.m31 = x;
matrix.m32 = x;
matrix.m33 = x;
matrix.m34 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="UInt3x4"/> value.
/// </summary>
@@ -1408,6 +1612,22 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="UInt4x1"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="UInt4x1"/> instance.</param>
public static implicit operator UInt4x1(uint x)
{
UInt4x1 matrix;
matrix.m11 = x;
matrix.m21 = x;
matrix.m31 = x;
matrix.m41 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="UInt4x1"/> value.
/// </summary>
@@ -1549,6 +1769,26 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="UInt4x2"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="UInt4x2"/> instance.</param>
public static implicit operator UInt4x2(uint x)
{
UInt4x2 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m31 = x;
matrix.m32 = x;
matrix.m41 = x;
matrix.m42 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="UInt4x2"/> value.
/// </summary>
@@ -1708,6 +1948,30 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="UInt4x3"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="UInt4x3"/> instance.</param>
public static implicit operator UInt4x3(uint x)
{
UInt4x3 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m23 = x;
matrix.m31 = x;
matrix.m32 = x;
matrix.m33 = x;
matrix.m41 = x;
matrix.m42 = x;
matrix.m43 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="UInt4x3"/> value.
/// </summary>
@@ -1891,6 +2155,34 @@ namespace ComputeSharp
/// <param name="xy3">The identifier of the fourth item to index.</param>
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)}]");
/// <summary>
/// Creates a new <see cref="UInt4x4"/> value with the same value for all its components.
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="UInt4x4"/> instance.</param>
public static implicit operator UInt4x4(uint x)
{
UInt4x4 matrix;
matrix.m11 = x;
matrix.m12 = x;
matrix.m13 = x;
matrix.m14 = x;
matrix.m21 = x;
matrix.m22 = x;
matrix.m23 = x;
matrix.m24 = x;
matrix.m31 = x;
matrix.m32 = x;
matrix.m33 = x;
matrix.m34 = x;
matrix.m41 = x;
matrix.m42 = x;
matrix.m43 = x;
matrix.m44 = x;
return matrix;
}
/// <summary>
/// Negates a <see cref="UInt4x4"/> value.
/// </summary>