Solving the Maxwell-Bloch equations efficiently on parallel architectures