Skip to content

Commit

Permalink
Up again.
Browse files Browse the repository at this point in the history
Signed-off-by: Chen, Sheng S <sheng.s.chen@intel.com>
  • Loading branch information
ShengchenJ committed Oct 11, 2024
1 parent 89ab6f4 commit 5f146bb
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions clang/runtime/dpct-rt/include/dpct/memory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ template <memory_region Memory, class T = byte_t> class memory_traits {
using accessor_t = typename std::conditional<
Memory == local, sycl::local_accessor<value_t, Dimension>,
sycl::accessor<T, Dimension, mode, target>>::type;
using pointer_t = T *;
using pointer_t = element_t *;
};

static inline void *dpct_malloc(size_t size, sycl::queue &q) {
Expand Down Expand Up @@ -1457,10 +1457,9 @@ template <class T, memory_region Memory> class accessor<T, Memory, 2> {
accessor(typename std::enable_if<M != local, const accessor_t>::type &acc)
: accessor(acc, acc.get_range()) {}
accessor(const accessor_t &acc, const sycl::range<2> &in_range)
: accessor(const_cast<pointer_t>(
acc.template get_multi_ptr<sycl::access::decorated::no>()
.get()),
in_range) {}
: accessor(
acc.template get_multi_ptr<sycl::access::decorated::no>().get(),
in_range) {}

pointer_t operator[](size_t index) const {
return _data + _range.get(1) * index;
Expand Down

0 comments on commit 5f146bb

Please sign in to comment.