Home
last modified time | relevance | path

Searched full:sum (Results 1 – 25 of 1132) sorted by relevance

12345678910>>...46

/freebsd/crypto/openssl/test/recipes/10-test_bn_data/
H A Dbnsum.txt8 # Sum tests.
10 # These test vectors satisfy A + B = Sum.
12 Sum = 0
16 Sum = c590e57ee64fced3ca84d4bb013bba7d633e68b2ff4e27bf1db43f386dbfcce501f112b7fff6fb9436a576ccfccce…
20 Sum = -c590e57ee64fced3ca84d4bb013bba7d633e68b2ff4e27bf1db43f386dbfcce501f112b7fff6fb9436a576ccfccc…
24 Sum = 0
28 Sum = c590e57ee64fced3ca84d4bb013bba7d633e68b2ff4e27bf1db43f386dbfcce501f112b7fff6fb9436a576ccfccce…
32 Sum = c590e57ee64fceccd54e0bdc52476a756d32e794922dca0acc780d2c6af8852351102b40dfb97009f95e019a5bf38…
36 Sum = -c590e57ee64fcec882fef3ffd015a3fd9024d8f5f6d53eb537d6abdb0ff5e76a8fb08d5feed113fc9e74745d957a…
40 Sum = -c590e57ee64fceeb242f8a0893eaa0d2ccc3dc57ec40fe917cfde66618fba678ce0c8fffc566d4e8c7944d6443de…
[all …]
/freebsd/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/multiaggs/
H A Dtst.many.d43 @agg0[0] = sum(0);
44 @agg1[1] = sum(1);
45 @agg2[2] = sum(2);
46 @agg3[3] = sum(3);
47 @agg4[4] = sum(4);
48 @agg5[5] = sum(5);
49 @agg6[6] = sum(6);
50 @agg7[7] = sum(7);
51 @agg8[8] = sum(8);
52 @agg9[9] = sum(9);
[all …]
/freebsd/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/
H A Dtst.signedkeyspos.d50 @i8["cat", (char)-2] = sum(-2);
51 @i8["dog", (char)-2] = sum(-22);
52 @i8["mouse", (char)-2] = sum(-222);
53 @i8["cat", (char)-1] = sum(-1);
54 @i8["dog", (char)-1] = sum(-11);
55 @i8["mouse", (char)-1] = sum(-111);
56 @i8["cat", (char)0] = sum(0);
57 @i8["dog", (char)0] = sum(10);
58 @i8["mouse", (char)0] = sum(100);
59 @i8["cat", (char)1] = sum(1);
[all …]
H A Dtst.order.d33 @[8] = sum(1);
34 @[6] = sum(1);
35 @[7] = sum(1);
36 @[5] = sum(1);
37 @[3] = sum(1);
38 @[0] = sum(1);
39 @[9] = sum(1);
41 @tour["Ghent"] = sum(1);
42 @tour["Berlin"] = sum(1);
43 @tour["London"] = sum(1);
[all …]
H A Dtst.signedkeys.d95 @i8[(char)-2] = sum(-2);
96 @i8[(char)-1] = sum(-1);
97 @i8[(char)0] = sum(0);
98 @i8[(char)1] = sum(1);
99 @i8[(char)2] = sum(2);
101 @i16[(short)-2] = sum(-2);
102 @i16[(short)-1] = sum(-1);
103 @i16[(short)0] = sum(0);
104 @i16[(short)1] = sum(1);
105 @i16[(short)2] = sum(2);
[all …]
H A Dtst.keysort.d36 @tour["Ghent", i++, j] = sum(5 - j);
39 @tour["Berlin", i++, j] = sum(5 - j);
42 @tour["London", i++, j] = sum(5 - j);
43 @tour["Dublin", i++, j] = sum(5 - j);
46 @tour["Shanghai", i++, j] = sum(5 - j);
49 @tour["Zurich", i++, j] = sum(5 - j);
52 @tour["Regina", i++, j] = sum(5 - j);
53 @tour["Winnipeg", i++, j] = sum(5 - j);
54 @tour["Edmonton", i++, j] = sum(5 - j);
55 @tour["Calgary", i++, j] = sum(5 - j);
[all …]
H A Dtst.agghist.d21 @["demerit"] = sum(-10);
22 @["wtf"] = sum(10);
23 @["bot"] = sum(20);
25 @bagnoogle["SOAP/XML"] = sum(1);
26 @bagnoogle["XACML store"] = sum(5);
27 @bagnoogle["SAML token"] = sum(6);
29 @stalloogle["breakfast"] = sum(-5);
30 @stalloogle["non-diet pepsi"] = sum(-20);
31 @stalloogle["parrot"] = sum(-100);
/freebsd/sys/netinet6/
H A Din6_cksum.c78 #define REDUCE {l_util.l = sum; sum = l_util.s[0] + l_util.s[1]; (void)ADDCARRY(sum);}
93 int sum; in _in6_cksum_pseudo() local
104 sum = csum; in _in6_cksum_pseudo()
114 sum += uph.phs[0]; sum += uph.phs[1]; in _in6_cksum_pseudo()
115 sum += uph.phs[2]; sum += uph.phs[3]; in _in6_cksum_pseudo()
120 sum += w[0]; sum += w[1]; sum += w[2]; sum += w[3]; in _in6_cksum_pseudo()
121 sum += w[4]; sum += w[5]; sum += w[6]; sum += w[7]; in _in6_cksum_pseudo()
123 sum -= scope; in _in6_cksum_pseudo()
128 sum += w[0]; sum += w[1]; sum += w[2]; sum += w[3]; in _in6_cksum_pseudo()
129 sum += w[4]; sum += w[5]; sum += w[6]; sum += w[7]; in _in6_cksum_pseudo()
[all …]
/freebsd/contrib/arm-optimized-routines/networking/
H A Dchksum_common.h85 uint64_t sum = 0; in slurp_small() local
88 sum += load32(cptr); in slurp_small()
94 sum += load16(cptr); in slurp_small()
99 sum += (uint8_t) *cptr; in slurp_small()
101 return sum; in slurp_small()
112 fold_and_swap(uint64_t sum, bool swap) in fold_and_swap() argument
114 /* Fold 64-bit sum to 32 bits */ in fold_and_swap()
115 sum = (sum & 0xffffffff) + (sum >> 32); in fold_and_swap()
116 sum = (sum & 0xffffffff) + (sum >> 32); in fold_and_swap()
117 Assert(sum == (uint32_t) sum); in fold_and_swap()
[all …]
H A Dchksum.c2 * Compute 16-bit sum in ones' complement arithmetic (with end-around carry).
3 * This sum is often used as a simple checksum in networking.
16 uint32_t sum = 0; in slurp_head32() local
24 sum = load32(ptr32) & mask; in slurp_head32()
28 return sum; in slurp_head32()
36 uint64_t sum = 0; in __chksum() local
42 sum = slurp_head32(&ptr, &nbytes); in __chksum()
46 /* Sum all 16-byte chunks */ in __chksum()
54 sum += h0 + h1 + h2 + h3; in __chksum()
63 sum += load32(cptr); in __chksum()
[all …]
/freebsd/contrib/tcpdump/
H A Din_cksum.c52 #define REDUCE {l_util.l = sum; sum = l_util.s[0] + l_util.s[1]; ADDCARRY(sum);}
58 int sum = 0; in in_cksum() local
85 sum += s_util.s; in in_cksum()
95 sum <<= 8; in in_cksum()
106 sum += w[0]; sum += w[1]; sum += w[2]; sum += w[3]; in in_cksum()
107 sum += w[4]; sum += w[5]; sum += w[6]; sum += w[7]; in in_cksum()
108 sum += w[8]; sum += w[9]; sum += w[10]; sum += w[11]; in in_cksum()
109 sum += w[12]; sum += w[13]; sum += w[14]; sum += w[15]; in in_cksum()
114 sum += w[0]; sum += w[1]; sum += w[2]; sum += w[3]; in in_cksum()
122 sum += *w++; in in_cksum()
[all …]
/freebsd/sys/netinet/libalias/
H A Dalias_util.c76 int sum, oddbyte; in LibAliasInternetChecksum() local
79 sum = 0; in LibAliasInternetChecksum()
81 sum += *ptr++; in LibAliasInternetChecksum()
88 sum += oddbyte; in LibAliasInternetChecksum()
90 sum = (sum >> 16) + (sum & 0xffff); in LibAliasInternetChecksum()
91 sum += (sum >> 16); in LibAliasInternetChecksum()
93 return (~sum); in LibAliasInternetChecksum()
111 int sum, oddbyte; in TcpChecksum() local
121 sum = 0; in TcpChecksum()
123 sum += *ptr++; in TcpChecksum()
[all …]
/freebsd/sys/netinet/
H A Din_cksum.c64 q_util.q = sum; \
65 sum = q_util.s[0] + q_util.s[1] + q_util.s[2] + q_util.s[3]; \
69 q_util.q = sum; \
71 sum = l_util.s[0] + l_util.s[1]; \
72 ADDCARRY(sum); \
105 u_int64_t sum = 0; in in_cksumdata() local
111 sum = (u_int64_t) lw[0] + lw[1] + lw[2] + lw[3] + lw[4]; in in_cksumdata()
113 return sum; in in_cksumdata()
119 sum = *lw++ & masks[len >= 3 ? 3 : len]; in in_cksumdata()
123 return sum; in in_cksumdata()
[all …]
/freebsd/sys/i386/include/
H A Din_cksum.h52 u_int sum = 0; in in_cksum_hdr() local
61 : "+r" (sum) in in_cksum_hdr()
69 sum = (sum & 0xffff) + (sum >> 16); in in_cksum_hdr()
70 if (sum > 0xffff) in in_cksum_hdr()
71 sum -= 0xffff; in in_cksum_hdr()
73 return ~sum & 0xffff; in in_cksum_hdr()
78 in_addword(u_short sum, u_short b) in in_addword() argument
83 : "+r" (sum) in in_addword()
87 return (sum); in in_addword()
91 in_pseudo(u_int sum, u_int b, u_int c) in in_pseudo() argument
[all …]
/freebsd/contrib/arm-optimized-routines/networking/aarch64/
H A Dchksum_simd.c22 uint64_t sum = 0; in slurp_head64() local
30 /* Fold 64-bit sum to 33 bits */ in slurp_head64()
31 sum = val >> 32; in slurp_head64()
32 sum += (uint32_t) val; in slurp_head64()
36 return sum; in slurp_head64()
41 slurp_tail64(uint64_t sum, const void *ptr, uint32_t nbytes) in slurp_tail64() argument
50 sum += val >> 32; in slurp_tail64()
51 sum += (uint32_t) val; in slurp_tail64()
55 return sum; in slurp_tail64()
62 uint64_t sum; in __chksum_aarch64_simd() local
[all …]
/freebsd/sys/arm/arm/
H A Din_cksum_machdep.c60 q_util.q = sum; \
61 sum = q_util.s[0] + q_util.s[1] + q_util.s[2] + q_util.s[3]; \
65 q_util.q = sum; \
67 sum = l_util.s[0] + l_util.s[1]; \
68 ADDCARRY(sum); \
84 u_int64_t sum = a + b; in in_addword() local
86 ADDCARRY(sum); in in_addword()
87 return (sum); in in_addword()
93 uint64_t sum; in _do_cksum() local
96 sum = do_cksum(addr, len); in _do_cksum()
[all …]
/freebsd/stand/libsa/
H A Din_cksum.c50 int sum = 0, oddbyte = 0, v = 0; in in_cksum() local
56 sum += v + *cp++; in in_cksum()
61 sum += *(u_short *)cp; in in_cksum()
67 sum += *cp++ << 8; in in_cksum()
68 sum += *cp++; in in_cksum()
70 sum += *cp++; in in_cksum()
71 sum += *cp++ << 8; in in_cksum()
83 sum += v; in in_cksum()
84 sum = (sum >> 16) + (sum & 0xffff); /* add in accumulated carries */ in in_cksum()
85 sum += sum >> 16; /* add potential last carry */ in in_cksum()
[all …]
/freebsd/sys/netpfil/pf/
H A Din4_cksum.c77 #define REDUCE {l_util.l = sum; sum = l_util.s[0] + l_util.s[1]; (void)ADDCARRY(sum);}
95 int sum = 0; in in4_cksum() local
110 sum += w[0]; sum += w[1]; sum += w[2]; sum += w[3]; sum += w[4]; in in4_cksum()
111 sum += w[5]; sum += w[6]; sum += w[7]; sum += w[8]; sum += w[9]; in in4_cksum()
116 sum += psum; in in4_cksum()
118 return (~sum & 0xffff); in in4_cksum()
/freebsd/sbin/ping/tests/
H A Din_cksum_test.c44 u_short sum; in ATF_TC_BODY() local
46 sum = in_cksum(data, nitems(data)); in ATF_TC_BODY()
47 u_char *c_sum = (u_char *)&sum; in ATF_TC_BODY()
56 u_short sum; in ATF_TC_BODY() local
58 sum = in_cksum(data, nitems(data)); in ATF_TC_BODY()
59 u_char *c_sum = (u_char *)&sum; in ATF_TC_BODY()
68 u_short sum; in ATF_TC_BODY() local
70 sum = in_cksum(data + 1, nitems(data) - 1); in ATF_TC_BODY()
71 u_char *c_sum = (u_char *)&sum; in ATF_TC_BODY()
80 u_short sum; in ATF_TC_BODY() local
[all …]
/freebsd/contrib/arm-optimized-routines/networking/test/
H A Dchksum.c42 uint64_t sum = 0;/* Need 64-bit accumulator when nbytes > 64K */ in checksum_simple() local
44 /* Sum all halfwords, assume misaligned accesses are handled in HW */ in checksum_simple()
47 sum += *hptr++; in checksum_simple()
53 sum += *(uint8_t *) hptr; in checksum_simple()
56 /* Fold 64-bit sum to 32 bits */ in checksum_simple()
57 sum = (sum & 0xffffffff) + (sum >> 32); in checksum_simple()
58 sum = (sum & 0xffffffff) + (sum >> 32); in checksum_simple()
59 Assert(sum == (uint32_t) sum); in checksum_simple()
61 /* Fold 32-bit sum to 16 bits */ in checksum_simple()
62 sum = (sum & 0xffff) + (sum >> 16); in checksum_simple()
[all …]
/freebsd/sbin/ping/
H A Dutils.c46 int nleft, sum; in in_cksum() local
55 sum = 0; in in_cksum()
59 * Our algorithm is simple, using a 32 bit accumulator (sum), we add in in_cksum()
67 sum += data; in in_cksum()
76 sum += last.us; in in_cksum()
80 sum = (sum >> 16) + (sum & 0xffff); /* add hi 16 to low 16 */ in in_cksum()
81 sum += (sum >> 16); /* add carry */ in in_cksum()
82 answer = ~sum; /* truncate to 16 bits */ in in_cksum()
/freebsd/sys/i386/i386/
H A Din_cksum_machdep.c55 #define REDUCE {sum = (sum & 0xffff) + (sum >> 16); ADDCARRY(sum);}
71 unsigned sum = 0; in in_cksum_skip() local
99 * mbuf. sum was REDUCEd when we found mlen == -1 in in_cksum_skip()
102 sum += su.s; in in_cksum_skip()
119 sum <<= 8; in in_cksum_skip()
126 sum += *w++; in in_cksum_skip()
137 : "+r" (sum) in in_cksum_skip()
148 : "+r" (sum) in in_cksum_skip()
192 : "+r" (sum) in in_cksum_skip()
218 : "+r" (sum) in in_cksum_skip()
[all …]
/freebsd/usr.bin/vmstat/
H A Dvmstat.c152 } sum, osum; variable
754 fill_vmmeter(&sum); in dovmstat()
764 (uintmax_t)total.t_avm * sum.v_page_size); in dovmstat()
766 (uintmax_t)total.t_free * sum.v_page_size); in dovmstat()
768 rate(sum.v_vm_faults - osum.v_vm_faults)); in dovmstat()
773 rate(sum.v_reactivated - osum.v_reactivated)); in dovmstat()
775 rate(sum.v_swapin + sum.v_vnodein - in dovmstat()
778 rate(sum.v_swapout + sum.v_vnodeout - in dovmstat()
781 rate(sum.v_tfree - osum.v_tfree)); in dovmstat()
783 rate(sum.v_pdpages - osum.v_pdpages)); in dovmstat()
[all …]
/freebsd/sys/arm/include/
H A Din_cksum.h43 u_short in_addword(u_short sum, u_short b);
51 in_pseudo(u_int sum, u_int b, u_int c) in in_pseudo() argument
56 : "+r" (sum) in in_pseudo()
58 sum = (sum & 0xffff) + (sum >> 16); in in_pseudo()
59 if (sum > 0xffff) in in_pseudo()
60 sum -= 0xffff; in in_pseudo()
61 return (sum); in in_pseudo()
/freebsd/sbin/dhclient/
H A Dpacket.c59 checksum(unsigned char *buf, unsigned nbytes, u_int32_t sum) in checksum() argument
65 sum += (u_int16_t)ntohs(*((u_int16_t *)(buf + i))); in checksum()
66 if (sum > 0xFFFF) in checksum()
67 sum -= 0xFFFF; in checksum()
76 sum += buf[i] << 8; in checksum()
77 if (sum > 0xFFFF) in checksum()
78 sum -= 0xFFFF; in checksum()
81 return (sum); in checksum()
85 wrapsum(u_int32_t sum) in wrapsum() argument
87 sum = ~sum & 0xFFFF; in wrapsum()
[all …]

12345678910>>...46