Unable to understand the error in a simple CUDA function -
recently started learning cuda. here simple code printing kernel.
#include"cuprintf.cu" #include"cuprintf.cuh" #include<cuda.h> #include<stdio.h> __global__ void cuprint() { cuprintf("he he, printing here"); } main() { cuprint<<<1,1>>>cuprint(); }
cuprintf.cu
, cuprintf.cuh
downloaded , kept in directory wrote program. getting following error.
cuprint.cu(11): error: expected "(" cuprint.cu(13): error: expected declaration
can 1 tell me why getting errors.
you calling wrong way, should call cuprint<<<1,1>>>();
, according page: https://code.google.com/p/stanford-cs193g-sp2010/wiki/tutorialhelloworld need add more functions (for init() , stuff)), can not confirm because have no cuda pc here)
Comments
Post a Comment