0

I'm trying my first cuda example with vs2019,but i don't know how to eliminate the warning under the <<<>>>, it looks dirty

add <<<1, 1 >> > (2, 7, dev_c);

enter image description here

talonmies
  • 70,661
  • 34
  • 192
  • 269
kris
  • 1

1 Answers1

1

I am afraid that you cannot get what you want so far.

C++ does not support such cuda's style of writing so far by default. And VS only partly inherits CUDA functionality.

After all, * is not a cuda-specific language editor, so it can't get full Intellisence. It is also only a partial inheritance.

As a suggestion from this document, you should

switch from the Runtime API to the Driver API. The C++ is just C++, and the CUDA is still (sort of) C++, there is no <<<>>> badness for the language parsing to have to work around.

Besides, if it does not meet your requirement, you should contact with the Team to suggest a feature about idea.

talonmies
  • 70,661
  • 34
  • 192
  • 269
Mr Qian
  • 21,064
  • 1
  • 31
  • 41
  • Could you implement C++-compliant operators <<, <, >>, > that swallow the operator symbols and the parameters inside the paranthesis for Intellisense only? Or won't it work, because they are binary? – Sebastian Sep 30 '20 at 11:10
  • 1
    Maybe you should [extend language service for c++](https://learn.microsoft.com/en-us/visualstudio/extensibility/extending-the-editor-and-language-services?view=vs-2019). For vs, you should create a your own extension. – Mr Qian Oct 03 '20 at 00:42