Added matrix transposition operators
このコミットが含まれているのは:
1 親
ee6467fe37
コミット
c9a6b23a64
6ファイル変更
+205
検索条件に一致するファイルはありません
@@ -168,6 +168,12 @@ namespace ComputeSharp
|
||||
/// <param name="left">The first <see cref="Bool1x2"/> value to subtract.</param>
|
||||
/// <param name="right">The second <see cref="Bool1x2"/> value to subtract.</param>
|
||||
public static Bool1x2 operator -(Bool1x2 left, Bool1x2 right) => throw new InvalidExecutionContextException($"{nameof(Bool1x2)}.-");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="Bool2"/> value to a <see cref="Bool1x2"/> one.
|
||||
/// </summary>
|
||||
/// <param name="vector">The input <see cref="Bool2"/> value to cast.</param>
|
||||
public static implicit operator Bool1x2(Bool2 vector) => throw new InvalidExecutionContextException($"{typeof(Bool1x2)}.{nameof(Bool1x2)}({nameof(Bool2)})");
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Bool1x3"/>
|
||||
@@ -259,6 +265,12 @@ namespace ComputeSharp
|
||||
/// <param name="left">The first <see cref="Bool1x3"/> value to subtract.</param>
|
||||
/// <param name="right">The second <see cref="Bool1x3"/> value to subtract.</param>
|
||||
public static Bool1x3 operator -(Bool1x3 left, Bool1x3 right) => throw new InvalidExecutionContextException($"{nameof(Bool1x3)}.-");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="Bool3"/> value to a <see cref="Bool1x3"/> one.
|
||||
/// </summary>
|
||||
/// <param name="vector">The input <see cref="Bool3"/> value to cast.</param>
|
||||
public static implicit operator Bool1x3(Bool3 vector) => throw new InvalidExecutionContextException($"{typeof(Bool1x3)}.{nameof(Bool1x3)}({nameof(Bool3)})");
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Bool1x4"/>
|
||||
@@ -355,6 +367,12 @@ namespace ComputeSharp
|
||||
/// <param name="left">The first <see cref="Bool1x4"/> value to subtract.</param>
|
||||
/// <param name="right">The second <see cref="Bool1x4"/> value to subtract.</param>
|
||||
public static Bool1x4 operator -(Bool1x4 left, Bool1x4 right) => throw new InvalidExecutionContextException($"{nameof(Bool1x4)}.-");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="Bool4"/> value to a <see cref="Bool1x4"/> one.
|
||||
/// </summary>
|
||||
/// <param name="vector">The input <see cref="Bool4"/> value to cast.</param>
|
||||
public static implicit operator Bool1x4(Bool4 vector) => throw new InvalidExecutionContextException($"{typeof(Bool1x4)}.{nameof(Bool1x4)}({nameof(Bool4)})");
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Bool2x1"/>
|
||||
@@ -441,6 +459,12 @@ namespace ComputeSharp
|
||||
/// <param name="left">The first <see cref="Bool2x1"/> value to subtract.</param>
|
||||
/// <param name="right">The second <see cref="Bool2x1"/> value to subtract.</param>
|
||||
public static Bool2x1 operator -(Bool2x1 left, Bool2x1 right) => throw new InvalidExecutionContextException($"{nameof(Bool2x1)}.-");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="Bool2x1"/> value to a <see cref="Bool2"/> one.
|
||||
/// </summary>
|
||||
/// <param name="matrix">The input <see cref="Bool2x1"/> value to cast.</param>
|
||||
public static implicit operator Bool2(Bool2x1 matrix) => throw new InvalidExecutionContextException($"{typeof(Bool2x1)}.{nameof(Bool2)}({nameof(Bool2x1)})");
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Bool2x2"/>
|
||||
@@ -895,6 +919,12 @@ namespace ComputeSharp
|
||||
/// <param name="left">The first <see cref="Bool3x1"/> value to subtract.</param>
|
||||
/// <param name="right">The second <see cref="Bool3x1"/> value to subtract.</param>
|
||||
public static Bool3x1 operator -(Bool3x1 left, Bool3x1 right) => throw new InvalidExecutionContextException($"{nameof(Bool3x1)}.-");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="Bool3x1"/> value to a <see cref="Bool3"/> one.
|
||||
/// </summary>
|
||||
/// <param name="matrix">The input <see cref="Bool3x1"/> value to cast.</param>
|
||||
public static implicit operator Bool3(Bool3x1 matrix) => throw new InvalidExecutionContextException($"{typeof(Bool3x1)}.{nameof(Bool3)}({nameof(Bool3x1)})");
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Bool3x2"/>
|
||||
@@ -1411,6 +1441,12 @@ namespace ComputeSharp
|
||||
/// <param name="left">The first <see cref="Bool4x1"/> value to subtract.</param>
|
||||
/// <param name="right">The second <see cref="Bool4x1"/> value to subtract.</param>
|
||||
public static Bool4x1 operator -(Bool4x1 left, Bool4x1 right) => throw new InvalidExecutionContextException($"{nameof(Bool4x1)}.-");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="Bool4x1"/> value to a <see cref="Bool4"/> one.
|
||||
/// </summary>
|
||||
/// <param name="matrix">The input <see cref="Bool4x1"/> value to cast.</param>
|
||||
public static implicit operator Bool4(Bool4x1 matrix) => throw new InvalidExecutionContextException($"{typeof(Bool4x1)}.{nameof(Bool4)}({nameof(Bool4x1)})");
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Bool4x2"/>
|
||||
|
||||
@@ -168,6 +168,12 @@ namespace ComputeSharp
|
||||
/// <param name="left">The first <see cref="Double1x2"/> value to subtract.</param>
|
||||
/// <param name="right">The second <see cref="Double1x2"/> value to subtract.</param>
|
||||
public static Double1x2 operator -(Double1x2 left, Double1x2 right) => throw new InvalidExecutionContextException($"{nameof(Double1x2)}.-");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="Double2"/> value to a <see cref="Double1x2"/> one.
|
||||
/// </summary>
|
||||
/// <param name="vector">The input <see cref="Double2"/> value to cast.</param>
|
||||
public static implicit operator Double1x2(Double2 vector) => throw new InvalidExecutionContextException($"{typeof(Double1x2)}.{nameof(Double1x2)}({nameof(Double2)})");
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Double1x3"/>
|
||||
@@ -259,6 +265,12 @@ namespace ComputeSharp
|
||||
/// <param name="left">The first <see cref="Double1x3"/> value to subtract.</param>
|
||||
/// <param name="right">The second <see cref="Double1x3"/> value to subtract.</param>
|
||||
public static Double1x3 operator -(Double1x3 left, Double1x3 right) => throw new InvalidExecutionContextException($"{nameof(Double1x3)}.-");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="Double3"/> value to a <see cref="Double1x3"/> one.
|
||||
/// </summary>
|
||||
/// <param name="vector">The input <see cref="Double3"/> value to cast.</param>
|
||||
public static implicit operator Double1x3(Double3 vector) => throw new InvalidExecutionContextException($"{typeof(Double1x3)}.{nameof(Double1x3)}({nameof(Double3)})");
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Double1x4"/>
|
||||
@@ -355,6 +367,12 @@ namespace ComputeSharp
|
||||
/// <param name="left">The first <see cref="Double1x4"/> value to subtract.</param>
|
||||
/// <param name="right">The second <see cref="Double1x4"/> value to subtract.</param>
|
||||
public static Double1x4 operator -(Double1x4 left, Double1x4 right) => throw new InvalidExecutionContextException($"{nameof(Double1x4)}.-");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="Double4"/> value to a <see cref="Double1x4"/> one.
|
||||
/// </summary>
|
||||
/// <param name="vector">The input <see cref="Double4"/> value to cast.</param>
|
||||
public static implicit operator Double1x4(Double4 vector) => throw new InvalidExecutionContextException($"{typeof(Double1x4)}.{nameof(Double1x4)}({nameof(Double4)})");
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Double2x1"/>
|
||||
@@ -441,6 +459,12 @@ namespace ComputeSharp
|
||||
/// <param name="left">The first <see cref="Double2x1"/> value to subtract.</param>
|
||||
/// <param name="right">The second <see cref="Double2x1"/> value to subtract.</param>
|
||||
public static Double2x1 operator -(Double2x1 left, Double2x1 right) => throw new InvalidExecutionContextException($"{nameof(Double2x1)}.-");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="Double2x1"/> value to a <see cref="Double2"/> one.
|
||||
/// </summary>
|
||||
/// <param name="matrix">The input <see cref="Double2x1"/> value to cast.</param>
|
||||
public static implicit operator Double2(Double2x1 matrix) => throw new InvalidExecutionContextException($"{typeof(Double2x1)}.{nameof(Double2)}({nameof(Double2x1)})");
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Double2x2"/>
|
||||
@@ -895,6 +919,12 @@ namespace ComputeSharp
|
||||
/// <param name="left">The first <see cref="Double3x1"/> value to subtract.</param>
|
||||
/// <param name="right">The second <see cref="Double3x1"/> value to subtract.</param>
|
||||
public static Double3x1 operator -(Double3x1 left, Double3x1 right) => throw new InvalidExecutionContextException($"{nameof(Double3x1)}.-");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="Double3x1"/> value to a <see cref="Double3"/> one.
|
||||
/// </summary>
|
||||
/// <param name="matrix">The input <see cref="Double3x1"/> value to cast.</param>
|
||||
public static implicit operator Double3(Double3x1 matrix) => throw new InvalidExecutionContextException($"{typeof(Double3x1)}.{nameof(Double3)}({nameof(Double3x1)})");
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Double3x2"/>
|
||||
@@ -1411,6 +1441,12 @@ namespace ComputeSharp
|
||||
/// <param name="left">The first <see cref="Double4x1"/> value to subtract.</param>
|
||||
/// <param name="right">The second <see cref="Double4x1"/> value to subtract.</param>
|
||||
public static Double4x1 operator -(Double4x1 left, Double4x1 right) => throw new InvalidExecutionContextException($"{nameof(Double4x1)}.-");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="Double4x1"/> value to a <see cref="Double4"/> one.
|
||||
/// </summary>
|
||||
/// <param name="matrix">The input <see cref="Double4x1"/> value to cast.</param>
|
||||
public static implicit operator Double4(Double4x1 matrix) => throw new InvalidExecutionContextException($"{typeof(Double4x1)}.{nameof(Double4)}({nameof(Double4x1)})");
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Double4x2"/>
|
||||
|
||||
@@ -168,6 +168,12 @@ namespace ComputeSharp
|
||||
/// <param name="left">The first <see cref="Float1x2"/> value to subtract.</param>
|
||||
/// <param name="right">The second <see cref="Float1x2"/> value to subtract.</param>
|
||||
public static Float1x2 operator -(Float1x2 left, Float1x2 right) => throw new InvalidExecutionContextException($"{nameof(Float1x2)}.-");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="Float2"/> value to a <see cref="Float1x2"/> one.
|
||||
/// </summary>
|
||||
/// <param name="vector">The input <see cref="Float2"/> value to cast.</param>
|
||||
public static implicit operator Float1x2(Float2 vector) => throw new InvalidExecutionContextException($"{typeof(Float1x2)}.{nameof(Float1x2)}({nameof(Float2)})");
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Float1x3"/>
|
||||
@@ -259,6 +265,12 @@ namespace ComputeSharp
|
||||
/// <param name="left">The first <see cref="Float1x3"/> value to subtract.</param>
|
||||
/// <param name="right">The second <see cref="Float1x3"/> value to subtract.</param>
|
||||
public static Float1x3 operator -(Float1x3 left, Float1x3 right) => throw new InvalidExecutionContextException($"{nameof(Float1x3)}.-");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="Float3"/> value to a <see cref="Float1x3"/> one.
|
||||
/// </summary>
|
||||
/// <param name="vector">The input <see cref="Float3"/> value to cast.</param>
|
||||
public static implicit operator Float1x3(Float3 vector) => throw new InvalidExecutionContextException($"{typeof(Float1x3)}.{nameof(Float1x3)}({nameof(Float3)})");
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Float1x4"/>
|
||||
@@ -355,6 +367,12 @@ namespace ComputeSharp
|
||||
/// <param name="left">The first <see cref="Float1x4"/> value to subtract.</param>
|
||||
/// <param name="right">The second <see cref="Float1x4"/> value to subtract.</param>
|
||||
public static Float1x4 operator -(Float1x4 left, Float1x4 right) => throw new InvalidExecutionContextException($"{nameof(Float1x4)}.-");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="Float4"/> value to a <see cref="Float1x4"/> one.
|
||||
/// </summary>
|
||||
/// <param name="vector">The input <see cref="Float4"/> value to cast.</param>
|
||||
public static implicit operator Float1x4(Float4 vector) => throw new InvalidExecutionContextException($"{typeof(Float1x4)}.{nameof(Float1x4)}({nameof(Float4)})");
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Float2x1"/>
|
||||
@@ -441,6 +459,12 @@ namespace ComputeSharp
|
||||
/// <param name="left">The first <see cref="Float2x1"/> value to subtract.</param>
|
||||
/// <param name="right">The second <see cref="Float2x1"/> value to subtract.</param>
|
||||
public static Float2x1 operator -(Float2x1 left, Float2x1 right) => throw new InvalidExecutionContextException($"{nameof(Float2x1)}.-");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="Float2x1"/> value to a <see cref="Float2"/> one.
|
||||
/// </summary>
|
||||
/// <param name="matrix">The input <see cref="Float2x1"/> value to cast.</param>
|
||||
public static implicit operator Float2(Float2x1 matrix) => throw new InvalidExecutionContextException($"{typeof(Float2x1)}.{nameof(Float2)}({nameof(Float2x1)})");
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Float2x2"/>
|
||||
@@ -895,6 +919,12 @@ namespace ComputeSharp
|
||||
/// <param name="left">The first <see cref="Float3x1"/> value to subtract.</param>
|
||||
/// <param name="right">The second <see cref="Float3x1"/> value to subtract.</param>
|
||||
public static Float3x1 operator -(Float3x1 left, Float3x1 right) => throw new InvalidExecutionContextException($"{nameof(Float3x1)}.-");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="Float3x1"/> value to a <see cref="Float3"/> one.
|
||||
/// </summary>
|
||||
/// <param name="matrix">The input <see cref="Float3x1"/> value to cast.</param>
|
||||
public static implicit operator Float3(Float3x1 matrix) => throw new InvalidExecutionContextException($"{typeof(Float3x1)}.{nameof(Float3)}({nameof(Float3x1)})");
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Float3x2"/>
|
||||
@@ -1411,6 +1441,12 @@ namespace ComputeSharp
|
||||
/// <param name="left">The first <see cref="Float4x1"/> value to subtract.</param>
|
||||
/// <param name="right">The second <see cref="Float4x1"/> value to subtract.</param>
|
||||
public static Float4x1 operator -(Float4x1 left, Float4x1 right) => throw new InvalidExecutionContextException($"{nameof(Float4x1)}.-");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="Float4x1"/> value to a <see cref="Float4"/> one.
|
||||
/// </summary>
|
||||
/// <param name="matrix">The input <see cref="Float4x1"/> value to cast.</param>
|
||||
public static implicit operator Float4(Float4x1 matrix) => throw new InvalidExecutionContextException($"{typeof(Float4x1)}.{nameof(Float4)}({nameof(Float4x1)})");
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Float4x2"/>
|
||||
|
||||
@@ -168,6 +168,12 @@ namespace ComputeSharp
|
||||
/// <param name="left">The first <see cref="Int1x2"/> value to subtract.</param>
|
||||
/// <param name="right">The second <see cref="Int1x2"/> value to subtract.</param>
|
||||
public static Int1x2 operator -(Int1x2 left, Int1x2 right) => throw new InvalidExecutionContextException($"{nameof(Int1x2)}.-");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="Int2"/> value to a <see cref="Int1x2"/> one.
|
||||
/// </summary>
|
||||
/// <param name="vector">The input <see cref="Int2"/> value to cast.</param>
|
||||
public static implicit operator Int1x2(Int2 vector) => throw new InvalidExecutionContextException($"{typeof(Int1x2)}.{nameof(Int1x2)}({nameof(Int2)})");
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Int1x3"/>
|
||||
@@ -259,6 +265,12 @@ namespace ComputeSharp
|
||||
/// <param name="left">The first <see cref="Int1x3"/> value to subtract.</param>
|
||||
/// <param name="right">The second <see cref="Int1x3"/> value to subtract.</param>
|
||||
public static Int1x3 operator -(Int1x3 left, Int1x3 right) => throw new InvalidExecutionContextException($"{nameof(Int1x3)}.-");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="Int3"/> value to a <see cref="Int1x3"/> one.
|
||||
/// </summary>
|
||||
/// <param name="vector">The input <see cref="Int3"/> value to cast.</param>
|
||||
public static implicit operator Int1x3(Int3 vector) => throw new InvalidExecutionContextException($"{typeof(Int1x3)}.{nameof(Int1x3)}({nameof(Int3)})");
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Int1x4"/>
|
||||
@@ -355,6 +367,12 @@ namespace ComputeSharp
|
||||
/// <param name="left">The first <see cref="Int1x4"/> value to subtract.</param>
|
||||
/// <param name="right">The second <see cref="Int1x4"/> value to subtract.</param>
|
||||
public static Int1x4 operator -(Int1x4 left, Int1x4 right) => throw new InvalidExecutionContextException($"{nameof(Int1x4)}.-");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="Int4"/> value to a <see cref="Int1x4"/> one.
|
||||
/// </summary>
|
||||
/// <param name="vector">The input <see cref="Int4"/> value to cast.</param>
|
||||
public static implicit operator Int1x4(Int4 vector) => throw new InvalidExecutionContextException($"{typeof(Int1x4)}.{nameof(Int1x4)}({nameof(Int4)})");
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Int2x1"/>
|
||||
@@ -441,6 +459,12 @@ namespace ComputeSharp
|
||||
/// <param name="left">The first <see cref="Int2x1"/> value to subtract.</param>
|
||||
/// <param name="right">The second <see cref="Int2x1"/> value to subtract.</param>
|
||||
public static Int2x1 operator -(Int2x1 left, Int2x1 right) => throw new InvalidExecutionContextException($"{nameof(Int2x1)}.-");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="Int2x1"/> value to a <see cref="Int2"/> one.
|
||||
/// </summary>
|
||||
/// <param name="matrix">The input <see cref="Int2x1"/> value to cast.</param>
|
||||
public static implicit operator Int2(Int2x1 matrix) => throw new InvalidExecutionContextException($"{typeof(Int2x1)}.{nameof(Int2)}({nameof(Int2x1)})");
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Int2x2"/>
|
||||
@@ -895,6 +919,12 @@ namespace ComputeSharp
|
||||
/// <param name="left">The first <see cref="Int3x1"/> value to subtract.</param>
|
||||
/// <param name="right">The second <see cref="Int3x1"/> value to subtract.</param>
|
||||
public static Int3x1 operator -(Int3x1 left, Int3x1 right) => throw new InvalidExecutionContextException($"{nameof(Int3x1)}.-");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="Int3x1"/> value to a <see cref="Int3"/> one.
|
||||
/// </summary>
|
||||
/// <param name="matrix">The input <see cref="Int3x1"/> value to cast.</param>
|
||||
public static implicit operator Int3(Int3x1 matrix) => throw new InvalidExecutionContextException($"{typeof(Int3x1)}.{nameof(Int3)}({nameof(Int3x1)})");
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Int3x2"/>
|
||||
@@ -1411,6 +1441,12 @@ namespace ComputeSharp
|
||||
/// <param name="left">The first <see cref="Int4x1"/> value to subtract.</param>
|
||||
/// <param name="right">The second <see cref="Int4x1"/> value to subtract.</param>
|
||||
public static Int4x1 operator -(Int4x1 left, Int4x1 right) => throw new InvalidExecutionContextException($"{nameof(Int4x1)}.-");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="Int4x1"/> value to a <see cref="Int4"/> one.
|
||||
/// </summary>
|
||||
/// <param name="matrix">The input <see cref="Int4x1"/> value to cast.</param>
|
||||
public static implicit operator Int4(Int4x1 matrix) => throw new InvalidExecutionContextException($"{typeof(Int4x1)}.{nameof(Int4)}({nameof(Int4x1)})");
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Int4x2"/>
|
||||
|
||||
@@ -192,6 +192,31 @@ void GenerateMatrixProperties(string typeName, int rows, int columns, int elemen
|
||||
/// <param name="left">The first <see cref="<#=fullTypeName#>"/> value to subtract.</param>
|
||||
/// <param name="right">The second <see cref="<#=fullTypeName#>"/> value to subtract.</param>
|
||||
public static <#=fullTypeName#> operator -(<#=fullTypeName#> left, <#=fullTypeName#> right) => throw new InvalidExecutionContextException($"{nameof(<#=fullTypeName#>)}.-");
|
||||
<#
|
||||
}
|
||||
|
||||
// Generate the casting operators for row/column vectors
|
||||
if (rows == 1 && columns > 1)
|
||||
{
|
||||
WriteLine("");
|
||||
#>
|
||||
/// <summary>
|
||||
/// Casts a <see cref="<#=typeName#><#=columns#>"/> value to a <see cref="<#=fullTypeName#>"/> one.
|
||||
/// </summary>
|
||||
/// <param name="vector">The input <see cref="<#=typeName#><#=columns#>"/> value to cast.</param>
|
||||
public static implicit operator <#=fullTypeName#>(<#=typeName#><#=columns#> vector) => throw new InvalidExecutionContextException($"{typeof(<#=fullTypeName#>)}.{nameof(<#=fullTypeName#>)}({nameof(<#=typeName#><#=columns#>)})");
|
||||
<#
|
||||
}
|
||||
|
||||
if (columns == 1 && rows > 1)
|
||||
{
|
||||
WriteLine("");
|
||||
#>
|
||||
/// <summary>
|
||||
/// Casts a <see cref="<#=fullTypeName#>"/> value to a <see cref="<#=typeName#><#=rows#>"/> one.
|
||||
/// </summary>
|
||||
/// <param name="matrix">The input <see cref="<#=fullTypeName#>"/> value to cast.</param>
|
||||
public static implicit operator <#=typeName#><#=rows#>(<#=fullTypeName#> matrix) => throw new InvalidExecutionContextException($"{typeof(<#=fullTypeName#>)}.{nameof(<#=typeName#><#=rows#>)}({nameof(<#=fullTypeName#>)})");
|
||||
<#
|
||||
}
|
||||
#>
|
||||
|
||||
@@ -168,6 +168,12 @@ namespace ComputeSharp
|
||||
/// <param name="left">The first <see cref="UInt1x2"/> value to subtract.</param>
|
||||
/// <param name="right">The second <see cref="UInt1x2"/> value to subtract.</param>
|
||||
public static UInt1x2 operator -(UInt1x2 left, UInt1x2 right) => throw new InvalidExecutionContextException($"{nameof(UInt1x2)}.-");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="UInt2"/> value to a <see cref="UInt1x2"/> one.
|
||||
/// </summary>
|
||||
/// <param name="vector">The input <see cref="UInt2"/> value to cast.</param>
|
||||
public static implicit operator UInt1x2(UInt2 vector) => throw new InvalidExecutionContextException($"{typeof(UInt1x2)}.{nameof(UInt1x2)}({nameof(UInt2)})");
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="UInt1x3"/>
|
||||
@@ -259,6 +265,12 @@ namespace ComputeSharp
|
||||
/// <param name="left">The first <see cref="UInt1x3"/> value to subtract.</param>
|
||||
/// <param name="right">The second <see cref="UInt1x3"/> value to subtract.</param>
|
||||
public static UInt1x3 operator -(UInt1x3 left, UInt1x3 right) => throw new InvalidExecutionContextException($"{nameof(UInt1x3)}.-");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="UInt3"/> value to a <see cref="UInt1x3"/> one.
|
||||
/// </summary>
|
||||
/// <param name="vector">The input <see cref="UInt3"/> value to cast.</param>
|
||||
public static implicit operator UInt1x3(UInt3 vector) => throw new InvalidExecutionContextException($"{typeof(UInt1x3)}.{nameof(UInt1x3)}({nameof(UInt3)})");
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="UInt1x4"/>
|
||||
@@ -355,6 +367,12 @@ namespace ComputeSharp
|
||||
/// <param name="left">The first <see cref="UInt1x4"/> value to subtract.</param>
|
||||
/// <param name="right">The second <see cref="UInt1x4"/> value to subtract.</param>
|
||||
public static UInt1x4 operator -(UInt1x4 left, UInt1x4 right) => throw new InvalidExecutionContextException($"{nameof(UInt1x4)}.-");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="UInt4"/> value to a <see cref="UInt1x4"/> one.
|
||||
/// </summary>
|
||||
/// <param name="vector">The input <see cref="UInt4"/> value to cast.</param>
|
||||
public static implicit operator UInt1x4(UInt4 vector) => throw new InvalidExecutionContextException($"{typeof(UInt1x4)}.{nameof(UInt1x4)}({nameof(UInt4)})");
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="UInt2x1"/>
|
||||
@@ -441,6 +459,12 @@ namespace ComputeSharp
|
||||
/// <param name="left">The first <see cref="UInt2x1"/> value to subtract.</param>
|
||||
/// <param name="right">The second <see cref="UInt2x1"/> value to subtract.</param>
|
||||
public static UInt2x1 operator -(UInt2x1 left, UInt2x1 right) => throw new InvalidExecutionContextException($"{nameof(UInt2x1)}.-");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="UInt2x1"/> value to a <see cref="UInt2"/> one.
|
||||
/// </summary>
|
||||
/// <param name="matrix">The input <see cref="UInt2x1"/> value to cast.</param>
|
||||
public static implicit operator UInt2(UInt2x1 matrix) => throw new InvalidExecutionContextException($"{typeof(UInt2x1)}.{nameof(UInt2)}({nameof(UInt2x1)})");
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="UInt2x2"/>
|
||||
@@ -895,6 +919,12 @@ namespace ComputeSharp
|
||||
/// <param name="left">The first <see cref="UInt3x1"/> value to subtract.</param>
|
||||
/// <param name="right">The second <see cref="UInt3x1"/> value to subtract.</param>
|
||||
public static UInt3x1 operator -(UInt3x1 left, UInt3x1 right) => throw new InvalidExecutionContextException($"{nameof(UInt3x1)}.-");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="UInt3x1"/> value to a <see cref="UInt3"/> one.
|
||||
/// </summary>
|
||||
/// <param name="matrix">The input <see cref="UInt3x1"/> value to cast.</param>
|
||||
public static implicit operator UInt3(UInt3x1 matrix) => throw new InvalidExecutionContextException($"{typeof(UInt3x1)}.{nameof(UInt3)}({nameof(UInt3x1)})");
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="UInt3x2"/>
|
||||
@@ -1411,6 +1441,12 @@ namespace ComputeSharp
|
||||
/// <param name="left">The first <see cref="UInt4x1"/> value to subtract.</param>
|
||||
/// <param name="right">The second <see cref="UInt4x1"/> value to subtract.</param>
|
||||
public static UInt4x1 operator -(UInt4x1 left, UInt4x1 right) => throw new InvalidExecutionContextException($"{nameof(UInt4x1)}.-");
|
||||
|
||||
/// <summary>
|
||||
/// Casts a <see cref="UInt4x1"/> value to a <see cref="UInt4"/> one.
|
||||
/// </summary>
|
||||
/// <param name="matrix">The input <see cref="UInt4x1"/> value to cast.</param>
|
||||
public static implicit operator UInt4(UInt4x1 matrix) => throw new InvalidExecutionContextException($"{typeof(UInt4x1)}.{nameof(UInt4)}({nameof(UInt4x1)})");
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="UInt4x2"/>
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする