C implementation of translational invariance for fc4 and multi-threading for distribute fc4