Algorithms for answering the k nearest-neighbor (k-NN) query are widely used for queries in spatial databases and for distance classification of a group of query points against a reference dataset to derive the dominating feature class. GPU devices have significantly more processing cores than CPUs and faster device memory than the main memory accessed by CPUs, thus, providing higher computing power for processing demanding queries like the k-NN. However, since device and/or main memory may not be able to host an entire, rather big, reference and query datasets, storing these datasets in a fast secondary device, like a solid state disk (SSD), and partially retrieve the required, at each stage, partitions is, in many practical cases, a feasible solution. We propose and implement the first GPU-based algorithms for processing the k-NN query for big reference and query spatial data stored on SSDs. Based on 3d synthetic and real big spatial data, we experimentally compare these algorithms and highlight the most efficient algorithmic variation. This variation utilizes a CUDA feature known as Concurrent Kernel Execution, to further improve its performance.
Algorithms for processing large-scale spatial datasets are of significant interest in both scientific research and industrial applications. The efficient implementation of such algorithms is crucial for modern data-intensive systems, and GPU-based parallel processing has emerged as a particularly effective approach for accelerating spatial queries. Among these, computing the k closest pairs (k-CP) between large spatial datasets is a fundamental problem with applications in spatial data analysis, geographic information systems, and data mining. This paper presents an exact GPU-based framework for processing k-CP queries in both two- and three-dimensional spaces, including variants capable of processing datasets that exceed the available GPU memory capacity. Starting from a baseline brute-force CUDA implementation, we develop memory-aware partitioning strategies and adapt DSPP-based spatial pruning to reduce unnecessary distance computations in the global k-CP problem. Furthermore, we incorporate several performance optimizations, including pinned memory and concurrent kernel execution, to overlap data transfers with computation and improve scalability. Experimental evaluation using both synthetic and real-world datasets demonstrates that the proposed methods substantially outperform baseline approaches. In particular, the DSPP + PEA variant employing a max-heap buffer generally achieves the best overall performance, especially for large datasets and higher values of k, highlighting its effectiveness and scalability for large-scale spatial query processing.