templated gregory patch fcts for sse,avx,mic