简体   繁体   English

CUDA中的复杂算术

[英]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. 我经常在CUDA中使用复杂的算术,并且需要在复数上定义我自己的实现,例如,超越函数( sincosexp ,...)。 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 . 不过,我也知道C ++有自己复杂的数学库

Is there any possibility to "recycle" already existing C++ solutions for CUDA purposes? 是否有可能为CUDA目的“回收”已有的C ++解决方案?

Probably you already found the answer, but here is mine: 可能你已经找到了答案,但这是我的:

There is possibility to "recycle" sources for complex C++ ISO library 有可能为复杂的C ++ ISO库 “回收”

UPD: UPD:

CUDA related: cusp::complex< float > Struct Template Reference CUDA相关: cusp :: complex <float>结构模板参考

I think you can try to collaborate with the author of: 我想你可以尝试与以下作者合作:

an implementation of C++ std::complex for CUDA devices (ie compiles with nvcc) 用于CUDA设备的C ++ std :: complex的实现(即使用nvcc编译)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM