Skip to content

Commit 0493fdd

Browse files
Made ProjectorT proj constexpr
This is possible because ProjectorT is literal type (no state and default constructor).
1 parent 2ad5382 commit 0493fdd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dpctl/tensor/libtensor/include/kernels/integer_advanced_indexing.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class TakeFunctor
9393
ssize_t src_offset = orthog_offsets.get_first_offset();
9494
ssize_t dst_offset = orthog_offsets.get_second_offset();
9595

96-
const ProjectorT proj{};
96+
constexpr ProjectorT proj{};
9797
for (int axis_idx = 0; axis_idx < k_; ++axis_idx) {
9898
indT *ind_data = reinterpret_cast<indT *>(ind_[axis_idx]);
9999

@@ -239,7 +239,7 @@ class PutFunctor
239239
ssize_t dst_offset = orthog_offsets.get_first_offset();
240240
ssize_t val_offset = orthog_offsets.get_second_offset();
241241

242-
const ProjectorT proj{};
242+
constexpr ProjectorT proj{};
243243
for (int axis_idx = 0; axis_idx < k_; ++axis_idx) {
244244
indT *ind_data = reinterpret_cast<indT *>(ind_[axis_idx]);
245245

0 commit comments

Comments
 (0)