Struct poc_kokkos_rs::routines::parameters::ExecutionPolicy
source · pub struct ExecutionPolicy<const N: usize> {
pub space: ExecutionSpace,
pub range: RangePolicy<N>,
pub schedule: Schedule,
}
Expand description
Execution Policy enum. See Kokkos documentation for explanation on their model.
Example
use poc_kokkos_rs::routines::parameters::{
ExecutionPolicy,
ExecutionSpace,
RangePolicy,
Schedule
};
let length: usize = 8;
let execp = ExecutionPolicy::<1> {
space: ExecutionSpace::DeviceCPU, // will try to parallelize code on CPU
range: RangePolicy::RangePolicy(0..length), // equivalent to "for i in 0..length"
schedule: Schedule::Static, // static division of workload
};
Fields§
§space: ExecutionSpace
Execution space targetted by the dispatch.
range: RangePolicy<N>
Iteration pattern used to handle the workload.
schedule: Schedule
Scheduling policy for the dispatch. CURRENTLY IGNORED.
Trait Implementations§
source§impl<const N: usize> Clone for ExecutionPolicy<N>
impl<const N: usize> Clone for ExecutionPolicy<N>
source§fn clone(&self) -> ExecutionPolicy<N>
fn clone(&self) -> ExecutionPolicy<N>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<const N: usize> RefUnwindSafe for ExecutionPolicy<N>
impl<const N: usize> Send for ExecutionPolicy<N>
impl<const N: usize> Sync for ExecutionPolicy<N>
impl<const N: usize> Unpin for ExecutionPolicy<N>
impl<const N: usize> UnwindSafe for ExecutionPolicy<N>
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