From fbf08d0d2f56576cbb7d15c803e23e3a43bb5293 Mon Sep 17 00:00:00 2001 From: lkcl Date: Mon, 11 Apr 2022 09:47:08 +0100 Subject: [PATCH] --- openpower/sv/svp64/appendix.mdwn | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openpower/sv/svp64/appendix.mdwn b/openpower/sv/svp64/appendix.mdwn index a94caed5e..6896b8726 100644 --- a/openpower/sv/svp64/appendix.mdwn +++ b/openpower/sv/svp64/appendix.mdwn @@ -851,6 +851,7 @@ achieved in DCT and FFT REMAP** /// /// all input arrays have length `vl` def reduce(vl, vec, pred): + pred = copy(pred) # must not damage preficate step = 1; while step < vl step *= 2; @@ -887,7 +888,8 @@ An alternative algorithm is therefore required that does not perform MVs, and does not require additional state to be saved on context-switching. ``` -def reduce( vl, vec, pred, pred,): +def reduce( vl, vec, pred ): + pred = copy(pred) # must not damage predicate j = 0 vi = [] # array of lookup indices to skip nonpredicated for i, pbit in enumerate(pred): -- 2.30.2