pub type size_t = ::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;
extern "C" {
pub fn halide_print(
user_context: *mut ::std::os::raw::c_void,
arg1: *const ::std::os::raw::c_char,
);
}
extern "C" {
pub fn halide_default_print(
user_context: *mut ::std::os::raw::c_void,
arg1: *const ::std::os::raw::c_char,
);
}
pub type halide_print_t = ::std::option::Option<
unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void, arg2: *const ::std::os::raw::c_char),
>;
extern "C" {
pub fn halide_set_custom_print(print: halide_print_t) -> halide_print_t;
}
extern "C" {
pub fn halide_error(
user_context: *mut ::std::os::raw::c_void,
arg1: *const ::std::os::raw::c_char,
);
}
extern "C" {
pub fn halide_default_error(
user_context: *mut ::std::os::raw::c_void,
arg1: *const ::std::os::raw::c_char,
);
}
pub type halide_error_handler_t = ::std::option::Option<
unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void, arg2: *const ::std::os::raw::c_char),
>;
extern "C" {
pub fn halide_set_error_handler(handler: halide_error_handler_t) -> halide_error_handler_t;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct halide_mutex {
pub _private: [usize; 1usize],
}
#[test]
fn bindgen_test_layout_halide_mutex() {
assert_eq!(
::std::mem::size_of::<halide_mutex>(),
8usize,
concat!("Size of: ", stringify!(halide_mutex))
);
assert_eq!(
::std::mem::align_of::<halide_mutex>(),
8usize,
concat!("Alignment of ", stringify!(halide_mutex))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_mutex>()))._private as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(halide_mutex),
"::",
stringify!(_private)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct halide_cond {
pub _private: [usize; 1usize],
}
#[test]
fn bindgen_test_layout_halide_cond() {
assert_eq!(
::std::mem::size_of::<halide_cond>(),
8usize,
concat!("Size of: ", stringify!(halide_cond))
);
assert_eq!(
::std::mem::align_of::<halide_cond>(),
8usize,
concat!("Alignment of ", stringify!(halide_cond))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_cond>()))._private as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(halide_cond),
"::",
stringify!(_private)
)
);
}
extern "C" {
pub fn halide_mutex_lock(mutex: *mut halide_mutex);
}
extern "C" {
pub fn halide_mutex_unlock(mutex: *mut halide_mutex);
}
extern "C" {
pub fn halide_cond_signal(cond: *mut halide_cond);
}
extern "C" {
pub fn halide_cond_broadcast(cond: *mut halide_cond);
}
extern "C" {
pub fn halide_cond_wait(cond: *mut halide_cond, mutex: *mut halide_mutex);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct halide_mutex_array {
_unused: [u8; 0],
}
extern "C" {
pub fn halide_mutex_array_create(sz: ::std::os::raw::c_int) -> *mut halide_mutex_array;
}
extern "C" {
pub fn halide_mutex_array_destroy(
user_context: *mut ::std::os::raw::c_void,
array: *mut ::std::os::raw::c_void,
);
}
extern "C" {
pub fn halide_mutex_array_lock(
array: *mut halide_mutex_array,
entry: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_mutex_array_unlock(
array: *mut halide_mutex_array,
entry: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
pub type halide_task_t = ::std::option::Option<
unsafe extern "C" fn(
user_context: *mut ::std::os::raw::c_void,
task_number: ::std::os::raw::c_int,
closure: *mut u8,
) -> ::std::os::raw::c_int,
>;
extern "C" {
pub fn halide_do_par_for(
user_context: *mut ::std::os::raw::c_void,
task: halide_task_t,
min: ::std::os::raw::c_int,
size: ::std::os::raw::c_int,
closure: *mut u8,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_shutdown_thread_pool();
}
pub type halide_do_par_for_t = ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut ::std::os::raw::c_void,
arg2: halide_task_t,
arg3: ::std::os::raw::c_int,
arg4: ::std::os::raw::c_int,
arg5: *mut u8,
) -> ::std::os::raw::c_int,
>;
extern "C" {
pub fn halide_set_custom_do_par_for(do_par_for: halide_do_par_for_t) -> halide_do_par_for_t;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct halide_semaphore_t {
pub _private: [u64; 2usize],
}
#[test]
fn bindgen_test_layout_halide_semaphore_t() {
assert_eq!(
::std::mem::size_of::<halide_semaphore_t>(),
16usize,
concat!("Size of: ", stringify!(halide_semaphore_t))
);
assert_eq!(
::std::mem::align_of::<halide_semaphore_t>(),
8usize,
concat!("Alignment of ", stringify!(halide_semaphore_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_semaphore_t>()))._private as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(halide_semaphore_t),
"::",
stringify!(_private)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct halide_semaphore_acquire_t {
pub semaphore: *mut halide_semaphore_t,
pub count: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_halide_semaphore_acquire_t() {
assert_eq!(
::std::mem::size_of::<halide_semaphore_acquire_t>(),
16usize,
concat!("Size of: ", stringify!(halide_semaphore_acquire_t))
);
assert_eq!(
::std::mem::align_of::<halide_semaphore_acquire_t>(),
8usize,
concat!("Alignment of ", stringify!(halide_semaphore_acquire_t))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_semaphore_acquire_t>())).semaphore as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(halide_semaphore_acquire_t),
"::",
stringify!(semaphore)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_semaphore_acquire_t>())).count as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(halide_semaphore_acquire_t),
"::",
stringify!(count)
)
);
}
extern "C" {
pub fn halide_semaphore_init(
arg1: *mut halide_semaphore_t,
n: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_semaphore_release(
arg1: *mut halide_semaphore_t,
n: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_semaphore_try_acquire(
arg1: *mut halide_semaphore_t,
n: ::std::os::raw::c_int,
) -> bool;
}
pub type halide_semaphore_init_t = ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut halide_semaphore_t,
arg2: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int,
>;
pub type halide_semaphore_release_t = ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut halide_semaphore_t,
arg2: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int,
>;
pub type halide_semaphore_try_acquire_t = ::std::option::Option<
unsafe extern "C" fn(arg1: *mut halide_semaphore_t, arg2: ::std::os::raw::c_int) -> bool,
>;
pub type halide_loop_task_t = ::std::option::Option<
unsafe extern "C" fn(
user_context: *mut ::std::os::raw::c_void,
min: ::std::os::raw::c_int,
extent: ::std::os::raw::c_int,
closure: *mut u8,
task_parent: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct halide_parallel_task_t {
pub fn_: halide_loop_task_t,
pub closure: *mut u8,
pub name: *const ::std::os::raw::c_char,
pub semaphores: *mut halide_semaphore_acquire_t,
pub num_semaphores: ::std::os::raw::c_int,
pub min: ::std::os::raw::c_int,
pub extent: ::std::os::raw::c_int,
pub min_threads: ::std::os::raw::c_int,
pub serial: bool,
}
#[test]
fn bindgen_test_layout_halide_parallel_task_t() {
assert_eq!(
::std::mem::size_of::<halide_parallel_task_t>(),
56usize,
concat!("Size of: ", stringify!(halide_parallel_task_t))
);
assert_eq!(
::std::mem::align_of::<halide_parallel_task_t>(),
8usize,
concat!("Alignment of ", stringify!(halide_parallel_task_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_parallel_task_t>())).fn_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(halide_parallel_task_t),
"::",
stringify!(fn_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_parallel_task_t>())).closure as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(halide_parallel_task_t),
"::",
stringify!(closure)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_parallel_task_t>())).name as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(halide_parallel_task_t),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_parallel_task_t>())).semaphores as *const _ as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(halide_parallel_task_t),
"::",
stringify!(semaphores)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_parallel_task_t>())).num_semaphores as *const _ as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(halide_parallel_task_t),
"::",
stringify!(num_semaphores)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_parallel_task_t>())).min as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(halide_parallel_task_t),
"::",
stringify!(min)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_parallel_task_t>())).extent as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(halide_parallel_task_t),
"::",
stringify!(extent)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_parallel_task_t>())).min_threads as *const _ as usize
},
44usize,
concat!(
"Offset of field: ",
stringify!(halide_parallel_task_t),
"::",
stringify!(min_threads)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_parallel_task_t>())).serial as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(halide_parallel_task_t),
"::",
stringify!(serial)
)
);
}
extern "C" {
pub fn halide_do_parallel_tasks(
user_context: *mut ::std::os::raw::c_void,
num_tasks: ::std::os::raw::c_int,
tasks: *mut halide_parallel_task_t,
task_parent: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
pub type halide_do_task_t = ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut ::std::os::raw::c_void,
arg2: halide_task_t,
arg3: ::std::os::raw::c_int,
arg4: *mut u8,
) -> ::std::os::raw::c_int,
>;
extern "C" {
pub fn halide_set_custom_do_task(do_task: halide_do_task_t) -> halide_do_task_t;
}
extern "C" {
pub fn halide_do_task(
user_context: *mut ::std::os::raw::c_void,
f: halide_task_t,
idx: ::std::os::raw::c_int,
closure: *mut u8,
) -> ::std::os::raw::c_int;
}
pub type halide_do_loop_task_t = ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut ::std::os::raw::c_void,
arg2: halide_loop_task_t,
arg3: ::std::os::raw::c_int,
arg4: ::std::os::raw::c_int,
arg5: *mut u8,
arg6: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
extern "C" {
pub fn halide_set_custom_do_loop_task(do_task: halide_do_loop_task_t) -> halide_do_loop_task_t;
}
extern "C" {
pub fn halide_do_loop_task(
user_context: *mut ::std::os::raw::c_void,
f: halide_loop_task_t,
min: ::std::os::raw::c_int,
extent: ::std::os::raw::c_int,
closure: *mut u8,
task_parent: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
pub type halide_do_parallel_tasks_t = ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut ::std::os::raw::c_void,
arg2: ::std::os::raw::c_int,
arg3: *mut halide_parallel_task_t,
task_parent: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
extern "C" {
pub fn halide_set_custom_parallel_runtime(
arg1: halide_do_par_for_t,
arg2: halide_do_task_t,
arg3: halide_do_loop_task_t,
arg4: halide_do_parallel_tasks_t,
arg5: halide_semaphore_init_t,
arg6: halide_semaphore_try_acquire_t,
arg7: halide_semaphore_release_t,
);
}
extern "C" {
pub fn halide_default_do_par_for(
user_context: *mut ::std::os::raw::c_void,
task: halide_task_t,
min: ::std::os::raw::c_int,
size: ::std::os::raw::c_int,
closure: *mut u8,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_default_do_parallel_tasks(
user_context: *mut ::std::os::raw::c_void,
num_tasks: ::std::os::raw::c_int,
tasks: *mut halide_parallel_task_t,
task_parent: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_default_do_task(
user_context: *mut ::std::os::raw::c_void,
f: halide_task_t,
idx: ::std::os::raw::c_int,
closure: *mut u8,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_default_do_loop_task(
user_context: *mut ::std::os::raw::c_void,
f: halide_loop_task_t,
min: ::std::os::raw::c_int,
extent: ::std::os::raw::c_int,
closure: *mut u8,
task_parent: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_default_semaphore_init(
arg1: *mut halide_semaphore_t,
n: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_default_semaphore_release(
arg1: *mut halide_semaphore_t,
n: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_default_semaphore_try_acquire(
arg1: *mut halide_semaphore_t,
n: ::std::os::raw::c_int,
) -> bool;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct halide_thread {
_unused: [u8; 0],
}
extern "C" {
pub fn halide_spawn_thread(
f: ::std::option::Option<unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void)>,
closure: *mut ::std::os::raw::c_void,
) -> *mut halide_thread;
}
extern "C" {
pub fn halide_join_thread(arg1: *mut halide_thread);
}
extern "C" {
pub fn halide_set_num_threads(n: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_malloc(
user_context: *mut ::std::os::raw::c_void,
x: size_t,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn halide_free(user_context: *mut ::std::os::raw::c_void, ptr: *mut ::std::os::raw::c_void);
}
extern "C" {
pub fn halide_default_malloc(
user_context: *mut ::std::os::raw::c_void,
x: size_t,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn halide_default_free(
user_context: *mut ::std::os::raw::c_void,
ptr: *mut ::std::os::raw::c_void,
);
}
pub type halide_malloc_t = ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut ::std::os::raw::c_void,
arg2: size_t,
) -> *mut ::std::os::raw::c_void,
>;
pub type halide_free_t = ::std::option::Option<
unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void, arg2: *mut ::std::os::raw::c_void),
>;
extern "C" {
pub fn halide_set_custom_malloc(user_malloc: halide_malloc_t) -> halide_malloc_t;
}
extern "C" {
pub fn halide_set_custom_free(user_free: halide_free_t) -> halide_free_t;
}
extern "C" {
pub fn halide_get_symbol(name: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn halide_load_library(name: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn halide_get_library_symbol(
lib: *mut ::std::os::raw::c_void,
name: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn halide_default_get_symbol(
name: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn halide_default_load_library(
name: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn halide_default_get_library_symbol(
lib: *mut ::std::os::raw::c_void,
name: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_void;
}
pub type halide_get_symbol_t = ::std::option::Option<
unsafe extern "C" fn(name: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_void,
>;
pub type halide_load_library_t = ::std::option::Option<
unsafe extern "C" fn(name: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_void,
>;
pub type halide_get_library_symbol_t = ::std::option::Option<
unsafe extern "C" fn(
lib: *mut ::std::os::raw::c_void,
name: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_void,
>;
extern "C" {
pub fn halide_set_custom_get_symbol(
user_get_symbol: halide_get_symbol_t,
) -> halide_get_symbol_t;
}
extern "C" {
pub fn halide_set_custom_load_library(
user_load_library: halide_load_library_t,
) -> halide_load_library_t;
}
extern "C" {
pub fn halide_set_custom_get_library_symbol(
user_get_library_symbol: halide_get_library_symbol_t,
) -> halide_get_library_symbol_t;
}
extern "C" {
pub fn halide_debug_to_file(
user_context: *mut ::std::os::raw::c_void,
filename: *const ::std::os::raw::c_char,
type_code: i32,
buf: *mut halide_buffer_t,
) -> i32;
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum halide_type_code_t {
halide_type_int = 0,
halide_type_uint = 1,
halide_type_float = 2,
halide_type_handle = 3,
halide_type_bfloat = 4,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct halide_type_t {
pub code: u8,
pub bits: u8,
pub lanes: u16,
}
#[test]
fn bindgen_test_layout_halide_type_t() {
assert_eq!(
::std::mem::size_of::<halide_type_t>(),
4usize,
concat!("Size of: ", stringify!(halide_type_t))
);
assert_eq!(
::std::mem::align_of::<halide_type_t>(),
2usize,
concat!("Alignment of ", stringify!(halide_type_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_type_t>())).code as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(halide_type_t),
"::",
stringify!(code)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_type_t>())).bits as *const _ as usize },
1usize,
concat!(
"Offset of field: ",
stringify!(halide_type_t),
"::",
stringify!(bits)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_type_t>())).lanes as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(halide_type_t),
"::",
stringify!(lanes)
)
);
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum halide_trace_event_code_t {
halide_trace_load = 0,
halide_trace_store = 1,
halide_trace_begin_realization = 2,
halide_trace_end_realization = 3,
halide_trace_produce = 4,
halide_trace_end_produce = 5,
halide_trace_consume = 6,
halide_trace_end_consume = 7,
halide_trace_begin_pipeline = 8,
halide_trace_end_pipeline = 9,
halide_trace_tag = 10,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct halide_trace_event_t {
pub func: *const ::std::os::raw::c_char,
pub value: *mut ::std::os::raw::c_void,
pub coordinates: *mut i32,
pub trace_tag: *const ::std::os::raw::c_char,
pub type_: halide_type_t,
pub event: halide_trace_event_code_t,
pub parent_id: i32,
pub value_index: i32,
pub dimensions: i32,
}
#[test]
fn bindgen_test_layout_halide_trace_event_t() {
assert_eq!(
::std::mem::size_of::<halide_trace_event_t>(),
56usize,
concat!("Size of: ", stringify!(halide_trace_event_t))
);
assert_eq!(
::std::mem::align_of::<halide_trace_event_t>(),
8usize,
concat!("Alignment of ", stringify!(halide_trace_event_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_trace_event_t>())).func as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(halide_trace_event_t),
"::",
stringify!(func)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_trace_event_t>())).value as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(halide_trace_event_t),
"::",
stringify!(value)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_trace_event_t>())).coordinates as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(halide_trace_event_t),
"::",
stringify!(coordinates)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_trace_event_t>())).trace_tag as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(halide_trace_event_t),
"::",
stringify!(trace_tag)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_trace_event_t>())).type_ as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(halide_trace_event_t),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_trace_event_t>())).event as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(halide_trace_event_t),
"::",
stringify!(event)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_trace_event_t>())).parent_id as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(halide_trace_event_t),
"::",
stringify!(parent_id)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_trace_event_t>())).value_index as *const _ as usize
},
44usize,
concat!(
"Offset of field: ",
stringify!(halide_trace_event_t),
"::",
stringify!(value_index)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_trace_event_t>())).dimensions as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(halide_trace_event_t),
"::",
stringify!(dimensions)
)
);
}
extern "C" {
pub fn halide_trace(
user_context: *mut ::std::os::raw::c_void,
event: *const halide_trace_event_t,
) -> i32;
}
extern "C" {
pub fn halide_default_trace(
user_context: *mut ::std::os::raw::c_void,
event: *const halide_trace_event_t,
) -> i32;
}
pub type halide_trace_t = ::std::option::Option<
unsafe extern "C" fn(
user_context: *mut ::std::os::raw::c_void,
arg1: *const halide_trace_event_t,
) -> i32,
>;
extern "C" {
pub fn halide_set_custom_trace(trace: halide_trace_t) -> halide_trace_t;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct halide_trace_packet_t {
pub size: u32,
pub id: i32,
pub type_: halide_type_t,
pub event: halide_trace_event_code_t,
pub parent_id: i32,
pub value_index: i32,
pub dimensions: i32,
}
#[test]
fn bindgen_test_layout_halide_trace_packet_t() {
assert_eq!(
::std::mem::size_of::<halide_trace_packet_t>(),
28usize,
concat!("Size of: ", stringify!(halide_trace_packet_t))
);
assert_eq!(
::std::mem::align_of::<halide_trace_packet_t>(),
4usize,
concat!("Alignment of ", stringify!(halide_trace_packet_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_trace_packet_t>())).size as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(halide_trace_packet_t),
"::",
stringify!(size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_trace_packet_t>())).id as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(halide_trace_packet_t),
"::",
stringify!(id)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_trace_packet_t>())).type_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(halide_trace_packet_t),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_trace_packet_t>())).event as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(halide_trace_packet_t),
"::",
stringify!(event)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_trace_packet_t>())).parent_id as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(halide_trace_packet_t),
"::",
stringify!(parent_id)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_trace_packet_t>())).value_index as *const _ as usize
},
20usize,
concat!(
"Offset of field: ",
stringify!(halide_trace_packet_t),
"::",
stringify!(value_index)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_trace_packet_t>())).dimensions as *const _ as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(halide_trace_packet_t),
"::",
stringify!(dimensions)
)
);
}
extern "C" {
pub fn halide_set_trace_file(fd: ::std::os::raw::c_int);
}
extern "C" {
pub fn halide_get_trace_file(
user_context: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_shutdown_trace() -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct halide_device_interface_impl_t {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct halide_device_interface_t {
pub device_malloc: ::std::option::Option<
unsafe extern "C" fn(
user_context: *mut ::std::os::raw::c_void,
buf: *mut halide_buffer_t,
device_interface: *const halide_device_interface_t,
) -> ::std::os::raw::c_int,
>,
pub device_free: ::std::option::Option<
unsafe extern "C" fn(
user_context: *mut ::std::os::raw::c_void,
buf: *mut halide_buffer_t,
) -> ::std::os::raw::c_int,
>,
pub device_sync: ::std::option::Option<
unsafe extern "C" fn(
user_context: *mut ::std::os::raw::c_void,
buf: *mut halide_buffer_t,
) -> ::std::os::raw::c_int,
>,
pub device_release: ::std::option::Option<
unsafe extern "C" fn(
user_context: *mut ::std::os::raw::c_void,
device_interface: *const halide_device_interface_t,
),
>,
pub copy_to_host: ::std::option::Option<
unsafe extern "C" fn(
user_context: *mut ::std::os::raw::c_void,
buf: *mut halide_buffer_t,
) -> ::std::os::raw::c_int,
>,
pub copy_to_device: ::std::option::Option<
unsafe extern "C" fn(
user_context: *mut ::std::os::raw::c_void,
buf: *mut halide_buffer_t,
device_interface: *const halide_device_interface_t,
) -> ::std::os::raw::c_int,
>,
pub device_and_host_malloc: ::std::option::Option<
unsafe extern "C" fn(
user_context: *mut ::std::os::raw::c_void,
buf: *mut halide_buffer_t,
device_interface: *const halide_device_interface_t,
) -> ::std::os::raw::c_int,
>,
pub device_and_host_free: ::std::option::Option<
unsafe extern "C" fn(
user_context: *mut ::std::os::raw::c_void,
buf: *mut halide_buffer_t,
) -> ::std::os::raw::c_int,
>,
pub buffer_copy: ::std::option::Option<
unsafe extern "C" fn(
user_context: *mut ::std::os::raw::c_void,
src: *mut halide_buffer_t,
dst_device_interface: *const halide_device_interface_t,
dst: *mut halide_buffer_t,
) -> ::std::os::raw::c_int,
>,
pub device_crop: ::std::option::Option<
unsafe extern "C" fn(
user_context: *mut ::std::os::raw::c_void,
src: *const halide_buffer_t,
dst: *mut halide_buffer_t,
) -> ::std::os::raw::c_int,
>,
pub device_slice: ::std::option::Option<
unsafe extern "C" fn(
user_context: *mut ::std::os::raw::c_void,
src: *const halide_buffer_t,
slice_dim: ::std::os::raw::c_int,
slice_pos: ::std::os::raw::c_int,
dst: *mut halide_buffer_t,
) -> ::std::os::raw::c_int,
>,
pub device_release_crop: ::std::option::Option<
unsafe extern "C" fn(
user_context: *mut ::std::os::raw::c_void,
buf: *mut halide_buffer_t,
) -> ::std::os::raw::c_int,
>,
pub wrap_native: ::std::option::Option<
unsafe extern "C" fn(
user_context: *mut ::std::os::raw::c_void,
buf: *mut halide_buffer_t,
handle: u64,
device_interface: *const halide_device_interface_t,
) -> ::std::os::raw::c_int,
>,
pub detach_native: ::std::option::Option<
unsafe extern "C" fn(
user_context: *mut ::std::os::raw::c_void,
buf: *mut halide_buffer_t,
) -> ::std::os::raw::c_int,
>,
pub compute_capability: ::std::option::Option<
unsafe extern "C" fn(
user_context: *mut ::std::os::raw::c_void,
major: *mut ::std::os::raw::c_int,
minor: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int,
>,
pub impl_: *const halide_device_interface_impl_t,
}
#[test]
fn bindgen_test_layout_halide_device_interface_t() {
assert_eq!(
::std::mem::size_of::<halide_device_interface_t>(),
128usize,
concat!("Size of: ", stringify!(halide_device_interface_t))
);
assert_eq!(
::std::mem::align_of::<halide_device_interface_t>(),
8usize,
concat!("Alignment of ", stringify!(halide_device_interface_t))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_device_interface_t>())).device_malloc as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(halide_device_interface_t),
"::",
stringify!(device_malloc)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_device_interface_t>())).device_free as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(halide_device_interface_t),
"::",
stringify!(device_free)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_device_interface_t>())).device_sync as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(halide_device_interface_t),
"::",
stringify!(device_sync)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_device_interface_t>())).device_release as *const _
as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(halide_device_interface_t),
"::",
stringify!(device_release)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_device_interface_t>())).copy_to_host as *const _ as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(halide_device_interface_t),
"::",
stringify!(copy_to_host)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_device_interface_t>())).copy_to_device as *const _
as usize
},
40usize,
concat!(
"Offset of field: ",
stringify!(halide_device_interface_t),
"::",
stringify!(copy_to_device)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_device_interface_t>())).device_and_host_malloc as *const _
as usize
},
48usize,
concat!(
"Offset of field: ",
stringify!(halide_device_interface_t),
"::",
stringify!(device_and_host_malloc)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_device_interface_t>())).device_and_host_free as *const _
as usize
},
56usize,
concat!(
"Offset of field: ",
stringify!(halide_device_interface_t),
"::",
stringify!(device_and_host_free)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_device_interface_t>())).buffer_copy as *const _ as usize
},
64usize,
concat!(
"Offset of field: ",
stringify!(halide_device_interface_t),
"::",
stringify!(buffer_copy)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_device_interface_t>())).device_crop as *const _ as usize
},
72usize,
concat!(
"Offset of field: ",
stringify!(halide_device_interface_t),
"::",
stringify!(device_crop)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_device_interface_t>())).device_slice as *const _ as usize
},
80usize,
concat!(
"Offset of field: ",
stringify!(halide_device_interface_t),
"::",
stringify!(device_slice)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_device_interface_t>())).device_release_crop as *const _
as usize
},
88usize,
concat!(
"Offset of field: ",
stringify!(halide_device_interface_t),
"::",
stringify!(device_release_crop)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_device_interface_t>())).wrap_native as *const _ as usize
},
96usize,
concat!(
"Offset of field: ",
stringify!(halide_device_interface_t),
"::",
stringify!(wrap_native)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_device_interface_t>())).detach_native as *const _ as usize
},
104usize,
concat!(
"Offset of field: ",
stringify!(halide_device_interface_t),
"::",
stringify!(detach_native)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_device_interface_t>())).compute_capability as *const _
as usize
},
112usize,
concat!(
"Offset of field: ",
stringify!(halide_device_interface_t),
"::",
stringify!(compute_capability)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_device_interface_t>())).impl_ as *const _ as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(halide_device_interface_t),
"::",
stringify!(impl_)
)
);
}
extern "C" {
pub fn halide_device_release(
user_context: *mut ::std::os::raw::c_void,
device_interface: *const halide_device_interface_t,
);
}
extern "C" {
pub fn halide_copy_to_host(
user_context: *mut ::std::os::raw::c_void,
buf: *mut halide_buffer_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_copy_to_device(
user_context: *mut ::std::os::raw::c_void,
buf: *mut halide_buffer_t,
device_interface: *const halide_device_interface_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_buffer_copy(
user_context: *mut ::std::os::raw::c_void,
src: *mut halide_buffer_t,
dst_device_interface: *const halide_device_interface_t,
dst: *mut halide_buffer_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_device_crop(
user_context: *mut ::std::os::raw::c_void,
src: *const halide_buffer_t,
dst: *mut halide_buffer_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_device_slice(
user_context: *mut ::std::os::raw::c_void,
src: *const halide_buffer_t,
slice_dim: ::std::os::raw::c_int,
slice_pos: ::std::os::raw::c_int,
dst: *mut halide_buffer_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_device_release_crop(
user_context: *mut ::std::os::raw::c_void,
buf: *mut halide_buffer_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_device_sync(
user_context: *mut ::std::os::raw::c_void,
buf: *mut halide_buffer_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_device_malloc(
user_context: *mut ::std::os::raw::c_void,
buf: *mut halide_buffer_t,
device_interface: *const halide_device_interface_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_device_free(
user_context: *mut ::std::os::raw::c_void,
buf: *mut halide_buffer_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_device_wrap_native(
user_context: *mut ::std::os::raw::c_void,
buf: *mut halide_buffer_t,
handle: u64,
device_interface: *const halide_device_interface_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_device_detach_native(
user_context: *mut ::std::os::raw::c_void,
buf: *mut halide_buffer_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_set_gpu_device(n: ::std::os::raw::c_int);
}
extern "C" {
pub fn halide_get_gpu_device(
user_context: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_memoization_cache_set_size(size: i64);
}
extern "C" {
pub fn halide_memoization_cache_lookup(
user_context: *mut ::std::os::raw::c_void,
cache_key: *const u8,
size: i32,
realized_bounds: *mut halide_buffer_t,
tuple_count: i32,
tuple_buffers: *mut *mut halide_buffer_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_memoization_cache_store(
user_context: *mut ::std::os::raw::c_void,
cache_key: *const u8,
size: i32,
realized_bounds: *mut halide_buffer_t,
tuple_count: i32,
tuple_buffers: *mut *mut halide_buffer_t,
has_eviction_key: bool,
eviction_key: u64,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_memoization_cache_evict(
user_context: *mut ::std::os::raw::c_void,
eviction_key: u64,
);
}
extern "C" {
pub fn halide_memoization_cache_release(
user_context: *mut ::std::os::raw::c_void,
host: *mut ::std::os::raw::c_void,
);
}
extern "C" {
pub fn halide_memoization_cache_cleanup();
}
extern "C" {
pub fn halide_msan_check_memory_is_initialized(
user_context: *mut ::std::os::raw::c_void,
ptr: *const ::std::os::raw::c_void,
len: u64,
name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_msan_check_buffer_is_initialized(
user_context: *mut ::std::os::raw::c_void,
buffer: *mut halide_buffer_t,
buf_name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_msan_annotate_memory_is_initialized(
user_context: *mut ::std::os::raw::c_void,
ptr: *const ::std::os::raw::c_void,
len: u64,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_msan_annotate_buffer_is_initialized(
user_context: *mut ::std::os::raw::c_void,
buffer: *mut halide_buffer_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_msan_annotate_buffer_is_initialized_as_destructor(
user_context: *mut ::std::os::raw::c_void,
buffer: *mut ::std::os::raw::c_void,
);
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum halide_error_code_t {
halide_error_code_success = 0,
halide_error_code_generic_error = -1,
halide_error_code_explicit_bounds_too_small = -2,
halide_error_code_bad_type = -3,
halide_error_code_access_out_of_bounds = -4,
halide_error_code_buffer_allocation_too_large = -5,
halide_error_code_buffer_extents_too_large = -6,
halide_error_code_constraints_make_required_region_smaller = -7,
halide_error_code_constraint_violated = -8,
halide_error_code_param_too_small = -9,
halide_error_code_param_too_large = -10,
halide_error_code_out_of_memory = -11,
halide_error_code_buffer_argument_is_null = -12,
halide_error_code_debug_to_file_failed = -13,
halide_error_code_copy_to_host_failed = -14,
halide_error_code_copy_to_device_failed = -15,
halide_error_code_device_malloc_failed = -16,
halide_error_code_device_sync_failed = -17,
halide_error_code_device_free_failed = -18,
halide_error_code_no_device_interface = -19,
halide_error_code_matlab_init_failed = -20,
halide_error_code_matlab_bad_param_type = -21,
halide_error_code_internal_error = -22,
halide_error_code_device_run_failed = -23,
halide_error_code_unaligned_host_ptr = -24,
halide_error_code_bad_fold = -25,
halide_error_code_fold_factor_too_small = -26,
halide_error_code_requirement_failed = -27,
halide_error_code_buffer_extents_negative = -28,
halide_error_code_unused_29 = -29,
halide_error_code_unused_30 = -30,
halide_error_code_specialize_fail = -31,
halide_error_code_device_wrap_native_failed = -32,
halide_error_code_device_detach_native_failed = -33,
halide_error_code_host_is_null = -34,
halide_error_code_bad_extern_fold = -35,
halide_error_code_device_interface_no_device = -36,
halide_error_code_host_and_device_dirty = -37,
halide_error_code_buffer_is_null = -38,
halide_error_code_device_buffer_copy_failed = -39,
halide_error_code_device_crop_unsupported = -40,
halide_error_code_device_crop_failed = -41,
halide_error_code_incompatible_device_interface = -42,
halide_error_code_bad_dimensions = -43,
halide_error_code_device_dirty_with_no_device_support = -44,
}
extern "C" {
pub fn halide_error_bounds_inference_call_failed(
user_context: *mut ::std::os::raw::c_void,
extern_stage_name: *const ::std::os::raw::c_char,
result: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_error_extern_stage_failed(
user_context: *mut ::std::os::raw::c_void,
extern_stage_name: *const ::std::os::raw::c_char,
result: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_error_explicit_bounds_too_small(
user_context: *mut ::std::os::raw::c_void,
func_name: *const ::std::os::raw::c_char,
var_name: *const ::std::os::raw::c_char,
min_bound: ::std::os::raw::c_int,
max_bound: ::std::os::raw::c_int,
min_required: ::std::os::raw::c_int,
max_required: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_error_bad_type(
user_context: *mut ::std::os::raw::c_void,
func_name: *const ::std::os::raw::c_char,
type_given: u32,
correct_type: u32,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_error_bad_dimensions(
user_context: *mut ::std::os::raw::c_void,
func_name: *const ::std::os::raw::c_char,
dimensions_given: i32,
correct_dimensions: i32,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_error_access_out_of_bounds(
user_context: *mut ::std::os::raw::c_void,
func_name: *const ::std::os::raw::c_char,
dimension: ::std::os::raw::c_int,
min_touched: ::std::os::raw::c_int,
max_touched: ::std::os::raw::c_int,
min_valid: ::std::os::raw::c_int,
max_valid: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_error_buffer_allocation_too_large(
user_context: *mut ::std::os::raw::c_void,
buffer_name: *const ::std::os::raw::c_char,
allocation_size: u64,
max_size: u64,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_error_buffer_extents_negative(
user_context: *mut ::std::os::raw::c_void,
buffer_name: *const ::std::os::raw::c_char,
dimension: ::std::os::raw::c_int,
extent: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_error_buffer_extents_too_large(
user_context: *mut ::std::os::raw::c_void,
buffer_name: *const ::std::os::raw::c_char,
actual_size: i64,
max_size: i64,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_error_constraints_make_required_region_smaller(
user_context: *mut ::std::os::raw::c_void,
buffer_name: *const ::std::os::raw::c_char,
dimension: ::std::os::raw::c_int,
constrained_min: ::std::os::raw::c_int,
constrained_extent: ::std::os::raw::c_int,
required_min: ::std::os::raw::c_int,
required_extent: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_error_constraint_violated(
user_context: *mut ::std::os::raw::c_void,
var: *const ::std::os::raw::c_char,
val: ::std::os::raw::c_int,
constrained_var: *const ::std::os::raw::c_char,
constrained_val: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_error_param_too_small_i64(
user_context: *mut ::std::os::raw::c_void,
param_name: *const ::std::os::raw::c_char,
val: i64,
min_val: i64,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_error_param_too_small_u64(
user_context: *mut ::std::os::raw::c_void,
param_name: *const ::std::os::raw::c_char,
val: u64,
min_val: u64,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_error_param_too_small_f64(
user_context: *mut ::std::os::raw::c_void,
param_name: *const ::std::os::raw::c_char,
val: f64,
min_val: f64,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_error_param_too_large_i64(
user_context: *mut ::std::os::raw::c_void,
param_name: *const ::std::os::raw::c_char,
val: i64,
max_val: i64,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_error_param_too_large_u64(
user_context: *mut ::std::os::raw::c_void,
param_name: *const ::std::os::raw::c_char,
val: u64,
max_val: u64,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_error_param_too_large_f64(
user_context: *mut ::std::os::raw::c_void,
param_name: *const ::std::os::raw::c_char,
val: f64,
max_val: f64,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_error_out_of_memory(
user_context: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_error_buffer_argument_is_null(
user_context: *mut ::std::os::raw::c_void,
buffer_name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_error_debug_to_file_failed(
user_context: *mut ::std::os::raw::c_void,
func: *const ::std::os::raw::c_char,
filename: *const ::std::os::raw::c_char,
error_code: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_error_unaligned_host_ptr(
user_context: *mut ::std::os::raw::c_void,
func_name: *const ::std::os::raw::c_char,
alignment: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_error_host_is_null(
user_context: *mut ::std::os::raw::c_void,
func_name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_error_bad_fold(
user_context: *mut ::std::os::raw::c_void,
func_name: *const ::std::os::raw::c_char,
var_name: *const ::std::os::raw::c_char,
loop_name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_error_bad_extern_fold(
user_context: *mut ::std::os::raw::c_void,
func_name: *const ::std::os::raw::c_char,
dim: ::std::os::raw::c_int,
min: ::std::os::raw::c_int,
extent: ::std::os::raw::c_int,
valid_min: ::std::os::raw::c_int,
fold_factor: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_error_fold_factor_too_small(
user_context: *mut ::std::os::raw::c_void,
func_name: *const ::std::os::raw::c_char,
var_name: *const ::std::os::raw::c_char,
fold_factor: ::std::os::raw::c_int,
loop_name: *const ::std::os::raw::c_char,
required_extent: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_error_requirement_failed(
user_context: *mut ::std::os::raw::c_void,
condition: *const ::std::os::raw::c_char,
message: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_error_specialize_fail(
user_context: *mut ::std::os::raw::c_void,
message: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_error_no_device_interface(
user_context: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_error_device_interface_no_device(
user_context: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_error_host_and_device_dirty(
user_context: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_error_buffer_is_null(
user_context: *mut ::std::os::raw::c_void,
routine: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_error_device_dirty_with_no_device_support(
user_context: *mut ::std::os::raw::c_void,
buffer_name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum halide_target_feature_t {
halide_target_feature_jit = 0,
halide_target_feature_debug = 1,
halide_target_feature_no_asserts = 2,
halide_target_feature_no_bounds_query = 3,
halide_target_feature_sse41 = 4,
halide_target_feature_avx = 5,
halide_target_feature_avx2 = 6,
halide_target_feature_fma = 7,
halide_target_feature_fma4 = 8,
halide_target_feature_f16c = 9,
halide_target_feature_armv7s = 10,
halide_target_feature_no_neon = 11,
halide_target_feature_vsx = 12,
halide_target_feature_power_arch_2_07 = 13,
halide_target_feature_cuda = 14,
halide_target_feature_cuda_capability30 = 15,
halide_target_feature_cuda_capability32 = 16,
halide_target_feature_cuda_capability35 = 17,
halide_target_feature_cuda_capability50 = 18,
halide_target_feature_cuda_capability61 = 19,
halide_target_feature_cuda_capability70 = 20,
halide_target_feature_cuda_capability75 = 21,
halide_target_feature_cuda_capability80 = 22,
halide_target_feature_opencl = 23,
halide_target_feature_cl_doubles = 24,
halide_target_feature_cl_atomic64 = 25,
halide_target_feature_openglcompute = 26,
halide_target_feature_user_context = 27,
halide_target_feature_matlab = 28,
halide_target_feature_profile = 29,
halide_target_feature_no_runtime = 30,
halide_target_feature_metal = 31,
halide_target_feature_c_plus_plus_mangling = 32,
halide_target_feature_large_buffers = 33,
halide_target_feature_hvx_128 = 34,
halide_target_feature_hvx_v62 = 35,
halide_target_feature_fuzz_float_stores = 36,
halide_target_feature_soft_float_abi = 37,
halide_target_feature_msan = 38,
halide_target_feature_avx512 = 39,
halide_target_feature_avx512_knl = 40,
halide_target_feature_avx512_skylake = 41,
halide_target_feature_avx512_cannonlake = 42,
halide_target_feature_avx512_sapphirerapids = 43,
halide_target_feature_hvx_use_shared_object = 44,
halide_target_feature_trace_loads = 45,
halide_target_feature_trace_stores = 46,
halide_target_feature_trace_realizations = 47,
halide_target_feature_trace_pipeline = 48,
halide_target_feature_hvx_v65 = 49,
halide_target_feature_hvx_v66 = 50,
halide_target_feature_cl_half = 51,
halide_target_feature_strict_float = 52,
halide_target_feature_tsan = 53,
halide_target_feature_asan = 54,
halide_target_feature_d3d12compute = 55,
halide_target_feature_check_unsafe_promises = 56,
halide_target_feature_hexagon_dma = 57,
halide_target_feature_embed_bitcode = 58,
halide_target_feature_enable_llvm_loop_opt = 59,
halide_target_feature_disable_llvm_loop_opt = 60,
halide_target_feature_wasm_simd128 = 61,
halide_target_feature_wasm_signext = 62,
halide_target_feature_wasm_sat_float_to_int = 63,
halide_target_feature_wasm_threads = 64,
halide_target_feature_wasm_bulk_memory = 65,
halide_target_feature_sve = 66,
halide_target_feature_sve2 = 67,
halide_target_feature_egl = 68,
halide_target_feature_arm_dot_prod = 69,
halide_llvm_large_code_model = 70,
halide_target_feature_rvv = 71,
halide_target_feature_armv81a = 72,
halide_target_feature_end = 73,
}
extern "C" {
pub fn halide_can_use_target_features(
count: ::std::os::raw::c_int,
features: *const u64,
) -> ::std::os::raw::c_int;
}
pub type halide_can_use_target_features_t = ::std::option::Option<
unsafe extern "C" fn(
count: ::std::os::raw::c_int,
features: *const u64,
) -> ::std::os::raw::c_int,
>;
extern "C" {
pub fn halide_set_custom_can_use_target_features(
arg1: halide_can_use_target_features_t,
) -> halide_can_use_target_features_t;
}
extern "C" {
pub fn halide_default_can_use_target_features(
count: ::std::os::raw::c_int,
features: *const u64,
) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct halide_dimension_t {
pub min: i32,
pub extent: i32,
pub stride: i32,
pub flags: u32,
}
#[test]
fn bindgen_test_layout_halide_dimension_t() {
assert_eq!(
::std::mem::size_of::<halide_dimension_t>(),
16usize,
concat!("Size of: ", stringify!(halide_dimension_t))
);
assert_eq!(
::std::mem::align_of::<halide_dimension_t>(),
4usize,
concat!("Alignment of ", stringify!(halide_dimension_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_dimension_t>())).min as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(halide_dimension_t),
"::",
stringify!(min)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_dimension_t>())).extent as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(halide_dimension_t),
"::",
stringify!(extent)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_dimension_t>())).stride as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(halide_dimension_t),
"::",
stringify!(stride)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_dimension_t>())).flags as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(halide_dimension_t),
"::",
stringify!(flags)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct halide_buffer_t {
pub device: u64,
pub device_interface: *const halide_device_interface_t,
pub host: *mut u8,
pub flags: u64,
pub type_: halide_type_t,
pub dimensions: i32,
pub dim: *mut halide_dimension_t,
pub padding: *mut ::std::os::raw::c_void,
}
#[test]
fn bindgen_test_layout_halide_buffer_t() {
assert_eq!(
::std::mem::size_of::<halide_buffer_t>(),
56usize,
concat!("Size of: ", stringify!(halide_buffer_t))
);
assert_eq!(
::std::mem::align_of::<halide_buffer_t>(),
8usize,
concat!("Alignment of ", stringify!(halide_buffer_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_buffer_t>())).device as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(halide_buffer_t),
"::",
stringify!(device)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_buffer_t>())).device_interface as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(halide_buffer_t),
"::",
stringify!(device_interface)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_buffer_t>())).host as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(halide_buffer_t),
"::",
stringify!(host)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_buffer_t>())).flags as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(halide_buffer_t),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_buffer_t>())).type_ as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(halide_buffer_t),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_buffer_t>())).dimensions as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(halide_buffer_t),
"::",
stringify!(dimensions)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_buffer_t>())).dim as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(halide_buffer_t),
"::",
stringify!(dim)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_buffer_t>())).padding as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(halide_buffer_t),
"::",
stringify!(padding)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct halide_scalar_value_t {
pub u: halide_scalar_value_t__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union halide_scalar_value_t__bindgen_ty_1 {
pub b: bool,
pub i8_: i8,
pub i16_: i16,
pub i32_: i32,
pub i64_: i64,
pub u8_: u8,
pub u16_: u16,
pub u32_: u32,
pub u64_: u64,
pub f32_: f32,
pub f64_: f64,
pub handle: *mut ::std::os::raw::c_void,
}
#[test]
fn bindgen_test_layout_halide_scalar_value_t__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<halide_scalar_value_t__bindgen_ty_1>(),
8usize,
concat!("Size of: ", stringify!(halide_scalar_value_t__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<halide_scalar_value_t__bindgen_ty_1>(),
8usize,
concat!(
"Alignment of ",
stringify!(halide_scalar_value_t__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_scalar_value_t__bindgen_ty_1>())).b as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(halide_scalar_value_t__bindgen_ty_1),
"::",
stringify!(b)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_scalar_value_t__bindgen_ty_1>())).i8_ as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(halide_scalar_value_t__bindgen_ty_1),
"::",
stringify!(i8_)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_scalar_value_t__bindgen_ty_1>())).i16_ as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(halide_scalar_value_t__bindgen_ty_1),
"::",
stringify!(i16_)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_scalar_value_t__bindgen_ty_1>())).i32_ as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(halide_scalar_value_t__bindgen_ty_1),
"::",
stringify!(i32_)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_scalar_value_t__bindgen_ty_1>())).i64_ as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(halide_scalar_value_t__bindgen_ty_1),
"::",
stringify!(i64_)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_scalar_value_t__bindgen_ty_1>())).u8_ as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(halide_scalar_value_t__bindgen_ty_1),
"::",
stringify!(u8_)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_scalar_value_t__bindgen_ty_1>())).u16_ as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(halide_scalar_value_t__bindgen_ty_1),
"::",
stringify!(u16_)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_scalar_value_t__bindgen_ty_1>())).u32_ as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(halide_scalar_value_t__bindgen_ty_1),
"::",
stringify!(u32_)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_scalar_value_t__bindgen_ty_1>())).u64_ as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(halide_scalar_value_t__bindgen_ty_1),
"::",
stringify!(u64_)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_scalar_value_t__bindgen_ty_1>())).f32_ as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(halide_scalar_value_t__bindgen_ty_1),
"::",
stringify!(f32_)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_scalar_value_t__bindgen_ty_1>())).f64_ as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(halide_scalar_value_t__bindgen_ty_1),
"::",
stringify!(f64_)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_scalar_value_t__bindgen_ty_1>())).handle as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(halide_scalar_value_t__bindgen_ty_1),
"::",
stringify!(handle)
)
);
}
#[test]
fn bindgen_test_layout_halide_scalar_value_t() {
assert_eq!(
::std::mem::size_of::<halide_scalar_value_t>(),
8usize,
concat!("Size of: ", stringify!(halide_scalar_value_t))
);
assert_eq!(
::std::mem::align_of::<halide_scalar_value_t>(),
8usize,
concat!("Alignment of ", stringify!(halide_scalar_value_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_scalar_value_t>())).u as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(halide_scalar_value_t),
"::",
stringify!(u)
)
);
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum halide_argument_kind_t {
halide_argument_kind_input_scalar = 0,
halide_argument_kind_input_buffer = 1,
halide_argument_kind_output_buffer = 2,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct halide_filter_argument_t {
pub name: *const ::std::os::raw::c_char,
pub kind: i32,
pub dimensions: i32,
pub type_: halide_type_t,
pub scalar_def: *const halide_scalar_value_t,
pub scalar_min: *const halide_scalar_value_t,
pub scalar_max: *const halide_scalar_value_t,
pub scalar_estimate: *const halide_scalar_value_t,
pub buffer_estimates: *const *const i64,
}
#[test]
fn bindgen_test_layout_halide_filter_argument_t() {
assert_eq!(
::std::mem::size_of::<halide_filter_argument_t>(),
64usize,
concat!("Size of: ", stringify!(halide_filter_argument_t))
);
assert_eq!(
::std::mem::align_of::<halide_filter_argument_t>(),
8usize,
concat!("Alignment of ", stringify!(halide_filter_argument_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_filter_argument_t>())).name as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(halide_filter_argument_t),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_filter_argument_t>())).kind as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(halide_filter_argument_t),
"::",
stringify!(kind)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_filter_argument_t>())).dimensions as *const _ as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(halide_filter_argument_t),
"::",
stringify!(dimensions)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_filter_argument_t>())).type_ as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(halide_filter_argument_t),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_filter_argument_t>())).scalar_def as *const _ as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(halide_filter_argument_t),
"::",
stringify!(scalar_def)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_filter_argument_t>())).scalar_min as *const _ as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(halide_filter_argument_t),
"::",
stringify!(scalar_min)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_filter_argument_t>())).scalar_max as *const _ as usize
},
40usize,
concat!(
"Offset of field: ",
stringify!(halide_filter_argument_t),
"::",
stringify!(scalar_max)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_filter_argument_t>())).scalar_estimate as *const _
as usize
},
48usize,
concat!(
"Offset of field: ",
stringify!(halide_filter_argument_t),
"::",
stringify!(scalar_estimate)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_filter_argument_t>())).buffer_estimates as *const _
as usize
},
56usize,
concat!(
"Offset of field: ",
stringify!(halide_filter_argument_t),
"::",
stringify!(buffer_estimates)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct halide_filter_metadata_t {
pub version: i32,
pub num_arguments: i32,
pub arguments: *const halide_filter_argument_t,
pub target: *const ::std::os::raw::c_char,
pub name: *const ::std::os::raw::c_char,
}
#[test]
fn bindgen_test_layout_halide_filter_metadata_t() {
assert_eq!(
::std::mem::size_of::<halide_filter_metadata_t>(),
32usize,
concat!("Size of: ", stringify!(halide_filter_metadata_t))
);
assert_eq!(
::std::mem::align_of::<halide_filter_metadata_t>(),
8usize,
concat!("Alignment of ", stringify!(halide_filter_metadata_t))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_filter_metadata_t>())).version as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(halide_filter_metadata_t),
"::",
stringify!(version)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_filter_metadata_t>())).num_arguments as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(halide_filter_metadata_t),
"::",
stringify!(num_arguments)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_filter_metadata_t>())).arguments as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(halide_filter_metadata_t),
"::",
stringify!(arguments)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_filter_metadata_t>())).target as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(halide_filter_metadata_t),
"::",
stringify!(target)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_filter_metadata_t>())).name as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(halide_filter_metadata_t),
"::",
stringify!(name)
)
);
}
extern "C" {
pub fn halide_register_argv_and_metadata(
filter_argv_call: ::std::option::Option<
unsafe extern "C" fn(arg1: *mut *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int,
>,
filter_metadata: *const halide_filter_metadata_t,
extra_key_value_pairs: *const *const ::std::os::raw::c_char,
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct halide_profiler_func_stats {
pub time: u64,
pub memory_current: u64,
pub memory_peak: u64,
pub memory_total: u64,
pub stack_peak: u64,
pub active_threads_numerator: u64,
pub active_threads_denominator: u64,
pub name: *const ::std::os::raw::c_char,
pub num_allocs: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_halide_profiler_func_stats() {
assert_eq!(
::std::mem::size_of::<halide_profiler_func_stats>(),
72usize,
concat!("Size of: ", stringify!(halide_profiler_func_stats))
);
assert_eq!(
::std::mem::align_of::<halide_profiler_func_stats>(),
8usize,
concat!("Alignment of ", stringify!(halide_profiler_func_stats))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_profiler_func_stats>())).time as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(halide_profiler_func_stats),
"::",
stringify!(time)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_profiler_func_stats>())).memory_current as *const _
as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(halide_profiler_func_stats),
"::",
stringify!(memory_current)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_profiler_func_stats>())).memory_peak as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(halide_profiler_func_stats),
"::",
stringify!(memory_peak)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_profiler_func_stats>())).memory_total as *const _ as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(halide_profiler_func_stats),
"::",
stringify!(memory_total)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_profiler_func_stats>())).stack_peak as *const _ as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(halide_profiler_func_stats),
"::",
stringify!(stack_peak)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_profiler_func_stats>())).active_threads_numerator
as *const _ as usize
},
40usize,
concat!(
"Offset of field: ",
stringify!(halide_profiler_func_stats),
"::",
stringify!(active_threads_numerator)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_profiler_func_stats>())).active_threads_denominator
as *const _ as usize
},
48usize,
concat!(
"Offset of field: ",
stringify!(halide_profiler_func_stats),
"::",
stringify!(active_threads_denominator)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_profiler_func_stats>())).name as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(halide_profiler_func_stats),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_profiler_func_stats>())).num_allocs as *const _ as usize
},
64usize,
concat!(
"Offset of field: ",
stringify!(halide_profiler_func_stats),
"::",
stringify!(num_allocs)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct halide_profiler_pipeline_stats {
pub time: u64,
pub memory_current: u64,
pub memory_peak: u64,
pub memory_total: u64,
pub active_threads_numerator: u64,
pub active_threads_denominator: u64,
pub name: *const ::std::os::raw::c_char,
pub funcs: *mut halide_profiler_func_stats,
pub next: *mut ::std::os::raw::c_void,
pub num_funcs: ::std::os::raw::c_int,
pub first_func_id: ::std::os::raw::c_int,
pub runs: ::std::os::raw::c_int,
pub samples: ::std::os::raw::c_int,
pub num_allocs: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_halide_profiler_pipeline_stats() {
assert_eq!(
::std::mem::size_of::<halide_profiler_pipeline_stats>(),
96usize,
concat!("Size of: ", stringify!(halide_profiler_pipeline_stats))
);
assert_eq!(
::std::mem::align_of::<halide_profiler_pipeline_stats>(),
8usize,
concat!("Alignment of ", stringify!(halide_profiler_pipeline_stats))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_profiler_pipeline_stats>())).time as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(halide_profiler_pipeline_stats),
"::",
stringify!(time)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_profiler_pipeline_stats>())).memory_current as *const _
as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(halide_profiler_pipeline_stats),
"::",
stringify!(memory_current)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_profiler_pipeline_stats>())).memory_peak as *const _
as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(halide_profiler_pipeline_stats),
"::",
stringify!(memory_peak)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_profiler_pipeline_stats>())).memory_total as *const _
as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(halide_profiler_pipeline_stats),
"::",
stringify!(memory_total)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_profiler_pipeline_stats>())).active_threads_numerator
as *const _ as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(halide_profiler_pipeline_stats),
"::",
stringify!(active_threads_numerator)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_profiler_pipeline_stats>())).active_threads_denominator
as *const _ as usize
},
40usize,
concat!(
"Offset of field: ",
stringify!(halide_profiler_pipeline_stats),
"::",
stringify!(active_threads_denominator)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_profiler_pipeline_stats>())).name as *const _ as usize
},
48usize,
concat!(
"Offset of field: ",
stringify!(halide_profiler_pipeline_stats),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_profiler_pipeline_stats>())).funcs as *const _ as usize
},
56usize,
concat!(
"Offset of field: ",
stringify!(halide_profiler_pipeline_stats),
"::",
stringify!(funcs)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_profiler_pipeline_stats>())).next as *const _ as usize
},
64usize,
concat!(
"Offset of field: ",
stringify!(halide_profiler_pipeline_stats),
"::",
stringify!(next)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_profiler_pipeline_stats>())).num_funcs as *const _
as usize
},
72usize,
concat!(
"Offset of field: ",
stringify!(halide_profiler_pipeline_stats),
"::",
stringify!(num_funcs)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_profiler_pipeline_stats>())).first_func_id as *const _
as usize
},
76usize,
concat!(
"Offset of field: ",
stringify!(halide_profiler_pipeline_stats),
"::",
stringify!(first_func_id)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_profiler_pipeline_stats>())).runs as *const _ as usize
},
80usize,
concat!(
"Offset of field: ",
stringify!(halide_profiler_pipeline_stats),
"::",
stringify!(runs)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_profiler_pipeline_stats>())).samples as *const _ as usize
},
84usize,
concat!(
"Offset of field: ",
stringify!(halide_profiler_pipeline_stats),
"::",
stringify!(samples)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_profiler_pipeline_stats>())).num_allocs as *const _
as usize
},
88usize,
concat!(
"Offset of field: ",
stringify!(halide_profiler_pipeline_stats),
"::",
stringify!(num_allocs)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct halide_profiler_state {
pub lock: halide_mutex,
pub sleep_time: ::std::os::raw::c_int,
pub first_free_id: ::std::os::raw::c_int,
pub current_func: ::std::os::raw::c_int,
pub active_threads: ::std::os::raw::c_int,
pub pipelines: *mut halide_profiler_pipeline_stats,
pub get_remote_profiler_state: ::std::option::Option<
unsafe extern "C" fn(
func: *mut ::std::os::raw::c_int,
active_workers: *mut ::std::os::raw::c_int,
),
>,
pub sampling_thread: *mut halide_thread,
}
#[test]
fn bindgen_test_layout_halide_profiler_state() {
assert_eq!(
::std::mem::size_of::<halide_profiler_state>(),
48usize,
concat!("Size of: ", stringify!(halide_profiler_state))
);
assert_eq!(
::std::mem::align_of::<halide_profiler_state>(),
8usize,
concat!("Alignment of ", stringify!(halide_profiler_state))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_profiler_state>())).lock as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(halide_profiler_state),
"::",
stringify!(lock)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_profiler_state>())).sleep_time as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(halide_profiler_state),
"::",
stringify!(sleep_time)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_profiler_state>())).first_free_id as *const _ as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(halide_profiler_state),
"::",
stringify!(first_free_id)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_profiler_state>())).current_func as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(halide_profiler_state),
"::",
stringify!(current_func)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_profiler_state>())).active_threads as *const _ as usize
},
20usize,
concat!(
"Offset of field: ",
stringify!(halide_profiler_state),
"::",
stringify!(active_threads)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<halide_profiler_state>())).pipelines as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(halide_profiler_state),
"::",
stringify!(pipelines)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_profiler_state>())).get_remote_profiler_state as *const _
as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(halide_profiler_state),
"::",
stringify!(get_remote_profiler_state)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_profiler_state>())).sampling_thread as *const _ as usize
},
40usize,
concat!(
"Offset of field: ",
stringify!(halide_profiler_state),
"::",
stringify!(sampling_thread)
)
);
}
extern "C" {
pub fn halide_profiler_get_state() -> *mut halide_profiler_state;
}
extern "C" {
pub fn halide_profiler_get_pipeline_state(
pipeline_name: *const ::std::os::raw::c_char,
) -> *mut halide_profiler_pipeline_stats;
}
extern "C" {
pub fn halide_profiler_reset();
}
extern "C" {
pub fn halide_profiler_shutdown();
}
extern "C" {
pub fn halide_profiler_report(user_context: *mut ::std::os::raw::c_void);
}
extern "C" {
pub fn halide_float16_bits_to_float(arg1: u16) -> f32;
}
extern "C" {
pub fn halide_float16_bits_to_double(arg1: u16) -> f64;
}
extern "C" {
pub fn halide_reuse_device_allocations(
user_context: *mut ::std::os::raw::c_void,
arg1: bool,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn halide_can_reuse_device_allocations(user_context: *mut ::std::os::raw::c_void) -> bool;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct halide_device_allocation_pool {
pub release_unused: ::std::option::Option<
unsafe extern "C" fn(user_context: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int,
>,
pub next: *mut halide_device_allocation_pool,
}
#[test]
fn bindgen_test_layout_halide_device_allocation_pool() {
assert_eq!(
::std::mem::size_of::<halide_device_allocation_pool>(),
16usize,
concat!("Size of: ", stringify!(halide_device_allocation_pool))
);
assert_eq!(
::std::mem::align_of::<halide_device_allocation_pool>(),
8usize,
concat!("Alignment of ", stringify!(halide_device_allocation_pool))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_device_allocation_pool>())).release_unused as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(halide_device_allocation_pool),
"::",
stringify!(release_unused)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<halide_device_allocation_pool>())).next as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(halide_device_allocation_pool),
"::",
stringify!(next)
)
);
}
extern "C" {
pub fn halide_register_device_allocation_pool(arg1: *mut halide_device_allocation_pool);
}