| 60 | } |
| 61 | |
| 62 | void Compute(OpKernelContext* context) override { |
| 63 | const Tensor& input_tensor = context->input(0); |
| 64 | const auto input = input_tensor.flat<T>(); |
| 65 | |
| 66 | Tensor* output_tensor = nullptr; |
| 67 | OP_REQUIRES_OK(context, context->allocate_output(0, input_tensor.shape(), |
| 68 | &output_tensor)); |
| 69 | auto output = output_tensor->template flat<int32>(); |
| 70 | OP_REQUIRES_OK(context, functor::BucketizeFunctor<Device, T>::Compute( |
| 71 | context, input, boundaries_, output)); |
| 72 | } |
| 73 | |
| 74 | private: |
| 75 | std::vector<float> boundaries_; |
nothing calls this directly
no test coverage detected