| 19 | namespace tensorflow { |
| 20 | |
| 21 | Status GuardedPhiloxRandom::Init(OpKernelConstruction* context) { |
| 22 | // Grab seed Attrs. |
| 23 | int64 seed, seed2; |
| 24 | auto status = context->GetAttr("seed", &seed); |
| 25 | if (!status.ok()) return status; |
| 26 | status = context->GetAttr("seed2", &seed2); |
| 27 | if (!status.ok()) return status; |
| 28 | |
| 29 | // Initialize with the given seeds |
| 30 | Init(seed, seed2); |
| 31 | return Status::OK(); |
| 32 | } |
| 33 | |
| 34 | void GuardedPhiloxRandom::Init(int64 seed, int64 seed2) { |
| 35 | CHECK(!initialized_); |
nothing calls this directly
no test coverage detected