Avoid the name Yield as some windows header defines a macro with this name.
Change: 144899796
This commit is contained in:
parent
0837ac805f
commit
f0a1af4a8b
@ -53,7 +53,7 @@ class RecordInputOp : public OpKernel {
|
||||
Tensor out(DT_STRING, {batch_size_});
|
||||
auto t_out = out.flat<string>();
|
||||
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);
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ RecordYielder::~RecordYielder() {
|
||||
delete thread_;
|
||||
}
|
||||
|
||||
Status RecordYielder::Yield(string* value) {
|
||||
Status RecordYielder::YieldOne(string* value) {
|
||||
mutex_lock l(mu_);
|
||||
while (!BufEnough()) {
|
||||
buf_enough_.wait(l);
|
||||
|
@ -50,7 +50,7 @@ namespace tensorflow {
|
||||
// RecordYielder yielder(opts);
|
||||
// string val;
|
||||
// while (true) {
|
||||
// yielder.Yield(&val);
|
||||
// yielder.YieldOne(&val);
|
||||
// // process val
|
||||
// }
|
||||
//
|
||||
@ -88,7 +88,7 @@ class RecordYielder {
|
||||
RecordYielder& operator=(const RecordYielder&) = delete;
|
||||
|
||||
// Yields one 'value'.
|
||||
Status Yield(string* value);
|
||||
Status YieldOne(string* value);
|
||||
|
||||
// Returns the current epoch number.
|
||||
int64 current_epoch() const { return epoch_; }
|
||||
|
Loading…
Reference in New Issue
Block a user