move _solve_for_layout to internal-parallel.h

and _search.c to internal-parallel.h