Skip to content
fn

krk_var_kernel

const int & krk_var_kernel()

One column per tx, its rows split over the 32 ty. A thread sums its rows in runs of 64, each anchored at its first row, and merges the runs' moments. The column then takes two passes over shared floats: the mean, then each thread's M2 plus n (its mean - the mean)^2. Merging the threads' moments pairwise in shared memory instead cost 2.6x.