Skip to content

Commit

Permalink
Rename adapter class -> Adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
aarongreig committed Sep 13, 2024
1 parent c67ad44 commit 2c7f696
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions sycl/include/sycl/detail/ur.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ __SYCL_EXPORT void contextSetExtendedDeleter(const sycl::context &constext,
void *user_data);
}

class adapter;
using AdapterPtr = std::shared_ptr<adapter>;
class Adapter;
using AdapterPtr = std::shared_ptr<Adapter>;

// TODO: To be removed as this was only introduced for esimd which was removed.
template <sycl::backend BE>
Expand Down
20 changes: 10 additions & 10 deletions sycl/source/detail/adapter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ namespace detail {
/// runtimes for the device-agnostic SYCL runtime.
///
/// \ingroup sycl_ur
class adapter {
class Adapter {
public:
adapter() = delete;
Adapter() = delete;

adapter(ur_adapter_handle_t adapter, backend UseBackend)
Adapter(ur_adapter_handle_t adapter, backend UseBackend)
: MAdapter(adapter), MBackend(UseBackend),
TracingMutex(std::make_shared<std::mutex>()),
MAdapterMutex(std::make_shared<std::mutex>()) {
Expand All @@ -58,12 +58,12 @@ class adapter {
}

// Disallow accidental copies of adapters
adapter &operator=(const adapter &) = delete;
adapter(const adapter &) = delete;
adapter &operator=(adapter &&other) noexcept = delete;
adapter(adapter &&other) noexcept = delete;
Adapter &operator=(const Adapter &) = delete;
Adapter(const Adapter &) = delete;
Adapter &operator=(Adapter &&other) noexcept = delete;
Adapter(Adapter &&other) noexcept = delete;

~adapter() = default;
~Adapter() = default;

/// \throw SYCL 2020 exception(errc) if ur_result is not UR_RESULT_SUCCESS
template <sycl::errc errc = sycl::errc::runtime>
Expand Down Expand Up @@ -226,9 +226,9 @@ class adapter {
void *UrLoaderHandle = nullptr;
#endif
UrFuncPtrMapT UrFuncPtrs;
}; // class adapter
}; // class Adapter

using AdapterPtr = std::shared_ptr<adapter>;
using AdapterPtr = std::shared_ptr<Adapter>;

} // namespace detail
} // namespace _V1
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/event_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class graph_impl;
}
class context;
namespace detail {
class adapter;
class Adapter;
class context_impl;
using ContextImplPtr = std::shared_ptr<sycl::detail::context_impl>;
class queue_impl;
Expand Down
4 changes: 2 additions & 2 deletions sycl/source/detail/global_handler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ class context_impl;
class Scheduler;
class ProgramManager;
class Sync;
class adapter;
class Adapter;
class ods_target_list;
class XPTIRegistry;
class ThreadPool;

using PlatformImplPtr = std::shared_ptr<platform_impl>;
using ContextImplPtr = std::shared_ptr<context_impl>;
using AdapterPtr = std::shared_ptr<adapter>;
using AdapterPtr = std::shared_ptr<Adapter>;

/// Wrapper class for global data structures with non-trivial destructors.
///
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/platform_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class platform_impl {
/// \param APlatform is a raw plug-in platform handle.
/// \param AAdapter is a plug-in handle.
explicit platform_impl(ur_platform_handle_t APlatform,
const std::shared_ptr<adapter> &AAdapter)
const std::shared_ptr<Adapter> &AAdapter)
: MPlatform(APlatform), MAdapter(AAdapter) {
// Find out backend of the platform
ur_platform_backend_t UrBackend = UR_PLATFORM_BACKEND_UNKNOWN;
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/sycl_mem_obj_t.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace detail {
// Forward declarations
class context_impl;
class event_impl;
class adapter;
class Adapter;

using ContextImplPtr = std::shared_ptr<context_impl>;
using EventImplPtr = std::shared_ptr<event_impl>;
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/ur.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ static void initializeAdapters(std::vector<AdapterPtr> &Adapters,
sizeof(adapterBackend), &adapterBackend,
nullptr));
auto syclBackend = UrToSyclBackend(adapterBackend);
Adapters.emplace_back(std::make_shared<adapter>(UrAdapter, syclBackend));
Adapters.emplace_back(std::make_shared<Adapter>(UrAdapter, syclBackend));
}

#ifdef XPTI_ENABLE_INSTRUMENTATION
Expand Down

0 comments on commit 2c7f696

Please sign in to comment.