@@ -25,6 +25,9 @@ class ImageManipV2 : public DeviceNodeCRTP<DeviceNode, ImageManipV2, ImageManipP
2525 public:
2626 constexpr static const char * NAME = " ImageManipV2" ;
2727 using DeviceNodeCRTP::DeviceNodeCRTP;
28+ using Backend = ImageManipPropertiesV2::Backend;
29+ using PerformanceMode = ImageManipPropertiesV2::PerformanceMode;
30+
2831 ImageManipV2 () = default ;
2932 ImageManipV2 (std::unique_ptr<Properties> props);
3033
@@ -70,6 +73,18 @@ class ImageManipV2 : public DeviceNodeCRTP<DeviceNode, ImageManipV2, ImageManipP
7073 */
7174 ImageManipV2& setRunOnHost (bool runOnHost = true );
7275
76+ /* *
77+ * Set CPU as backend preference
78+ * @param backend Backend preference
79+ */
80+ ImageManipV2& setBackend (Backend backend);
81+
82+ /* *
83+ * Set performance mode
84+ * @param performanceMode Performance mode
85+ */
86+ ImageManipV2& setPerformanceMode (PerformanceMode performanceMode);
87+
7388 /* *
7489 * Check if the node is set to run on host
7590 */
@@ -82,8 +97,8 @@ class ImageManipV2 : public DeviceNodeCRTP<DeviceNode, ImageManipV2, ImageManipP
8297 const ImageManipConfigV2& initialConfig,
8398 std::shared_ptr<spdlog::async_logger> logger,
8499 std::function<size_t (const ImageManipConfigV2&, const ImgFrame&)> build,
85- std::function<bool(std::shared_ptr<Memory>&, span< uint8_t >)> apply,
86- std::function<void(const ImageManipConfigV2&, const ImgFrame&, ImgFrame&)> getFrame);
100+ std::function<bool(std::shared_ptr<Memory>&, std::shared_ptr<ImageManipData >)> apply,
101+ std::function<void(const ImgFrame&, ImgFrame&)> getFrame);
87102};
88103
89104} // namespace node
@@ -97,8 +112,8 @@ void ImageManipV2::loop(N& node,
97112 const ImageManipConfigV2& initialConfig,
98113 std::shared_ptr<spdlog::async_logger> logger,
99114 std::function<size_t (const ImageManipConfigV2&, const ImgFrame&)> build,
100- std::function<bool(std::shared_ptr<Memory>&, span< uint8_t >)> apply,
101- std::function<void(const ImageManipConfigV2&, const ImgFrame&, ImgFrame&)> getFrame) {
115+ std::function<bool(std::shared_ptr<Memory>&, std::shared_ptr<ImageManipData >)> apply,
116+ std::function<void(const ImgFrame&, ImgFrame&)> getFrame) {
102117 using namespace std ::chrono;
103118 auto config = initialConfig;
104119
@@ -166,10 +181,10 @@ void ImageManipV2::loop(N& node,
166181 bool success = true ;
167182 {
168183 auto t3 = steady_clock::now ();
169- success = apply (inImage->data , outImageData-> getData () );
184+ success = apply (inImage->data , outImageData);
170185 auto t4 = steady_clock::now ();
171186
172- getFrame (config, *inImage, *outImage);
187+ getFrame (*inImage, *outImage);
173188
174189 logger->trace (" Build time: {}us, Process time: {}us, Total time: {}us, image manip id: {}" ,
175190 duration_cast<microseconds>(t2 - t1).count (),
0 commit comments