mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-15 12:39:19 +00:00
[OpenMP][NFC] Added DeviceID and Event pointer to __tgt_async_info
DeviceID is added for some cases that we only have the __tgt_async_info but do not know its corresponding device id. However, to communicate with target plugins, we need that information. Event is added for another way to synchronize.
This commit is contained in:
parent
bbf89644b5
commit
ee1bf45e1d
@ -114,10 +114,14 @@ struct __tgt_target_table {
|
||||
/// This struct contains information exchanged between different asynchronous
|
||||
/// operations for device-dependent optimization and potential synchronization
|
||||
struct __tgt_async_info {
|
||||
// Device ID. Note that it is NOT the RTLDeviceID. We don't need to store the
|
||||
// RTLDeviceID explicitly as we can always get it via DeviceID.
|
||||
int DeviceID = -1;
|
||||
// A pointer to a queue-like structure where offloading operations are issued.
|
||||
// We assume to use this structure to do synchronization. In CUDA backend, it
|
||||
// is CUstream.
|
||||
// We assume to use this structure to do synchronization.
|
||||
void *Queue = nullptr;
|
||||
// A pointer to a device-dependent event used for synchronization as well.
|
||||
void *Event = nullptr;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
Loading…
x
Reference in New Issue
Block a user