Commit 19e96d2c authored by Arnaud Blanchard's avatar Arnaud Blanchard
Browse files

Merge branch 'master' of https://promethe.u-cergy.fr/blaar/bapps

parents e551e961 ab48279c
......@@ -23,17 +23,19 @@ int main(int argc, char **argv){
input.open(input_name, BLC_CHANNEL_READ);
blc_loop_try_add_waiting_semaphore(input.sem_new_data);
blc_loop_try_add_posting_semaphore(input.sem_ack_data);
output1.create_or_open(output_name1, BLC_CHANNEL_WRITE, input.type, input.format, input.dims_nb, input.dims);
output2.create_or_open(output_name2, BLC_CHANNEL_WRITE, input.type, input.format, input.dims_nb, input.dims);
output1.publish();
output2.publish();
BLC_COMMAND_LOOP(0){
if (output1.sem_ack_data) sem_wait(output1.sem_ack_data);
memcpy(output1.data, input.data, output1.size);
if (output1.sem_new_data) sem_post(output1.sem_new_data);
if (output2.sem_ack_data) sem_wait(output2.sem_ack_data);
memcpy(output2.data, input.data, output2.size);
if (output2.sem_new_data) sem_post(output2.sem_new_data);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment