* Modify StaticGuidGeneratorCollisionTest to identify cases where
MIN_STATIC_GUID has been returned from GenerateStaticId more than once.
Output a warning rather than an error as this can happen on 32bit
systems.
Signed-off-by: Colm Donelan <Colm.Donelan@arm.com>
Change-Id: I47e9a1d9ff09c25da24abb4b0efe63d3000aa1c5
ProfilingStaticGuid guid = generator.GenerateStaticId(str.c_str());
if (guids.find(guid) != guids.end())
{
- BOOST_ERROR(boost::str(boost::format("GUID collision occurred: %1% -> %2%") % str % guid));
+ // If we're running on a 32bit system it is more likely to get a GUID clash over 1 million executions.
+ // We can generally detect this when the GUID turns out to be MIN_STATIC_GUID. Output a warning
+ // message rather than error in this case.
+ if (guid == ProfilingGuid(armnn::profiling::MIN_STATIC_GUID))
+ {
+ BOOST_WARN("MIN_STATIC_GUID returned more than once from GenerateStaticId.");
+ }
+ else
+ {
+ BOOST_ERROR(boost::str(boost::format("GUID collision occurred: %1% -> %2%") % str % guid));
+ }
break;
}
guids.insert(guid);