MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Initialize

Method Initialize

tensorflow/core/kernels/priority_queue.cc:42–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40 : TypedQueue(capacity, component_dtypes, component_shapes, name) {}
41
42Status PriorityQueue::Initialize() {
43 Status s = TypedQueue::Initialize();
44 if (!s.ok()) return s;
45
46 mutex_lock lock(mu_);
47 if (component_dtypes_[0] != DT_INT64) {
48 return errors::InvalidArgument(
49 "PriorityQueue priority index component must be type int64, but "
50 "dtype is: ",
51 DataTypeString(component_dtypes_[0]));
52 }
53 if (specified_shapes() && !TensorShapeUtils::IsScalar(component_shapes_[0])) {
54 return errors::InvalidArgument(
55 "PriorityQueue priority index component must be a scalar, but shape "
56 "is: ",
57 component_shapes_[0].DebugString());
58 }
59 return Status::OK();
60}
61
62void PriorityQueue::DequeueLocked(OpKernelContext* ctx, Tuple* tuple) {
63 DCHECK_GT(queues_[0].size(), 0);

Callers

nothing calls this directly

Calls 7

InvalidArgumentFunction · 0.85
specified_shapesFunction · 0.85
InitializeFunction · 0.50
DataTypeStringFunction · 0.50
IsScalarFunction · 0.50
okMethod · 0.45
DebugStringMethod · 0.45

Tested by

no test coverage detected