def METHOD_NAME(ctx, builder, op, u, v, output_vec=None):
    dim = len(u.type.pointee)
    assert len(v.type.pointee) == dim
    if output_vec is None:
        output_vec = builder.alloca(u.type.pointee)
    assert len(output_vec.type.pointee) == dim
    # Get the pointer to the first element of the array to convert from [? x double]* -> double*
    vec_u = builder.gep(u, [ctx.int32_ty(0), ctx.int32_ty(0)])
    vec_v = builder.gep(v, [ctx.int32_ty(0), ctx.int32_ty(0)])
    vec_out = builder.gep(output_vec, [ctx.int32_ty(0), ctx.int32_ty(0)])
    builder.call(ctx.import_llvm_function(op), [vec_u, vec_v, ctx.int32_ty(dim), vec_out])
    return output_vec