MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / makeBoolArray

Function makeBoolArray

python/src/infer/pyPlugin.cpp:87–93  ·  view source on GitHub ↗

For IPluginV2Ext - makes copy of a vector as a bool[].

Source from the content-addressed store, hash-verified

85
86// For IPluginV2Ext - makes copy of a vector<bool> as a bool[].
87static std::unique_ptr<bool[]> makeBoolArray(std::vector<bool> const& v)
88{
89 int32_t const n{static_cast<int32_t>(v.size())};
90 std::unique_ptr<bool[]> result(n > 0 ? new bool[n] : nullptr);
91 std::copy_n(v.begin(), n, result.get());
92 return std::move(result);
93}
94
95static const auto configure_plugin
96 = [](IPluginV2Ext& self, std::vector<Dims> const& inputShapes, std::vector<Dims> const& outputShapes,

Callers 1

pyPlugin.cppFile · 0.85

Calls 2

sizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected