复杂算术CUDA [英] Complex arithmetics in CUDA
问题描述
我经常在CUDA中使用复杂的算术,需要定义自己的实现,例如超越函数( sin
, cos
, exp
,...)。我想现在通过编写一个这样的函数库来考虑一个大数量的情况,避免任何时候为新的实现陷入停顿来确定解决问题。
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.
我知道,对于其中一些,代码编写可能是不平凡的角度来看,在精度和计算复杂性之间的权衡。不过,我也知道C ++有自己的复杂的数学库。
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.
是否有可能为CUDA目的回收现有的C ++解决方案?
Is there any possibility to "recycle" already existing C++ solutions for CUDA purposes?
推荐答案
可能你已经找到答案,但这里是我的:
Probably you already found the answer, but here is mine:
有可能回收复杂C ++ ISO库的来源
UPD:
CUDA相关: cusp :: complex< float> Struct Template Reference
我想你可以尝试与作者合作:
I think you can try to collaborate with the author of:
用于CUDA设备的C ++ std :: complex的实现(即使用nvcc编译)
这篇关于复杂算术CUDA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!