Can I run mex functions (containing no CUDA code) using arrayfun

1 vue (au cours des 30 derniers jours)
Praful
Praful le 24 Avr 2013
I am trying to run dictionary learning codes from SPAMS toolbox using arrayfun on my GPU for faster computations. However, even after installing MATLAB 2013a the following error is displayed:
*Error using gpuArray/arrayfun
Only function handles bound to MATLAB files containing function definitions are supported.*

Réponses (1)

Jill Reese
Jill Reese le 24 Avr 2013
You cannot run a Mex function using gpuArray/arrayfun. In fact, this is specified in the help for gpuArray/arrayfun:
FUN must be a handle to a function that is written in the MATLAB
language (i.e., not a built-in function or a mex function).
I am a little bit confused by what you are trying to do. Does the SPAMS toolbox provide GPU support that you are trying to access in your Mex file? I do not know anything about that product, but a quick web search did not reveal any indication that the SPAMS software was intended to run on a GPU.

Catégories

En savoir plus sur GPU Computing dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by