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

Class TfLiteIntArrayView

tensorflow/lite/graph_info.cc:27–43  ·  view source on GitHub ↗

Provide a range iterable wrapper for TfLiteIntArray* (C lists that TfLite C api uses. Can't use the google array_view, since we can't depend on even absl for embedded device reasons. TODO(aselle): Move this into central utilities.

Source from the content-addressed store, hash-verified

25// absl for embedded device reasons.
26// TODO(aselle): Move this into central utilities.
27class TfLiteIntArrayView {
28 public:
29 // Construct a view of a TfLiteIntArray*. Note, `int_array` should be non-null
30 // and this view does not take ownership of it.
31 explicit TfLiteIntArrayView(const TfLiteIntArray* int_array)
32 : int_array_(int_array) {}
33
34 typedef const int* const_iterator;
35 const_iterator begin() const { return int_array_->data; }
36 const_iterator end() const { return &int_array_->data[int_array_->size]; }
37
38 TfLiteIntArrayView(const TfLiteIntArrayView&) = default;
39 TfLiteIntArrayView& operator=(const TfLiteIntArrayView& rhs) = default;
40
41 private:
42 const TfLiteIntArray* int_array_;
43};
44
45// Helper class that actually performs partitioning by node sub set.
46// Outputs to a provided `NodeSubset` structure.

Callers 15

PartitionMethod · 0.70
UpdateNodeMethod · 0.70
PrepareFunction · 0.50
OpInputsMethod · 0.50
OpOutputsMethod · 0.50
InitFunction · 0.50
GetHashFunction · 0.50
InitMethod · 0.50
InvokeMethod · 0.50
BuildGraphMethod · 0.50
DoPrepareMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected