Added buildKernelFromLoopy API (C++ and C)