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 Center および File ExchangeMatrix Indexing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by