[−][src]Struct jpegxl_rs::ParallelRunner
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]
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
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
impl RefUnwindSafe for ParallelRunner
impl Send for ParallelRunner
impl Sync for ParallelRunner
impl Unpin for ParallelRunner
impl UnwindSafe for ParallelRunner
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,