static */
| 115 | |
| 116 | /* static */ |
| 117 | Status PriorityQueue::GetElementComponentFromBatch( |
| 118 | const PriorityQueue::Tuple& tuple, int index, int component, |
| 119 | OpKernelContext* ctx, PersistentTensor* out_tensor) { |
| 120 | TensorShape element_shape(tuple[component].shape()); |
| 121 | element_shape.RemoveDim(0); |
| 122 | Tensor* element_access = nullptr; |
| 123 | TF_RETURN_IF_ERROR(ctx->allocate_persistent( |
| 124 | tuple[component].dtype(), element_shape, out_tensor, &element_access)); |
| 125 | TF_RETURN_IF_ERROR( |
| 126 | batch_util::CopySliceToElement(tuple[component], element_access, index)); |
| 127 | return Status::OK(); |
| 128 | } |
| 129 | |
| 130 | void PriorityQueue::TryEnqueueMany(const Tuple& tuple, OpKernelContext* ctx, |
| 131 | DoneCallback callback) { |
nothing calls this directly
no test coverage detected