From fe2fd1e0e2fe9e9b9b6c73d57840187faf899966 Mon Sep 17 00:00:00 2001 From: Kevin Petit Date: Fri, 19 Jan 2024 11:08:31 +0000 Subject: pseudocode: only use commas to separate ranges in for_each statements The semicolons had no semantic meaning. Signed-off-by: Kevin Petit Change-Id: I9447ea24c82a32c8bfe07fcc560f34a696e59831 --- pseudocode/operators/CONV2D.tosac | 2 +- pseudocode/operators/CONV3D.tosac | 2 +- pseudocode/operators/DEPTHWISE_CONV2D.tosac | 2 +- pseudocode/operators/RESIZE.tosac | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pseudocode/operators/CONV2D.tosac b/pseudocode/operators/CONV2D.tosac index 12620e9..fe61747 100644 --- a/pseudocode/operators/CONV2D.tosac +++ b/pseudocode/operators/CONV2D.tosac @@ -16,7 +16,7 @@ ERROR_IF(OH != idiv_check(IH - 1 + pad_top + pad_bottom - (KH - 1) * dilation_y, ERROR_IF(OW != idiv_check(IW - 1 + pad_left + pad_right - (KW - 1) * dilation_x, stride_x) + 1); ERROR_IF(BC != OC && BC != 1); -for_each(0 <= n < N, 0 <= oy < OH, 0 <= ox < OW; 0 <= oc < OC) { +for_each(0 <= n < N, 0 <= oy < OH, 0 <= ox < OW, 0 <= oc < OC) { out_t acc = 0; index_t iy = oy * stride_y - pad_top; index_t ix = ox * stride_x - pad_left; diff --git a/pseudocode/operators/CONV3D.tosac b/pseudocode/operators/CONV3D.tosac index a0f9130..7568564 100644 --- a/pseudocode/operators/CONV3D.tosac +++ b/pseudocode/operators/CONV3D.tosac @@ -17,7 +17,7 @@ ERROR_IF(OH != idiv_check(IH - 1 + pad_top + pad_bottom - (KH - 1) * dilation_y, ERROR_IF(OW != idiv_check(IW - 1 + pad_left + pad_right - (KW - 1) * dilation_x, stride_x) + 1); ERROR_IF(BC != OC && BC != 1); -for_each(0 <= n < N, 0 <= od < OD, 0 <= oy < OH, 0 <= ox < OW; 0 <= oc < OC) { +for_each(0 <= n < N, 0 <= od < OD, 0 <= oy < OH, 0 <= ox < OW, 0 <= oc < OC) { out_t acc = 0; index_t id = od * stride_d - pad_d0; index_t iy = oy * stride_y - pad_top; diff --git a/pseudocode/operators/DEPTHWISE_CONV2D.tosac b/pseudocode/operators/DEPTHWISE_CONV2D.tosac index c7a0f0f..6cbcc6a 100644 --- a/pseudocode/operators/DEPTHWISE_CONV2D.tosac +++ b/pseudocode/operators/DEPTHWISE_CONV2D.tosac @@ -16,7 +16,7 @@ ERROR_IF(OH != idiv_check(IH - 1 + pad_top + pad_bottom - (KH - 1) * dilation_y, ERROR_IF(OW != idiv_check(IW - 1 + pad_left + pad_right - (KW - 1) * dilation_x, stride_x) + 1); ERROR_IF(BC != C*M && BC != 1); -for_each(0 <= n < N, 0 <= oy < OH, 0 <= ox < OW; 0 <= c < C, 0 <= m < M) { +for_each(0 <= n < N, 0 <= oy < OH, 0 <= ox < OW, 0 <= c < C, 0 <= m < M) { out_t acc = 0; index_t iy = oy * stride_y - pad_top; index_t ix = ox * stride_x - pad_left; diff --git a/pseudocode/operators/RESIZE.tosac b/pseudocode/operators/RESIZE.tosac index fd66530..2a90f5f 100644 --- a/pseudocode/operators/RESIZE.tosac +++ b/pseudocode/operators/RESIZE.tosac @@ -21,7 +21,7 @@ ERROR_IF(border_y < -16 * scale_y_n || border_y >= scale_y_n); ERROR_IF(border_x < -16 * scale_x_n || border_x >= scale_x_n); ERROR_IF(OH != idiv_check((IH - 1) * scale_y_n - offset_y + border_y, scale_y_d) + 1); ERROR_IF(OW != idiv_check((IW - 1) * scale_x_n - offset_x + border_x, scale_x_d) + 1); -for_each(0 <= n < N, 0 <= oy < OH, 0 <= ox < OW; 0 <= c < C) { +for_each(0 <= n < N, 0 <= oy < OH, 0 <= ox < OW, 0 <= c < C) { out_t acc; resize_t dx, dy; resize_t unit_x, unit_y; -- cgit v1.2.1