Sorry for not getting back to this as quickly as I had hoped. My machine
with nVidia hardware is at home and I haven't had much time in the las few
evenings to play with it. This may be the case through the weekend; we
shall see.

bulk88, I was not entirely sure what PERL_NO_GET_CONTEXT did. After some
digging, I came across this article that seemed to clarify things quite a
bit, at least for me:
http://perl.active-venture.com/pod/perlguts-concurreny.html. I also did
some reading and discovered that there are ways to have thread-local data
in C, which was news to me. (I never learned the intricacies of C.)
Suddenly the behavior of dTHX; and the whole api with the _nocontext suffix
make so much more sense.

Thanks!
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