nujabse / OpenCL-Registry

OpenCL API and Extension Registry.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenCL-Registry

The OpenCL-Registry repository contains the OpenCL API and Extension Registry, including specifications, reference pages, and reference cards. It is also used as a backing store for the web view of the registry at https://www.khronos.org/registry/cl/ ; commits to the main branch of this repository will be reflected there.

Please file issues with the OpenCL API (specification bugs, feature requests, etc.) on the companion https://github.com/KhronosGroup/OpenCL-Docs repository.

Issues that should be filed in this repository include adding OpenCL extension specifications, and problems with the content of the registry itself.

Reserving OpenCL Enumerant Ranges

OpenCL enumerants are now documented in the specification repository https://github.com/KhronosGroup/OpenCL-Docs in the file https://github.com/KhronosGroup/OpenCL-Docs/blob/main/xml/cl.xml

New enumerant ranges can be allocated by proposing a pull request to main branch of OpenCL-Docs modifying cl.xml, following the existing examples. Allocate ranges starting at the lowest free values available (search for “Reserved for vendor extensions”). Ranges are not officially allocated until your pull request is accepted into main branch of the OpenCL-Docs repository. At that point you can use values from your assigned range for API extensions.

Adding Extension Specifications

Extension specification documents can be added by proposing a pull request to main, adding the specification '.txt' or '.html' file under 'extensions/<vendor>/<filename>'. You must also:

  • Modify 'extensions/registry.py' to include the extension, using the next free extension number. Execute the python script 'nextfree.py' in the 'extensions/' directory to find the next free number. The extension flags must be marked as public , similar to other entries in 'registry.py', for the extension to be linked from the registry index page.

  • Include that extension number in the extension specification document

  • In the 'extensions/' directory, make to regenerate the HTML index file 'clext.php' from 'registry.py'. If this doesn’t succeed due to not having the right Python version or something like that, we’ll take care of it when merging to main.

Sometimes extension text files contain inappropriate UTF-8 characters. They should be restricted to the ASCII subset of UTF-8 at present. They can be identified using the iconv Linux command-line tool via

iconv -c -f utf-8 -t ascii filename.txt

(see internal Bugzilla issue 16141 for more).

It is recommended to use the asciidoc-based extension template to generate HTML extension specifications instead, see https://github.com/KhronosGroup/OpenCL-Docs/blob/master/extensions/cl_extension_template.asciidoc

Repository Contents

Interesting files in this repository include:

  • 'index.php' - top-level index page for the web view. This relies on PHP include files found elsewhere on https://www.khronos.org and so is not very useful in isolation.

  • 'extensions/' - OpenCL extension specifications, grouped into vendor-specific subdirectories.

    • 'extensions/registry.py' - extension registry.

    • 'extensions/makeindex.py' - create HTML extension indices from 'registry.py'.

    • 'extensions/nextfree.py' - determine the next free extension number in 'registry.py'.

  • 'sdk/' - OpenCL reference pages and reference cards. There are separate sets for each API version. The current (OpenCL 2.2) reference pages are extracted from the OpenCL Specification, so problems with these pages should be filed in the OpenCL-Docs repository - only the generated HTML for the reference pages is published here.

  • 'specs/' - OpenCL specification documents.

About

OpenCL API and Extension Registry.


Languages

Language:HTML 97.1%Language:JavaScript 1.8%Language:C++ 0.4%Language:CSS 0.2%Language:Ruby 0.1%Language:Makefile 0.1%Language:XSLT 0.1%Language:Python 0.0%Language:Hack 0.0%Language:PHP 0.0%