msg("[SYNC TIME] sync_corr_ue0 not yet allocated! Exiting.\n");
return(-1);
}
if(sync_corr_ue1==NULL){
msg("[SYNC TIME] sync_corr_ue1 not yet allocated! Exiting.\n");
return(-1);
}
if(sync_corr_ue2==NULL){
msg("[SYNC TIME] sync_corr_ue2 not yet allocated! Exiting.\n");
return(-1);
}
peak_val=0;
peak_pos=0;
sync_source=0;
for(n=0;n<length;n+=4){
#ifdef RTAI_ENABLED
// This is necessary since the sync takes a long time and it seems to block all other threads thus screwing up RTAI. If we pause it for a little while during its execution we give RTAI a chance to catch up with its other tasks.
printf("do_DL_sig time_prach is %f s, AVERAGE time is %f s, count %d, sum %e\n",(float)(stop-start)/CLOCKS_PER_SEC,(float)(sum+stop-start)/(count1*CLOCKS_PER_SEC),count1,sum+stop-start);
//clock_t stop=clock();
/*printf("do_DL_sig time_prach is %f s, AVERAGE time is %f s, count %d, sum %e\n",(float) (stop-start)/CLOCKS_PER_SEC,(float) (sum+stop-start)/(count1*CLOCKS_PER_SEC),count1,sum+stop-start);