| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -53,7 +53,13 @@ public static string StringPiece(IntPtr handle) | |||
| 53 | 53 | return handle == IntPtr.Zero ? String.Empty : Marshal.PtrToStringAnsi(handle); | |
| 54 | 54 | } | |
| 55 | 55 | ||
| 56 | - public delegate void Deallocator(IntPtr data, IntPtr size, ref bool deallocator); | ||
| 56 | + public delegate void Deallocator(IntPtr data, IntPtr size, ref DeallocatorArgs args); | ||
| 57 | + | ||
| 58 | + public struct DeallocatorArgs | ||
| 59 | + { | ||
| 60 | + public bool deallocator_called; | ||
| 61 | + public IntPtr gc_handle; | ||
| 62 | + } | ||
| 57 | 63 | ||
| 58 | 64 | [DllImport(TensorFlowLibName)] | |
| 59 | 65 | public static unsafe extern IntPtr TF_Version(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -71,7 +71,7 @@ public partial class c_api | |||
| 71 | 71 | /// <param name="deallocator_arg"></param> | |
| 72 | 72 | /// <returns></returns> | |
| 73 | 73 | [DllImport(TensorFlowLibName)] | |
| 74 | - public static extern IntPtr TF_NewTensor(TF_DataType dataType, long[] dims, int num_dims, IntPtr data, UIntPtr len, Deallocator deallocator, ref bool deallocator_arg); | ||
| 74 | + public static extern IntPtr TF_NewTensor(TF_DataType dataType, long[] dims, int num_dims, IntPtr data, UIntPtr len, Deallocator deallocator, ref DeallocatorArgs deallocator_arg); | ||
| 75 | 75 | ||
| 76 | 76 | /// <summary> | |
| 77 | 77 | /// Return the number of dimensions that the tensor has. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments