English

Two Efficient Message-passing Exclusive Scan Algorithms

Data Structures and Algorithms 2026-04-29 v1 Distributed, Parallel, and Cluster Computing

Abstract

Parallel scan primitives compute element-wise inclusive or exclusive prefix sums of input vectors contributed by pp consecutively ranked processors under an associative, possibly expensive, binary operator \oplus. In message-passing systems with bounded, one-ported communication capabilities, at least log2p\lceil\log_2 p\rceil or log2(p1)\lceil\log_2 (p-1)\rceil send-receive communication rounds are required to perform the scans. While there are well-known, simple algorithms for the inclusive scan that solve the problem in log2p\lceil\log_2 p\rceil send-receive communication rounds with log2p\lceil\log_2 p\rceil applications of the \oplus operator, the exclusive scan is different and has been much less addressed. By considering natural invariants for the exclusive prefix sums problem, we present two different algorithms that are efficient in the number of communication rounds and in the number of applications of the \oplus operator. The first algorithm consists of an inclusive scan phase and an exclusive scan phase and trades the number of communication rounds against the number of applications of the \oplus operator. The smallest number of inclusive scan rounds with q=log2pq=\lceil\log_2 p\rceil rounds in total is qqlog2(2qp+1)q'\geq q-\log_2(2^q-p+1). The other algorithm is a modification of a round-optimal all-reduce algorithm, and the number of additional applications of the \oplus operator is dependent on the number of bits set (popcount of) in p1p-1. Both algorithms are relevant for small(er) input vectors where performance is dominated by the number of communication rounds. For large input vectors, other (pipelined, fixed-degree tree) algorithms must be used.

Keywords

Cite

@article{arxiv.2604.25667,
  title  = {Two Efficient Message-passing Exclusive Scan Algorithms},
  author = {Jesper Larsson Träff},
  journal= {arXiv preprint arXiv:2604.25667},
  year   = {2026}
}

Comments

arXiv admin note: substantial text overlap with arXiv:2507.04785

R2 v1 2026-07-01T12:39:18.634Z