summaryrefslogtreecommitdiff
path: root/parallel-libs/streamexecutor/lib/HostMemory.cpp
blob: f7fbe044aa36db8b14b8d7a2cfc6787fd7962094 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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