Timeline for Relative coordinates -- cumulative sum
Current License: CC BY-SA 4.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 15, 2023 at 7:02 | history | edited | Thomas | CC BY-SA 4.0 |
added 9 characters in body
|
Jun 15, 2023 at 7:00 | comment | added | Thomas | You can also only generate one additional SSBO by storing all values of SSBO2, SSBO3... into one SSBO. I'm using multiple SSBOs just to clearify the algorithm. But with an index offset it is possible to store all results to one buffer. | |
Jun 15, 2023 at 6:58 | comment | added | Thomas | @Nick try to understand the algorithm... it is not as complicated as it looks like. The first execution gives you the cumulative sum of the input data with respect to the workgroup size (64). The offset of the cumulated sum of each workgroup is stored to SSBO2. So after the first execution we have broken down the problem from 50000 data points to 782 data points. But these 782 data points need to be cumulative summed as the 50000. So we use the same shader again just with other bindings and store the result to SSBO3. You need $log_{64}(n)$ many SSBOs to brake down the problem to one workgroup | |
Jun 14, 2023 at 23:31 | comment | added | Nick | Thanks @Thomas. This is much more understandable, especially with diagrams and equations, and code is a bonus too. I'm still not clear in my mind how the parallelisation actually happens, though I'm sure this is my failing not yours. I'm trying to implement this myself, and also my Q needs much improvement, but I am battling the constraints of this site, and my ISP in SE England have made SE unreachable. | |
Jun 13, 2023 at 8:13 | history | edited | Thomas | CC BY-SA 4.0 |
added 2 characters in body
|
Jun 12, 2023 at 11:19 | comment | added | Thomas | @Nick I rewrote the answer to make clear how the algorithm works. Please take a look at it :) | |
Jun 12, 2023 at 11:14 | history | edited | Thomas | CC BY-SA 4.0 |
added 4805 characters in body
|
Jun 9, 2023 at 9:22 | comment | added | Thomas | @Nick this is a misunderstanding, the answer gives you the cumulative sum with same size as the input data. The SSBO2 stores the Differenz from one workgroup to the next... To calculate the final result of a point within your data, you only need the sum the values from SSBO2 index 0 till the index of the point of interest + the value from SSBO1. As you can see, the problem is still the same, with a difference in size... SSBO1 has size of 50000 where SSBO2 has a size of 50000 / 64. You can use SSBO3 in the same way as SSBO2 to reduce the values to 50000/64/64... Till it has only 64 values left. | |
Jun 8, 2023 at 23:44 | comment | added | Nick | Thanks @Thomas. your answer does contain useful advice about workgroup sizes, but I don't think it is relevant to my question. It seems you are simply adding all the data to produce a sum. The Q clearly asks for "a plot of the same data, but each point relative to the previous one". If I start with 100 points, I want to produce 100 points, each being added on to the previous point (relative instead of absolute). Thus each summation must wait for previous point to be calculated. | |
Jun 7, 2023 at 9:19 | history | answered | Thomas | CC BY-SA 4.0 |