File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
sycl/plugins/unified_runtime/ur Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 8
8
#pragma once
9
9
10
10
#include < atomic>
11
+ #include < cstdint>
11
12
#include < iostream>
13
+ #include < functional>
12
14
#include < mutex>
13
15
#include < shared_mutex>
14
16
#include < thread>
@@ -99,7 +101,7 @@ class SpinLock {
99
101
std::atomic_flag MLock = ATOMIC_FLAG_INIT;
100
102
};
101
103
102
- // The wrapper for immutable Level-Zero data.
104
+ // The wrapper for immutable data.
103
105
// The data is initialized only once at first access (via ->) with the
104
106
// initialization function provided in Init. All subsequent access to
105
107
// the data just returns the already stored data.
@@ -147,7 +149,7 @@ struct ReferenceCounter {
147
149
148
150
// Supposed to be used in pi*GetInfo* methods where ref count value is
149
151
// requested.
150
- pi_uint32 load () { return RefCount.load (); }
152
+ uint32_t load () { return RefCount.load (); }
151
153
152
154
// This method allows to guard a code which needs to be executed when object's
153
155
// ref count becomes zero after release. It is important to notice that only a
@@ -167,14 +169,13 @@ struct ReferenceCounter {
167
169
bool decrementAndTest () { return --RefCount == 0 ; }
168
170
169
171
private:
170
- std::atomic<pi_uint32 > RefCount;
172
+ std::atomic<uint32_t > RefCount;
171
173
};
172
174
173
175
// Base class to store common data
174
176
struct _pi_object {
175
177
_pi_object () : RefCount{} {}
176
178
177
- // Level Zero doesn't do the reference counting, so we have to do.
178
179
// Must be atomic to prevent data race when incrementing/decrementing.
179
180
ReferenceCounter RefCount;
180
181
You can’t perform that action at this time.
0 commit comments