Skip to Content
GPGPU Programming for Games and Science
book

GPGPU Programming for Games and Science

by David H. Eberly
August 2014
Intermediate to advanced
469 pages
16h 30m
English
A K Peters/CRC Press
Content preview from GPGPU Programming for Games and Science
376 GPGPU Programming for Games and Science
if ( dcandidate < dmin )
{
dmin = dcandidate ;
previousmin = (x1, y 1);
}
d(x,y) = dmin;
previous(x,y) = previousmin ;
Once the distances have been computed, the path is generated by
stack<intpair> path ;
x=S 1; y = S 1;
while (x != 1&&y != 1)
{
path . push ( x , y ) ;
(x, y) = previous(x, y);
}
and you can pop the stack to visit the path nodes from (0, 0) to (S 1,S1).
The algorithm for shortest path is straightforward to implement for the
CPU. However, implementing a GPU version that has decent performance
is more difficult. The first problem is implementing the partial sums via the
loops for d(x, 0) and d(0,y). A single GPU thread could be dedicated per
loop, but that sequential operation is not efficient. Instead, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Graphics Gems V (IBM Version)

Graphics Gems V (IBM Version)

Alan W. Paeth
GPU Pro 6

GPU Pro 6

Wolfgang Engel

Publisher Resources

ISBN: 9781466595354