diffuse optical tomography ( dot ) is a functional imaging modality for medical applications that has the potential to provide three - dimensional images of the scattering and absorption parameter distributions in vivo , from which clinically relevant physiological parameters such as tissue and blood oxygenation states and state changes can be derived .
applications include brain activation visualisation [ 1 , 2 ] , brain oxygenation monitoring in infants , and breast tumour detection
. data acquisition systems consist of an infrared light delivery system that illuminates the tissue surface at different locations , and detectors that measure the transmitted light at a set of surface positions .
measurements can be performed in continuous wave ( cw ) mode , in time - resolved mode using ultra - short input pulses and time - resolved detectors , or in frequency - domain mode , using modulated light sources and measuring the phase shift and modulation amplitude at the detector locations . due to the high level of scattering in most biological tissues ,
image reconstruction in dot is an ill - posed nonlinear problem whose solution generally requires the formulation of a forward model of light propagation in inhomogeneous scattering tissue . frequently utilised light transport models include stochastic models such as monte - carlo simulation , or deterministic models such as the radiative transfer equation ( rte )   or the diffusion equation ( de ) .
numerical solution approaches include finite difference , finite element , finite volume , or boundary element methods . the light transport model considered in this paper the finite element method ( fem ) for the solution of the diffusion equation .
the reconstruction problem can be stated as a nonlinear optimisation problem , where an objective function , defined as a norm of the difference between measurement data and model data for a given set of optical parameters , is minimised , subject to a regularisation functional .
reconstruction approaches include methods that require the availability of the forward model only , such as markov - chain monte - carlo methods , its first derivative , such as nonlinear conjugate gradient methods , and its second derivative , such as newton - type methods .
iterative solvers require multiple evaluations of the forward model for calculating the objective function and its gradient .
the forward model itself involves the solution of a large linear system with multiple right - hand sides .
problems involving high - dimensional parameter spaces result in time - consuming evaluations of the forward model , which limits the applicability of the reconstruction methods in clinical practice .
recent developments in computing hardware have offered the possibility to make use of parallel computation .
traditionally , solutions have included central processing unit ( cpu ) based moderately parallel systems with shared memory access ( multiprocessor and multicore implementation ) and large - scale distributed parallel systems limited by data transfer between nodes ( cluster cpu implementation ) .
more recently , the parallel architecture of graphics processing units ( gpu ) has been utilised for the acceleration of general purpose computations , including gpu methods for the solution of dense [ 8 , 9 ] or sparse [ 1014 ] linear systems .
the latter are encountered in the implementation of the fem . in the context of diffuse optical tomography and related fields of optical imaging ,
gpu - accelerated computations have been successfully employed for implementing monte - carlo light transport models [ 1517 ] , which compute independent photon trajectories and are well - suited for parallelisation due to the lack of interprocess communication .
zhang et al .   have applied gpu acceleration to finite element computations in bioluminescence tomography and compared to single and multithreaded cpu performance .
they reported significant performance advantages of the gpu version but were limited to low mesh complexity due to memory limits .
in optical projection tomography , gpu - based reconstruction methods have been employed by vinegoni et al . .
watanabe and itagaki   have used a gpu implementation for real - time visualisation in fourier - domain optical coherence tomography . in this paper
, we are investigating the potential of a gpu implementation for the forward model in dot .
we present a compute unified device architecture ( cuda ) version of the finite element forward solver presented previously [ 21 , 22 ] , using the cusp library   for sparse linear system computation on the graphics processor .
cuda is the computing architecture for nvidia graphics processors and can be addressed via an application - programming interface ( api ) .
we investigate the effect of single - precision computation on the accuracy of the forward model for different combinations of optical parameters .
the evaluation of the forward model is the most time - consuming element of iterative inverse solvers , and any efficiency gains in the forward solver therefore directly translate into reduced overall runtimes for image reconstruction applications and are an important step towards making dot a viable imaging application in clinical practice .
we consider the diffusion approximation to the radiative transfer equation [ 24 , 25 ] in either steady - state , time , or frequency domain as the forward model for light transport in tissue . for steady - state problems ,
the stationary real - valued photon density inside the medium arising from a continuous - wave source is computed while for frequency - domain problems , the source is amplitude modulated , giving rise to a complex - valued solution of a photon density wave distribution . in time - domain problems , the source is considered a delta - pulse in time , and the measurement consists of the temporal dispersion of the transmitted signal .
given a compact domain  bounded by  , the diffusion equation   in time and frequency domain is given by 
 ( 1)[(r)+a(r)+1ct](r , t)=0[(r)+a(r)+ic]^(r,)=0}r , 
							 respectively , where  is the angular source modulation frequency , (r )  and  a(r ) are the spatially varying diffusion and absorption coefficients , respectively , where  = [ 3(a + s ) ] with scattering coefficient s .
c is the speed of light in the medium , and  ,  and  ^ are the real and complex - valued photon density fields .
for simplicity in the following , we use  to denote either the real or complex - valued properties as appropriate .
a robin - type boundary condition   applies at  , 
 ( 2)()+2(n)()=q( ) ,   , 
							 where q is a real or complex - valued source distribution as appropriate , (n ) is a boundary reflectance term incorporating the refractive index n at the tissue - air interface , and  is the surface normal at surface point . the boundary operator defining the exitance  through  is given by the dirichlet - to - neumann map 
 ( 3)()=c()=c2( ) . 
							
the set of measurements yij from a source distribution qi is obtained by integrating  over the measurement profiles mj( ) on the surface 
								 ( 4)yij=i()mj()d. 
							 for the time - domain problem , yij are the temporal dispersion profiles of the received signal intensities while , for the frequency - domain problem , yij are given by the complex exitance values , usually expressed by logarithmic amplitude lna and phase shift  , 
								 ( 5)lnaij = re(lnyij ) ,  ij = im(lnyij ) . 
							 given the set of forward data y = { yij } of all measurements from all source distributions , ( 1 ) to ( 4 ) define the forward model f[ , a ] = y which maps a parameter distribution  , a to measurements for a given domain geometry , modulation frequency , source distributions , and measurement profiles .
a division of domain  into tetrahedral elements defined by n vertex nodes provides a piecewise polynomial basis for the parameters  , a , and photon density . the approximate field (r ) at any point r   is given by interpolation of the nodal coefficients i using piecewise polynomial shape functions ui(r ) 
 ( 6)h(r)=i=1nui(r)i . 
							
piecewise polynomial approximations  , a to the continuous parameters , defined by the nodal coefficients i , a , i are constructed in the same way . applying a galerkin approach
transforms the continuous problem of ( 1 ) into an n - dimensional discrete problem of finding the nodal field values  = { i } at all nodes i , given the set of nodal parameters x = { i , a , i}. for the frequency - domain problem , the resulting linear system is given by 
 ( 7)s(x,)()=q( ) , 
							 where 
 ( 8)s(x,)=k({i})+c({a , i})+a+ib , 
  = c/2 , k , c , a , b   are symmetric sparse matrices given by  
 ( 9)kij=k=1nkuk(r)ui(r)uj(r)dr , cij=k=1na , kuk(r)ui(r)uj(r)dr , aij=ui()uj()d,bij=1cui(r)uj(r)dr . 
							 and
right - hand side q is given by 
 ( 10)qi=k=1nqiui()d 
							 with qi the nodal coefficients of the basis expansion of q( ) .
for the solution of the time - domain problem , the time derivative in ( 1 ) at time t is approximated by a finite difference 
 ( 11)(r,t)t1t[(r,t+t)(r,t ) ] . 
							
the temporal profile of  is approximated at a set of discrete steps { tn } and evaluated by a finite difference approach , given by the iteration 
 ( 12)[s+1t0b](t0)=1t0q0,[s+1tnb](tn)=[(1)s1tnb](tn1 ) ,  n1 , 
							 where s=k+c+a , time steps tn = tn1 + tn1 , n  1 , and 0    1 is a control parameter that can be used to select implicit (  = 1 ) , explicit (  = 0 ) , or intermediate schemes .
the step lengths tn are governed by stability considerations of the finite difference scheme . for the unconditionally stable implicit scheme
, the step length can be adjusted to the curvature of the temporal profile , allowing increased step length at the exponentially decaying tail of (t ) .
the solution of the fem problem thus consists of ( i ) construction of the system matrices ( 9 ) , ( ii ) solution of the complex - valued linear problem ( 7 ) or real - valued sequence of linear problems ( 12 ) , and ( iii ) mapping to measurements ( 3 ) and ( 4 ) .
the main computational cost is the solution of the linear system , in particular in the time - domain problem , while the cost of matrix assembly time is typically only 110% of the time of a single linear solution .
the linear system can be solved either with a direct method , such as cholesky decomposition for the real - valued time - domain problem or lu decomposition for the complex - valued frequency domain problem , or with iterative methods , such as conjugate gradients for the real - valued problem and biconjugate gradients for the complex - valued problem .
direct methods become impractical for large - scale problems , due to memory storage requirements for the decomposition and increased computation time . for 3-d problems with high node density , iterative
the bottleneck of the reconstruction problem is the solution of the linear systems in ( 7 ) or ( 12 ) .
accelerating the linear solver is therefore an effective method for improving the inverse solver performance .
we have embedded a graphics processor - accelerated version of the fem forward solver into the existing toast software package   for light transport and reconstruction presented previously .
the gpu - accelerated code uses the cuda programming interface for nvidia graphics processor hardware .
the implementation utilises the cusp library which offers a templated framework for sparse linear algebra and provides conjugate gradient ( cg ) and biconjugate gradient - stabilised ( bicgstab ) iterative solvers for sparse linear systems .
there are alternative storage formats such as the coordinate , ellpack , or hybrid formats   which can provide better parallel performance depending on the matrix fill structure , usually at the cost of less compact storage .
however , the csr format constitutes a good compromise between performance and versatility and is well suited for the matrix fill distribution arising from unstructured fem meshes . for the solution of the complex - valued linear problem ( 7 )
, we expand the complex n  n system into a 2n  2n real system of the form 
 ( 13)[sresimsimsre][reim]=[qreqim ] . 
							
the cusp cg and bicgstab solvers had to be modified to account for early termination of the iteration loop due to singularities in the intermediate results .
early termination conditions occasionally do occur in practice in the problems considered in this paper , in particular due to single - precision round - off errors .
the data flow between host and graphics device memory for a single solver step is shown in figure 1 .
the system matrix s is assembled in host memory for a given set of parameters , together with the source vectors qi , and copied to gpu device memory .
the gpu solver is then invoked for all right - hand - sides , after which the projected solutions yij are copied back to host memory . for the finite - difference solution of the time - domain problem , the entire iteration ( 12 ) can be evaluated on the gpu with minimal communication between host and graphics system , consisting of initial copying the system matrices s and b to the gpu , and returning the computed temporal profiles yij(t ) back to the host . the data flow diagram for the time - domain problem
although gpu hardware with double - precision capability is emerging , typically only a fraction of the chip infrastructure is dedicated to double - precision operations , thus incurring a significant performance penalty .
for optimising , it is therefore advantageous to use single - precision arithmetic where adequate .
we have implemented the fem solver in both single and double precision for gpu as well as cpu platforms . when the system matrix is represented in single precision
the global vertex contributions in the system matrix are the sum of the local element vertex values for all elements adjacent to the vertex . during the summation , loss of precision
can occur if the magnitude difference between the summands is large compared to the mantissa precision of the floating point representation .
for single precision arithmetic , this can be a problem in particular where vertices have a large number of adjacent elements , notably in 3-d meshes with tetrahedral elements .
loss of precision during matrix assembly can be reduced if the contributions are sorted from smallest to highest magnitude .
instead we have opted to assemble the system matrix in double precision and map the values to single precision after assembly .
the assembly step is performed on the host side , with negligible performance impact because assembly time is generally small compared to solve time . to compare the results of matrix assembly in single and double precision ,
we have performed an fem forward solution from single - precision system matrices that were assembled in both single and double precision .
the domain was a homogeneous cylinder of radius 25  mm and height 50  mm , with optical parameters a = 0.01  mm and  = 0.3  mm .
a point source modulated at frequency  = 2  100  mhz was placed on the cylinder mantle .
figure 3 shows the differences between single and double precision forward solution in log amplitude ( figure 3(a ) ) and phase ( figure 3(b ) ) of the complex photon density field along a line from the source position across the volume of the cylinder .
the solid lines represent the single - precision error where the system matrix has been assembled in double precision before being mapped to single precision , while the dashed line is the error arising from a system matrix assembled in single precision .
it can be seen that system matrix assembly in double precision can significantly reduce the solution errors , in particular at large distances from the source .
the influence of optical parameters on the single - precision error of the forward data is shown in figure 4 .
the forward solutions were calculated for three different combinations of absorption and scattering coefficient ( i ) a = 0.01  mm , s = 1  mm , ( ii ) a = 0.1  mm , s = 1  mm , and ( iii ) a = 0.1  mm , s = 1.5  mm .
it can be seen that the discrepancies become more severe at higher values of the optical parameters .
the results are particularly sensitive to an increase of the scattering parameter . due to attenuation , the photon density fields inside the object decay rapidly , leading to large dynamic range in the data . increased absorption and scattering parameters aggravate this effect , which impairs the accuracy of the single - precision solution , in particular in regions far away from the source
. it should be noted , however , that , for moderate optical parameters in a typical range for optical tomography , the single precision solution is accurate , with maximum relative errors of 10 to 10 in log amplitude and phase , respectively .
the device supports double as well as single precision arithmetic , so results for both were collected . for performance comparison ,
the same model calculations were also performed with a cpu - based serial implementation on an intel xeon processor clocked at 2.0  ghz with 4  mb cache and 12  gb main memory .
the fem model consisted of a homogeneous cylindrical mesh with radius 25  mm and height 50  mm at various element resolutions .
one of the meshes , together with the resulting system matrix sparsity structure , is shown in figure 5 .   for run - time performance comparison between gpu and cpu implementations under a variety of conditions
the forward solutions were computed for both a complex - valued problem using a modulation frequency of  = 2  100  mhz and a real - valued steady - state problem of  = 0 . for the complex - valued problem ,
the bicgstab linear solver was used to compute the linear system in ( 7 ) while , for the real - valued problem a cg solver was used .
we tested the performance of the gpu solution as a function of the cg and bicgstab convergence tolerances , either without preconditioner or with a diagonal preconditioner .
the results are shown in terms of the gpu performance factor , given by the ratio of the cpu and gpu run times .  
figure 6 shows the performance factors for single precision ( figure 6(a ) ) and double precision ( figure 6(b ) ) calculations .
it can be seen that the gpu achieves a performance factor between 8 and 19 for single precision calculations , depending on the problem type , where the real - valued bicgstab solution without preconditioner shows the highest improvement at 1419 , while the complex bicgstab solution without preconditioner exhibits the smallest improvement at 811.5 .
the performance factors for double - precision solutions are significantly lower , in a range between 3.7 and 4.7 .
this is due to the fact that while gpu performance drops significantly for double - precision calculations , the cpu solver performance is generally not affected , and indeed the cpu performance is slightly higher at double precision because it avoids casting floating point buffers between single and double precision .
the drop in performance factor for lower tolerance limits is not present in the double - precision results .
the next test compares the cpu and gpu performance as a function of the mesh node density and the resulting size of the linear system .
the performance factors for the forward solvers applied to cylindrical meshes of different mesh resolutions as a function of node count are shown in figure 7 . at each mesh resolution
, we solved both a real - valued steady - state problem with the preconditioned cg solver , and a complex - valued frequency - domain problem with the preconditioned bicgstab solver , at single - precision ( figure 7(a ) ) and double - precision ( figure 7(b ) ) resolution .
all solver results are for calculating the real or complex photon density fields for 80 sources , for a solver tolerance fixed at 10 .
it can be seen that in all cases gpu performance improves with increasing size of the linear system .
for the single - precision solver , the performance factors range between 1 and 26 for mesh node counts between 9000 and 3.3  10 , respectively , for the steady - state problem , and between 2 and 30 for mesh node counts between 9000 and 2.5  10 , respectively , for the frequency domain problem .
note that for the frequency domain problem , the performance factors could not be computed for the two largest meshes due to excessive computation time of the cpu solution .
it can be seen that for the largest mesh resolutions , forward solver times on the cpu can take in excess of an hour .
this can be prohibitive for clinical applications in iterative reconstruction , where each step of the reconstruction may require multiple evaluations of the forward problem to calculate the objective function and its gradient at the current estimate or perform a line search along the current search direction . by comparison
, the gpu times for these problems typically require 2 to 10 minutes , which is feasible for reconstruction problems . to provide a comparison with a cpu - based parallel solver ,
we also show the performance factors of a shared - memory thread - based version of the fem forward solver using up to 8 threads , compared to the single - thread serial implementation .
the thread implementation uses a coarse - grain parallelisation strategy , dividing the solution of the linear problems for different right - hand sides over the available worker threads .
this method provided better processor utilisation and less communication overhead for the problem considered here than a fine - grain strategy of parallelising the iterative solver itself . because the cpu implementation showed no significant performance difference between the single and double precision solution , we present here only the double - precision results .   figure 8 shows the performance factors for 2 , 4 , and 8 threads for the real - valued problem using a cg solver , and for the complex - valued problem using a bicgstab solver .
the cg solver reaches factors between 1.5 ( 2 threads ) and 2.8 ( 8 threads ) while the bicgstab solver reaches factors between 1.7 ( 2 threads ) and 4 ( 8 threads ) .
we computed the finite difference implementation of the time - domain problem ( 12 ) over 100 time steps of 50 picoseconds for cylinder meshes of different complexity .
for these simulations , a crank - nicholson scheme (  = 0.5 ) was used .
signal intensity time profiles were calculated at 80 detector position for each of 80 source locations .
it can be seen that the performance improvements of the gpu implementation is again strongly dependent on mesh resolution , ranging from a factor of 3 to 13 for the double - precision arithmetic calculation , and from 6 to 17 for the single - precision calculation . at the highest mesh resolution ,
the total forward solver run time is approximately 8 hours for the cpu implementation for both single and double precision while the gpu run time is approximately 29 and 36 minutes for the single and double precision solutions , respectively .
we have developed a gpu implementation of a finite element forward model for diffuse light transport that can be used as a component in an iterative nonlinear reconstruction method in diffuse optical tomography .
the efficiency of the forward solver has a significant impact on reconstruction performance , and the reduction of reconstruction times is essential in making optical tomography a viable imaging modality in clinical diagnosis .
the model presented here supports real and complex - valued problems and can be applied to steady - state , time , or frequency - domain imaging systems .
the linear system arising from the fem discretisation is solved either with a conjugate gradient or biconjugate gradient stabilised iterative solver on the gpu device .
we have shown that the gpu solver can achieve significant performance improvements over a serial cpu implementation in the range of factors between 5 and 30 , depending on mesh complexity , tolerance limit , and solver type .
the gpu - based forward solver provides higher performance gains than a thread - based parallel cpu implementation that was used for comparison .
we have shown that for the forward problem a single precision linear solver can be applied for typical ranges of optical parameters in clinical applications of optical parameters .
however , at very high absorption and scattering parameter values , the linear system may become increasingly ill - conditioned and no longer converge with single - precision arithmetic . in these cases , double - precision computation is required .
 we introduce a gpu - accelerated finite element forward solver for the computation of light transport in scattering media . 
 the forward model is the computationally most expensive component of iterative methods for image reconstruction in diffuse optical tomography , and performance optimisation of the forward solver is therefore crucial for improving the efficiency of the solution of the inverse problem . 
 the gpu forward solver uses a cuda implementation that evaluates on the graphics hardware the sparse linear system arising in the finite element formulation of the diffusion equation . 
 we present solutions for both time - domain 
 and frequency - domain problems . 
 a comparison with a cpu - based implementation shows significant performance gains of the graphics accelerated solution , with improvements of approximately a factor of 10 for double - precision computations , and factors beyond 20 for single - precision computations . 
 the gains are also shown to be dependent on the mesh complexity , where the largest gains are achieved for high mesh resolutions . 
1. Introduction
2. Methodology
3. Results
4. Conclusions