Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support to clear internal caches.
See #10.
- Loading branch information
Showing
14 changed files
with
274 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// ----------------------------------------------------------------------------- | ||
// ILGPU | ||
// Copyright (c) 2016-2019 Marcel Koester | ||
// www.ilgpu.net | ||
// | ||
// File: ICache.cs | ||
// | ||
// This file is part of ILGPU and is distributed under the University of | ||
// Illinois Open Source License. See LICENSE.txt for details | ||
// ----------------------------------------------------------------------------- | ||
|
||
namespace ILGPU | ||
{ | ||
/// <summary> | ||
/// Specifies which resources should be removed from the cache. | ||
/// </summary> | ||
public enum ClearCacheMode : int | ||
{ | ||
/// <summary> | ||
/// Removes all non-ILGPU objects form the caches. | ||
/// </summary> | ||
Default = 0, | ||
|
||
/// <summary> | ||
/// Removes everything from the caches. | ||
/// </summary> | ||
Everything = 1, | ||
} | ||
|
||
/// <summary> | ||
/// Represents an object that contains internal caches. | ||
/// </summary> | ||
public interface ICache | ||
{ | ||
/// <summary> | ||
/// Clears all internal caches. | ||
/// </summary> | ||
/// <param name="mode">The clear mode.</param> | ||
/// <remarks> | ||
/// Implementations of this method are not guaranteed to be thread-safe. | ||
/// </remarks> | ||
void ClearCache(ClearCacheMode mode); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.