Note on operations:
This feature characterizes the proportion of certain operation types in a code region. We define operations to be the binary instructions that make up a high-level instruction. For instance, consider an array access: array[i]
This instruction consists of two operations:
dp:
This feature measures the number of double precision floating point operations (operations with operands of the data type double) in a code region.
It is the ratio of the number of floating point operations to the total number of operations in a code region.
Classifying fp:
dp can be classified into low, medium or high as follows:
Bucket | Condition |
---|---|
Low |
The region of code does not contain any double precision floating point operations.
OR
1 or fewer operations out of every 5 are double precision floating point operations.
|
Medium | About 2 out of every 5 operations is a double precision floating point operation. |
High | 3 or more operations out of every 5 are double precision floating point operations. |
Example:
For the following code, assume that all arrays are of the type double.
for (i=0; i<1000; i++) result[i] = arrayOne[i] * arrayTwo[i];This region of code contains about 9 operations in each iteration of the loop and we should be able to get a good estimate of dp by looking at just the single loop iteration. Looking at the code, there is only 1 double precision floating ponit operation viz. the multiplication of arrayOne & arrayTwo. Since only 1 out of every 9 operations is a double precision floating point operation, dp can be estimated to be low.