parallel perfix sum in matlab

17 Ansichten (letzte 30 Tage)
hadi
hadi am 19 Okt. 2014
Kommentiert: Edric Ellis am 20 Okt. 2014
Hi
I need a code about (perfix sum) by matlab
help me please

Antworten (1)

Edric Ellis
Edric Ellis am 20 Okt. 2014
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 Kommentare
hadi
hadi am 20 Okt. 2014
Bearbeitet: hadi am 20 Okt. 2014
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 am 20 Okt. 2014
You need to use gpuArray as the error suggests, not gpuarray.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by