Launch Configuration in Thrust

浪尽此生 提交于 2021-01-20 09:29:48

问题


I am trying to run some experiments on an algorithm coded in Thrust. I'd like to know the impact of the number of threads per block in the performance of my algorithm. Is it possible to restrict thrust so that it does not use more than X number of threads per block?


回答1:


Thrust doesn't expose any ability to either directly set the number of threads per block or the number of blocks used in a particular kernel call.

These things are indirectly determined by algorithm and problem size, but you have no direct control of them.

Of course, thrust is an open source header/template library, so in theory you could make any code changes you want. I assume that's not what you're asking and is outside the scope of my answer.



来源:https://stackoverflow.com/questions/39679439/launch-configuration-in-thrust

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!