Topological all-optical logic gates based on two-dimensional photonic crystals.