Variation in prefix sum
Soham Mukherjee
sohammm1087 at gmail.com
Mon Dec 5 15:20:10 UTC 2022
I'm attempting to parallelize some program that solves recursive
linear equations. Some of these, I believe, might be modified
into prefix sums. Here are a handful of examples of the equations
I'm dealing with.
The conventional prefix sum is as follows:
```
y[i] = y[i-1] + x[i]
```
One equation that interests me is similar to prefix sum but with
a multiplication:
```
y[i] = A*y[i-1] + x[i]
```
Another feature is deeper recursion:
```
y[i] = y[i-1] + y[i-2] + x[i]
```
Aside from these two versions, I'm wondering whether there are
any resources that discuss how to convert situations like the one
above into prefix sum form. Alternatively, ways for
adopting/adapting prefix sum in order to make it more flexible. I
read this [blog](https://www.scaler.com/topics/prefix-sum/), but
I need more information about my situation.
More information about the Digitalmars-d-learn
mailing list