Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Processor Pipeline

rhapsodyv
Beginner
860 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
860 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
860 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