diff options
author | Jason Henline <jhen@google.com> | 2016-09-06 22:27:00 +0300 |
---|---|---|
committer | Jason Henline <jhen@google.com> | 2016-09-06 22:27:00 +0300 |
commit | 19eeb37b8c23fb75b7777eb3821fa706b5d0aade (patch) | |
tree | b7392928d57b07e206439bda892a120a382bfe95 /parallel-libs | |
parent | 405c90e6cc5c8a16b4e9e1e0f302e55ff25190a2 (diff) |
[SE] Rename PlatformInterfaces to PlatformDevice
Summary:
The only interface that we ever plan to have in this file is
PlatformDevice, so it makes sense to rename the file to reflect that.
Reviewers: jprice
Subscribers: parallel_libs-commits
Differential Revision: https://reviews.llvm.org/D24269
llvm-svn: 280737
Diffstat (limited to 'parallel-libs')
-rw-r--r-- | parallel-libs/streamexecutor/include/streamexecutor/Device.h | 2 | ||||
-rw-r--r-- | parallel-libs/streamexecutor/include/streamexecutor/PlatformDevice.h (renamed from parallel-libs/streamexecutor/include/streamexecutor/PlatformInterfaces.h) | 23 | ||||
-rw-r--r-- | parallel-libs/streamexecutor/include/streamexecutor/Stream.h | 2 | ||||
-rw-r--r-- | parallel-libs/streamexecutor/lib/CMakeLists.txt | 2 | ||||
-rw-r--r-- | parallel-libs/streamexecutor/lib/Device.cpp | 2 | ||||
-rw-r--r-- | parallel-libs/streamexecutor/lib/Kernel.cpp | 2 | ||||
-rw-r--r-- | parallel-libs/streamexecutor/lib/PlatformDevice.cpp (renamed from parallel-libs/streamexecutor/lib/PlatformInterfaces.cpp) | 6 | ||||
-rw-r--r-- | parallel-libs/streamexecutor/lib/unittests/DeviceTest.cpp | 2 | ||||
-rw-r--r-- | parallel-libs/streamexecutor/lib/unittests/PackedKernelArgumentArrayTest.cpp | 2 | ||||
-rw-r--r-- | parallel-libs/streamexecutor/lib/unittests/SimpleHostPlatformDevice.h | 2 | ||||
-rw-r--r-- | parallel-libs/streamexecutor/lib/unittests/StreamTest.cpp | 2 |
11 files changed, 20 insertions, 27 deletions
diff --git a/parallel-libs/streamexecutor/include/streamexecutor/Device.h b/parallel-libs/streamexecutor/include/streamexecutor/Device.h index 0ee2b2fbc0ba..e431a45b8664 100644 --- a/parallel-libs/streamexecutor/include/streamexecutor/Device.h +++ b/parallel-libs/streamexecutor/include/streamexecutor/Device.h @@ -18,7 +18,7 @@ #include <type_traits> #include "streamexecutor/KernelSpec.h" -#include "streamexecutor/PlatformInterfaces.h" +#include "streamexecutor/PlatformDevice.h" #include "streamexecutor/Utils/Error.h" namespace streamexecutor { diff --git a/parallel-libs/streamexecutor/include/streamexecutor/PlatformInterfaces.h b/parallel-libs/streamexecutor/include/streamexecutor/PlatformDevice.h index 946f8f96a94c..6a46876d8bda 100644 --- a/parallel-libs/streamexecutor/include/streamexecutor/PlatformInterfaces.h +++ b/parallel-libs/streamexecutor/include/streamexecutor/PlatformDevice.h @@ -1,4 +1,4 @@ -//===-- PlatformInterfaces.h - Interfaces to platform impls -----*- C++ -*-===// +//===-- PlatformDevice.h - PlatformDevice class -----------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -8,20 +8,16 @@ //===----------------------------------------------------------------------===// /// /// \file -/// Interfaces to platform-specific implementations. +/// Declaration of the PlatformDevice class. /// -/// The general pattern is that the functions in these interfaces take raw -/// handle types as parameters. This means that these types and functions are -/// not intended for public use. Instead, corresponding methods in public types -/// like Stream, StreamExecutor, and Kernel use C++ templates to create -/// type-safe public interfaces. Those public functions do the type-unsafe work -/// of extracting raw handles from their arguments and forwarding those handles -/// to the methods defined in this file in the proper format. +/// Each specific platform such as CUDA or OpenCL must subclass PlatformDevice +/// and override streamexecutor::Platform::getDevice to return an instance of +/// their PlatformDevice subclass. /// //===----------------------------------------------------------------------===// -#ifndef STREAMEXECUTOR_PLATFORMINTERFACES_H -#define STREAMEXECUTOR_PLATFORMINTERFACES_H +#ifndef STREAMEXECUTOR_PLATFORMDEVICE_H +#define STREAMEXECUTOR_PLATFORMDEVICE_H #include "streamexecutor/DeviceMemory.h" #include "streamexecutor/Kernel.h" @@ -33,9 +29,6 @@ namespace streamexecutor { /// Raw executor methods that must be implemented by each platform. /// -/// This class defines the platform interface that supports executing work on a -/// device. -/// /// The public Device and Stream classes have the type-safe versions of the /// functions in this interface. class PlatformDevice { @@ -184,4 +177,4 @@ public: } // namespace streamexecutor -#endif // STREAMEXECUTOR_PLATFORMINTERFACES_H +#endif // STREAMEXECUTOR_PLATFORMDEVICE_H diff --git a/parallel-libs/streamexecutor/include/streamexecutor/Stream.h b/parallel-libs/streamexecutor/include/streamexecutor/Stream.h index 48dcf32368a6..ac57354fd172 100644 --- a/parallel-libs/streamexecutor/include/streamexecutor/Stream.h +++ b/parallel-libs/streamexecutor/include/streamexecutor/Stream.h @@ -38,7 +38,7 @@ #include "streamexecutor/Kernel.h" #include "streamexecutor/LaunchDimensions.h" #include "streamexecutor/PackedKernelArgumentArray.h" -#include "streamexecutor/PlatformInterfaces.h" +#include "streamexecutor/PlatformDevice.h" #include "streamexecutor/Utils/Error.h" #include "llvm/ADT/Optional.h" diff --git a/parallel-libs/streamexecutor/lib/CMakeLists.txt b/parallel-libs/streamexecutor/lib/CMakeLists.txt index 79ae5c748b06..8c3ac0251686 100644 --- a/parallel-libs/streamexecutor/lib/CMakeLists.txt +++ b/parallel-libs/streamexecutor/lib/CMakeLists.txt @@ -12,7 +12,7 @@ add_library( KernelSpec.cpp PackedKernelArgumentArray.cpp Platform.cpp - PlatformInterfaces.cpp + PlatformDevice.cpp PlatformManager.cpp Stream.cpp) target_link_libraries(streamexecutor ${llvm_libs}) diff --git a/parallel-libs/streamexecutor/lib/Device.cpp b/parallel-libs/streamexecutor/lib/Device.cpp index 0d81fb78e2d4..260c1ba17cd8 100644 --- a/parallel-libs/streamexecutor/lib/Device.cpp +++ b/parallel-libs/streamexecutor/lib/Device.cpp @@ -16,7 +16,7 @@ #include <cassert> -#include "streamexecutor/PlatformInterfaces.h" +#include "streamexecutor/PlatformDevice.h" #include "streamexecutor/Stream.h" #include "llvm/ADT/STLExtras.h" diff --git a/parallel-libs/streamexecutor/lib/Kernel.cpp b/parallel-libs/streamexecutor/lib/Kernel.cpp index 61305372f184..55a83514f485 100644 --- a/parallel-libs/streamexecutor/lib/Kernel.cpp +++ b/parallel-libs/streamexecutor/lib/Kernel.cpp @@ -16,7 +16,7 @@ #include "streamexecutor/Device.h" #include "streamexecutor/Kernel.h" -#include "streamexecutor/PlatformInterfaces.h" +#include "streamexecutor/PlatformDevice.h" #include "llvm/DebugInfo/Symbolize/Symbolize.h" diff --git a/parallel-libs/streamexecutor/lib/PlatformInterfaces.cpp b/parallel-libs/streamexecutor/lib/PlatformDevice.cpp index e9378b519df3..8dd44a3a4aac 100644 --- a/parallel-libs/streamexecutor/lib/PlatformInterfaces.cpp +++ b/parallel-libs/streamexecutor/lib/PlatformDevice.cpp @@ -1,4 +1,4 @@ -//===-- PlatformInterfaces.cpp - Platform interface implementations -------===// +//===-- PlatformDevice.cpp - Platform interface implementations -----------===// // // The LLVM Compiler Infrastructure // @@ -8,11 +8,11 @@ //===----------------------------------------------------------------------===// /// /// \file -/// Implementation file for PlatformInterfaces.h. +/// Implementation file for PlatformDevice.h. /// //===----------------------------------------------------------------------===// -#include "streamexecutor/PlatformInterfaces.h" +#include "streamexecutor/PlatformDevice.h" namespace streamexecutor { diff --git a/parallel-libs/streamexecutor/lib/unittests/DeviceTest.cpp b/parallel-libs/streamexecutor/lib/unittests/DeviceTest.cpp index 593f1d1cd374..08f870d00ba3 100644 --- a/parallel-libs/streamexecutor/lib/unittests/DeviceTest.cpp +++ b/parallel-libs/streamexecutor/lib/unittests/DeviceTest.cpp @@ -17,7 +17,7 @@ #include "SimpleHostPlatformDevice.h" #include "streamexecutor/Device.h" -#include "streamexecutor/PlatformInterfaces.h" +#include "streamexecutor/PlatformDevice.h" #include "gtest/gtest.h" diff --git a/parallel-libs/streamexecutor/lib/unittests/PackedKernelArgumentArrayTest.cpp b/parallel-libs/streamexecutor/lib/unittests/PackedKernelArgumentArrayTest.cpp index 3fe25630e8ec..dd6d0e1c6556 100644 --- a/parallel-libs/streamexecutor/lib/unittests/PackedKernelArgumentArrayTest.cpp +++ b/parallel-libs/streamexecutor/lib/unittests/PackedKernelArgumentArrayTest.cpp @@ -16,7 +16,7 @@ #include "streamexecutor/Device.h" #include "streamexecutor/DeviceMemory.h" #include "streamexecutor/PackedKernelArgumentArray.h" -#include "streamexecutor/PlatformInterfaces.h" +#include "streamexecutor/PlatformDevice.h" #include "llvm/ADT/Twine.h" diff --git a/parallel-libs/streamexecutor/lib/unittests/SimpleHostPlatformDevice.h b/parallel-libs/streamexecutor/lib/unittests/SimpleHostPlatformDevice.h index b54b31dd457e..5c5953098c47 100644 --- a/parallel-libs/streamexecutor/lib/unittests/SimpleHostPlatformDevice.h +++ b/parallel-libs/streamexecutor/lib/unittests/SimpleHostPlatformDevice.h @@ -20,7 +20,7 @@ #include <cstdlib> #include <cstring> -#include "streamexecutor/PlatformInterfaces.h" +#include "streamexecutor/PlatformDevice.h" namespace streamexecutor { namespace test { diff --git a/parallel-libs/streamexecutor/lib/unittests/StreamTest.cpp b/parallel-libs/streamexecutor/lib/unittests/StreamTest.cpp index 3a0f4e6fdd2c..65598540d674 100644 --- a/parallel-libs/streamexecutor/lib/unittests/StreamTest.cpp +++ b/parallel-libs/streamexecutor/lib/unittests/StreamTest.cpp @@ -18,7 +18,7 @@ #include "streamexecutor/Device.h" #include "streamexecutor/Kernel.h" #include "streamexecutor/KernelSpec.h" -#include "streamexecutor/PlatformInterfaces.h" +#include "streamexecutor/PlatformDevice.h" #include "streamexecutor/Stream.h" #include "gtest/gtest.h" |