/usr/local/lib64/python3.6/site-packages/torch/include/ATen/core/dispatch
NameSizeModeActions
CppSignature.h24220644editdlrm
Dispatcher.h248200644editdlrm
DispatchKeyExtractor.h79890644editdlrm
ObservedOperators.h3290644editdlrm
OperatorEntry.h114950644editdlrm
OperatorOptions.h9230644editdlrm
RegistrationHandleRAII.h8580644editdlrm
Edit: /usr/local/lib64/python3.6/site-packages/torch/include/ATen/core/dispatch/RegistrationHandleRAII.h (858B)
#pragma once #include namespace c10 { class RegistrationHandleRAII final { public: explicit RegistrationHandleRAII(std::function onDestruction) : onDestruction_(std::move(onDestruction)) {} ~RegistrationHandleRAII() { if (onDestruction_) { onDestruction_(); } } RegistrationHandleRAII(const RegistrationHandleRAII&) = delete; RegistrationHandleRAII& operator=(const RegistrationHandleRAII&) = delete; RegistrationHandleRAII(RegistrationHandleRAII&& rhs) noexcept : onDestruction_(std::move(rhs.onDestruction_)) { rhs.onDestruction_ = nullptr; } RegistrationHandleRAII& operator=(RegistrationHandleRAII&& rhs) noexcept { onDestruction_ = std::move(rhs.onDestruction_); rhs.onDestruction_ = nullptr; return *this; } private: std::function onDestruction_; }; }