How can I use pagefun?

function gputest()
% pagefun
function res = ttt_gpu(bb)
res = bb + 1;
end
b = gpuArray(repmat([1 2 ; 2 2; 4 3], 1, 1, 3));
pagefun(@ttt_gpu, b)
end
The line "pagefun(@ttt_gpu, b)" makes an error. Can't I use pagefun with user defined function?

回答 (1 件)

Edric Ellis
Edric Ellis 2016 年 9 月 27 日

0 投票

pagefun supports only a limited set of functions. These are described in the documentation.

カテゴリ

ヘルプ センター および File ExchangeGPU Computing についてさらに検索

タグ

質問済み:

2016 年 9 月 27 日

回答済み:

2016 年 9 月 27 日

Community Treasure Hunt

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

Start Hunting!

Translated by