summaryrefslogtreecommitdiffstats
path: root/parallel-libs/streamexecutor/examples/Example.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'parallel-libs/streamexecutor/examples/Example.cpp')
-rw-r--r--parallel-libs/streamexecutor/examples/Example.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/parallel-libs/streamexecutor/examples/Example.cpp b/parallel-libs/streamexecutor/examples/Example.cpp
index af1994da415..8f42ffa0a3b 100644
--- a/parallel-libs/streamexecutor/examples/Example.cpp
+++ b/parallel-libs/streamexecutor/examples/Example.cpp
@@ -121,13 +121,13 @@ int main() {
getOrDie(Device->allocateDeviceMemory<float>(ArraySize));
// Run operations on a stream.
- std::unique_ptr<se::Stream> Stream = getOrDie(Device->createStream());
- Stream->thenCopyH2D<float>(HostX, X)
+ se::Stream Stream = getOrDie(Device->createStream());
+ Stream.thenCopyH2D<float>(HostX, X)
.thenCopyH2D<float>(HostY, Y)
.thenLaunch(ArraySize, 1, *Kernel, A, X, Y)
.thenCopyD2H<float>(X, HostX);
// Wait for the stream to complete.
- se::dieIfError(Stream->blockHostUntilDone());
+ se::dieIfError(Stream.blockHostUntilDone());
// Process output data in HostX.
std::vector<float> ExpectedX = {4, 47, 90, 133};
OpenPOWER on IntegriCloud