Skip to content

Commit

Permalink
make more kernel names unique
Browse files Browse the repository at this point in the history
  • Loading branch information
Titaniumtown committed Oct 20, 2024
1 parent 987e20a commit 73fb214
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON)

SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR})
include("macro.cmake")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 20)

# Define dependencies
if(DEFINED HALIDE_DISTRIB_DIR)
Expand Down
2 changes: 2 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ stdenv.mkDerivation {
halide
libtiff
libpng
gnumake
libraw
];
}
8 changes: 4 additions & 4 deletions src/finish.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -398,13 +398,13 @@ Func combine(Func im1, Func im2, Expr width, Expr height, Func dist) {

// current gauss layer of images

blurred1 = gauss_7x7(blurred1, "img1_layer_" + layer_str);
blurred2 = gauss_7x7(blurred2, "img1_layer_" + layer_str);
blurred1 = gauss_7x7(blurred1, "img1_layer_" + layer_str + "_1");
blurred2 = gauss_7x7(blurred2, "img1_layer_" + layer_str + "_2");

// current gauss layer of masks

mask1 = gauss_7x7(mask1, "mask1_layer_" + layer_str);
mask2 = gauss_7x7(mask2, "mask2_layer_" + layer_str);
mask1 = gauss_7x7(mask1, "mask1_layer_" + layer_str + "_1");
mask2 = gauss_7x7(mask2, "mask2_layer_" + layer_str + "_2");
}

// add the highest pyramid layer (lowest frequency band)
Expand Down
6 changes: 3 additions & 3 deletions src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Func box_down2(Func input, std::string name) {
Func gauss_down4(Func input, std::string name) {

Func output(name);
Buffer<uint32_t> k(5, 5, "gauss_down4_kernel");
Buffer<uint32_t> k(5, 5, "gauss_down4_kernel_" + name);
k.translate({-2, -2});

Var x, y, n;
Expand Down Expand Up @@ -115,7 +115,7 @@ Func gauss_7x7(Func input, std::string name) {

// gaussian kernel

Buffer<float> k(7, "gauss_7x7_kernel");
Buffer<float> k(7, "gauss_7x7_kernel_" + name);
k.translate({-3});

Var x;
Expand All @@ -132,7 +132,7 @@ Func gauss_15x15(Func input, std::string name) {

// gaussian kernel

Buffer<float> k(15, "gauss_15x15");
Buffer<float> k(15, "gauss_15x15_" + name);
k.translate({-7});

Var x;
Expand Down

0 comments on commit 73fb214

Please sign in to comment.