フィルターのクリア

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

1 回表示 (過去 30 日間)
Praful
Praful 2013 年 4 月 24 日
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.*

回答 (1 件)

Jill Reese
Jill Reese 2013 年 4 月 24 日
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.

カテゴリ

Help Center および File ExchangeGPU Computing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by