Implementation of our CU partitioning algorithm