Does CUDA support recursion?

前端 未结 12 2496
广开言路
广开言路 2020-12-08 06:31

Does CUDA support recursion?

12条回答
  •  庸人自扰
    2020-12-08 06:40

    Sure it does, but it requires the Kepler architecture to do so. Check out their latest example on the classic quick sort.

    http://blogs.nvidia.com/2012/09/how-tesla-k20-speeds-up-quicksort-a-familiar-comp-sci-code/

    As far as i know, only latest Kepler GK110 supports dynamic parallelism, which allow this kind of recursive call and spawning of new threads within the kernel. Before Kepler GK110, it was not possible. And note that not all Kepler architecture supports this, only GK110 does.

    If you need recursion, you probably need the Tesla K20. I'm not sure if Fermi does supports it,never read of it. :\ But Kepler sure does. =)

提交回复
热议问题