Skip to content

Commit

Permalink
Marked obsolete methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
MoFtZ authored and m4rs-mt committed Jan 8, 2024
1 parent d352ec4 commit b60e94f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
8 changes: 8 additions & 0 deletions Src/ILGPU/Runtime/ArrayViewExtensions.Generated.tt
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,7 @@ namespace ILGPU.Runtime
/// <param name="pageLockScope">The page locked memory.</param>
/// <remarks>This method is not supported on accelerators.</remarks>
[NotInsideKernel]
[Obsolete("Use PageLockScope.ArrayView instead")]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void CopyToPageLockedAsync<T>(
this <#= viewName #> source,
Expand All @@ -729,6 +730,7 @@ namespace ILGPU.Runtime
/// <param name="pageLockScope">The page locked memory.</param>
/// <remarks>This method is not supported on accelerators.</remarks>
[NotInsideKernel]
[Obsolete("Use PageLockScope.ArrayView instead")]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void CopyToPageLockedAsync<T>(
this <#= viewName #> source,
Expand All @@ -746,6 +748,7 @@ namespace ILGPU.Runtime
/// <param name="pageLockScope">The page locked memory.</param>
/// <remarks>This method is not supported on accelerators.</remarks>
[NotInsideKernel]
[Obsolete("Use PageLockScope.ArrayView instead")]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void CopyFromPageLockedAsync<T>(
this <#= viewName #> target,
Expand All @@ -763,6 +766,7 @@ namespace ILGPU.Runtime
/// <param name="pageLockScope">The page locked memory.</param>
/// <remarks>This method is not supported on accelerators.</remarks>
[NotInsideKernel]
[Obsolete("Use PageLockScope.ArrayView instead")]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void CopyFromPageLockedAsync<T>(
this <#= viewName #> target,
Expand Down Expand Up @@ -792,6 +796,7 @@ namespace ILGPU.Runtime
/// This method is not supported on accelerators.
/// </remarks>
[NotInsideKernel]
[Obsolete("Use PageLockScope.ArrayView instead")]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void CopyToPageLockedAsync<T>(
this <#= typeName #><T, <#= strideTypeName #>.<#= strideName #>> source,
Expand All @@ -812,6 +817,7 @@ namespace ILGPU.Runtime
/// This method is not supported on accelerators.
/// </remarks>
[NotInsideKernel]
[Obsolete("Use PageLockScope.ArrayView instead")]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void CopyToPageLockedAsync<T>(
this <#= typeName #><T, <#= strideTypeName #>.<#= strideName #>> source,
Expand All @@ -832,6 +838,7 @@ namespace ILGPU.Runtime
/// This method is not supported on accelerators.
/// </remarks>
[NotInsideKernel]
[Obsolete("Use PageLockScope.ArrayView instead")]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void CopyFromPageLockedAsync<T>(
this <#= typeName #><T, <#= strideTypeName #>.<#= strideName #>> target,
Expand All @@ -855,6 +862,7 @@ namespace ILGPU.Runtime
/// This method is not supported on accelerators.
/// </remarks>
[NotInsideKernel]
[Obsolete("Use PageLockScope.ArrayView instead")]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void CopyFromPageLockedAsync<T>(
this <#= typeName #><T, <#= strideTypeName #>.<#= strideName #>> target,
Expand Down
16 changes: 12 additions & 4 deletions Src/ILGPU/Runtime/ArrayViewExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1423,6 +1423,7 @@ public static void CopyFromCPU<T>(
/// <param name="pageLockScope">The page locked memory.</param>
/// <remarks>This method is not supported on accelerators.</remarks>
[NotInsideKernel]
[Obsolete("Use PageLockScope.ArrayView instead")]
public static void CopyToPageLockedAsync<T, TView>(
this TView source,
AcceleratorStream stream,
Expand Down Expand Up @@ -1459,6 +1460,7 @@ public static void CopyToPageLockedAsync<T, TView>(
/// <param name="pageLockScope">The page locked memory.</param>
/// <remarks>This method is not supported on accelerators.</remarks>
[NotInsideKernel]
[Obsolete("Use PageLockScope.ArrayView instead")]
public static void CopyFromPageLockedAsync<T, TView>(
this TView target,
AcceleratorStream stream,
Expand Down Expand Up @@ -1494,6 +1496,7 @@ public static void CopyFromPageLockedAsync<T, TView>(
/// <param name="pageLockScope">The page locked memory.</param>
/// <remarks>This method is not supported on accelerators.</remarks>
[NotInsideKernel]
[Obsolete("Use PageLockScope.ArrayView instead")]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void CopyToPageLockedAsync<T, TView>(
this TView source,
Expand All @@ -1515,6 +1518,7 @@ public static void CopyToPageLockedAsync<T, TView>(
/// <param name="pageLockScope">The page locked memory.</param>
/// <remarks>This method is not supported on accelerators.</remarks>
[NotInsideKernel]
[Obsolete("Use PageLockScope.ArrayView instead")]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void CopyFromPageLockedAsync<T, TView>(
this TView target,
Expand All @@ -1537,6 +1541,7 @@ public static void CopyFromPageLockedAsync<T, TView>(
/// <param name="pageLockedArray">The page locked memory.</param>
/// <remarks>This method is not supported on accelerators.</remarks>
[NotInsideKernel]
[Obsolete("Use PageLockScope.ArrayView instead")]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void CopyToPageLockedAsync<T, TView>(
this TView source,
Expand All @@ -1546,7 +1551,7 @@ public static void CopyToPageLockedAsync<T, TView>(
where T : unmanaged =>
source.CopyToPageLockedAsync(
stream,
pageLockedArray.Scope);
pageLockedArray.Scope.AsNotNull());

/// <summary>
/// Copies from the page locked memory into the given target view without
Expand All @@ -1559,6 +1564,7 @@ public static void CopyToPageLockedAsync<T, TView>(
/// <param name="pageLockedArray">The page locked memory.</param>
/// <remarks>This method is not supported on accelerators.</remarks>
[NotInsideKernel]
[Obsolete("Use PageLockScope.ArrayView instead")]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void CopyFromPageLockedAsync<T, TView>(
this TView target,
Expand All @@ -1568,7 +1574,7 @@ public static void CopyFromPageLockedAsync<T, TView>(
where T : unmanaged =>
target.CopyFromPageLockedAsync(
stream,
pageLockedArray.Scope);
pageLockedArray.Scope.AsNotNull());

/// <summary>
/// Copies from the source view into the given page locked memory without
Expand All @@ -1580,13 +1586,14 @@ public static void CopyFromPageLockedAsync<T, TView>(
/// <param name="pageLockedArray">The page locked memory.</param>
/// <remarks>This method is not supported on accelerators.</remarks>
[NotInsideKernel]
[Obsolete("Use PageLockScope.ArrayView instead")]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void CopyToPageLockedAsync<T, TView>(
this TView source,
PageLockedArray<T> pageLockedArray)
where TView : IContiguousArrayView<T>
where T : unmanaged =>
source.CopyToPageLockedAsync(pageLockedArray.Scope);
source.CopyToPageLockedAsync(pageLockedArray.Scope.AsNotNull());

/// <summary>
/// Copies from the page locked memory into the given target view without
Expand All @@ -1598,13 +1605,14 @@ public static void CopyToPageLockedAsync<T, TView>(
/// <param name="pageLockedArray">The page locked memory.</param>
/// <remarks>This method is not supported on accelerators.</remarks>
[NotInsideKernel]
[Obsolete("Use PageLockScope.ArrayView instead")]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void CopyFromPageLockedAsync<T, TView>(
this TView target,
PageLockedArray<T> pageLockedArray)
where TView : IContiguousArrayView<T>
where T : unmanaged =>
target.CopyFromPageLockedAsync(pageLockedArray.Scope);
target.CopyFromPageLockedAsync(pageLockedArray.Scope.AsNotNull());

#endregion

Expand Down

0 comments on commit b60e94f

Please sign in to comment.