Skip to content

Commit

Permalink
Removed obsolete methods from VelocityTargetSpecializer.
Browse files Browse the repository at this point in the history
  • Loading branch information
m4rs-mt committed Sep 27, 2023
1 parent 857bedb commit f137d9c
Showing 1 changed file with 0 additions and 75 deletions.
75 changes: 0 additions & 75 deletions Src/ILGPU/Backends/Velocity/VelocityTargetSpecializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,6 @@ internal static MethodInfo GetMethod<T>(string name) =>

private static readonly MethodInfo MemoryBarrierMethod =
GetMethod<VelocityTargetSpecializer>(nameof(MemoryBarrier));
private static readonly MethodInfo GetGridIndexMethod =
GetMethod<VelocityTargetSpecializer>(nameof(GetGridIndexImpl));
private static readonly MethodInfo GetGridDimMethod =
GetMethod<VelocityTargetSpecializer>(nameof(GetGridDimImpl));
private static readonly MethodInfo GetGroupDimMethod =
GetMethod<VelocityTargetSpecializer>(nameof(GetGroupDimImpl));
private static readonly MethodInfo GetUserSizeMethod =
GetMethod<VelocityTargetSpecializer>(nameof(GetUserSizeImpl));

private static readonly MethodInfo GetDynamicSharedMemoryMethod =
GetMethod<VelocityTargetSpecializer>(
Expand All @@ -54,8 +46,6 @@ internal static MethodInfo GetMethod<T>(string name) =>
GetMethod<VelocityTargetSpecializer>(nameof(GetSharedMemoryFromPoolImpl));
private static readonly MethodInfo GetLocalMemoryFromPoolMethod =
GetMethod<VelocityTargetSpecializer>(nameof(GetLocalMemoryFromPoolImpl));
private static readonly MethodInfo ComputeGlobalBaseIndexMethod =
GetMethod<VelocityTargetSpecializer>(nameof(ComputeGlobalBaseIndexImpl));
private static readonly MethodInfo DebuggerBreakMethod =
GetMethod<VelocityTargetSpecializer>(nameof(DebuggerBreakImpl));

Expand All @@ -64,36 +54,6 @@ internal static MethodInfo GetMethod<T>(string name) =>
/// </summary>
internal static void MemoryBarrier() => Interlocked.MemoryBarrier();

/// <summary>
/// Wrapper around a group extension context.
/// </summary>
internal static int GetGridIndexImpl(VelocityGroupExecutionContext context) =>
context.GridIdx;

/// <summary>
/// Wrapper around a group extension context.
/// </summary>
internal static int GetGridDimImpl(VelocityGroupExecutionContext context) =>
context.GridDim;

/// <summary>
/// Wrapper around a group extension context.
/// </summary>
internal static int GetGroupDimImpl(VelocityGroupExecutionContext context) =>
context.GroupDim;

/// <summary>
/// Wrapper around a group extension context.
/// </summary>
internal static int GetUserSizeImpl(VelocityGroupExecutionContext context) =>
context.UserSize;

/// <summary>
/// Wrapper around a group extension context.
/// </summary>
internal static int ComputeGlobalBaseIndexImpl(
VelocityGroupExecutionContext context) => context.GroupOffset;

/// <summary>
/// Wrapper around a group extension context.
/// </summary>
Expand Down Expand Up @@ -557,34 +517,6 @@ public static void MemoryBarrier<TILEmitter>(TILEmitter emitter)
where TILEmitter : struct, IILEmitter =>
emitter.EmitCall(MemoryBarrierMethod);

public static void GetGridIndex<TILEmitter>(TILEmitter emitter)
where TILEmitter : struct, IILEmitter
{
emitter.Emit(OpCodes.Ldarg_0);
emitter.EmitCall(GetGridIndexMethod);
}

public static void GetGridDim<TILEmitter>(TILEmitter emitter)
where TILEmitter : struct, IILEmitter
{
emitter.Emit(OpCodes.Ldarg_0);
emitter.EmitCall(GetGridDimMethod);
}

public static void GetUserSize<TILEmitter>(TILEmitter emitter)
where TILEmitter : struct, IILEmitter
{
emitter.Emit(OpCodes.Ldarg_0);
emitter.EmitCall(GetUserSizeMethod);
}

public static void GetGroupDim<TILEmitter>(TILEmitter emitter)
where TILEmitter : struct, IILEmitter
{
emitter.Emit(OpCodes.Ldarg_0);
emitter.EmitCall(GetGroupDimMethod);
}

public void GetDynamicSharedMemory<TILEmitter>(TILEmitter emitter)
where TILEmitter : struct, IILEmitter
{
Expand Down Expand Up @@ -640,13 +572,6 @@ public void GetUnifiedLocalMemoryFromPool<TILEmitter>(
ConvertScalarTo64(emitter, VelocityWarpOperationMode.U);
}

public static void ComputeGlobalBaseIndex<TILEmitter>(TILEmitter emitter)
where TILEmitter : struct, IILEmitter
{
emitter.Emit(OpCodes.Ldarg_0);
emitter.EmitCall(ComputeGlobalBaseIndexMethod);
}

public static void DebuggerBreak<TILEmitter>(TILEmitter emitter)
where TILEmitter : struct, IILEmitter =>
emitter.EmitCall(DebuggerBreakMethod);
Expand Down

0 comments on commit f137d9c

Please sign in to comment.