Home
last modified time | relevance | path

Searched refs:sum (Results 1 – 9 of 9) sorted by relevance

/lib/
Dchecksum_kunit.c214 #define full_csum(buff, len, sum) csum_fold(csum_partial(buff, len, sum)) argument
248 __wsum sum; in test_csum_fixed_random_inputs() local
260 sum = to_wsum(random_init_sum); in test_csum_fixed_random_inputs()
261 result = full_csum(&tmp_buf[align], len, sum); in test_csum_fixed_random_inputs()
274 __wsum sum; in test_csum_all_carry_inputs() local
285 sum = to_wsum(0xffffffff); in test_csum_all_carry_inputs()
286 result = full_csum(&tmp_buf[align], len, sum); in test_csum_all_carry_inputs()
293 sum = 0; in test_csum_all_carry_inputs()
294 result = full_csum(&tmp_buf[align], len, sum); in test_csum_all_carry_inputs()
314 __wsum sum; in test_csum_no_carry_inputs() local
[all …]
Dchecksum.c127 unsigned int sum = (__force unsigned int)wsum; in csum_partial() local
131 result += sum; in csum_partial()
132 if (sum > result) in csum_partial()
159 __u32 len, __u8 proto, __wsum sum) in csum_tcpudp_nofold() argument
161 unsigned long long s = (__force u32)sum; in csum_tcpudp_nofold()
Dstackinit_kunit.c153 u8 sum = 0, i; \
166 for (sum = 0, i = 0; i < target_size; i++) \
167 sum += (check_buf[i] != 0xFF); \
168 KUNIT_ASSERT_EQ_MSG(test, sum, 0, \
187 for (sum = 0, i = 0; i < target_size; i++) \
188 sum += (check_buf[i] == 0xFF); \
190 if (sum != 0 && xfail) \
193 sum); \
194 KUNIT_ASSERT_EQ_MSG(test, sum, 0, \
195 "uninit bytes: %d\n", sum); \
Diov_iter.c304 __wsum sum, size_t off) in csum_and_memcpy() argument
307 return csum_block_add(sum, next, off); in csum_and_memcpy()
1187 __wsum sum, next; in csum_and_copy_from_iter() local
1188 sum = *csum; in csum_and_copy_from_iter()
1194 sum = csum_block_add(sum, next, off); in csum_and_copy_from_iter()
1197 sum = csum_and_memcpy(addr + off, base, len, sum, off); in csum_and_copy_from_iter()
1200 *csum = sum; in csum_and_copy_from_iter()
1209 __wsum sum, next; in csum_and_copy_to_iter() local
1222 sum = csum_shift(csstate->csum, csstate->off); in csum_and_copy_to_iter()
1225 sum = csum_block_add(sum, next, off); in csum_and_copy_to_iter()
[all …]
Dbch.c1026 uint32_t sum; in bch_decode() local
1047 for (i = 0, sum = 0; i < (int)ecc_words; i++) { in bch_decode()
1049 sum |= bch->ecc_buf[i]; in bch_decode()
1051 if (!sum) in bch_decode()
1152 unsigned int sum, x, y, remaining, ak = 0, xi[BCH_MAX_M]; in build_deg2_base() local
1156 for (j = 0, sum = 0; j < m; j++) in build_deg2_base()
1157 sum ^= a_pow(bch, i*(1 << j)); in build_deg2_base()
1159 if (sum) { in build_deg2_base()
Doverflow_kunit.c51 t sum, diff, prod; \
274 check_one_op(t, fmt, add, "+", p->a, p->b, p->sum, p->s_of); \
275 check_one_op(t, fmt, add, "+", p->b, p->a, p->sum, p->s_of); \
288 __same_type(n ## _tests[0].sum, int)); \
/lib/crypto/mpi/
Dec.c1166 static void montgomery_ladder(MPI_POINT prd, MPI_POINT sum, in montgomery_ladder() argument
1170 ctx->addm(sum->x, p2->x, p2->z, ctx); in montgomery_ladder()
1174 ctx->mulm(p2->x, p1->z, sum->x, ctx); in montgomery_ladder()
1178 ctx->addm(sum->x, p2->x, p2->z, ctx); in montgomery_ladder()
1182 ctx->pow2(sum->x, sum->x, ctx); in montgomery_ladder()
1183 ctx->pow2(sum->z, p2->z, ctx); in montgomery_ladder()
1185 ctx->mulm(sum->z, sum->z, dif_x, ctx); in montgomery_ladder()
1255 MPI_POINT q1, q2, prd, sum; in mpi_ec_mul_point() local
1285 sum = &p2_; in mpi_ec_mul_point()
1292 montgomery_ladder(prd, sum, q1, q2, point->x, ctx); in mpi_ec_mul_point()
[all …]
/lib/zstd/compress/
Dzstd_compress_internal.h1294 unsigned u, sum; in ZSTD_debugTable() local
1295 for (u=0, sum=0; u<=max; u++) sum += table[u]; in ZSTD_debugTable()
1296 DEBUGLOG(2, "total nb elts: %u", sum); in ZSTD_debugTable()
1299 u, table[u], ZSTD_fWeight(sum) - ZSTD_fWeight(table[u]) ); in ZSTD_debugTable()
Dzstd_opt.c93 U32 s, sum=0; in ZSTD_downscaleStats() local
98 sum += table[s]; in ZSTD_downscaleStats()
100 return sum; in ZSTD_downscaleStats()