답변 (1개)

Edric Ellis
Edric Ellis 2014년 10월 20일

0 개 추천

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.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터 및 File Exchange에서 Random Number Generation에 대해 자세히 알아보기

태그

질문:

2014년 10월 19일

댓글:

2014년 10월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by