summaryrefslogtreecommitdiff
path: root/fs/bcachefs/mean_and_variance.h
AgeCommit message (Collapse)AuthorFilesLines
2024-01-01bcachefs: Fixes for rust bindgenKent Overstreet1-1/+4
bindgen doesn't seem to like u128 or DECLARE_FLEX_ARRAY(), but we can hack around them. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-10-23mean and variance: Add a missing includeKent Overstreet1-0/+1
abs() is in math.h Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-10-23mean and variance: More testsKent Overstreet1-8/+6
Add some more tests that test conventional and weighted mean simultaneously, and with a table of values that represents events that we'll be using this to look for so we can verify-by-eyeball that the output looks sane. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-10-23bcachefs: Mean and varianceDaniel Hill1-0/+199
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>