Automated Generation of Domain Specific Kernels