Function: mem_invalidate
Applicable Products
Product |
Supported (√/x) |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Description
Invalidates the cache.
In this version, you do not need to care about the cache coherence between the CPU and NPU and therefore this API is unused in this version.
Prototype
- C Prototype
1aclError aclrtMemInvalidate(void *devPtr, size_t size)
- Python Function
1ret = acl.rt.mem_invalidate(dev_ptr, size)
Parameters
Parameter |
Description |
|---|---|
devPtr |
Int, invalid cache corresponding to the DDR memory. |
size |
Int, DDR memory size, in bytes. The size cannot be 0. |
Return Values
Return Value |
Description |
|---|---|
ret |
Int, error code. 0 on success; else, failure. |
Parent topic: Device Memory Allocation and Deallocation