custos
A minimal OpenCL, CUDA and host CPU array manipulation engine / framework. It provides the tools needed to execute array operations with the CPU, as well as with CUDA and OpenCL devices. This library demonstrates how the operations can be implemented for the compute devices: custos-math
Installation
Add "custos" as a dependency:
[]
= "0.1.5"
# to disable the default features (cuda, opencl) and use an own set of features:
#custos = {version = "0.1.5", default-features=false, features=["opencl", "safe"]}
Available features:
- "opencl" ... adds OpenCL features, where the CLDevice (feature) is the most important one.
- "cuda" ... adds CUDA features. (CudaDevice)
- "safe" ... non-copy matrix and buffer. (safer)
Examples
Using the host CPU as the compute device:
use ;
Using an OpenCL device as the compute device:
use ;
Using a CUDA device as the compute device:
use ;