Files
llvm-project/parallel-libs/streamexecutor/lib/Stream.cpp
Jason Henline e9a12f1175 [SE] Make Stream movable
Summary:
The example code makes it clear that this is a much better design
decision.

Reviewers: jlebar

Subscribers: jprice, parallel_libs-commits

Differential Revision: https://reviews.llvm.org/D24142

llvm-svn: 280397
2016-09-01 18:35:37 +00:00

26 lines
851 B
C++

//===-- 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 "streamexecutor/Stream.h"
namespace streamexecutor {
Stream::Stream(std::unique_ptr<PlatformStreamHandle> PStream)
: PDevice(PStream->getDevice()), ThePlatformStream(std::move(PStream)),
ErrorMessageMutex(llvm::make_unique<llvm::sys::RWMutex>()) {}
Stream::~Stream() = default;
} // namespace streamexecutor