Rory McIlroy and Tiger Woods proved they were in fine form ahead of the Ryder Cup as they put on a masterclass on the opening day of the BMW Championship.