GithubHelp home page GithubHelp logo

gerhobbelt / opencl-sdk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from khronosgroup/opencl-sdk

0.0 0.0 0.0 479 KB

OpenCL SDK

License: Apache License 2.0

Shell 0.18% Ruby 1.13% C++ 48.22% Python 5.86% C 20.21% CMake 15.02% Dockerfile 0.99% Mako 8.39%

opencl-sdk's Introduction

OpenCLTM SDK (in development)

This is the Khronos OpenCL SDK. It brings together all the components needed to develop OpenCL applications:

  • OpenCL Headers (include/api)
  • OpenCL C++ bindings (include/cpp)
  • OpenCL Loader
  • OpenCL utility library (include/utils)

It also contains resources useful to OpenCL developers:

  • Code samples (samples/)
  • Documentation (docs/)

Build Instructions

Dependencies

  • This repository uses sub-modules for the OpenCL Headers, OpenCL C++ bindings, and OpenCL ICD Loader and some of their transitive dependencies.

    • To clone a new repository with all sub-modules included, use the --recursive option. Note that this option clones all sub-modules and their dependencies, which are not strictly required for the OpenCL SDK:

      git clone --recursive https://github.com/KhronosGroup/OpenCL-SDK.git
      
    • Alternatively, to clone only the sub-modules for the OpenCL SDK, first clone this repository without sub-modules included then setup submodules non-recursively:

      git clone https://github.com/KhronosGroup/OpenCL-SDK.git
      git submodule init
      git submodule update
      
  • The SDK uses CMake for its build system. If CMake is not provided by your build system or OS package manager, please consult the CMake website.

  • The SDK samples depend on

Example Build

The example build guide uses Vcpkg to fetch all dependencies. Note that Vcpkg is not a requirement and is only used for convenience. One may provide dependencies through any other CMake mechanism. For details on how to install Vcpkg, refer to its Getting Started Guide. The example build assumes targeting 64-bit Windows.

  1. Clone this repo with the rest of the OpenCL SDK components:

    git clone https://github.com/KhronosGroup/OpenCL-SDK.git
    git submodule init
    git submodule update
    
  2. Install dependencies:

    vcpkg --triplet x64-windows install sfml tclap glm
    
  3. Build and install SDK with samples and no downstream unit tests:

    cmake -A x64 `
          -D BUILD_TESTING=OFF `
          -D BUILD_DOCS=OFF `
          -D BUILD_EXAMPLES=OFF `
          -D BUILD_TESTS=OFF `
          -D OPENCL_SDK_BUILD_SAMPLES=ON `
          -D OPENCL_SDK_TEST_SAMPLES=OFF `
          -D CMAKE_TOOLCHAIN_FILE=/vcpkg/install/root/scripts/buildsystems/vcpkg.cmake `
          -D VCPKG_TARGET_TRIPLET=x64-windows `
          -B ./OpenCL-SDK/build -S ./OpenCL-SDK
    cmake --build ./OpenCL-SDK/build --target install
    

(Note: on Linux, paths to dependent libraries are automatically handled by RPATH in both the build and install tree. On Windows, all DLLs have to be on the PATH. Vcpkg copies dependent DLLs to the build tree, but in order to do the same in the install tree, a sufficiently new CMake version is required. CMake 3.21 introduces install(IMPORTED_RUNTIME_ARTIFACTS).)

opencl-sdk's People

Contributors

alycm avatar bashbaug avatar bogumil-sapinski-mobica avatar dastin-wilski-mobica avatar inducer avatar jrprice avatar kenba avatar kerilk avatar khronoswebservices avatar kpet avatar mathiasmagnus avatar mikolaj-filar-mobica avatar nel-s avatar outofcontrol avatar pwisniewskimobica avatar

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.