Home
last modified time | relevance | path

Searched full:guard (Results 1 – 25 of 4014) sorted by relevance

12345678910>>...161

/external/guava/guava/src/com/google/common/util/concurrent/
DMonitor.java164 * <p>This version adds some verbosity around the {@code Guard} objects, but removes that same
174 * private final Monitor.Guard valuePresent = monitor.newGuard(() -> value != null);
175 * private final Monitor.Guard valueAbsent = monitor.newGuard(() -> value == null);
211 // TODO(user): Change API to make it impossible to use a Guard with the "wrong" monitor,
214 // guard.lock();
215 // try { /* monitor locked and guard satisfied here */ }
216 // finally { guard.unlock(); }
227 // guard.enter() paired with monitor.leave()? That might get
230 // guard.leave(), but that's a little odd as well because the
231 // guard doesn't have anything to do with leaving. You can't
[all …]
/external/pytorch/torch/_dynamo/
Dguards.py61 Guard,
147 A helper class that contains the root guard manager. An instance of this
177 def get_guard_lines(self, guard): argument
178 guard_name = guard.__class__.__name__
179 parts = guard.verbose_code_parts()
205 for guard in mgr.get_leaf_guards():
206 … if isinstance(guard, torch._C._dynamo.guards.NO_TENSOR_ALIASING): # type: ignore[attr-defined]
209 body.writelines(self.get_guard_lines(guard))
213 guard.__class__.__name__,
217 body.writelines(self.get_guard_lines(guard))
[all …]
/external/guava/android/guava/src/com/google/common/util/concurrent/
DMonitor.java161 * <p>This version adds some verbosity around the {@code Guard} objects, but removes that same
171 * private final Monitor.Guard valuePresent = monitor.newGuard(() -> value != null);
172 * private final Monitor.Guard valueAbsent = monitor.newGuard(() -> value == null);
208 // TODO(user): Change API to make it impossible to use a Guard with the "wrong" monitor,
211 // guard.lock();
212 // try { /* monitor locked and guard satisfied here */ }
213 // finally { guard.unlock(); }
224 // guard.enter() paired with monitor.leave()? That might get
227 // guard.leave(), but that's a little odd as well because the
228 // guard doesn't have anything to do with leaving. You can't
[all …]
/external/cronet/stable/third_party/llvm-libc/src/newhdrgen/yaml/
Dstdfix.yaml14 guard: LIBC_COMPILER_HAS_FIXED_POINT
21 guard: LIBC_COMPILER_HAS_FIXED_POINT
28 guard: LIBC_COMPILER_HAS_FIXED_POINT
35 guard: LIBC_COMPILER_HAS_FIXED_POINT
42 guard: LIBC_COMPILER_HAS_FIXED_POINT
49 guard: LIBC_COMPILER_HAS_FIXED_POINT
57 guard: LIBC_COMPILER_HAS_FIXED_POINT
65 guard: LIBC_COMPILER_HAS_FIXED_POINT
72 guard: LIBC_COMPILER_HAS_FIXED_POINT
79 guard: LIBC_COMPILER_HAS_FIXED_POINT
[all …]
Dmath.yaml94 guard: LIBC_TYPES_HAS_FLOAT128
102 guard: LIBC_TYPES_HAS_FLOAT16
140 guard: LIBC_TYPES_HAS_FLOAT128
147 guard: LIBC_TYPES_HAS_FLOAT16
175 guard: LIBC_TYPES_HAS_FLOAT128
183 guard: LIBC_TYPES_HAS_FLOAT16
215 guard: LIBC_TYPES_HAS_FLOAT16
222 guard: LIBC_TYPES_HAS_FLOAT16
237 guard: LIBC_TYPES_HAS_FLOAT128
258 guard: LIBC_TYPES_HAS_FLOAT128
[all …]
/external/cronet/tot/third_party/llvm-libc/src/newhdrgen/yaml/
Dstdfix.yaml14 guard: LIBC_COMPILER_HAS_FIXED_POINT
21 guard: LIBC_COMPILER_HAS_FIXED_POINT
28 guard: LIBC_COMPILER_HAS_FIXED_POINT
35 guard: LIBC_COMPILER_HAS_FIXED_POINT
42 guard: LIBC_COMPILER_HAS_FIXED_POINT
49 guard: LIBC_COMPILER_HAS_FIXED_POINT
57 guard: LIBC_COMPILER_HAS_FIXED_POINT
65 guard: LIBC_COMPILER_HAS_FIXED_POINT
72 guard: LIBC_COMPILER_HAS_FIXED_POINT
79 guard: LIBC_COMPILER_HAS_FIXED_POINT
[all …]
Dmath.yaml94 guard: LIBC_TYPES_HAS_FLOAT128
102 guard: LIBC_TYPES_HAS_FLOAT16
140 guard: LIBC_TYPES_HAS_FLOAT128
147 guard: LIBC_TYPES_HAS_FLOAT16
175 guard: LIBC_TYPES_HAS_FLOAT128
183 guard: LIBC_TYPES_HAS_FLOAT16
215 guard: LIBC_TYPES_HAS_FLOAT16
222 guard: LIBC_TYPES_HAS_FLOAT16
237 guard: LIBC_TYPES_HAS_FLOAT128
258 guard: LIBC_TYPES_HAS_FLOAT128
[all …]
/external/sdv/vsomeip/third_party/boost/optional/test/
Doptional_test_emplace.cpp32 class Guard class
36 Guard () : which_ctor(0) { } in Guard() function in Guard
37 Guard (int&, double&&) : which_ctor(1) { } in Guard() function in Guard
38 Guard (int&&, double&) : which_ctor(2) { } in Guard() function in Guard
39 Guard (int&&, double&&) : which_ctor(3) { } in Guard() function in Guard
40 Guard (int&, double&) : which_ctor(4) { } in Guard() function in Guard
41 Guard (std::string const&) : which_ctor(5) { } in Guard() function in Guard
42 Guard (std::string &) : which_ctor(6) { } in Guard() function in Guard
43 Guard (std::string &&) : which_ctor(7) { } in Guard() function in Guard
45 Guard(Guard&&);
[all …]
Doptional_test_inplace_factory.cpp28 struct Guard struct
32 Guard() : num() {} in Guard() function
33 Guard(double num_, std::string str_) : num(num_), str(str_) {} in Guard() argument
35 …friend bool operator==(const Guard& lhs, const Guard& rhs) { return lhs.num == rhs.num && lhs.str … in operator ==()
36 friend bool operator!=(const Guard& lhs, const Guard& rhs) { return !(lhs == rhs); } in operator !=()
39 Guard(const Guard&);
40 Guard& operator=(const Guard&);
46 Guard g0, g1(1.0, "one"), g2(2.0, "two"); in test_ctor()
48 boost::optional<Guard> og0 ( boost::in_place() ); in test_ctor()
49 boost::optional<Guard> og1 ( boost::in_place(1.0, "one") ); in test_ctor()
[all …]
/external/pytorch/test/dynamo/
Dtest_guard_manager.py70 guard = guards.GLOBAL_STATE(["global_state_check"])
71 self.assertTrue(guard(None))
73 self.assertFalse(guard(None))
75 str(guard.check_verbose(None)),
83 self.assertTrue(guard(None))
84 self.assertTrue(guard.check_verbose(None).result)
88 self.assertFalse(guard(None))
90 str(guard.check_verbose(None)),
100 self.assertTrue(guard(None))
101 self.assertTrue(guard.check_verbose(None).result)
[all …]
/external/rust/android-crates-io/crates/crossbeam-epoch/src/sync/
Dlist.rs9 use crate::{unprotected, Atomic, Guard, Shared};
45 /// unsafe fn finalize(entry: &Entry, guard: &Guard) {
46 /// guard.defer_destroy(Shared::from(Self::element_of(entry) as *const _));
91 unsafe fn finalize(_: &Entry, _: &Guard); in finalize() argument
106 /// The guard that protects the iteration.
107 guard: &'g Guard, field
146 /// It should be safe to call `C::finalize` on the entry after the `guard` is dropped, where `C`
148 pub(crate) unsafe fn delete(&self, guard: &Guard) { in delete() argument
149 self.next.fetch_or(1, Release, guard); in delete()
172 pub(crate) unsafe fn insert<'g>(&'g self, container: Shared<'g, T>, guard: &'g Guard) { in insert() argument
[all …]
Dqueue.rs16 use crate::{unprotected, Atomic, Guard, Owned, Shared};
55 let guard = unprotected(); in new() localVariable
56 let sentinel = sentinel.into_shared(guard); in new()
70 guard: &Guard, in push_internal() argument
74 let next = o.next.load(Acquire, guard); in push_internal()
79 .compare_exchange(onto, next, Release, Relaxed, guard); in push_internal()
85 .compare_exchange(Shared::null(), new, Release, Relaxed, guard) in push_internal()
91 .compare_exchange(onto, new, Release, Relaxed, guard); in push_internal()
98 pub(crate) fn push(&self, t: T, guard: &Guard) { in push() argument
103 let new = Owned::into_shared(new, guard); in push()
[all …]
/external/rust/android-crates-io/crates/crossbeam-epoch/src/
Dcollector.rs17 use crate::guard::Guard;
80 pub fn pin(&self) -> Guard { in pin() argument
149 let guard = &handle.pin(); in flush_local_bag() localVariable
151 let a = Owned::new(7).into_shared(guard); in flush_local_bag()
152 guard.defer_destroy(a); in flush_local_bag()
154 assert!(!(*guard.local).bag.with(|b| (*b).is_empty())); in flush_local_bag()
156 while !(*guard.local).bag.with(|b| (*b).is_empty()) { in flush_local_bag()
157 guard.flush(); in flush_local_bag()
169 let guard = &handle.pin(); in garbage_buffering() localVariable
172 let a = Owned::new(7).into_shared(guard); in garbage_buffering()
[all …]
Dguard.rs9 /// A guard that keeps the current thread pinned.
13 /// The current thread is pinned by calling [`pin`], which returns a new guard:
19 /// // This is not really necessary, but makes passing references to the guard a bit easier.
20 /// let guard = &epoch::pin();
23 /// When a guard gets dropped, the current thread is automatically unpinned.
27 /// Having a guard allows us to create pointers on the stack to heap-allocated objects.
38 /// let guard = &epoch::pin();
41 /// let p = a.load(SeqCst, guard);
53 /// thread will actually be pinned only when the first guard is created and unpinned when the last
69 pub struct Guard { struct
[all …]
/external/guava/android/guava-tests/test/com/google/common/util/concurrent/
DMonitorTestCase.java31 public class TestGuard extends Monitor.Guard {
141 TestGuard guard = new TestGuard(true); in testEnterWhen_initiallyTrue() local
142 thread1.callAndAssertReturns(enterWhen(), guard); in testEnterWhen_initiallyTrue() local
146 TestGuard guard = new TestGuard(false); in testEnterWhen_initiallyFalse() local
147 thread1.callAndAssertWaits(enterWhen(), guard); in testEnterWhen_initiallyFalse() local
149 guard.setSatisfied(true); in testEnterWhen_initiallyFalse()
155 TestGuard guard = new TestGuard(true); in testEnterWhen_alreadyOccupied() local
157 thread1.callAndAssertBlocks(enterWhen(), guard); in testEnterWhen_alreadyOccupied() local
163 TestGuard guard = new TestGuard(true); in testEnterIf_initiallyTrue() local
164 thread1.callAndAssertReturns(true, enterIf(), guard); in testEnterIf_initiallyTrue()
[all …]
/external/llvm/test/Transforms/GuardWidening/
Dbasic.ll1 ; RUN: opt -S -guard-widening < %s | FileCheck %s
2 ; RUN: opt -S -passes=guard-widening < %s | FileCheck %s
4 declare void @llvm.experimental.guard(i1,...)
12 ; CHECK: call void (i1, ...) @llvm.experimental.guard(i1 %wide.chk) [ "deopt"() ]
15 call void(i1, ...) @llvm.experimental.guard(i1 %cond_0) [ "deopt"() ]
16 call void(i1, ...) @llvm.experimental.guard(i1 %cond_1) [ "deopt"() ]
25 ; CHECK: call void (i1, ...) @llvm.experimental.guard(i1 %wide.chk) [ "deopt"() ]
28 call void(i1, ...) @llvm.experimental.guard(i1 %cond_0) [ "deopt"() ]
39 ; CHECK-NOT: call void (i1, ...) @llvm.experimental.guard(
41 call void(i1, ...) @llvm.experimental.guard(i1 %cond_1) [ "deopt"() ]
[all …]
Drange-check-merging.ll1 ; RUN: opt -S -guard-widening < %s | FileCheck %s
3 declare void @llvm.experimental.guard(i1,...)
7 ; CHECK-NOT: @llvm.experimental.guard
9 ; CHECK: call void (i1, ...) @llvm.experimental.guard(i1 %wide.chk2) [ "deopt"() ]
14 call void(i1, ...) @llvm.experimental.guard(i1 %chk0) [ "deopt"() ]
18 call void(i1, ...) @llvm.experimental.guard(i1 %chk1) [ "deopt"() ]
22 call void(i1, ...) @llvm.experimental.guard(i1 %chk2) [ "deopt"() ]
26 call void(i1, ...) @llvm.experimental.guard(i1 %chk3) [ "deopt"() ]
32 ; CHECK-NOT: llvm.experimental.guard
34 ; CHECK: call void (i1, ...) @llvm.experimental.guard(i1 %wide.chk2) [ "deopt"() ]
[all …]
/external/vixl/src/aarch64/
Dmacro-assembler-aarch64.h1063 SingleEmissionCheckScope guard(this); in Adr()
1069 SingleEmissionCheckScope guard(this); in Adrp()
1076 SingleEmissionCheckScope guard(this); in Asr()
1084 SingleEmissionCheckScope guard(this); in Asr()
1114 SingleEmissionCheckScope guard(this); in Bfm()
1124 SingleEmissionCheckScope guard(this); in Bfi()
1130 SingleEmissionCheckScope guard(this); in Bfc()
1140 SingleEmissionCheckScope guard(this); in Bfxil()
1148 SingleEmissionCheckScope guard(this); in Bl()
1154 SingleEmissionCheckScope guard(this); in Blr()
[all …]
/external/vixl/src/aarch32/
Dmacro-assembler-aarch32.h86 ExactAssemblyScopeWithoutPoolsCheck guard(this, in EmitPoolHeader()
109 ExactAssemblyScopeWithoutPoolsCheck guard(this, in EmitNopBytes()
569 MacroEmissionCheckScope guard(this, pool_policy); in Adr()
570 ITScope it_scope(this, &cond, guard); in Adr()
592 MacroEmissionCheckScope guard(this, pool_policy); in Ldr()
593 ITScope it_scope(this, &cond, guard); in Ldr()
613 MacroEmissionCheckScope guard(this, pool_policy); in Ldrb()
614 ITScope it_scope(this, &cond, guard); in Ldrb()
635 MacroEmissionCheckScope guard(this, pool_policy); in Ldrd()
636 ITScope it_scope(this, &cond, guard); in Ldrd()
[all …]
/external/guava/guava-tests/test/com/google/common/util/concurrent/
DMonitorTestCase.java31 public class TestGuard extends Monitor.Guard {
141 TestGuard guard = new TestGuard(true); in testEnterWhen_initiallyTrue() local
142 thread1.callAndAssertReturns(enterWhen(), guard); in testEnterWhen_initiallyTrue() local
148 TestGuard guard = new TestGuard(false); in testEnterWhen_initiallyFalse() local
149 thread1.callAndAssertWaits(enterWhen(), guard); in testEnterWhen_initiallyFalse() local
151 guard.setSatisfied(true); in testEnterWhen_initiallyFalse()
157 TestGuard guard = new TestGuard(true); in testEnterWhen_alreadyOccupied() local
159 thread1.callAndAssertBlocks(enterWhen(), guard); in testEnterWhen_alreadyOccupied() local
165 TestGuard guard = new TestGuard(true); in testEnterIf_initiallyTrue() local
166 thread1.callAndAssertReturns(true, enterIf(), guard); in testEnterIf_initiallyTrue()
[all …]
/external/llvm/test/Transforms/EarlyCSE/
Dguards.ll3 declare void @llvm.experimental.guard(i1,...)
6 ; We can do store to load forwarding over a guard, since it does not
11 ; CHECK-NEXT: call void (i1, ...) @llvm.experimental.guard(i1 %cond) [ "deopt"() ]
15 call void(i1,...) @llvm.experimental.guard(i1 %cond) [ "deopt"() ]
21 ; We can CSE loads over a guard, since it does not clobber memory
25 ; CHECK-NEXT: call void (i1, ...) @llvm.experimental.guard(i1 %cond) [ "deopt"() ]
29 call void(i1,...) @llvm.experimental.guard(i1 %cond) [ "deopt"() ]
40 call void(i1, ...) @llvm.experimental.guard(i1 true) [ "deopt"() ]
45 ; After a guard has executed the condition it was guarding is known to
50 ; CHECK-NEXT: call void (i1, ...) @llvm.experimental.guard(i1 %cond0) [ "deopt"() ]
[all …]
/external/rust/android-crates-io/crates/tokio/src/sync/tests/
Dloom_rwlock.rs17 let mut guard = rwclone.write().await; in concurrent_write() localVariable
18 *guard += 5; in concurrent_write()
25 let mut guard = rwclone.write_owned().await; in concurrent_write() localVariable
26 *guard += 5; in concurrent_write()
33 let guard = block_on(rwlock.read()); in concurrent_write() localVariable
34 assert_eq!(10, *guard); in concurrent_write()
48 let mut guard = rwclone.write().await; in concurrent_read_write() localVariable
49 *guard += 5; in concurrent_read_write()
56 let mut guard = rwclone.write_owned().await; in concurrent_read_write() localVariable
57 *guard += 5; in concurrent_read_write()
[all …]
/external/rust/android-crates-io/crates/sharded-slab/src/tests/
Dloom_pool.rs113 let guard = pool.get(idx1); in concurrent_create_with_clear() localVariable
117 // wait until we have a guard on the other thread. in concurrent_create_with_clear()
128 drop(guard); in concurrent_create_with_clear()
199 let guard = pool.create().unwrap(); in create_mut_guard_prevents_access() localVariable
200 let key: usize = guard.key(); in create_mut_guard_prevents_access()
215 let mut guard = pool.create().unwrap(); in create_mut_guard() localVariable
216 let key: usize = guard.key(); in create_mut_guard()
223 guard.push_str("Hello world"); in create_mut_guard()
224 drop(guard); in create_mut_guard()
234 let mut guard = pool.create().unwrap(); in create_mut_guard_2() localVariable
[all …]
/external/rust/android-crates-io/crates/scopeguard/src/
Dlib.rs4 //! A scope guard will run a given closure when it goes out of scope,
12 //! This example creates a scope guard with an example function:
18 //! let _guard = scopeguard::guard((), |_| {
24 //! // Here, at the end of `_guard`'s scope, the guard's closure is called.
43 //! // use a cell to observe drops during and after the scope guard is active
46 //! // Create a scope guard using `defer!` for the current scope
62 //! ## Scope Guard with Value
64 //! If the scope guard closure needs to access an outer value that is also
65 //! mutated outside of the scope guard, then you may want to use the scope guard
66 //! with a value. The guard works like a smart pointer, so the inner value can
[all …]
/external/sdv/vsomeip/third_party/boost/pool/include/boost/pool/detail/
Dguard.hpp14 \brief Extremely Light-Weight guard class.
16 detail/guard.hpp provides a type guard<Mutex>
27 class guard class
28 { //! Locks the mutex, binding guard<Mutex> to Mutex.
36 boost::details::pool::guard<mutex> g(global_lock);
48guard(const guard &); //!< Guards the mutex, ensuring unlocked on destruction, even if exception i…
49 void operator=(const guard &);
52 explicit guard(Mutex & nmtx) in guard() function in boost::details::pool::guard
54 { //! Locks the mutex of the guard class. in guard()
58 ~guard() in ~guard()
[all …]

12345678910>>...161