Recall in the previous post our derivation of the Gauss circle recurrence relation generalized to arbitrary dimensions, scaling, offset, and weights:
where the cost of computing for for max-distance requires flops. In practice, the summation should be transposed so that is incremented within the inner loop as to take advantage of vectorization/SIMD memory access patterns.
A second approach for those familiar with DSP utilizes the fact that the summation term in the recurrence relation passes as a form of sparse convolution due to the quadratic-striding memory access patterns of . To make the convolution operation explicit, we can vectorize into a sparse signal and re-express the summation as follows:
where is an indicator variable. Note that in consideration of building , a larger boundary scaling term increases the signal sparsity. i.e. from a computational perspective, there are regions in the parameter space of where either direct sparse-convolution or the direct evaluation of the recurrence relation will be faster than an implementation dependent Fast Fourier Transform (FFT) based convolution despite the latter’s lower asymptotic cost of flops.
With the distance bound and Gauss circle problem out of the way, we will continue our investigation of lattice volume bounds in terms of the or taxi-cab distance in the next post.
4 thoughts on “Geometric Audio 3: Gauss Circle Problem for Integer Sized Room Models (part 2)”
[…] The cost of directly computing at is given by flops. Summing over all gives a cost of flops and is most expensive when the boundary size is minimized. This is certainly a large improvement over directly processing individual image-sources where the asymptotic costs of the two methods match for . However, we can make one last improvement by observing that the access patterns of resembles that of the convolution operation, allowing us to achieve even lower asymptotic cost of via the fast Fourier transform. Implementation details will be covered in the next post! […]
[…] produces a density estimation which forgoes processing individual image-sources. See part 1 and part 2. Related: Gauss Circle problem, dynamic programming, and Fourier […]
[…] direct computation in these spaces is expensive but some clever maths [see tutorial (parts 1, 2, 3, 4)] reduced the asymptotic costs to the point of practical use (e.g. a Reverb plugin). […]
Lovvely blog you have