Hi,
I am using a parallel operation to run two while loops. I have made time analyis of the both while loops.
par{
while(1)
{
abcd;
}
while(1)
{
efgh;
}
}
1st while loop takes 950ns
2nd while loop takes 1.71us
how should i calculate the maximum time consumed for the parallel operation. Is it the maximum time consumed in either loops or any other way to calculate max time for the parallel opration for one iteration
Regarding Parallel Operation
-
- Member++
- Posts: 29
- Joined: Wed Feb 06, 2013 2:24 pm
-
- XCore Expert
- Posts: 844
- Joined: Sun Jul 11, 2010 1:31 am
You do not _have_ any iteration of the parallel operation; both loops
run completely independently in your code. Synchronise them (via a
channel, perhaps) if you want the two loops synchronised; the time
it then takes for one iteration is the maximum of the time for one
iteration of either loop.
run completely independently in your code. Synchronise them (via a
channel, perhaps) if you want the two loops synchronised; the time
it then takes for one iteration is the maximum of the time for one
iteration of either loop.
-
- Member++
- Posts: 29
- Joined: Wed Feb 06, 2013 2:24 pm
Hi Segher,
Thanks for your reply, I have done the same and thanx for the clarification of doubt as time constraints are important in my case
Thanks for your reply, I have done the same and thanx for the clarification of doubt as time constraints are important in my case