aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominic Symes <dominic.symes@arm.com>2024-04-15 15:04:13 +0100
committerDominic Symes <dominic.symes@arm.com>2024-04-18 08:25:46 +0000
commit9d14082fe5176ec91d006d89ccdb2d62f6ca839f (patch)
treef309c3c904ac8cf8a00eaccaffb2b55e92c2a2e8
parentaa162aa6d2287bcc7bfb7b976b3daabc84b62af4 (diff)
downloadspecification-9d14082fe5176ec91d006d89ccdb2d62f6ca839f.tar.gz
RFFT2D: Correct pseudo-code when size is one
When width or height are one then H/2 or W/2 are not integral. This case is clarified. Signed-off-by: Dominic Symes <dominic.symes@arm.com> Change-Id: Iae1346f09b9eecc636d37d40071bdfbce923843b
-rw-r--r--pseudocode/operators/RFFT2D.tosac2
1 files changed, 1 insertions, 1 deletions
diff --git a/pseudocode/operators/RFFT2D.tosac b/pseudocode/operators/RFFT2D.tosac
index c4dfab2..98a0fd1 100644
--- a/pseudocode/operators/RFFT2D.tosac
+++ b/pseudocode/operators/RFFT2D.tosac
@@ -19,7 +19,7 @@ for_each(0 <= n < N, 0 <= oy < H, 0 <= ox < W/2 + 1) {
int32_t ax = (static_cast<size_t>(ix) * static_cast<size_t>(ox)) % static_cast<int32_t>(W);
in_out_t a = sign_val * 2 * pi() * (static_cast<in_out_t>(ay) / H + static_cast<in_out_t>(ax) / W);
sum_real += val_real * cos(a);
- if ((ay % (H/2)) + (ax % (W/2)) > 0) {
+ if ((H > 1 && (ay % (H/2)) > 0) || (W > 1 && (ax % (W/2)) > 0)) {
sum_imag += -val_real * sin(a);
}
}