CUDA Pinned Memory does not depend on device So we pass 1 as numDevices to the constructor so that it creates 1 vector of memory_info When allocating and freeing, it doesn't really matter which device is active
| 73 | // of memory_info |
| 74 | // When allocating and freeing, it doesn't really matter which device is active |
| 75 | class AllocatorPinned final : public arrayfire::common::AllocatorInterface { |
| 76 | public: |
| 77 | AllocatorPinned(); |
| 78 | ~AllocatorPinned() = default; |
| 79 | void shutdown() override; |
| 80 | int getActiveDeviceId() override; |
| 81 | size_t getMaxMemorySize(int id) override; |
| 82 | void *nativeAlloc(const size_t bytes) override; |
| 83 | void nativeFree(void *ptr) override; |
| 84 | }; |
| 85 | |
| 86 | } // namespace cuda |
| 87 | } // namespace arrayfire |
nothing calls this directly
no outgoing calls
no test coverage detected