Avoid the name Yield as some windows header defines a macro with this name.

Change: 144899796
This commit is contained in:
A. Unique TensorFlower 2017-01-18 16:44:37 -08:00 committed by TensorFlower Gardener
parent 0837ac805f
commit f0a1af4a8b
3 changed files with 4 additions and 4 deletions

View File

@ -53,7 +53,7 @@ class RecordInputOp : public OpKernel {
Tensor out(DT_STRING, {batch_size_}); Tensor out(DT_STRING, {batch_size_});
auto t_out = out.flat<string>(); auto t_out = out.flat<string>();
for (int i = 0; i < batch_size_; ++i) { for (int i = 0; i < batch_size_; ++i) {
OP_REQUIRES_OK(ctx, yielder_->Yield(&t_out(i))); OP_REQUIRES_OK(ctx, yielder_->YieldOne(&t_out(i)));
} }
ctx->set_output(0, out); ctx->set_output(0, out);
} }

View File

@ -43,7 +43,7 @@ RecordYielder::~RecordYielder() {
delete thread_; delete thread_;
} }
Status RecordYielder::Yield(string* value) { Status RecordYielder::YieldOne(string* value) {
mutex_lock l(mu_); mutex_lock l(mu_);
while (!BufEnough()) { while (!BufEnough()) {
buf_enough_.wait(l); buf_enough_.wait(l);

View File

@ -50,7 +50,7 @@ namespace tensorflow {
// RecordYielder yielder(opts); // RecordYielder yielder(opts);
// string val; // string val;
// while (true) { // while (true) {
// yielder.Yield(&val); // yielder.YieldOne(&val);
// // process val // // process val
// } // }
// //
@ -88,7 +88,7 @@ class RecordYielder {
RecordYielder& operator=(const RecordYielder&) = delete; RecordYielder& operator=(const RecordYielder&) = delete;
// Yields one 'value'. // Yields one 'value'.
Status Yield(string* value); Status YieldOne(string* value);
// Returns the current epoch number. // Returns the current epoch number.
int64 current_epoch() const { return epoch_; } int64 current_epoch() const { return epoch_; }