Implemented the rectangular buffer copy kernel