Correct implementation of SpatialMaxPoolingCUDA (Sixin's port)