Home / Class/ get_vectorized_elu_elementwise_func Class — pytorch Architecture

get_vectorized_elu_elementwise_func Class — pytorch Architecture

Architecture documentation for the get_vectorized_elu_elementwise_func class in Elu.h from the pytorch codebase.

Entity Profile

Source Code

aten/src/ATen/native/cpu/Elu.h lines 62–72

template <typename T, std::enable_if_t<c10::is_reduced_floating_point_v<T>, bool> = true>
auto get_vectorized_elu_elementwise_func(float alpha, float scale, float input_scale) {
  // Takes float->float.
  const auto float_func = get_vectorized_elu_elementwise_func<float>(alpha, scale, input_scale);
  return [float_func](vec::Vectorized<T> a) -> vec::Vectorized<T> {
    auto [a0, a1] = vec::convert_to_float<T>(a);
    auto res0 = float_func(a0);
    auto res1 = float_func(a1);
    return vec::convert_from_float<T>(res0, res1);
  };
}

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free