From db8fdcb09f4244c8393f377fa1e45f11d52be264 Mon Sep 17 00:00:00 2001 From: Esther2013 Date: Wed, 23 Jan 2019 09:59:42 -0600 Subject: [PATCH] #119 #120 #121 #122 #123 --- src/TensorFlowNET.Core/Eager/c_api.eager.cs | 33 +++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/TensorFlowNET.Core/Eager/c_api.eager.cs diff --git a/src/TensorFlowNET.Core/Eager/c_api.eager.cs b/src/TensorFlowNET.Core/Eager/c_api.eager.cs new file mode 100644 index 00000000..b8a88cf5 --- /dev/null +++ b/src/TensorFlowNET.Core/Eager/c_api.eager.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Text; + +namespace Tensorflow +{ + public partial class c_api + { + /// + /// Return a new options object. + /// + /// + [DllImport(TensorFlowLibName)] + public static extern IntPtr TFE_NewContextOptions(); + + /// + /// Destroy an options object. + /// + /// + [DllImport(TensorFlowLibName)] + public static extern void TFE_DeleteContextOptions(IntPtr options); + + [DllImport(TensorFlowLibName)] + public static extern IntPtr TFE_NewContext(IntPtr opts, IntPtr status); + + [DllImport(TensorFlowLibName)] + public static extern void TFE_DeleteContext(IntPtr ctx); + + [DllImport(TensorFlowLibName)] + public static extern IntPtr TFE_NewOp(IntPtr ctx, string op_or_function_name, IntPtr status); + } +}