The main difference between C++ and psC is the execution. In C++ instructions are executed sequentially, one at each clock step, while in psC they are executed simultaneously in a single clock step. For example, assume we have the following C++ and psC functions:
Given initial values for X, Y and Equal, the table compares execution between C++ and psC. As expected, C++ instructions execute one at each step, while psC instructions are executed in a single step. Since execution in a single step is based on the previous step values, the results are different.
The second main difference between C++ and psC is synchronous execution. C++ is basically single-threaded, so parallel execution involves creating threads. Since threads are not synchronous, when two threads try to share a variable, there is an overhead, like a semaphore, to allow safe communication. As shown in the figure, the psC language is parallel and synchronous; there is no overhead for shared variables.
Copyright © 2019-22 ICI Techno - All right reserved.
Powered by GoDaddy Website Builder