All Projects → cogciprocate → Ocl

cogciprocate / Ocl

Licence: other
OpenCL for Rust

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Ocl

Parenchyma
An extensible HPC framework for CUDA, OpenCL and native CPU.
Stars: ✭ 71 (-84.33%)
Mutual labels:  nvidia, intel, amd, gpgpu
Ilgpu
ILGPU JIT Compiler for high-performance .Net GPU programs
Stars: ✭ 374 (-17.44%)
Mutual labels:  nvidia, intel, amd, gpgpu
Coriander
Build NVIDIA® CUDA™ code for OpenCL™ 1.2 devices
Stars: ✭ 665 (+46.8%)
Mutual labels:  nvidia, intel, amd
Inventory Hunter
⚡️ Get notified as soon as your next CPU, GPU, or game console is in stock
Stars: ✭ 778 (+71.74%)
Mutual labels:  nvidia, intel, amd
Autodesk-Fusion-360-for-Linux
This is a project, where I give you a way to use Autodesk Fusion 360 on Linux!
Stars: ✭ 810 (+78.81%)
Mutual labels:  amd, intel, nvidia
Pyopencl
OpenCL integration for Python, plus shiny features
Stars: ✭ 790 (+74.39%)
Mutual labels:  nvidia, amd, scientific-computing
Staxrip
StaxRip is a video encoding app for Windows with a unrivaled feature set and usability.
Stars: ✭ 629 (+38.85%)
Mutual labels:  nvidia, intel, amd
gpu-passthrough
A GPU passthrough tutorial using libvirt and KVM on GNU/Linux
Stars: ✭ 57 (-87.42%)
Mutual labels:  amd, intel, nvidia
Anakin
High performance Cross-platform Inference-engine, you could run Anakin on x86-cpu,arm, nv-gpu, amd-gpu,bitmain and cambricon devices.
Stars: ✭ 488 (+7.73%)
Mutual labels:  nvidia, intel, amd
Waifu2x Ncnn Vulkan
waifu2x converter ncnn version, runs fast on intel / amd / nvidia GPU with vulkan
Stars: ✭ 1,258 (+177.7%)
Mutual labels:  nvidia, intel, amd
Shadowreplay Linux
Shadowplay's Replay Feature On Linux For Nvidia, AMD and Intel
Stars: ✭ 79 (-82.56%)
Mutual labels:  nvidia, intel, amd
Realsr Ncnn Vulkan
RealSR super resolution implemented with ncnn library
Stars: ✭ 357 (-21.19%)
Mutual labels:  nvidia, intel, amd
darknet
Darknet on OpenCL Convolutional Neural Networks on OpenCL on Intel & NVidia & AMD & Mali GPUs for macOS & GNU/Linux
Stars: ✭ 160 (-64.68%)
Mutual labels:  amd, intel, nvidia
Srmd Ncnn Vulkan
SRMD super resolution implemented with ncnn library
Stars: ✭ 186 (-58.94%)
Mutual labels:  nvidia, intel, amd
nix-install-vendor-gl
Ensure that a system-compatible OpenGL driver is available for `nix-shell`-encapsulated programs.
Stars: ✭ 22 (-95.14%)
Mutual labels:  amd, intel, nvidia
ddcpuid
🔬 dd's x86 CPU Identification tool
Stars: ✭ 21 (-95.36%)
Mutual labels:  amd, intel
gpufetch
Simple yet fancy GPU architecture fetching tool
Stars: ✭ 66 (-85.43%)
Mutual labels:  intel, nvidia
JetScan
JetScan : GPU accelerated portable RGB-D reconstruction system
Stars: ✭ 77 (-83%)
Mutual labels:  intel, nvidia
Nvidia-Intel
Setup Nvidia & Intel services
Stars: ✭ 21 (-95.36%)
Mutual labels:  intel, nvidia
hashcatbenchmark
Benchmark in Hashcat for diferents GPU's
Stars: ✭ 19 (-95.81%)
Mutual labels:  amd, nvidia

ocl

Documentation | Change Log

Supported platforms Linux Build Status

Pure OpenCL™ bindings and interfaces for Rust.

Goals

To provide:

  • A simple and intuitive interface to OpenCL devices
  • The full functionality and power of the OpenCL API
  • An absolute minimum of boilerplate
  • Zero or virtually zero performance overhead
  • Thread-safe and automatic management of API pointers and resources

Usage

Ensure that an OpenCL library is installed for your platform and that clinfo or some other diagnostic command will run. Add the following to your project's Cargo.toml:

[dependencies]
ocl = "0.19"

And add the following to your crate root (lib.rs or main.rs):

extern crate ocl;

Example

From examples/trivial.rs:

extern crate ocl;
use ocl::ProQue;

fn trivial() -> ocl::Result<()> {
    let src = r#"
        __kernel void add(__global float* buffer, float scalar) {
            buffer[get_global_id(0)] += scalar;
        }
    "#;

    let pro_que = ProQue::builder()
        .src(src)
        .dims(1 << 20)
        .build()?;

    let buffer = pro_que.create_buffer::<f32>()?;

    let kernel = pro_que.kernel_builder("add")
        .arg(&buffer)
        .arg(10.0f32)
        .build()?;

    unsafe { kernel.enq()?; }

    let mut vec = vec![0.0f32; buffer.len()];
    buffer.read(&mut vec).enq()?;

    println!("The value at index [{}] is now '{}'!", 200007, vec[200007]);
    Ok(())
}

See the the remainder of examples/trivial.rs for more information about how this library leverages Rust's zero-cost abstractions to provide the full power and performance of the C API in a simple package.

Recent Changes

Introduction to OpenCL

For a quick but thorough primer on the basics of OpenCL, please see Matthew Scarpino's excellent article, 'A Gentle Introduction to OpenCL' at drdobbs.com (his book is great too).

Diving Deeper

Already familiar with the standard OpenCL core API? See the ocl-core crate for access to the complete feature set in the conventional API style with Rust's safety and convenience.

Version Support

OpenCL versions 1.1 and above are supported. OpenCL version 1.0 is not supported due to its inherent thread unsafety.

Vulkan™ and the Future

The OpenCL API already posesses all of the new attributes of the Vulkan API such as low-overhead, high performance, and unfettered hardware access. For all practical purposes, Vulkan is simply a graphics-focused superset of OpenCL's features (sorta kinda). OpenCL 2.1+ and Vulkan kernels/shaders now both compile into SPIR-V making the device side of things the same. I wouldn't be suprised if most driver vendors implement the two host APIs identically.

In the future it's possible the two may completely merge (or that Vulkan will absorb OpenCL). Whatever happens, nothing will change as far as the front end of this library is concerned. This library will maintain its focus on the compute side of things. For the graphics side, see the voodoo library.

License

Licensed under either of:

at your option.

Contribution

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 dual licensed as above, without any additional terms or conditions.


“OpenCL and the OpenCL logo are trademarks of Apple Inc. used by permission by Khronos.”
“Vulkan and the Vulkan logo are trademarks of the Khronos Group Inc.”

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].