Are parallel for loops available on GPUs ?

조회 수: 4 (최근 30일)
nah
nah 2013년 9월 13일
Does matlab PCT have capabilities to run parallel for loops on GPUs? (like the GFOR equivalent in Jacket ? Or even Matlab's own parfor that does parallel for loops on multiple processors/workers )

채택된 답변

Jill Reese
Jill Reese 2013년 9월 18일
While there is no general capability to execute for loops directly on the GPU, if all of the operations inside the for loop are element-wise operations you can try to convert your code to call arrayfun to execute the for loop directly on the GPU.
If the loop body involves matrix multiplication over pages of a gpuArray, then you can replace the for loop with a single call to pagefun.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Parallel for-Loops (parfor)에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by