Skip to content

Commit

Permalink
Automated Code Change
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 704901201
  • Loading branch information
Google-ML-Automation committed Dec 11, 2024
1 parent dcffe35 commit d4d1d4c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
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

0 comments on commit d4d1d4c

Please sign in to comment.