| 956 | } |
| 957 | |
| 958 | static std::shared_ptr<PoolBuffer> MakeShared(MemoryPool* pool, int64_t alignment) { |
| 959 | std::shared_ptr<MemoryManager> mm; |
| 960 | if (pool == nullptr) { |
| 961 | pool = default_memory_pool(); |
| 962 | mm = default_cpu_memory_manager(); |
| 963 | } else { |
| 964 | mm = CPUDevice::memory_manager(pool); |
| 965 | } |
| 966 | return std::make_shared<PoolBuffer>(std::move(mm), pool, alignment); |
| 967 | } |
| 968 | |
| 969 | static std::unique_ptr<PoolBuffer> MakeUnique(MemoryPool* pool, int64_t alignment) { |
| 970 | std::shared_ptr<MemoryManager> mm; |
nothing calls this directly
no test coverage detected