Skip to content

Fix build of dpctl with sycl nightly from 2025-01-18 #1974

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 19, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 19 additions & 18 deletions dpctl/tensor/libtensor/include/utils/offset_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -617,8 +617,8 @@ struct NthStrideOffset

template <int nd> struct FixedDimStridedIndexer
{
FixedDimStridedIndexer(const std::array<ssize_t, nd> _shape,
const std::array<ssize_t, nd> _strides,
FixedDimStridedIndexer(const std::array<ssize_t, nd> &_shape,
const std::array<ssize_t, nd> &_strides,
ssize_t _offset)
: _ind(_shape), strides(_strides), starting_offset(_offset)
{
Expand All @@ -642,15 +642,15 @@ template <int nd> struct FixedDimStridedIndexer
private:
dpctl::tensor::strides::CIndexer_array<nd, ssize_t> _ind;

const std::array<ssize_t, nd> strides;
std::array<ssize_t, nd> strides;
ssize_t starting_offset;
};

template <int nd> struct TwoOffsets_FixedDimStridedIndexer
{
TwoOffsets_FixedDimStridedIndexer(const std::array<ssize_t, nd> _shape,
const std::array<ssize_t, nd> _strides1,
const std::array<ssize_t, nd> _strides2,
TwoOffsets_FixedDimStridedIndexer(const std::array<ssize_t, nd> &_shape,
const std::array<ssize_t, nd> &_strides1,
const std::array<ssize_t, nd> &_strides2,
ssize_t _offset1,
ssize_t _offset2)
: _ind(_shape), strides1(_strides1), strides2(_strides2),
Expand Down Expand Up @@ -684,21 +684,22 @@ template <int nd> struct TwoOffsets_FixedDimStridedIndexer
private:
dpctl::tensor::strides::CIndexer_array<nd, ssize_t> _ind;

const std::array<ssize_t, nd> strides1;
const std::array<ssize_t, nd> strides2;
std::array<ssize_t, nd> strides1;
std::array<ssize_t, nd> strides2;
ssize_t starting_offset1;
ssize_t starting_offset2;
};

template <int nd> struct ThreeOffsets_FixedDimStridedIndexer
{
ThreeOffsets_FixedDimStridedIndexer(const std::array<ssize_t, nd> _shape,
const std::array<ssize_t, nd> _strides1,
const std::array<ssize_t, nd> _strides2,
const std::array<ssize_t, nd> _strides3,
ssize_t _offset1,
ssize_t _offset2,
ssize_t _offset3)
ThreeOffsets_FixedDimStridedIndexer(
const std::array<ssize_t, nd> &_shape,
const std::array<ssize_t, nd> &_strides1,
const std::array<ssize_t, nd> &_strides2,
const std::array<ssize_t, nd> &_strides3,
ssize_t _offset1,
ssize_t _offset2,
ssize_t _offset3)
: _ind(_shape), strides1(_strides1), strides2(_strides2),
strides3(_strides3), starting_offset1(_offset1),
starting_offset2(_offset2), starting_offset3(_offset3)
Expand Down Expand Up @@ -738,9 +739,9 @@ template <int nd> struct ThreeOffsets_FixedDimStridedIndexer
private:
dpctl::tensor::strides::CIndexer_array<nd, ssize_t> _ind;

const std::array<ssize_t, nd> strides1;
const std::array<ssize_t, nd> strides2;
const std::array<ssize_t, nd> strides3;
std::array<ssize_t, nd> strides1;
std::array<ssize_t, nd> strides2;
std::array<ssize_t, nd> strides3;
ssize_t starting_offset1;
ssize_t starting_offset2;
ssize_t starting_offset3;
Expand Down
Loading