@@ -30,7 +30,7 @@ public partial class c_api
3030 /// <param name="status">TF_Status*</param>
3131 /// <returns></returns>
3232 [ DllImport ( TensorFlowLibName ) ]
33- public static extern TF_AttrType TFE_OpGetAttrType ( IntPtr op , string attr_name , ref byte is_list , IntPtr status ) ;
33+ public static extern TF_AttrType TFE_OpGetAttrType ( IntPtr op , string attr_name , ref byte is_list , SafeStatusHandle status ) ;
3434
3535 /// <summary>
3636 /// Returns the length (number of tensors) of the input argument `input_name`
@@ -40,7 +40,7 @@ public partial class c_api
4040 /// <param name="input_name">const char*</param>
4141 /// <param name="status">TF_Status*</param>
4242 [ DllImport ( TensorFlowLibName ) ]
43- public static extern int TFE_OpGetInputLength ( IntPtr op , string input_name , IntPtr status ) ;
43+ public static extern int TFE_OpGetInputLength ( IntPtr op , string input_name , SafeStatusHandle status ) ;
4444
4545 /// <summary>
4646 /// Returns the length (number of tensors) of the output argument `output_name`
@@ -51,7 +51,7 @@ public partial class c_api
5151 /// <param name="status"></param>
5252 /// <returns></returns>
5353 [ DllImport ( TensorFlowLibName ) ]
54- public static extern int TFE_OpGetOutputLength ( IntPtr op , string input_name , IntPtr status ) ;
54+ public static extern int TFE_OpGetOutputLength ( IntPtr op , string input_name , SafeStatusHandle status ) ;
5555
5656 /// <summary>
5757 ///
@@ -62,7 +62,7 @@ public partial class c_api
6262 /// <param name="status">TF_Status*</param>
6363 /// <returns></returns>
6464 [ DllImport ( TensorFlowLibName ) ]
65- public static extern int TFE_OpAddInputList ( IntPtr op , IntPtr [ ] inputs , int num_inputs , IntPtr status ) ;
65+ public static extern int TFE_OpAddInputList ( IntPtr op , IntPtr [ ] inputs , int num_inputs , SafeStatusHandle status ) ;
6666
6767 /// <summary>
6868 ///
@@ -71,7 +71,7 @@ public partial class c_api
7171 /// <param name="status">TF_Status*</param>
7272 /// <returns>TFE_Context*</returns>
7373 [ DllImport ( TensorFlowLibName ) ]
74- public static extern TFE_Context TFE_NewContext ( IntPtr opts , IntPtr status ) ;
74+ public static extern TFE_Context TFE_NewContext ( IntPtr opts , SafeStatusHandle status ) ;
7575
7676 /// <summary>
7777 ///
@@ -89,7 +89,7 @@ public partial class c_api
8989 /// <param name="num_retvals">int*</param>
9090 /// <param name="status">TF_Status*</param>
9191 [ DllImport ( TensorFlowLibName ) ]
92- public static extern void TFE_Execute ( IntPtr op , IntPtr [ ] retvals , ref int num_retvals , IntPtr status ) ;
92+ public static extern void TFE_Execute ( IntPtr op , IntPtr [ ] retvals , ref int num_retvals , SafeStatusHandle status ) ;
9393
9494 /// <summary>
9595 ///
@@ -99,7 +99,7 @@ public partial class c_api
9999 /// <param name="status">TF_Status*</param>
100100 /// <returns></returns>
101101 [ DllImport ( TensorFlowLibName ) ]
102- public static extern TFE_Op 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 , SafeStatusHandle status ) ;
103103
104104 /// <summary>
105105 ///
@@ -109,7 +109,7 @@ public partial class c_api
109109 /// <param name="status">TF_Status*</param>
110110 /// <param name="op_to_reset">TFE_Op*</param>
111111 [ DllImport ( TensorFlowLibName ) ]
112- public static extern void TFE_OpReset ( IntPtr ctx , string op_or_function_name , IntPtr status , IntPtr op_to_reset ) ;
112+ public static extern void TFE_OpReset ( IntPtr ctx , string op_or_function_name , SafeStatusHandle status , IntPtr op_to_reset ) ;
113113
114114 /// <summary>
115115 ///
@@ -139,7 +139,7 @@ public partial class c_api
139139 /// <param name="num_dims">const int</param>
140140 /// <param name="out_status">TF_Status*</param>
141141 [ DllImport ( TensorFlowLibName ) ]
142- public static extern void TFE_OpSetAttrShape ( IntPtr op , string attr_name , long [ ] dims , int num_dims , IntPtr out_status ) ;
142+ public static extern void TFE_OpSetAttrShape ( IntPtr op , string attr_name , long [ ] dims , int num_dims , SafeStatusHandle out_status ) ;
143143
144144 [ DllImport ( TensorFlowLibName ) ]
145145 public static extern void TFE_OpSetAttrBool ( IntPtr op , string attr_name , bool value ) ;
@@ -161,7 +161,7 @@ public partial class c_api
161161 /// <param name="device_name"></param>
162162 /// <param name="status"></param>
163163 [ DllImport ( TensorFlowLibName ) ]
164- public static extern void TFE_OpSetDevice ( TFE_Op op , string device_name , IntPtr status ) ;
164+ public static extern void TFE_OpSetDevice ( TFE_Op op , string device_name , SafeStatusHandle status ) ;
165165
166166 /// <summary>
167167 ///
@@ -170,15 +170,15 @@ public partial class c_api
170170 /// <param name="h">TFE_TensorHandle*</param>
171171 /// <param name="status">TF_Status*</param>
172172 [ DllImport ( TensorFlowLibName ) ]
173- public static extern void TFE_OpAddInput ( IntPtr op , IntPtr h , IntPtr status ) ;
173+ public static extern void TFE_OpAddInput ( IntPtr op , IntPtr h , SafeStatusHandle status ) ;
174174
175175 /// <summary>
176176 ///
177177 /// </summary>
178178 /// <param name="t">const tensorflow::Tensor&</param>
179179 /// <returns>TFE_TensorHandle*</returns>
180180 [ DllImport ( TensorFlowLibName ) ]
181- public static extern TFE_TensorHandle TFE_NewTensorHandle ( IntPtr t , IntPtr status ) ;
181+ public static extern TFE_TensorHandle TFE_NewTensorHandle ( IntPtr t , SafeStatusHandle status ) ;
182182
183183 /// <summary>
184184 /// Sets the default execution mode (sync/async). Note that this can be
@@ -206,7 +206,7 @@ public partial class c_api
206206 /// <param name="status">TF_Status*</param>
207207 /// <returns></returns>
208208 [ DllImport ( TensorFlowLibName ) ]
209- public static extern TF_Tensor TFE_TensorHandleResolve ( IntPtr h , IntPtr status ) ;
209+ public static extern TF_Tensor TFE_TensorHandleResolve ( IntPtr h , SafeStatusHandle status ) ;
210210
211211 /// <summary>
212212 /// This function will block till the operation that produces `h` has completed.
@@ -215,7 +215,7 @@ public partial class c_api
215215 /// <param name="status">TF_Status*</param>
216216 /// <returns></returns>
217217 [ DllImport ( TensorFlowLibName ) ]
218- public static extern int TFE_TensorHandleNumDims ( IntPtr h , IntPtr status ) ;
218+ public static extern int TFE_TensorHandleNumDims ( IntPtr h , SafeStatusHandle status ) ;
219219
220220 /// <summary>
221221 /// Returns the device of the operation that produced `h`. If `h` was produced by
@@ -228,7 +228,7 @@ public partial class c_api
228228 /// <param name="status">TF_Status*</param>
229229 /// <returns></returns>
230230 [ DllImport ( TensorFlowLibName ) ]
231- public static extern IntPtr TFE_TensorHandleDeviceName ( IntPtr h , IntPtr status ) ;
231+ public static extern IntPtr TFE_TensorHandleDeviceName ( IntPtr h , SafeStatusHandle status ) ;
232232
233233 /// <summary>
234234 /// Returns the name of the device in whose memory `h` resides.
@@ -237,7 +237,7 @@ public partial class c_api
237237 /// <param name="status">TF_Status*</param>
238238 /// <returns></returns>
239239 [ DllImport ( TensorFlowLibName ) ]
240- public static extern IntPtr TFE_TensorHandleBackingDeviceName ( IntPtr h , IntPtr status ) ;
240+ public static extern IntPtr TFE_TensorHandleBackingDeviceName ( IntPtr h , SafeStatusHandle status ) ;
241241
242242 /// <summary>
243243 ///
@@ -246,7 +246,7 @@ public partial class c_api
246246 /// <param name="status">TF_Status*</param>
247247 /// <returns></returns>
248248 [ DllImport ( TensorFlowLibName ) ]
249- public static extern IntPtr TFE_ContextListDevices ( IntPtr ctx , IntPtr status ) ;
249+ public static extern IntPtr TFE_ContextListDevices ( IntPtr ctx , SafeStatusHandle status ) ;
250250
251251 /// <summary>
252252 ///
@@ -286,7 +286,7 @@ public partial class c_api
286286 /// <param name="executor">TFE_Executor*</param>
287287 /// <param name="status">TF_Status*</param>
288288 [ DllImport ( TensorFlowLibName ) ]
289- public static extern void TFE_ExecutorWaitForAllPendingNodes ( TFE_Executor executor , IntPtr status ) ;
289+ public static extern void TFE_ExecutorWaitForAllPendingNodes ( TFE_Executor executor , SafeStatusHandle status ) ;
290290
291291 /// <summary>
292292 /// Sets a custom Executor for current thread. All nodes created by this thread
0 commit comments