/freebsd/usr.bin/primes/ |
H A D | primes.c | 198 ubig factor; /* index and factor */ in primes() local 234 for (p = &prime[0], factor = prime[0]; in primes() 235 factor < stop && p <= pr_limit; factor = *(++p)) { in primes() 236 if (factor >= start) { in primes() 237 printf(hflag ? "%" PRIx64 "\n" : "%" PRIu64 "\n", factor); in primes() 256 factor = (start%(2*3*5*7*11*13))/2; /* starting copy spot */ in primes() 257 memcpy(table, &pattern[factor], pattern_size-factor); in primes() 259 for (fact_lim=pattern_size-factor; in primes() 278 factor = 17; /* 17 is first prime to use */ in primes() 282 mod = start%factor; in primes() [all …]
|
/freebsd/sys/arm/ti/clk/ |
H A D | ti_clk_dpll.c | 80 ti_clk_factor_get_max(struct ti_clk_factor *factor) in ti_clk_factor_get_max() argument 84 if (factor->flags & TI_CLK_FACTOR_FIXED) in ti_clk_factor_get_max() 85 max = factor->value; in ti_clk_factor_get_max() 87 max = (1 << factor->width); in ti_clk_factor_get_max() 94 ti_clk_factor_get_min(struct ti_clk_factor *factor) in ti_clk_factor_get_min() argument 98 if (factor->flags & TI_CLK_FACTOR_FIXED) in ti_clk_factor_get_min() 99 min = factor->value; in ti_clk_factor_get_min() 100 else if (factor->flags & TI_CLK_FACTOR_ZERO_BASED) in ti_clk_factor_get_min() 102 else if (factor->flags & TI_CLK_FACTOR_MIN_VALUE) in ti_clk_factor_get_min() 103 min = factor->min_value; in ti_clk_factor_get_min() [all …]
|
/freebsd/sys/dev/clk/allwinner/ |
H A D | aw_clk.h | 101 aw_clk_get_factor(uint32_t val, struct aw_clk_factor *factor) in aw_clk_get_factor() argument 106 if (factor->flags & AW_CLK_FACTOR_HAS_COND) { in aw_clk_get_factor() 107 cond = (val & factor->cond_mask) >> factor->cond_shift; in aw_clk_get_factor() 108 if (cond != factor->cond_value) in aw_clk_get_factor() 112 if (factor->flags & AW_CLK_FACTOR_FIXED) in aw_clk_get_factor() 113 return (factor->value); in aw_clk_get_factor() 115 factor_val = (val & factor->mask) >> factor->shift; in aw_clk_get_factor() 116 if (factor_val == 0 && (factor->flags & AW_CLK_FACTOR_ZERO_IS_ONE)) in aw_clk_get_factor() 119 if (factor->flags & AW_CLK_FACTOR_POWER_OF_TWO) in aw_clk_get_factor() 121 else if (!(factor->flags & AW_CLK_FACTOR_ZERO_BASED)) in aw_clk_get_factor() [all …]
|
/freebsd/sys/sys/ |
H A D | time.h | 164 __stime64_scale32_ceil(int64_t x, int32_t factor, int32_t divisor) in __stime64_scale32_ceil() argument 168 return (x / divisor * factor + (rem * factor + divisor - 1) / divisor); in __stime64_scale32_ceil() 172 __stime64_scale32_floor(int64_t x, int32_t factor, int32_t divisor) in __stime64_scale32_floor() argument 176 return (x / divisor * factor + (rem * factor) / divisor); in __stime64_scale32_floor() 180 __utime64_scale32_ceil(uint64_t x, uint32_t factor, uint32_t divisor) in __utime64_scale32_ceil() argument 184 return (x / divisor * factor + (rem * factor + divisor - 1) / divisor); in __utime64_scale32_ceil() 188 __utime64_scale32_floor(uint64_t x, uint32_t factor, uint32_t divisor) in __utime64_scale32_floor() argument 192 return (x / divisor * factor + (rem * factor) / divisor); in __utime64_scale32_floor() 218 __stime64_scale64_ceil(int64_t x, int64_t factor, int64_t divisor) in __stime64_scale64_ceil() argument 220 const int64_t gcd = __common_powers_of_two(factor, divisor); in __stime64_scale64_ceil() [all …]
|
/freebsd/usr.bin/factor/tests/ |
H A D | factor_tests.sh | 34 atf_check -o inline:"1: 1\n" factor 1.44 45 atf_check -o inline:"3: 3\n" factor $pi 55 atf_check -o inline:"8: 2 2 2\n" factor 8 65 atf_check -o inline:"31: 31\n" factor 31 75 atf_check -s not-exit:0 -e inline:"factor: negative numbers aren't permitted.\n" factor -- -4
|
/freebsd/sys/contrib/device-tree/src/arm/ti/omap/ |
H A D | omap36xx-omap3430es2plus-clocks.dtsi | 47 compatible = "fixed-factor-clock"; 78 compatible = "fixed-factor-clock"; 101 compatible = "fixed-factor-clock"; 109 compatible = "fixed-factor-clock"; 117 compatible = "fixed-factor-clock"; 125 compatible = "fixed-factor-clock"; 133 compatible = "fixed-factor-clock"; 141 compatible = "fixed-factor-clock"; 149 compatible = "fixed-factor-clock"; 157 compatible = "fixed-factor-clock"; [all …]
|
H A D | am33xx-clocks.dtsi | 19 compatible = "fixed-factor-clock"; 28 compatible = "fixed-factor-clock"; 37 compatible = "fixed-factor-clock"; 46 compatible = "fixed-factor-clock"; 55 compatible = "fixed-factor-clock"; 64 compatible = "fixed-factor-clock"; 73 compatible = "fixed-factor-clock"; 82 compatible = "fixed-factor-clock"; 91 compatible = "fixed-factor-clock"; 100 compatible = "fixed-factor-clock"; [all …]
|
H A D | am43xx-clocks.dtsi | 37 compatible = "fixed-factor-clock"; 46 compatible = "fixed-factor-clock"; 55 compatible = "fixed-factor-clock"; 64 compatible = "fixed-factor-clock"; 73 compatible = "fixed-factor-clock"; 82 compatible = "fixed-factor-clock"; 91 compatible = "fixed-factor-clock"; 100 compatible = "fixed-factor-clock"; 109 compatible = "fixed-factor-clock"; 118 compatible = "fixed-factor-clock"; [all …]
|
H A D | omap36xx-am35xx-omap3430es2plus-clocks.dtsi | 10 compatible = "fixed-factor-clock"; 18 compatible = "fixed-factor-clock"; 53 compatible = "fixed-factor-clock"; 61 compatible = "fixed-factor-clock"; 69 compatible = "fixed-factor-clock"; 77 compatible = "fixed-factor-clock"; 85 compatible = "fixed-factor-clock";
|
H A D | omap3xxx-clocks.dtsi | 41 compatible = "fixed-factor-clock"; 49 compatible = "fixed-factor-clock"; 57 compatible = "fixed-factor-clock"; 65 compatible = "fixed-factor-clock"; 73 compatible = "fixed-factor-clock"; 227 compatible = "fixed-factor-clock"; 244 compatible = "fixed-factor-clock"; 342 compatible = "fixed-factor-clock"; 359 compatible = "fixed-factor-clock"; 379 compatible = "fixed-factor-clock"; [all …]
|
H A D | omap24xx-clocks.dtsi | 84 compatible = "fixed-factor-clock"; 158 compatible = "fixed-factor-clock"; 170 compatible = "fixed-factor-clock"; 186 compatible = "fixed-factor-clock"; 352 compatible = "fixed-factor-clock"; 360 compatible = "fixed-factor-clock"; 368 compatible = "fixed-factor-clock"; 376 compatible = "fixed-factor-clock"; 384 compatible = "fixed-factor-clock"; 398 compatible = "fixed-factor-clock"; [all …]
|
/freebsd/usr.bin/units/ |
H A D | units.c | 55 double factor; member 223 theunit->factor = 1.0; in initializeunit() 253 printf(numfmt, theunit->factor); in showunit() 355 theunit->factor *= num; in addunit() 358 theunit->factor /= num; in addunit() 368 theunit->factor /= num; in addunit() 371 theunit->factor *= num; in addunit() 383 theunit->factor *= num; in addunit() 386 theunit->factor /= num; in addunit() 678 (have->factor in showanswer() [all...] |
/freebsd/usr.bin/factor/ |
H A D | Makefile | 3 PROG= factor 4 SRCS= factor.c pr_tbl.c 12 MAN= factor.6 13 MLINKS+=factor.6 primes.6
|
/freebsd/sys/dev/acpica/ |
H A D | acpi_smbat.c | 348 uint32_t factor; in acpi_smbat_get_bst() local 366 factor = 10; in acpi_smbat_get_bst() 368 factor = 1; in acpi_smbat_get_bst() 389 sc->bst.rate = val * factor; in acpi_smbat_get_bst() 393 sc->bst.rate = (-val) * factor; in acpi_smbat_get_bst() 399 sc->bst.cap = val * factor; in acpi_smbat_get_bst() 420 uint32_t factor; in acpi_smbat_get_bix() local 444 factor = 10; in acpi_smbat_get_bix() 447 factor = 1; in acpi_smbat_get_bix() 453 sc->bix.dcap = val * factor; in acpi_smbat_get_bix() [all …]
|
/freebsd/sys/contrib/ck/include/ |
H A D | ck_brlock.h | 108 ck_brlock_write_trylock(struct ck_brlock *br, unsigned int factor) in ck_brlock_write_trylock() argument 114 if (++steps >= factor) in ck_brlock_write_trylock() 128 if (++steps >= factor) { in ck_brlock_write_trylock() 222 unsigned int factor) in ck_brlock_read_trylock() argument 233 if (++steps >= factor) in ck_brlock_read_trylock() 262 if (++steps >= factor) in ck_brlock_read_trylock()
|
/freebsd/contrib/llvm-project/openmp/runtime/src/ |
H A D | kmp_str.cpp | 638 int result, factor; in __kmp_str_to_int() 651 factor = 1; in __kmp_str_to_int() 656 factor = 1; in __kmp_str_to_int() 661 factor = 1024; in __kmp_str_to_int() 666 factor = (1024 * 1024); in __kmp_str_to_int() 672 factor = 1; 675 if (result > (INT_MAX / factor)) in __kmp_str_to_size() 678 result *= factor; in __kmp_str_to_size() 694 size_t dfactor, // I: The factor if none of the letters specified. in __kmp_str_to_size() 699 size_t factor in __kmp_str_to_size() 623 int result, factor; __kmp_str_to_int() local 684 size_t factor = 0; __kmp_str_to_size() local [all...] |
/freebsd/sys/contrib/dev/athk/ |
H A D | dfs_pri_detector.c | 47 u32 factor; in pde_get_multiple() local 59 factor = val / fraction; in pde_get_multiple() 65 factor++; in pde_get_multiple() 67 factor = 0; in pde_get_multiple() 69 return factor; in pde_get_multiple() 258 u32 factor; in pseq_handler_create_sequences() local 263 factor = pde_get_multiple(ps.last_ts - p2->ts, ps.pri, in pseq_handler_create_sequences() 265 if (factor > 0) { in pseq_handler_create_sequences() 310 u32 factor; in pseq_handler_add_to_existing_seqs() local 320 factor = pde_get_multiple(delta_ts, ps->pri, in pseq_handler_add_to_existing_seqs() [all …]
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/include/ |
H A D | math.shlib | 74 *PB|*pb|*P|*p) factor='1024^5' ;; 75 *TB|*tb|*T|*t) factor='1024^4' ;; 76 *GB|*gb|*G|*g) factor='1024^3' ;; 77 *MB|*mb|*M|*m) factor='1024^2' ;; 78 *KB|*kb|*K|*k) factor='1024^1' ;; 79 *B|*b) factor='1024^0' ;; 81 *) factor='1024^0' ;; 84 echo "$value * ($factor)" | bc
|
/freebsd/contrib/wpa/src/ap/ |
H A D | acs.c | 373 long double factor, busy, total; in acs_survey_interference_factor() local 392 factor = pow(10, survey->nf / 5.0L) + in acs_survey_interference_factor() 397 return factor; in acs_survey_interference_factor() 737 long double factor, in acs_update_puncturing_bitmap() argument 755 threshold = factor * conf->punct_acs_threshold / 100; in acs_update_puncturing_bitmap() 832 long double factor; in acs_find_ideal_chan_mode() local 930 factor = 0; in acs_find_ideal_chan_mode() 933 factor = chan->interference_factor; in acs_find_ideal_chan_mode() 954 factor += adj_chan->interference_factor; in acs_find_ideal_chan_mode() 993 factor += ACS_ADJ_WEIGHT * in acs_find_ideal_chan_mode() [all …]
|
/freebsd/sys/contrib/device-tree/src/arm64/broadcom/stingray/ |
H A D | stingray-clock.dtsi | 43 compatible = "fixed-factor-clock"; 129 compatible = "fixed-factor-clock"; 137 compatible = "fixed-factor-clock"; 146 compatible = "fixed-factor-clock"; 154 compatible = "fixed-factor-clock"; 162 compatible = "fixed-factor-clock"; 170 compatible = "fixed-factor-clock"; 178 compatible = "fixed-factor-clock";
|
/freebsd/sys/contrib/device-tree/Bindings/iio/light/ |
H A D | us5182d.txt | 8 - upisemi,glass-coef: glass attenuation factor - compensation factor of 14 - upisemi,upper-dark-gain: 8-bit dark gain compensation factor(4 int and 4 17 - upisemi,lower-dark-gain: 8-bit dark gain compensation factor(4 int and 4 34 (0 * dark-gain), and a 1.35 compensation factor when ALS < thresh.
|
/freebsd/sys/contrib/device-tree/src/arm/ti/keystone/ |
H A D | keystone-clocks.dtsi | 25 compatible = "fixed-factor-clock"; 34 compatible = "fixed-factor-clock"; 63 compatible = "fixed-factor-clock"; 72 compatible = "fixed-factor-clock"; 81 compatible = "fixed-factor-clock"; 90 compatible = "fixed-factor-clock"; 99 compatible = "fixed-factor-clock"; 108 compatible = "fixed-factor-clock"; 117 compatible = "fixed-factor-clock"; 126 compatible = "fixed-factor-clock"; [all …]
|
/freebsd/sys/contrib/device-tree/Bindings/clock/ti/ |
H A D | fixed-factor-clock.txt | 1 Binding for TI fixed factor rate clock sources. 12 - compatible : shall be "ti,fixed-factor-clock". 28 compatible = "ti,fixed-factor-clock"; 37 compatible = "ti,fixed-factor-clock";
|
/freebsd/sys/contrib/device-tree/src/arm/arm/ |
H A D | mps2.dtsi | 82 compatible = "fixed-factor-clock"; 90 compatible = "fixed-factor-clock"; 98 compatible = "fixed-factor-clock"; 106 compatible = "fixed-factor-clock"; 114 compatible = "fixed-factor-clock"; 122 compatible = "fixed-factor-clock"; 130 compatible = "fixed-factor-clock";
|
/freebsd/sys/contrib/dev/mediatek/mt76/ |
H A D | mt76x02_dfs.c | 185 int remainder, factor; in mt76x02_dfs_get_multiple() local 193 factor = val / frac; in mt76x02_dfs_get_multiple() 198 factor++; in mt76x02_dfs_get_multiple() 200 factor = 0; in mt76x02_dfs_get_multiple() 202 return factor; in mt76x02_dfs_get_multiple() 436 int i, j, end, pri, factor, cur_pri; in mt76x02_dfs_create_sequence() local 488 factor = mt76x02_dfs_get_multiple(cur_pri, seq.pri, in mt76x02_dfs_create_sequence() 490 if (factor > 0) { in mt76x02_dfs_create_sequence() 520 int factor, pri; in mt76x02_dfs_add_event_to_sequence() local 534 factor = mt76x02_dfs_get_multiple(pri, seq->pri, in mt76x02_dfs_add_event_to_sequence() [all …]
|