/bionic/benchmarks/ |
H A D | inttypes_benchmark.cpp | 22 void BM_inttypes_strtoimax(benchmark::State& state) { argument 23 while (state.KeepRunning()) { 29 void BM_inttypes_strtoumax(benchmark::State& state) { argument 30 while (state.KeepRunning()) {
|
H A D | unistd_benchmark.cpp | 23 static void BM_unistd_getpid(benchmark::State& state) { argument 24 while (state.KeepRunning()) { 30 static void BM_unistd_getpid_syscall(benchmark::State& state) { argument 31 while (state.KeepRunning()) { 42 static void BM_unistd_gettid(benchmark::State& state) { argument 43 while (state.KeepRunning()) { 51 void BM_unistd_gettid_syscall(benchmark::State& state) { argument 52 while (state.KeepRunning()) {
|
H A D | atomic_benchmark.cpp | 48 void BM_atomic_empty(benchmark::State& state) { argument 49 while (state.KeepRunning()) { 55 static void BM_atomic_load_relaxed(benchmark::State& state) { argument 57 while (state.KeepRunning()) { 65 static void BM_atomic_load_acquire(benchmark::State& state) { argument 67 while (state.KeepRunning()) { 75 static void BM_atomic_store_release(benchmark::State& state) { argument 77 while (state.KeepRunning()) { 84 static void BM_atomic_store_seq_cst(benchmark::State& state) { argument 86 while (state 93 BM_atomic_fetch_add_relaxed(benchmark::State& state) argument 103 BM_atomic_fetch_add_seq_cst(benchmark::State& state) argument 116 BM_atomic_acquire_fence(benchmark::State& state) argument 127 BM_atomic_seq_cst_fence(benchmark::State& state) argument 140 BM_atomic_fetch_add_cs(benchmark::State& state) argument [all...] |
H A D | semaphore_benchmark.cpp | 26 static void BM_semaphore_sem_getvalue(benchmark::State& state) { argument 30 while (state.KeepRunning()) { 37 static void BM_semaphore_sem_wait_sem_post(benchmark::State& state) { argument 41 while (state.KeepRunning()) { 125 /* BENCHMARK_F(SemaphoreFixture, semaphore_sem_post)(benchmark::State& state) { 126 while (state.KeepRunning()) { 127 state.PauseTiming(); 149 state.ResumeTiming();
|
H A D | math_benchmark.cpp | 27 static void SetLabel(benchmark::State& state) { argument 28 state.SetLabel(names[state.range(0)]); 35 static void BM_math_sqrt(benchmark::State& state) { argument 38 while (state.KeepRunning()) { 44 static void BM_math_log10(benchmark::State& state) { argument 47 while (state.KeepRunning()) { 53 static void BM_math_logb(benchmark::State& state) { argument 56 while (state.KeepRunning()) { 62 static void BM_math_isfinite_macro(benchmark::State& state) { argument 72 BM_math_isfinite(benchmark::State& state) argument 82 BM_math_isinf_macro(benchmark::State& state) argument 92 BM_math_isinf(benchmark::State& state) argument 102 BM_math_isnan_macro(benchmark::State& state) argument 112 BM_math_isnan(benchmark::State& state) argument 122 BM_math_isnormal_macro(benchmark::State& state) argument 132 BM_math_isnormal(benchmark::State& state) argument 142 BM_math_sin_fast(benchmark::State& state) argument 150 BM_math_sin_feupdateenv(benchmark::State& state) argument 162 BM_math_sin_fesetenv(benchmark::State& state) argument 174 BM_math_fpclassify(benchmark::State& state) argument 184 BM_math_signbit_macro(benchmark::State& state) argument 194 BM_math_signbit(benchmark::State& state) argument 204 BM_math_fabs_macro(benchmark::State& state) argument 214 BM_math_fabs(benchmark::State& state) argument [all...] |
H A D | property_benchmark.cpp | 126 static void BM_property_get(benchmark::State& state) { argument 127 const size_t nprops = state.range(0); 132 while (state.KeepRunning()) { 139 static void BM_property_find(benchmark::State& state) { argument 140 const size_t nprops = state.range(0); 145 while (state.KeepRunning()) { 151 static void BM_property_read(benchmark::State& state) { argument 152 const size_t nprops = state.range(0); 165 while (state.KeepRunning()) { 174 static void BM_property_serial(benchmark::State& state) { argument [all...] |
H A D | stdlib_benchmark.cpp | 25 static void BM_stdlib_malloc_free(benchmark::State& state) { argument 26 const size_t nbytes = state.range(0); 29 while (state.KeepRunning()) { 34 state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes)); 38 static void BM_stdlib_mbstowcs(benchmark::State& state) { argument 39 const size_t buf_alignment = state.range(0); 40 const size_t widebuf_alignment = state.range(1); 73 while (state.KeepRunning()) { 77 state 81 BM_stdlib_mbrtowc(benchmark::State& state) argument 122 BM_stdlib_atoi(benchmark::State& state) argument 129 BM_stdlib_atol(benchmark::State& state) argument 136 BM_stdlib_strtol(benchmark::State& state) argument 143 BM_stdlib_strtoll(benchmark::State& state) argument 150 BM_stdlib_strtoul(benchmark::State& state) argument 157 BM_stdlib_strtoull(benchmark::State& state) argument [all...] |
H A D | time_benchmark.cpp | 25 static void BM_time_clock_gettime(benchmark::State& state) { argument 28 while (state.KeepRunning()) { 34 static void BM_time_clock_gettime_syscall(benchmark::State& state) { argument 37 while (state.KeepRunning()) { 43 static void BM_time_clock_gettime_MONOTONIC_COARSE(benchmark::State& state) { argument 46 while (state.KeepRunning()) { 52 static void BM_time_clock_gettime_MONOTONIC_RAW(benchmark::State& state) { argument 55 while (state.KeepRunning()) { 61 static void BM_time_clock_gettime_REALTIME(benchmark::State& state) { argument 64 while (state 70 BM_time_clock_gettime_REALTIME_COARSE(benchmark::State& state) argument 79 BM_time_clock_gettime_BOOTTIME(benchmark::State& state) argument 88 BM_time_clock_getres(benchmark::State& state) argument 97 BM_time_clock_getres_syscall(benchmark::State& state) argument 106 BM_time_clock_getres_MONOTONIC_COARSE(benchmark::State& state) argument 115 BM_time_clock_getres_MONOTONIC_RAW(benchmark::State& state) argument 124 BM_time_clock_getres_REALTIME(benchmark::State& state) argument 133 BM_time_clock_getres_REALTIME_COARSE(benchmark::State& state) argument 142 BM_time_clock_getres_BOOTTIME(benchmark::State& state) argument 151 BM_time_gettimeofday(benchmark::State& state) argument 159 BM_time_gettimeofday_syscall(benchmark::State& state) argument 167 BM_time_time(benchmark::State& state) argument 174 BM_time_localtime(benchmark::State& state) argument 182 BM_time_localtime_r(benchmark::State& state) argument [all...] |
H A D | pthread_benchmark.cpp | 25 static void BM_pthread_self(benchmark::State& state) { argument 26 while (state.KeepRunning()) { 32 static void BM_pthread_getspecific(benchmark::State& state) { argument 36 while (state.KeepRunning()) { 44 static void BM_pthread_setspecific(benchmark::State& state) { argument 48 while (state.KeepRunning()) { 59 static void BM_pthread_once(benchmark::State& state) { argument 63 while (state.KeepRunning()) { 69 static void BM_pthread_mutex_lock(benchmark::State& state) { argument 72 while (state 79 BM_pthread_mutex_lock_ERRORCHECK(benchmark::State& state) argument 89 BM_pthread_mutex_lock_RECURSIVE(benchmark::State& state) argument 118 BM_pthread_mutex_lock_PI(benchmark::State& state) argument 128 BM_pthread_mutex_lock_ERRORCHECK_PI(benchmark::State& state) argument 138 BM_pthread_mutex_lock_RECURSIVE_PI(benchmark::State& state) argument 148 BM_pthread_rwlock_read(benchmark::State& state) argument 161 BM_pthread_rwlock_write(benchmark::State& state) argument 178 BM_pthread_create(benchmark::State& state) argument 193 BM_pthread_create_and_run(benchmark::State& state) argument 206 BM_pthread_exit_and_join(benchmark::State& state) argument 215 BM_pthread_key_create(benchmark::State& state) argument 227 BM_pthread_key_delete(benchmark::State& state) argument [all...] |
H A D | string_benchmark.cpp | 24 static void BM_string_memcmp(benchmark::State& state) { argument 25 const size_t nbytes = state.range(0); 26 const size_t src_alignment = state.range(1); 27 const size_t dst_alignment = state.range(2); 35 while (state.KeepRunning()) { 39 state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes)); 43 static void BM_string_memcpy(benchmark::State& state) { argument 44 const size_t nbytes = state.range(0); 45 const size_t src_alignment = state 61 BM_string_memmove_non_overlapping(benchmark::State& state) argument 79 BM_string_memmove_overlap_dst_before_src(benchmark::State& state) argument 94 BM_string_memmove_overlap_src_before_dst(benchmark::State& state) argument 109 BM_string_memset(benchmark::State& state) argument 124 BM_string_strlen(benchmark::State& state) argument 141 BM_string_strcat_copy_only(benchmark::State& state) argument 164 BM_string_strcat_seek_only(benchmark::State& state) argument 185 BM_string_strcat_half_copy_half_seek(benchmark::State& state) argument 211 BM_string_strcpy(benchmark::State& state) argument 230 BM_string_strcmp(benchmark::State& state) argument 251 BM_string_strstr(benchmark::State& state) argument 280 BM_string_strchr(benchmark::State& state) argument [all...] |
/bionic/libc/bionic/ |
H A D | mblen.cpp | 33 mbstate_t state = {}; local 34 return mbrlen(s, n, &state);
|
H A D | c16rtomb.cpp | 45 mbstate_t* state = (ps == NULL) ? &__private_state : ps; local 46 if (mbsinit(state)) { 49 mbstate_set_byte(state, 3, (c32 & 0xff0000) >> 16); 50 mbstate_set_byte(state, 2, (c32 & 0x00ff00) >> 8); 53 return mbstate_reset_and_return_illegal(EINVAL, state); 55 return c32rtomb(s, static_cast<char32_t>(c16), state); 59 return mbstate_reset_and_return_illegal(EINVAL, state); 62 char32_t c32 = ((mbstate_get_byte(state, 3) << 16) | 63 (mbstate_get_byte(state, 2) << 8) | 65 return mbstate_reset_and_return(c32rtomb(s, c32, NULL), state); [all...] |
H A D | c32rtomb.cpp | 37 mbstate_t* state = (ps == NULL) ? &__private_state : ps; local 41 return mbstate_reset_and_return(1, state); 46 // shift state. Since shift states are not supported, only the null byte is 50 return mbstate_reset_and_return(1, state); 53 if (!mbsinit(state)) { 54 return mbstate_reset_and_return_illegal(EILSEQ, state);
|
H A D | __cxa_guard.cpp | 55 atomic_int state; member in union:_guard_t 64 atomic_int state; member in union:_guard_t 70 // Set construction state values according to reference documentation. 82 int old_value = atomic_load_explicit(&gv->state, memory_order_acquire); 91 if (!atomic_compare_exchange_weak_explicit(&gv->state, &old_value, 99 if (!atomic_compare_exchange_weak_explicit(&gv->state, &old_value, 107 __futex_wait_ex(&gv->state, false, CONSTRUCTION_UNDERWAY_WITH_WAITER); 108 old_value = atomic_load_explicit(&gv->state, memory_order_acquire); 115 int old_value = atomic_exchange_explicit(&gv->state, CONSTRUCTION_COMPLETE, memory_order_release); 117 __futex_wake_ex(&gv->state, fals [all...] |
H A D | mbrtoc16.cpp | 36 static inline bool mbspartialc16(const mbstate_t* state) { argument 37 return mbstate_get_byte(state, 3) != 0; 41 size_t nconv, mbstate_t* state) { 45 mbstate_set_byte(state, 0, trail & 0x00ff); 46 mbstate_set_byte(state, 1, (trail & 0xff00) >> 8); 47 mbstate_set_byte(state, 3, nconv & 0xff); 54 static size_t finish_surrogate(char16_t* pc16, mbstate_t* state) { argument 55 char16_t trail = mbstate_get_byte(state, 1) << 8 | 56 mbstate_get_byte(state, 0); 58 return mbstate_reset_and_return(mbstate_get_byte(state, 40 begin_surrogate(char32_t c32, char16_t* pc16, size_t nconv, mbstate_t* state) argument 63 mbstate_t* state = (ps == NULL) ? &__private_state : ps; local [all...] |
H A D | mbrtoc32.cpp | 38 mbstate_t* state = (ps == NULL) ? &__private_state : ps; local 40 // We should never get to a state which has all 4 bytes of the sequence set. 41 // Full state verification is done when decoding the sequence (after we have 43 if (mbstate_get_byte(state, 3) != 0) { 44 return mbstate_reset_and_return_illegal(EINVAL, state); 58 if (mbsinit(state) && (((ch = static_cast<uint8_t>(*s)) & ~0x7f) == 0)) { 80 // The first byte in the state (if any) tells the length. 81 size_t bytes_so_far = mbstate_bytes_so_far(state); 82 ch = bytes_so_far > 0 ? mbstate_get_byte(state, 0) : static_cast<uint8_t>(*s); 101 return mbstate_reset_and_return_illegal(EILSEQ, state); [all...] |
H A D | pthread_barrier.cpp | 70 // Barrier state. It is WAIT if waiting for more threads to enter the barrier in this cycle, 72 _Atomic(BarrierState) state; member in struct:pthread_barrier_internal_t 98 atomic_init(&barrier->state, WAIT); 120 while(atomic_load_explicit(&barrier->state, memory_order_acquire) == RELEASE) { 121 __futex_wait_ex(&barrier->state, barrier->pshared, RELEASE, false, nullptr); 148 atomic_store_explicit(&barrier->state, RELEASE, memory_order_release); 149 __futex_wake_ex(&barrier->state, barrier->pshared, prev_wait_count); 154 while (atomic_load_explicit(&barrier->state, memory_order_acquire) == WAIT) { 155 __futex_wait_ex(&barrier->state, barrier->pshared, WAIT, false, nullptr); 162 atomic_store_explicit(&barrier->state, WAI [all...] |
H A D | wchar.cpp | 42 // The state is the UTF-8 sequence. We only support <= 4-bytes sequences so LP32 45 // intermediary state). 47 // The C standard leaves the conversion state undefined after a bad conversion. 49 // state we always reset the conversion state when encountering illegal 62 mbstate_t* state = (ps == NULL) ? &__private_state : ps; local 65 return mbrtoc32(reinterpret_cast<char32_t*>(pwc), s, n, state); 70 mbstate_t* state = (ps == NULL) ? &__private_state : ps; local 76 if (nmc > 0 && mbstate_bytes_so_far(state) > 0 && static_cast<uint8_t>((*src)[0]) < 0x80) { 77 return mbstate_reset_and_return_illegal(EILSEQ, state); 141 mbstate_t* state = (ps == NULL) ? &__private_state : ps; local 149 mbstate_t* state = (ps == NULL) ? &__private_state : ps; local [all...] |
/bionic/libc/upstream-netbsd/android/include/sys/ |
H A D | sha1.h | 19 uint32_t state[5]; member in struct:__anon1226
|
/bionic/libc/upstream-openbsd/lib/libc/net/ |
H A D | base64.c | 195 int tarindex, state, ch; local 199 state = 0; 213 switch (state) { 220 state = 1; 234 state = 2; 248 state = 3; 257 state = 0; 269 switch (state) { 310 if (state != 0)
|
/bionic/tests/ |
H A D | fenv_test.cpp | 104 // fegetenv (unlike feholdexcept) leaves the current state untouched... 105 fenv_t state; local 106 ASSERT_EQ(0, fegetenv(&state)); 115 ASSERT_EQ(0, fesetenv(&state)); 126 fenv_t state; local 127 ASSERT_EQ(0, feholdexcept(&state)); 136 ASSERT_EQ(0, feupdateenv(&state));
|
/bionic/libc/private/ |
H A D | bionic_lock.h | 44 _Atomic(LockState) state; member in class:Lock 49 atomic_init(&state, Unlocked); 55 return __predict_true(atomic_compare_exchange_strong_explicit(&state, &old_state, 61 if (__predict_true(atomic_compare_exchange_strong_explicit(&state, &old_state, 65 while (atomic_exchange_explicit(&state, LockedWithWaiter, memory_order_acquire) != Unlocked) { 67 __futex_wait_ex(&state, process_shared, LockedWithWaiter); 73 if (atomic_exchange_explicit(&state, Unlocked, memory_order_release) == LockedWithWaiter) { 74 __futex_wake_ex(&state, process_shared, 1);
|
/bionic/libc/stdio/ |
H A D | parsefloat.c | 46 } state = S_START; local 63 switch (state) { 65 state = S_GOTSIGN; 73 state = S_MAYBEHEX; 78 state = S_INF; 82 state = S_NAN; 85 state = S_DIGITS; 127 state = S_DIGITS; 139 state = S_FRAC; 152 state 194 } state = S_START; local [all...] |
/bionic/libc/upstream-openbsd/lib/libc/stdio/ |
H A D | open_memstream.c | 29 struct state { struct 41 struct state *st = v; 78 struct state *st = v; 106 struct state *st = v; 116 struct state *st;
|
H A D | open_wmemstream.c | 30 struct state { struct 37 mbstate_t mbs; /* conversion state of the stream */ 43 struct state *st = v; 82 struct state *st = v; 102 * XXX Clearing mbs here invalidates shift state for state- 116 struct state *st = v; 126 struct state *st;
|