Skip to content
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
7 changes: 3 additions & 4 deletions sycl/include/sycl/item.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@

#include <sycl/detail/defines.hpp> // for __SYCL_ASSUME_INT
#include <sycl/detail/defines_elementary.hpp> // for __SYCL_ALWAYS_INLINE, __SYC...
#include <sycl/detail/helpers.hpp> // for Builder
#include <sycl/detail/item_base.hpp> // for id, range, ItemBase
#include <sycl/exception.hpp> // for make_error_code, errc, exce...
#include <sycl/id.hpp> // for id, item
#include <sycl/range.hpp> // for range

Expand Down Expand Up @@ -93,8 +91,7 @@ template <int Dimensions = 1, bool with_offset = true> class item {

template <bool has_offset = with_offset>
operator std::enable_if_t<!has_offset, item<Dimensions, true>>() const {
return detail::Builder::createItem<Dimensions, true>(
MImpl.MExtent, MImpl.MIndex, /*Offset*/ {});
return item<Dimensions, true>{MImpl.MExtent, MImpl.MIndex, /*Offset*/ {}};
}

size_t __SYCL_ALWAYS_INLINE get_linear_id() const {
Expand Down Expand Up @@ -128,6 +125,8 @@ template <int Dimensions = 1, bool with_offset = true> class item {

friend class detail::Builder;

template <int, bool> friend class item;

private:
detail::ItemBase<Dimensions, with_offset> MImpl;
};
Expand Down