Skip to content

Commit

Permalink
Fixed refactored GPU code.
Browse files Browse the repository at this point in the history
  • Loading branch information
zlogic committed Jan 21, 2024
1 parent 8df68df commit d608476
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/correlation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,7 @@ mod gpu {
) -> Result<(), Box<dyn error::Error>> {
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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit d608476

Please sign in to comment.