Description

A dynamic binding to the OpenCL library.

Package Information

Version3.0.0 (2017-Feb-24)
Homepage https://github.com/DerelictOrg/DerelictCL
Repository https://github.com/DerelictOrg/DerelictCL
LicenseBoost
AuthorsGerbrand Kamphuis (vuaru), Guillaume Piolat (p0nce)
Registered byponce
Dependencies

derelict-util

Installation

To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

Readme

DerelictOpenCL

A dynamic binding to OpenCL for the D Programming Language.

Please see the pages Building and Linking Derelict and Using Derelict, or information on how to build DerelictCL and load the OpenCL library at run time. In the meantime, here's some sample code.

import derelict.opencl.cl;

void main() {
    // Load the OpenCL library.
    DerelictCL.load();

    // Query platforms and devices
    ...

    // Reload the OpenCL library.
    DerelictCL.reload(<chosen_version>);

    // Load OpenCL official extensions.
    DerelictCL.loadEXT(<chosen_platform>);

    // Now OpenCL functions can be called.
    ...
}

Available versions

3.0.0 2.0.0 1.2.3 1.2.2 ~master