summaryrefslogtreecommitdiffstats
path: root/parallel-libs/streamexecutor/lib/Stream.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'parallel-libs/streamexecutor/lib/Stream.cpp')
-rw-r--r--parallel-libs/streamexecutor/lib/Stream.cpp54
1 files changed, 0 insertions, 54 deletions
diff --git a/parallel-libs/streamexecutor/lib/Stream.cpp b/parallel-libs/streamexecutor/lib/Stream.cpp
deleted file mode 100644
index fe135b4d0af..00000000000
--- a/parallel-libs/streamexecutor/lib/Stream.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-//===-- Stream.cpp - General stream implementation ------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-///
-/// \file
-/// This file contains the implementation details for a general stream object.
-///
-//===----------------------------------------------------------------------===//
-
-#include <cassert>
-
-#include "streamexecutor/Stream.h"
-
-namespace streamexecutor {
-
-Stream::Stream(PlatformDevice *D, const void *PlatformStreamHandle)
- : PDevice(D), PlatformStreamHandle(PlatformStreamHandle),
- ErrorMessageMutex(llvm::make_unique<llvm::sys::RWMutex>()) {
- assert(D != nullptr &&
- "cannot construct a stream object with a null platform device");
- assert(PlatformStreamHandle != nullptr &&
- "cannot construct a stream object with a null platform stream handle");
-}
-
-Stream::Stream(Stream &&Other) noexcept
- : PDevice(Other.PDevice), PlatformStreamHandle(Other.PlatformStreamHandle),
- ErrorMessageMutex(std::move(Other.ErrorMessageMutex)),
- ErrorMessage(std::move(Other.ErrorMessage)) {
- Other.PDevice = nullptr;
- Other.PlatformStreamHandle = nullptr;
-}
-
-Stream &Stream::operator=(Stream &&Other) noexcept {
- PDevice = Other.PDevice;
- PlatformStreamHandle = Other.PlatformStreamHandle;
- ErrorMessageMutex = std::move(Other.ErrorMessageMutex);
- ErrorMessage = std::move(Other.ErrorMessage);
- Other.PDevice = nullptr;
- Other.PlatformStreamHandle = nullptr;
- return *this;
-}
-
-Stream::~Stream() {
- if (PlatformStreamHandle)
- // TODO(jhen): Handle error condition here.
- consumeError(PDevice->destroyStream(PlatformStreamHandle));
-}
-
-} // namespace streamexecutor
OpenPOWER on IntegriCloud