add shared_memory inner_fold