Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit 1cfebe1

Browse files
author
Sven Verdoolaege
committed
include/tc/aten/utils-inl.h: mark functions inline
The functions in include/tc/aten/utils-inl.h are presumably meant to be inlined. Mark them inline to avoid warnings on unused functions, especially toDlpackTensors.
1 parent 3bf27dc commit 1cfebe1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/tc/aten/utils-inl.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <ATen/DLConvertor.h>
2323
namespace tc {
2424
namespace {
25-
std::pair<std::vector<DLTensor*>, std::vector<DLManagedTensor*>>
25+
inline std::pair<std::vector<DLTensor*>, std::vector<DLManagedTensor*>>
2626
toDlpackTensors(const std::vector<at::Tensor>& tensors) {
2727
std::vector<DLTensor*> dlTensors;
2828
std::vector<DLManagedTensor*> dlMTensors;
@@ -34,7 +34,7 @@ toDlpackTensors(const std::vector<at::Tensor>& tensors) {
3434
return make_pair(dlTensors, dlMTensors);
3535
}
3636

37-
std::pair<std::vector<const DLTensor*>, std::vector<DLManagedTensor*>>
37+
inline std::pair<std::vector<const DLTensor*>, std::vector<DLManagedTensor*>>
3838
toConstDlpackTensors(const std::vector<at::Tensor>& tensors) {
3939
std::vector<const DLTensor*> dlTensors;
4040
std::vector<DLManagedTensor*> dlMTensors;
@@ -46,7 +46,7 @@ toConstDlpackTensors(const std::vector<at::Tensor>& tensors) {
4646
return make_pair(dlTensors, dlMTensors);
4747
}
4848

49-
void deleteDlmTensors(std::vector<DLManagedTensor*>& tensors) {
49+
inline void deleteDlmTensors(std::vector<DLManagedTensor*>& tensors) {
5050
for (auto& tensor : tensors) {
5151
tensor->deleter(tensor);
5252
}

0 commit comments

Comments
 (0)