Explore chapters and articles related to this topic
Low-Power Design of Systems on Chip
Published in Vojin G. Oklobdzija, Digital Design and Fabrication, 2017
Several techniques can be used to optimize the loops. In some applications, the application is 90% of the time running in loops. Three techniques can be used efficiently, such as loop fusion (loops executed in sequence with the same indices can be merged), loop tiling (to avoid fetching all the operands from the data cache for each loop iteration, so some data used by the previous iteration can be reused for the next iteration), and loop unrolling. To unroll a loop is to repeat the loop body N times if there are N iterations of the loop. The code size is increased, but the number of executed instructions is reduced, as the loop counter (initialization, incrementation, and comparison) is removed.
Digital Circuit Design with Very-High-Speed Integrated Circuit Hardware Description Language
Published in A. Arockia Bazil Raj, FPGA-Based Embedded System Developer's Guide, 2018
Labels are optional but are useful when writing nested loops. The next and exit statements are sequential statements that can only be used inside a loop. The next statement terminates the rest of the current loop iteration, and execution will proceed to the next loop iteration. The exit statement skips the rest of the statements, terminating the loop entirely, and continues with the next statement after the exited loop. There are three types of iteration schemes: basic loop, while… loop, and for… loop. We will discuss these one by one below.
Introduction to Python
Published in Vasudevan Lakshminarayanan, Hassen Ghalila, Ahmed Ammar, L. Srinivasa Varadharajan, Understanding Optics with Python, 2018
Vasudevan Lakshminarayanan, Hassen Ghalila, Ahmed Ammar, L. Srinivasa Varadharajan
In a for loop or a while loop The continue statement passes to the next iteration of the current loop (i.e., without continuing to execute the instructions of the block),The break statement exits the current loop; if the loop contains an else block, it is not executed.
Optimal electric business centre location by centre–decentre quantum particle swarm optimization
Published in Systems Science & Control Engineering, 2019
Runhai Jiao, Xujian Huang, Hong Ouyang, Gang Li, Qian Zheng, ZaiYu Jiang
In order to verify the performance of the algorithm on test function with different dimensions, four kinds of dimensions were randomly selected: 2-dimensional, 5-dimensional, 10-dimensional and 20-dimensional. The parameters of each algorithm are presented in Table 2. The parameter is the best one selected from the results of experiments. In order to reduce the error caused by chance, the experiment is repeated 15 times for each test function. The size of each swarm was uniformly set to 40, and the number of iterations can be calculated by the formula (18). represents the number of iterations. represents the dimension. represents the number of particles. On the one hand, with the increase of dimensions, the difficulty of optimization increases, so the number of iterations should be increased. On the other hand, the number of particles will increase computational complexity, but it will be easier to obtain global optimization solution. Therefore, as the number of particles increases, the number of iteration will decrease. The average, best, worst, and variance of the global optimal particle fitness are illustrated in Tables 3 and 4. The results of average optimal fitness have been highlighted in the tables.