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
sourceimpl 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<'_>ⓘNotable traits for GroupChunks<'a>impl<'a> Iterator for GroupChunks<'a> type Item = Chunk<'a>;
pub fn chunks(&self, chunk_size: usize) -> GroupChunks<'_>ⓘNotable traits for GroupChunks<'a>impl<'a> Iterator for GroupChunks<'a> type Item = Chunk<'a>;
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
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