pytorch/c10/impl/DeviceGuardImplInterface.cpp
Edward Yang fbabe5bf62 Rename c10::detail to c10::impl (#13838)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/13838

According to Sebastian, the detail convention is specifically for header-private
functionality.  That's not what c10/detail is; it's general, library private headers
which may be used in multiple places within PyTorch.  Rename it to impl to avoid
the confusion in nomenclature.

Reviewed By: smessmer

Differential Revision: D13024368

fbshipit-source-id: 050f2632d83a69e3ae53ded88e8f938c5d61f0ef
2018-11-14 07:39:37 -08:00

13 lines
426 B
C++

#include <c10/impl/DeviceGuardImplInterface.h>
namespace c10 {
namespace impl {
std::atomic<const DeviceGuardImplInterface*>
device_guard_impl_registry[static_cast<size_t>(DeviceType::COMPILE_TIME_MAX_DEVICE_TYPES)];
DeviceGuardImplRegistrar::DeviceGuardImplRegistrar(DeviceType type, const DeviceGuardImplInterface* impl) {
device_guard_impl_registry[static_cast<size_t>(type)].store(impl);
}
}} // namespace c10::impl