From 92f46ae4eda10f5862dc9eba4f3a5d8ec6d2e565 Mon Sep 17 00:00:00 2001 From: Dmitry Zolotukhin Date: Sun, 21 Jan 2024 02:23:26 +0100 Subject: [PATCH] Fixed refactored GPU code. --- src/correlation.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/correlation.rs b/src/correlation.rs index 8972f17..7ae8907 100644 --- a/src/correlation.rs +++ b/src/correlation.rs @@ -970,7 +970,7 @@ mod gpu { ) -> Result<(), Box> { let max_width = img1.width().max(img2.width()); let max_height = img1.height().max(img2.height()); - let max_shape = (max_height, max_width); + let max_shape = (max_width, max_height); let img1_shape = (img1.width(), img1.height()); let out_shape = match dir { CorrelationDirection::Forward => self.img1_shape, @@ -1143,7 +1143,7 @@ mod gpu { .device .create_command_encoder(&wgpu::CommandEncoderDescriptor { label: None }); { - let workgroup_size = ((shape.0 + 15) / 16, ((shape.1 + 15) / 16)); + let workgroup_size = ((shape.1 + 15) / 16, ((shape.0 + 15) / 16)); let mut cpass = encoder.begin_compute_pass(&wgpu::ComputePassDescriptor { label: None, timestamp_writes: None,