The correlation process in a GNSS receiver tracking module can be computationally prohibitive if it is executed on a central processing unit (CPU) using single-instruction single-data algorithms. An efficient replacement for a CPU is a graphics processing unit (GPU). A GPU is composed of massive parallel processors with high floating point performance and memory bandwidth. It can be used to accelerate the burdensome correlation process in GNSS software receivers. We propose a novel GPU-based correlator architecture for GNSS software receivers, which is independent of the GPU device, the number of the processing channels, the signal type, and the correlation time. The proposed architecture is implemented and optimized using CUDA, a parallel computing platform and programming model for GPUs. We focus on the following aspects: the design and the time complexity analysis of the proposed GPU-based correlator algorithm, the tests that verify the correctness and the optimization of the implementation, and the performance evaluation of the optimized GPU-based correlator. Moreover, we introduce some new CUDA features that can be applied in a GPU-based correlator.