mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Summary: More clang tidy cleanups in `torch/csrc`. This time: 1. `hicpp-use-equals-default` recommends `= default` instead of `{}` for constructors/destructors. This is better practice because it expresses the intent better (https://stackoverflow.com/questions/6502828/what-does-default-mean-after-a-class-function-declaration) 2. `readability-inconsistent-declaration-parameter-name` enforces that parameter names in the declaration match parameter names in the definition. This is just generally useful and can prevent confusion and bugs. Also updated my script a little bit. apaszke ezyang Pull Request resolved: https://github.com/pytorch/pytorch/pull/9737 Differential Revision: D9069069 Pulled By: goldsborough fbshipit-source-id: f7b3f3a4eb4c9fadc30425a153566d3b613a41ae
14 lines
395 B
C++
14 lines
395 B
C++
#pragma once
|
|
|
|
#include "torch/csrc/python_headers.h"
|
|
#include <ATen/ATen.h>
|
|
|
|
namespace torch { namespace utils {
|
|
|
|
at::Tensor & apply_(at::Tensor & self, PyObject* fn);
|
|
at::Tensor & map_(at::Tensor & self, const at::Tensor & other_, PyObject* fn);
|
|
at::Tensor & map2_(at::Tensor & self, const at::Tensor & x_,
|
|
const at::Tensor & y_, PyObject* fn);
|
|
|
|
}} // namespace torch::utils
|