Skip to content

Commit 14a0cf4

Browse files
Merge pull request #1974 from IntelPython/fix-os-llvm-build-failure
Fix build of dpctl with sycl nightly from 2025-01-18
2 parents f730de1 + f2f1221 commit 14a0cf4

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

dpctl/tensor/libtensor/include/utils/offset_utils.hpp

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -617,8 +617,8 @@ struct NthStrideOffset
617617

618618
template <int nd> struct FixedDimStridedIndexer
619619
{
620-
FixedDimStridedIndexer(const std::array<ssize_t, nd> _shape,
621-
const std::array<ssize_t, nd> _strides,
620+
FixedDimStridedIndexer(const std::array<ssize_t, nd> &_shape,
621+
const std::array<ssize_t, nd> &_strides,
622622
ssize_t _offset)
623623
: _ind(_shape), strides(_strides), starting_offset(_offset)
624624
{
@@ -642,15 +642,15 @@ template <int nd> struct FixedDimStridedIndexer
642642
private:
643643
dpctl::tensor::strides::CIndexer_array<nd, ssize_t> _ind;
644644

645-
const std::array<ssize_t, nd> strides;
645+
std::array<ssize_t, nd> strides;
646646
ssize_t starting_offset;
647647
};
648648

649649
template <int nd> struct TwoOffsets_FixedDimStridedIndexer
650650
{
651-
TwoOffsets_FixedDimStridedIndexer(const std::array<ssize_t, nd> _shape,
652-
const std::array<ssize_t, nd> _strides1,
653-
const std::array<ssize_t, nd> _strides2,
651+
TwoOffsets_FixedDimStridedIndexer(const std::array<ssize_t, nd> &_shape,
652+
const std::array<ssize_t, nd> &_strides1,
653+
const std::array<ssize_t, nd> &_strides2,
654654
ssize_t _offset1,
655655
ssize_t _offset2)
656656
: _ind(_shape), strides1(_strides1), strides2(_strides2),
@@ -684,21 +684,22 @@ template <int nd> struct TwoOffsets_FixedDimStridedIndexer
684684
private:
685685
dpctl::tensor::strides::CIndexer_array<nd, ssize_t> _ind;
686686

687-
const std::array<ssize_t, nd> strides1;
688-
const std::array<ssize_t, nd> strides2;
687+
std::array<ssize_t, nd> strides1;
688+
std::array<ssize_t, nd> strides2;
689689
ssize_t starting_offset1;
690690
ssize_t starting_offset2;
691691
};
692692

693693
template <int nd> struct ThreeOffsets_FixedDimStridedIndexer
694694
{
695-
ThreeOffsets_FixedDimStridedIndexer(const std::array<ssize_t, nd> _shape,
696-
const std::array<ssize_t, nd> _strides1,
697-
const std::array<ssize_t, nd> _strides2,
698-
const std::array<ssize_t, nd> _strides3,
699-
ssize_t _offset1,
700-
ssize_t _offset2,
701-
ssize_t _offset3)
695+
ThreeOffsets_FixedDimStridedIndexer(
696+
const std::array<ssize_t, nd> &_shape,
697+
const std::array<ssize_t, nd> &_strides1,
698+
const std::array<ssize_t, nd> &_strides2,
699+
const std::array<ssize_t, nd> &_strides3,
700+
ssize_t _offset1,
701+
ssize_t _offset2,
702+
ssize_t _offset3)
702703
: _ind(_shape), strides1(_strides1), strides2(_strides2),
703704
strides3(_strides3), starting_offset1(_offset1),
704705
starting_offset2(_offset2), starting_offset3(_offset3)
@@ -738,9 +739,9 @@ template <int nd> struct ThreeOffsets_FixedDimStridedIndexer
738739
private:
739740
dpctl::tensor::strides::CIndexer_array<nd, ssize_t> _ind;
740741

741-
const std::array<ssize_t, nd> strides1;
742-
const std::array<ssize_t, nd> strides2;
743-
const std::array<ssize_t, nd> strides3;
742+
std::array<ssize_t, nd> strides1;
743+
std::array<ssize_t, nd> strides2;
744+
std::array<ssize_t, nd> strides3;
744745
ssize_t starting_offset1;
745746
ssize_t starting_offset2;
746747
ssize_t starting_offset3;

0 commit comments

Comments
 (0)