Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Processor Pipeline

rhapsodyv
Beginner
598 Views
Hi!

I have a doubt.
if I have this code:

b/=5;
a+=10;
b*=5;
a*=30;

How the processor will execute this code?

The add is more fast than the division, then the second command will finish before of the first. The processor will execute the fourth command or it will wait until that the second command was finished? It will execute of the program order or in another order?

Thanks


[]'s

Rhapsodyv
0 Kudos
2 Replies
Ying_S_Intel
Employee
598 Views
Dear Customer,
I am not clear if this question is related to Intel IPP forum, could you please give us some more details so we can better understand about this and try to find a right resource to answer your questions.
Thanks,
Ying
Intel IPP Support
0 Kudos
Intel_C_Intel
Employee
598 Views

You know, the modern processors are able to execute instructions out of order, but theyoutputtheresult of instructions in order they are written in the programm. So, if there is no data dependency between adjacent instructions they will be executed in parallel, but if any dependency, of course the next instruction will wait for the result from previous one.

Regards,
Vladimir

0 Kudos
Reply