File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change 11// This file defines `SymIntArrayRef` which serves as the view onto
2- // std::vector<SymInt> This class is conceptually and mostly functionally
3- // equivalent to ArrayRef<SymInt> However, ArrayRef<SymInt> can't be used
4- // directly as it introduces ambiguity in the following cases: a.expand({1, 2,
5- // 3}) matches two overloads: `at::Tensor Tensor::expand(c10::SymIntArrayRef
6- // size, bool implicit)` `at::Tensor Tensor::expand(at::IntArrayRef size, bool
7- // implicit)` Introducing `SymIntArrayRef` allows to have a finer-grained
8- // control over which overload will be used
2+ // std::vector<SymInt>. This class is conceptually and mostly functionally
3+ // equivalent to ArrayRef<SymInt>.
4+ //
5+ // However, ArrayRef<SymInt> can't be used directly as it introduces ambiguity
6+ // in the following cases:
7+ // - a.expand({1, 2, 3}) matches two overloads:
8+ // 1. `at::Tensor Tensor::expand(c10::SymIntArrayRef size, bool implicit)`
9+ // 2. `at::Tensor Tensor::expand(at::IntArrayRef size, bool implicit)`
10+ // Introducing `SymIntArrayRef` allows to have a finer-grained control over
11+ // which overload will be used.
912
1013#pragma once
1114
You can’t perform that action at this time.
0 commit comments