pub struct Parallel { /* private fields */ }
Expand description
A multithreaded execution environment for the tasks launched in ISPC
Implementations§
source§impl 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§
source§impl TaskSystem for Parallel
impl TaskSystem for Parallel
source§unsafe 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 moresource§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
)
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more