parallel perfix sum in matlab

15 次查看(过去 30 天)
hadi
hadi 2014-10-19
评论: Edric Ellis 2014-10-20
Hi
I need a code about (perfix sum) by matlab
help me please

回答(1 个)

Edric Ellis
Edric Ellis 2014-10-20
In MATLAB, CUMSUM calculates the prefix sum. You can run this in parallel on a gpuArray like so:
x = gpuArray.rand(1, 100); % random vector
c = cumsum(x);
  2 个评论
hadi
hadi 2014-10-20
编辑:hadi 2014-10-20
thanks
but gpuarray have error in matlab:
Cannot find an exact (case-sensitive) match for 'gpuarray'.
Do you want: gpuArray (in C:\Program Files\MATLAB\R2011b\toolbox\distcomp\gpu\gpuArray.m)?
what can I do?
Edric Ellis
Edric Ellis 2014-10-20
You need to use gpuArray as the error suggests, not gpuarray.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Matrix Indexing 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by