inline bool have_same_dims()

in include/checks.h [23:28]


inline bool have_same_dims(const at::Tensor& x, const at::Tensor& y) {
  bool success = x.ndimension() == y.ndimension();
  for (int64_t dim = 0; dim < x.ndimension(); ++dim)
    success &= x.size(dim) == y.size(dim);
  return success;
}