We find a succinct expression for computing the sequence $x_t = a_t x_{t-1} + b_t$ in parallel with two prefix sums, given $t = (1, 2, \dots, n)$, $a_t \in \mathbb{R}^n$, $b_t \in \mathbb{R}^n$, and initial value $x_0 \in \mathbb{R}$. On $n$ parallel processors, the computation of $n$ elements incurs $\mathcal{O}(\log n)$ time and $\mathcal{O}(n)$ space. Sequences of this form are ubiquitous in science and engineering, making efficient parallelization useful for a vast number of applications. We implement our expression in software, test it on parallel hardware, and verify that it executes faster than sequential computation by a factor of $\frac{n}{\log n}$.
翻译:我们找到了一种简洁的表达方式,用于并行计算序列 $x_t = a_t x_{t-1} + b_t$,其中 $t = (1, 2, \dots, n)$,$a_t \in \mathbb{R}^n$,$b_t \in \mathbb{R}^n$,初始值 $x_0 \in \mathbb{R}$,且计算基于两个前缀和。在 $n$ 个并行处理器上,计算 $n$ 个元素的时间复杂度为 $\mathcal{O}(\log n)$,空间复杂度为 $\mathcal{O}(n)$。此类序列在科学和工程中普遍存在,因此高效并行化方法对大量应用具有重要价值。我们通过软件实现了该表达,并在并行硬件上进行了测试,验证了其执行速度比顺序计算快 $\frac{n}{\log n}$ 倍。