declare calculate_sum_sq static inline

not having it breaks xcode 6 linker, don't know why