- class ParFuture iv p => ParAccelerate iv p where
- unsafeHybridVector :: (Storable a, Elt a, BlockPtrs (EltRepr a) ~ ((), Ptr a), ParAccelerate iv p) => (p (Vector a), Acc (Array DIM1 a)) -> p (iv (Vector a))
- unsafeHybridIArray :: (EltRepr ix ~ EltRepr sh, IArray a e, Ix ix, Shape sh, Elt ix, Elt e, ParAccelerate iv p) => (p (a ix e), Acc (Array sh e)) -> p (iv (a ix e))
A class containing Accelerate-specific
Run an Accelerate computation and wait for its result. In the
context of a
Par computation this can result in better
performance than using an Accelerate-provided
directly, because this version enables the CPU work scheduler to do
other work while waiting for the GPU computation to complete.
Moreover, when configured with a high-performance CPU Accelerate backend in the future this routine can enable automatic CPU/GPU work partitioning.
runAcc but runs the Accelerate computation asynchronously.
Spawn an computation which may execute either on the CPU or GPU based on runtime load. The CPU and GPU implementations may employ completely different algorithms; this is an UNSAFE operation which will not guarantee determinism unless the user ensures that the result of both computations is always equivalent.
A common application of
unsafeHybrid is the following:
Example applications of
An example application of
unsafeHybrid for vectors.