arity Class — pytorch Architecture
Architecture documentation for the arity class in FunctionTraits.h from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/detail/FunctionTraits.h lines 43–58
template <typename ReturnType, typename... Args>
struct function_traits<ReturnType(Args...)> {
// arity is the number of arguments.
enum { arity = sizeof...(Args) };
using ArgsTuple = std::tuple<Args...>;
using result_type = ReturnType;
template <size_t i>
struct arg
{
using type = std::tuple_element_t<i, std::tuple<Args...>>;
// the i-th argument is equivalent to the i-th tuple element of a tuple
// composed of those arguments.
};
};
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free