// @generated by tools/raw-ffi-gen; do not edit by hand.

/* automatically generated by rust-bindgen 0.71.1 */

pub type BNNSDataType = u32;
pub type BNNSActivationFunction = u32;
pub type BNNSReduceFunction = u32;
pub type BNNSDataLayout = u32;
pub type BNNSNDArrayFlags = u32;
pub type BNNSRandomGeneratorMethod = u32;
pub type BNNSSparsityType = u32;
pub type BNNSTargetSystem = u32;
pub type BNNSAlloc = ::core::option::Option<
    unsafe extern "C" fn(
        memptr: *mut *mut ::core::ffi::c_void,
        alignment: usize,
        size: usize,
    ) -> ::core::ffi::c_int,
>;
pub type BNNSFree = ::core::option::Option<unsafe extern "C" fn(ptr: *mut ::core::ffi::c_void)>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct BNNSActivation {
    pub function: BNNSActivationFunction,
    pub alpha: f32,
    pub beta: f32,
    pub iscale: i32,
    pub ioffset: i32,
    pub ishift: i32,
    pub iscale_per_channel: *const i32,
    pub ioffset_per_channel: *const i32,
    pub ishift_per_channel: *const i32,
}
impl Default for BNNSActivation {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct BNNSNDArrayDescriptor {
    pub flags: BNNSNDArrayFlags,
    pub layout: BNNSDataLayout,
    pub size: [usize; 8usize],
    pub stride: [usize; 8usize],
    pub data: *mut ::core::ffi::c_void,
    pub data_type: BNNSDataType,
    pub table_data: *mut ::core::ffi::c_void,
    pub table_data_type: BNNSDataType,
    pub data_scale: f32,
    pub data_bias: f32,
}
impl Default for BNNSNDArrayDescriptor {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct BNNSTensor {
    pub data_type: BNNSDataType,
    pub rank: u8,
    pub shape: [isize; 8usize],
    pub stride: [isize; 8usize],
    pub data: *mut ::core::ffi::c_void,
    pub data_size_in_bytes: usize,
    pub name: *const ::core::ffi::c_char,
}
impl Default for BNNSTensor {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct BNNSMHAProjectionParameters {
    pub target_desc: BNNSNDArrayDescriptor,
    pub weights: BNNSNDArrayDescriptor,
    pub bias: BNNSNDArrayDescriptor,
}
impl Default for BNNSMHAProjectionParameters {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct BNNSLayerParametersReduction {
    pub i_desc: BNNSNDArrayDescriptor,
    pub o_desc: BNNSNDArrayDescriptor,
    pub w_desc: BNNSNDArrayDescriptor,
    pub reduce_func: BNNSReduceFunction,
    pub epsilon: f32,
}
impl Default for BNNSLayerParametersReduction {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct BNNSSparsityParameters {
    pub flags: u64,
    pub sparsity_ratio: [u32; 2usize],
    pub sparsity_type: BNNSSparsityType,
    pub target_system: BNNSTargetSystem,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct BNNSFilterParameters {
    pub flags: u32,
    pub n_threads: usize,
    pub alloc_memory: BNNSAlloc,
    pub free_memory: BNNSFree,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bnns_graph_t {
    pub data: *mut ::core::ffi::c_void,
    pub size: usize,
}
impl Default for bnns_graph_t {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bnns_graph_context_t {
    pub data: *mut ::core::ffi::c_void,
    pub size: usize,
}
impl Default for bnns_graph_context_t {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bnns_graph_shape_t {
    pub rank: usize,
    pub shape: *mut u64,
}
impl Default for bnns_graph_shape_t {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type bnns_graph_realloc_fn_t = ::core::option::Option<
    unsafe extern "C" fn(
        user_memory_context: *mut ::core::ffi::c_void,
        user_memory_context_size: usize,
        memptr: *mut *mut ::core::ffi::c_void,
        alignment: usize,
        size: usize,
    ) -> ::core::ffi::c_int,
>;
pub type bnns_graph_free_all_fn_t = ::core::option::Option<
    unsafe extern "C" fn(
        user_memory_context: *mut ::core::ffi::c_void,
        user_memory_context_size: usize,
    ),
>;
pub type BNNSGraphMessageLevel = u32;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bnns_user_message_data_t {
    pub size: usize,
    pub data: *mut ::core::ffi::c_void,
}
impl Default for bnns_user_message_data_t {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type bnns_graph_execute_message_fn_t = ::core::option::Option<
    unsafe extern "C" fn(
        msg_level: BNNSGraphMessageLevel,
        error_msg: *const ::core::ffi::c_char,
        op_info: *const ::core::ffi::c_char,
        additional_logging_arguments: *mut bnns_user_message_data_t,
    ),
>;
pub type bnns_graph_compile_message_fn_t = ::core::option::Option<
    unsafe extern "C" fn(
        msg_level: BNNSGraphMessageLevel,
        error_msg: *const ::core::ffi::c_char,
        source_location: *const ::core::ffi::c_char,
        additional_logging_arguments: *mut bnns_user_message_data_t,
    ),
>;
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSGraphCompileOptionsSetMessageLogCallback(
        options: bnns_graph_compile_options_t,
        log_callback: bnns_graph_compile_message_fn_t,
        additional_logging_arguments: *mut bnns_user_message_data_t,
    );
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSGraphCompileOptionsSetMessageLogMask(
        options: bnns_graph_compile_options_t,
        log_level_mask: u32,
    );
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSGraphCompileOptionsSetOutputPath(
        options: bnns_graph_compile_options_t,
        path: *const ::core::ffi::c_char,
    );
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSGraphCompileOptionsGetOutputPath(
        options: bnns_graph_compile_options_t,
    ) -> *const ::core::ffi::c_char;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSGraphCompileOptionsSetOutputFD(
        options: bnns_graph_compile_options_t,
        fd: ::core::ffi::c_int,
    );
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSGraphCompileOptionsGetOutputFD(
        options: bnns_graph_compile_options_t,
    ) -> ::core::ffi::c_int;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    #[link_name = "\u{1}_BNNSGraphCompileFromFile_v2"]
    pub fn BNNSGraphCompileFromFile(
        filename: *const ::core::ffi::c_char,
        function: *const ::core::ffi::c_char,
        options: bnns_graph_compile_options_t,
    ) -> bnns_graph_t;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSGraphGetInputCount(
        graph: bnns_graph_t,
        function: *const ::core::ffi::c_char,
    ) -> usize;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSGraphGetOutputCount(
        graph: bnns_graph_t,
        function: *const ::core::ffi::c_char,
    ) -> usize;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSGraphGetArgumentCount(
        graph: bnns_graph_t,
        function: *const ::core::ffi::c_char,
    ) -> usize;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSGraphGetFunctionCount(graph: bnns_graph_t) -> usize;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    #[link_name = "\u{1}_BNNSGraphGetInputNames_v2"]
    pub fn BNNSGraphGetInputNames(
        graph: bnns_graph_t,
        function: *const ::core::ffi::c_char,
        input_names_count: usize,
        input_names: *mut *const ::core::ffi::c_char,
    ) -> ::core::ffi::c_int;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    #[link_name = "\u{1}_BNNSGraphGetOutputNames_v2"]
    pub fn BNNSGraphGetOutputNames(
        graph: bnns_graph_t,
        function: *const ::core::ffi::c_char,
        output_names_count: usize,
        output_names: *mut *const ::core::ffi::c_char,
    ) -> ::core::ffi::c_int;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSGraphGetArgumentNames(
        graph: bnns_graph_t,
        function: *const ::core::ffi::c_char,
        argument_names_count: usize,
        argument_names: *mut *const ::core::ffi::c_char,
    ) -> ::core::ffi::c_int;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSGraphGetFunctionNames(
        graph: bnns_graph_t,
        function_name_count: usize,
        function_names: *mut *const ::core::ffi::c_char,
    ) -> ::core::ffi::c_int;
}
pub type BNNSGraphArgumentIntent = u32;
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSGraphGetArgumentIntents(
        graph: bnns_graph_t,
        function: *const ::core::ffi::c_char,
        argument_intents_count: usize,
        argument_intents: *mut BNNSGraphArgumentIntent,
    ) -> ::core::ffi::c_int;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSGraphGetArgumentPosition(
        graph: bnns_graph_t,
        function: *const ::core::ffi::c_char,
        argument: *const ::core::ffi::c_char,
    ) -> usize;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSGraphGetArgumentInterleaveFactors(
        graph: bnns_graph_t,
        function: *const ::core::ffi::c_char,
        argument_count: usize,
        argument_interleave: *mut *const u16,
        argument_interleave_counts: *mut usize,
    ) -> ::core::ffi::c_int;
}
pub type BNNSGraphArgumentType = u32;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct bnns_graph_argument_t {
    pub __bindgen_anon_1: bnns_graph_argument_t__bindgen_ty_1,
    pub data_ptr_size: usize,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bnns_graph_argument_t__bindgen_ty_1 {
    pub tensor: *mut BNNSTensor,
    pub descriptor: *mut BNNSNDArrayDescriptor,
    pub data_ptr: *mut ::core::ffi::c_void,
}
impl Default for bnns_graph_argument_t__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for bnns_graph_argument_t {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSGraphContextMake(graph: bnns_graph_t) -> bnns_graph_context_t;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSGraphContextMakeStreaming(
        graph: bnns_graph_t,
        function: *const ::core::ffi::c_char,
        initial_states_count: usize,
        initial_states: *const BNNSTensor,
    ) -> bnns_graph_context_t;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    #[link_name = "\u{1}_BNNSGraphContextDestroy_v2"]
    pub fn BNNSGraphContextDestroy(context: bnns_graph_context_t);
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    #[link_name = "\u{1}_BNNSGraphContextSetDynamicShapes_v2"]
    pub fn BNNSGraphContextSetDynamicShapes(
        context: bnns_graph_context_t,
        function: *const ::core::ffi::c_char,
        shapes_count: usize,
        shapes: *mut bnns_graph_shape_t,
    ) -> ::core::ffi::c_int;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    #[link_name = "\u{1}_BNNSGraphContextSetBatchSize_v2"]
    pub fn BNNSGraphContextSetBatchSize(
        context: bnns_graph_context_t,
        function: *const ::core::ffi::c_char,
        batch_size: u64,
    ) -> ::core::ffi::c_int;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSGraphContextSetArgumentType(
        context: bnns_graph_context_t,
        argument_type: BNNSGraphArgumentType,
    ) -> ::core::ffi::c_int;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSGraphContextEnableNanAndInfChecks(
        context: bnns_graph_context_t,
        enable_check_for_nans_inf: bool,
    );
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSGraphContextSetStreamingAdvanceCount(
        context: bnns_graph_context_t,
        advance_count: usize,
    ) -> ::core::ffi::c_int;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    #[link_name = "\u{1}_BNNSGraphContextExecute_v2"]
    pub fn BNNSGraphContextExecute(
        context: bnns_graph_context_t,
        function: *const ::core::ffi::c_char,
        argument_count: usize,
        arguments: *mut bnns_graph_argument_t,
        workspace_size: usize,
        workspace: *mut ::core::ffi::c_char,
    ) -> ::core::ffi::c_int;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    #[link_name = "\u{1}_BNNSGraphContextGetWorkspaceSize_v2"]
    pub fn BNNSGraphContextGetWorkspaceSize(
        context: bnns_graph_context_t,
        function: *const ::core::ffi::c_char,
    ) -> usize;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSGraphContextGetTensor(
        context: bnns_graph_context_t,
        function: *const ::core::ffi::c_char,
        argument: *const ::core::ffi::c_char,
        fill_known_dynamic_shapes: bool,
        tensor: *mut BNNSTensor,
    ) -> ::core::ffi::c_int;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSGraphTensorFillStrides(
        graph: bnns_graph_t,
        function: *const ::core::ffi::c_char,
        argument: *const ::core::ffi::c_char,
        tensor: *mut BNNSTensor,
    ) -> ::core::ffi::c_int;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    #[link_name = "\u{1}_BNNSGraphContextSetWorkspaceAllocationCallback_v2"]
    pub fn BNNSGraphContextSetWorkspaceAllocationCallback(
        context: bnns_graph_context_t,
        realloc: bnns_graph_realloc_fn_t,
        free: bnns_graph_free_all_fn_t,
        user_memory_context_size: usize,
        user_memory_context: *mut ::core::ffi::c_void,
    ) -> ::core::ffi::c_int;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    #[link_name = "\u{1}_BNNSGraphContextSetOutputAllocationCallback_v2"]
    pub fn BNNSGraphContextSetOutputAllocationCallback(
        context: bnns_graph_context_t,
        realloc: bnns_graph_realloc_fn_t,
        free: bnns_graph_free_all_fn_t,
        user_memory_context_size: usize,
        user_memory_context: *mut ::core::ffi::c_void,
    ) -> ::core::ffi::c_int;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSGraphContextSetMessageLogCallback(
        context: bnns_graph_context_t,
        log_callback_fn: bnns_graph_execute_message_fn_t,
        additional_logging_arguments: *mut bnns_user_message_data_t,
    ) -> ::core::ffi::c_int;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSGraphContextSetMessageLogMask(
        context: bnns_graph_context_t,
        log_level_mask: u32,
    ) -> ::core::ffi::c_int;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSCopy(
        dest: *mut BNNSNDArrayDescriptor,
        src: *const BNNSNDArrayDescriptor,
        filter_params: *const BNNSFilterParameters,
    ) -> ::core::ffi::c_int;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSTranspose(
        dest: *mut BNNSNDArrayDescriptor,
        src: *const BNNSNDArrayDescriptor,
        axis0: usize,
        axis1: usize,
        filter_params: *const BNNSFilterParameters,
    ) -> ::core::ffi::c_int;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSDirectApplyReduction(
        layer_params: *const BNNSLayerParametersReduction,
        filter_params: *const BNNSFilterParameters,
    ) -> ::core::ffi::c_int;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSDirectApplyTopK(
        K: usize,
        axis: usize,
        batch_size: usize,
        input: *const BNNSNDArrayDescriptor,
        input_batch_stride: usize,
        best_values: *mut BNNSNDArrayDescriptor,
        best_values_batch_stride: usize,
        best_indices: *mut BNNSNDArrayDescriptor,
        best_indices_batch_stride: usize,
        filter_params: *const BNNSFilterParameters,
    ) -> ::core::ffi::c_int;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSDirectApplyInTopK(
        K: usize,
        axis: usize,
        batch_size: usize,
        input: *const BNNSNDArrayDescriptor,
        input_batch_stride: usize,
        test_indices: *const BNNSNDArrayDescriptor,
        test_indices_batch_stride: usize,
        output: *mut BNNSNDArrayDescriptor,
        output_batch_stride: usize,
        filter_params: *const BNNSFilterParameters,
    ) -> ::core::ffi::c_int;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSNDArrayGetDataSize(array: *const BNNSNDArrayDescriptor) -> usize;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSTensorGetAllocationSize(tensor: *const BNNSTensor) -> usize;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSDataLayoutGetRank(layout: BNNSDataLayout) -> usize;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSCreateRandomGenerator(
        method: BNNSRandomGeneratorMethod,
        filter_params: *const BNNSFilterParameters,
    ) -> *mut ::core::ffi::c_void;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSCreateRandomGeneratorWithSeed(
        method: BNNSRandomGeneratorMethod,
        seed: u64,
        filter_params: *const BNNSFilterParameters,
    ) -> *mut ::core::ffi::c_void;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSDestroyRandomGenerator(generator: *mut ::core::ffi::c_void);
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSRandomGeneratorStateSize(generator: *mut ::core::ffi::c_void) -> usize;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSRandomGeneratorGetState(
        generator: *mut ::core::ffi::c_void,
        state_size: usize,
        state: *mut ::core::ffi::c_void,
    ) -> ::core::ffi::c_int;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSRandomGeneratorSetState(
        generator: *mut ::core::ffi::c_void,
        state_size: usize,
        state: *mut ::core::ffi::c_void,
    ) -> ::core::ffi::c_int;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSRandomFillUniformFloat(
        generator: *mut ::core::ffi::c_void,
        desc: *mut BNNSNDArrayDescriptor,
        a: f32,
        b: f32,
    ) -> ::core::ffi::c_int;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSRandomFillUniformInt(
        generator: *mut ::core::ffi::c_void,
        desc: *mut BNNSNDArrayDescriptor,
        a: i64,
        b: i64,
    ) -> ::core::ffi::c_int;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSRandomFillNormalFloat(
        generator: *mut ::core::ffi::c_void,
        desc: *mut BNNSNDArrayDescriptor,
        mean: f32,
        stddev: f32,
    ) -> ::core::ffi::c_int;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSRandomFillCategoricalFloat(
        generator: *mut ::core::ffi::c_void,
        desc: *const BNNSNDArrayDescriptor,
        probabilities: *const BNNSNDArrayDescriptor,
        log_probabilities: bool,
    ) -> ::core::ffi::c_int;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSCreateNearestNeighbors(
        max_n_samples: ::core::ffi::c_uint,
        n_features: ::core::ffi::c_uint,
        n_neighbors: ::core::ffi::c_uint,
        data_type: BNNSDataType,
        filter_params: *const BNNSFilterParameters,
    ) -> *mut ::core::ffi::c_void;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSDestroyNearestNeighbors(knn: *mut ::core::ffi::c_void);
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSNearestNeighborsLoad(
        knn: *mut ::core::ffi::c_void,
        n_new_samples: ::core::ffi::c_uint,
        data_ptr: *const ::core::ffi::c_void,
    ) -> ::core::ffi::c_int;
}
#[link(name = "Accelerate", kind = "framework")]
unsafe extern "C" {
    pub fn BNNSNearestNeighborsGetInfo(
        knn: *mut ::core::ffi::c_void,
        sample_number: ::core::ffi::c_int,
        indices: *mut ::core::ffi::c_int,
        distances: *mut ::core::ffi::c_void,
    ) -> ::core::ffi::c_int;
}
