Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 777 Bytes

README.md

File metadata and controls

27 lines (19 loc) · 777 Bytes

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.
    ...
}