Skip to content

Commit

Permalink
Merge pull request #941 from mo-xiaoming/missing-return-value
Browse files Browse the repository at this point in the history
fix missing return values
  • Loading branch information
dusty-nv authored Mar 1, 2021
2 parents 0d53bcb + 8dcf690 commit 49bf543
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion c/imageNet.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ class imageNet : public tensorNet
/**
* Retrieve a string describing the network name.
*/
inline const char* GetNetworkName() const { NetworkTypeToStr(mNetworkType); }
inline const char* GetNetworkName() const { return NetworkTypeToStr(mNetworkType); }

/**
* Load class descriptions from a label file.
Expand Down
5 changes: 5 additions & 0 deletions c/tensorNet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ const char* precisionTypeToStr( precisionType type )
case TYPE_FP16: return "FP16";
case TYPE_INT8: return "INT8";
}
return nullptr;
}

precisionType precisionTypeFromStr( const char* str )
Expand Down Expand Up @@ -182,6 +183,7 @@ const char* deviceTypeToStr( deviceType type )
case DEVICE_DLA_0: return "DLA_0";
case DEVICE_DLA_1: return "DLA_1";
}
return nullptr;
}

deviceType deviceTypeFromStr( const char* str )
Expand Down Expand Up @@ -215,6 +217,7 @@ static inline nvinfer1::DeviceType deviceTypeToTRT( deviceType type )
case DEVICE_DLA_0: return nvinfer1::DeviceType::kDLA;
case DEVICE_DLA_1: return nvinfer1::DeviceType::kDLA;
#endif
default: return nvinfer1::DeviceType::kGPU;
}
}
#endif
Expand All @@ -229,6 +232,7 @@ const char* modelTypeToStr( modelType format )
case MODEL_UFF: return "UFF";
case MODEL_ENGINE: return "engine";
}
return nullptr;
}

modelType modelTypeFromStr( const char* str )
Expand Down Expand Up @@ -266,6 +270,7 @@ const char* profilerQueryToStr( profilerQuery query )
case PROFILER_VISUALIZE: return "Visualize";
case PROFILER_TOTAL: return "Total";
}
return nullptr;
}

//---------------------------------------------------------------------
Expand Down

0 comments on commit 49bf543

Please sign in to comment.