Skip to main content
. 2013 Jan 28;40(2):023301. doi: 10.1118/1.4774361

Table .

Algorithm VI. Implementation of u˜ sph =H sph α sph (on host).

Input:αsph, p˜0
Output:u˜ sph
 1: fornpth = 0 toNpth − 1 do
 2:   parm_fwdarg[npth].npth = npth
 3:   parm_fwdarg[npth].p˜0 = &p˜0[0]
 4:   parm_fwdarg[npth].αpth=&αsph[npthNxNyNz/Npth]
 5:   parm_fwdarg[npth].u˜ pth =&u˜ sph [n pth NrNvNf] {Pass addresses
     of arrays to each pthread}
 6:   pthread_create(&pthreads[npth], NULL, fwd_pthread, (void *)
     (parm_fwdarg+npth)) {Call function fwd_pthread}
 7: endfor
 8: fornpth = 0 toNpth − 1 do
 9:   forn = 0 toNrNvNfdo
 10:      u˜ sph [n]+=u˜ sph [n+n pth NrNvNf]
 11:   endfor
 12: endfor