Struct ispc::exec::Parallel

source ·
pub struct Parallel { /* private fields */ }
Expand description

A multithreaded execution environment for the tasks launched in ISPC

Implementations§

source§

impl Parallel

source

pub fn new() -> Arc<Parallel>

Create a parallel task execution environment that will use num_cpus threads to run tasks.

source

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

source§

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
source§

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
source§

unsafe fn sync(&self, handle: *mut c_void)

Synchronize an execution context with the tasks it’s launched. Use handle to determine the task context that’s being synchronized. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.