parallel perfix sum in matlab

Risposte (1)

Edric Ellis
Edric Ellis il 20 Ott 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 Commenti

hadi
hadi il 20 Ott 2014
Modificato: hadi il 20 Ott 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 il 20 Ott 2014
You need to use gpuArray as the error suggests, not gpuarray.

Accedi per commentare.

Categorie

Scopri di più su Random Number Generation in Centro assistenza e File Exchange

Tag

Richiesto:

il 19 Ott 2014

Commentato:

il 20 Ott 2014

Community Treasure Hunt

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

Start Hunting!

Translated by