diff options
Diffstat (limited to 'parallel-libs/streamexecutor/lib/HostMemory.cpp')
-rw-r--r-- | parallel-libs/streamexecutor/lib/HostMemory.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/parallel-libs/streamexecutor/lib/HostMemory.cpp b/parallel-libs/streamexecutor/lib/HostMemory.cpp new file mode 100644 index 00000000000..f7fbe044aa3 --- /dev/null +++ b/parallel-libs/streamexecutor/lib/HostMemory.cpp @@ -0,0 +1,29 @@ +//===-- HostMemory.cpp - HostMemory implementation ------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +/// +/// \file +/// Implementation of HostMemory internals. +/// +//===----------------------------------------------------------------------===// + +#include "streamexecutor/HostMemory.h" +#include "streamexecutor/Device.h" + +namespace streamexecutor { +namespace internal { + +void destroyRegisteredHostMemoryInternals(Device *TheDevice, void *Pointer) { + // TODO(jhen): How to handle errors here? + if (Pointer) { + consumeError(TheDevice->unregisterHostMemory(Pointer)); + } +} + +} // namespace internal +} // namespace streamexecutor |