Modified "calcF" function to be more GPU-efficient when calculating Fscores.