From f2c1dfcbf837aa4e80c889da5b10cc9395484032 Mon Sep 17 00:00:00 2001 From: ekhalabuda <112930468+ekhalabuda@users.noreply.github.com> Date: Thu, 8 Feb 2024 13:43:33 +0300 Subject: [PATCH 1/3] Update ASCII-ART.cpp --- src/ASCII-ART.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ASCII-ART.cpp b/src/ASCII-ART.cpp index ad090f3..c308c72 100644 --- a/src/ASCII-ART.cpp +++ b/src/ASCII-ART.cpp @@ -42,6 +42,9 @@ void ascii_art_halide(uint8_t* src, uint8_t* dst, int input_height, int input_wi //s = Halide::clamp(s/(rx*ry),0,255); ascii(x, y) = cast(s/(rx*ry)); + + ascii.bound(x, 0, 1920).bound(y, 0, 1080).split(y, yo, yi, 1080/4).parallel(yo); + // ascii.realize(output); // Compile Target target; From 9594b79b01fb907cfd07acabb3c18b6f522cce48 Mon Sep 17 00:00:00 2001 From: ekhalabuda <112930468+ekhalabuda@users.noreply.github.com> Date: Thu, 8 Feb 2024 13:46:14 +0300 Subject: [PATCH 2/3] parallel ASCII 2 --- src/ASCII-ART.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ASCII-ART.cpp b/src/ASCII-ART.cpp index c308c72..1e9730e 100644 --- a/src/ASCII-ART.cpp +++ b/src/ASCII-ART.cpp @@ -36,7 +36,7 @@ void ascii_art_halide(uint8_t* src, uint8_t* dst, int input_height, int input_wi if (!ascii.defined()) { // Func padded = BoundaryConditions::constant_exterior(input, 0); - Var x("x"), y("y"); + Var x("x"), y("y"), yo("yo), yi("yi"); RDom r(0, rx, 0, ry); Expr s = sum(cast(input(x*rx + r.x, y*ry + r.y))); From e6afb3ecbd0cbeccd419f673304a9961b9809032 Mon Sep 17 00:00:00 2001 From: ekhalabuda <112930468+ekhalabuda@users.noreply.github.com> Date: Thu, 8 Feb 2024 13:55:25 +0300 Subject: [PATCH 3/3] Update ASCII-ART.cpp --- src/ASCII-ART.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ASCII-ART.cpp b/src/ASCII-ART.cpp index 1e9730e..305201b 100644 --- a/src/ASCII-ART.cpp +++ b/src/ASCII-ART.cpp @@ -36,7 +36,7 @@ void ascii_art_halide(uint8_t* src, uint8_t* dst, int input_height, int input_wi if (!ascii.defined()) { // Func padded = BoundaryConditions::constant_exterior(input, 0); - Var x("x"), y("y"), yo("yo), yi("yi"); + Var x("x"), y("y"), yo("yo"), yi("yi"); RDom r(0, rx, 0, ry); Expr s = sum(cast(input(x*rx + r.x, y*ry + r.y)));