Runtime and energy constrained work scheduling for heterogeneous systems