diff options
author | Kevin Petit <kevin.petit@arm.com> | 2024-02-08 11:04:01 +0000 |
---|---|---|
committer | Kevin Petit <kevin.petit@arm.com> | 2024-02-23 18:44:46 +0000 |
commit | 2aa2552bc4e2bec84c7b6b3718b5a9355bc4c2b0 (patch) | |
tree | 0140b27665de166cea1e7ea1599f6aa84608ba96 /pseudocode/operators/CAST.tosac | |
parent | afaaa673e1620315e0d7d863d7bcef1a2dc54df9 (diff) | |
download | specification-2aa2552bc4e2bec84c7b6b3718b5a9355bc4c2b0.tar.gz |
pseudocode: a few more simple syntax fixes
- Use function call syntax for static_cast and sizeof
- Replace undefined in_u_t with in_t
- Add missing semicolon
Change-Id: If6147ae93b371230cbebdf45a55490bf462a8219
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
Diffstat (limited to 'pseudocode/operators/CAST.tosac')
-rw-r--r-- | pseudocode/operators/CAST.tosac | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pseudocode/operators/CAST.tosac b/pseudocode/operators/CAST.tosac index 4e2dca3..b8fdea9 100644 --- a/pseudocode/operators/CAST.tosac +++ b/pseudocode/operators/CAST.tosac @@ -28,11 +28,11 @@ for_each(index in shape) { out = (in) ? 1 : 0; } else if (is_floating_point<in_t>()) { out = truncate<out_t>(apply_clip_s<i32_t>(round_to_nearest_int(in), minimum_s<out_t>(), maximum_s<out_t>())); - } else if (sizeof(out_t) >= sizeof(in_t)) { + } else if (sizeof<out_t>() >= sizeof<in_t>()) { out = sign_extend<out_t>(in); } else { out = truncate<out_t>(in); } } - tensor_write<out_t>(output, shape, index, out) + tensor_write<out_t>(output, shape, index, out); } |