Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated Code Change #20413

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions xla/layout.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class Layout {
public:
Layout();
Layout(const Layout& other);
Layout(Layout&& other);
Layout(Layout&& other) noexcept;
~Layout();

// Constructs a dense layout with the given minor-to-major order.
Expand All @@ -181,7 +181,7 @@ class Layout {
int64_t dynamic_shape_metadata_prefix_bytes = 0);

Layout& operator=(const Layout& other);
Layout& operator=(Layout&& other);
Layout& operator=(Layout&& other) noexcept;

// Construct a shape from a LayoutProto.
static Layout CreateFromProto(const LayoutProto& proto);
Expand Down
4 changes: 2 additions & 2 deletions xla/literal.h
Original file line number Diff line number Diff line change
Expand Up @@ -1362,13 +1362,13 @@ class Literal : public MutableLiteralBase {
// of literals which can be expensive.
Literal(const Literal& other) = delete;
Literal& operator=(const Literal& other) = delete;
Literal(Literal&& other);
Literal(Literal&& other) noexcept;
// 'allocate_arrays' indicates whether to allocate memory for the arrays in
// the shape. If false, buffer pointers inside of the Literal::Pieces are set
// to nullptr.
Literal(const Shape& shape, bool allocate_arrays,
ArrayValueState leaf_array_value_state = ArrayValueState::kKnown);
Literal& operator=(Literal&& other);
Literal& operator=(Literal&& other) noexcept;

// Similar to CopyFrom, but with move semantics. The subshape of this literal
// rooted at 'dest_shape_index' must be *equal* to the shape 'src_literal'
Expand Down
4 changes: 2 additions & 2 deletions xla/maybe_owning.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ class MaybeOwning final {
return *this;
}

MaybeOwning& operator=(MaybeOwning&& other) {
MaybeOwning& operator=(MaybeOwning&& other) noexcept {
using std::swap;
swap(ptr_and_owning_bit_, other.ptr_and_owning_bit_);
return *this;
}

MaybeOwning(const MaybeOwning&) = delete;
MaybeOwning(MaybeOwning&& other)
MaybeOwning(MaybeOwning&& other) noexcept
: ptr_and_owning_bit_(other.ptr_and_owning_bit_) {
other.ptr_and_owning_bit_ = 0;
}
Expand Down