GPU coder : When I use GPU coder to any function, Do I need to type coder.gpu.kernelfun in all subfunctions in the main function?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
lim daehee
am 11 Nov. 2019
Beantwortet: Pravin Jagtap
am 27 Dez. 2019
![캡처.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/247673/%EC%BA%A1%EC%B2%98.png)
I want to use GPU coder on a function fcn_PRM_DH5.
in fcn_PRM_DH5, there is another function; colChk_new.
In this case, Do I need to type coder.gpu.kernelfun in colChk_new?
0 Kommentare
Akzeptierte Antwort
Pravin Jagtap
am 27 Dez. 2019
Hello Lim,
I think, Dynamic kernel invocation i.e calling kernels from within kernels is not supported by GPU coder yet. Therefore my guess is even if you write the kernel fun pragma in 'colChk_new' GPU threads will ignore that pragma. But, if the computations involved in the for loop of 'fcn_PRM_DH5' then the function call of 'colChk_new' will be parallel.
~Pravin
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Get Started with GPU Coder finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!