| 54 | namespace { |
| 55 | |
| 56 | static Status AllocateOutputWithShape(OpKernelContext* ctx, const Tensor& shape, |
| 57 | int index, Tensor** output) { |
| 58 | TensorShape tensor_shape; |
| 59 | TF_RETURN_IF_ERROR(ctx->op_kernel().MakeShape(shape, &tensor_shape)); |
| 60 | return ctx->allocate_output(index, tensor_shape, output); |
| 61 | } |
| 62 | |
| 63 | // For now, use the same interface as RandomOp, so we can choose either one |
| 64 | // at the run-time. |
no test coverage detected