[−][src]Struct ocl_stream::executor::OCLStreamExecutor
Stream executor for OpenCL Programs
Implementations
impl OCLStreamExecutor[src]
pub fn new(pro_que: ProQue) -> Self[src]
Creates a new OpenCL Stream executor
use ocl::ProQue; use ocl_stream::OCLStreamExecutor; let pro_que = ProQue::builder().src("__kernel void bench_int() {}").build().unwrap(); let executor = OCLStreamExecutor::new(pro_que);
pub fn set_concurrency(&mut self, mut num_tasks: usize)[src]
Sets how many threads should be used to schedule kernels on the gpu. Using multiple threads reduces the idle time of the gpu. While one kernel is running, the next one can be prepared in a different thread. A value of 0 means that the number of cpu cores should be used.
pub fn set_pool(&mut self, pool: ScheduledThreadPool)[src]
Replaces the used pool with a new one
pub fn execute_bounded<F, T>(&self, size: usize, func: F) -> OCLStream<T> where
F: Fn(ExecutorContext<T>) -> OCLStreamResult<()> + Send + Sync + 'static,
T: Send + Sync + 'static, [src]
F: Fn(ExecutorContext<T>) -> OCLStreamResult<()> + Send + Sync + 'static,
T: Send + Sync + 'static,
Executes a closure in the ocl context with a bounded channel
pub fn execute_unbounded<F, T>(&self, func: F) -> OCLStream<T> where
F: Fn(ExecutorContext<T>) -> OCLStreamResult<()> + Send + Sync + 'static,
T: Send + Sync + 'static, [src]
F: Fn(ExecutorContext<T>) -> OCLStreamResult<()> + Send + Sync + 'static,
T: Send + Sync + 'static,
Executes a closure in the ocl context with an unbounded channel for streaming
Trait Implementations
impl Clone for OCLStreamExecutor[src]
pub fn clone(&self) -> OCLStreamExecutor[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
Auto Trait Implementations
impl !RefUnwindSafe for OCLStreamExecutor[src]
impl Send for OCLStreamExecutor[src]
impl Sync for OCLStreamExecutor[src]
impl Unpin for OCLStreamExecutor[src]
impl !UnwindSafe for OCLStreamExecutor[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,