Vitality
Vitality

Reputation: 21475

Complex arithmetics in CUDA

I frequently use complex arithmetics in CUDA and need to define my own implementations of, for example, transcendental functions (sin, cos, exp, ...) on complex numbers. I want now to definitely solve the problem by writing a library of such functions so to consider a "large" number of cases and avoiding being pit-stopped any time for new implementations.

I'm aware that for some of them, code writing could be non-trivial from the point of view of trade-off between accuracy and computational complexity. Nevertheless, I'm also aware that C++ has its own complex math library.

Is there any possibility to "recycle" already existing C++ solutions for CUDA purposes?

Upvotes: 4

Views: 3252

Answers (1)

Rodion
Rodion

Reputation: 886

Probably you already found the answer, but here is mine:

There is possibility to "recycle" sources for complex C++ ISO library

UPD:

CUDA related: cusp::complex< float > Struct Template Reference

I think you can try to collaborate with the author of:

an implementation of C++ std::complex for CUDA devices (i.e. compiles with nvcc)

Upvotes: 1

Related Questions