Lines Matching refs:sum
2 * 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;
24 sum = load32(ptr32) & mask;
28 return sum;
36 uint64_t sum = 0;
42 sum = slurp_head32(&ptr, &nbytes);
54 sum += h0 + h1 + h2 + h3;
63 sum += load32(cptr);
71 sum += load16(cptr);
77 sum += *(uint8_t *)cptr;
80 return fold_and_swap(sum, swap);