Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to perform grouped sums in a vector? #365

Open
velonica0 opened this issue Sep 2, 2024 · 1 comment
Open

Is it possible to perform grouped sums in a vector? #365

velonica0 opened this issue Sep 2, 2024 · 1 comment

Comments

@velonica0
Copy link

Hi,
The vredsum instruction reduces all the data in the vector. Can it be grouped and reduced?
For example, for the input [1,2,3,4,5,6,7,8], the output is [10,26]. Every 4 numbers are grouped and added, and the output is still a vector.

@dzaima
Copy link

dzaima commented Sep 23, 2024

There are no RVV1.0 instructions that do this, so no. From what I understand, the intended way to do operations like this is to do a 4 segment load (e.g. vluxseg4ei32.v / __riscv_vluxseg4ei32_v_i32m1x4) and do three vadd.vvs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants