return BinaryOp(BINOP_OR, lhs, rhs, broadcast_dimensions);
}
+// TODO(b/65209188): Create a dedicated lowering for Xor
+ComputationDataHandle ComputationBuilder::Xor(
+ const ComputationDataHandle& lhs, const ComputationDataHandle& rhs,
+ tensorflow::gtl::ArraySlice<int64> broadcast_dimensions) {
+ return Or(And(Not(lhs), rhs, broadcast_dimensions),
+ And(lhs, Not(rhs), broadcast_dimensions));
+}
+
ComputationDataHandle ComputationBuilder::Not(
const ComputationDataHandle& operand) {
return UnaryOp(UNOP_NOT, operand);
const ComputationDataHandle& lhs, const ComputationDataHandle& rhs,
tensorflow::gtl::ArraySlice<int64> broadcast_dimensions = {});
+ ComputationDataHandle Xor(
+ const ComputationDataHandle& lhs, const ComputationDataHandle& rhs,
+ tensorflow::gtl::ArraySlice<int64> broadcast_dimensions = {});
+
ComputationDataHandle Not(const ComputationDataHandle& operand);
ComputationDataHandle ShiftLeft(