/* automatically generated by rust-bindgen 0.55.1 */

pub const _STDINT_H: u32 = 1;
pub const _FEATURES_H: u32 = 1;
pub const _DEFAULT_SOURCE: u32 = 1;
pub const __GLIBC_USE_ISOC2X: u32 = 0;
pub const __USE_ISOC11: u32 = 1;
pub const __USE_ISOC99: u32 = 1;
pub const __USE_ISOC95: u32 = 1;
pub const __USE_POSIX_IMPLICITLY: u32 = 1;
pub const _POSIX_SOURCE: u32 = 1;
pub const _POSIX_C_SOURCE: u32 = 200809;
pub const __USE_POSIX: u32 = 1;
pub const __USE_POSIX2: u32 = 1;
pub const __USE_POSIX199309: u32 = 1;
pub const __USE_POSIX199506: u32 = 1;
pub const __USE_XOPEN2K: u32 = 1;
pub const __USE_XOPEN2K8: u32 = 1;
pub const _ATFILE_SOURCE: u32 = 1;
pub const __USE_MISC: u32 = 1;
pub const __USE_ATFILE: u32 = 1;
pub const __USE_FORTIFY_LEVEL: u32 = 0;
pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0;
pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0;
pub const _STDC_PREDEF_H: u32 = 1;
pub const __STDC_IEC_559__: u32 = 1;
pub const __STDC_IEC_559_COMPLEX__: u32 = 1;
pub const __STDC_ISO_10646__: u32 = 201706;
pub const __GNU_LIBRARY__: u32 = 6;
pub const __GLIBC__: u32 = 2;
pub const __GLIBC_MINOR__: u32 = 31;
pub const _SYS_CDEFS_H: u32 = 1;
pub const __glibc_c99_flexarr_available: u32 = 1;
pub const __WORDSIZE: u32 = 64;
pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1;
pub const __SYSCALL_WORDSIZE: u32 = 64;
pub const __LONG_DOUBLE_USES_FLOAT128: u32 = 0;
pub const __HAVE_GENERIC_SELECTION: u32 = 1;
pub const __GLIBC_USE_LIB_EXT2: u32 = 0;
pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0;
pub const __GLIBC_USE_IEC_60559_BFP_EXT_C2X: u32 = 0;
pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0;
pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X: u32 = 0;
pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0;
pub const _BITS_TYPES_H: u32 = 1;
pub const __TIMESIZE: u32 = 64;
pub const _BITS_TYPESIZES_H: u32 = 1;
pub const __OFF_T_MATCHES_OFF64_T: u32 = 1;
pub const __INO_T_MATCHES_INO64_T: u32 = 1;
pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1;
pub const __STATFS_MATCHES_STATFS64: u32 = 1;
pub const __FD_SETSIZE: u32 = 1024;
pub const _BITS_TIME64_H: u32 = 1;
pub const _BITS_WCHAR_H: u32 = 1;
pub const _BITS_STDINT_INTN_H: u32 = 1;
pub const _BITS_STDINT_UINTN_H: u32 = 1;
pub const INT8_MIN: i32 = -128;
pub const INT16_MIN: i32 = -32768;
pub const INT32_MIN: i32 = -2147483648;
pub const INT8_MAX: u32 = 127;
pub const INT16_MAX: u32 = 32767;
pub const INT32_MAX: u32 = 2147483647;
pub const UINT8_MAX: u32 = 255;
pub const UINT16_MAX: u32 = 65535;
pub const UINT32_MAX: u32 = 4294967295;
pub const INT_LEAST8_MIN: i32 = -128;
pub const INT_LEAST16_MIN: i32 = -32768;
pub const INT_LEAST32_MIN: i32 = -2147483648;
pub const INT_LEAST8_MAX: u32 = 127;
pub const INT_LEAST16_MAX: u32 = 32767;
pub const INT_LEAST32_MAX: u32 = 2147483647;
pub const UINT_LEAST8_MAX: u32 = 255;
pub const UINT_LEAST16_MAX: u32 = 65535;
pub const UINT_LEAST32_MAX: u32 = 4294967295;
pub const INT_FAST8_MIN: i32 = -128;
pub const INT_FAST16_MIN: i64 = -9223372036854775808;
pub const INT_FAST32_MIN: i64 = -9223372036854775808;
pub const INT_FAST8_MAX: u32 = 127;
pub const INT_FAST16_MAX: u64 = 9223372036854775807;
pub const INT_FAST32_MAX: u64 = 9223372036854775807;
pub const UINT_FAST8_MAX: u32 = 255;
pub const UINT_FAST16_MAX: i32 = -1;
pub const UINT_FAST32_MAX: i32 = -1;
pub const INTPTR_MIN: i64 = -9223372036854775808;
pub const INTPTR_MAX: u64 = 9223372036854775807;
pub const UINTPTR_MAX: i32 = -1;
pub const PTRDIFF_MIN: i64 = -9223372036854775808;
pub const PTRDIFF_MAX: u64 = 9223372036854775807;
pub const SIG_ATOMIC_MIN: i32 = -2147483648;
pub const SIG_ATOMIC_MAX: u32 = 2147483647;
pub const SIZE_MAX: i32 = -1;
pub const WINT_MIN: u32 = 0;
pub const WINT_MAX: u32 = 4294967295;
pub const true_: u32 = 1;
pub const false_: u32 = 0;
pub const __bool_true_false_are_defined: u32 = 1;
pub type wchar_t = ::std::os::raw::c_int;
pub type __u_char = ::std::os::raw::c_uchar;
pub type __u_short = ::std::os::raw::c_ushort;
pub type __u_int = ::std::os::raw::c_uint;
pub type __u_long = ::std::os::raw::c_ulong;
pub type __int8_t = ::std::os::raw::c_schar;
pub type __uint8_t = ::std::os::raw::c_uchar;
pub type __int16_t = ::std::os::raw::c_short;
pub type __uint16_t = ::std::os::raw::c_ushort;
pub type __int32_t = ::std::os::raw::c_int;
pub type __uint32_t = ::std::os::raw::c_uint;
pub type __int64_t = ::std::os::raw::c_long;
pub type __uint64_t = ::std::os::raw::c_ulong;
pub type __int_least8_t = __int8_t;
pub type __uint_least8_t = __uint8_t;
pub type __int_least16_t = __int16_t;
pub type __uint_least16_t = __uint16_t;
pub type __int_least32_t = __int32_t;
pub type __uint_least32_t = __uint32_t;
pub type __int_least64_t = __int64_t;
pub type __uint_least64_t = __uint64_t;
pub type __quad_t = ::std::os::raw::c_long;
pub type __u_quad_t = ::std::os::raw::c_ulong;
pub type __intmax_t = ::std::os::raw::c_long;
pub type __uintmax_t = ::std::os::raw::c_ulong;
pub type __dev_t = ::std::os::raw::c_ulong;
pub type __uid_t = ::std::os::raw::c_uint;
pub type __gid_t = ::std::os::raw::c_uint;
pub type __ino_t = ::std::os::raw::c_ulong;
pub type __ino64_t = ::std::os::raw::c_ulong;
pub type __mode_t = ::std::os::raw::c_uint;
pub type __nlink_t = ::std::os::raw::c_ulong;
pub type __off_t = ::std::os::raw::c_long;
pub type __off64_t = ::std::os::raw::c_long;
pub type __pid_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __fsid_t {
    pub __val: [::std::os::raw::c_int; 2usize],
}
#[test]
fn bindgen_test_layout___fsid_t() {
    assert_eq!(
        ::std::mem::size_of::<__fsid_t>(),
        8usize,
        concat!("Size of: ", stringify!(__fsid_t))
    );
    assert_eq!(
        ::std::mem::align_of::<__fsid_t>(),
        4usize,
        concat!("Alignment of ", stringify!(__fsid_t))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<__fsid_t>())).__val as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(__fsid_t),
            "::",
            stringify!(__val)
        )
    );
}
pub type __clock_t = ::std::os::raw::c_long;
pub type __rlim_t = ::std::os::raw::c_ulong;
pub type __rlim64_t = ::std::os::raw::c_ulong;
pub type __id_t = ::std::os::raw::c_uint;
pub type __time_t = ::std::os::raw::c_long;
pub type __useconds_t = ::std::os::raw::c_uint;
pub type __suseconds_t = ::std::os::raw::c_long;
pub type __daddr_t = ::std::os::raw::c_int;
pub type __key_t = ::std::os::raw::c_int;
pub type __clockid_t = ::std::os::raw::c_int;
pub type __timer_t = *mut ::std::os::raw::c_void;
pub type __blksize_t = ::std::os::raw::c_long;
pub type __blkcnt_t = ::std::os::raw::c_long;
pub type __blkcnt64_t = ::std::os::raw::c_long;
pub type __fsblkcnt_t = ::std::os::raw::c_ulong;
pub type __fsblkcnt64_t = ::std::os::raw::c_ulong;
pub type __fsfilcnt_t = ::std::os::raw::c_ulong;
pub type __fsfilcnt64_t = ::std::os::raw::c_ulong;
pub type __fsword_t = ::std::os::raw::c_long;
pub type __ssize_t = ::std::os::raw::c_long;
pub type __syscall_slong_t = ::std::os::raw::c_long;
pub type __syscall_ulong_t = ::std::os::raw::c_ulong;
pub type __loff_t = __off64_t;
pub type __caddr_t = *mut ::std::os::raw::c_char;
pub type __intptr_t = ::std::os::raw::c_long;
pub type __socklen_t = ::std::os::raw::c_uint;
pub type __sig_atomic_t = ::std::os::raw::c_int;
pub type int_least8_t = __int_least8_t;
pub type int_least16_t = __int_least16_t;
pub type int_least32_t = __int_least32_t;
pub type int_least64_t = __int_least64_t;
pub type uint_least8_t = __uint_least8_t;
pub type uint_least16_t = __uint_least16_t;
pub type uint_least32_t = __uint_least32_t;
pub type uint_least64_t = __uint_least64_t;
pub type int_fast8_t = ::std::os::raw::c_schar;
pub type int_fast16_t = ::std::os::raw::c_long;
pub type int_fast32_t = ::std::os::raw::c_long;
pub type int_fast64_t = ::std::os::raw::c_long;
pub type uint_fast8_t = ::std::os::raw::c_uchar;
pub type uint_fast16_t = ::std::os::raw::c_ulong;
pub type uint_fast32_t = ::std::os::raw::c_ulong;
pub type uint_fast64_t = ::std::os::raw::c_ulong;
pub type intmax_t = __intmax_t;
pub type uintmax_t = __uintmax_t;
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum TF_AttrType {
    TF_ATTR_STRING = 0,
    TF_ATTR_INT = 1,
    TF_ATTR_FLOAT = 2,
    TF_ATTR_BOOL = 3,
    TF_ATTR_TYPE = 4,
    TF_ATTR_SHAPE = 5,
    TF_ATTR_TENSOR = 6,
    TF_ATTR_PLACEHOLDER = 7,
    TF_ATTR_FUNC = 8,
}
impl TF_DataType {
    pub const TF_COMPLEX: TF_DataType = TF_DataType::TF_COMPLEX64;
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum TF_DataType {
    TF_FLOAT = 1,
    TF_DOUBLE = 2,
    TF_INT32 = 3,
    TF_UINT8 = 4,
    TF_INT16 = 5,
    TF_INT8 = 6,
    TF_STRING = 7,
    TF_COMPLEX64 = 8,
    TF_INT64 = 9,
    TF_BOOL = 10,
    TF_QINT8 = 11,
    TF_QUINT8 = 12,
    TF_QINT32 = 13,
    TF_BFLOAT16 = 14,
    TF_QINT16 = 15,
    TF_QUINT16 = 16,
    TF_UINT16 = 17,
    TF_COMPLEX128 = 18,
    TF_HALF = 19,
    TF_RESOURCE = 20,
    TF_VARIANT = 21,
    TF_UINT32 = 22,
    TF_UINT64 = 23,
}
extern "C" {
    pub fn TF_DataTypeSize(dt: TF_DataType) -> usize;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TF_Status {
    _unused: [u8; 0],
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum TF_Code {
    TF_OK = 0,
    TF_CANCELLED = 1,
    TF_UNKNOWN = 2,
    TF_INVALID_ARGUMENT = 3,
    TF_DEADLINE_EXCEEDED = 4,
    TF_NOT_FOUND = 5,
    TF_ALREADY_EXISTS = 6,
    TF_PERMISSION_DENIED = 7,
    TF_UNAUTHENTICATED = 16,
    TF_RESOURCE_EXHAUSTED = 8,
    TF_FAILED_PRECONDITION = 9,
    TF_ABORTED = 10,
    TF_OUT_OF_RANGE = 11,
    TF_UNIMPLEMENTED = 12,
    TF_INTERNAL = 13,
    TF_UNAVAILABLE = 14,
    TF_DATA_LOSS = 15,
}
extern "C" {
    pub fn TF_NewStatus() -> *mut TF_Status;
}
extern "C" {
    pub fn TF_DeleteStatus(arg1: *mut TF_Status);
}
extern "C" {
    pub fn TF_SetStatus(s: *mut TF_Status, code: TF_Code, msg: *const ::std::os::raw::c_char);
}
extern "C" {
    pub fn TF_SetStatusFromIOError(
        s: *mut TF_Status,
        error_code: ::std::os::raw::c_int,
        context: *const ::std::os::raw::c_char,
    );
}
extern "C" {
    pub fn TF_GetCode(s: *const TF_Status) -> TF_Code;
}
extern "C" {
    pub fn TF_Message(s: *const TF_Status) -> *const ::std::os::raw::c_char;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TF_Tensor {
    _unused: [u8; 0],
}
extern "C" {
    pub fn TF_NewTensor(
        arg1: TF_DataType,
        dims: *const i64,
        num_dims: ::std::os::raw::c_int,
        data: *mut ::std::os::raw::c_void,
        len: usize,
        deallocator: ::std::option::Option<
            unsafe extern "C" fn(
                data: *mut ::std::os::raw::c_void,
                len: usize,
                arg: *mut ::std::os::raw::c_void,
            ),
        >,
        deallocator_arg: *mut ::std::os::raw::c_void,
    ) -> *mut TF_Tensor;
}
extern "C" {
    pub fn TF_AllocateTensor(
        arg1: TF_DataType,
        dims: *const i64,
        num_dims: ::std::os::raw::c_int,
        len: usize,
    ) -> *mut TF_Tensor;
}
extern "C" {
    pub fn TF_TensorMaybeMove(tensor: *mut TF_Tensor) -> *mut TF_Tensor;
}
extern "C" {
    pub fn TF_DeleteTensor(arg1: *mut TF_Tensor);
}
extern "C" {
    pub fn TF_TensorType(arg1: *const TF_Tensor) -> TF_DataType;
}
extern "C" {
    pub fn TF_NumDims(arg1: *const TF_Tensor) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn TF_Dim(tensor: *const TF_Tensor, dim_index: ::std::os::raw::c_int) -> i64;
}
extern "C" {
    pub fn TF_TensorByteSize(arg1: *const TF_Tensor) -> usize;
}
extern "C" {
    pub fn TF_TensorData(arg1: *const TF_Tensor) -> *mut ::std::os::raw::c_void;
}
extern "C" {
    pub fn TF_TensorElementCount(tensor: *const TF_Tensor) -> i64;
}
extern "C" {
    pub fn TF_TensorBitcastFrom(
        from: *const TF_Tensor,
        type_: TF_DataType,
        to: *mut TF_Tensor,
        new_dims: *const i64,
        num_new_dims: ::std::os::raw::c_int,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_StringEncode(
        src: *const ::std::os::raw::c_char,
        src_len: usize,
        dst: *mut ::std::os::raw::c_char,
        dst_len: usize,
        status: *mut TF_Status,
    ) -> usize;
}
extern "C" {
    pub fn TF_StringDecode(
        src: *const ::std::os::raw::c_char,
        src_len: usize,
        dst: *mut *const ::std::os::raw::c_char,
        dst_len: *mut usize,
        status: *mut TF_Status,
    ) -> usize;
}
extern "C" {
    pub fn TF_StringEncodedSize(len: usize) -> usize;
}
extern "C" {
    pub fn TF_TensorIsAligned(arg1: *const TF_Tensor) -> bool;
}
extern "C" {
    pub fn TF_Version() -> *const ::std::os::raw::c_char;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TF_Buffer {
    pub data: *const ::std::os::raw::c_void,
    pub length: usize,
    pub data_deallocator: ::std::option::Option<
        unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, length: usize),
    >,
}
#[test]
fn bindgen_test_layout_TF_Buffer() {
    assert_eq!(
        ::std::mem::size_of::<TF_Buffer>(),
        24usize,
        concat!("Size of: ", stringify!(TF_Buffer))
    );
    assert_eq!(
        ::std::mem::align_of::<TF_Buffer>(),
        8usize,
        concat!("Alignment of ", stringify!(TF_Buffer))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<TF_Buffer>())).data as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(TF_Buffer),
            "::",
            stringify!(data)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<TF_Buffer>())).length as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(TF_Buffer),
            "::",
            stringify!(length)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<TF_Buffer>())).data_deallocator as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(TF_Buffer),
            "::",
            stringify!(data_deallocator)
        )
    );
}
extern "C" {
    pub fn TF_NewBufferFromString(
        proto: *const ::std::os::raw::c_void,
        proto_len: usize,
    ) -> *mut TF_Buffer;
}
extern "C" {
    pub fn TF_NewBuffer() -> *mut TF_Buffer;
}
extern "C" {
    pub fn TF_DeleteBuffer(arg1: *mut TF_Buffer);
}
extern "C" {
    pub fn TF_GetBuffer(buffer: *mut TF_Buffer) -> TF_Buffer;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TF_SessionOptions {
    _unused: [u8; 0],
}
extern "C" {
    pub fn TF_NewSessionOptions() -> *mut TF_SessionOptions;
}
extern "C" {
    pub fn TF_SetTarget(options: *mut TF_SessionOptions, target: *const ::std::os::raw::c_char);
}
extern "C" {
    pub fn TF_SetConfig(
        options: *mut TF_SessionOptions,
        proto: *const ::std::os::raw::c_void,
        proto_len: usize,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_DeleteSessionOptions(arg1: *mut TF_SessionOptions);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TF_Graph {
    _unused: [u8; 0],
}
extern "C" {
    pub fn TF_NewGraph() -> *mut TF_Graph;
}
extern "C" {
    pub fn TF_DeleteGraph(arg1: *mut TF_Graph);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TF_OperationDescription {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TF_Operation {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TF_Input {
    pub oper: *mut TF_Operation,
    pub index: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_TF_Input() {
    assert_eq!(
        ::std::mem::size_of::<TF_Input>(),
        16usize,
        concat!("Size of: ", stringify!(TF_Input))
    );
    assert_eq!(
        ::std::mem::align_of::<TF_Input>(),
        8usize,
        concat!("Alignment of ", stringify!(TF_Input))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<TF_Input>())).oper as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(TF_Input),
            "::",
            stringify!(oper)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<TF_Input>())).index as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(TF_Input),
            "::",
            stringify!(index)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TF_Output {
    pub oper: *mut TF_Operation,
    pub index: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_TF_Output() {
    assert_eq!(
        ::std::mem::size_of::<TF_Output>(),
        16usize,
        concat!("Size of: ", stringify!(TF_Output))
    );
    assert_eq!(
        ::std::mem::align_of::<TF_Output>(),
        8usize,
        concat!("Alignment of ", stringify!(TF_Output))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<TF_Output>())).oper as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(TF_Output),
            "::",
            stringify!(oper)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<TF_Output>())).index as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(TF_Output),
            "::",
            stringify!(index)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TF_Function {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TF_FunctionOptions {
    _unused: [u8; 0],
}
extern "C" {
    pub fn TF_GraphSetTensorShape(
        graph: *mut TF_Graph,
        output: TF_Output,
        dims: *const i64,
        num_dims: ::std::os::raw::c_int,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_GraphGetTensorNumDims(
        graph: *mut TF_Graph,
        output: TF_Output,
        status: *mut TF_Status,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn TF_GraphGetTensorShape(
        graph: *mut TF_Graph,
        output: TF_Output,
        dims: *mut i64,
        num_dims: ::std::os::raw::c_int,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_NewOperation(
        graph: *mut TF_Graph,
        op_type: *const ::std::os::raw::c_char,
        oper_name: *const ::std::os::raw::c_char,
    ) -> *mut TF_OperationDescription;
}
extern "C" {
    pub fn TF_SetDevice(desc: *mut TF_OperationDescription, device: *const ::std::os::raw::c_char);
}
extern "C" {
    pub fn TF_AddInput(desc: *mut TF_OperationDescription, input: TF_Output);
}
extern "C" {
    pub fn TF_AddInputList(
        desc: *mut TF_OperationDescription,
        inputs: *const TF_Output,
        num_inputs: ::std::os::raw::c_int,
    );
}
extern "C" {
    pub fn TF_AddControlInput(desc: *mut TF_OperationDescription, input: *mut TF_Operation);
}
extern "C" {
    pub fn TF_ColocateWith(desc: *mut TF_OperationDescription, op: *mut TF_Operation);
}
extern "C" {
    pub fn TF_SetAttrString(
        desc: *mut TF_OperationDescription,
        attr_name: *const ::std::os::raw::c_char,
        value: *const ::std::os::raw::c_void,
        length: usize,
    );
}
extern "C" {
    pub fn TF_SetAttrStringList(
        desc: *mut TF_OperationDescription,
        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 TF_SetAttrInt(
        desc: *mut TF_OperationDescription,
        attr_name: *const ::std::os::raw::c_char,
        value: i64,
    );
}
extern "C" {
    pub fn TF_SetAttrIntList(
        desc: *mut TF_OperationDescription,
        attr_name: *const ::std::os::raw::c_char,
        values: *const i64,
        num_values: ::std::os::raw::c_int,
    );
}
extern "C" {
    pub fn TF_SetAttrFloat(
        desc: *mut TF_OperationDescription,
        attr_name: *const ::std::os::raw::c_char,
        value: f32,
    );
}
extern "C" {
    pub fn TF_SetAttrFloatList(
        desc: *mut TF_OperationDescription,
        attr_name: *const ::std::os::raw::c_char,
        values: *const f32,
        num_values: ::std::os::raw::c_int,
    );
}
extern "C" {
    pub fn TF_SetAttrBool(
        desc: *mut TF_OperationDescription,
        attr_name: *const ::std::os::raw::c_char,
        value: ::std::os::raw::c_uchar,
    );
}
extern "C" {
    pub fn TF_SetAttrBoolList(
        desc: *mut TF_OperationDescription,
        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 TF_SetAttrType(
        desc: *mut TF_OperationDescription,
        attr_name: *const ::std::os::raw::c_char,
        value: TF_DataType,
    );
}
extern "C" {
    pub fn TF_SetAttrTypeList(
        desc: *mut TF_OperationDescription,
        attr_name: *const ::std::os::raw::c_char,
        values: *const TF_DataType,
        num_values: ::std::os::raw::c_int,
    );
}
extern "C" {
    pub fn TF_SetAttrPlaceholder(
        desc: *mut TF_OperationDescription,
        attr_name: *const ::std::os::raw::c_char,
        placeholder: *const ::std::os::raw::c_char,
    );
}
extern "C" {
    pub fn TF_SetAttrFuncName(
        desc: *mut TF_OperationDescription,
        attr_name: *const ::std::os::raw::c_char,
        value: *const ::std::os::raw::c_char,
        length: usize,
    );
}
extern "C" {
    pub fn TF_SetAttrShape(
        desc: *mut TF_OperationDescription,
        attr_name: *const ::std::os::raw::c_char,
        dims: *const i64,
        num_dims: ::std::os::raw::c_int,
    );
}
extern "C" {
    pub fn TF_SetAttrShapeList(
        desc: *mut TF_OperationDescription,
        attr_name: *const ::std::os::raw::c_char,
        dims: *const *const i64,
        num_dims: *const ::std::os::raw::c_int,
        num_shapes: ::std::os::raw::c_int,
    );
}
extern "C" {
    pub fn TF_SetAttrTensorShapeProto(
        desc: *mut TF_OperationDescription,
        attr_name: *const ::std::os::raw::c_char,
        proto: *const ::std::os::raw::c_void,
        proto_len: usize,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_SetAttrTensorShapeProtoList(
        desc: *mut TF_OperationDescription,
        attr_name: *const ::std::os::raw::c_char,
        protos: *const *const ::std::os::raw::c_void,
        proto_lens: *const usize,
        num_shapes: ::std::os::raw::c_int,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_SetAttrTensor(
        desc: *mut TF_OperationDescription,
        attr_name: *const ::std::os::raw::c_char,
        value: *mut TF_Tensor,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_SetAttrTensorList(
        desc: *mut TF_OperationDescription,
        attr_name: *const ::std::os::raw::c_char,
        values: *const *mut TF_Tensor,
        num_values: ::std::os::raw::c_int,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_SetAttrValueProto(
        desc: *mut TF_OperationDescription,
        attr_name: *const ::std::os::raw::c_char,
        proto: *const ::std::os::raw::c_void,
        proto_len: usize,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_FinishOperation(
        desc: *mut TF_OperationDescription,
        status: *mut TF_Status,
    ) -> *mut TF_Operation;
}
extern "C" {
    pub fn TF_OperationName(oper: *mut TF_Operation) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn TF_OperationOpType(oper: *mut TF_Operation) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn TF_OperationDevice(oper: *mut TF_Operation) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn TF_OperationNumOutputs(oper: *mut TF_Operation) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn TF_OperationOutputType(oper_out: TF_Output) -> TF_DataType;
}
extern "C" {
    pub fn TF_OperationOutputListLength(
        oper: *mut TF_Operation,
        arg_name: *const ::std::os::raw::c_char,
        status: *mut TF_Status,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn TF_OperationNumInputs(oper: *mut TF_Operation) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn TF_OperationInputType(oper_in: TF_Input) -> TF_DataType;
}
extern "C" {
    pub fn TF_OperationInputListLength(
        oper: *mut TF_Operation,
        arg_name: *const ::std::os::raw::c_char,
        status: *mut TF_Status,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn TF_OperationInput(oper_in: TF_Input) -> TF_Output;
}
extern "C" {
    pub fn TF_OperationAllInputs(
        oper: *mut TF_Operation,
        inputs: *mut TF_Output,
        max_inputs: ::std::os::raw::c_int,
    );
}
extern "C" {
    pub fn TF_OperationOutputNumConsumers(oper_out: TF_Output) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn TF_OperationOutputConsumers(
        oper_out: TF_Output,
        consumers: *mut TF_Input,
        max_consumers: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn TF_OperationNumControlInputs(oper: *mut TF_Operation) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn TF_OperationGetControlInputs(
        oper: *mut TF_Operation,
        control_inputs: *mut *mut TF_Operation,
        max_control_inputs: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn TF_OperationNumControlOutputs(oper: *mut TF_Operation) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn TF_OperationGetControlOutputs(
        oper: *mut TF_Operation,
        control_outputs: *mut *mut TF_Operation,
        max_control_outputs: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TF_AttrMetadata {
    pub is_list: ::std::os::raw::c_uchar,
    pub list_size: i64,
    pub type_: TF_AttrType,
    pub total_size: i64,
}
#[test]
fn bindgen_test_layout_TF_AttrMetadata() {
    assert_eq!(
        ::std::mem::size_of::<TF_AttrMetadata>(),
        32usize,
        concat!("Size of: ", stringify!(TF_AttrMetadata))
    );
    assert_eq!(
        ::std::mem::align_of::<TF_AttrMetadata>(),
        8usize,
        concat!("Alignment of ", stringify!(TF_AttrMetadata))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<TF_AttrMetadata>())).is_list as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(TF_AttrMetadata),
            "::",
            stringify!(is_list)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<TF_AttrMetadata>())).list_size as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(TF_AttrMetadata),
            "::",
            stringify!(list_size)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<TF_AttrMetadata>())).type_ as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(TF_AttrMetadata),
            "::",
            stringify!(type_)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<TF_AttrMetadata>())).total_size as *const _ as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(TF_AttrMetadata),
            "::",
            stringify!(total_size)
        )
    );
}
extern "C" {
    pub fn TF_OperationGetAttrMetadata(
        oper: *mut TF_Operation,
        attr_name: *const ::std::os::raw::c_char,
        status: *mut TF_Status,
    ) -> TF_AttrMetadata;
}
extern "C" {
    pub fn TF_OperationGetAttrString(
        oper: *mut TF_Operation,
        attr_name: *const ::std::os::raw::c_char,
        value: *mut ::std::os::raw::c_void,
        max_length: usize,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_OperationGetAttrStringList(
        oper: *mut TF_Operation,
        attr_name: *const ::std::os::raw::c_char,
        values: *mut *mut ::std::os::raw::c_void,
        lengths: *mut usize,
        max_values: ::std::os::raw::c_int,
        storage: *mut ::std::os::raw::c_void,
        storage_size: usize,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_OperationGetAttrInt(
        oper: *mut TF_Operation,
        attr_name: *const ::std::os::raw::c_char,
        value: *mut i64,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_OperationGetAttrIntList(
        oper: *mut TF_Operation,
        attr_name: *const ::std::os::raw::c_char,
        values: *mut i64,
        max_values: ::std::os::raw::c_int,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_OperationGetAttrFloat(
        oper: *mut TF_Operation,
        attr_name: *const ::std::os::raw::c_char,
        value: *mut f32,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_OperationGetAttrFloatList(
        oper: *mut TF_Operation,
        attr_name: *const ::std::os::raw::c_char,
        values: *mut f32,
        max_values: ::std::os::raw::c_int,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_OperationGetAttrBool(
        oper: *mut TF_Operation,
        attr_name: *const ::std::os::raw::c_char,
        value: *mut ::std::os::raw::c_uchar,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_OperationGetAttrBoolList(
        oper: *mut TF_Operation,
        attr_name: *const ::std::os::raw::c_char,
        values: *mut ::std::os::raw::c_uchar,
        max_values: ::std::os::raw::c_int,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_OperationGetAttrType(
        oper: *mut TF_Operation,
        attr_name: *const ::std::os::raw::c_char,
        value: *mut TF_DataType,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_OperationGetAttrTypeList(
        oper: *mut TF_Operation,
        attr_name: *const ::std::os::raw::c_char,
        values: *mut TF_DataType,
        max_values: ::std::os::raw::c_int,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_OperationGetAttrShape(
        oper: *mut TF_Operation,
        attr_name: *const ::std::os::raw::c_char,
        value: *mut i64,
        num_dims: ::std::os::raw::c_int,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_OperationGetAttrShapeList(
        oper: *mut TF_Operation,
        attr_name: *const ::std::os::raw::c_char,
        dims: *mut *mut i64,
        num_dims: *mut ::std::os::raw::c_int,
        num_shapes: ::std::os::raw::c_int,
        storage: *mut i64,
        storage_size: ::std::os::raw::c_int,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_OperationGetAttrTensorShapeProto(
        oper: *mut TF_Operation,
        attr_name: *const ::std::os::raw::c_char,
        value: *mut TF_Buffer,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_OperationGetAttrTensorShapeProtoList(
        oper: *mut TF_Operation,
        attr_name: *const ::std::os::raw::c_char,
        values: *mut *mut TF_Buffer,
        max_values: ::std::os::raw::c_int,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_OperationGetAttrTensor(
        oper: *mut TF_Operation,
        attr_name: *const ::std::os::raw::c_char,
        value: *mut *mut TF_Tensor,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_OperationGetAttrTensorList(
        oper: *mut TF_Operation,
        attr_name: *const ::std::os::raw::c_char,
        values: *mut *mut TF_Tensor,
        max_values: ::std::os::raw::c_int,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_OperationGetAttrValueProto(
        oper: *mut TF_Operation,
        attr_name: *const ::std::os::raw::c_char,
        output_attr_value: *mut TF_Buffer,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_GraphOperationByName(
        graph: *mut TF_Graph,
        oper_name: *const ::std::os::raw::c_char,
    ) -> *mut TF_Operation;
}
extern "C" {
    pub fn TF_GraphNextOperation(graph: *mut TF_Graph, pos: *mut usize) -> *mut TF_Operation;
}
extern "C" {
    pub fn TF_GraphToGraphDef(
        graph: *mut TF_Graph,
        output_graph_def: *mut TF_Buffer,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_GraphGetOpDef(
        graph: *mut TF_Graph,
        op_name: *const ::std::os::raw::c_char,
        output_op_def: *mut TF_Buffer,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_GraphVersions(
        graph: *mut TF_Graph,
        output_version_def: *mut TF_Buffer,
        status: *mut TF_Status,
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TF_ImportGraphDefOptions {
    _unused: [u8; 0],
}
extern "C" {
    pub fn TF_NewImportGraphDefOptions() -> *mut TF_ImportGraphDefOptions;
}
extern "C" {
    pub fn TF_DeleteImportGraphDefOptions(opts: *mut TF_ImportGraphDefOptions);
}
extern "C" {
    pub fn TF_ImportGraphDefOptionsSetPrefix(
        opts: *mut TF_ImportGraphDefOptions,
        prefix: *const ::std::os::raw::c_char,
    );
}
extern "C" {
    pub fn TF_ImportGraphDefOptionsSetDefaultDevice(
        opts: *mut TF_ImportGraphDefOptions,
        device: *const ::std::os::raw::c_char,
    );
}
extern "C" {
    pub fn TF_ImportGraphDefOptionsSetUniquifyNames(
        opts: *mut TF_ImportGraphDefOptions,
        uniquify_names: ::std::os::raw::c_uchar,
    );
}
extern "C" {
    pub fn TF_ImportGraphDefOptionsSetUniquifyPrefix(
        opts: *mut TF_ImportGraphDefOptions,
        uniquify_prefix: ::std::os::raw::c_uchar,
    );
}
extern "C" {
    pub fn TF_ImportGraphDefOptionsAddInputMapping(
        opts: *mut TF_ImportGraphDefOptions,
        src_name: *const ::std::os::raw::c_char,
        src_index: ::std::os::raw::c_int,
        dst: TF_Output,
    );
}
extern "C" {
    pub fn TF_ImportGraphDefOptionsRemapControlDependency(
        opts: *mut TF_ImportGraphDefOptions,
        src_name: *const ::std::os::raw::c_char,
        dst: *mut TF_Operation,
    );
}
extern "C" {
    pub fn TF_ImportGraphDefOptionsAddControlDependency(
        opts: *mut TF_ImportGraphDefOptions,
        oper: *mut TF_Operation,
    );
}
extern "C" {
    pub fn TF_ImportGraphDefOptionsAddReturnOutput(
        opts: *mut TF_ImportGraphDefOptions,
        oper_name: *const ::std::os::raw::c_char,
        index: ::std::os::raw::c_int,
    );
}
extern "C" {
    pub fn TF_ImportGraphDefOptionsNumReturnOutputs(
        opts: *const TF_ImportGraphDefOptions,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn TF_ImportGraphDefOptionsAddReturnOperation(
        opts: *mut TF_ImportGraphDefOptions,
        oper_name: *const ::std::os::raw::c_char,
    );
}
extern "C" {
    pub fn TF_ImportGraphDefOptionsNumReturnOperations(
        opts: *const TF_ImportGraphDefOptions,
    ) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TF_ImportGraphDefResults {
    _unused: [u8; 0],
}
extern "C" {
    pub fn TF_ImportGraphDefResultsReturnOutputs(
        results: *mut TF_ImportGraphDefResults,
        num_outputs: *mut ::std::os::raw::c_int,
        outputs: *mut *mut TF_Output,
    );
}
extern "C" {
    pub fn TF_ImportGraphDefResultsReturnOperations(
        results: *mut TF_ImportGraphDefResults,
        num_opers: *mut ::std::os::raw::c_int,
        opers: *mut *mut *mut TF_Operation,
    );
}
extern "C" {
    pub fn TF_ImportGraphDefResultsMissingUnusedInputMappings(
        results: *mut TF_ImportGraphDefResults,
        num_missing_unused_input_mappings: *mut ::std::os::raw::c_int,
        src_names: *mut *mut *const ::std::os::raw::c_char,
        src_indexes: *mut *mut ::std::os::raw::c_int,
    );
}
extern "C" {
    pub fn TF_DeleteImportGraphDefResults(results: *mut TF_ImportGraphDefResults);
}
extern "C" {
    pub fn TF_GraphImportGraphDefWithResults(
        graph: *mut TF_Graph,
        graph_def: *const TF_Buffer,
        options: *const TF_ImportGraphDefOptions,
        status: *mut TF_Status,
    ) -> *mut TF_ImportGraphDefResults;
}
extern "C" {
    pub fn TF_GraphImportGraphDefWithReturnOutputs(
        graph: *mut TF_Graph,
        graph_def: *const TF_Buffer,
        options: *const TF_ImportGraphDefOptions,
        return_outputs: *mut TF_Output,
        num_return_outputs: ::std::os::raw::c_int,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_GraphImportGraphDef(
        graph: *mut TF_Graph,
        graph_def: *const TF_Buffer,
        options: *const TF_ImportGraphDefOptions,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_GraphCopyFunction(
        g: *mut TF_Graph,
        func: *const TF_Function,
        grad: *const TF_Function,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_GraphNumFunctions(g: *mut TF_Graph) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn TF_GraphGetFunctions(
        g: *mut TF_Graph,
        funcs: *mut *mut TF_Function,
        max_func: ::std::os::raw::c_int,
        status: *mut TF_Status,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn TF_OperationToNodeDef(
        oper: *mut TF_Operation,
        output_node_def: *mut TF_Buffer,
        status: *mut TF_Status,
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TF_WhileParams {
    pub ninputs: ::std::os::raw::c_int,
    pub cond_graph: *mut TF_Graph,
    pub cond_inputs: *const TF_Output,
    pub cond_output: TF_Output,
    pub body_graph: *mut TF_Graph,
    pub body_inputs: *const TF_Output,
    pub body_outputs: *mut TF_Output,
    pub name: *const ::std::os::raw::c_char,
}
#[test]
fn bindgen_test_layout_TF_WhileParams() {
    assert_eq!(
        ::std::mem::size_of::<TF_WhileParams>(),
        72usize,
        concat!("Size of: ", stringify!(TF_WhileParams))
    );
    assert_eq!(
        ::std::mem::align_of::<TF_WhileParams>(),
        8usize,
        concat!("Alignment of ", stringify!(TF_WhileParams))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<TF_WhileParams>())).ninputs as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(TF_WhileParams),
            "::",
            stringify!(ninputs)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<TF_WhileParams>())).cond_graph as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(TF_WhileParams),
            "::",
            stringify!(cond_graph)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<TF_WhileParams>())).cond_inputs as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(TF_WhileParams),
            "::",
            stringify!(cond_inputs)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<TF_WhileParams>())).cond_output as *const _ as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(TF_WhileParams),
            "::",
            stringify!(cond_output)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<TF_WhileParams>())).body_graph as *const _ as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(TF_WhileParams),
            "::",
            stringify!(body_graph)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<TF_WhileParams>())).body_inputs as *const _ as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(TF_WhileParams),
            "::",
            stringify!(body_inputs)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<TF_WhileParams>())).body_outputs as *const _ as usize },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(TF_WhileParams),
            "::",
            stringify!(body_outputs)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<TF_WhileParams>())).name as *const _ as usize },
        64usize,
        concat!(
            "Offset of field: ",
            stringify!(TF_WhileParams),
            "::",
            stringify!(name)
        )
    );
}
extern "C" {
    pub fn TF_NewWhile(
        g: *mut TF_Graph,
        inputs: *mut TF_Output,
        ninputs: ::std::os::raw::c_int,
        status: *mut TF_Status,
    ) -> TF_WhileParams;
}
extern "C" {
    pub fn TF_FinishWhile(
        params: *const TF_WhileParams,
        status: *mut TF_Status,
        outputs: *mut TF_Output,
    );
}
extern "C" {
    pub fn TF_AbortWhile(params: *const TF_WhileParams);
}
extern "C" {
    pub fn TF_AddGradients(
        g: *mut TF_Graph,
        y: *mut TF_Output,
        ny: ::std::os::raw::c_int,
        x: *mut TF_Output,
        nx: ::std::os::raw::c_int,
        dx: *mut TF_Output,
        status: *mut TF_Status,
        dy: *mut TF_Output,
    );
}
extern "C" {
    pub fn TF_AddGradientsWithPrefix(
        g: *mut TF_Graph,
        prefix: *const ::std::os::raw::c_char,
        y: *mut TF_Output,
        ny: ::std::os::raw::c_int,
        x: *mut TF_Output,
        nx: ::std::os::raw::c_int,
        dx: *mut TF_Output,
        status: *mut TF_Status,
        dy: *mut TF_Output,
    );
}
extern "C" {
    pub fn TF_GraphToFunction(
        fn_body: *const TF_Graph,
        fn_name: *const ::std::os::raw::c_char,
        append_hash_to_fn_name: ::std::os::raw::c_uchar,
        num_opers: ::std::os::raw::c_int,
        opers: *const *const TF_Operation,
        ninputs: ::std::os::raw::c_int,
        inputs: *const TF_Output,
        noutputs: ::std::os::raw::c_int,
        outputs: *const TF_Output,
        output_names: *const *const ::std::os::raw::c_char,
        opts: *const TF_FunctionOptions,
        description: *const ::std::os::raw::c_char,
        status: *mut TF_Status,
    ) -> *mut TF_Function;
}
extern "C" {
    pub fn TF_GraphToFunctionWithControlOutputs(
        fn_body: *const TF_Graph,
        fn_name: *const ::std::os::raw::c_char,
        append_hash_to_fn_name: ::std::os::raw::c_uchar,
        num_opers: ::std::os::raw::c_int,
        opers: *const *const TF_Operation,
        ninputs: ::std::os::raw::c_int,
        inputs: *const TF_Output,
        noutputs: ::std::os::raw::c_int,
        outputs: *const TF_Output,
        output_names: *const *const ::std::os::raw::c_char,
        ncontrol_outputs: ::std::os::raw::c_int,
        control_outputs: *const *const TF_Operation,
        control_output_names: *const *const ::std::os::raw::c_char,
        opts: *const TF_FunctionOptions,
        description: *const ::std::os::raw::c_char,
        status: *mut TF_Status,
    ) -> *mut TF_Function;
}
extern "C" {
    pub fn TF_FunctionName(func: *mut TF_Function) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn TF_FunctionToFunctionDef(
        func: *mut TF_Function,
        output_func_def: *mut TF_Buffer,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_FunctionImportFunctionDef(
        proto: *const ::std::os::raw::c_void,
        proto_len: usize,
        status: *mut TF_Status,
    ) -> *mut TF_Function;
}
extern "C" {
    pub fn TF_FunctionSetAttrValueProto(
        func: *mut TF_Function,
        attr_name: *const ::std::os::raw::c_char,
        proto: *const ::std::os::raw::c_void,
        proto_len: usize,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_FunctionGetAttrValueProto(
        func: *mut TF_Function,
        attr_name: *const ::std::os::raw::c_char,
        output_attr_value: *mut TF_Buffer,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_DeleteFunction(func: *mut TF_Function);
}
extern "C" {
    pub fn TF_TryEvaluateConstant(
        graph: *mut TF_Graph,
        output: TF_Output,
        result: *mut *mut TF_Tensor,
        status: *mut TF_Status,
    ) -> ::std::os::raw::c_uchar;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TF_Session {
    _unused: [u8; 0],
}
extern "C" {
    pub fn TF_NewSession(
        graph: *mut TF_Graph,
        opts: *const TF_SessionOptions,
        status: *mut TF_Status,
    ) -> *mut TF_Session;
}
extern "C" {
    pub fn TF_LoadSessionFromSavedModel(
        session_options: *const TF_SessionOptions,
        run_options: *const TF_Buffer,
        export_dir: *const ::std::os::raw::c_char,
        tags: *const *const ::std::os::raw::c_char,
        tags_len: ::std::os::raw::c_int,
        graph: *mut TF_Graph,
        meta_graph_def: *mut TF_Buffer,
        status: *mut TF_Status,
    ) -> *mut TF_Session;
}
extern "C" {
    pub fn TF_CloseSession(arg1: *mut TF_Session, status: *mut TF_Status);
}
extern "C" {
    pub fn TF_DeleteSession(arg1: *mut TF_Session, status: *mut TF_Status);
}
extern "C" {
    pub fn TF_SessionRun(
        session: *mut TF_Session,
        run_options: *const TF_Buffer,
        inputs: *const TF_Output,
        input_values: *const *mut TF_Tensor,
        ninputs: ::std::os::raw::c_int,
        outputs: *const TF_Output,
        output_values: *mut *mut TF_Tensor,
        noutputs: ::std::os::raw::c_int,
        target_opers: *const *const TF_Operation,
        ntargets: ::std::os::raw::c_int,
        run_metadata: *mut TF_Buffer,
        arg1: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_SessionPRunSetup(
        arg1: *mut TF_Session,
        inputs: *const TF_Output,
        ninputs: ::std::os::raw::c_int,
        outputs: *const TF_Output,
        noutputs: ::std::os::raw::c_int,
        target_opers: *const *const TF_Operation,
        ntargets: ::std::os::raw::c_int,
        handle: *mut *const ::std::os::raw::c_char,
        arg2: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_SessionPRun(
        arg1: *mut TF_Session,
        handle: *const ::std::os::raw::c_char,
        inputs: *const TF_Output,
        input_values: *const *mut TF_Tensor,
        ninputs: ::std::os::raw::c_int,
        outputs: *const TF_Output,
        output_values: *mut *mut TF_Tensor,
        noutputs: ::std::os::raw::c_int,
        target_opers: *const *const TF_Operation,
        ntargets: ::std::os::raw::c_int,
        arg2: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_DeletePRunHandle(handle: *const ::std::os::raw::c_char);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TF_DeprecatedSession {
    _unused: [u8; 0],
}
extern "C" {
    pub fn TF_NewDeprecatedSession(
        arg1: *const TF_SessionOptions,
        status: *mut TF_Status,
    ) -> *mut TF_DeprecatedSession;
}
extern "C" {
    pub fn TF_CloseDeprecatedSession(arg1: *mut TF_DeprecatedSession, status: *mut TF_Status);
}
extern "C" {
    pub fn TF_DeleteDeprecatedSession(arg1: *mut TF_DeprecatedSession, status: *mut TF_Status);
}
extern "C" {
    pub fn TF_Reset(
        opt: *const TF_SessionOptions,
        containers: *mut *const ::std::os::raw::c_char,
        ncontainers: ::std::os::raw::c_int,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_ExtendGraph(
        arg1: *mut TF_DeprecatedSession,
        proto: *const ::std::os::raw::c_void,
        proto_len: usize,
        arg2: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_Run(
        arg1: *mut TF_DeprecatedSession,
        run_options: *const TF_Buffer,
        input_names: *mut *const ::std::os::raw::c_char,
        inputs: *mut *mut TF_Tensor,
        ninputs: ::std::os::raw::c_int,
        output_names: *mut *const ::std::os::raw::c_char,
        outputs: *mut *mut TF_Tensor,
        noutputs: ::std::os::raw::c_int,
        target_oper_names: *mut *const ::std::os::raw::c_char,
        ntargets: ::std::os::raw::c_int,
        run_metadata: *mut TF_Buffer,
        arg2: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_PRunSetup(
        arg1: *mut TF_DeprecatedSession,
        input_names: *mut *const ::std::os::raw::c_char,
        ninputs: ::std::os::raw::c_int,
        output_names: *mut *const ::std::os::raw::c_char,
        noutputs: ::std::os::raw::c_int,
        target_oper_names: *mut *const ::std::os::raw::c_char,
        ntargets: ::std::os::raw::c_int,
        handle: *mut *const ::std::os::raw::c_char,
        arg2: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_PRun(
        arg1: *mut TF_DeprecatedSession,
        handle: *const ::std::os::raw::c_char,
        input_names: *mut *const ::std::os::raw::c_char,
        inputs: *mut *mut TF_Tensor,
        ninputs: ::std::os::raw::c_int,
        output_names: *mut *const ::std::os::raw::c_char,
        outputs: *mut *mut TF_Tensor,
        noutputs: ::std::os::raw::c_int,
        target_oper_names: *mut *const ::std::os::raw::c_char,
        ntargets: ::std::os::raw::c_int,
        arg2: *mut TF_Status,
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TF_DeviceList {
    _unused: [u8; 0],
}
extern "C" {
    pub fn TF_SessionListDevices(
        session: *mut TF_Session,
        status: *mut TF_Status,
    ) -> *mut TF_DeviceList;
}
extern "C" {
    pub fn TF_DeprecatedSessionListDevices(
        session: *mut TF_DeprecatedSession,
        status: *mut TF_Status,
    ) -> *mut TF_DeviceList;
}
extern "C" {
    pub fn TF_DeleteDeviceList(list: *mut TF_DeviceList);
}
extern "C" {
    pub fn TF_DeviceListCount(list: *const TF_DeviceList) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn TF_DeviceListName(
        list: *const TF_DeviceList,
        index: ::std::os::raw::c_int,
        status: *mut TF_Status,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn TF_DeviceListType(
        list: *const TF_DeviceList,
        index: ::std::os::raw::c_int,
        status: *mut TF_Status,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn TF_DeviceListMemoryBytes(
        list: *const TF_DeviceList,
        index: ::std::os::raw::c_int,
        status: *mut TF_Status,
    ) -> i64;
}
extern "C" {
    pub fn TF_DeviceListIncarnation(
        list: *const TF_DeviceList,
        index: ::std::os::raw::c_int,
        status: *mut TF_Status,
    ) -> u64;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TF_Library {
    _unused: [u8; 0],
}
extern "C" {
    pub fn TF_LoadLibrary(
        library_filename: *const ::std::os::raw::c_char,
        status: *mut TF_Status,
    ) -> *mut TF_Library;
}
extern "C" {
    pub fn TF_GetOpList(lib_handle: *mut TF_Library) -> TF_Buffer;
}
extern "C" {
    pub fn TF_DeleteLibraryHandle(lib_handle: *mut TF_Library);
}
extern "C" {
    pub fn TF_GetAllOpList() -> *mut TF_Buffer;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TF_ApiDefMap {
    _unused: [u8; 0],
}
extern "C" {
    pub fn TF_NewApiDefMap(
        op_list_buffer: *mut TF_Buffer,
        status: *mut TF_Status,
    ) -> *mut TF_ApiDefMap;
}
extern "C" {
    pub fn TF_DeleteApiDefMap(apimap: *mut TF_ApiDefMap);
}
extern "C" {
    pub fn TF_ApiDefMapPut(
        api_def_map: *mut TF_ApiDefMap,
        text: *const ::std::os::raw::c_char,
        text_len: usize,
        status: *mut TF_Status,
    );
}
extern "C" {
    pub fn TF_ApiDefMapGet(
        api_def_map: *mut TF_ApiDefMap,
        name: *const ::std::os::raw::c_char,
        name_len: usize,
        status: *mut TF_Status,
    ) -> *mut TF_Buffer;
}
extern "C" {
    pub fn TF_GetAllRegisteredKernels(status: *mut TF_Status) -> *mut TF_Buffer;
}
extern "C" {
    pub fn TF_GetRegisteredKernelsForOp(
        name: *const ::std::os::raw::c_char,
        status: *mut TF_Status,
    ) -> *mut TF_Buffer;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TF_Server {
    _unused: [u8; 0],
}
extern "C" {
    pub fn TF_NewServer(
        proto: *const ::std::os::raw::c_void,
        proto_len: usize,
        status: *mut TF_Status,
    ) -> *mut TF_Server;
}
extern "C" {
    pub fn TF_ServerStart(server: *mut TF_Server, status: *mut TF_Status);
}
extern "C" {
    pub fn TF_ServerStop(server: *mut TF_Server, status: *mut TF_Status);
}
extern "C" {
    pub fn TF_ServerJoin(server: *mut TF_Server, status: *mut TF_Status);
}
extern "C" {
    pub fn TF_ServerTarget(server: *mut TF_Server) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn TF_DeleteServer(server: *mut TF_Server);
}
extern "C" {
    pub fn TF_RegisterLogListener(
        listener: ::std::option::Option<unsafe extern "C" fn(arg1: *const ::std::os::raw::c_char)>,
    );
}
