Generalized Cohen–Macaulay dimension