我目前正在构思一种方法,使用 Boost 的
odeint
和 Thrust
库,根据常微分方程与 C++ 积分的结束时间来并行计算参数研究。
Boosts integrate_adaptive
实现了转发问题(如此处所示https://www.boost.org/doc/libs/1_81_0/libs/numeric/odeint/doc/html/header/boost/numeric/odeint/integrate/ integrate_adaptive_hpp.html),因此它能够顺序求解参数研究。现在我想知道如何并行执行此操作。我还没有写代码,因为我不知道什么是可能的。
我的第一个想法是将
Thrust::for_each
与具有所有结束时间的容器一起使用,但这需要被调用函数的 CUDA 内部代码,对吗? integrate_adaptive
有__host__
和__device__
吗?
我还能做什么?