| 1402 | : OpKernel(context) {} |
| 1403 | |
| 1404 | void Compute(OpKernelContext* ctx) override { |
| 1405 | TensorArray* tensor_array; |
| 1406 | OP_REQUIRES_OK(ctx, GetTensorArray(ctx, &tensor_array)); |
| 1407 | core::ScopedUnref unref(tensor_array); |
| 1408 | Tensor* output = nullptr; |
| 1409 | OP_REQUIRES_OK(ctx, ctx->allocate_output(0, TensorShape({}), &output)); |
| 1410 | OP_REQUIRES_OK(ctx, tensor_array->Size(&(output->scalar<int32>()()))); |
| 1411 | } |
| 1412 | }; |
| 1413 | |
| 1414 | REGISTER_KERNEL_BUILDER(Name("TensorArraySize").Device(DEVICE_CPU), |
nothing calls this directly
no test coverage detected