Skip to content

Commit

Permalink
Minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
clebert committed Oct 19, 2023
1 parent b3554e3 commit ee33631
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tensor.zig
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ fn _computeScalarProduct(
var output_values: @Vector(vector_size, f32) = @splat(0.0);
var index: usize = 0;

while (index <= input_1.values.len - vector_size) : (index += vector_size) {
while (index < input_1.values.len) : (index += vector_size) {
output_values +=
@as(@Vector(vector_size, f32), input_1.values[index..][0..vector_size].*) *
@as(@Vector(vector_size, f32), input_2.values[index..][0..vector_size].*);
Expand Down

0 comments on commit ee33631

Please sign in to comment.