| 542 | mDmaInfo->mCurrentDynamicAllocator->reset(); |
| 543 | } |
| 544 | bool CPUBackend::onSelectDynamicAllocator(int index, int maxIndex) { |
| 545 | if (maxIndex > 2) { |
| 546 | return false; |
| 547 | } |
| 548 | if (maxIndex == 2 && mDmaInfo->mDynamicAllocatorBackup.get() == nullptr) { |
| 549 | mDmaInfo->mDynamicAllocatorBackup.reset(mRuntime->createDynamicBufferAlloctor(1)); |
| 550 | } |
| 551 | if (1 == index) { |
| 552 | mDmaInfo->mCurrentDynamicAllocator = mDmaInfo->mDynamicAllocatorBackup.get(); |
| 553 | } else { |
| 554 | mRuntime->buffer(0)->release(); |
| 555 | mDmaInfo->mCurrentDynamicAllocator = mDmaInfo->mDynamicAllocator.get(); |
| 556 | } |
| 557 | mCache = mDmaInfo->mCacheGroup[index].get(); |
| 558 | return true; |
| 559 | } |
| 560 | |
| 561 | ErrorCode CPUBackend::onResizeEnd() { |
| 562 | getCache()->release(); |
nothing calls this directly
no test coverage detected