Yeah, that would be one of approaches. You don’t have to use cpu_kernel_vec - there is also cpu_kernel, or use can dispatch to an arbitrary c++ template function (e.g. cuda operators look a bit differently, though built-in ones often use similar gpu_kernel function)