The mechanism of crystallographic ordering in CuPt