Code tweaks to the ThreadIds struct

このコミットが含まれているのは:
Sergio Pedri committed 2019-08-29 00:31:35 +02:00
1 親 5bfb7564cf
コミット 399218f525
1ファイル変更
+9 -7
+9 -7
ファイルの表示
@@ -1,4 +1,6 @@
namespace ComputeSharp
using ComputeSharp.Exceptions;
namespace ComputeSharp
{
/// <summary>
/// A <see langword="struct"/> that indicates the ids of a given GPU thread running a compute shader
@@ -6,18 +8,18 @@
public readonly struct ThreadIds
{
/// <summary>
/// The X id of the current thread
/// Gets the X id of the current thread
/// </summary>
public readonly int X;
public int X => throw new InvalidExecutionContextException($"{nameof(ThreadIds)}.{nameof(X)}");
/// <summary>
/// The Y id of the current thread
/// Gets the Y id of the current thread
/// </summary>
public readonly int Y;
public int Y => throw new InvalidExecutionContextException($"{nameof(ThreadIds)}.{nameof(Y)}");
/// <summary>
/// The Z id of the current thread
/// Gets the Z id of the current thread
/// </summary>
public readonly int Z;
public int Z => throw new InvalidExecutionContextException($"{nameof(ThreadIds)}.{nameof(Z)}");
}
}