subject

Recall the example involving cache reads of a two-dimensional array (shown below). How does a larger matrix and a larger cache affect the performance
of the two pairs of nested loops? What happens if MAX = 8 and the cache can
store four lines? How many hits and misses occur in the reads of A in the first pair of
nested loops? How many hits and misses occur in the second pair? Please show your answer.

double A[MAX][MAX], x[MAX], y[MAX];
. . .
/βˆ— Initialize A and x, assign y = 0 βˆ—/
. . .
/βˆ— First pair of loops βˆ—/
for (i = 0; i < MAX; i++)
for (j = 0; j < MAX; j++)
y[i] += A[i][j]βˆ—x[j];
. . .
/βˆ— Assign y = 0 βˆ—/
. . .
/βˆ— Second pair of loops βˆ—/
for (j = 0; j < MAX; j++)
for (i = 0; i < MAX; i++)
y[i] += A[i][j]βˆ—x[j];

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:00
When jen is planning to upgrade to a monitor with a better resolution, what should she be looking for in the new monitor?
Answers: 1
question
Computers and Technology, 22.06.2019 16:30
Technician a says that a dry sump system uses no oil storage sump under the engine. technician b says that a wet sump system uses no oil storage sump under the engine. who is correct?
Answers: 3
question
Computers and Technology, 22.06.2019 17:00
Which of the following is not contained on the slide show toolbar? a. next button b. slide button c. close button d. pen tool
Answers: 1
question
Computers and Technology, 24.06.2019 09:50
Create a string list. 2. use console.readline() to collect values of firstname, lastname, street, city, state, zip, save them to list. 3. write a simple linq statement, call method uppercasewords() to change first letter to uppercase. 4. create a foreach statment to display the information. public static string uppercasewords(string value) { char[] array = value.tochararray(); if (array.length > = 1) { if (char.islower(array[0])) { array[0] = char.toupper(array[0]); } } for (int i = 1; i < array.length; i++) { if (array[i - 1] == ' ') { if (char.islower(array[i])) { array[i] = char.toupper(array[i]); } } } return new string(array);
Answers: 3
You know the right answer?
Recall the example involving cache reads of a two-dimensional array (shown below). How does a large...
Questions
question
English, 23.06.2019 19:00
question
Mathematics, 23.06.2019 19:00
question
Mathematics, 23.06.2019 19:00
Questions on the website: 13722363