lerp_vec_map Class — pytorch Architecture
Architecture documentation for the lerp_vec_map class in LerpKernel.cpp from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/native/cpu/LerpKernel.cpp lines 30–46
template <typename scalar_t>
Vectorized<scalar_t> lerp_vec_map(Vectorized<scalar_t> start, Vectorized<scalar_t> end, Vectorized<scalar_t> weight) {
using vec_t = Vectorized<scalar_t>;
__at_align__ scalar_t start_arr[vec_t::size()];
__at_align__ scalar_t end_arr[vec_t::size()];
__at_align__ scalar_t weight_arr[vec_t::size()];
__at_align__ scalar_t result_arr[vec_t::size()];
start.store(start_arr);
end.store(end_arr);
weight.store(weight_arr);
for (auto i : c10::irange(vec_t::size())) {
result_arr[i] = lerp(start_arr[i], end_arr[i], weight_arr[i]);
}
return vec_t::loadu(result_arr);
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free