libmatern: Fast and Accurate Matérn Covariance Evaluation on SIMD CPUs and CUDA GPUs

Efficient and accurate evaluation of the Matérn covariance function is essential for computationally demanding spatial statistics and Gaussian-process applications. We present libmatern, a numerical library that substantially accelerates Matérn covariance evaluation on SIMD CPUs and CUDA GPUs while maintaining competitive or improved numerical accuracy. On synthetic benchmarks, our single-threaded AVX-512 implementation is 6.6× faster than the fastest tested external CPU implementation for a random mixture of 2²⁵ evaluations, and 3.9× to 21× (median 7.5×) faster across eight test datasets. On the tested GPU, our CUDA implementation achieves kernel-level speedups of 1.7× to 6.8× (median 2.3×) over the fastest tested external implementations, with an end-to-end median speedup of 1.1× when host–device transfers are included. These performance gains are accompanied by competitive or improved numerical accuracy across the investigated parameter regimes. As a novelty of our approach we rigorously incorporate the Matérn prefactor directly into numerical formulations for the modified Bessel function Kν, reducing intermediate floating-point range restrictions and improving accuracy on nearly all tested datasets even without SIMD execution. Architecture-dependent algorithm selection and hardware-specific optimisation provide additional performance gains. The results demonstrate that mathematical reformulation and hardware-specific optimisation provide complementary benefits for accurate and efficient Matérn covariance evaluation.

Authors

Institutions

Publication Details

Journal
Journal of Reproducible Statistics
Published
2026-11-24
DOI
https://doi.org/10.68365/jrepstat.2026.13
Primary Topic
Parallel Computing and Optimization Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

libmatern: Fast and Accurate Matérn Covariance Evaluation on SIMD CPUs and CUDA GPUs

Martin Schlather, Daniel Mann, Matthis Ehrhardt
Journal of Reproducible Statistics
Parallel Computing and Optimization Techniques
article

libmatern: Fast and Accurate Matérn Covariance Evaluation on SIMD CPUs and CUDA GPUs

Martin Schlather, Daniel Mann, Matthis Ehrhardt
article en

Abstract

Efficient and accurate evaluation of the Matérn covariance function is essential for computationally demanding spatial statistics and Gaussian-process applications. We present libmatern, a numerical library that substantially accelerates Matérn covariance evaluation on SIMD CPUs and CUDA GPUs while maintaining competitive or improved numerical accuracy. On synthetic benchmarks, our single-threaded AVX-512 implementation is 6.6× faster than the fastest tested external CPU implementation for a random mixture of 2²⁵ evaluations, and 3.9× to 21× (median 7.5×) faster across eight test datasets. On the tested GPU, our CUDA implementation achieves kernel-level speedups of 1.7× to 6.8× (median 2.3×) over the fastest tested external implementations, with an end-to-end median speedup of 1.1× when host–device transfers are included. These performance gains are accompanied by competitive or improved numerical accuracy across the investigated parameter regimes. As a novelty of our approach we rigorously incorporate the Matérn prefactor directly into numerical formulations for the modified Bessel function Kν, reducing intermediate floating-point range restrictions and improving accuracy on nearly all tested datasets even without SIMD execution. Architecture-dependent algorithm selection and hardware-specific optimisation provide additional performance gains. The results demonstrate that mathematical reformulation and hardware-specific optimisation provide complementary benefits for accurate and efficient Matérn covariance evaluation.

Journal of Reproducible StatisticsVol. 1
University of Mannheim (DE)
Parallel Computing and Optimization Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon