我们将在本文中稍后讨论循环变量。
循环变量和调节剂是区分大小写的。
什么是循环变量?
通常在循环中给定的变量能够以多种方式改变状态。
Usually within loops, there are several ways that a given variable can change state.
至于循环计数变量,第一个变量设置操作将其设置为2。
As for the loop count variable, the first set variable action sets it to 2.
所有这些变量将在主循环中用到。
All these variables will be useful in the course of the main loop.
那么,在一个小循环(tightloop)中,定义一个整型变量,最好类似这样。
So, the best declaration for an int variable in a tight loop would be.
是在一个循环中声明一个变量有效吗?
类成员变量循环后重置吗?
图6.16。 (左)两个分开的变量。 (右)一个变量在几次循环中的值。
Figure 6.16. (Left) Two separate variables. (Right) Several loop values of one variable.
新数组变量没有循环——我能做这个吗?
每循环一次,外部循环都使循环计数器变量递减一次。
The outer loop decrements a loop counter variable each time through the loop.
在进入主循环之前,我们想声明一些变量。
Before we enter the main loop we want to declare some variables.
循环不变量外提是一种传统的优化算法。
Loop invariant code motion (LICM) is a traditional optimization.
循环不变量外提是一种传统的优化算法。
Loop invariant code motion (LICM) is a traditional optimization.
应用推荐