Use output's strides instead of assuming they are the same as the input's one.