18 bool DefaultLayerSupport(
const char* func,
24 if (reasonIfUnsupported)
26 std::stringstream message;
27 message << func <<
" is not implemented [" << file <<
":" << line <<
"]";
29 reasonIfUnsupported.
value() = message.str();
41 const std::vector<TensorInfo>& infos,
55 auto desc = *(PolymorphicDowncast<const StandInDescriptor*>(&descriptor));
57 if (infos.size() != (desc.m_NumInputs + desc.m_NumOutputs))
60 "the combined number of input and output slots assigned "
61 "to the StandIn descriptor");
64 std::vector<const TensorInfo*> inputInfos;
65 for (uint32_t i = 0; i < desc.m_NumInputs; i++)
67 inputInfos.push_back(&infos[i]);
69 std::vector<const TensorInfo*> outputInfos;
70 for (uint32_t i = desc.m_NumInputs; i < infos.size(); i++)
72 outputInfos.push_back(&infos[i]);
81 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
95 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
117 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
128 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
135 return DefaultLayerSupport(__func__, __FILE__, __LINE__, reasonIfUnsupported);
139 const std::vector<const TensorInfo*>&,
143 if (reasonIfUnsupported)
145 std::stringstream message;
146 message <<
"StandIn layer is not executable via backends";
148 reasonIfUnsupported.
value() = message.str();