Skip to content

Commit 1685b67

Browse files
committed
revert dtype layout change to fix error
1 parent 24ef6c5 commit 1685b67

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

paddle/pten/common/data_type.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ inline std::ostream& operator<<(std::ostream& os, DataType dtype) {
169169
return os;
170170
}
171171

172-
inline DataType& operator++(DataType dtype, int) {
172+
inline DataType& operator++(DataType& dtype, int) {
173173
dtype =
174174
DataType(static_cast<std::underlying_type<DataType>::type>(dtype) + 1);
175175
return dtype;

paddle/pten/common/layout.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ inline std::ostream& operator<<(std::ostream& os, DataLayout layout) {
5252
return os;
5353
}
5454

55-
inline DataLayout& operator++(DataLayout layout, int) {
55+
inline DataLayout& operator++(DataLayout& layout, int) {
5656
layout = DataLayout(
5757
static_cast<std::underlying_type<DataLayout>::type>(layout) + 1);
5858
return layout;

0 commit comments

Comments
 (0)