parallel perfix sum in matlab

조회 수: 17 (최근 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