diff --git a/src/ComputeSharp.Core/Intrinsics/Hlsl.MulOverloads.ttinclude b/src/ComputeSharp.Core/Intrinsics/Hlsl.MulOverloads.ttinclude
new file mode 100644
index 00000000..ab6c8918
--- /dev/null
+++ b/src/ComputeSharp.Core/Intrinsics/Hlsl.MulOverloads.ttinclude
@@ -0,0 +1,284 @@
+<#@ template debug="false" hostspecific="false" language="C#" #>
+<#@ assembly name="System.Core" #>
+<#
+var MulOverloads = new[]
+{
+ // 1 (scalars)
+ new { Return = "float", Params = new[] { "float", "float" } },
+ new { Return = "int", Params = new[] { "int", "int" } },
+
+ // 2 (scalar by vector)
+ new { Return = "Float2", Params = new[] { "float", "Float2" } },
+ new { Return = "Float3", Params = new[] { "float", "Float3" } },
+ new { Return = "Float4", Params = new[] { "float", "Float4" } },
+ new { Return = "Int2", Params = new[] { "int", "Int2" } },
+ new { Return = "Int3", Params = new[] { "int", "Int3" } },
+ new { Return = "Int4", Params = new[] { "int", "Int4" } },
+
+ // 3 (scalar by matrix)
+ new { Return = "Float1x1", Params = new[] { "float", "Float1x1" } },
+ new { Return = "Float1x2", Params = new[] { "float", "Float1x2" } },
+ new { Return = "Float1x3", Params = new[] { "float", "Float1x3" } },
+ new { Return = "Float1x4", Params = new[] { "float", "Float1x4" } },
+ new { Return = "Float2x1", Params = new[] { "float", "Float2x1" } },
+ new { Return = "Float2x2", Params = new[] { "float", "Float2x2" } },
+ new { Return = "Float2x3", Params = new[] { "float", "Float2x3" } },
+ new { Return = "Float2x4", Params = new[] { "float", "Float2x4" } },
+ new { Return = "Float3x1", Params = new[] { "float", "Float3x1" } },
+ new { Return = "Float3x2", Params = new[] { "float", "Float3x2" } },
+ new { Return = "Float3x3", Params = new[] { "float", "Float3x3" } },
+ new { Return = "Float3x4", Params = new[] { "float", "Float3x4" } },
+ new { Return = "Float4x1", Params = new[] { "float", "Float4x1" } },
+ new { Return = "Float4x2", Params = new[] { "float", "Float4x2" } },
+ new { Return = "Float4x3", Params = new[] { "float", "Float4x3" } },
+ new { Return = "Float4x4", Params = new[] { "float", "Float4x4" } },
+ new { Return = "Int1x1", Params = new[] { "int", "Int1x1" } },
+ new { Return = "Int1x2", Params = new[] { "int", "Int1x2" } },
+ new { Return = "Int1x3", Params = new[] { "int", "Int1x3" } },
+ new { Return = "Int1x4", Params = new[] { "int", "Int1x4" } },
+ new { Return = "Int2x1", Params = new[] { "int", "Int2x1" } },
+ new { Return = "Int2x2", Params = new[] { "int", "Int2x2" } },
+ new { Return = "Int2x3", Params = new[] { "int", "Int2x3" } },
+ new { Return = "Int2x4", Params = new[] { "int", "Int2x4" } },
+ new { Return = "Int3x1", Params = new[] { "int", "Int3x1" } },
+ new { Return = "Int3x2", Params = new[] { "int", "Int3x2" } },
+ new { Return = "Int3x3", Params = new[] { "int", "Int3x3" } },
+ new { Return = "Int3x4", Params = new[] { "int", "Int3x4" } },
+ new { Return = "Int4x1", Params = new[] { "int", "Int4x1" } },
+ new { Return = "Int4x2", Params = new[] { "int", "Int4x2" } },
+ new { Return = "Int4x3", Params = new[] { "int", "Int4x3" } },
+ new { Return = "Int4x4", Params = new[] { "int", "Int4x4" } },
+
+ // 4 (vector by scalar)
+ new { Return = "Float2", Params = new[] { "Float2", "float" } },
+ new { Return = "Float3", Params = new[] { "Float3", "float" } },
+ new { Return = "Float4", Params = new[] { "Float4", "float" } },
+ new { Return = "Int2", Params = new[] { "Int2", "int" } },
+ new { Return = "Int3", Params = new[] { "Int3", "int" } },
+ new { Return = "Int4", Params = new[] { "Int4", "int" } },
+
+ // 5 (vector by vector)
+ new { Return = "float", Params = new[] { "Float2", "Float2" } },
+ new { Return = "float", Params = new[] { "Float3", "Float3" } },
+ new { Return = "float", Params = new[] { "Float4", "Float4" } },
+ new { Return = "int", Params = new[] { "Int2", "Int2" } },
+ new { Return = "int", Params = new[] { "Int3", "Int3" } },
+ new { Return = "int", Params = new[] { "Int4", "Int4" } },
+
+ // 6 (vector by matrix)
+ new { Return = "float", Params = new[] { "Float2", "Float2x1" } },
+ new { Return = "Float2", Params = new[] { "Float2", "Float2x2" } },
+ new { Return = "Float3", Params = new[] { "Float2", "Float2x3" } },
+ new { Return = "Float4", Params = new[] { "Float2", "Float2x4" } },
+ new { Return = "float", Params = new[] { "Float3", "Float3x1" } },
+ new { Return = "Float2", Params = new[] { "Float3", "Float3x2" } },
+ new { Return = "Float3", Params = new[] { "Float3", "Float3x3" } },
+ new { Return = "Float4", Params = new[] { "Float3", "Float3x4" } },
+ new { Return = "float", Params = new[] { "Float4", "Float4x1" } },
+ new { Return = "Float2", Params = new[] { "Float4", "Float4x2" } },
+ new { Return = "Float3", Params = new[] { "Float4", "Float4x3" } },
+ new { Return = "Float4", Params = new[] { "Float4", "Float4x4" } },
+ new { Return = "int", Params = new[] { "Int2", "Int2x1" } },
+ new { Return = "Int2", Params = new[] { "Int2", "Int2x2" } },
+ new { Return = "Int3", Params = new[] { "Int2", "Int2x3" } },
+ new { Return = "Int4", Params = new[] { "Int2", "Int2x4" } },
+ new { Return = "int", Params = new[] { "Int3", "Int3x1" } },
+ new { Return = "Int2", Params = new[] { "Int3", "Int3x2" } },
+ new { Return = "Int3", Params = new[] { "Int3", "Int3x3" } },
+ new { Return = "Int4", Params = new[] { "Int3", "Int3x4" } },
+ new { Return = "int", Params = new[] { "Int4", "Int4x1" } },
+ new { Return = "Int2", Params = new[] { "Int4", "Int4x2" } },
+ new { Return = "Int3", Params = new[] { "Int4", "Int4x3" } },
+ new { Return = "Int4", Params = new[] { "Int4", "Int4x4" } },
+
+ // 7 (matrix by scalar)
+ new { Return = "Float1x1", Params = new[] { "Float1x1", "float" } },
+ new { Return = "Float1x2", Params = new[] { "Float1x2", "float" } },
+ new { Return = "Float1x3", Params = new[] { "Float1x3", "float" } },
+ new { Return = "Float1x4", Params = new[] { "Float1x4", "float" } },
+ new { Return = "Float2x1", Params = new[] { "Float2x1", "float" } },
+ new { Return = "Float2x2", Params = new[] { "Float2x2", "float" } },
+ new { Return = "Float2x3", Params = new[] { "Float2x3", "float" } },
+ new { Return = "Float2x4", Params = new[] { "Float2x4", "float" } },
+ new { Return = "Float3x1", Params = new[] { "Float3x1", "float" } },
+ new { Return = "Float3x2", Params = new[] { "Float3x2", "float" } },
+ new { Return = "Float3x3", Params = new[] { "Float3x3", "float" } },
+ new { Return = "Float3x4", Params = new[] { "Float3x4", "float" } },
+ new { Return = "Float4x1", Params = new[] { "Float4x1", "float" } },
+ new { Return = "Float4x2", Params = new[] { "Float4x2", "float" } },
+ new { Return = "Float4x3", Params = new[] { "Float4x3", "float" } },
+ new { Return = "Float4x4", Params = new[] { "Float4x4", "float" } },
+ new { Return = "Int1x1", Params = new[] { "Int1x1", "int" } },
+ new { Return = "Int1x2", Params = new[] { "Int1x2", "int" } },
+ new { Return = "Int1x3", Params = new[] { "Int1x3", "int" } },
+ new { Return = "Int1x4", Params = new[] { "Int1x4", "int" } },
+ new { Return = "Int2x1", Params = new[] { "Int2x1", "int" } },
+ new { Return = "Int2x2", Params = new[] { "Int2x2", "int" } },
+ new { Return = "Int2x3", Params = new[] { "Int2x3", "int" } },
+ new { Return = "Int2x4", Params = new[] { "Int2x4", "int" } },
+ new { Return = "Int3x1", Params = new[] { "Int3x1", "int" } },
+ new { Return = "Int3x2", Params = new[] { "Int3x2", "int" } },
+ new { Return = "Int3x3", Params = new[] { "Int3x3", "int" } },
+ new { Return = "Int3x4", Params = new[] { "Int3x4", "int" } },
+ new { Return = "Int4x1", Params = new[] { "Int4x1", "int" } },
+ new { Return = "Int4x2", Params = new[] { "Int4x2", "int" } },
+ new { Return = "Int4x3", Params = new[] { "Int4x3", "int" } },
+ new { Return = "Int4x4", Params = new[] { "Int4x4", "int" } },
+
+ // 8 (matrix by vector)
+ new { Return = "float", Params = new[] { "Float1x2", "Float2" } },
+ new { Return = "float", Params = new[] { "Float1x3", "Float3" } },
+ new { Return = "float", Params = new[] { "Float1x4", "Float4" } },
+ new { Return = "Float2", Params = new[] { "Float2x2", "Float2" } },
+ new { Return = "Float2", Params = new[] { "Float2x3", "Float3" } },
+ new { Return = "Float2", Params = new[] { "Float2x4", "Float4" } },
+ new { Return = "Float3", Params = new[] { "Float3x2", "Float2" } },
+ new { Return = "Float3", Params = new[] { "Float3x3", "Float3" } },
+ new { Return = "Float3", Params = new[] { "Float3x4", "Float4" } },
+ new { Return = "Float4", Params = new[] { "Float4x2", "Float2" } },
+ new { Return = "Float4", Params = new[] { "Float4x3", "Float3" } },
+ new { Return = "Float4", Params = new[] { "Float4x4", "Float4" } },
+ new { Return = "int", Params = new[] { "Int1x2", "Int2" } },
+ new { Return = "int", Params = new[] { "Int1x3", "Int3" } },
+ new { Return = "int", Params = new[] { "Int1x4", "Int4" } },
+ new { Return = "Int2", Params = new[] { "Int2x2", "Int2" } },
+ new { Return = "Int2", Params = new[] { "Int2x3", "Int3" } },
+ new { Return = "Int2", Params = new[] { "Int2x4", "Int4" } },
+ new { Return = "Int3", Params = new[] { "Int3x2", "Int2" } },
+ new { Return = "Int3", Params = new[] { "Int3x3", "Int3" } },
+ new { Return = "Int3", Params = new[] { "Int3x4", "Int4" } },
+ new { Return = "Int4", Params = new[] { "Int4x2", "Int2" } },
+ new { Return = "Int4", Params = new[] { "Int4x3", "Int3" } },
+ new { Return = "Int4", Params = new[] { "Int4x4", "Int4" } },
+
+ // 9 (matrix by matrix)
+ new { Return = "Float1x1", Params = new[] { "Float1x1", "Float1x1" } },
+ new { Return = "Float1x2", Params = new[] { "Float1x1", "Float1x2" } },
+ new { Return = "Float1x3", Params = new[] { "Float1x1", "Float1x3" } },
+ new { Return = "Float1x4", Params = new[] { "Float1x1", "Float1x4" } },
+ new { Return = "Float1x1", Params = new[] { "Float1x2", "Float2x1" } },
+ new { Return = "Float1x2", Params = new[] { "Float1x2", "Float2x2" } },
+ new { Return = "Float1x3", Params = new[] { "Float1x2", "Float2x3" } },
+ new { Return = "Float1x4", Params = new[] { "Float1x2", "Float2x4" } },
+ new { Return = "Float1x1", Params = new[] { "Float1x3", "Float3x1" } },
+ new { Return = "Float1x2", Params = new[] { "Float1x3", "Float3x2" } },
+ new { Return = "Float1x3", Params = new[] { "Float1x3", "Float3x3" } },
+ new { Return = "Float1x4", Params = new[] { "Float1x3", "Float3x4" } },
+ new { Return = "Float1x1", Params = new[] { "Float1x4", "Float4x1" } },
+ new { Return = "Float1x2", Params = new[] { "Float1x4", "Float4x2" } },
+ new { Return = "Float1x3", Params = new[] { "Float1x4", "Float4x3" } },
+ new { Return = "Float1x4", Params = new[] { "Float1x4", "Float4x4" } },
+ new { Return = "Float2x1", Params = new[] { "Float2x1", "Float1x1" } },
+ new { Return = "Float2x2", Params = new[] { "Float2x1", "Float1x2" } },
+ new { Return = "Float2x3", Params = new[] { "Float2x1", "Float1x3" } },
+ new { Return = "Float2x4", Params = new[] { "Float2x1", "Float1x4" } },
+ new { Return = "Float2x1", Params = new[] { "Float2x2", "Float2x1" } },
+ new { Return = "Float2x2", Params = new[] { "Float2x2", "Float2x2" } },
+ new { Return = "Float2x3", Params = new[] { "Float2x2", "Float2x3" } },
+ new { Return = "Float2x4", Params = new[] { "Float2x2", "Float2x4" } },
+ new { Return = "Float2x1", Params = new[] { "Float2x3", "Float3x1" } },
+ new { Return = "Float2x2", Params = new[] { "Float2x3", "Float3x2" } },
+ new { Return = "Float2x3", Params = new[] { "Float2x3", "Float3x3" } },
+ new { Return = "Float2x4", Params = new[] { "Float2x3", "Float3x4" } },
+ new { Return = "Float2x1", Params = new[] { "Float2x4", "Float4x1" } },
+ new { Return = "Float2x2", Params = new[] { "Float2x4", "Float4x2" } },
+ new { Return = "Float2x3", Params = new[] { "Float2x4", "Float4x3" } },
+ new { Return = "Float2x4", Params = new[] { "Float2x4", "Float4x4" } },
+ new { Return = "Float3x1", Params = new[] { "Float3x1", "Float1x1" } },
+ new { Return = "Float3x2", Params = new[] { "Float3x1", "Float1x2" } },
+ new { Return = "Float3x3", Params = new[] { "Float3x1", "Float1x3" } },
+ new { Return = "Float3x4", Params = new[] { "Float3x1", "Float1x4" } },
+ new { Return = "Float3x1", Params = new[] { "Float3x2", "Float2x1" } },
+ new { Return = "Float3x2", Params = new[] { "Float3x2", "Float2x2" } },
+ new { Return = "Float3x3", Params = new[] { "Float3x2", "Float2x3" } },
+ new { Return = "Float3x4", Params = new[] { "Float3x2", "Float2x4" } },
+ new { Return = "Float3x1", Params = new[] { "Float3x3", "Float3x1" } },
+ new { Return = "Float3x2", Params = new[] { "Float3x3", "Float3x2" } },
+ new { Return = "Float3x3", Params = new[] { "Float3x3", "Float3x3" } },
+ new { Return = "Float3x4", Params = new[] { "Float3x3", "Float3x4" } },
+ new { Return = "Float3x1", Params = new[] { "Float3x4", "Float4x1" } },
+ new { Return = "Float3x2", Params = new[] { "Float3x4", "Float4x2" } },
+ new { Return = "Float3x3", Params = new[] { "Float3x4", "Float4x3" } },
+ new { Return = "Float3x4", Params = new[] { "Float3x4", "Float4x4" } },
+ new { Return = "Float4x1", Params = new[] { "Float4x1", "Float1x1" } },
+ new { Return = "Float4x2", Params = new[] { "Float4x1", "Float1x2" } },
+ new { Return = "Float4x3", Params = new[] { "Float4x1", "Float1x3" } },
+ new { Return = "Float4x4", Params = new[] { "Float4x1", "Float1x4" } },
+ new { Return = "Float4x1", Params = new[] { "Float4x2", "Float2x1" } },
+ new { Return = "Float4x2", Params = new[] { "Float4x2", "Float2x2" } },
+ new { Return = "Float4x3", Params = new[] { "Float4x2", "Float2x3" } },
+ new { Return = "Float4x4", Params = new[] { "Float4x2", "Float2x4" } },
+ new { Return = "Float4x1", Params = new[] { "Float4x3", "Float3x1" } },
+ new { Return = "Float4x2", Params = new[] { "Float4x3", "Float3x2" } },
+ new { Return = "Float4x3", Params = new[] { "Float4x3", "Float3x3" } },
+ new { Return = "Float4x4", Params = new[] { "Float4x3", "Float3x4" } },
+ new { Return = "Float4x1", Params = new[] { "Float4x4", "Float4x1" } },
+ new { Return = "Float4x2", Params = new[] { "Float4x4", "Float4x2" } },
+ new { Return = "Float4x3", Params = new[] { "Float4x4", "Float4x3" } },
+ new { Return = "Float4x4", Params = new[] { "Float4x4", "Float4x4" } },
+ new { Return = "Int1x1", Params = new[] { "Int1x1", "Int1x1" } },
+ new { Return = "Int1x2", Params = new[] { "Int1x1", "Int1x2" } },
+ new { Return = "Int1x3", Params = new[] { "Int1x1", "Int1x3" } },
+ new { Return = "Int1x4", Params = new[] { "Int1x1", "Int1x4" } },
+ new { Return = "Int1x1", Params = new[] { "Int1x2", "Int2x1" } },
+ new { Return = "Int1x2", Params = new[] { "Int1x2", "Int2x2" } },
+ new { Return = "Int1x3", Params = new[] { "Int1x2", "Int2x3" } },
+ new { Return = "Int1x4", Params = new[] { "Int1x2", "Int2x4" } },
+ new { Return = "Int1x1", Params = new[] { "Int1x3", "Int3x1" } },
+ new { Return = "Int1x2", Params = new[] { "Int1x3", "Int3x2" } },
+ new { Return = "Int1x3", Params = new[] { "Int1x3", "Int3x3" } },
+ new { Return = "Int1x4", Params = new[] { "Int1x3", "Int3x4" } },
+ new { Return = "Int1x1", Params = new[] { "Int1x4", "Int4x1" } },
+ new { Return = "Int1x2", Params = new[] { "Int1x4", "Int4x2" } },
+ new { Return = "Int1x3", Params = new[] { "Int1x4", "Int4x3" } },
+ new { Return = "Int1x4", Params = new[] { "Int1x4", "Int4x4" } },
+ new { Return = "Int2x1", Params = new[] { "Int2x1", "Int1x1" } },
+ new { Return = "Int2x2", Params = new[] { "Int2x1", "Int1x2" } },
+ new { Return = "Int2x3", Params = new[] { "Int2x1", "Int1x3" } },
+ new { Return = "Int2x4", Params = new[] { "Int2x1", "Int1x4" } },
+ new { Return = "Int2x1", Params = new[] { "Int2x2", "Int2x1" } },
+ new { Return = "Int2x2", Params = new[] { "Int2x2", "Int2x2" } },
+ new { Return = "Int2x3", Params = new[] { "Int2x2", "Int2x3" } },
+ new { Return = "Int2x4", Params = new[] { "Int2x2", "Int2x4" } },
+ new { Return = "Int2x1", Params = new[] { "Int2x3", "Int3x1" } },
+ new { Return = "Int2x2", Params = new[] { "Int2x3", "Int3x2" } },
+ new { Return = "Int2x3", Params = new[] { "Int2x3", "Int3x3" } },
+ new { Return = "Int2x4", Params = new[] { "Int2x3", "Int3x4" } },
+ new { Return = "Int2x1", Params = new[] { "Int2x4", "Int4x1" } },
+ new { Return = "Int2x2", Params = new[] { "Int2x4", "Int4x2" } },
+ new { Return = "Int2x3", Params = new[] { "Int2x4", "Int4x3" } },
+ new { Return = "Int2x4", Params = new[] { "Int2x4", "Int4x4" } },
+ new { Return = "Int3x1", Params = new[] { "Int3x1", "Int1x1" } },
+ new { Return = "Int3x2", Params = new[] { "Int3x1", "Int1x2" } },
+ new { Return = "Int3x3", Params = new[] { "Int3x1", "Int1x3" } },
+ new { Return = "Int3x4", Params = new[] { "Int3x1", "Int1x4" } },
+ new { Return = "Int3x1", Params = new[] { "Int3x2", "Int2x1" } },
+ new { Return = "Int3x2", Params = new[] { "Int3x2", "Int2x2" } },
+ new { Return = "Int3x3", Params = new[] { "Int3x2", "Int2x3" } },
+ new { Return = "Int3x4", Params = new[] { "Int3x2", "Int2x4" } },
+ new { Return = "Int3x1", Params = new[] { "Int3x3", "Int3x1" } },
+ new { Return = "Int3x2", Params = new[] { "Int3x3", "Int3x2" } },
+ new { Return = "Int3x3", Params = new[] { "Int3x3", "Int3x3" } },
+ new { Return = "Int3x4", Params = new[] { "Int3x3", "Int3x4" } },
+ new { Return = "Int3x1", Params = new[] { "Int3x4", "Int4x1" } },
+ new { Return = "Int3x2", Params = new[] { "Int3x4", "Int4x2" } },
+ new { Return = "Int3x3", Params = new[] { "Int3x4", "Int4x3" } },
+ new { Return = "Int3x4", Params = new[] { "Int3x4", "Int4x4" } },
+ new { Return = "Int4x1", Params = new[] { "Int4x1", "Int1x1" } },
+ new { Return = "Int4x2", Params = new[] { "Int4x1", "Int1x2" } },
+ new { Return = "Int4x3", Params = new[] { "Int4x1", "Int1x3" } },
+ new { Return = "Int4x4", Params = new[] { "Int4x1", "Int1x4" } },
+ new { Return = "Int4x1", Params = new[] { "Int4x2", "Int2x1" } },
+ new { Return = "Int4x2", Params = new[] { "Int4x2", "Int2x2" } },
+ new { Return = "Int4x3", Params = new[] { "Int4x2", "Int2x3" } },
+ new { Return = "Int4x4", Params = new[] { "Int4x2", "Int2x4" } },
+ new { Return = "Int4x1", Params = new[] { "Int4x3", "Int3x1" } },
+ new { Return = "Int4x2", Params = new[] { "Int4x3", "Int3x2" } },
+ new { Return = "Int4x3", Params = new[] { "Int4x3", "Int3x3" } },
+ new { Return = "Int4x4", Params = new[] { "Int4x3", "Int3x4" } },
+ new { Return = "Int4x1", Params = new[] { "Int4x4", "Int4x1" } },
+ new { Return = "Int4x2", Params = new[] { "Int4x4", "Int4x2" } },
+ new { Return = "Int4x3", Params = new[] { "Int4x4", "Int4x3" } },
+ new { Return = "Int4x4", Params = new[] { "Int4x4", "Int4x4" } },
+};
+#>
\ No newline at end of file
diff --git a/src/ComputeSharp.Core/Intrinsics/Hlsl.ttinclude b/src/ComputeSharp.Core/Intrinsics/Hlsl.ttinclude
index 10f4e195..ba21edee 100644
--- a/src/ComputeSharp.Core/Intrinsics/Hlsl.ttinclude
+++ b/src/ComputeSharp.Core/Intrinsics/Hlsl.ttinclude
@@ -1,5 +1,4 @@
-<#@ template debug="false" hostspecific="false" language="C#" #>
-<#@ assembly name="System.Core" #>
+<#@include file="Hlsl.MulOverloads.ttinclude" #>
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Text" #>
<#@ import namespace="System.Text.RegularExpressions" #>
diff --git a/src/ComputeSharp.Core/Primitives/Float/Float2.g.cs b/src/ComputeSharp.Core/Primitives/Float/Float2.g.cs
index b6d8ddde..0d57e369 100644
--- a/src/ComputeSharp.Core/Primitives/Float/Float2.g.cs
+++ b/src/ComputeSharp.Core/Primitives/Float/Float2.g.cs
@@ -1,5 +1,6 @@
using System;
using System.Globalization;
+using ComputeSharp.Core.Intrinsics.Attributes;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
#if !NET6_0_OR_GREATER
@@ -498,6 +499,94 @@ public unsafe partial struct Float2
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Float2 operator *(Float2 left, Float2 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float2 operator *(Float2 left, float right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float2 operator *(float left, Float2 right) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float2 input value.
+ /// The second Float2x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static float operator *(Float2 x, Float2x1 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float2 input value.
+ /// The second Float2x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float2 operator *(Float2 x, Float2x2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float2 input value.
+ /// The second Float2x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float3 operator *(Float2 x, Float2x3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float2 input value.
+ /// The second Float2x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float4 operator *(Float2 x, Float2x4 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float2x2 input value.
+ /// The second Float2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float2 operator *(Float2x2 x, Float2 y) => default;
+
///
/// Subtracts two values.
///
diff --git a/src/ComputeSharp.Core/Primitives/Float/Float3.g.cs b/src/ComputeSharp.Core/Primitives/Float/Float3.g.cs
index 2ae26205..fcc3c0d8 100644
--- a/src/ComputeSharp.Core/Primitives/Float/Float3.g.cs
+++ b/src/ComputeSharp.Core/Primitives/Float/Float3.g.cs
@@ -1,5 +1,6 @@
using System;
using System.Globalization;
+using ComputeSharp.Core.Intrinsics.Attributes;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
#if !NET6_0_OR_GREATER
@@ -1584,6 +1585,94 @@ public unsafe partial struct Float3
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Float3 operator *(Float3 left, Float3 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float3 operator *(Float3 left, float right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float3 operator *(float left, Float3 right) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float3 input value.
+ /// The second Float3x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static float operator *(Float3 x, Float3x1 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float3 input value.
+ /// The second Float3x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float2 operator *(Float3 x, Float3x2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float3 input value.
+ /// The second Float3x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float3 operator *(Float3 x, Float3x3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float3 input value.
+ /// The second Float3x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float4 operator *(Float3 x, Float3x4 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float3x3 input value.
+ /// The second Float3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float3 operator *(Float3x3 x, Float3 y) => default;
+
///
/// Subtracts two values.
///
diff --git a/src/ComputeSharp.Core/Primitives/Float/Float4.g.cs b/src/ComputeSharp.Core/Primitives/Float/Float4.g.cs
index 4f079788..199d5dd2 100644
--- a/src/ComputeSharp.Core/Primitives/Float/Float4.g.cs
+++ b/src/ComputeSharp.Core/Primitives/Float/Float4.g.cs
@@ -1,5 +1,6 @@
using System;
using System.Globalization;
+using ComputeSharp.Core.Intrinsics.Attributes;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
#if !NET6_0_OR_GREATER
@@ -4230,6 +4231,94 @@ public unsafe partial struct Float4
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Float4 operator *(Float4 left, Float4 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float4 operator *(Float4 left, float right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float4 operator *(float left, Float4 right) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float4 input value.
+ /// The second Float4x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static float operator *(Float4 x, Float4x1 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float4 input value.
+ /// The second Float4x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float2 operator *(Float4 x, Float4x2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float4 input value.
+ /// The second Float4x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float3 operator *(Float4 x, Float4x3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float4 input value.
+ /// The second Float4x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float4 operator *(Float4 x, Float4x4 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float4x4 input value.
+ /// The second Float4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float4 operator *(Float4x4 x, Float4 y) => default;
+
///
/// Subtracts two values.
///
diff --git a/src/ComputeSharp.Core/Primitives/Float/FloatMxN.g.cs b/src/ComputeSharp.Core/Primitives/Float/FloatMxN.g.cs
index aa40978f..026093b4 100644
--- a/src/ComputeSharp.Core/Primitives/Float/FloatMxN.g.cs
+++ b/src/ComputeSharp.Core/Primitives/Float/FloatMxN.g.cs
@@ -1,5 +1,6 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
+using ComputeSharp.Core.Intrinsics.Attributes;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.Core.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
using MemoryMarshal = ComputeSharp.Core.NetStandard.System.Runtime.InteropServices.MemoryMarshal;
@@ -125,6 +126,24 @@ public unsafe partial struct Float1x1
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Float1x1 operator *(Float1x1 left, Float1x1 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float1x1 operator *(Float1x1 left, float right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float1x1 operator *(float left, Float1x1 right) => default;
+
///
/// Subtracts two values.
///
@@ -316,6 +335,108 @@ public unsafe partial struct Float1x2
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Float1x2 operator *(Float1x2 left, Float1x2 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float1x2 operator *(Float1x2 left, float right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float1x2 operator *(float left, Float1x2 right) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float1x2 input value.
+ /// The second Float2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static float operator *(Float1x2 x, Float2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float1x1 input value.
+ /// The second Float1x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float1x2 operator *(Float1x1 x, Float1x2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float1x2 input value.
+ /// The second Float2x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float1x1 operator *(Float1x2 x, Float2x1 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float1x2 input value.
+ /// The second Float2x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float1x2 operator *(Float1x2 x, Float2x2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float1x2 input value.
+ /// The second Float2x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float1x3 operator *(Float1x2 x, Float2x3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float1x2 input value.
+ /// The second Float2x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float1x4 operator *(Float1x2 x, Float2x4 y) => default;
+
///
/// Subtracts two values.
///
@@ -524,6 +645,108 @@ public unsafe partial struct Float1x3
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Float1x3 operator *(Float1x3 left, Float1x3 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float1x3 operator *(Float1x3 left, float right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float1x3 operator *(float left, Float1x3 right) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float1x3 input value.
+ /// The second Float3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static float operator *(Float1x3 x, Float3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float1x1 input value.
+ /// The second Float1x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float1x3 operator *(Float1x1 x, Float1x3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float1x3 input value.
+ /// The second Float3x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float1x1 operator *(Float1x3 x, Float3x1 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float1x3 input value.
+ /// The second Float3x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float1x2 operator *(Float1x3 x, Float3x2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float1x3 input value.
+ /// The second Float3x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float1x3 operator *(Float1x3 x, Float3x3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float1x3 input value.
+ /// The second Float3x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float1x4 operator *(Float1x3 x, Float3x4 y) => default;
+
///
/// Subtracts two values.
///
@@ -743,6 +966,108 @@ public unsafe partial struct Float1x4
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Float1x4 operator *(Float1x4 left, Float1x4 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float1x4 operator *(Float1x4 left, float right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float1x4 operator *(float left, Float1x4 right) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float1x4 input value.
+ /// The second Float4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static float operator *(Float1x4 x, Float4 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float1x1 input value.
+ /// The second Float1x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float1x4 operator *(Float1x1 x, Float1x4 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float1x4 input value.
+ /// The second Float4x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float1x1 operator *(Float1x4 x, Float4x1 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float1x4 input value.
+ /// The second Float4x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float1x2 operator *(Float1x4 x, Float4x2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float1x4 input value.
+ /// The second Float4x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float1x3 operator *(Float1x4 x, Float4x3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float1x4 input value.
+ /// The second Float4x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float1x4 operator *(Float1x4 x, Float4x4 y) => default;
+
///
/// Subtracts two values.
///
@@ -940,6 +1265,94 @@ public unsafe partial struct Float2x1
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Float2x1 operator *(Float2x1 left, Float2x1 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float2x1 operator *(Float2x1 left, float right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float2x1 operator *(float left, Float2x1 right) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float2x1 input value.
+ /// The second Float1x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float2x1 operator *(Float2x1 x, Float1x1 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float2x1 input value.
+ /// The second Float1x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float2x2 operator *(Float2x1 x, Float1x2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float2x1 input value.
+ /// The second Float1x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float2x3 operator *(Float2x1 x, Float1x3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float2x1 input value.
+ /// The second Float1x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float2x4 operator *(Float2x1 x, Float1x4 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float2x2 input value.
+ /// The second Float2x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float2x1 operator *(Float2x2 x, Float2x1 y) => default;
+
///
/// Subtracts two values.
///
@@ -1172,6 +1585,24 @@ public unsafe partial struct Float2x2
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Float2x2 operator *(Float2x2 left, Float2x2 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float2x2 operator *(Float2x2 left, float right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float2x2 operator *(float left, Float2x2 right) => default;
+
///
/// Subtracts two values.
///
@@ -1422,6 +1853,108 @@ public unsafe partial struct Float2x3
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Float2x3 operator *(Float2x3 left, Float2x3 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float2x3 operator *(Float2x3 left, float right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float2x3 operator *(float left, Float2x3 right) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float2x3 input value.
+ /// The second Float3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float2 operator *(Float2x3 x, Float3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float2x2 input value.
+ /// The second Float2x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float2x3 operator *(Float2x2 x, Float2x3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float2x3 input value.
+ /// The second Float3x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float2x1 operator *(Float2x3 x, Float3x1 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float2x3 input value.
+ /// The second Float3x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float2x2 operator *(Float2x3 x, Float3x2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float2x3 input value.
+ /// The second Float3x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float2x3 operator *(Float2x3 x, Float3x3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float2x3 input value.
+ /// The second Float3x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float2x4 operator *(Float2x3 x, Float3x4 y) => default;
+
///
/// Subtracts two values.
///
@@ -1696,6 +2229,108 @@ public unsafe partial struct Float2x4
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Float2x4 operator *(Float2x4 left, Float2x4 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float2x4 operator *(Float2x4 left, float right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float2x4 operator *(float left, Float2x4 right) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float2x4 input value.
+ /// The second Float4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float2 operator *(Float2x4 x, Float4 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float2x2 input value.
+ /// The second Float2x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float2x4 operator *(Float2x2 x, Float2x4 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float2x4 input value.
+ /// The second Float4x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float2x1 operator *(Float2x4 x, Float4x1 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float2x4 input value.
+ /// The second Float4x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float2x2 operator *(Float2x4 x, Float4x2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float2x4 input value.
+ /// The second Float4x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float2x3 operator *(Float2x4 x, Float4x3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float2x4 input value.
+ /// The second Float4x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float2x4 operator *(Float2x4 x, Float4x4 y) => default;
+
///
/// Subtracts two values.
///
@@ -1898,6 +2533,94 @@ public unsafe partial struct Float3x1
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Float3x1 operator *(Float3x1 left, Float3x1 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float3x1 operator *(Float3x1 left, float right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float3x1 operator *(float left, Float3x1 right) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float3x1 input value.
+ /// The second Float1x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float3x1 operator *(Float3x1 x, Float1x1 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float3x1 input value.
+ /// The second Float1x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float3x2 operator *(Float3x1 x, Float1x2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float3x1 input value.
+ /// The second Float1x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float3x3 operator *(Float3x1 x, Float1x3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float3x1 input value.
+ /// The second Float1x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float3x4 operator *(Float3x1 x, Float1x4 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float3x3 input value.
+ /// The second Float3x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float3x1 operator *(Float3x3 x, Float3x1 y) => default;
+
///
/// Subtracts two values.
///
@@ -2155,6 +2878,108 @@ public unsafe partial struct Float3x2
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Float3x2 operator *(Float3x2 left, Float3x2 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float3x2 operator *(Float3x2 left, float right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float3x2 operator *(float left, Float3x2 right) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float3x2 input value.
+ /// The second Float2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float3 operator *(Float3x2 x, Float2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float3x2 input value.
+ /// The second Float2x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float3x1 operator *(Float3x2 x, Float2x1 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float3x2 input value.
+ /// The second Float2x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float3x2 operator *(Float3x2 x, Float2x2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float3x2 input value.
+ /// The second Float2x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float3x3 operator *(Float3x2 x, Float2x3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float3x2 input value.
+ /// The second Float2x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float3x4 operator *(Float3x2 x, Float2x4 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float3x3 input value.
+ /// The second Float3x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float3x2 operator *(Float3x3 x, Float3x2 y) => default;
+
///
/// Subtracts two values.
///
@@ -2442,6 +3267,24 @@ public unsafe partial struct Float3x3
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Float3x3 operator *(Float3x3 left, Float3x3 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float3x3 operator *(Float3x3 left, float right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float3x3 operator *(float left, Float3x3 right) => default;
+
///
/// Subtracts two values.
///
@@ -2765,6 +3608,108 @@ public unsafe partial struct Float3x4
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Float3x4 operator *(Float3x4 left, Float3x4 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float3x4 operator *(Float3x4 left, float right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float3x4 operator *(float left, Float3x4 right) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float3x4 input value.
+ /// The second Float4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float3 operator *(Float3x4 x, Float4 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float3x3 input value.
+ /// The second Float3x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float3x4 operator *(Float3x3 x, Float3x4 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float3x4 input value.
+ /// The second Float4x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float3x1 operator *(Float3x4 x, Float4x1 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float3x4 input value.
+ /// The second Float4x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float3x2 operator *(Float3x4 x, Float4x2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float3x4 input value.
+ /// The second Float4x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float3x3 operator *(Float3x4 x, Float4x3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float3x4 input value.
+ /// The second Float4x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float3x4 operator *(Float3x4 x, Float4x4 y) => default;
+
///
/// Subtracts two values.
///
@@ -2978,6 +3923,94 @@ public unsafe partial struct Float4x1
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Float4x1 operator *(Float4x1 left, Float4x1 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float4x1 operator *(Float4x1 left, float right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float4x1 operator *(float left, Float4x1 right) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float4x1 input value.
+ /// The second Float1x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float4x1 operator *(Float4x1 x, Float1x1 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float4x1 input value.
+ /// The second Float1x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float4x2 operator *(Float4x1 x, Float1x2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float4x1 input value.
+ /// The second Float1x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float4x3 operator *(Float4x1 x, Float1x3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float4x1 input value.
+ /// The second Float1x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float4x4 operator *(Float4x1 x, Float1x4 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float4x4 input value.
+ /// The second Float4x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float4x1 operator *(Float4x4 x, Float4x1 y) => default;
+
///
/// Subtracts two values.
///
@@ -3260,6 +4293,108 @@ public unsafe partial struct Float4x2
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Float4x2 operator *(Float4x2 left, Float4x2 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float4x2 operator *(Float4x2 left, float right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float4x2 operator *(float left, Float4x2 right) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float4x2 input value.
+ /// The second Float2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float4 operator *(Float4x2 x, Float2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float4x2 input value.
+ /// The second Float2x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float4x1 operator *(Float4x2 x, Float2x1 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float4x2 input value.
+ /// The second Float2x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float4x2 operator *(Float4x2 x, Float2x2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float4x2 input value.
+ /// The second Float2x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float4x3 operator *(Float4x2 x, Float2x3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float4x2 input value.
+ /// The second Float2x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float4x4 operator *(Float4x2 x, Float2x4 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float4x4 input value.
+ /// The second Float4x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float4x2 operator *(Float4x4 x, Float4x2 y) => default;
+
///
/// Subtracts two values.
///
@@ -3584,6 +4719,108 @@ public unsafe partial struct Float4x3
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Float4x3 operator *(Float4x3 left, Float4x3 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float4x3 operator *(Float4x3 left, float right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float4x3 operator *(float left, Float4x3 right) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float4x3 input value.
+ /// The second Float3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float4 operator *(Float4x3 x, Float3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float4x3 input value.
+ /// The second Float3x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float4x1 operator *(Float4x3 x, Float3x1 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float4x3 input value.
+ /// The second Float3x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float4x2 operator *(Float4x3 x, Float3x2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float4x3 input value.
+ /// The second Float3x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float4x3 operator *(Float4x3 x, Float3x3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float4x3 input value.
+ /// The second Float3x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float4x4 operator *(Float4x3 x, Float3x4 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Float4x4 input value.
+ /// The second Float4x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Float4x3 operator *(Float4x4 x, Float4x3 y) => default;
+
///
/// Subtracts two values.
///
@@ -3956,6 +5193,24 @@ public unsafe partial struct Float4x4
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Float4x4 operator *(Float4x4 left, Float4x4 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float4x4 operator *(Float4x4 left, float right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Float4x4 operator *(float left, Float4x4 right) => default;
+
///
/// Subtracts two values.
///
diff --git a/src/ComputeSharp.Core/Primitives/Int/Int2.g.cs b/src/ComputeSharp.Core/Primitives/Int/Int2.g.cs
index 0fb6dc1b..9066df25 100644
--- a/src/ComputeSharp.Core/Primitives/Int/Int2.g.cs
+++ b/src/ComputeSharp.Core/Primitives/Int/Int2.g.cs
@@ -1,5 +1,6 @@
using System;
using System.Globalization;
+using ComputeSharp.Core.Intrinsics.Attributes;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
#if !NET6_0_OR_GREATER
@@ -498,6 +499,94 @@ public unsafe partial struct Int2
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Int2 operator *(Int2 left, Int2 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int2 operator *(Int2 left, int right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int2 operator *(int left, Int2 right) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int2 input value.
+ /// The second Int2x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static int operator *(Int2 x, Int2x1 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int2 input value.
+ /// The second Int2x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int2 operator *(Int2 x, Int2x2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int2 input value.
+ /// The second Int2x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int3 operator *(Int2 x, Int2x3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int2 input value.
+ /// The second Int2x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int4 operator *(Int2 x, Int2x4 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int2x2 input value.
+ /// The second Int2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int2 operator *(Int2x2 x, Int2 y) => default;
+
///
/// Subtracts two values.
///
diff --git a/src/ComputeSharp.Core/Primitives/Int/Int3.g.cs b/src/ComputeSharp.Core/Primitives/Int/Int3.g.cs
index 086c6910..8dfad0ef 100644
--- a/src/ComputeSharp.Core/Primitives/Int/Int3.g.cs
+++ b/src/ComputeSharp.Core/Primitives/Int/Int3.g.cs
@@ -1,5 +1,6 @@
using System;
using System.Globalization;
+using ComputeSharp.Core.Intrinsics.Attributes;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
#if !NET6_0_OR_GREATER
@@ -1584,6 +1585,94 @@ public unsafe partial struct Int3
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Int3 operator *(Int3 left, Int3 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int3 operator *(Int3 left, int right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int3 operator *(int left, Int3 right) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int3 input value.
+ /// The second Int3x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static int operator *(Int3 x, Int3x1 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int3 input value.
+ /// The second Int3x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int2 operator *(Int3 x, Int3x2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int3 input value.
+ /// The second Int3x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int3 operator *(Int3 x, Int3x3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int3 input value.
+ /// The second Int3x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int4 operator *(Int3 x, Int3x4 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int3x3 input value.
+ /// The second Int3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int3 operator *(Int3x3 x, Int3 y) => default;
+
///
/// Subtracts two values.
///
diff --git a/src/ComputeSharp.Core/Primitives/Int/Int4.g.cs b/src/ComputeSharp.Core/Primitives/Int/Int4.g.cs
index fbcf0214..d7e64606 100644
--- a/src/ComputeSharp.Core/Primitives/Int/Int4.g.cs
+++ b/src/ComputeSharp.Core/Primitives/Int/Int4.g.cs
@@ -1,5 +1,6 @@
using System;
using System.Globalization;
+using ComputeSharp.Core.Intrinsics.Attributes;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
#if !NET6_0_OR_GREATER
@@ -4230,6 +4231,94 @@ public unsafe partial struct Int4
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Int4 operator *(Int4 left, Int4 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int4 operator *(Int4 left, int right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int4 operator *(int left, Int4 right) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int4 input value.
+ /// The second Int4x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static int operator *(Int4 x, Int4x1 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int4 input value.
+ /// The second Int4x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int2 operator *(Int4 x, Int4x2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int4 input value.
+ /// The second Int4x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int3 operator *(Int4 x, Int4x3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int4 input value.
+ /// The second Int4x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int4 operator *(Int4 x, Int4x4 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int4x4 input value.
+ /// The second Int4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int4 operator *(Int4x4 x, Int4 y) => default;
+
///
/// Subtracts two values.
///
diff --git a/src/ComputeSharp.Core/Primitives/Int/IntMxN.g.cs b/src/ComputeSharp.Core/Primitives/Int/IntMxN.g.cs
index d6bde9d3..03b54736 100644
--- a/src/ComputeSharp.Core/Primitives/Int/IntMxN.g.cs
+++ b/src/ComputeSharp.Core/Primitives/Int/IntMxN.g.cs
@@ -1,5 +1,6 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
+using ComputeSharp.Core.Intrinsics.Attributes;
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.Core.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
using MemoryMarshal = ComputeSharp.Core.NetStandard.System.Runtime.InteropServices.MemoryMarshal;
@@ -125,6 +126,24 @@ public unsafe partial struct Int1x1
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Int1x1 operator *(Int1x1 left, Int1x1 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int1x1 operator *(Int1x1 left, int right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int1x1 operator *(int left, Int1x1 right) => default;
+
///
/// Subtracts two values.
///
@@ -416,6 +435,108 @@ public unsafe partial struct Int1x2
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Int1x2 operator *(Int1x2 left, Int1x2 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int1x2 operator *(Int1x2 left, int right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int1x2 operator *(int left, Int1x2 right) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int1x2 input value.
+ /// The second Int2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static int operator *(Int1x2 x, Int2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int1x1 input value.
+ /// The second Int1x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int1x2 operator *(Int1x1 x, Int1x2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int1x2 input value.
+ /// The second Int2x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int1x1 operator *(Int1x2 x, Int2x1 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int1x2 input value.
+ /// The second Int2x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int1x2 operator *(Int1x2 x, Int2x2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int1x2 input value.
+ /// The second Int2x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int1x3 operator *(Int1x2 x, Int2x3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int1x2 input value.
+ /// The second Int2x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int1x4 operator *(Int1x2 x, Int2x4 y) => default;
+
///
/// Subtracts two values.
///
@@ -724,6 +845,108 @@ public unsafe partial struct Int1x3
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Int1x3 operator *(Int1x3 left, Int1x3 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int1x3 operator *(Int1x3 left, int right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int1x3 operator *(int left, Int1x3 right) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int1x3 input value.
+ /// The second Int3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static int operator *(Int1x3 x, Int3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int1x1 input value.
+ /// The second Int1x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int1x3 operator *(Int1x1 x, Int1x3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int1x3 input value.
+ /// The second Int3x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int1x1 operator *(Int1x3 x, Int3x1 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int1x3 input value.
+ /// The second Int3x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int1x2 operator *(Int1x3 x, Int3x2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int1x3 input value.
+ /// The second Int3x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int1x3 operator *(Int1x3 x, Int3x3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int1x3 input value.
+ /// The second Int3x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int1x4 operator *(Int1x3 x, Int3x4 y) => default;
+
///
/// Subtracts two values.
///
@@ -1043,6 +1266,108 @@ public unsafe partial struct Int1x4
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Int1x4 operator *(Int1x4 left, Int1x4 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int1x4 operator *(Int1x4 left, int right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int1x4 operator *(int left, Int1x4 right) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int1x4 input value.
+ /// The second Int4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static int operator *(Int1x4 x, Int4 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int1x1 input value.
+ /// The second Int1x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int1x4 operator *(Int1x1 x, Int1x4 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int1x4 input value.
+ /// The second Int4x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int1x1 operator *(Int1x4 x, Int4x1 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int1x4 input value.
+ /// The second Int4x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int1x2 operator *(Int1x4 x, Int4x2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int1x4 input value.
+ /// The second Int4x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int1x3 operator *(Int1x4 x, Int4x3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int1x4 input value.
+ /// The second Int4x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int1x4 operator *(Int1x4 x, Int4x4 y) => default;
+
///
/// Subtracts two values.
///
@@ -1340,6 +1665,94 @@ public unsafe partial struct Int2x1
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Int2x1 operator *(Int2x1 left, Int2x1 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int2x1 operator *(Int2x1 left, int right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int2x1 operator *(int left, Int2x1 right) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int2x1 input value.
+ /// The second Int1x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int2x1 operator *(Int2x1 x, Int1x1 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int2x1 input value.
+ /// The second Int1x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int2x2 operator *(Int2x1 x, Int1x2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int2x1 input value.
+ /// The second Int1x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int2x3 operator *(Int2x1 x, Int1x3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int2x1 input value.
+ /// The second Int1x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int2x4 operator *(Int2x1 x, Int1x4 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int2x2 input value.
+ /// The second Int2x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int2x1 operator *(Int2x2 x, Int2x1 y) => default;
+
///
/// Subtracts two values.
///
@@ -1672,6 +2085,24 @@ public unsafe partial struct Int2x2
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Int2x2 operator *(Int2x2 left, Int2x2 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int2x2 operator *(Int2x2 left, int right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int2x2 operator *(int left, Int2x2 right) => default;
+
///
/// Subtracts two values.
///
@@ -2022,6 +2453,108 @@ public unsafe partial struct Int2x3
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Int2x3 operator *(Int2x3 left, Int2x3 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int2x3 operator *(Int2x3 left, int right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int2x3 operator *(int left, Int2x3 right) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int2x3 input value.
+ /// The second Int3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int2 operator *(Int2x3 x, Int3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int2x2 input value.
+ /// The second Int2x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int2x3 operator *(Int2x2 x, Int2x3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int2x3 input value.
+ /// The second Int3x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int2x1 operator *(Int2x3 x, Int3x1 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int2x3 input value.
+ /// The second Int3x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int2x2 operator *(Int2x3 x, Int3x2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int2x3 input value.
+ /// The second Int3x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int2x3 operator *(Int2x3 x, Int3x3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int2x3 input value.
+ /// The second Int3x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int2x4 operator *(Int2x3 x, Int3x4 y) => default;
+
///
/// Subtracts two values.
///
@@ -2396,6 +2929,108 @@ public unsafe partial struct Int2x4
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Int2x4 operator *(Int2x4 left, Int2x4 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int2x4 operator *(Int2x4 left, int right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int2x4 operator *(int left, Int2x4 right) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int2x4 input value.
+ /// The second Int4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int2 operator *(Int2x4 x, Int4 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int2x2 input value.
+ /// The second Int2x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int2x4 operator *(Int2x2 x, Int2x4 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int2x4 input value.
+ /// The second Int4x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int2x1 operator *(Int2x4 x, Int4x1 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int2x4 input value.
+ /// The second Int4x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int2x2 operator *(Int2x4 x, Int4x2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int2x4 input value.
+ /// The second Int4x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int2x3 operator *(Int2x4 x, Int4x3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int2x4 input value.
+ /// The second Int4x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int2x4 operator *(Int2x4 x, Int4x4 y) => default;
+
///
/// Subtracts two values.
///
@@ -2698,6 +3333,94 @@ public unsafe partial struct Int3x1
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Int3x1 operator *(Int3x1 left, Int3x1 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int3x1 operator *(Int3x1 left, int right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int3x1 operator *(int left, Int3x1 right) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int3x1 input value.
+ /// The second Int1x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int3x1 operator *(Int3x1 x, Int1x1 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int3x1 input value.
+ /// The second Int1x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int3x2 operator *(Int3x1 x, Int1x2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int3x1 input value.
+ /// The second Int1x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int3x3 operator *(Int3x1 x, Int1x3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int3x1 input value.
+ /// The second Int1x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int3x4 operator *(Int3x1 x, Int1x4 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int3x3 input value.
+ /// The second Int3x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int3x1 operator *(Int3x3 x, Int3x1 y) => default;
+
///
/// Subtracts two values.
///
@@ -3055,6 +3778,108 @@ public unsafe partial struct Int3x2
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Int3x2 operator *(Int3x2 left, Int3x2 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int3x2 operator *(Int3x2 left, int right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int3x2 operator *(int left, Int3x2 right) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int3x2 input value.
+ /// The second Int2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int3 operator *(Int3x2 x, Int2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int3x2 input value.
+ /// The second Int2x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int3x1 operator *(Int3x2 x, Int2x1 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int3x2 input value.
+ /// The second Int2x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int3x2 operator *(Int3x2 x, Int2x2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int3x2 input value.
+ /// The second Int2x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int3x3 operator *(Int3x2 x, Int2x3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int3x2 input value.
+ /// The second Int2x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int3x4 operator *(Int3x2 x, Int2x4 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int3x3 input value.
+ /// The second Int3x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int3x2 operator *(Int3x3 x, Int3x2 y) => default;
+
///
/// Subtracts two values.
///
@@ -3442,6 +4267,24 @@ public unsafe partial struct Int3x3
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Int3x3 operator *(Int3x3 left, Int3x3 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int3x3 operator *(Int3x3 left, int right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int3x3 operator *(int left, Int3x3 right) => default;
+
///
/// Subtracts two values.
///
@@ -3865,6 +4708,108 @@ public unsafe partial struct Int3x4
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Int3x4 operator *(Int3x4 left, Int3x4 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int3x4 operator *(Int3x4 left, int right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int3x4 operator *(int left, Int3x4 right) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int3x4 input value.
+ /// The second Int4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int3 operator *(Int3x4 x, Int4 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int3x3 input value.
+ /// The second Int3x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int3x4 operator *(Int3x3 x, Int3x4 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int3x4 input value.
+ /// The second Int4x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int3x1 operator *(Int3x4 x, Int4x1 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int3x4 input value.
+ /// The second Int4x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int3x2 operator *(Int3x4 x, Int4x2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int3x4 input value.
+ /// The second Int4x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int3x3 operator *(Int3x4 x, Int4x3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int3x4 input value.
+ /// The second Int4x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int3x4 operator *(Int3x4 x, Int4x4 y) => default;
+
///
/// Subtracts two values.
///
@@ -4178,6 +5123,94 @@ public unsafe partial struct Int4x1
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Int4x1 operator *(Int4x1 left, Int4x1 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int4x1 operator *(Int4x1 left, int right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int4x1 operator *(int left, Int4x1 right) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int4x1 input value.
+ /// The second Int1x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int4x1 operator *(Int4x1 x, Int1x1 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int4x1 input value.
+ /// The second Int1x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int4x2 operator *(Int4x1 x, Int1x2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int4x1 input value.
+ /// The second Int1x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int4x3 operator *(Int4x1 x, Int1x3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int4x1 input value.
+ /// The second Int1x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int4x4 operator *(Int4x1 x, Int1x4 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int4x4 input value.
+ /// The second Int4x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int4x1 operator *(Int4x4 x, Int4x1 y) => default;
+
///
/// Subtracts two values.
///
@@ -4560,6 +5593,108 @@ public unsafe partial struct Int4x2
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Int4x2 operator *(Int4x2 left, Int4x2 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int4x2 operator *(Int4x2 left, int right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int4x2 operator *(int left, Int4x2 right) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int4x2 input value.
+ /// The second Int2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int4 operator *(Int4x2 x, Int2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int4x2 input value.
+ /// The second Int2x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int4x1 operator *(Int4x2 x, Int2x1 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int4x2 input value.
+ /// The second Int2x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int4x2 operator *(Int4x2 x, Int2x2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int4x2 input value.
+ /// The second Int2x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int4x3 operator *(Int4x2 x, Int2x3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int4x2 input value.
+ /// The second Int2x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int4x4 operator *(Int4x2 x, Int2x4 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int4x4 input value.
+ /// The second Int4x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int4x2 operator *(Int4x4 x, Int4x2 y) => default;
+
///
/// Subtracts two values.
///
@@ -4984,6 +6119,108 @@ public unsafe partial struct Int4x3
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Int4x3 operator *(Int4x3 left, Int4x3 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int4x3 operator *(Int4x3 left, int right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int4x3 operator *(int left, Int4x3 right) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int4x3 input value.
+ /// The second Int3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int4 operator *(Int4x3 x, Int3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int4x3 input value.
+ /// The second Int3x1 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int4x1 operator *(Int4x3 x, Int3x1 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int4x3 input value.
+ /// The second Int3x2 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int4x2 operator *(Int4x3 x, Int3x2 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int4x3 input value.
+ /// The second Int3x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int4x3 operator *(Int4x3 x, Int3x3 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int4x3 input value.
+ /// The second Int3x4 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int4x4 operator *(Int4x3 x, Int3x4 y) => default;
+
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first Int4x4 input value.
+ /// The second Int4x3 input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static Int4x3 operator *(Int4x4 x, Int4x3 y) => default;
+
///
/// Subtracts two values.
///
@@ -5456,6 +6693,24 @@ public unsafe partial struct Int4x4
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static Int4x4 operator *(Int4x4 left, Int4x4 right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int4x4 operator *(Int4x4 left, int right) => default;
+
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static Int4x4 operator *(int left, Int4x4 right) => default;
+
///
/// Subtracts two values.
///
diff --git a/src/ComputeSharp.Core/Primitives/MatrixType.ttinclude b/src/ComputeSharp.Core/Primitives/MatrixType.ttinclude
index 981a7ba7..a4134dcd 100644
--- a/src/ComputeSharp.Core/Primitives/MatrixType.ttinclude
+++ b/src/ComputeSharp.Core/Primitives/MatrixType.ttinclude
@@ -1,5 +1,4 @@
-<#@ template debug="false" hostspecific="false" language="C#" #>
-<#@ assembly name="System.Core" #>
+<#@include file="..\Intrinsics\Hlsl.MulOverloads.ttinclude" #>
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Text" #>
<#@ import namespace="System.Text.RegularExpressions" #>
@@ -12,6 +11,12 @@ void GenerateAllMatrixProperties(string typeName, int elementSize)
#>
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
+<#
+ if (typeName == "Float" || typeName == "Int")
+ {
+ WriteLine("using ComputeSharp.Core.Intrinsics.Attributes;");
+ }
+#>
#if !NET6_0_OR_GREATER
using RuntimeHelpers = ComputeSharp.Core.NetStandard.System.Runtime.CompilerServices.RuntimeHelpers;
using MemoryMarshal = ComputeSharp.Core.NetStandard.System.Runtime.InteropServices.MemoryMarshal;
@@ -291,7 +296,60 @@ public unsafe partial struct <#=fullTypeName#>
/// The result of multiplying and .
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static <#=fullTypeName#> operator *(<#=fullTypeName#> left, <#=fullTypeName#> right) => default;
+<#
+ if (typeName == "Float" || typeName == "Int")
+ {
+ // Add explicit operators when needed, see notes in VectorType.ttinclude for info
+ WriteLine("");
+#>
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static <#=fullTypeName#> operator *(<#=fullTypeName#> left, <#=elementTypeName#> right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static <#=fullTypeName#> operator *(<#=elementTypeName#> left, <#=fullTypeName#> right) => default;
+<#
+
+ // Process all operators for the mul() intrinsic (see comments in VectorType.ttinclude for info on the filters below)
+ foreach (var mulOverload in MulOverloads.Where(overload =>
+ !(overload.Params[0] == fullTypeName && overload.Params[1] == fullTypeName) &&
+ Regex.IsMatch(overload.Params[0], @"\d") &&
+ Regex.IsMatch(overload.Params[1], @"\d") &&
+ (overload.Return == fullTypeName && overload.Params.Contains(fullTypeName) ||
+ !overload.Params.Contains(overload.Return) && overload.Params[0] == fullTypeName)))
+ {
+ WriteLine("");
+#>
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first <#=mulOverload.Params[0]#> input value.
+ /// The second <#=mulOverload.Params[1]#> input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static <#=mulOverload.Return#> operator *(<#=mulOverload.Params[0]#> x, <#=mulOverload.Params[1]#> y) => default;
+<#
+ }
+ }
+
+ WriteLine("");
+#>
///
/// Subtracts two values.
///
diff --git a/src/ComputeSharp.Core/Primitives/VectorType.ttinclude b/src/ComputeSharp.Core/Primitives/VectorType.ttinclude
index e97ca1ec..6b75ac34 100644
--- a/src/ComputeSharp.Core/Primitives/VectorType.ttinclude
+++ b/src/ComputeSharp.Core/Primitives/VectorType.ttinclude
@@ -1,5 +1,4 @@
-<#@ template debug="false" hostspecific="false" language="C#" #>
-<#@ assembly name="System.Core" #>
+<#@include file="..\Intrinsics\Hlsl.MulOverloads.ttinclude" #>
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Text" #>
<#@ import namespace="System.Text.RegularExpressions" #>
@@ -59,6 +58,11 @@ void GenerateVectorProperties(string typeName, int elementSize)
WriteLine("using System;");
WriteLine("using System.Globalization;");
}
+
+ if (elementTypeName == "Float" || elementTypeName == "Int")
+ {
+ WriteLine("using ComputeSharp.Core.Intrinsics.Attributes;");
+ }
#>
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -355,7 +359,77 @@ public unsafe partial struct <#=typeName#>
/// The result of multiplying and .
/// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
public static <#=typeName#> operator *(<#=typeName#> left, <#=typeName#> right) => default;
+<#
+ if (elementTypeName == "Float" || elementTypeName == "Int")
+ {
+ // Note: for Float and Int vector types, we need to also add explicit operators doing scalar promotion,
+ // otherwise there would be an overload issue trying to resolve the right overload when just multiplying
+ // by a scalar (which is not using the mul() intrinsic, but just doing elementwise product with promotion).
+ WriteLine("");
+#>
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static <#=typeName#> operator *(<#=typeName#> left, <#=hlslElementTypeName#> right) => default;
+ ///
+ /// Multiplies a pair of and values.
+ ///
+ /// The value to multiply.
+ /// The value to multiply.
+ /// The result of multiplying and .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static <#=typeName#> operator *(<#=hlslElementTypeName#> left, <#=typeName#> right) => default;
+<#
+ // Process all operators for the mul() intrinsic. We apply the following filtering:
+ // 1) Operators where both arguments are of the containing type are skipped. This is because
+ // this operation is already defined as an elementwise product for all vector/matrix types.
+ // Defining the operator would cause a conflict, plus it would alter the semantics anyway.
+ // 2) Operators where either parameter is a primitive type (ie. not a vector) are skipped. This
+ // is because such operation is already implicitly defined (it's an elementwise product where
+ // the scalar is auto-promoted to the same vector/matrix type of the other argument). Again,
+ // defining the operator would cause the semantics of such expressions to change to a cross
+ // product, so these operators are intentionally skipped to keep code consistent with HLSL.
+ // 3) Among all available overloads, only either of these two cases are selected:
+ // - The containing type matches the return type and the first parameter type of the operator.
+ // This ensures that all overloads where the return type matches the containing type and the
+ // first parameter are generated inside the containing type, as one would do manually as well.
+ // - The return type is unlike both parameter types, but the containing type matches the type of
+ // the first parameter. This is the case when the operator (ie. the cross product) produces a
+ // result that's of a completely different type. In this case, the overload maps to a generated
+ // operator declared in the type that matches the type of the first parameter, as a convention.
+ foreach (var mulOverload in MulOverloads.Where(overload =>
+ !(overload.Params[0] == typeName && overload.Params[1] == typeName) &&
+ Regex.IsMatch(overload.Params[0], @"\d") &&
+ Regex.IsMatch(overload.Params[1], @"\d") &&
+ (overload.Return == typeName && overload.Params.Contains(typeName) ||
+ !overload.Params.Contains(overload.Return) && overload.Params[0] == typeName)))
+ {
+ WriteLine("");
+#>
+ ///
+ /// Multiplies two values using matrix math.
+ ///
+ /// The first <#=mulOverload.Params[0]#> input value.
+ /// The second <#=mulOverload.Params[1]#> input value.
+ /// The result of times . The result has the dimension -rows by -columns.
+ ///
+ /// This operator is equivalent to using with the same input arguments.
+ /// For more info, see .
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ ///
+ [HlslIntrinsicName("mul", RequiresParametersMatching = true)]
+ public static <#=mulOverload.Return#> operator *(<#=mulOverload.Params[0]#> x, <#=mulOverload.Params[1]#> y) => default;
+<#
+ }
+ }
+
+ WriteLine("");
+#>
///
/// Subtracts two values.
///
diff --git a/src/ComputeSharp.SourceGeneration.Hlsl/ComputeSharp.SourceGeneration.Hlsl.projitems b/src/ComputeSharp.SourceGeneration.Hlsl/ComputeSharp.SourceGeneration.Hlsl.projitems
index 549065be..829cb1e5 100644
--- a/src/ComputeSharp.SourceGeneration.Hlsl/ComputeSharp.SourceGeneration.Hlsl.projitems
+++ b/src/ComputeSharp.SourceGeneration.Hlsl/ComputeSharp.SourceGeneration.Hlsl.projitems
@@ -15,6 +15,7 @@
+
diff --git a/src/ComputeSharp.SourceGeneration.Hlsl/Mappings/HlslKnownOperators.cs b/src/ComputeSharp.SourceGeneration.Hlsl/Mappings/HlslKnownOperators.cs
new file mode 100644
index 00000000..ee1bda0a
--- /dev/null
+++ b/src/ComputeSharp.SourceGeneration.Hlsl/Mappings/HlslKnownOperators.cs
@@ -0,0 +1,60 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using ComputeSharp.Core.Intrinsics.Attributes;
+
+namespace ComputeSharp.SourceGeneration.Mappings;
+
+///
+/// A that contains and maps known HLSL operators names to common .NET methods.
+///
+internal static partial class HlslKnownOperators
+{
+ ///
+ /// The mapping of supported known operators to HLSL names.
+ ///
+ private static readonly IReadOnlyDictionary KnownOperators = BuildKnownOperatorsMap();
+
+ ///
+ /// Builds the mapping of supported known operators to HLSL names.
+ ///
+ private static IReadOnlyDictionary BuildKnownOperatorsMap()
+ {
+ Dictionary knownOperators = new();
+
+ // Programmatically load mappings for the intrinsic operators on each HLSL primitive type
+ foreach (var item in
+ from type in HlslKnownTypes.KnownVectorTypes.Concat(HlslKnownTypes.KnownMatrixTypes)
+ from method in type.GetMethods(BindingFlags.Static | BindingFlags.Public)
+ where method.IsSpecialName && method.Name.StartsWith("op_")
+ let attribute = method.GetCustomAttribute()
+ where attribute is not null
+ select (Type: type, Operator: method, IntrinsicName: attribute.Name, attribute.RequiresParametersMatching))
+ {
+ if (!item.RequiresParametersMatching)
+ {
+ throw new NotSupportedException("All intrinsic operators must require parameter matching.");
+ }
+
+ // The key is in the format ".()"
+ knownOperators.Add(
+ $"{item.Type.FullName}{Type.Delimiter}{item.Operator.Name}({string.Join(", ", item.Operator.GetParameters().Select(static p => p.ParameterType.Name))})",
+ item.IntrinsicName);
+ }
+
+ return knownOperators;
+ }
+
+ ///
+ /// Tries to get the mapped HLSL-compatible method name for the input operator name.
+ ///
+ /// The input fully qualified operator name.
+ /// The sequence of type names for the method.
+ /// The mapped name, if one is found.
+ /// The HLSL-compatible method name that can be used in an HLSL shader.
+ public static bool TryGetMappedName(string name, IEnumerable parameterTypeNames, out string? mapped)
+ {
+ return KnownOperators.TryGetValue($"{name}({string.Join(", ", parameterTypeNames)})", out mapped);
+ }
+}
diff --git a/src/ComputeSharp.SourceGeneration.Hlsl/SyntaxRewriters/HlslSourceRewriter.cs b/src/ComputeSharp.SourceGeneration.Hlsl/SyntaxRewriters/HlslSourceRewriter.cs
index e487032c..bda83b72 100644
--- a/src/ComputeSharp.SourceGeneration.Hlsl/SyntaxRewriters/HlslSourceRewriter.cs
+++ b/src/ComputeSharp.SourceGeneration.Hlsl/SyntaxRewriters/HlslSourceRewriter.cs
@@ -291,6 +291,58 @@ internal abstract partial class HlslSourceRewriter : CSharpSyntaxRewriter
return updatedNode;
}
+ ///
+ public override SyntaxNode? VisitAssignmentExpression(AssignmentExpressionSyntax node)
+ {
+ var updatedNode = (AssignmentExpressionSyntax)base.VisitAssignmentExpression(node)!;
+
+ if (SemanticModel.For(node).GetOperation(node) is ICompoundAssignmentOperation { OperatorMethod: { ContainingType.ContainingNamespace.Name: "ComputeSharp" } method })
+ {
+ // If the compound assignment is using an HLSL operator, replace the expression with an invocation and assignment.
+ // That is, do the following transformation:
+ //
+ // x *= y => x = (x, y)
+ if (HlslKnownOperators.TryGetMappedName(method.GetFullMetadataName(), method.Parameters.Select(static p => p.Type.Name), out string? mapped))
+ {
+ return
+ AssignmentExpression(
+ SyntaxKind.SimpleAssignmentExpression,
+ updatedNode.Left,
+ InvocationExpression(IdentifierName(mapped!))
+ .AddArgumentListArguments(
+ Argument(updatedNode.Left),
+ Argument(updatedNode.Right)));
+ }
+ }
+
+ return updatedNode;
+ }
+
+ ///
+ public override SyntaxNode? VisitBinaryExpression(BinaryExpressionSyntax node)
+ {
+ var updatedNode = (BinaryExpressionSyntax)base.VisitBinaryExpression(node)!;
+
+ // Process binary operations to see if the target operator method is an intrinsic
+ if (SemanticModel.For(node).GetOperation(node) is IBinaryOperation { OperatorMethod: { ContainingType.ContainingNamespace.Name: "ComputeSharp" } method })
+ {
+ // If the operator is indeed an HLSL overload, replace the expression with an invocation.
+ // That is, do the following transformation:
+ //
+ // x * y => (x, y)
+ if (HlslKnownOperators.TryGetMappedName(method.GetFullMetadataName(), method.Parameters.Select(static p => p.Type.Name), out string? mapped))
+ {
+ return
+ InvocationExpression(IdentifierName(mapped!))
+ .AddArgumentListArguments(
+ Argument(updatedNode.Left),
+ Argument(updatedNode.Right));
+ }
+ }
+
+ return updatedNode;
+ }
+
///
public override SyntaxNode? VisitIdentifierName(IdentifierNameSyntax node)
{
diff --git a/tests/ComputeSharp.Tests/ShaderMembersTests.cs b/tests/ComputeSharp.Tests/ShaderMembersTests.cs
index 706aed37..5c83f514 100644
--- a/tests/ComputeSharp.Tests/ShaderMembersTests.cs
+++ b/tests/ComputeSharp.Tests/ShaderMembersTests.cs
@@ -85,7 +85,7 @@ public partial class ShaderMembersTests
}
}
- // See: https://github.com/Sergio0694/ComputeSharp/issues/193
+ // See https://github.com/Sergio0694/ComputeSharp/issues/193
[CombinatorialTestMethod]
[AllDevices]
public void BoolInstanceFields(Device device)
@@ -135,7 +135,7 @@ public partial class ShaderMembersTests
}
}
- // See: https://github.com/Sergio0694/ComputeSharp/issues/193
+ // See https://github.com/Sergio0694/ComputeSharp/issues/193
[CombinatorialTestMethod]
[AllDevices]
public void BoolInstanceFieldInCustomStruct(Device device)
diff --git a/tests/ComputeSharp.Tests/ShaderRewriterTests.cs b/tests/ComputeSharp.Tests/ShaderRewriterTests.cs
index 8b9cb27c..2d12710a 100644
--- a/tests/ComputeSharp.Tests/ShaderRewriterTests.cs
+++ b/tests/ComputeSharp.Tests/ShaderRewriterTests.cs
@@ -84,7 +84,7 @@ public partial class ShaderRewriterTests
}
}
- // See: https://github.com/Sergio0694/ComputeSharp/issues/233
+ // See https://github.com/Sergio0694/ComputeSharp/issues/233
[CombinatorialTestMethod]
[AllDevices]
public void CustomHlslOperators(Device device)
@@ -130,7 +130,7 @@ public partial class ShaderRewriterTests
}
}
- // See: https://github.com/Sergio0694/ComputeSharp/issues/361
+ // See https://github.com/Sergio0694/ComputeSharp/issues/361
[CombinatorialTestMethod]
[AllDevices]
public void BitwiseHlslOperators(Device device)
@@ -394,7 +394,7 @@ public partial class ShaderRewriterTests
}
}
- // See: https://github.com/Sergio0694/ComputeSharp/issues/259
+ // See https://github.com/Sergio0694/ComputeSharp/issues/259
[CombinatorialTestMethod]
[AllDevices]
public void ConstantsInShaderConstantFields(Device device)
@@ -577,4 +577,137 @@ public partial class ShaderRewriterTests
Hlsl.InterlockedCompareExchange(ref buffer[ThreadIds.X], ThreadIds.X, ThreadIds.X * 2, out _);
}
}
+
+ // See https://github.com/Sergio0694/ComputeSharp/issues/156
+ [CombinatorialTestMethod]
+ [AllDevices]
+ public void GlslStyleMulOperators(Device device)
+ {
+ float[] data1 = { 0.727829933f, 0.6413954f, 0.9373726f, 0.7044427f, 0.46349f, 0.8098116f, 0.604649544f, 0.309247822f, 0.470999569f, 0.7374923f, 0.6993038f, 0.518516064f, 0.44598946f };
+ int[] data2 = { 287, 295, 953, 465, 1011, 308, 982, 186, 323, 325, 156, 454, 580 };
+
+ using ReadOnlyBuffer buffer1 = device.Get().AllocateReadOnlyBuffer(data1);
+ using ReadOnlyBuffer buffer2 = device.Get().AllocateReadOnlyBuffer(data2);
+ using ReadWriteBuffer buffer3 = device.Get().AllocateReadWriteBuffer(22, AllocationMode.Clear);
+ using ReadWriteBuffer buffer4 = device.Get().AllocateReadWriteBuffer(22, AllocationMode.Clear);
+
+ device.Get().For(1, new GlslStyleMulOperatorsShader(buffer1, buffer2, buffer3, buffer4));
+
+ float[] results1 = buffer3.ToArray();
+ int[] results2 = buffer4.ToArray();
+
+ CollectionAssert.AreEqual(
+ expected: results1.AsSpan(11).ToArray(),
+ actual: results1.AsSpan(0, 11).ToArray());
+
+ CollectionAssert.AreEqual(
+ expected: results2.AsSpan(11).ToArray(),
+ actual: results2.AsSpan(0, 11).ToArray());
+ }
+
+ [AutoConstructor]
+ internal readonly partial struct GlslStyleMulOperatorsShader : IComputeShader
+ {
+ public readonly ReadOnlyBuffer source1;
+ public readonly ReadOnlyBuffer source2;
+ public readonly ReadWriteBuffer destination1;
+ public readonly ReadWriteBuffer destination2;
+
+ public void Execute()
+ {
+ float2 f2 = new(source1[0], source1[1]);
+ float f = source1[2];
+ float2x2 f22 = new(source1[3], source1[4], source1[5], source1[6]);
+ float2x3 f23 = new(source1[7], source1[8], source1[9], source1[10], source1[11], source1[12]);
+
+ float2 rf1 = f2 * f;
+ float2 rf2 = f * f2;
+ float2 rf3 = f2 * f22;
+ float3 rf4 = f2 * f23;
+
+ float2 f2_copy1 = f2;
+
+ f2_copy1 *= f22;
+
+ float2 rf5 = new(f2.X * f, f2.Y * f);
+ float2 rf6 = Hlsl.Mul(f, f2);
+ float2 rf7 = Hlsl.Mul(f2, f22);
+ float3 rf8 = Hlsl.Mul(f2, f23);
+
+ var f2_copy2 = f2;
+
+ f2_copy2 = Hlsl.Mul(f2_copy2, f22);
+
+ destination1[0] = rf1.X;
+ destination1[1] = rf1.Y;
+ destination1[2] = rf2.X;
+ destination1[3] = rf2.Y;
+ destination1[4] = rf3.X;
+ destination1[5] = rf3.Y;
+ destination1[6] = rf4.X;
+ destination1[7] = rf4.Y;
+ destination1[8] = rf4.Z;
+ destination1[9] = f2_copy1.X;
+ destination1[10] = f2_copy1.Y;
+
+ destination1[11] = rf5.X;
+ destination1[12] = rf5.Y;
+ destination1[13] = rf6.X;
+ destination1[14] = rf6.Y;
+ destination1[15] = rf7.X;
+ destination1[16] = rf7.Y;
+ destination1[17] = rf8.X;
+ destination1[18] = rf8.Y;
+ destination1[19] = rf8.Z;
+ destination1[20] = f2_copy2.X;
+ destination1[21] = f2_copy2.Y;
+
+ int2 i2 = new(source2[0], source2[1]);
+ int i = source2[2];
+ int2x2 i22 = new(source2[3], source2[4], source2[5], source2[6]);
+ int2x3 i23 = new(source2[7], source2[8], source2[9], source2[10], source2[11], source2[12]);
+
+ int2 ri1 = i2 * i;
+ int2 ri2 = i * i2;
+ int2 ri3 = i2 * i22;
+ int3 ri4 = i2 * i23;
+
+ int2 i2_copy1 = i2;
+
+ i2_copy1 *= i22;
+
+ int2 ri5 = new(i2.X * i, i2.Y * i);
+ int2 ri6 = Hlsl.Mul(i, i2);
+ int2 ri7 = Hlsl.Mul(i2, i22);
+ int3 ri8 = Hlsl.Mul(i2, i23);
+
+ var i2_copy2 = i2;
+
+ i2_copy2 = Hlsl.Mul(i2_copy2, i22);
+
+ destination2[0] = ri1.X;
+ destination2[1] = ri1.Y;
+ destination2[2] = ri2.X;
+ destination2[3] = ri2.Y;
+ destination2[4] = ri3.X;
+ destination2[5] = ri3.Y;
+ destination2[6] = ri4.X;
+ destination2[7] = ri4.Y;
+ destination2[8] = ri4.Z;
+ destination2[9] = i2_copy1.X;
+ destination2[10] = i2_copy1.Y;
+
+ destination2[11] = ri5.X;
+ destination2[12] = ri5.Y;
+ destination2[13] = ri6.X;
+ destination2[14] = ri6.Y;
+ destination2[15] = ri7.X;
+ destination2[16] = ri7.Y;
+ destination2[17] = ri8.X;
+ destination2[18] = ri8.Y;
+ destination2[19] = ri8.Z;
+ destination2[20] = i2_copy2.X;
+ destination2[21] = i2_copy2.Y;
+ }
+ }
}