Skip to content

Commit ac7130a

Browse files
committed
Merge branch 'work_group_memoy_new' of https://github.com/lbushi25/llvm into work_group_memoy_new
2 parents 9460876 + a0b70e2 commit ac7130a

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

sycl/include/sycl/ext/oneapi/experimental/work_group_memory.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,21 +68,21 @@ class __SYCL_SPECIAL_CLASS __SYCL_TYPE(work_group_memory) work_group_memory
6868
multi_ptr<value_type, access::address_space::local_space, IsDecorated>
6969
get_multi_ptr() const {
7070
return sycl::address_space_cast<access::address_space::local_space,
71-
IsDecorated, value_type>(data_ptr);
71+
IsDecorated, value_type>(ptr);
7272
}
7373
DataT *operator&() const { return ptr; }
7474
operator DataT &() const { return *(this->operator&()); }
7575
template <typename T = DataT,
7676
typename = std::enable_if_t<!std::is_array_v<T>>>
7777
const work_group_memory &operator=(const DataT &value) const {
78-
*data_ptr = value;
78+
*ptr = value;
7979
return *this;
8080
}
8181
#ifdef __SYCL_DEVICE_ONLY__
82-
void __init(__OPENCL_LOCAL_AS__ DataT data) { this->data_ptr = &data; }
82+
void __init(decoratedPtr ptr) { this->ptr = ptr; }
8383
#endif
8484
private:
85-
decoratedPtr data_ptr;
85+
decoratedPtr ptr;
8686
};
8787
} // namespace ext::oneapi::experimental
8888
} // namespace _V1

sycl/include/sycl/handler.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,8 @@ class __SYCL_EXPORT handler {
699699
&Arg) {
700700
addArg(detail::kernel_param_kind_t::kind_work_group_memory, &Arg,
701701
detail::getWorkGroupMemoryOwnSize(
702-
static_cast<ext::oneapi::experimental::work_group_memory<DataT, PropertyListT> *>(Arg)),
702+
static_cast<ext::oneapi::experimental::work_group_memory<
703+
DataT, PropertyListT> *>(Arg)),
703704
ArgIndex);
704705
}
705706

sycl/source/handler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ void handler::processArg(void *Ptr, const detail::kernel_param_kind_t &Kind,
792792
}
793793
case kernel_param_kind_t::kind_work_group_memory: {
794794
addArg(kernel_param_kind_t::kind_std_layout, nullptr,
795-
static_cast<detail::work_group_memory_impl *>(Ptr)->buffer_size,
795+
static_cast<detail::work_group_memory_impl *>(Ptr)->buffer_size,
796796
Index + IndexShift);
797797
break;
798798
}

0 commit comments

Comments
 (0)