diff options
| author | Jason Henline <jhen@google.com> | 2016-08-24 21:31:53 +0000 |
|---|---|---|
| committer | Jason Henline <jhen@google.com> | 2016-08-24 21:31:53 +0000 |
| commit | bcc77b6249a6f193f7322dbb3fdf77482d67bbee (patch) | |
| tree | 0cc0ad0c30836983a7421f25febc7794a2ed55b4 /parallel-libs/streamexecutor/lib/unittests/KernelTest.cpp | |
| parent | 571a6478538ba4802ae19b488c3b3f1e0ae710c6 (diff) | |
| download | bcm5719-llvm-bcc77b6249a6f193f7322dbb3fdf77482d67bbee.tar.gz bcm5719-llvm-bcc77b6249a6f193f7322dbb3fdf77482d67bbee.zip | |
[StreamExecutor] Rename Executor to Device
Summary: This more clearly describes what the class is.
Reviewers: jlebar
Subscribers: jprice, parallel_libs-commits
Differential Revision: https://reviews.llvm.org/D23851
llvm-svn: 279669
Diffstat (limited to 'parallel-libs/streamexecutor/lib/unittests/KernelTest.cpp')
| -rw-r--r-- | parallel-libs/streamexecutor/lib/unittests/KernelTest.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/parallel-libs/streamexecutor/lib/unittests/KernelTest.cpp b/parallel-libs/streamexecutor/lib/unittests/KernelTest.cpp index b5ee8a0cbfc..a19ebfb96bd 100644 --- a/parallel-libs/streamexecutor/lib/unittests/KernelTest.cpp +++ b/parallel-libs/streamexecutor/lib/unittests/KernelTest.cpp @@ -14,7 +14,7 @@ #include <cassert> -#include "streamexecutor/Executor.h" +#include "streamexecutor/Device.h" #include "streamexecutor/Kernel.h" #include "streamexecutor/KernelSpec.h" #include "streamexecutor/PlatformInterfaces.h" @@ -27,7 +27,7 @@ namespace { namespace se = ::streamexecutor; -// An Executor that returns a dummy KernelInterface. +// A Device that returns a dummy KernelInterface. // // During construction it creates a unique_ptr to a dummy KernelInterface and it // also stores a separate copy of the raw pointer that is stored by that @@ -39,10 +39,10 @@ namespace se = ::streamexecutor; // object. The raw pointer copy can then be used to identify the unique_ptr in // its new location (by comparing the raw pointer with unique_ptr::get), to // verify that the unique_ptr ended up where it was supposed to be. -class MockExecutor : public se::Executor { +class MockDevice : public se::Device { public: - MockExecutor() - : se::Executor(nullptr), Unique(llvm::make_unique<se::KernelInterface>()), + MockDevice() + : se::Device(nullptr), Unique(llvm::make_unique<se::KernelInterface>()), Raw(Unique.get()) {} // Moves the unique pointer into the returned se::Expected instance. @@ -51,7 +51,7 @@ public: // out. se::Expected<std::unique_ptr<se::KernelInterface>> getKernelImplementation(const se::MultiKernelLoaderSpec &) override { - assert(Unique && "MockExecutor getKernelImplementation should not be " + assert(Unique && "MockDevice getKernelImplementation should not be " "called more than once"); return std::move(Unique); } @@ -79,15 +79,15 @@ TYPED_TEST_CASE(GetImplementationTest, GetImplementationTypes); // Tests that the kernel create functions properly fetch the implementation // pointers for the kernel objects they construct from the passed-in -// Executor objects. +// Device objects. TYPED_TEST(GetImplementationTest, SetImplementationDuringCreate) { se::MultiKernelLoaderSpec Spec; - MockExecutor MockExecutor; + MockDevice Dev; - auto MaybeKernel = TypeParam::create(&MockExecutor, Spec); + auto MaybeKernel = TypeParam::create(&Dev, Spec); EXPECT_TRUE(static_cast<bool>(MaybeKernel)); se::KernelInterface *Implementation = MaybeKernel->getImplementation(); - EXPECT_EQ(MockExecutor.getRaw(), Implementation); + EXPECT_EQ(Dev.getRaw(), Implementation); } } // namespace |

