Removed unnecessary NumThreads struct

このコミットが含まれているのは:
Sergio Pedri committed 2019-08-12 16:48:13 +02:00
1 親 13fc51df4a
コミット f249ab3305
1ファイル変更
-66
-66
ファイルの表示
@@ -1,66 +0,0 @@
using System.Diagnostics;
using System.Runtime.CompilerServices;
namespace ComputeSharp
{
/// <summary>
/// A <see langword="struct"/> that indicates the number of threads to use to run a given compute shader
/// </summary>
[DebuggerDisplay("(X: {X}, Y: {Y}, Z: {Z})")]
public readonly struct NumThreads
{
/// <summary>
/// The X id of the current thread
/// </summary>
public readonly int X;
/// <summary>
/// The Y id of the current thread
/// </summary>
public readonly int Y;
/// <summary>
/// The Z id of the current thread
/// </summary>
public readonly int Z;
/// <summary>
/// Creates a new <see cref="NumThreads"/> instance with the specified parameters
/// </summary>
/// <param name="x">The number of threads in the X axis</param>
/// <param name="y">The number of threads in the Y axis</param>
public NumThreads(int x, int y)
{
X = x;
Y = y;
Z = 1;
}
/// <summary>
/// Creates a new <see cref="NumThreads"/> instance with the specified parameters
/// </summary>
/// <param name="x">The number of threads in the X axis</param>
/// <param name="y">The number of threads in the Y axis</param>
/// <param name="z">The number of threads in the Z axis</param>
public NumThreads(int x, int y, int z)
{
X = x;
Y = y;
Z = z;
}
/// <summary>
/// Creates a new <see cref="NumThreads"/> instance from a value tuple
/// </summary>
/// <param name="xy">The tuple with the thread X and Y counts</param>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static implicit operator NumThreads((int X, int Y) xy) => new NumThreads(xy.X, xy.Y);
/// <summary>
/// Creates a new <see cref="NumThreads"/> instance from a value tuple
/// </summary>
/// <param name="xy">The tuple with the thread X, Y and Z counts</param>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static implicit operator NumThreads((int X, int Y, int Z) xyz) => new NumThreads(xyz.X, xyz.Y, xyz.Z);
}
}