| 439 | return true; |
| 440 | } |
| 441 | BufferAllocator* CPURuntime::createDynamicBufferAlloctor(int index) const { |
| 442 | if (hint().memoryAllocatorType == Runtime::Allocator_Defer) { |
| 443 | return new DeferBufferAllocator(buffer(index)); |
| 444 | } |
| 445 | if (nullptr != mStaticAllocatorRaw.get()) { |
| 446 | return new EagerBufferAllocator(BufferAllocator::Allocator::createRecurse(mStaticAllocatorRaw.get())); |
| 447 | } |
| 448 | return new EagerBufferAllocator(BufferAllocator::Allocator::createRecurse(mStaticAllocator.get())); |
| 449 | } |
| 450 | CPUBackend::CPUBackend(const CPURuntime* runtime, BackendConfig::PrecisionMode precision, BackendConfig::MemoryMode memory, MNNForwardType type, size_t flags) : Backend(type) { |
| 451 | #ifdef LOG_VERBOSE |
| 452 | MNN_PRINT("cpu backend create\n"); |
no test coverage detected