diff --git a/src/ComputeSharp.Core/Primitives/Double/Double2.cs b/src/ComputeSharp.Core/Primitives/Double/Double2.cs
deleted file mode 100644
index 6d1e2a17..00000000
--- a/src/ComputeSharp.Core/Primitives/Double/Double2.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-#pragma warning disable CS0660, CS0661, IDE0290
-
-namespace ComputeSharp;
-
-///
-/// A that maps the HLSL type.
-///
-public partial struct Double2
-{
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static explicit operator Int2(Double2 xy) => default;
-
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static explicit operator UInt2(Double2 xy) => default;
-
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static explicit operator Float2(Double2 xy) => default;
-}
\ No newline at end of file
diff --git a/src/ComputeSharp.Core/Primitives/Double/Double2.g.cs b/src/ComputeSharp.Core/Primitives/Double/Double2.g.cs
index 401c18d2..99be71d5 100644
--- a/src/ComputeSharp.Core/Primitives/Double/Double2.g.cs
+++ b/src/ComputeSharp.Core/Primitives/Double/Double2.g.cs
@@ -488,6 +488,27 @@ public unsafe partial struct Double2
/// The value to use for the components of the new instance.
public static implicit operator Double2(double x) => new(x, x);
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static explicit operator Float2(Double2 xy) => default;
+
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static explicit operator Int2(Double2 xy) => default;
+
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static explicit operator UInt2(Double2 xy) => default;
+
///
/// Negates a value.
///
diff --git a/src/ComputeSharp.Core/Primitives/Double/Double3.cs b/src/ComputeSharp.Core/Primitives/Double/Double3.cs
deleted file mode 100644
index 4f167c3f..00000000
--- a/src/ComputeSharp.Core/Primitives/Double/Double3.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-#pragma warning disable CS0660, CS0661
-
-namespace ComputeSharp;
-
-///
-/// A that maps the HLSL type.
-///
-public partial struct Double3
-{
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static explicit operator Int3(Double3 xyz) => default;
-
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static explicit operator UInt3(Double3 xyz) => default;
-
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static explicit operator Float3(Double3 xyz) => default;
-}
\ No newline at end of file
diff --git a/src/ComputeSharp.Core/Primitives/Double/Double3.g.cs b/src/ComputeSharp.Core/Primitives/Double/Double3.g.cs
index 5d6346d2..9f31fd41 100644
--- a/src/ComputeSharp.Core/Primitives/Double/Double3.g.cs
+++ b/src/ComputeSharp.Core/Primitives/Double/Double3.g.cs
@@ -1828,6 +1828,27 @@ public unsafe partial struct Double3
/// The value to use for the components of the new instance.
public static implicit operator Double3(double x) => new(x, x, x);
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static explicit operator Float3(Double3 xyz) => default;
+
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static explicit operator Int3(Double3 xyz) => default;
+
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static explicit operator UInt3(Double3 xyz) => default;
+
///
/// Negates a value.
///
diff --git a/src/ComputeSharp.Core/Primitives/Double/Double4.cs b/src/ComputeSharp.Core/Primitives/Double/Double4.cs
deleted file mode 100644
index e28c6b8f..00000000
--- a/src/ComputeSharp.Core/Primitives/Double/Double4.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-#pragma warning disable CS0660, CS0661
-
-namespace ComputeSharp;
-
-///
-/// A that maps the HLSL type.
-///
-public partial struct Double4
-{
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static explicit operator Int4(Double4 xyzw) => default;
-
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static explicit operator UInt4(Double4 xyzw) => default;
-
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static explicit operator Float4(Double4 xyzw) => default;
-}
\ No newline at end of file
diff --git a/src/ComputeSharp.Core/Primitives/Double/Double4.g.cs b/src/ComputeSharp.Core/Primitives/Double/Double4.g.cs
index 5fe0be55..8bb64d99 100644
--- a/src/ComputeSharp.Core/Primitives/Double/Double4.g.cs
+++ b/src/ComputeSharp.Core/Primitives/Double/Double4.g.cs
@@ -5165,6 +5165,27 @@ public unsafe partial struct Double4
/// The value to use for the components of the new instance.
public static implicit operator Double4(double x) => new(x, x, x, x);
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static explicit operator Float4(Double4 xyzw) => default;
+
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static explicit operator Int4(Double4 xyzw) => default;
+
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static explicit operator UInt4(Double4 xyzw) => default;
+
///
/// Negates a value.
///
diff --git a/src/ComputeSharp.Core/Primitives/Float/Float2.cs b/src/ComputeSharp.Core/Primitives/Float/Float2.cs
index 77c9e738..aa6fffdc 100644
--- a/src/ComputeSharp.Core/Primitives/Float/Float2.cs
+++ b/src/ComputeSharp.Core/Primitives/Float/Float2.cs
@@ -20,25 +20,4 @@ public partial struct Float2
///
/// The input value to cast.
public static unsafe implicit operator Float2(Vector2 xy) => *(Float2*)&xy;
-
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static implicit operator Double2(Float2 xy) => default;
-
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static explicit operator Int2(Float2 xy) => default;
-
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static explicit operator UInt2(Float2 xy) => default;
}
\ No newline at end of file
diff --git a/src/ComputeSharp.Core/Primitives/Float/Float2.g.cs b/src/ComputeSharp.Core/Primitives/Float/Float2.g.cs
index 87895196..5795eb00 100644
--- a/src/ComputeSharp.Core/Primitives/Float/Float2.g.cs
+++ b/src/ComputeSharp.Core/Primitives/Float/Float2.g.cs
@@ -489,6 +489,27 @@ public unsafe partial struct Float2
/// The value to use for the components of the new instance.
public static implicit operator Float2(float x) => new(x, x);
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static implicit operator Double2(Float2 xy) => default;
+
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static explicit operator Int2(Float2 xy) => default;
+
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static explicit operator UInt2(Float2 xy) => default;
+
///
/// Negates a value.
///
diff --git a/src/ComputeSharp.Core/Primitives/Float/Float3.cs b/src/ComputeSharp.Core/Primitives/Float/Float3.cs
index 2ce9930b..a27b9285 100644
--- a/src/ComputeSharp.Core/Primitives/Float/Float3.cs
+++ b/src/ComputeSharp.Core/Primitives/Float/Float3.cs
@@ -20,25 +20,4 @@ public partial struct Float3
///
/// The input value to cast.
public static unsafe implicit operator Float3(Vector3 xyz) => *(Float3*)&xyz;
-
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static implicit operator Double3(Float3 xyz) => default;
-
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static explicit operator Int3(Float3 xyz) => default;
-
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static explicit operator UInt3(Float3 xyz) => default;
}
\ No newline at end of file
diff --git a/src/ComputeSharp.Core/Primitives/Float/Float3.g.cs b/src/ComputeSharp.Core/Primitives/Float/Float3.g.cs
index ae820a92..1a557d8a 100644
--- a/src/ComputeSharp.Core/Primitives/Float/Float3.g.cs
+++ b/src/ComputeSharp.Core/Primitives/Float/Float3.g.cs
@@ -1829,6 +1829,27 @@ public unsafe partial struct Float3
/// The value to use for the components of the new instance.
public static implicit operator Float3(float x) => new(x, x, x);
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static implicit operator Double3(Float3 xyz) => default;
+
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static explicit operator Int3(Float3 xyz) => default;
+
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static explicit operator UInt3(Float3 xyz) => default;
+
///
/// Negates a value.
///
diff --git a/src/ComputeSharp.Core/Primitives/Float/Float4.cs b/src/ComputeSharp.Core/Primitives/Float/Float4.cs
index ab7f83fb..0445ed76 100644
--- a/src/ComputeSharp.Core/Primitives/Float/Float4.cs
+++ b/src/ComputeSharp.Core/Primitives/Float/Float4.cs
@@ -20,25 +20,4 @@ public partial struct Float4
///
/// The input value to cast.
public static unsafe implicit operator Float4(Vector4 xyzw) => *(Float4*)&xyzw;
-
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static implicit operator Double4(Float4 xyzw) => default;
-
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static explicit operator Int4(Float4 xyzw) => default;
-
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static explicit operator UInt4(Float4 xyzw) => default;
}
\ No newline at end of file
diff --git a/src/ComputeSharp.Core/Primitives/Float/Float4.g.cs b/src/ComputeSharp.Core/Primitives/Float/Float4.g.cs
index 00594bcd..c325b6d3 100644
--- a/src/ComputeSharp.Core/Primitives/Float/Float4.g.cs
+++ b/src/ComputeSharp.Core/Primitives/Float/Float4.g.cs
@@ -5166,6 +5166,27 @@ public unsafe partial struct Float4
/// The value to use for the components of the new instance.
public static implicit operator Float4(float x) => new(x, x, x, x);
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static implicit operator Double4(Float4 xyzw) => default;
+
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static explicit operator Int4(Float4 xyzw) => default;
+
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static explicit operator UInt4(Float4 xyzw) => default;
+
///
/// Negates a value.
///
diff --git a/src/ComputeSharp.Core/Primitives/Int/Int2.cs b/src/ComputeSharp.Core/Primitives/Int/Int2.cs
deleted file mode 100644
index 5213554c..00000000
--- a/src/ComputeSharp.Core/Primitives/Int/Int2.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-#pragma warning disable CS0660, CS0661, IDE0290
-
-namespace ComputeSharp;
-
-///
-/// A that maps the HLSL type.
-///
-public partial struct Int2
-{
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static explicit operator UInt2(Int2 xy) => default;
-
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static implicit operator Float2(Int2 xy) => default;
-
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static implicit operator Double2(Int2 xy) => default;
-}
\ No newline at end of file
diff --git a/src/ComputeSharp.Core/Primitives/Int/Int2.g.cs b/src/ComputeSharp.Core/Primitives/Int/Int2.g.cs
index a740e4cf..6074658f 100644
--- a/src/ComputeSharp.Core/Primitives/Int/Int2.g.cs
+++ b/src/ComputeSharp.Core/Primitives/Int/Int2.g.cs
@@ -489,6 +489,27 @@ public unsafe partial struct Int2
/// The value to use for the components of the new instance.
public static implicit operator Int2(int x) => new(x, x);
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static implicit operator Float2(Int2 xy) => default;
+
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static implicit operator Double2(Int2 xy) => default;
+
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static explicit operator UInt2(Int2 xy) => default;
+
///
/// Negates a value.
///
diff --git a/src/ComputeSharp.Core/Primitives/Int/Int3.cs b/src/ComputeSharp.Core/Primitives/Int/Int3.cs
deleted file mode 100644
index 3817fd83..00000000
--- a/src/ComputeSharp.Core/Primitives/Int/Int3.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-#pragma warning disable CS0660, CS0661
-
-namespace ComputeSharp;
-
-///
-/// A that maps the HLSL type.
-///
-public partial struct Int3
-{
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static explicit operator UInt3(Int3 xyz) => default;
-
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static implicit operator Float3(Int3 xyz) => default;
-
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static implicit operator Double3(Int3 xyz) => default;
-}
\ No newline at end of file
diff --git a/src/ComputeSharp.Core/Primitives/Int/Int3.g.cs b/src/ComputeSharp.Core/Primitives/Int/Int3.g.cs
index 2339ccfc..cd7af4ec 100644
--- a/src/ComputeSharp.Core/Primitives/Int/Int3.g.cs
+++ b/src/ComputeSharp.Core/Primitives/Int/Int3.g.cs
@@ -1829,6 +1829,27 @@ public unsafe partial struct Int3
/// The value to use for the components of the new instance.
public static implicit operator Int3(int x) => new(x, x, x);
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static implicit operator Float3(Int3 xyz) => default;
+
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static implicit operator Double3(Int3 xyz) => default;
+
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static explicit operator UInt3(Int3 xyz) => default;
+
///
/// Negates a value.
///
diff --git a/src/ComputeSharp.Core/Primitives/Int/Int4.cs b/src/ComputeSharp.Core/Primitives/Int/Int4.cs
deleted file mode 100644
index e44860c5..00000000
--- a/src/ComputeSharp.Core/Primitives/Int/Int4.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-#pragma warning disable CS0660, CS0661
-
-namespace ComputeSharp;
-
-///
-/// A that maps the HLSL type.
-///
-public partial struct Int4
-{
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static explicit operator UInt4(Int4 xyzw) => default;
-
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static implicit operator Float4(Int4 xyzw) => default;
-
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static implicit operator Double4(Int4 xyzw) => default;
-}
\ No newline at end of file
diff --git a/src/ComputeSharp.Core/Primitives/Int/Int4.g.cs b/src/ComputeSharp.Core/Primitives/Int/Int4.g.cs
index 1c0a32f7..9ce5baf6 100644
--- a/src/ComputeSharp.Core/Primitives/Int/Int4.g.cs
+++ b/src/ComputeSharp.Core/Primitives/Int/Int4.g.cs
@@ -5166,6 +5166,27 @@ public unsafe partial struct Int4
/// The value to use for the components of the new instance.
public static implicit operator Int4(int x) => new(x, x, x, x);
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static implicit operator Float4(Int4 xyzw) => default;
+
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static implicit operator Double4(Int4 xyzw) => default;
+
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static explicit operator UInt4(Int4 xyzw) => default;
+
///
/// Negates a value.
///
diff --git a/src/ComputeSharp.Core/Primitives/UInt/UInt2.cs b/src/ComputeSharp.Core/Primitives/UInt/UInt2.cs
deleted file mode 100644
index 7a7cbd75..00000000
--- a/src/ComputeSharp.Core/Primitives/UInt/UInt2.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-#pragma warning disable CS0660, CS0661, IDE0290
-
-namespace ComputeSharp;
-
-///
-/// A that maps the HLSL type.
-///
-public partial struct UInt2
-{
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static explicit operator Int2(UInt2 xy) => default;
-
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static implicit operator Float2(UInt2 xy) => default;
-
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static implicit operator Double2(UInt2 xy) => default;
-}
\ No newline at end of file
diff --git a/src/ComputeSharp.Core/Primitives/UInt/UInt2.g.cs b/src/ComputeSharp.Core/Primitives/UInt/UInt2.g.cs
index df85aa7d..6551999b 100644
--- a/src/ComputeSharp.Core/Primitives/UInt/UInt2.g.cs
+++ b/src/ComputeSharp.Core/Primitives/UInt/UInt2.g.cs
@@ -488,6 +488,27 @@ public unsafe partial struct UInt2
/// The value to use for the components of the new instance.
public static implicit operator UInt2(uint x) => new(x, x);
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static implicit operator Float2(UInt2 xy) => default;
+
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static implicit operator Double2(UInt2 xy) => default;
+
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static explicit operator Int2(UInt2 xy) => default;
+
///
/// Sums two values.
///
diff --git a/src/ComputeSharp.Core/Primitives/UInt/UInt3.cs b/src/ComputeSharp.Core/Primitives/UInt/UInt3.cs
deleted file mode 100644
index 0715b76c..00000000
--- a/src/ComputeSharp.Core/Primitives/UInt/UInt3.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-#pragma warning disable CS0660, CS0661
-
-namespace ComputeSharp;
-
-///
-/// A that maps the HLSL type.
-///
-public partial struct UInt3
-{
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static explicit operator Int3(UInt3 xyz) => default;
-
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static implicit operator Float3(UInt3 xyz) => default;
-
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static implicit operator Double3(UInt3 xyz) => default;
-}
\ No newline at end of file
diff --git a/src/ComputeSharp.Core/Primitives/UInt/UInt3.g.cs b/src/ComputeSharp.Core/Primitives/UInt/UInt3.g.cs
index 46070b84..476c29af 100644
--- a/src/ComputeSharp.Core/Primitives/UInt/UInt3.g.cs
+++ b/src/ComputeSharp.Core/Primitives/UInt/UInt3.g.cs
@@ -1828,6 +1828,27 @@ public unsafe partial struct UInt3
/// The value to use for the components of the new instance.
public static implicit operator UInt3(uint x) => new(x, x, x);
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static implicit operator Float3(UInt3 xyz) => default;
+
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static implicit operator Double3(UInt3 xyz) => default;
+
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static explicit operator Int3(UInt3 xyz) => default;
+
///
/// Sums two values.
///
diff --git a/src/ComputeSharp.Core/Primitives/UInt/UInt4.cs b/src/ComputeSharp.Core/Primitives/UInt/UInt4.cs
deleted file mode 100644
index 04a04efb..00000000
--- a/src/ComputeSharp.Core/Primitives/UInt/UInt4.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-#pragma warning disable CS0660, CS0661
-
-namespace ComputeSharp;
-
-///
-/// A that maps the HLSL type.
-///
-public partial struct UInt4
-{
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static explicit operator Int4(UInt4 xyzw) => default;
-
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static implicit operator Float4(UInt4 xyzw) => default;
-
- ///
- /// Casts a value to a one.
- ///
- /// The input value to cast.
- /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
- public static implicit operator Double4(UInt4 xyzw) => default;
-}
\ No newline at end of file
diff --git a/src/ComputeSharp.Core/Primitives/UInt/UInt4.g.cs b/src/ComputeSharp.Core/Primitives/UInt/UInt4.g.cs
index e321163a..ab95b605 100644
--- a/src/ComputeSharp.Core/Primitives/UInt/UInt4.g.cs
+++ b/src/ComputeSharp.Core/Primitives/UInt/UInt4.g.cs
@@ -5165,6 +5165,27 @@ public unsafe partial struct UInt4
/// The value to use for the components of the new instance.
public static implicit operator UInt4(uint x) => new(x, x, x, x);
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static implicit operator Float4(UInt4 xyzw) => default;
+
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static implicit operator Double4(UInt4 xyzw) => default;
+
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static explicit operator Int4(UInt4 xyzw) => default;
+
///
/// Sums two values.
///
diff --git a/src/ComputeSharp.Core/Primitives/VectorType.ttinclude b/src/ComputeSharp.Core/Primitives/VectorType.ttinclude
index 4912a56b..7d964bf7 100644
--- a/src/ComputeSharp.Core/Primitives/VectorType.ttinclude
+++ b/src/ComputeSharp.Core/Primitives/VectorType.ttinclude
@@ -264,6 +264,31 @@ public unsafe partial struct <#=typeName#>
/// The value to use for the components of the new instance.
public static implicit operator <#=typeName#>(<#=hlslElementTypeName#> x) => new(<#=string.Join(", ", Enumerable.Range(0, i).Select(_ => "x"))#>);
<#
+ // Generate the cast operators, when applicable
+ foreach (string targetType in new[] { "Float", "Double", "Int", "UInt" })
+ {
+ if (elementTypeName != "Bool" && elementTypeName != targetType)
+ {
+ WriteLine("");
+
+ string parameterName = new string("xyzw".Take(i).ToArray());
+ bool isImplicit =
+ (elementTypeName == "Float" && targetType == "Double") ||
+ (elementTypeName == "Int" && targetType == "Float") ||
+ (elementTypeName == "Int" && targetType == "Double") ||
+ (elementTypeName == "UInt" && targetType == "Float") ||
+ (elementTypeName == "UInt" && targetType == "Double");
+#>
+ ///
+ /// Casts a value to a one.
+ ///
+ /// The input value to cast.
+ /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.
+ public static <#=isImplicit ? "implicit" : "explicit"#> operator <#=targetType#><#=i#>(<#=typeName#> <#=parameterName#>) => default;
+<#
+ }
+ }
+
// Generate the negation operator
if (elementTypeName != "UInt")
{
diff --git a/src/ComputeSharp.D2D1.SourceGenerators/ComputeSharp.D2D1.SourceGenerators.csproj b/src/ComputeSharp.D2D1.SourceGenerators/ComputeSharp.D2D1.SourceGenerators.csproj
index 528de9b4..478f9a4e 100644
--- a/src/ComputeSharp.D2D1.SourceGenerators/ComputeSharp.D2D1.SourceGenerators.csproj
+++ b/src/ComputeSharp.D2D1.SourceGenerators/ComputeSharp.D2D1.SourceGenerators.csproj
@@ -31,31 +31,19 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/ComputeSharp.SourceGenerators/ComputeSharp.SourceGenerators.csproj b/src/ComputeSharp.SourceGenerators/ComputeSharp.SourceGenerators.csproj
index ba134f09..487bf38a 100644
--- a/src/ComputeSharp.SourceGenerators/ComputeSharp.SourceGenerators.csproj
+++ b/src/ComputeSharp.SourceGenerators/ComputeSharp.SourceGenerators.csproj
@@ -25,31 +25,19 @@
-
-
-
-
-
-
-
-
-
-
-
-