/freebsd/contrib/tcpdump/ |
H A D | addrtostr.c | 113 } best, cur; in addrtostr6() local 124 best.len = 0; in addrtostr6() 125 best.base = -1; in addrtostr6() 134 if (best.base == -1 || cur.len > best.len) in addrtostr6() 135 best = cur; in addrtostr6() 139 if ((cur.base != -1) && (best.base == -1 || cur.len > best.len)) in addrtostr6() 140 best = cur; in addrtostr6() 141 if (best.base != -1 && best.len < 2) in addrtostr6() 142 best.base = -1; in addrtostr6() 158 /* Are we inside the best run of 0x00's? in addrtostr6() [all …]
|
/freebsd/sys/libkern/ |
H A D | inet_ntop.c | 97 struct { int base, len; } best, cur; in inet_ntop6() local 111 best.base = -1; in inet_ntop6() 112 best.len = 0; in inet_ntop6() 123 if (best.base == -1 || cur.len > best.len) in inet_ntop6() 124 best = cur; in inet_ntop6() 130 if (best.base == -1 || cur.len > best.len) in inet_ntop6() 131 best = cur; in inet_ntop6() 133 if (best.base != -1 && best.len < 2) in inet_ntop6() 134 best.base = -1; in inet_ntop6() 141 /* Are we inside the best run of 0x00's? */ in inet_ntop6() [all …]
|
/freebsd/lib/libc/inet/ |
H A D | inet_ntop.c | 111 struct { int base, len; } best, cur; in inet_ntop6() local 123 best.base = -1; in inet_ntop6() 124 best.len = 0; in inet_ntop6() 135 if (best.base == -1 || cur.len > best.len) in inet_ntop6() 136 best = cur; in inet_ntop6() 142 if (best.base == -1 || cur.len > best.len) in inet_ntop6() 143 best = cur; in inet_ntop6() 145 if (best.base != -1 && best.len < 2) in inet_ntop6() 146 best.base = -1; in inet_ntop6() 153 /* Are we inside the best run of 0x00's? */ in inet_ntop6() [all …]
|
H A D | inet_cidr_ntop.c | 161 struct { int base, len; } best, cur; in inet_cidr_ntop_ipv6() local 178 best.base = -1; in inet_cidr_ntop_ipv6() 179 best.len = 0; in inet_cidr_ntop_ipv6() 190 if (best.base == -1 || cur.len > best.len) in inet_cidr_ntop_ipv6() 191 best = cur; in inet_cidr_ntop_ipv6() 197 if (best.base == -1 || cur.len > best.len) in inet_cidr_ntop_ipv6() 198 best = cur; in inet_cidr_ntop_ipv6() 200 if (best.base != -1 && best.len < 2) in inet_cidr_ntop_ipv6() 201 best.base = -1; in inet_cidr_ntop_ipv6() 208 /* Are we inside the best run of 0x00's? */ in inet_cidr_ntop_ipv6() [all …]
|
/freebsd/contrib/ntp/libntp/lib/isc/ |
H A D | inet_ntop.c | 124 struct { int base, len; } best, cur; in inet_ntop6() local 136 best.base = -1; in inet_ntop6() 138 best.len = cur.len = 0; in inet_ntop6() 147 if (best.base == -1 || cur.len > best.len) in inet_ntop6() 148 best = cur; in inet_ntop6() 154 if (best.base == -1 || cur.len > best.len) in inet_ntop6() 155 best = cur; in inet_ntop6() 157 if (best.base != -1 && best.len < 2) in inet_ntop6() 158 best.base = -1; in inet_ntop6() 165 /* Are we inside the best run of 0x00's? */ in inet_ntop6() [all …]
|
/freebsd/contrib/unbound/compat/ |
H A D | inet_ntop.c | 124 struct { int base, len; } best, cur; in inet_ntop6() local 137 best.base = -1; in inet_ntop6() 138 best.len = 0; in inet_ntop6() 149 if (best.base == -1 || cur.len > best.len) in inet_ntop6() 150 best = cur; in inet_ntop6() 156 if (best.base == -1 || cur.len > best.len) in inet_ntop6() 157 best = cur; in inet_ntop6() 159 if (best.base != -1 && best.len < 2) in inet_ntop6() 160 best.base = -1; in inet_ntop6() 168 /* Are we inside the best run of 0x00's? */ in inet_ntop6() [all …]
|
/freebsd/contrib/ldns/compat/ |
H A D | inet_ntop.c | 124 struct { int base, len; } best, cur; in inet_ntop6() local 137 best.base = -1; in inet_ntop6() 138 best.len = 0; in inet_ntop6() 149 if (best.base == -1 || cur.len > best.len) in inet_ntop6() 150 best = cur; in inet_ntop6() 156 if (best.base == -1 || cur.len > best.len) in inet_ntop6() 157 best = cur; in inet_ntop6() 159 if (best.base != -1 && best.len < 2) in inet_ntop6() 160 best.base = -1; in inet_ntop6() 168 /* Are we inside the best run of 0x00's? */ in inet_ntop6() [all …]
|
/freebsd/crypto/openssh/openbsd-compat/ |
H A D | inet_ntop.c | 118 struct { int base, len; } best, cur; in inet_ntop6() local 131 best.base = -1; in inet_ntop6() 141 if (best.base == -1 || cur.len > best.len) in inet_ntop6() 142 best = cur; in inet_ntop6() 148 if (best.base == -1 || cur.len > best.len) in inet_ntop6() 149 best = cur; in inet_ntop6() 151 if (best.base != -1 && best.len < 2) in inet_ntop6() 152 best.base = -1; in inet_ntop6() 160 /* Are we inside the best run of 0x00's? */ in inet_ntop6() 161 if (best.base != -1 && i >= best.base && in inet_ntop6() [all …]
|
/freebsd/sys/contrib/zstd/lib/dictBuilder/ |
H A D | cover.c | 403 * Selects the best segment in an epoch. 421 /* Try each segment (activeSegment) and save the best (bestSegment) */ in COVER_selectSegment() 431 * Save the best segment in bestSegment. in COVER_selectSegment() 462 /* If this segment is the best so far save it */ in COVER_selectSegment() 722 /* We fill the dictionary from the back to allow the best segments to be in COVER_buildDictionary() 851 void COVER_best_init(COVER_best_t *best) { in COVER_best_init() argument 852 if (best==NULL) return; /* compatible with init on NULL */ in COVER_best_init() 853 (void)ZSTD_pthread_mutex_init(&best->mutex, NULL); in COVER_best_init() 854 (void)ZSTD_pthread_cond_init(&best->cond, NULL); in COVER_best_init() 855 best->liveJobs = 0; in COVER_best_init() [all …]
|
H A D | cover.h | 28 * 2. Saving the best parameters and dictionary. 107 void COVER_best_init(COVER_best_t *best); 112 void COVER_best_wait(COVER_best_t *best); 117 void COVER_best_destroy(COVER_best_t *best); 123 void COVER_best_start(COVER_best_t *best); 128 * If this dictionary is the best so far save it and its parameters. 130 void COVER_best_finish(COVER_best_t *best, ZDICT_cover_params_t parameters,
|
H A D | fastcover.c | 146 * Selects the best segment in an epoch. 166 /* Try each segment (activeSegment) and save the best (bestSegment) */ in FASTCOVER_selectSegment() 177 * Save the best segment in bestSegment. in FASTCOVER_selectSegment() 203 /* If this segment is the best so far save it */ in FASTCOVER_selectSegment() 444 /* We fill the dictionary from the back to allow the best segments to be in FASTCOVER_buildDictionary() 462 COVER_best_t* best; member 509 COVER_best_finish(data->best, parameters, selection); in FASTCOVER_tryParameters() 646 COVER_best_t best; in ZDICT_optimizeTrainFromBuffer_fastCover() local 678 COVER_best_init(&best); in ZDICT_optimizeTrainFromBuffer_fastCover() 695 COVER_best_destroy(&best); in ZDICT_optimizeTrainFromBuffer_fastCover() [all …]
|
/freebsd/sys/dev/videomode/ |
H A D | pickmode.c | 45 const struct videomode *this, *best = NULL; in pick_mode_by_dotclock() local 55 if (best != NULL) { in pick_mode_by_dotclock() 56 if (this->dot_clock > best->dot_clock) in pick_mode_by_dotclock() 57 best = this; in pick_mode_by_dotclock() 59 best = this; in pick_mode_by_dotclock() 61 if (best != NULL) in pick_mode_by_dotclock() 62 DPRINTF("found %s\n", best->name); in pick_mode_by_dotclock() 64 return best; in pick_mode_by_dotclock() 70 const struct videomode *this, *best = NULL; in pick_mode_by_ref() local 82 if (best != NULL) { in pick_mode_by_ref() [all …]
|
/freebsd/sys/dev/clk/allwinner/ |
H A D | aw_clk_frac.c | 148 uint64_t cur, best; in aw_clk_frac_find_best() local 152 best = cur = 0; in aw_clk_frac_find_best() 173 if (abs((fout - cur)) < abs((fout - best))) { in aw_clk_frac_find_best() 174 best = cur; in aw_clk_frac_find_best() 181 return (best); in aw_clk_frac_find_best() 189 uint64_t cur, best, best_frac; in aw_clk_frac_set_freq() local 195 best = best_frac = cur = 0; in aw_clk_frac_set_freq() 206 best = best_frac = sc->frac.freq0; in aw_clk_frac_set_freq() 212 best = best_frac = sc->frac.freq1; in aw_clk_frac_set_freq() 222 best = cur; in aw_clk_frac_set_freq() [all …]
|
H A D | aw_clk_nm.c | 138 uint64_t cur, best = 0; in aw_clk_nm_find_best() local 152 clk_freq_diff(*fout, best)) { in aw_clk_nm_find_best() 153 best = cur; in aw_clk_nm_find_best() 169 return (best); in aw_clk_nm_find_best() 179 uint64_t cur, best; in aw_clk_nm_set_freq() local 185 best = cur = 0; in aw_clk_nm_set_freq() 196 clk_freq_diff(*fout, best)) { in aw_clk_nm_set_freq() 197 best = cur; in aw_clk_nm_set_freq() 208 best = aw_clk_nm_find_best(sc, fparent, fout, in aw_clk_nm_set_freq() 213 *fout = best; in aw_clk_nm_set_freq() [all …]
|
H A D | aw_clk_m.c | 137 uint64_t cur, best = 0; in aw_clk_m_find_best() local 147 if (abs(*fout - cur) < abs(*fout - best)) { in aw_clk_m_find_best() 148 best = cur; in aw_clk_m_find_best() 157 return (best); in aw_clk_m_find_best() 166 uint64_t cur, best; in aw_clk_m_set_freq() local 171 best = cur = 0; in aw_clk_m_set_freq() 173 best = aw_clk_m_find_best(sc, fparent, fout, in aw_clk_m_set_freq() 175 if ((best != *fout) && ((sc->flags & AW_CLK_SET_PARENT) != 0)) { in aw_clk_m_set_freq() 185 best = aw_clk_m_find_best(sc, fparent, fout, in aw_clk_m_set_freq() 190 *fout = best; in aw_clk_m_set_freq() [all …]
|
H A D | aw_clk_mipi.c | 116 uint64_t cur, best; in aw_clk_mipi_find_best() local 119 best = 0; in aw_clk_mipi_find_best() 128 if ((*fout - cur) < (*fout - best)) { in aw_clk_mipi_find_best() 129 best = cur; in aw_clk_mipi_find_best() 134 if (best == *fout) in aw_clk_mipi_find_best() 135 return (best); in aw_clk_mipi_find_best() 140 return best; in aw_clk_mipi_find_best() 148 uint64_t best = 0; in aw_clk_mipi_set_freq() local 156 best = aw_clk_mipi_find_best(sc, fparent, fout, &best_k, &best_m, &best_n); in aw_clk_mipi_set_freq() 158 if (best < sc->min_freq || in aw_clk_mipi_set_freq() [all …]
|
H A D | aw_clk_np.c | 103 uint64_t cur, best; in aw_clk_np_find_best() local 116 if (abs(*fout - cur) < abs(*fout - best)) { in aw_clk_np_find_best() 117 best = cur; in aw_clk_np_find_best() 127 return (best); in aw_clk_np_find_best() 135 uint64_t cur, best; in aw_clk_np_set_freq() local 141 best = cur = 0; in aw_clk_np_set_freq() 143 best = aw_clk_np_find_best(sc, fparent, fout, in aw_clk_np_set_freq() 147 *fout = best; in aw_clk_np_set_freq() 152 if ((best < *fout) && in aw_clk_np_set_freq() 157 if ((best > *fout) && in aw_clk_np_set_freq() [all …]
|
H A D | aw_clk_nmm.c | 104 uint64_t cur, best; in aw_clk_nmm_find_best() local 122 if (abs(*fout - cur) < abs(*fout - best)) { in aw_clk_nmm_find_best() 123 best = cur; in aw_clk_nmm_find_best() 135 return (best); in aw_clk_nmm_find_best() 143 uint64_t cur, best; in aw_clk_nmm_set_freq() local 149 best = cur = 0; in aw_clk_nmm_set_freq() 151 best = aw_clk_nmm_find_best(sc, fparent, fout, in aw_clk_nmm_set_freq() 155 *fout = best; in aw_clk_nmm_set_freq() 160 if ((best < *fout) && in aw_clk_nmm_set_freq() 165 if ((best > *fout) && in aw_clk_nmm_set_freq() [all …]
|
H A D | aw_clk_nkmp.c | 142 uint64_t cur, best; in aw_clk_nkmp_find_best() local 145 best = 0; in aw_clk_nkmp_find_best() 156 if ((*fout - cur) < (*fout - best)) { in aw_clk_nkmp_find_best() 157 best = cur; in aw_clk_nkmp_find_best() 163 if (best == *fout) in aw_clk_nkmp_find_best() 164 return (best); in aw_clk_nkmp_find_best() 186 return best; in aw_clk_nkmp_find_best() 254 uint64_t best; in aw_clk_nkmp_set_freq() local 260 best = aw_clk_nkmp_find_best(sc, fparent, fout, in aw_clk_nkmp_set_freq() 263 *fout = best; in aw_clk_nkmp_set_freq() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/ |
H A D | SIMachineScheduler.h | 167 // The best SUnit candidate. 181 void setBest(SISchedCandidate &Best) { in setBest() 182 assert(Best.Reason != NoCand && "uninitialized Sched candidate"); in setBest() 183 SU = Best.SU; in setBest() 184 Reason = Best.Reason; in setBest() 185 SGPRUsage = Best.SGPRUsage; in setBest() 186 VGPRUsage = Best.VGPRUsage; in setBest() 187 IsLowLatency = Best.IsLowLatency; in setBest() 188 LowLatencyOffset = Best.LowLatencyOffset; in setBest() 189 HasLowLatencyNonWaitedParent = Best.HasLowLatencyNonWaitedParent; in setBest() [all …]
|
/freebsd/sys/dev/clk/rockchip/ |
H A D | rk_clk_composite.c | 196 uint64_t best, cur; in rk_clk_composite_find_best() local 200 best = 0; in rk_clk_composite_find_best() 211 if ((freq - cur) < (freq - best)) { in rk_clk_composite_find_best() 212 best = cur; in rk_clk_composite_find_best() 229 uint64_t best, cur; in rk_clk_composite_set_freq() local 234 dprintf("Finding best parent/div for target freq of %ju\n", *fout); in rk_clk_composite_set_freq() 236 for (best_div = 0, best = 0, p_idx = 0; in rk_clk_composite_set_freq() 244 if ((*fout - cur) < (*fout - best)) { in rk_clk_composite_set_freq() 245 best = cur; in rk_clk_composite_set_freq() 249 dprintf("Best parent so far %s (%d) with best freq at " in rk_clk_composite_set_freq() [all …]
|
H A D | rk_clk_armclk.c | 147 uint64_t best = 0, best_p = 0; in rk_clk_armclk_set_freq() local 153 dprintf("Finding best parent/div for target freq of %ju\n", *fout); in rk_clk_armclk_set_freq() 159 best = sc->rates[i].freq; in rk_clk_armclk_set_freq() 161 best_p = best * div; in rk_clk_armclk_set_freq() 163 dprintf("Best parent %s (%d) with best freq at %ju\n", in rk_clk_armclk_set_freq() 166 best); in rk_clk_armclk_set_freq() 175 *fout = best; in rk_clk_armclk_set_freq() 199 *fout = best; in rk_clk_armclk_set_freq()
|
/freebsd/sys/arm/ti/clk/ |
H A D | ti_clk_dpll.c | 114 uint64_t cur, best; in ti_dpll_clk_find_best() local 127 if (abs(*fout - cur) < abs(*fout - best)) { in ti_dpll_clk_find_best() 128 best = cur; in ti_dpll_clk_find_best() 138 return (best); in ti_dpll_clk_find_best() 180 uint64_t cur, best; in ti_dpll_clk_set_freq() local 185 best = cur = 0; in ti_dpll_clk_set_freq() 187 best = ti_dpll_clk_find_best(sc, fparent, fout, in ti_dpll_clk_set_freq() 191 *fout = best; in ti_dpll_clk_set_freq() 196 if ((best < *fout) && in ti_dpll_clk_set_freq() 201 if ((best > *fout) && in ti_dpll_clk_set_freq() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/SystemZ/ |
H A D | SystemZMachineScheduler.cpp | 175 Candidate Best; in pickNode() local 178 // SU is the next candidate to be compared against current Best. in pickNode() 181 // Remeber which SU is the best candidate. in pickNode() 182 if (Best.SU == nullptr || c < Best) { in pickNode() 183 Best = c; in pickNode() 184 LLVM_DEBUG(dbgs() << "** Best so far: ";); in pickNode() 191 // resources, we can stop iterating if Best looks good. in pickNode() 192 if (!SU->isScheduleHigh && Best.noCost()) in pickNode() 196 assert (Best.SU != nullptr); in pickNode() 197 return Best.SU; in pickNode()
|
/freebsd/sys/arm64/freescale/imx/clk/ |
H A D | imx_clk_composite.c | 212 uint64_t cur, best; in imx_clk_composite_set_freq() local 216 dprintf("Finding best parent/div for target freq of %ju\n", *fout); in imx_clk_composite_set_freq() 233 best = cur; in imx_clk_composite_set_freq() 238 dprintf("Best parent so far %s (%d) with best freq at " in imx_clk_composite_set_freq() 239 "%ju\n", clknode_get_name(p_clk), p_idx, best); in imx_clk_composite_set_freq() 252 *fout = best; in imx_clk_composite_set_freq() 272 *fout = best; in imx_clk_composite_set_freq()
|