Calculate the allocated size based on the width, height and depth. [ROCm/clr commit: 99540373cf]
99540373cf