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

조회 수: 2 (최근 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 CenterFile Exchange에서 GPU Computing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by