| 163 | } |
| 164 | |
| 165 | void* CPUEngine::usmAlloc(size_t byteSize, Storage storage) |
| 166 | { |
| 167 | if (storage != Storage::Host && storage != Storage::Device && storage != Storage::Managed) |
| 168 | throw Exception(Error::InvalidArgument, "invalid storage mode"); |
| 169 | |
| 170 | if (byteSize == 0) |
| 171 | return nullptr; |
| 172 | return alignedMalloc(byteSize); |
| 173 | } |
| 174 | |
| 175 | void CPUEngine::usmFree(void* ptr, Storage storage) |
| 176 | { |
nothing calls this directly
no test coverage detected