[][src]Trait jpegxl_rs::JXLParallelRunner

pub trait JXLParallelRunner {
    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; pub fn as_opaque_ptr(&mut self) -> *mut c_void { ... }
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
, { ... } }

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]

FFI runner function. Check jpeg-xl header files for more explainations.

Loading content...

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]

Helper function to get runner function

Loading content...

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]

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.

impl JXLParallelRunner for ThreadsRunner[src]

Loading content...