Parallel Implementation of FP using a Template-Based Approach