aclrtDeviceGetHostAtomicCapabilities
Applicable Products
Product |
Supported |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function
Queries the support status for atomic operations between a specified device and the host.
Prototype
1 | aclError aclrtDeviceGetHostAtomicCapabilities(uint32_t* capabilities, const aclrtAtomicOperation* operations, const uint32_t count, int32_t deviceId) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
capabilities |
Output |
Array of atomic operation capabilities. The array length is the same as the value of the count parameter. Each element in the array is a bitmask, where each bit represents whether atomic operations for a specific data type are supported. 1 indicates support and 0 indicates no support. For details about the type definition, see aclrtAtomicOperationCapability. |
operations |
Input |
Array of atomic operations to be queried. The array length is the same as the value of the count parameter. For details about the type definition, see aclrtAtomicOperation. |
count |
Input |
Number of atomic operations to be queried. The value must be the same as the length of the capabilities and operations arrays. Otherwise, undefined behavior may occur. |
deviceId |
Input |
Device ID. The value must be in the range of [0, (Available device count – 1)]. Call aclrtGetDeviceCount to obtain the device count. |
Returns
0 on success; otherwise, failure. For details, see aclError.