Function: allocator_set_alloc_advise_func_to_desc
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function
Sets the callback function for allocating memory blocks based on recommended addresses when the user-provided Allocator is used. This function is generally used in memory reuse scenario.
Prototype
- C Prototype
1aclError aclrtAllocatorSetAllocAdviseFuncToDesc(aclrtAllocatorDesc allocatorDesc, aclrtAllocatorAllocAdviseFunc func)
- Python Function
1ret = acl.rt.allocator_set_alloc_advise_func_to_desc(allocatorDesc, func)
Parameters
Parameter |
Description |
|---|---|
allocatorDesc |
Int, pointer address of the allocator descriptor. Call acl.rt.allocator_create_desc to set the Allocator description in advance. |
func |
Return Value
Returned Value |
Description |
|---|---|
ret |
Int, 0 on success; else, failure. |
Parent topic: aclrtAllocatorDesc