Home
last modified time | relevance | path

Searched refs:count_ (Results 1 – 25 of 205) sorted by relevance

123456789

/external/libcxx/test/support/
Dcounting_predicates.hpp21 unary_counting_predicate(Predicate p) : p_(p), count_(0) {} in unary_counting_predicate()
24 bool operator () (const Arg &a) const { ++count_; return p_(a); } in operator ()()
25 size_t count() const { return count_; } in count()
26 void reset() { count_ = 0; } in reset()
30 mutable size_t count_; member
41 binary_counting_predicate ( Predicate p ) : p_(p), count_(0) {} in binary_counting_predicate()
44 bool operator () (const Arg1 &a1, const Arg2 &a2) const { ++count_; return p_(a1, a2); } in operator ()()
45 size_t count() const { return count_; } in count()
46 void reset() { count_ = 0; } in reset()
50 mutable size_t count_; member
/external/llvm-project/libcxx/test/support/
Dcounting_predicates.h20 unary_counting_predicate(Predicate p) : p_(p), count_(0) {} in unary_counting_predicate()
23 bool operator () (const Arg &a) const { ++count_; return p_(a); } in operator()
24 size_t count() const { return count_; } in count()
25 void reset() { count_ = 0; } in reset()
29 mutable size_t count_; member
40 binary_counting_predicate ( Predicate p ) : p_(p), count_(0) {} in binary_counting_predicate()
43 bool operator () (const Arg1 &a1, const Arg2 &a2) const { ++count_; return p_(a1, a2); } in operator()
44 size_t count() const { return count_; } in count()
45 void reset() { count_ = 0; } in reset()
49 mutable size_t count_; member
/external/rust/crates/grpcio-sys/grpc/src/core/lib/gprpp/
Dfork.cc65 gpr_atm_no_barrier_store(&count_, UNBLOCKED(0)); in ExecCtxState()
69 gpr_atm count = gpr_atm_no_barrier_load(&count_); in IncExecCtxCount()
75 if (gpr_atm_no_barrier_load(&count_) <= BLOCKED(1)) { in IncExecCtxCount()
81 } else if (gpr_atm_no_barrier_cas(&count_, count, count + 1)) { in IncExecCtxCount()
84 count = gpr_atm_no_barrier_load(&count_); in IncExecCtxCount()
88 void DecExecCtxCount() { gpr_atm_no_barrier_fetch_add(&count_, -1); } in DecExecCtxCount()
92 if (gpr_atm_no_barrier_cas(&count_, UNBLOCKED(1), BLOCKED(1))) { in BlockExecCtx()
103 gpr_atm_no_barrier_store(&count_, UNBLOCKED(0)); in AllowExecCtx()
118 gpr_atm count_; member in grpc_core::internal::ExecCtxState
123 ThreadState() : awaiting_threads_(false), threads_done_(false), count_(0) { in ThreadState()
[all …]
/external/grpc-grpc/src/core/lib/gprpp/
Dfork.cc55 gpr_atm_no_barrier_store(&count_, UNBLOCKED(0)); in ExecCtxState()
59 gpr_atm count = gpr_atm_no_barrier_load(&count_); in IncExecCtxCount()
65 if (gpr_atm_no_barrier_load(&count_) <= BLOCKED(1)) { in IncExecCtxCount()
71 } else if (gpr_atm_no_barrier_cas(&count_, count, count + 1)) { in IncExecCtxCount()
74 count = gpr_atm_no_barrier_load(&count_); in IncExecCtxCount()
78 void DecExecCtxCount() { gpr_atm_no_barrier_fetch_add(&count_, -1); } in DecExecCtxCount()
82 if (gpr_atm_no_barrier_cas(&count_, UNBLOCKED(1), BLOCKED(1))) { in BlockExecCtx()
93 gpr_atm_no_barrier_store(&count_, UNBLOCKED(0)); in AllowExecCtx()
108 gpr_atm count_; member in grpc_core::internal::ExecCtxState
113 ThreadState() : awaiting_threads_(false), threads_done_(false), count_(0) { in ThreadState()
[all …]
/external/webrtc/rtc_base/numerics/
Dmoving_average.cc26 count_++; in AddSample()
27 size_t index = count_ % history_.size(); in AddSample()
28 if (count_ > history_.size()) in AddSample()
35 if (count_ == 0) in GetAverageRoundedDown()
41 if (count_ == 0) in GetAverageRoundedToClosest()
47 if (count_ == 0) in GetUnroundedAverage()
53 count_ = 0; in Reset()
58 return std::min(count_, history_.size()); in Size()
/external/tensorflow/tensorflow/core/util/
Dstats_calculator.h37 if (count_ == 0) { in UpdateStat()
44 ++count_; in UpdateStat()
51 bool empty() const { return count_ == 0; } in empty()
61 int64_t count() const { return count_; } in count()
67 bool all_same() const { return (count_ == 0 || min_ == max_); } in all_same()
71 : static_cast<HighPrecisionValueType>(sum_) / count_; in avg()
78 : (squared_sum_ - std::pow(sum_, 2.0) / count_) / (count_ - 1); in sample_variance()
83 return all_same() ? 0 : (squared_sum_ / count_) - (avg() * avg()); in variance()
95 *stream << "count=" << count_ << " curr=" << newest_; in OutputToStream()
96 if (count_ > 1) *stream << "(all same)"; in OutputToStream()
[all …]
Dutil.cc49 count_(0) { in MovingAverage()
56 count_ = 0; in Clear()
62 if (count_ == 0) { in GetAverage()
65 return static_cast<double>(sum_) / count_; in GetAverage()
70 if (count_ < window_) { in AddValue()
72 head_ = count_; in AddValue()
73 data_[count_++] = v; in AddValue()
/external/webrtc/third_party/abseil-cpp/absl/synchronization/
Dblocking_counter.cc29 count_--; in DecrementCount()
30 if (count_ < 0) { in DecrementCount()
34 count_); in DecrementCount()
36 return count_ == 0; in DecrementCount()
41 ABSL_RAW_CHECK(count_ >= 0, "BlockingCounter underflow"); in Wait()
48 this->lock_.Await(Condition(IsZero, &this->count_)); in Wait()
/external/openscreen/third_party/abseil/src/absl/synchronization/
Dblocking_counter.cc29 count_--; in DecrementCount()
30 if (count_ < 0) { in DecrementCount()
34 count_); in DecrementCount()
36 return count_ == 0; in DecrementCount()
41 ABSL_RAW_CHECK(count_ >= 0, "BlockingCounter underflow"); in Wait()
48 this->lock_.Await(Condition(IsZero, &this->count_)); in Wait()
/external/rust/crates/grpcio-sys/grpc/third_party/abseil-cpp/absl/synchronization/
Dblocking_counter.cc29 count_--; in DecrementCount()
30 if (count_ < 0) { in DecrementCount()
34 count_); in DecrementCount()
36 return count_ == 0; in DecrementCount()
41 ABSL_RAW_CHECK(count_ >= 0, "BlockingCounter underflow"); in Wait()
48 this->lock_.Await(Condition(IsZero, &this->count_)); in Wait()
/external/abseil-cpp/absl/synchronization/
Dblocking_counter.cc29 count_--; in DecrementCount()
30 if (count_ < 0) { in DecrementCount()
34 count_); in DecrementCount()
36 return count_ == 0; in DecrementCount()
41 ABSL_RAW_CHECK(count_ >= 0, "BlockingCounter underflow"); in Wait()
48 this->lock_.Await(Condition(IsZero, &this->count_)); in Wait()
/external/libtextclassifier/abseil-cpp/absl/synchronization/
Dblocking_counter.cc29 count_--; in DecrementCount()
30 if (count_ < 0) { in DecrementCount()
34 count_); in DecrementCount()
36 return count_ == 0; in DecrementCount()
41 ABSL_RAW_CHECK(count_ >= 0, "BlockingCounter underflow"); in Wait()
48 this->lock_.Await(Condition(IsZero, &this->count_)); in Wait()
/external/abseil-cpp/absl/strings/internal/
Dcord_internal.h34 Refcount() : count_{1} {} in Refcount()
38 inline void Increment() { count_.fetch_add(1, std::memory_order_relaxed); } in Increment()
48 int32_t refcount = count_.load(std::memory_order_acquire); in Decrement()
50 return refcount != 1 && count_.fetch_sub(1, std::memory_order_acq_rel) != 1; in Decrement()
55 int32_t refcount = count_.fetch_sub(1, std::memory_order_acq_rel); in DecrementExpectHighRefcount()
61 inline int32_t Get() const { return count_.load(std::memory_order_acquire); } in Get()
71 inline bool IsOne() { return count_.load(std::memory_order_acquire) == 1; } in IsOne()
74 std::atomic<int32_t> count_;
/external/webrtc/third_party/abseil-cpp/absl/strings/internal/
Dcord_internal.h34 Refcount() : count_{1} {} in Refcount()
38 inline void Increment() { count_.fetch_add(1, std::memory_order_relaxed); } in Increment()
48 int32_t refcount = count_.load(std::memory_order_acquire); in Decrement()
50 return refcount != 1 && count_.fetch_sub(1, std::memory_order_acq_rel) != 1; in Decrement()
55 int32_t refcount = count_.fetch_sub(1, std::memory_order_acq_rel); in DecrementExpectHighRefcount()
61 inline int32_t Get() const { return count_.load(std::memory_order_acquire); } in Get()
71 inline bool IsOne() { return count_.load(std::memory_order_acquire) == 1; } in IsOne()
74 std::atomic<int32_t> count_;
/external/libchrome/base/strings/
Dsafe_sprintf.cc115 count_(0) { in Buffer()
142 return count_ == static_cast<size_t>(kSSizeMax - 1); in OutOfAddressableSpace()
150 DEBUG_CHECK(count_ < kSSizeMax); in GetCount()
151 return static_cast<ssize_t>(count_); in GetCount()
161 if (size_ >= 1 && count_ < size_) { in Out()
162 buffer_[count_] = ch; in Out()
236 if (count_ > kSSizeMax - 1 - inc) { in IncrementCount()
237 count_ = kSSizeMax - 1; in IncrementCount()
240 count_ += inc; in IncrementCount()
255 size_t idx = count_; in GetInsertionPoint()
[all …]
/external/libgav1/libgav1/src/utils/
Dblocking_counter.h40 : count_(initial_count), job_failed_(false) {} in BlockingCounterImpl()
47 count_ += count; in IncrementBy()
56 if (--count_ == 0) { in Decrement()
69 if (--count_ == 0) { in Decrement()
80 condition_.wait(lock, [this]() { return count_ == 0; }); in Wait()
88 int count_ LIBGAV1_GUARDED_BY(mutex_);
/external/rust/crates/grpcio-sys/grpc/third_party/abseil-cpp/absl/strings/internal/
Dcord_internal.h36 Refcount() : count_{1} {} in Refcount()
40 inline void Increment() { count_.fetch_add(1, std::memory_order_relaxed); } in Increment()
50 int32_t refcount = count_.load(std::memory_order_acquire); in Decrement()
52 return refcount != 1 && count_.fetch_sub(1, std::memory_order_acq_rel) != 1; in Decrement()
57 int32_t refcount = count_.fetch_sub(1, std::memory_order_acq_rel); in DecrementExpectHighRefcount()
63 inline int32_t Get() const { return count_.load(std::memory_order_acquire); } in Get()
73 inline bool IsOne() { return count_.load(std::memory_order_acquire) == 1; } in IsOne()
76 std::atomic<int32_t> count_;
/external/libtextclassifier/abseil-cpp/absl/strings/internal/
Dcord_internal.h36 Refcount() : count_{1} {} in Refcount()
40 inline void Increment() { count_.fetch_add(1, std::memory_order_relaxed); } in Increment()
50 int32_t refcount = count_.load(std::memory_order_acquire); in Decrement()
52 return refcount != 1 && count_.fetch_sub(1, std::memory_order_acq_rel) != 1; in Decrement()
57 int32_t refcount = count_.fetch_sub(1, std::memory_order_acq_rel); in DecrementExpectHighRefcount()
63 inline int32_t Get() const { return count_.load(std::memory_order_acquire); } in Get()
73 inline bool IsOne() { return count_.load(std::memory_order_acquire) == 1; } in IsOne()
76 std::atomic<int32_t> count_;
/external/libchrome/base/memory/
Dptr_util_unittest.cc17 DeleteCounter() { ++count_; } in DeleteCounter()
18 ~DeleteCounter() { --count_; } in ~DeleteCounter()
20 static size_t count() { return count_; } in count()
23 static size_t count_; member in base::__anonbb269bd40111::DeleteCounter
26 size_t DeleteCounter::count_ = 0; member in base::__anonbb269bd40111::DeleteCounter
/external/rust/crates/grpcio-sys/grpc/src/core/lib/iomgr/executor/
Dmpmcqueue.cc32 count_.Store(count_.Load(MemoryOrder::RELAXED) - 1, MemoryOrder::RELAXED); in PopFront()
43 if (count_.Load(MemoryOrder::RELAXED) == 0) { in PopFront()
60 if (count_.Load(MemoryOrder::RELAXED) > 0) { in PopFront()
95 GPR_ASSERT(count_.Load(MemoryOrder::RELAXED) == 0); in ~InfLenFIFOQueue()
105 int curr_count = count_.Load(MemoryOrder::RELAXED); in Put()
137 count_.Store(curr_count + 1, MemoryOrder::RELAXED); in Put()
146 if (count_.Load(MemoryOrder::RELAXED) == 0) { in Get()
157 } while (count_.Load(MemoryOrder::RELAXED) == 0); in Get()
164 GPR_DEBUG_ASSERT(count_.Load(MemoryOrder::RELAXED) > 0); in Get()
/external/openscreen/third_party/abseil/src/absl/strings/internal/
Dcord_internal.h36 constexpr Refcount() : count_{kRefIncrement} {} in Refcount()
38 explicit constexpr Refcount(Immortal) : count_(kImmortalTag) {} in Refcount()
42 count_.fetch_add(kRefIncrement, std::memory_order_relaxed); in Increment()
53 int32_t refcount = count_.load(std::memory_order_acquire); in Decrement()
56 count_.fetch_sub(kRefIncrement, std::memory_order_acq_rel) != in Decrement()
63 count_.fetch_sub(kRefIncrement, std::memory_order_acq_rel); in DecrementExpectHighRefcount()
70 return count_.load(std::memory_order_acquire) >> kImmortalShift; in Get()
82 return count_.load(std::memory_order_acquire) == kRefIncrement; in IsOne()
86 return (count_.load(std::memory_order_relaxed) & kImmortalTag) != 0; in IsImmortal()
102 std::atomic<int32_t> count_; variable
/external/tensorflow/tensorflow/core/platform/profile_utils/
Dclock_cycle_profiler.h46 return count_; in GetCount()
85 const double next_count = count_ + 1.0; in AccumulateClockCycle()
88 next_count_inv * (average_clock_cycle_ * count_ + clock_diff); in AccumulateClockCycle()
89 count_ = next_count; in AccumulateClockCycle()
96 double count_{0.0};
/external/webrtc/audio/
Daudio_level.cc20 : abs_max_(0), count_(0), current_level_full_range_(0) {} in AudioLevel()
27 count_ = 0; in Reset()
41 count_ = 0; in ResetLevelFullRange()
75 if (count_++ == kUpdateFrequency) { in ComputeLevel()
78 count_ = 0; in ComputeLevel()
/external/llvm-project/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.fill.n/
Duninitialized_fill_n.pass.cpp22 static int count_; member
27 ++count_; in B()
28 if (count_ == 3) in B()
36 int B::count_ = 0; member in B
67 B::count_ = 0; in main()
/external/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.fill/
Duninitialized_fill.pass.cpp24 static int count_; member
29 ++count_; in B()
30 if (count_ == 3) in B()
38 int B::count_ = 0; member in B
69 B::count_ = 0; in main()

123456789