Skip to content
Snippets Groups Projects

Dynamic Constant Math

Merged Aaron Councilman requested to merge dyn_const_math into main
1 unresolved thread
4 files
+ 91
44
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -120,9 +120,9 @@ fn denoise<row : usize, col : usize>(input : f32[CHAN, row, col]) -> f32[CHAN, r
for c = 0 to col {
if r >= 1 && r < row - 1 && c >= 1 && c < col - 1 {
let filter : f32[3][3]; // same as [3, 3]
for i = -1 to 2 by 1 {
for j = -1 to 2 by 1 {
filter[i+1, j+1] = input[chan, r + i, c + j];
for i = 0 to 3 by 1 {
for j = 0 to 3 by 1 {
filter[i, j] = input[chan, r + i - 1, c + j - 1];
}
}
res[chan, r, c] = medianMatrix::<f32, 3, 3>(filter);
Loading