B. For data type double, what lower bound on the CPE is determined by the critical path? C. Assuming similar instruction sequences for the integer code as well, what lower bound on the CPE is determined by the critical path for integer data? D. Explain how the floating-point versions can have CPES of 3.00, even though the multiplication operation requires 5 clock cycles.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Inner loop of inner4. data_t = double, OP = *
udata in %rbp, vdata in %rax, sum in %xmmo
i in %rcx, limit in %rbx
1
.L15:
loop:
vmovsd 0(%rbp,%rcx,8), %xmm1
vmulsd (%rax,%rcx,8), %xmm1, %xmm1
vaddsd %xmm1, %xmm0, %xmmo
$1, %rcx
%rbx, %rcx
2
Get udata[i]
3
Multiply by vdata[i]
4
Add to sum
addq
Increment i
Compare i:limit
If !=, goto loop
стра
7
jne
.L15
Assume that the functional units have the characteristics listed in Figure 5.12.
A. Diagram how this instruction sequence would be decoded into operations
and show how the data dependencies between them would create a critical
path of operations, in the style of Figures 5.13 and 5.14.
B. For data type double, what lower bound on the CPE is determined by the
critical path?
C. Assuming similar instruction sequences for the integer code as well, what
lower bound on the CPE is determined by the critical path for integer data?
D. Explain how the floating-point versions can have CPES of 3.00, even though
the multiplication operation requires 5 clock cycles.
Transcribed Image Text:Inner loop of inner4. data_t = double, OP = * udata in %rbp, vdata in %rax, sum in %xmmo i in %rcx, limit in %rbx 1 .L15: loop: vmovsd 0(%rbp,%rcx,8), %xmm1 vmulsd (%rax,%rcx,8), %xmm1, %xmm1 vaddsd %xmm1, %xmm0, %xmmo $1, %rcx %rbx, %rcx 2 Get udata[i] 3 Multiply by vdata[i] 4 Add to sum addq Increment i Compare i:limit If !=, goto loop стра 7 jne .L15 Assume that the functional units have the characteristics listed in Figure 5.12. A. Diagram how this instruction sequence would be decoded into operations and show how the data dependencies between them would create a critical path of operations, in the style of Figures 5.13 and 5.14. B. For data type double, what lower bound on the CPE is determined by the critical path? C. Assuming similar instruction sequences for the integer code as well, what lower bound on the CPE is determined by the critical path for integer data? D. Explain how the floating-point versions can have CPES of 3.00, even though the multiplication operation requires 5 clock cycles.
Suppose we wish to write a procedure that computes the inner product of two
vectors u and v. An abstract version of the function has a CPE of 14–18 with x86-
64 for different types of integer and floating-point data. By doing the same sort
of transformations we did to transform the abstract program combine1 into the
more efficient combine4, we get the following code:
/* Inner product. Accumulate in temporary */
void inner4(vec_ptr u, vec_ptr v, data_t *dest)
1
{
long i;
long length
data_t *udata = get_vec_start(u);
data_t *vdata = get_vec_start (v);
data_t sum = (data_t) 0;
4
vec_length(u);
%3D
8.
9.
for (i = 0; i < length; i++) {
sum = sum + udata[i] * vdata[i];
10
11
12
}
13
*dest = sum;
14
Our measurements show that this function has CPES of 1.50 for integer data
and 3.00 for floating-point data. For data type double, the x86-64 assembly code
for the inner loop is as follows:
Transcribed Image Text:Suppose we wish to write a procedure that computes the inner product of two vectors u and v. An abstract version of the function has a CPE of 14–18 with x86- 64 for different types of integer and floating-point data. By doing the same sort of transformations we did to transform the abstract program combine1 into the more efficient combine4, we get the following code: /* Inner product. Accumulate in temporary */ void inner4(vec_ptr u, vec_ptr v, data_t *dest) 1 { long i; long length data_t *udata = get_vec_start(u); data_t *vdata = get_vec_start (v); data_t sum = (data_t) 0; 4 vec_length(u); %3D 8. 9. for (i = 0; i < length; i++) { sum = sum + udata[i] * vdata[i]; 10 11 12 } 13 *dest = sum; 14 Our measurements show that this function has CPES of 1.50 for integer data and 3.00 for floating-point data. For data type double, the x86-64 assembly code for the inner loop is as follows:
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY