subject

Hw6-1 (43 points) suppose we wish to write a procedure that computes the inner productof two vectors u and v. an abstract version of the function has a cpe of 14{18 with x86-64 fordi erent types of integer andoating-point data. by doing the same sort of transformations we didto transform the abstract program combine1 into the more ecient combine4, we get the followingcode: void inner4(vec_ptr u, vec_ptr v, data t *dest) {long i; long length = vec_length(u); data_t *udata = get_vec_start(u); data_t *vdata = get_vec_start(v); data_t sum = (data_t) 0; for (i = 0; i < length; i++){sum = sum + udata[i] * vdata[i]; }*dest = sum; }our measurements show that this function has a cpe of 1.50 for integer data and 3.00 foroating-point data. for data type double, the x86-64 assembly code for the inner loop is asfollows: # inner loop of inner4. data_t = double. op = *.# udata in %rbp, vdata %rax, sum in %xmm0, i in rcx, limit in rbx. l15: # loop: vmovsd 0(%rbp,%rcx,8), %xmm1 # get udata[i]vmulsd (%rax,%rcx,8), %xmm1, %xmm1 # multiply by vdata[i]vaddsd %xmm1, %xmm0, %xmm0 # add to sumaddq $1, %rcx # increment icmpq %rbx, %rcx # compare i: limitjl .l15 # if < , goto loopassume that the functional units have the latencies and issue times given in figure 5.12 (andin the course notes).a. diagram how this instruction sequence would be decoded into operations, and show how the datadependencies between them would create a critical path of operations in the style of figures 5.13(figure: opt/dpb-sequential) and 5.14 (figure: opt/dpb-ow and figure: opt/dpb-ow-abstract). (25points.)b. for data type double, what lower bound on the cpe is determined by the critical path? givea numerical value and an explanation. (6 points.)c. assuming similar instruction sequences for the integer code as well, what lower bound on thecpe is determined by the critical path for integer data? give a numerical value and an explanation.(6 points.)d. explain how theoating-point version can have a cpe of 3.00 even though the multiplicationoperation requires 5 cycles. (6 points.)hw6-2 (27 points) write a version of the inner product procedure described in the previousproblem that uses six-way loop unrolling (6 1; no parallelism). (11 points.)

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 10:40, StephiUnicorni
When running anti-virus software , what could be a reason where recipitent is not guaranteed that data being streamed will not get interrupted?
Answers: 1
image
Computers and Technology, 22.06.2019 17:30, kallee10
The forerunner to cell phones, pdas, and smartphones was
Answers: 1
image
Computers and Technology, 22.06.2019 22:00, noeminm105
Consider the following declarations (1, 2, 3, 5, 7)class bagtype{public: void set(string, double, double, double, double); void print() const; string getstyle() const; double getprice() const; void get(double, double, double, double); bagtype(); bagtype(string, double, double, double, double); private: string style: double l; double w; double h; double price; }; a.) write the definition of the number function set so that private members are set according to the parametersb.) write the definition of the member function print that prints the values of the data membersc.) write the definition of the default constructor of the class bagtype so that the private member variables are initialized to "", 0.0, 0.0, 0.0, 0.0, respectively d.) write a c++ statement that prints the value of the object newbag. e.) write a c++ statement that declares the object tempbag of type bagtype, and initialize the member variables of tempbag to "backpack", 15, 8, 20 and 49.99, respectively
Answers: 3
image
Computers and Technology, 22.06.2019 22:30, Metlife
You are new to microsoft certification and want to start out by getting a certification geared around windows 8. what microsoft certification should you pursue?
Answers: 1
You know the right answer?
Hw6-1 (43 points) suppose we wish to write a procedure that computes the inner productof two vectors...

Questions in other subjects:

Konu
Mathematics, 20.09.2021 15:50
Konu
Mathematics, 20.09.2021 15:50
Konu
Chemistry, 20.09.2021 15:50