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

syntax highlighting support for CUDA C++ .cu / .cuh files #963

Merged
merged 1 commit into from
Jul 18, 2019
Merged

syntax highlighting support for CUDA C++ .cu / .cuh files #963

merged 1 commit into from
Jul 18, 2019

Conversation

eduidl
Copy link
Contributor

@eduidl eduidl commented Jul 25, 2018

related issue

#535

reference

https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#c-language-extensions


CUDA is extended c/c++, and necessary change is three, I think.

Function Execution Space Specifiers

__device__, __host__, __global__, __uninline__, __foreceinline__

ex.

__device__ kernel_func(int a) {
  // do something
}

Variable Memory Space Specifiers

__device__, __constant__, __shared__, __managed__, __restrict_

ex.

__constant__ int i = 1;

Built-in Vector Types

char, short, int, long, longlong, float, double and dim3

Copy link
Collaborator

@dblessing dblessing left a comment

Choose a reason for hiding this comment

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

One minor comment, otherwise looks great. Thanks @eduidl

lib/rouge/lexers/cuda.rb Outdated Show resolved Hide resolved
@dblessing dblessing added the author-action The PR has been reviewed but action by the author is needed label Aug 7, 2018
@eduidl
Copy link
Contributor Author

eduidl commented Aug 9, 2018

I found demo code has error, and correct it.
However, I mistook author of commit because of using office's PC....

@dblessing
Copy link
Collaborator

@eduidl

However, I mistook author of commit because of using office's PC....

Do you want/need to change that before I merge? You can pull the source branch on your personal machine and run git rebase -i master and squash/fixup commits into one logical commit. Then, force push to your branch to update this PR.

@eduidl
Copy link
Contributor Author

eduidl commented Aug 11, 2018

@dblessing

Thanks for your kind offer. I appreciate it.
I have finished squash, so please merge anytime!

@pyrmont pyrmont added needs-review The PR needs to be reviewed and removed author-action The PR has been reviewed but action by the author is needed labels Jul 9, 2019
@pyrmont pyrmont dismissed dblessing’s stale review July 18, 2019 18:11

The change has been made and the issue resolved.

@pyrmont pyrmont merged commit 2805d5a into rouge-ruby:master Jul 18, 2019
@pyrmont
Copy link
Contributor

pyrmont commented Jul 18, 2019

@eduidl Sorry this took so long to merge in but thank you for the pull request! It's great to have an additional lexer for Rouge :)

@pyrmont pyrmont removed the needs-review The PR needs to be reviewed label Jul 18, 2019
@eduidl eduidl deleted the support_for_cuda branch July 19, 2019 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants