MCPcopy Create free account
hub / github.com/ARM-software/armnn / RequiresCopy

Function RequiresCopy

src/armnn/Network.cpp:1511–1528  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1509}
1510
1511bool RequiresCopy(ITensorHandleFactory::FactoryId src,
1512 ITensorHandleFactory::FactoryId dst,
1513 TensorHandleFactoryRegistry& registry)
1514{
1515 if (src != dst)
1516 {
1517 ITensorHandleFactory* srcFactory = registry.GetFactory(src);
1518 ITensorHandleFactory* dstFactory = registry.GetFactory(dst);
1519
1520 if (srcFactory && dstFactory &&
1521 (srcFactory->GetExportFlags() & dstFactory->GetImportFlags()) != 0)
1522 {
1523 return false;
1524 }
1525 return true;
1526 }
1527 return false;
1528}
1529
1530// Find the handle factory for the input layer which results in fewest required copies.
1531ITensorHandleFactory::FactoryId CalculateSlotOptionForInput(BackendsMap& backends,

Callers 1

CalculateSlotOptionFunction · 0.85

Calls 3

GetFactoryMethod · 0.45
GetExportFlagsMethod · 0.45
GetImportFlagsMethod · 0.45

Tested by

no test coverage detected