/* automatically generated by rust-bindgen 0.59.1 */

#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TFE_ContextOptions {
    _unused: [u8; 0],
}
extern "C" {
    pub fn TFE_NewContextOptions() -> *mut TFE_ContextOptions;
}
extern "C" {
    pub fn TFE_ContextOptionsSetConfig(
        options: *mut TFE_ContextOptions,
        proto: *const ::std::os::raw::c_void,
        proto_len: usize,
        status: *mut TF_Status,
    );
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum TFE_ContextDevicePlacementPolicy {
    TFE_DEVICE_PLACEMENT_EXPLICIT = 0,
    TFE_DEVICE_PLACEMENT_WARN = 1,
    TFE_DEVICE_PLACEMENT_SILENT = 2,
    TFE_DEVICE_PLACEMENT_SILENT_FOR_INT32 = 3,
}
extern "C" {
    pub fn TFE_ContextOptionsSetAsync(
        arg1: *mut TFE_ContextOptions,
        enable: ::std::os::raw::c_uchar,
    );
}
extern "C" {
    pub fn TFE_ContextOptionsSetDevicePlacementPolicy(
        arg1: *mut TFE_ContextOptions,
        arg2: TFE_ContextDevicePlacementPolicy,
    );
}
extern "C" {
    pub fn TFE_DeleteContextOptions(arg1: *mut TFE_ContextOptions);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TFE_Context {
    _unused: [u8; 0],
}
extern "C" {
    pub fn TFE_NewContext(
        opts: *const TFE_ContextOptions,
        status: *mut TF_Status,
    ) -> *mut TFE_Context;
}
extern "C" {
    pub fn TFE_DeleteContext(ctx: *mut TFE_Context);
}
extern "C" {
    pub fn TFE_ContextListDevices(
        ctx: *mut TFE_Context,
        status: *mut TF_Status,
    ) -> *mut TF_DeviceList;
}
extern "C" {
    pub fn TFE_ContextClearCaches(ctx: *mut TFE_Context);
}
extern "C" {
    pub fn TFE_ContextSetThreadLocalDevicePlacementPolicy(
        ctx: *mut TFE_Context,
        policy: TFE_ContextDevicePlacementPolicy,
    );
}
extern "C" {
    pub fn TFE_ContextGetDevicePlacementPolicy(
        ctx: *mut TFE_Context,
    ) -> TFE_ContextDevicePlacementPolicy;
}
extern "C" {
    pub fn TFE_ContextSetServerDef(
        ctx: *mut TFE_Context,
        keep_alive_secs: ::std::os::raw::c_int,
        proto: *const ::std::os::raw::c_void,
        proto_len: usize,
        status: *mut TF_Status,
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TFE_TensorHandle {
    _unused: [u8; 0],
}
extern "C" {
    pub fn TFE_NewTensorHandle(
        t: *const TF_Tensor,
        status: *mut TF_Status,
    ) -> *mut TFE_TensorHandle;
}
extern "C" {
    pub fn TFE_DeleteTensorHandle(h: *mut TFE_TensorHandle);
}
extern "C" {
    pub fn TFE_TensorHandleDataType(h: *mut TFE_TensorHandle) -> TF_DataType;
}
extern "C" {
    pub fn TFE_TensorHandleNumDims(
        h: *mut TFE_TensorHandle,
        status: *mut TF_Status,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn TFE_TensorHandleNumElements(h: *mut TFE_TensorHandle, status: *mut TF_Status) -> i64;
}
extern "C" {
    pub fn TFE_TensorHandleDim(
        h: *mut TFE_TensorHandle,
        dim_index: ::std::os::raw::c_int,
        status: *mut TF_Status,
    ) -> i64;
}
extern "C" {
    pub fn TFE_TensorHandleDeviceName(
        h: *mut TFE_TensorHandle,
        status: *mut TF_Status,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn TFE_TensorHandleBackingDeviceName(
        h: *mut TFE_TensorHandle,
        status: *mut TF_Status,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn TFE_TensorHandleCopySharingTensor(
        h: *mut TFE_TensorHandle,
        status: *mut TF_Status,
    ) -> *mut TFE_TensorHandle;
}
extern "C" {
    pub fn TFE_TensorHandleResolve(
        h: *mut TFE_TensorHandle,
        status: *mut TF_Status,
    ) -> *mut TF_Tensor;
}
extern "C" {
    pub fn TFE_TensorHandleCopyToDevice(
        h: *mut TFE_TensorHandle,
        ctx: *mut TFE_Context,
        device_name: *const ::std::os::raw::c_char,
        status: *mut TF_Status,
    ) -> *mut TFE_TensorHandle;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TFE_TensorDebugInfo {
    _unused: [u8; 0],
}
extern "C" {
    pub fn TFE_TensorHandleTensorDebugInfo(
        h: *mut TFE_TensorHandle,
        status: *mut TF_Status,
    ) -> *mut TFE_TensorDebugInfo;
}
extern "C" {
    pub fn TFE_DeleteTensorDebugInfo(debug_info: *mut TFE_TensorDebugInfo);
}
extern "C" {
    pub fn TFE_TensorDebugInfoOnDeviceNumDims(
        debug_info: *mut TFE_TensorDebugInfo,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn TFE_TensorDebugInfoOnDeviceDim(
        debug_info: *mut TFE_TensorDebugInfo,
        dim_index: ::std::os::raw::c_int,
    ) -> i64;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TFE_Op {
    _unused: [u8; 0],
}
extern "C" {
    pub fn TFE_NewOp(
        ctx: *mut TFE_Context,
        op_or_function_name: *const ::std::os::raw::c_char,
        status: *mut TF_Status,
    ) -> *mut TFE_Op;
}
extern "C" {
    pub fn TFE_DeleteOp(op: *mut TFE_Op);
}
extern "C" {
    pub fn TFE_OpGetName(
        op: *const TFE_Op,
        status: *mut TF_Status,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn TFE_OpGetContext(op: *const TFE_Op, status: *mut TF_Status) -> *mut TFE_Context;
}
extern "C" {
    pub fn TFE_OpSetDevice(
        op: *mut TFE_Op,
        device_name: *const ::std::os::raw::c_char,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TFE_OpGetDevice(
        op: *const TFE_Op,
        status: *mut TF_Status,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn TFE_OpAddInput(op: *mut TFE_Op, input: *mut TFE_TensorHandle, status: *mut TF_Status);
}
extern "C" {
    pub fn TFE_OpAddInputList(
        op: *mut TFE_Op,
        inputs: *mut *mut TFE_TensorHandle,
        num_inputs: ::std::os::raw::c_int,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TFE_OpGetFlatInputCount(
        op: *const TFE_Op,
        status: *mut TF_Status,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn TFE_OpGetFlatInput(
        op: *const TFE_Op,
        index: ::std::os::raw::c_int,
        status: *mut TF_Status,
    ) -> *mut TFE_TensorHandle;
}
extern "C" {
    pub fn TFE_OpGetAttrType(
        op: *mut TFE_Op,
        attr_name: *const ::std::os::raw::c_char,
        is_list: *mut ::std::os::raw::c_uchar,
        status: *mut TF_Status,
    ) -> TF_AttrType;
}
extern "C" {
    pub fn TFE_OpNameGetAttrType(
        ctx: *mut TFE_Context,
        op_or_function_name: *const ::std::os::raw::c_char,
        attr_name: *const ::std::os::raw::c_char,
        is_list: *mut ::std::os::raw::c_uchar,
        status: *mut TF_Status,
    ) -> TF_AttrType;
}
extern "C" {
    pub fn TFE_OpSetAttrString(
        op: *mut TFE_Op,
        attr_name: *const ::std::os::raw::c_char,
        value: *const ::std::os::raw::c_void,
        length: usize,
    );
}
extern "C" {
    pub fn TFE_OpSetAttrInt(op: *mut TFE_Op, attr_name: *const ::std::os::raw::c_char, value: i64);
}
extern "C" {
    pub fn TFE_OpSetAttrFloat(
        op: *mut TFE_Op,
        attr_name: *const ::std::os::raw::c_char,
        value: f32,
    );
}
extern "C" {
    pub fn TFE_OpSetAttrBool(
        op: *mut TFE_Op,
        attr_name: *const ::std::os::raw::c_char,
        value: ::std::os::raw::c_uchar,
    );
}
extern "C" {
    pub fn TFE_OpSetAttrType(
        op: *mut TFE_Op,
        attr_name: *const ::std::os::raw::c_char,
        value: TF_DataType,
    );
}
extern "C" {
    pub fn TFE_OpSetAttrShape(
        op: *mut TFE_Op,
        attr_name: *const ::std::os::raw::c_char,
        dims: *const i64,
        num_dims: ::std::os::raw::c_int,
        out_status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TFE_OpSetAttrFunction(
        op: *mut TFE_Op,
        attr_name: *const ::std::os::raw::c_char,
        value: *const TFE_Op,
    );
}
extern "C" {
    pub fn TFE_OpSetAttrFunctionName(
        op: *mut TFE_Op,
        attr_name: *const ::std::os::raw::c_char,
        data: *const ::std::os::raw::c_char,
        length: usize,
    );
}
extern "C" {
    pub fn TFE_OpSetAttrTensor(
        op: *mut TFE_Op,
        attr_name: *const ::std::os::raw::c_char,
        tensor: *mut TF_Tensor,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TFE_OpSetAttrStringList(
        op: *mut TFE_Op,
        attr_name: *const ::std::os::raw::c_char,
        values: *const *const ::std::os::raw::c_void,
        lengths: *const usize,
        num_values: ::std::os::raw::c_int,
    );
}
extern "C" {
    pub fn TFE_OpSetAttrIntList(
        op: *mut TFE_Op,
        attr_name: *const ::std::os::raw::c_char,
        values: *const i64,
        num_values: ::std::os::raw::c_int,
    );
}
extern "C" {
    pub fn TFE_OpSetAttrFloatList(
        op: *mut TFE_Op,
        attr_name: *const ::std::os::raw::c_char,
        values: *const f32,
        num_values: ::std::os::raw::c_int,
    );
}
extern "C" {
    pub fn TFE_OpSetAttrBoolList(
        op: *mut TFE_Op,
        attr_name: *const ::std::os::raw::c_char,
        values: *const ::std::os::raw::c_uchar,
        num_values: ::std::os::raw::c_int,
    );
}
extern "C" {
    pub fn TFE_OpSetAttrTypeList(
        op: *mut TFE_Op,
        attr_name: *const ::std::os::raw::c_char,
        values: *const TF_DataType,
        num_values: ::std::os::raw::c_int,
    );
}
extern "C" {
    pub fn TFE_OpSetAttrShapeList(
        op: *mut TFE_Op,
        attr_name: *const ::std::os::raw::c_char,
        dims: *mut *const i64,
        num_dims: *const ::std::os::raw::c_int,
        num_values: ::std::os::raw::c_int,
        out_status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TFE_OpSetAttrFunctionList(
        op: *mut TFE_Op,
        attr_name: *const ::std::os::raw::c_char,
        value: *mut *const TFE_Op,
        num_values: ::std::os::raw::c_int,
    );
}
extern "C" {
    pub fn TFE_OpGetInputLength(
        op: *mut TFE_Op,
        input_name: *const ::std::os::raw::c_char,
        status: *mut TF_Status,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn TFE_OpGetOutputLength(
        op: *mut TFE_Op,
        output_name: *const ::std::os::raw::c_char,
        status: *mut TF_Status,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn TFE_Execute(
        op: *mut TFE_Op,
        retvals: *mut *mut TFE_TensorHandle,
        num_retvals: *mut ::std::os::raw::c_int,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TFE_ContextAddFunctionDef(
        ctx: *mut TFE_Context,
        serialized_function_def: *const ::std::os::raw::c_char,
        size: usize,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TFE_ContextAddFunction(
        ctx: *mut TFE_Context,
        function: *mut TF_Function,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TFE_ContextRemoveFunction(
        ctx: *mut TFE_Context,
        name: *const ::std::os::raw::c_char,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TFE_ContextHasFunction(
        ctx: *mut TFE_Context,
        name: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_uchar;
}
extern "C" {
    pub fn TFE_ContextEnableRunMetadata(ctx: *mut TFE_Context);
}
extern "C" {
    pub fn TFE_ContextDisableRunMetadata(ctx: *mut TFE_Context);
}
extern "C" {
    pub fn TFE_ContextExportRunMetadata(
        ctx: *mut TFE_Context,
        buf: *mut TF_Buffer,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TFE_ContextStartStep(ctx: *mut TFE_Context);
}
extern "C" {
    pub fn TFE_ContextEndStep(ctx: *mut TFE_Context);
}
