11using System ;
22using System . Runtime . InteropServices ;
3+ using Tensorflow . Eager ;
34using TFE_Executor = System . IntPtr ;
45
56namespace Tensorflow
@@ -11,7 +12,7 @@ public partial class c_api
1112 /// </summary>
1213 /// <returns>TFE_ContextOptions*</returns>
1314 [ DllImport ( TensorFlowLibName ) ]
14- public static extern IntPtr TFE_NewContextOptions ( ) ;
15+ public static extern TFE_ContextOptions TFE_NewContextOptions ( ) ;
1516
1617 /// <summary>
1718 /// Destroy an options object.
@@ -70,7 +71,7 @@ public partial class c_api
7071 /// <param name="status">TF_Status*</param>
7172 /// <returns>TFE_Context*</returns>
7273 [ DllImport ( TensorFlowLibName ) ]
73- public static extern IntPtr TFE_NewContext ( IntPtr opts , IntPtr status ) ;
74+ public static extern TFE_Context TFE_NewContext ( IntPtr opts , IntPtr status ) ;
7475
7576 /// <summary>
7677 ///
@@ -88,7 +89,7 @@ public partial class c_api
8889 /// <param name="num_retvals">int*</param>
8990 /// <param name="status">TF_Status*</param>
9091 [ DllImport ( TensorFlowLibName ) ]
91- public static extern void TFE_Execute ( IntPtr op , IntPtr [ ] retvals , ref int num_retvals , IntPtr status ) ;
92+ public static extern void TFE_Execute ( TFE_Op op , IntPtr [ ] retvals , ref int num_retvals , IntPtr status ) ;
9293
9394 /// <summary>
9495 ///
@@ -98,7 +99,7 @@ public partial class c_api
9899 /// <param name="status">TF_Status*</param>
99100 /// <returns></returns>
100101 [ DllImport ( TensorFlowLibName ) ]
101- public static extern IntPtr TFE_NewOp ( IntPtr ctx , string op_or_function_name , IntPtr status ) ;
102+ public static extern TFE_Op TFE_NewOp ( IntPtr ctx , string op_or_function_name , IntPtr status ) ;
102103
103104 /// <summary>
104105 ///
@@ -150,7 +151,7 @@ public partial class c_api
150151 /// <param name="device_name"></param>
151152 /// <param name="status"></param>
152153 [ DllImport ( TensorFlowLibName ) ]
153- public static extern void TFE_OpSetDevice ( IntPtr op , string device_name , IntPtr status ) ;
154+ public static extern void TFE_OpSetDevice ( TFE_Op op , string device_name , IntPtr status ) ;
154155
155156 /// <summary>
156157 ///
@@ -167,7 +168,7 @@ public partial class c_api
167168 /// <param name="t">const tensorflow::Tensor&</param>
168169 /// <returns>TFE_TensorHandle*</returns>
169170 [ DllImport ( TensorFlowLibName ) ]
170- public static extern IntPtr TFE_NewTensorHandle ( IntPtr t , IntPtr status ) ;
171+ public static extern TFE_TensorHandle TFE_NewTensorHandle ( IntPtr t , IntPtr status ) ;
171172
172173 /// <summary>
173174 /// Sets the default execution mode (sync/async). Note that this can be
@@ -195,7 +196,7 @@ public partial class c_api
195196 /// <param name="status">TF_Status*</param>
196197 /// <returns></returns>
197198 [ DllImport ( TensorFlowLibName ) ]
198- public static extern IntPtr TFE_TensorHandleResolve ( IntPtr h , IntPtr status ) ;
199+ public static extern TF_Tensor TFE_TensorHandleResolve ( IntPtr h , IntPtr status ) ;
199200
200201 /// <summary>
201202 /// This function will block till the operation that produces `h` has completed.
@@ -252,7 +253,7 @@ public partial class c_api
252253 /// <param name="is_async"></param>
253254 /// <returns>TFE_Executor*</returns>
254255 [ DllImport ( TensorFlowLibName ) ]
255- public static extern IntPtr TFE_NewExecutor ( bool is_async ) ;
256+ public static extern TFE_Executor TFE_NewExecutor ( bool is_async ) ;
256257
257258 /// <summary>
258259 /// Deletes the eager Executor without waiting for enqueued nodes. Please call
0 commit comments