pub type JxlParallelRunInit = Option<unsafe extern "C" fn(jpegxl_opaque: *mut c_void, num_threads: usize) -> JxlParallelRetCode>;Expand description
Parallel run initialization callback. See @ref JxlParallelRunner for details.
This function MUST be called by the JxlParallelRunner only once, on the same thread that called @ref JxlParallelRunner, before any parallel execution. The purpose of this call is to provide the maximum number of threads that the @ref JxlParallelRunner will use, which can be used by JPEG XL to allocate per-thread storage if needed.
@param jpegxl_opaque the @p jpegxl_opaque handle provided to @ref JxlParallelRunner() must be passed here. @param num_threads the maximum number of threads. This value must be positive. @return 0 if the initialization process was successful. @return an error code if there was an error, which should be returned by @ref JxlParallelRunner().
Aliased Type§
pub enum JxlParallelRunInit {
None,
Some(unsafe extern "C" fn(*mut c_void, usize) -> i32),
}