Skip to content

Commit

Permalink
Fix typecasting in normalizePlugin
Browse files Browse the repository at this point in the history
Signed-off-by: Rajeev Rao <[email protected]>
  • Loading branch information
Rajeev Rao authored and rajeevsrao committed Aug 10, 2019
1 parent 2ad271e commit 1619911
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugin/normalizePlugin/normalizePlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,22 +288,22 @@ IPluginV2Ext* NormalizePluginCreator::createPlugin(const char* name, const Plugi
if (!strcmp(attrName, "nbWeights"))
{
ASSERT(fields[i].type == PluginFieldType::kINT32);
mNbWeights = static_cast<int>(*(static_cast<const int*>(fields[i].data)));
mNbWeights = *(static_cast<const int*>(fields[i].data));
}
else if (!strcmp(attrName, "acrossSpatial"))
{
ASSERT(fields[i].type == PluginFieldType::kINT32);
mAcrossSpatial = static_cast<int>(*(static_cast<const int*>(fields[i].data)));
mAcrossSpatial = *(static_cast<const bool*>(fields[i].data));
}
else if (!strcmp(attrName, "channelShared"))
{
ASSERT(fields[i].type == PluginFieldType::kINT32);
mChannelShared = static_cast<int>(*(static_cast<const int*>(fields[i].data)));
mChannelShared = *(static_cast<const bool*>(fields[i].data));
}
else if (!strcmp(attrName, "eps"))
{
ASSERT(fields[i].type == PluginFieldType::kFLOAT32);
mEps = static_cast<float>(*(static_cast<const float*>(fields[i].data)));
mEps = *(static_cast<const float*>(fields[i].data));
}
else if (!strcmp(attrName, "weights"))
{
Expand Down

0 comments on commit 1619911

Please sign in to comment.