[][src]Struct jpegxl_rs::ParallelRunner

pub struct ParallelRunner { /* fields omitted */ }

Example implementation of a multithread runner

Implementations

impl ParallelRunner[src]

pub fn new() -> Self[src]

Create a multithread parallel runner with one thread per core

pub fn new_with_threads(num_threads: usize) -> Self[src]

Create a multithread parallel runner with specific thread number

Trait Implementations

impl JpegXLParallelRunner for ParallelRunner[src]

#[no_mangle]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
) -> JpegxlParallelRetCode
[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.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.