Click here to Skip to main content
14,977,910 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi, how can i get rid of this error :IntelliSense: expected an expression ??
it's bothering me alot :(
#include "cuda.h"
#include "cuda_runtime.h"
#include "device_launch_parameters.h"

#include <stdio.h>

__global__ void helloworldcuda_Kernel()
    printf("Hello world cuda");

void helloworldcuda()
helloworldcuda_Kernel<<<1, 1>>>();
int main()
Updated 24-Apr-15 22:13pm
Richard MacCutchan 25-Apr-15 4:13am
Member 11640624 25-Apr-15 4:34am
in line 14 helloworldcuda_Kernel<<<1, 1>>>(); here is red line ???
Richard MacCutchan 25-Apr-15 4:56am
I don't recognise that syntax, what does it mean?
Member 11640624 25-Apr-15 7:08am
i myself don't know ... it's cuda c program
Richard MacCutchan 25-Apr-15 8:08am
Then go and talk to the people who wrote it.
Member 11640624 26-Apr-15 1:31am
i myself write this program but im beginner in cuda and i searched alot in google but it still has error ...
Richard MacCutchan 26-Apr-15 2:42am
Well if you wrote the program you must understand what the syntax of that statement is supposed to mean.
Member 11640624 26-Apr-15 3:50am
yes but the error is strange
CHill60 25-Apr-15 10:46am
Did you download and install the CUDA toolkit?
Member 11640624 26-Apr-15 3:09am
yes i have download it from here

1 solution

This syntax looks strange and the compilers says it isnt valid. You should check the CUDA documents to write working code.

I found some solution with google. There is also a link for a tutorial. You should study it.
Member 11640624 26-Apr-15 3:09am
thanks but it wasn't helpful :(
Richard MacCutchan 26-Apr-15 9:25am
Are you sure you read the solution suggestion? It quite clearly states that this syntax will not be recognised by a C++ compiler, so you need to use the proper CUDA processor to deal with it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900