|
2#

楼主 |
发表于 2010-10-13 19:06
|
只看该作者
Limitations and Restrictions
The following limitations apply to the code within the function that arrayfun is evaluating on a GPU.
*
The arrayfun function argument must be a handle to a MATLAB function, whose function file (not a script) defines a single function.
*
The code can call only those supported functions listed above, and cannot call scripts. Overloading the supported functions is not allowed.
*
Indexing (subsasgn, subsref) is not supported.
*
The following language features are not supported: persistent or global variables; if, for, while, parfor, spmd, switch, try/catch, and return.
*
All double calculations are IEEE-compliant, but because of hardware limitations, single calculations are not.
*
The only supported data type conversions are single, double, int32, uint32, and logical.
*
eps is supported without input or with numeric input, but not with a string input. For example, you can call eps and eps(x), where x evaluates to a number; but you cannot call eps('single') or eps('double').
*
Functional forms of arithmetic operators are not supported, but symbol operators are. For example, the function cannot contain a call to plus, but it can use the + operator.
*
Like arrayfun in MATLAB, matrix exponential power, multiplication, and division (^, *, /, ) perform element-wise calculations only.
*
There is no ans variable to hold unassigned computation results. Make sure to explicitly assign to variables the results of all calculations that you are interested in. |
|