MCPcopy Create free account
hub / github.com/apple/coremltools / rankOf

Function rankOf

mlmodel/src/Comparison.cpp:183–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181 }
182
183 static inline int64_t rankOf(const Specification::ArrayFeatureType &marray) {
184 switch (marray.ShapeFlexibility_case()) {
185 case Specification::ArrayFeatureType::kEnumeratedShapes:
186 return marray.enumeratedshapes().shapes(0).shape_size();
187 case Specification::ArrayFeatureType::kShapeRange:
188 return marray.shaperange().sizeranges_size();
189 case Specification::ArrayFeatureType::SHAPEFLEXIBILITY_NOT_SET:
190 return marray.shape_size();
191 }
192 }
193
194 static inline bool compareArrayTypes(const Specification::FeatureType& x,
195 const Specification::FeatureType& y) {

Callers 2

compareArrayTypesFunction · 0.85
compareStateTypesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected