cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
khareashish_trimble
Adventurer
Adventurer
1,140 Views
Registered: ‎10-17-2017

Same Input to two HW accel Functions

Jump to solution

Hi, 

I want an image(imgInput) to be processed simultaneously by two hw accelerated blocks and get two different output images(dstImage1 and dstImage2). 

 

Can I simply use the same input image as arguments to the two functions like this: 

 

xf::Mat<XF_8UC1, HEIGHT, WIDTH, XF_NPPC1> imgInput(1080, 1920);

xf::Mat<XF_8UC1, HEIGHT, WIDTH, XF_NPPC1> dstImage1(1080, 1920);

xf::Mat<XF_8UC1, HEIGHT, WIDTH, XF_NPPC1> dstImage1(1080, 1920);

 

... read input image ...

 

#pragma SDS async(1)
image_processing_function1(imgInput,dstImage1 );
#pragma SDS async(2)

image_processing_function2(imgInput, dstImage2); 

 

 

#pragma SDS wait(1)

#pragma SDS wait(2)

 

 

Or do I need to copy the input image into another matrix and then use it with the second function? 

 

Going to test both of these ways.... but just wanted to get an opinion if somebody has tried this before  

 

 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
skalicky
Explorer
Explorer
1,409 Views
Registered: ‎09-19-2017

Hi,

 

The way you showed will work as expected. You do not need to separate buffers holding the same data for both accelerators to run simultaneously. 


Sam

View solution in original post

2 Replies
skalicky
Explorer
Explorer
1,410 Views
Registered: ‎09-19-2017

Hi,

 

The way you showed will work as expected. You do not need to separate buffers holding the same data for both accelerators to run simultaneously. 


Sam

View solution in original post

khareashish_trimble
Adventurer
Adventurer
1,098 Views
Registered: ‎10-17-2017

Yes, working fine without having to use a separate buffer to hold the same data. Thanks for your input. 

 

 

-Ashish

0 Kudos