Skip to content

Commit d1de259

Browse files
committed
removed unnecessary copies in reduction templates
1 parent 2036b38 commit d1de259

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

dpctl/tensor/libtensor/source/reduction_over_axis.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ namespace py_internal
5555

5656
template <typename strided_fnT, typename contig_fnT>
5757
std::pair<sycl::event, sycl::event> py_reduction_over_axis(
58-
dpctl::tensor::usm_ndarray src,
58+
const dpctl::tensor::usm_ndarray &src,
5959
int trailing_dims_to_reduce, // comp over this many trailing indexes
60-
dpctl::tensor::usm_ndarray dst,
61-
sycl::queue exec_q,
60+
const dpctl::tensor::usm_ndarray &dst,
61+
sycl::queue &exec_q,
6262
const std::vector<sycl::event> &depends,
6363
const strided_fnT &atomic_dispatch_table,
6464
const strided_fnT &temps_dispatch_table,
@@ -393,10 +393,10 @@ std::pair<sycl::event, sycl::event> py_reduction_over_axis(
393393

394394
template <typename fn_tableT>
395395
std::pair<sycl::event, sycl::event> py_search_over_axis(
396-
dpctl::tensor::usm_ndarray src,
396+
const dpctl::tensor::usm_ndarray &src,
397397
int trailing_dims_to_reduce, // comp over this many trailing indexes
398-
dpctl::tensor::usm_ndarray dst,
399-
sycl::queue exec_q,
398+
const dpctl::tensor::usm_ndarray &dst,
399+
sycl::queue &exec_q,
400400
const std::vector<sycl::event> &depends,
401401
const fn_tableT &dispatch_table)
402402
{

0 commit comments

Comments
 (0)