Git Product home page Git Product logo

opencl-sys-rs's Introduction

crates.io docs.io OpenCL 3.0 License Rust

OpenCL C FFI bindings for the Rust programming language.

Description

Rust FFI Bindings to the Khronos OpenCL C language headers, see the OpenCL Resource Guide.

OpenCL Packages
OpenCL Packages

The API for OpenCL versions and extensions are controlled by Rust features such as "CL_VERSION_2_0" and "cl_khr_gl_sharing".
The default features are "CL_VERSION_1_1" and "CL_VERSION_1_2".

Rust deprecation warnings are given for OpenCL API functions that are deprecated by an enabled OpenCL version e.g., clCreateCommandQueue is deprecated whenever "CL_VERSION_2_0" (or above) is enabled.

The Rust FFI files attempt to match the format and layout of the original C source files instead of bindgen output files to ease maintenance.

bindgen ../OpenCL-Headers/CL/opencl.h -o opencl.rs -- -I ../OpenCL-Headers/CL

The library is declared no_std.

Use

OpenCL requires that an appropriate OpenCL hardware driver(s) and an OpenCL Installable Client Driver (ICD) are installed.
OpenCL GPU hardware driver(s) are installed with graphics drivers by the main manufacturers: Nvidia, AMD and Intel.
However, an OpenCL ICD must usually be installed manually by:

Note: you do not need to install an OpenCL ICD from the same manufacturer as your hardware.
In general the more up to date the OpenCL ICD, the better.

Contribution

If you want to contribute through code or documentation, the Contributing guide is the best place to start.
If you have any questions, please feel free to ask. Just please abide by our Code of Conduct.

License

Licensed under the Apache License, Version 2.0, as per Khronos Group OpenCL.
You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.

OpenCL and the OpenCL logo are trademarks of Apple Inc. used under license by Khronos.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.