bulk88 -

nvcc knows about C, C++, and CUDA-C. I do not recall if it differentiates
between C and C++, though. I know that I correctly specify that Minimal.c
should be compiled as CUDA-C, but I'm not sure if I told it to do that in
the preprocessor command that produced the code I included in the above
gist. I will have to check when I get home tonight, which will be in 8
hours or so.

As for the #ifndef error idea for debugging, that's perfect. I'll give it a
run and see what it produces.

David

On Mon, Feb 18, 2013 at 6:34 AM, bulk88 <bul...@hotmail.com> wrote:

> David Mertens wrote:
>
>> Sorry for the rapid-fire. I'm up late and the ideas are only trickling
>> out.
>>
>> It appears that the code doesn't think __cplusplus is defined. That is
>> odd. nvcc claims (or, it used to) that it always runs the code through a
>> C++ compiler at the end of the day, so why it wouldn't have __cpluplus
>> defined is beyond me.
>>
>> David
>>
> Compiler flag on cmd line? file name auto detection (.c vs .cc or .cpp)?
> Read the compilers manual or google it. Also your XS module needs to use
> PERL_NO_GET_CONTEXT for efficiency.
>
> your file is called "Minimal.c", per http://sbel.wisc.edu/Courses/**
> ME964/2008/Documents/**nvccCompilerInfo.pdf<http://sbel.wisc.edu/Courses/ME964/2008/Documents/nvccCompilerInfo.pdf>your
>  file will be compiled in regular C mode. Try a (untested)
>
> #ifndef __cplusplus #error c++ is not defined
> #endif
>
> for debugging.
>



-- 
 "Debugging is twice as hard as writing the code in the first place.
  Therefore, if you write the code as cleverly as possible, you are,
  by definition, not smart enough to debug it." -- Brian Kernighan

Reply via email to