flint-sys 0.9.0

Bindings to the FLINT C library
Documentation
/* automatically generated by rust-bindgen 0.70.1 */

use crate::deps::*;
use crate::flint::*;


pub const FLINT_DEFAULT_THREAD_LIMIT: u32 = 99999;
pub const FLINT_PARALLEL_UNIFORM: u32 = 1;
pub const FLINT_PARALLEL_STRIDED: u32 = 2;
pub const FLINT_PARALLEL_DYNAMIC: u32 = 4;
pub const FLINT_PARALLEL_BSPLIT_LEFT_INPLACE: u32 = 8;
pub const FLINT_PARALLEL_VERBOSE: u32 = 512;
pub type do_func_t = ::std::option::Option<unsafe extern "C" fn(i: slong, args: *mut libc::c_void)>;
pub type bsplit_merge_func_t = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: *mut libc::c_void,
        arg2: *mut libc::c_void,
        arg3: *mut libc::c_void,
        arg4: *mut libc::c_void,
    ),
>;
pub type bsplit_basecase_func_t = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: *mut libc::c_void,
        arg2: slong,
        arg3: slong,
        arg4: *mut libc::c_void,
    ),
>;
pub type bsplit_init_func_t =
    ::std::option::Option<unsafe extern "C" fn(arg1: *mut libc::c_void, arg2: *mut libc::c_void)>;
pub type bsplit_clear_func_t =
    ::std::option::Option<unsafe extern "C" fn(arg1: *mut libc::c_void, arg2: *mut libc::c_void)>;
extern "C" {
    pub fn flint_request_threads(
        handles: *mut *mut thread_pool_handle,
        thread_limit: slong,
    ) -> slong;
    pub fn flint_give_back_threads(handles: *mut thread_pool_handle, num_handles: slong);
    pub fn flint_get_num_available_threads() -> slong;
    pub fn flint_parallel_do(
        f: do_func_t,
        args: *mut libc::c_void,
        n: slong,
        thread_limit: libc::c_int,
        flags: libc::c_int,
    );
    pub fn flint_parallel_binary_splitting(
        res: *mut libc::c_void,
        basecase: bsplit_basecase_func_t,
        merge: bsplit_merge_func_t,
        sizeof_res: usize,
        init: bsplit_init_func_t,
        clear: bsplit_clear_func_t,
        args: *mut libc::c_void,
        a: slong,
        b: slong,
        basecase_cutoff: slong,
        thread_limit: libc::c_int,
        flags: libc::c_int,
    );
}