MCPcopy Create free account
hub / github.com/Meshcapade/difflocks / freeHost

Method freeHost

extensions/include/cuMat/src/Context.h:293–304  ·  view source on GitHub ↗

* \brief Frees memory previously allocated with allocateHost(size_t). * Passing a NULL-pointer should be a no-op. * \param memory the memory to be freed */

Source from the content-addressed store, hash-verified

291 * \param memory the memory to be freed
292 */
293 void freeHost(void* memory)
294 {
295 CUMAT_PROFILING_INC(HostMemFree);
296#if CUMAT_CONTEXT_DEBUG_MEMORY==1
297 if (memory != nullptr) {
298 allocationsHost_--;
299 CUMAT_ASSERT(allocationsHost_ >= 0 && "You freed more pointers than were allocated");
300 }
301#endif
302 //TODO: add a plugin-mechanism for custom allocators
303 CUMAT_SAFE_CALL(cudaFreeHost(memory));
304 }
305
306 /**
307 * \brief Frees memory previously allocated with allocateDevice(size_t).

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected