Beispiel #1
0
 static unsafe DeallocatorArgs()
 {
     Empty = new IntPtr(EmptyPtr = (DeallocatorArgs *)Marshal.AllocHGlobal(Marshal.SizeOf <DeallocatorArgs>()));
     *EmptyPtr = new DeallocatorArgs()
     {
         gc_handle = IntPtr.Zero, deallocator_called = false
     };
 }
Beispiel #2
0
 public static extern IntPtr TF_NewTensor(TF_DataType dataType, long[] dims, int num_dims, IntPtr data, UIntPtr len, Deallocator deallocator, ref DeallocatorArgs deallocator_arg);