Combine f16 and f32 cores into a template function