Change read/write to load/store in Nofitier API
This commit is contained in:
@@ -32,11 +32,11 @@ namespace rocshmem {
|
||||
template<detail::atomic::rocshmem_memory_scope scope>
|
||||
class Notifier {
|
||||
public:
|
||||
__device__ uint64_t read() {
|
||||
__device__ uint64_t load() {
|
||||
return detail::atomic::load<uint64_t, scope>(&value_, orders);
|
||||
}
|
||||
|
||||
__device__ void write(uint64_t val) {
|
||||
__device__ void store(uint64_t val) {
|
||||
detail::atomic::store<uint64_t, scope>(&value_, val, orders);
|
||||
}
|
||||
|
||||
|
||||
@@ -75,8 +75,8 @@ __device__ void SlabHeap::malloc(void** ptr, size_t size) {
|
||||
* Notify other threads in block about the allocation result.
|
||||
*/
|
||||
auto notifier{notifier_.get()};
|
||||
notifier->write(ptr_deref_u64);
|
||||
uint64_t notification_u64{notifier->read()};
|
||||
notifier->store(ptr_deref_u64);
|
||||
uint64_t notification_u64{notifier->load()};
|
||||
notifier->done();
|
||||
|
||||
/*
|
||||
|
||||
@@ -53,8 +53,8 @@ __global__
|
||||
void
|
||||
all_threads_once(uint8_t* raw_memory,
|
||||
Notifier<detail::atomic::memory_scope_workgroup> * notifier) {
|
||||
notifier->write(NOTIFIER_OFFSET);
|
||||
uint64_t offset_u64 {notifier->read()};
|
||||
notifier->store(NOTIFIER_OFFSET);
|
||||
uint64_t offset_u64 {notifier->load()};
|
||||
notifier->done();
|
||||
|
||||
uint64_t raw_memory_u64 {reinterpret_cast<uint64_t>(raw_memory)};
|
||||
|
||||
Reference in New Issue
Block a user