| 81 | |
| 82 | protected: |
| 83 | void Compute(OpKernelContext* context, const char* const facts[], |
| 84 | uint64 count) { |
| 85 | Tensor* output_tensor = nullptr; |
| 86 | OP_REQUIRES_OK( |
| 87 | context, context->allocate_output(0, TensorShape({}), &output_tensor)); |
| 88 | auto output = output_tensor->template scalar<tstring>(); |
| 89 | |
| 90 | string coded = facts[context->env()->NowMicros() % count]; |
| 91 | E(&coded); |
| 92 | output() = coded; |
| 93 | } |
| 94 | }; |
| 95 | |
| 96 | class FactOpKernel1 : public FactOpKernel { |
nothing calls this directly
no test coverage detected