| 61 | QueueBase::~QueueBase() {} |
| 62 | |
| 63 | Status QueueBase::ValidateTupleCommon(const Tuple& tuple) const { |
| 64 | if (tuple.size() != static_cast<size_t>(num_components())) { |
| 65 | return errors::InvalidArgument( |
| 66 | "Wrong number of components in tuple. Expected ", num_components(), |
| 67 | ", got ", tuple.size()); |
| 68 | } |
| 69 | for (size_t i = 0; i < tuple.size(); ++i) { |
| 70 | if (tuple[i].dtype() != component_dtypes_[i]) { |
| 71 | return errors::InvalidArgument( |
| 72 | "Type mismatch in tuple component ", i, ". Expected ", |
| 73 | DataTypeString(component_dtypes_[i]), ", got ", |
| 74 | DataTypeString(tuple[i].dtype())); |
| 75 | } |
| 76 | } |
| 77 | return Status::OK(); |
| 78 | } |
| 79 | |
| 80 | // static |
| 81 | string QueueBase::ShapeListString(const gtl::ArraySlice<TensorShape>& shapes) { |
nothing calls this directly
no test coverage detected