pub struct Group {
pub total: (i32, i32, i32),
pub fcn: extern "C" fn(_: *mut c_void, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32),
pub data: AtomicPtr<c_void>,
/* private fields */
}
Expand description
A group of tasks spawned by a call to launch
in ISPC
Fields§
§total: (i32, i32, i32)
Total number of tasks scheduled in this group
fcn: extern "C" fn(_: *mut c_void, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32)
Function to run for this task
data: AtomicPtr<c_void>
Data pointer to user params to pass to the function
Implementations§
source§impl Group
impl Group
sourcepub fn new(
total: (i32, i32, i32),
data: AtomicPtr<c_void>,
fcn: extern "C" fn(_: *mut c_void, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32)
) -> Group
pub fn new( total: (i32, i32, i32), data: AtomicPtr<c_void>, fcn: extern "C" fn(_: *mut c_void, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32) ) -> Group
Create a new task group for execution of the function
sourcepub fn chunks(&self, chunk_size: usize) -> GroupChunks<'_> ⓘ
pub fn chunks(&self, chunk_size: usize) -> GroupChunks<'_> ⓘ
Get an iterator over chunk_size
chunks of tasks to be executed for this group
sourcepub fn is_finished(&self) -> bool
pub fn is_finished(&self) -> bool
Check if all tasks for this group have been completed
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Group
impl Send for Group
impl Sync for Group
impl Unpin for Group
impl UnwindSafe for Group
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