pub struct Parallel { /* private fields */ }
Expand description
A multithreaded execution environment for the tasks launched in ISPC
Implementations
sourceimpl Parallel
impl Parallel
sourcepub fn new() -> Arc<Parallel>
pub fn new() -> Arc<Parallel>
Create a parallel task execution environment that will use num_cpus
threads
to run tasks.
sourcepub fn oversubscribed(oversubscribe: f32) -> Arc<Parallel>
pub fn oversubscribed(oversubscribe: f32) -> Arc<Parallel>
Create an oversubscribued parallel task execution environment that will use
oversubscribe * num_cpus
threads to run tasks.
Trait Implementations
sourceimpl TaskSystem for Parallel
impl TaskSystem for Parallel
sourceunsafe fn alloc(
&self,
handle_ptr: *mut *mut c_void,
size: i64,
align: i32
) -> *mut c_void
unsafe fn alloc(
&self,
handle_ptr: *mut *mut c_void,
size: i64,
align: i32
) -> *mut c_void
Alloc is called when memory must be allocated to store parameters to pass to a task
and must return a pointer to an allocation of size
bytes aligned to align
. Read more
sourceunsafe fn launch(
&self,
handle_ptr: *mut *mut c_void,
f: extern "C" fn(*mut c_void, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32),
data: *mut c_void,
count0: i32,
count1: i32,
count2: i32
)
unsafe fn launch(
&self,
handle_ptr: *mut *mut c_void,
f: extern "C" fn(*mut c_void, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32),
data: *mut c_void,
count0: i32,
count1: i32,
count2: i32
)
Launch is called when a new group of tasks is being launched and should schedule them to be executed in some way. Read more
Auto Trait Implementations
impl RefUnwindSafe for Parallel
impl Send for Parallel
impl Sync for Parallel
impl Unpin for Parallel
impl UnwindSafe for Parallel
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more