Exemple #1
0
        /// <summary>
        /// Helper function to create and initialize a new instance of NvmlAPI.
        /// </summary>
        private static NvmlAPI CreateInitAPI(NvmlAPIVersion?apiVersion)
        {
            var api = NvmlAPI.Create(apiVersion);

            NvmlException.ThrowIfFailed(api.Init());
            return(api);
        }
Exemple #2
0
 /// <inheritdoc/>
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         NvmlException.ThrowIfFailed(API.Shutdown());
     }
     base.Dispose(disposing);
 }