blob: 62b702b8acfd76b2e36fc34a7be5ac0f46ee7b68 [file] [log] [blame]
//===-- DeviceMemory.cpp - DeviceMemory 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 DeviceMemory class internals.
///
//===----------------------------------------------------------------------===//
#include "streamexecutor/DeviceMemory.h"
#include "streamexecutor/Device.h"
namespace streamexecutor {
GlobalDeviceMemoryBase::~GlobalDeviceMemoryBase() {
if (Handle) {
// TODO(jhen): How to handle errors here.
consumeError(TheDevice->freeDeviceMemory(*this));
}
}
} // namespace streamexecutor