bcachefs: Mean and variance
authorDaniel Hill <daniel@gluo.nz>
Sat, 6 Aug 2022 02:48:49 +0000 (14:48 +1200)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:43 +0000 (17:09 -0400)
commit92095781e0f607e735971c1a6462ca6dad8826d2
tree512dffdde6b5714865d7dabc54a4fa7f27a66708
parent07bfcc0b4c92a569b7f613a3202f45c89f983b4f
bcachefs: Mean and variance

This module provides a fast 64bit implementation of basic statistics
functions, including mean, variance and standard deviation in both
weighted and unweighted variants, the unweighted variant has a 32bit
limitation per sample to prevent overflow when squaring.

Signed-off-by: Daniel Hill <daniel@gluo.nz>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/Kconfig
fs/bcachefs/Makefile
fs/bcachefs/mean_and_variance.c [new file with mode: 0644]
fs/bcachefs/mean_and_variance.h [new file with mode: 0644]
fs/bcachefs/mean_and_variance_test.c [new file with mode: 0644]