Optimal usage of the memory system is a key element of fast GPU algorithms. Unfortunately many common algorithms fail in this regard despite exhibiting great regularity in memory access patterns. In this paper we propose efficient kernels to permute the elements of an array, which can be used to improve the access patterns of many algorithms. We handle a class of permutations known as Bit Matrix Multiply Complement (BMMC) permutations, for which we design kernels of speed comparable to that of a simple array copy. This is a first step towards implementing a set of array combinators based on these permutations.
翻译:内存系统的最优利用是快速GPU算法的关键要素。遗憾的是,尽管许多常见算法在内存访问模式上表现出高度规律性,但在此方面仍存在不足。本文提出了高效的内核函数用于置换数组元素,可改善多种算法的访问模式。我们处理一类称为位矩阵乘补(BMMC)的置换操作,为此设计的核函数速度与简单数组复制相当。这是基于此类置换实现数组组合器集合的第一步。