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

OpenCL C spec editorial fixes #532

Merged
merged 6 commits into from
Dec 18, 2020
Merged

Conversation

bashbaug
Copy link
Contributor

Editorial fixes for the OpenCL C spec. There are no functional changes.

I'm not super happy with the way the Asciidoctor attributes for the OpenCL C features worked out, especially how the attribute names don't have the double-underscore prefix, but Asciidoctor seemed to be tripping over the attributes when they had the prefix. I think this is workable for now, and Table 8. Address space behavior flows much better with the zero-width spaces, but this is definitely an area to revisit.

@bashbaug bashbaug added the OpenCL C Spec Issues related to the OpenCL C Language specification. label Dec 18, 2020
@Oblomov
Copy link
Contributor

Oblomov commented Dec 18, 2020

I think I've seen other reports in AsciiDoc about the handling of double-underscores. I'll try to give a look at it to see if I can solve the thing in a satisfactory way.

EDIT: I think I'm missing something, but most double-underscore usages are already properly escaped, and render correctly, that I can see (I did spot a couple that can be fixed, and I will provide a PR for them momentarily). Which attribute are missing the __?

Copy link
Contributor

@AnastasiaStulova AnastasiaStulova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice improvements! Thanks... just a few small corrections/comments.

OpenCL_C.txt Outdated Show resolved Hide resolved
OpenCL_C.txt Show resolved Hide resolved
OpenCL_C.txt Outdated Show resolved Hide resolved
OpenCL_C.txt Outdated Show resolved Hide resolved
OpenCL_C.txt Outdated Show resolved Hide resolved
OpenCL_C.txt Outdated Show resolved Hide resolved
OpenCL_C.txt Outdated Show resolved Hide resolved
Co-authored-by: Anastasia Stulova <38433336+AnastasiaStulova@users.noreply.github.com>
@bashbaug
Copy link
Contributor Author

EDIT: I think I'm missing something, but most double-underscore usages are already properly escaped, and render correctly, that I can see (I did spot a couple that can be fixed, and I will provide a PR for them momentarily). Which attribute are missing the __?

Sorry bout that, I should have been clearer.

The rendering is all OK in the spec outputs, but I had to remove the double-underscore prefix from the attribute names in the spec sources, which is a touch confusing. Example:

OpenCL C compilers that define the feature macro {opencl_c_3d_image_writes}
must also define the feature macro {opencl_c_images}.

I would have rather written this as:

OpenCL C compilers that define the feature macro {__opencl_c_3d_image_writes}
must also define the feature macro {__opencl_c_images}.

This mostly worked, but some of the attributes didn't get substituted properly with the double-underscore prefix, and I couldn't figure out why it worked in some cases and not in others, even for the same feature attribute.

As a related aside, I really wanted to use the +TEXT+ syntax in the attribute name:

:opencl_c_3d_image_writes: pass:q[`+__opencl_c_<wbr>3d_<wbr>image_<wbr>writes+`]

vs. \ escaping the attribute name:

:opencl_c_3d_image_writes: pass:q[`\__opencl_c_<wbr>3d_<wbr>image_<wbr>writes`]

But this also didn't work, and I ended up with + in the rendered text.

Note, I didn't test the latest versions of Asciidoctor, so it's possible some of this behavior is a bug that has since been fixed.

Copy link
Contributor

@alycm alycm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

}
}
----------

Program scope variables or variables with `extern`/`static` storage class
Program scope variables or variables with a `extern` or `static` storage class
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Program scope variables or variables with a `extern` or `static` storage class
Program scope variables or variables with an `extern` or `static` storage class

@alycm alycm merged commit e9a4d46 into KhronosGroup:master Dec 18, 2020
@Oblomov
Copy link
Contributor

Oblomov commented Dec 19, 2020

@bashbaug I see, thanks for the clarification. My understanding is that double-underscores usually fail when more than one are in the same line of text.. Anyway, I have some commits that fix up some of the uses for existing macros and tries to uniformize some of the usages, I'll set it up in a PR for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OpenCL C Spec Issues related to the OpenCL C Language specification.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants