# GPU Adding-Doubling Algorithm for Analysis of Optical Spectral Images
## 3 Results
### Single-Layer AD Model Simulations  
We compared the AD algorithm with MC separately for the HG SPF and GB SPF. As the results were similar for both SPFs, we are presenting the results solely for the GB SPF with the exponent \(\alpha_{GB}\) set at \(1.051\) and factor of anisotropy \(g\) at \(0.851\). Our evaluation focused on different numbers of fluxes, specifically \(m=8\), \(12\), \(16\), and \(20\). Table 1 shows results for reflectance and transmittance, obtained using the CUDA MCML software, while Tables 2 and 3 exhibit results obtained using the AD1L algorithm with single precision. A comparison between MCML and AD1L reveals that perfect agreement was reached for \(m=20\), though adequate accuracy was obtained for \(m=16\). number of threads for the ADIL algorithm was around 3000; larger batches of threads did not considerably enhance computational speed. \begin{table}
\begin{tabular}{c c c c c c c c c} \hline  & \multicolumn{6}{c}{**Reflectance**} & \multicolumn{6}{c}{**Transmittance**} \\ \hline \(\mu_{\text{s}}\) & **25** & **50** & **100** & **150** & **25** & **50** & **100** & **150** \\ \hline
0.1 & 0.26 & 0.36 & 0.48 & 0.54 & 0.42 & 0.31 & 0.20 & 0.14 \\
0.5 & 0.09 & 0.15 & 0.24 & 0.31 & 0.18 & 0.11 & 0.05 & 0.03 \\
**1.0** & 0.04 & 0.08 & 0.15 & 0.20 & 0.08 & 0.04 & 0.01 & 0.01 \\ \hline \end{tabular}
\end{table} 
Table 1: Reflectance and transmittance for different absorption and scattering coefficients (in cm\({}^{-1}\)) using the Monte Carlo method (CUDA MCML software). \(\mu_{\text{a}}\)—absorption coefficient; \(\mu_{\text{s}}\)—scattering coefficient. \begin{table}
\begin{tabular}{c c c c c c c c c} \hline  & \multicolumn{6}{c}{_m = 8_} & \multicolumn{6}{c}{_m = 12_} \\ \hline \(\mu_{\text{s}}\) & **25** & **50** & **100** & **150** & **25** & **50** & **100** & **150** \\ \hline
0.1 & 0.28 & 0.43 & 0.68 & 0.96 & 0.27 & 0.37 & 0.50 & 0.59 \\
0.5 & 0.07 & 0.13 & 0.25 & 0.34 & 0.08 & 0.15 & 0.24 & 0.31 \\
1.0 & 0.03 & 0.06 & 0.13 & 0.19 & 0.03 & 0.08 & 0.15 & 0.2 \\ \hline \multicolumn{6}{c}{_m = 16_} & \multicolumn{6}{c}{_m = 20_} \\ \hline \(\mu_{\text{a}}\) & **25** & **50** & **100** & **150** & **25** & **50** & **100** & **150** \\ \hline
0.1 & 0.26 & 0.36 & 0.48 & 0.55 & 0.26 & 0.36 & 0.48 & 0.54 \\
0.5 & 0.09 & 0.15 & 0.24 & 0.31 & 0.09 & 0.15 & 0.24 & 0.31 \\
**1.0** & 0.04 & 0.08 & 0.15 & 0.20 & 0.04 & 0.08 & 0.15 & 0.20 \\ \hline \end{tabular}
\end{table} 
Table 2: Reflectance for different absorption and scattering coefficients (in cm\({}^{-1}\)) using the AD method (ADIL algorithm) employing Gegenbauer scattering phase function; the value of exponent \(\alpha_{GB}\) was set at 1.051 and factor of anisotropy \(g\) at 0.851; the number of examined fluxes \(m\) was 8, 12, 16, and 20. \(\mu_{\text{a}}\)—absorption coefficient; \(\mu_{\text{s}}\)—scattering coefficient. The values where the discrepancy with the Monte Carlo method in Table 1 is present are shown in grey. \begin{table}
\begin{tabular}{c c c c c c c c c} \hline  & \multicolumn{6}{c}{_m = 8_} & \multicolumn{6}{c}{_m = 12_} \\ \hline \(\mu_{\text{s}}\) & **25** & **50** & **100** & **150** & **25** & **50** & **100** & **150** \\ \hline
0.1 & 0.59 & 0.50 & 0.47 & 0.55 & 0.45 & 0.34 & 0.23 & 0.17 \\
0.5 & 0.28 & 0.17 & 0.10 & 0.07 & 0.20 & 0.11 & 0.05 & 0.03 \\
1.0 & 0.14 & 0.07 & 0.03 & 0.02 & 0.09 & 0.04 & 0.02 & 0.01 \\ \hline \multicolumn{6}{c}{_m = 16_} & \multicolumn{6}{c}{_m = 20_} \\ \hline
0.1 & 0.42 & 0.32 & 0.20 & 0.14 & 0.42 & 0.31 & 0.20 & 0.14 \\
0.5 & 0.18 & 0.11 & 0.05 & 0.03 & 0.18 & 0.11 & 0.05 & 0.03 \\
**1.0** & 0.09 & 0.04 & 0.01 & 0.01 & 0.08 & 0.04 & 0.01 & 0.01 \\ \hline \end{tabular}
\end{table} 
Table 3: Transmittance for different absorption and scattering coefficients (in cm\({}^{-1}\)) using the AD method (ADIL algorithm) employing Gegenbauer scattering phase function; the value of exponent \(\alpha_{GB}\) was set at 1.051 and factor of anisotropy \(g\) at 0.851; the number of examined fluxes \(m\) was 8, 12, 16, and 20.