multiquad is a framework for computing high dimensional integrals (i.e, multi-quadrature) using parallelized algorithms for speed and adaptive refinement for guaranteed accuracy.
The adaptive refinement algorithms use a divide-and-conquer approach: the D-dimensional domain is partitioned into S^D many subregions, where S denotes the number of subdivisions per dimension. Multi-quadrature "kernels" compute the integral on each subregion along with error estimates. The subregions with the most significant errors are further refined and their integrals recomputed. As with standard adaptive algorithms, the stopping criterion is reached when the global error estimate drops below a certain threshold.
The multi-quadrature computations can be performed across all subregions simultaneously using a data-parallel computation model, since the input and output data for different subregions are independent. OpenCL is used for the implementation due to its wide availability.
Different adaptive algorithms are implemented using STL containers for efficiently sorting the subregions to determine which ones require further refinement.
In the initial release of the code base, all multi-quadrature rules are implemented as tensor products from 1-dimensional Gauss-Kronrod rules. In fact two suites of multi-quadrature kernels are provided: the OpenCL routines for parallel execution, and the prototype C routines for serial execution intended for testing and benchmarking purposes.