Commit 0550f50b authored by Benjamin Kramer's avatar Benjamin Kramer Committed by TensorFlower Gardener
Browse files

[XLA] Remove Literal::Swap and replace all uses with moves.

This stems from the dark ages when Literal was an unmovable proto. Swap was
supposed to be fast (it moves) but in the conversion to a standalone class Swap
wasn't implemented properly and became a 3-way copy instead of a 3-way move.

All of the users want move anyways, so just remove Swap and use moves on all
call sites.

If actual swapping is needed, std::swap will work just fine for Literal, and
the default implementation is as fast as 3 moves.

PiperOrigin-RevId: 168689138
parent 6d7c72f1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment