I’m getting some funner errors with ‘__eh_curr_region’ in them when I try to compile a simple 3 element vector class of complex numbers.
The vector class looks something like:
[codebox]
class tvec {
public:
tvec() {};
~tvec() {};
…
private:
zcmplx a, b, c;
}
[/codebox]
The zcmplx class inherits from cuDoubleComplex in cuComplex.h that comes with the toolkit and implements a set of convenient operators.
[codebox]
class zcmplx : public cuDoubleComplex {
…
}
[/codebox]
I can change the elements (a, b, and c) in the 3 vector class to be cuDoubleComplex variables and get the code to compile and work. The casting between cuDoubleComplex and zcmplx isn’t much of a problem, and it can mostly be done automatically with operator overloading, but it still seems a bit clunky.
Any ideas why I can’t just use my zcmplx class? Have I committed any C++ sins I’m not seeing offhand?
Ben
Edit: I forgot to mention that I have looked on the forums, and I don’t see immediately where I might be having shared memory problems. I do not allocate any arrays in shared memory. I only have pointers and single variables in shared memory.