File tree Expand file tree Collapse file tree 3 files changed +26
-7
lines changed
libclc/libspirv/include/libspirv/atomic
unified-runtime/source/adapters/native_cpu Expand file tree Collapse file tree 3 files changed +26
-7
lines changed Original file line number Diff line number Diff line change 6
6
//
7
7
//===----------------------------------------------------------------------===//
8
8
9
+ #define __SPIRV_FUNCTION __spirv_AtomicExchange
9
10
#define __SPIRV_FUNCTION_S __spirv_AtomicExchange
10
11
#define __SPIRV_FUNCTION_U __spirv_AtomicExchange
11
12
#define __SPIRV_INT64_BASE
Original file line number Diff line number Diff line change 14
14
#include " ur/ur.hpp"
15
15
#include " ur_api.h"
16
16
17
- UR_APIEXPORT ur_result_t UR_APICALL urQueueGetInfo (ur_queue_handle_t /* hQueue*/ ,
18
- ur_queue_info_t /* propName*/ ,
19
- size_t /* propSize*/ ,
20
- void * /* pPropValue*/ ,
21
- size_t * /* pPropSizeRet*/ ) {
22
-
23
- DIE_NO_IMPLEMENTATION;
17
+ UR_APIEXPORT ur_result_t UR_APICALL urQueueGetInfo (ur_queue_handle_t hQueue,
18
+ ur_queue_info_t propName,
19
+ size_t propSize,
20
+ void *pPropValue,
21
+ size_t *pPropSizeRet) {
22
+
23
+ UrReturnHelper ReturnValue (propSize, pPropValue, pPropSizeRet);
24
+
25
+ switch (propName) {
26
+ case UR_QUEUE_INFO_CONTEXT:
27
+ return ReturnValue (hQueue->getContext ());
28
+ case UR_QUEUE_INFO_DEVICE:
29
+ return ReturnValue (hQueue->getDevice ());
30
+ case UR_QUEUE_INFO_REFERENCE_COUNT:
31
+ return ReturnValue (hQueue->getReferenceCount ());
32
+ case UR_QUEUE_INFO_EMPTY:
33
+ return ReturnValue (hQueue->isEmpty ());
34
+ default :
35
+ return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION;
36
+ }
24
37
}
25
38
26
39
UR_APIEXPORT ur_result_t UR_APICALL urQueueCreate (
Original file line number Diff line number Diff line change @@ -47,6 +47,11 @@ struct ur_queue_handle_t_ : RefCounted {
47
47
48
48
bool isProfiling () const { return profilingEnabled; }
49
49
50
+ bool isEmpty () const {
51
+ // TODO: check that events are done if there were any
52
+ return events.size () == 0 ;
53
+ }
54
+
50
55
private:
51
56
ur_device_handle_t device;
52
57
ur_context_handle_t context;
You can’t perform that action at this time.
0 commit comments