I am using Exod 3.2 on Mac OS 10.6 to create a very simple hello program for the CUDA, but Fails to make it .. any ideas !!!
This code is:
#include & lt; Iostream & gt; # Include & lt; Stdio.h & gt; # Include & lt; Stdlib.h & gt; # Include & lt; Assert.h & gt; # Include & lt; CUDA / CUDA.h & gt; __ Device char four nodes_design [14]; __global__ zero halo world ondive (zero) {napis_device [0] = 'h'; Napis_device [1] = 'E'; Napis_device [2] = 'l'; Napis_device [3] = 'l'; Napis_device [4] = 'o'; Napis_device [5] = ''; Napis_device [6] = 'W'; Napis_device [7] = 'o'; Napis_device [8] = 'R'; Napis_device [9] = 'l'; Napis_device [10] = 'p'; Napis_device [11] = '\ n'; } Int main (int argc, char * const argv []) {helloWorldOnDevice & lt; & Lt; & Lt; 1,1 & gt; & Gt; & Gt; (); CudaThreadSynchronize (); Four npian_host [14]; Const char * symbol = "Napis device"; CudaMemcpyFromSymbol (napis_host, symbol, size (character) * 13, 0, cudaMemcpyDeviceToHost); Return 0; }
An error has occurred on this line on HelloWorld On Device & lt; & Lt; 1,1 >>> ();
'& lt;' Expected pre-expression token before !!!!!!
You are coming with Xcode with your program GCC. Instead of compiling the CUDA code, you should use the NVCC compiler. Generally I use a makefile that * .cu to * NCCC and *. CPP will ask GCC to compile, then link items produced for an objective.
Comments
Post a Comment