aclrtIpcMemSetAttr
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
x |
√ |
|
x |
|
x |
|
x |
|
x |
Description
Sets the attribute for IPC-based memory sharing.
Prototype
1 | aclError aclrtIpcMemSetAttr(const char *key, aclrtIpcMemAttrType type, uint64_t attr) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
key |
Input |
Key of the shared memory. First call aclrtIpcMemGetExportKey to obtain the shared memory key and then pass it as an input. |
type |
Input |
Memory mapping type. For details about the type definition, see aclrtIpcMemAttrType. Currently, the value can be ACL_RT_IPC_MEM_ATTR_ACCESS_LINK to specify whether the serial input/output (SIO) channel or Huawei Cache Coherence System (HCCS) channel is used between two dies during cross-chip access. |
attr |
Input |
Attribute. The following macros are supported:
The macros are defined as follows: #define ACL_RT_IPC_MEM_ATTR_ACCESS_LINK_SIO 0 #define ACL_RT_IPC_MEM_ATTR_ACCESS_LINK_HCCS 1 |
Returns
0 on success; otherwise, failure. For details, see aclError.