check_elements_same Class — pytorch Architecture
Architecture documentation for the check_elements_same class in IListRef_test.cpp from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/core/IListRef_test.cpp lines 44–54
template <typename T>
static void check_elements_same(at::ITensorListRef list, const T& thing, int use_count) {
EXPECT_EQ(thing.size(), list.size());
size_t i = 0;
for (const auto& t : list) {
const at::Tensor& other = thing[i];
EXPECT_EQ(other.use_count(), use_count);
EXPECT_TRUE(other.is_same(t));
i++;
}
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free