Files
pytorch/torch/csrc/utils/tensor_apply.h
Peter Goldsborough 04939a4745 Match parameter names and = default (#9737)
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
2018-07-30 14:10:00 -07:00

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