1 unstable release

0.1.0 Feb 17, 2020

#31 in #opencl

41 downloads per month
Used in 3 crates (2 directly)

MIT license

715KB
25K 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

~0–1.9MB
~37K SLoC