• This repository has been archived on 30/Jul/2022
  • Stars
    star
    15
  • Rank 1,327,139 (Top 27 %)
  • Language
    Ada
  • License
    ISC License
  • Created over 12 years ago
  • Updated over 10 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An Ada binding for the OpenCL host API

OpenCLAda - An Ada binding for the OpenCL host API

About

This is OpenCLAda, a thick Ada binding for the OpenCL host API. This binding enables you to write OpenCL hosts in Ada. It does not enable you to write OpenCL kernels in Ada.

Prerequisites

OpenCLAda currently supports MacOSX, Linux and Windows. You need to have

  • a GNAT compiler
  • an OpenCL implementation
  • optionally OpenGLAda (if you want to use the cl_gl extension)

available on your system. GNAT GPL Edition is available at the AdaCore website. OpenCL is usually available from your hardware vendor. On MacOSX, it's already part of the operating system. On Windows, you'll need an OpenCL.lib file to link against. This is usually not part of the OpenCL implementation, but can be acquired as part of an SDK from your hardware vendor (eg the AMD APP SDK).

OpenGLAda is required for OpenCL's cl_gl extension. Just download its source and make sure the path to opengl.gpr is included in the ADA_PROJECT_PATH environment variable. To compile the tests, you also need the GLFW library version 2, which is used for window construction in the cl_gl tests.

Compilation

On MacOSX and Linux, open a terminal, navigate to the OpenCLAda directory and do:

$ make

On Windows, it could work the same way if you're using MinGW or Cygwin. However, I didn't try either one. Anyway, to compile without make, just do

$ gnatmake -p -Popencl-cl_gl.gpr -XWindowing_System=windows

Note: The variable Windowing_System is shared with OpenGLAda. You have to provide it even when compiling without OpenGL support because it defines the way OpenCLAda links with your system libraries.

On Windows, the compiler needs to find the OpenCL.lib file mentioned above. If you're unsure how to achieve this, just copy it into C:\GNAT\[version]\lib or wherever you installed your GNAT compiler.

Note: The availability of an OpenCL implementation will not be tested when building OpenCLAda. So if you want to make sure that OpenCL is available, build the tests and see if they are linked properly (see below).

If you want to build OpenCLAda without the cl_gl extension, do

$ gprbuild -p -P opencl.gpr -XWindowing_System={windows|quartz|x11}

Note: The makefile does not support switching off cl_gl, because I'm lazy.

Installation

OpenCLAda is just a wrapper library and does not include an installation routine. You can just add it to your project.

Tests

OpenCLAda comes with some tests (or rather, examples). I wrote them to test some of the basic functionality of the API. You can build them with

$ make tests

or

$ gnatmake -p -P opencl_test.gpr -XGL_Backend={windows|quartz|x11}

A basic "hello world" example is also included. After compilation, the executables will be located in the bin directory. They can only be executed in the bin directory, as they load some OpenCL kernel files through relative paths.

Usage

There is some overview over the OpenCLAda API on the Wiki, which is outdated and will shortly replaced by a new documentation section on the homepage. For more information, please consult the Khronos OpenCL API Registry.

Contributing

You're welcome to contribute code or file bug reports on the project's page on GitHub.

License

This code is distributed under the terms of the ISC License, which you can find in the file COPYING.

More Repositories

1

NimYAML

YAML implementation for Nim
Nim
180
star
2

emerald

HTML5 templating engine for Nimrod
Nim
93
star
3

OpenGLAda

Thick Ada binding for OpenGL and GLFW
Ada
90
star
4

Zicross

Nix Flake for cross-compiling and packaging for foreign systems
Nix
48
star
5

DSA-LaTeX

LaTeX-Klasse und Dokumente für Das Schwarze Auge
TeX
14
star
6

DSA-4.1-Heldendokument

Konfigurierbares Heldendokument für DSA, basierend auf LuaLaTeX.
Lua
13
star
7

Nova-TeX-Suite

Nova support for TeX, LaTeX and ConTeXt
JavaScript
7
star
8

ParserTools

tools for writing lexers / parsers in Ada
Ada
6
star
9

libyaml_constructor

Code generator to load YAML into C types
C
6
star
10

ada-bundler

Library and tool for transparently handling data and configuration file access in an Ada application. Supports MacOSX, Linux and Windows.
Ada
5
star
11

gps-osx

Native GNAT Programming Studio for OSX
Ada
5
star
12

nova-nix-suite

Nix extension for Nova.app
Scheme
4
star
13

NovaZig

Zig support for the Nova editor
Scheme
4
star
14

OpenGLAda-examples

Examples for OpenGLAda
Ada
4
star
15

nix-flakes-go-plugins

Article about building Go applications that support plugins with Nix Flakes
Nix
4
star
16

zargo

2D OpenGL drawing lib for zig
C
2
star
17

askew

code generator & framework for single-page GopherJS/WASM apps
Go
2
star
18

js-audio-fiddle

Fiddling with the Web Audio API and stuff
JavaScript
1
star
19

Con-Checkliste

CSS
1
star
20

DSA-Heldendokument-Generator

Java Bibliothek + GUI für plattformübergreifende DSA Heldendokumenterstellung
Java
1
star
21

DSA-Liber-Reprints

Nix
1
star
22

FreeTypeAda

FreeType binding for Ada 2012
Ada
1
star
23

soqualpoints

Punktemanagement für universitäre Übungsveranstaltungen
PHP
1
star