error with gpuarray transformation

>> A3 = gpuArray(q);
Error using gpuArray
Only full arrays of fundamental numeric types or logical types are
supported for GPU arrays.
i get the following error message. q is a cell array consisting of a matrices with many thousand rows.
my gpu is a cuda card with 4 gigabytes.
thanks

 Respuesta aceptada

Matt J
Matt J el 18 de Dic. de 2014
Editada: Matt J el 19 de Dic. de 2014

2 votos

q is not allowed to be a cell array. It must be a matrix or n-dimensional array. And it must be non-sparse.

6 comentarios

AA
AA el 19 de Dic. de 2014
Is there a solution to this problem?
No, you cannot put a cell array on the GPU. You can make a cell array containing gpuArrays if you wish, like so:
A = cellfun(@gpuArray, {1, 2, 3}, 'UniformOutput', false)
Not sure whether that's any use to you.
AA
AA el 19 de Dic. de 2014
so any calculations I do after this will be transformed using gpu rather than cpU?
AA
AA el 19 de Dic. de 2014
A = cellfun(@gpuArray, a, 'UniformOutput', false)
Matt J
Matt J el 19 de Dic. de 2014
All operations on A{i} will be done on the GPU.
AA
AA el 21 de Dic. de 2014
A = cellfun(@gather, a, 'UniformOutput', false) and this turns it back

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Etiquetas

Preguntada:

AA
el 18 de Dic. de 2014

Comentada:

AA
el 21 de Dic. de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by