Skip to content

Commit

Permalink
flow_control: replace a slice() with a subarray() (no speedup)
Browse files Browse the repository at this point in the history
  • Loading branch information
kainino0x committed Oct 30, 2023
1 parent f08d48c commit ef41384
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/webgpu/shader/execution/flow_control/harness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,8 @@ ${main_wgsl.extra}

// returns a string that shows the outputted values to help understand the whole trace.
const print_output_value = () => {
return `Output values (length: ${outputCount}): ${outputs.data
.slice(1, outputCount + 1)
.join(', ')}`;
const subarray = outputs.data.subarray(1, outputCount + 1);
return `Output values (length: ${outputCount}): ${subarray.join(', ')}`;
};

// returns a colorized string of the expect_order() call, highlighting
Expand Down

0 comments on commit ef41384

Please sign in to comment.