Histogram.h 999 B

123456789101112131415161718192021
  1. #if !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)
  2. #pragma once
  3. #include <ATen/core/Tensor.h>
  4. #include <ATen/native/DispatchStub.h>
  5. namespace at::native {
  6. using histogramdd_fn = void(*)(const Tensor&, const std::optional<Tensor>&, bool, Tensor&, const TensorList&);
  7. using histogramdd_linear_fn = void(*)(const Tensor&, const std::optional<Tensor>&, bool, Tensor&, const TensorList&, bool);
  8. using histogram_select_outer_bin_edges_fn = void(*)(const Tensor& input, const int64_t N, std::vector<double> &leftmost_edges, std::vector<double> &rightmost_edges);
  9. DECLARE_DISPATCH(histogramdd_fn, histogramdd_stub)
  10. DECLARE_DISPATCH(histogramdd_linear_fn, histogramdd_linear_stub)
  11. DECLARE_DISPATCH(histogram_select_outer_bin_edges_fn, histogram_select_outer_bin_edges_stub)
  12. } // namespace at::native
  13. #else
  14. #error "This file should not be included when either TORCH_STABLE_ONLY or TORCH_TARGET_VERSION is defined."
  15. #endif // !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)