mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
Delete copy/move constructors on these RAII guards. (#32727)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/32727 Signed-off-by: Edward Z. Yang <ezyang@fb.com> Test Plan: Imported from OSS Differential Revision: D19621858 Pulled By: ezyang fbshipit-source-id: 5112c849252478d8249de4f8c8c5a2d6caf60672
This commit is contained in:
parent
5ffa1efa52
commit
c7df28a2a3
1 changed files with 8 additions and 0 deletions
|
|
@ -61,6 +61,10 @@ C10_API LocalDispatchKeySet tls_local_dispatch_key_set();
|
|||
class C10_API IncludeDispatchKeyGuard {
|
||||
public:
|
||||
IncludeDispatchKeyGuard(DispatchKey);
|
||||
IncludeDispatchKeyGuard(const IncludeDispatchKeyGuard&) = delete;
|
||||
IncludeDispatchKeyGuard operator=(const IncludeDispatchKeyGuard&) = delete;
|
||||
IncludeDispatchKeyGuard(IncludeDispatchKeyGuard&&) = delete;
|
||||
IncludeDispatchKeyGuard operator=(IncludeDispatchKeyGuard&&) = delete;
|
||||
~IncludeDispatchKeyGuard();
|
||||
private:
|
||||
// A little micro-optimization to save us from tls_get_addr call
|
||||
|
|
@ -73,6 +77,10 @@ private:
|
|||
class C10_API ExcludeDispatchKeyGuard {
|
||||
public:
|
||||
ExcludeDispatchKeyGuard(DispatchKey);
|
||||
ExcludeDispatchKeyGuard(const ExcludeDispatchKeyGuard&) = delete;
|
||||
ExcludeDispatchKeyGuard operator=(const ExcludeDispatchKeyGuard&) = delete;
|
||||
ExcludeDispatchKeyGuard(ExcludeDispatchKeyGuard&&) = delete;
|
||||
ExcludeDispatchKeyGuard operator=(ExcludeDispatchKeyGuard&&) = delete;
|
||||
~ExcludeDispatchKeyGuard();
|
||||
private:
|
||||
// A little micro-optimization to save us from tls_get_addr call
|
||||
|
|
|
|||
Loading…
Reference in a new issue