Cannot compile code using Intel Cilk
I use Intel Parallel Studio XE 2011 .It says it supports Cilk.When I include a cilk_for statement in the code it does not com开发者_JAVA技巧pile.It says symbol undefined.I have included the cilk.h at the beginning of my code and also under include directories I put the location of cilk.h (C:\Program Files (x86)\Intel\ComposerXE-2011\compiler\include\cilk).Can someone tell me what am I missing? How can i successfully compile my code.
My guess is that you are not picking up the cilk header correctly. Try using the cilk keywords (_Cilk_spawn, _Cilk_sync, and _Cilk_for) instead and see if that works without the header. If it does, at least you know that the Cilk stuff in the compiler is working and it is the header. Then try using "#include <cilk/cilk.h
>" and using cilk_for to see if it picks up the header correctly. You shouldn't have to be specifying the location of the cilk.h file yourself if everything is set up correctly. Are you doing this on the command line or using Microsoft's Visual Studio? If you are using MS VS are you sure that you are specifying to use the Intel compiler?
精彩评论