Registry / other / ocl
library0.19.7rscratesunverified

OpenCL bindings and interfaces for Rust.

# Cargo.toml [dependencies] ocl = "0.19.7"
INSTALL
IMPORT
SIG · OCL
O
ocl
otherrustv0.19.7
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ProQue
use ocl::ProQue;

Build an OpenCL program and queue.

use ocl::ProQue; fn main() { let pro_que = ProQue::builder() .src("__kernel void add(__global float* a, float b) { a[get_global_id(0)] += b; }") .dims(1 << 20) .build().unwrap(); println!("OpenCL program built"); }
Debug
Known issues
gotchaRequires OpenCL runtime and drivers installed on the system.
fix
Install appropriate OpenCL drivers for your GPU/CPU (e.g., Intel, AMD, NVIDIA).
affects: >=0.19.0
Upgrade
Version history
0.19.7latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
ocl — cargo add ocl · libregistry