You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

ContextOptions.cs 546 B

12345678910111213141516171819202122232425
  1. using System;
  2. using System.IO;
  3. namespace Tensorflow.Eager
  4. {
  5. public class ContextOptions : IDisposable //TODO! Eli: Shouldn't this inherieting DisposableObject?
  6. {
  7. private IntPtr _handle;
  8. public ContextOptions()
  9. {
  10. _handle = c_api.TFE_NewContextOptions();
  11. }
  12. public void Dispose()
  13. {
  14. c_api.TFE_DeleteContextOptions(_handle);
  15. }
  16. public static implicit operator IntPtr(ContextOptions opts)
  17. {
  18. return opts._handle;
  19. }
  20. }
  21. }