aclrtDeviceGetBareTgid
Description
Obtains the ID of the current process.
This API has been adapted to the physical machine and VM scenarios when obtaining the process ID. You only need to call it to obtain the process ID and then configure other APIs (see aclrtMemExportToShareableHandle for assisting processes) to share the physical memory. If you do not call this API to obtain the process ID, an exception may occur when you use the process ID.
Prototype
aclError aclrtDeviceGetBareTgid(int32_t *pid)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
pid |
Output |
Process ID. |
Returns
The value 0 indicates success, and other values indicate failure. For details, see aclError.
Parent topic: Memory Management