Function: create_data_buffer
C Prototype |
aclDataBuffer *aclCreateDataBuffer(void *data, size_t size) |
|---|---|
Python Function |
output = acl.create_data_buffer(data, size) |
Function Usage |
Creates data of the aclDataBuffer type to describe the memory address and size. To destroy data of the aclDataBuffer type, call Function: destroy_data_buffer. |
Input Description |
data: int, pointer address for storing data of the aclDataBuffer type. data can be set to 0, indicating that an empty data type is created. In this case, the value of size must be set to 0. The memory needs to be managed by users. You can call acl.rt.malloc/acl.rt.free or acl.rt.malloc_host/acl.rt.free_host to allocate/free memory. size: int, memory size. If you need to use an empty tensor, set the minimum memory size to 1 byte during memory allocation to ensure normal running of subsequent services. |
Return Value |
output: int, pointer address of output aclDataBuffer. |
Restrictions |
None |