#opencl #computation #gpu

open-cl-low-level

OpenCL low-level bindings

3 unstable releases

0.2.1 Mar 1, 2020
0.2.0 Mar 1, 2020
0.1.0 Feb 17, 2020

#48 in #opencl

29 downloads per month
Used in 2 crates

MIT license

1MB
30K SLoC

open_cl_rust

A safe, fast, no nonsense Rust lib for interacting with OpenCL.

NOTE: As of right now this library is very alpha software. Use at your own risk!

NOTE: As of right now this library has only been used on my Macbook. Linux and Windows have not been tried.

C FFI Philosophy

  • All interaction with a raw pointer is unsafe.

  • All functions that take a raw pointer as an arg are unsafe.

  • All functions that return a raw pointer are unsafe.

  • A function that is not marked unsafe cannot return a raw pointer.

  • Only allow access to raw pointers via functions marked as unsafe.

Learning Resources

Notes

  • NOTE: OpenCL 1.0 is not thread safe. We will not support it.

  • NOTE: Investigate OpenCL restrictions around numbers and safety of num crate for OpenCL.

  • NOTE: Implement Sampler.

  • NOTE: Implement UserEvent for (clCreateUserEvent, clSetUserEventStatus)

  • NOTE: Implement Markers

  • NOTE: Implement Barriers

Dependencies

~4–15MB
~172K SLoC