Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve documentation for OpenCL rouge syntax highlighting #715

Open
bashbaug opened this issue Nov 12, 2021 · 0 comments
Open

improve documentation for OpenCL rouge syntax highlighting #715

bashbaug opened this issue Nov 12, 2021 · 0 comments

Comments

@bashbaug
Copy link
Contributor

@bashbaug bashbaug commented Nov 12, 2021

Copying a discussion from PR #691 (comment):

Why is there both opencl.rb and opencl_c.rb?
At least it should be explained in the comments what they are really doing.

Reply:

The "opencl" source type is for OpenCL API syntax highlighting, so it primarily includes the OpenCL API types for things like cl_platform_id, cl_context, cl_command_queue, etc.

The "opencl_c" source type is for the OpenCL C programming language, so it includes things like the __kernel and __global keywords, types like char2 and image2d_t, and built-in functions like get_global_id.

I'm totally open to clarifying this further. Where would you like to see more comments?

Reply:

The difference make sense.
But reading the .rb should make it clear:

   class OpenCL < Cpp
     title "OpenCL"
     desc "The OpenCL standard for heterogeneous computing from the Khronos Group"

perhaps with OpenCL host API instead of just OpenCL?
Also clarify the tags?
The comments are always useful at the top of the .rb to explain what is happening in the file but probably that if the title, desc and tag are clearer one can understand.
In the host API, it is probably the C or the C++ host API, then it would be nice to have also the API calls highlighted?

We could also look into auto-generating some or most of these files from the XML file, at least for the OpenCL API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant