[−][src]Trait jpegxl_rs::JXLParallelRunner
JPEG XL Parallel Runner
Required methods
pub unsafe extern "C" fn runner_func(
runner_opaque: *mut c_void,
jpegxl_opaque: *mut c_void,
init_func: Option<unsafe extern "C" fn(_: *mut c_void, _: u64) -> i32>,
run_func: Option<unsafe extern "C" fn(_: *mut c_void, _: u32, _: u64)>,
start_range: u32,
end_range: u32
) -> JxlParallelRetCode
[src]
runner_opaque: *mut c_void,
jpegxl_opaque: *mut c_void,
init_func: Option<unsafe extern "C" fn(_: *mut c_void, _: u64) -> i32>,
run_func: Option<unsafe extern "C" fn(_: *mut c_void, _: u32, _: u64)>,
start_range: u32,
end_range: u32
) -> JxlParallelRetCode
FFI runner function.
Check jpeg-xl
header files for more explainations.
Provided methods
pub fn as_opaque_ptr(&mut self) -> *mut c_void
[src]
Helper function to get an opaque pointer
pub fn runner(
&self
) -> unsafe extern "C" fn(runner_opaque: *mut c_void, jpegxl_opaque: *mut c_void, init_func: Option<unsafe extern "C" fn(_: *mut c_void, _: u64) -> i32>, run_func: Option<unsafe extern "C" fn(_: *mut c_void, _: u32, _: u64)>, start_range: u32, end_range: u32) -> JxlParallelRetCode where
Self: Sized,
[src]
&self
) -> unsafe extern "C" fn(runner_opaque: *mut c_void, jpegxl_opaque: *mut c_void, init_func: Option<unsafe extern "C" fn(_: *mut c_void, _: u64) -> i32>, run_func: Option<unsafe extern "C" fn(_: *mut c_void, _: u32, _: u64)>, start_range: u32, end_range: u32) -> JxlParallelRetCode where
Self: Sized,
Helper function to get runner function
Implementors
impl JXLParallelRunner for ParallelRunner
[src]
#[no_mangle]pub unsafe extern "C" fn runner_func(
runner_opaque: *mut c_void,
jpegxl_opaque: *mut c_void,
init_func: Option<unsafe extern "C" fn(_: *mut c_void, _: u64) -> i32>,
run_func: Option<unsafe extern "C" fn(_: *mut c_void, _: u32, _: u64)>,
start_range: u32,
end_range: u32
) -> JxlParallelRetCode
[src]
runner_opaque: *mut c_void,
jpegxl_opaque: *mut c_void,
init_func: Option<unsafe extern "C" fn(_: *mut c_void, _: u64) -> i32>,
run_func: Option<unsafe extern "C" fn(_: *mut c_void, _: u32, _: u64)>,
start_range: u32,
end_range: u32
) -> JxlParallelRetCode
Divide the task into chunks, then spawn a thread for each chunk. Since the library explicitly states that there is no communications between each call, we can safely ignore synchronizations.