pagefun makes an error

11 visualizaciones (últimos 30 días)
sungho Kang
sungho Kang el 27 de Sept. de 2016
Comentada: Joss Knight el 28 de Sept. de 2016
The following code makes an error. How can I solve it?
b = gpuArray(repmat([1 2 ; 2 2; 4 3], 1, 1, 3));
pagefun(@norm, b)
Error using gpuArray/pagefun Function passed as first input argument contains unsupported or unknown function 'norm'.
What is the corrected code?
I am using Matlab 2014a, Parallel Computing Toolbox Version 6.4 and Gigabyte GTX750.
Thanks.

Respuesta aceptada

Edric Ellis
Edric Ellis el 27 de Sept. de 2016
pagefun supports only a limited set of functions. These are described in the documentation.
  2 comentarios
sungho Kang
sungho Kang el 28 de Sept. de 2016
Hi and thanks Edric.
But in the doc. norm is supported fun with pagefun, right?
Joss Knight
Joss Knight el 28 de Sept. de 2016
No. The doc says:
Currently the supported values for FUN are:
Most element-wise gpuArray functions, listed in Run Built-In Functions on a GPU, and the following:
  • @ctranspose
  • @fliplr
  • @flipud
  • @inv
  • @mldivide
  • @mrdivide
  • @mtimes
  • @rot90
  • @transpose

Iniciar sesión para comentar.

Más respuestas (1)

Joss Knight
Joss Knight el 27 de Sept. de 2016
The corrected code is
ans = sqrt(sum(b.*b, 1));

Categorías

Más información sobre GPU Computing in MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by