def get_compiled_kernel(kernel):
    """Given a kernel, return a high performance wrapper kernel.
    """
    from pysph.base import c_kernels
    cls = getattr(c_kernels, kernel.__class__.__name__)
    wrapper = getattr(c_kernels, kernel.__class__.__name__ + 'Wrapper')
    kern = cls(**kernel.__dict__)
    return wrapper(kern)
