mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Minor doc improvement(?) on ArrayRef::slice (#50541)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/50541 I found the current phrasing to be confusing Test Plan: N/A Reviewed By: ngimel Differential Revision: D25909205 fbshipit-source-id: 483151d01848ab41d57b3f3b3775ef69f1451dcf
This commit is contained in:
committed by
Facebook GitHub Bot
parent
4de9d04f03
commit
be51de4047
@ -161,8 +161,7 @@ class ArrayRef final {
|
||||
return Length == RHS.Length && std::equal(begin(), end(), RHS.begin());
|
||||
}
|
||||
|
||||
/// slice(n, m) - Chop off the first N elements of the array, and keep M
|
||||
/// elements in the array.
|
||||
/// slice(n, m) - Take M elements of the array starting at element N
|
||||
C10_HOST_CONSTEXPR_EXCEPT_WIN_CUDA ArrayRef<T> slice(size_t N, size_t M) const {
|
||||
TORCH_CHECK(
|
||||
N + M <= size(),
|
||||
|
Reference in New Issue
Block a user