Backends/SiaNet.Backend.TensorSharp/Cuda/RuntimeCompiler/KernelDiskCache.cs
/// <summary>
/// Tries the get from file.
/// </summary>
/// <param name="key">The key.</param>
/// <param name="ptx">The PTX.</param>
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
Tries the get from file.
Tries the get from file .
private bool TryGetFromFile(string key, out byte[] ptx)
        {
            var filePath = FilePathFromKey(key);
            if (!System.IO.File.Exists(filePath))
            {
                ptx = null;
                return false;
            }
            ptx = System.IO.File.ReadAllBytes(filePath);
            return true;
        }
private bool TryGetFromFile ( string key , out byte [ ] ptx ) { var filePath = FilePathFromKey ( key ) ; if ( ! System . IO . File . Exists ( filePath ) ) { ptx = null ; return false ; } ptx = System . IO . File . ReadAllBytes ( filePath ) ; return true ; }
Tries the get from file.
Tries the get from file .
None
key
string
None
byte[]
out
ptx
None