File tree 1 file changed +4
-3
lines changed
dpctl/tensor/libtensor/include/kernels
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -198,8 +198,9 @@ struct SequentialBooleanReduction
198
198
// must convert to boolean first to handle nans
199
199
using dpctl::tensor::type_utils::convert_impl;
200
200
outT val = convert_impl<bool , argT>(inp_[inp_offset]);
201
+ ReductionOp op = reduction_op_;
201
202
202
- red_val = reduction_op_ (red_val, val);
203
+ red_val = op (red_val, val);
203
204
}
204
205
205
206
out_[out_iter_offset] = red_val;
@@ -452,9 +453,9 @@ struct StridedBooleanReduction
452
453
// must convert to boolean first to handle nans
453
454
using dpctl::tensor::type_utils::convert_impl;
454
455
bool val = convert_impl<bool , argT>(inp_[inp_offset]);
456
+ ReductionOp op = reduction_op_;
455
457
456
- local_red_val =
457
- reduction_op_ (local_red_val, static_cast <outT>(val));
458
+ local_red_val = op (local_red_val, static_cast <outT>(val));
458
459
}
459
460
}
460
461
// reduction and atomic operations are performed
You can’t perform that action at this time.
0 commit comments