Right Candidate for GPU Computing?
显示 更早的评论
There is a small code attached to this question. Basically I would like to see if you consider this as a candidate for GPU computing or not . It has multiple for loops which makes it a good candidate for parallel computing in general. However I have the following problems and questions regarding transforming it to a GPU code and I would appreciate your input:
1- The basic calculation inside the for loops is calculating orthogonal polynomials which are done in the symbolic form in MATLAB which does not accept gpuArray as input. Is there a workaround for this?
2- To perform the for loops on GPU do I need to use gpuArray.colon to specify range of the loop variables? Is it possible to write "for i=n1:n2" while n1 and n2 are of gpuArray type? If the loop is somehow performed on GPU will it be a parallel for, or it will be just a for with the inner calculations performed on GPU. If the for won't be parallel on GPU how can we make it parallel then?
3- Is it possible to use arrayfun to perform the for loops on GPU. In that case are the for loops parallel loops or only the calculation inside the for loops will be done on the GPU?
4- Considering we have indexing inside for loops (though the operations are element-wise) is it possible to use arrayfun for the for loop at all? Still we have the problem of the symbolic calculations as well.
Thanks very much in advance!
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Numerical Integration and Differentiation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!