In the version of global threshold, how to calculate the flops? Is there an example code to calculate the theoretical FLOPS?