Computer Systems: A Programmer's Perspective (3rd Edition)
Computer Systems: A Programmer's Perspective (3rd Edition)
3rd Edition
ISBN: 9780134092669
Author: Bryant, Randal E. Bryant, David R. O'Hallaron, David R., Randal E.; O'Hallaron, Bryant/O'hallaron
Publisher: PEARSON
Question
Book Icon
Chapter 6, Problem 6.35HW
Program Plan Intro

Given Information:

The code for matrix transpose routine is given:

//typedef 2-D array declaration

typedef int array[4][4];

//function to perform transpose of matrix

void transpose2(array dst, array src)

{

//variable declaration

int i,j;

//traverse through the rows

for(i=0;i<4;i++) {

//traverse through the elements

for(j=0;j<4;j++) {

//transpose of a matrix

dst[j][i]=src[i][j];

}

}

}

Blurred answer
Students have asked these similar questions
For a direct-mapped cache design with 64-bit addresses, the following bits of the address are used to access the cache: Tag  Index Offset 63-13 12-4 3-0 a.  What is the cache block size (in bytes)?b.  What is the cache size (in bytes)?c.  What is the total number of bits (including valid bit, tag bits and data array bits) to implement this cache?d. For the same block and cache sizes, you want to implement a 4-way set-associative cache, what is the number of index bit and the number of tag bits?
6. For a direct mapped cache comprising 16 single word blocks answer the following questions. Assume address and word sizes are both 32 bits and that the memory is byte addressed (4 bytes per 32-bit word). Enter answers as numbers only. How many index bits are there? How many offset bits are there? How many tag bits are there?
For a direct-mapped cache design with a 32-bit address, the following bits of the address are used to access the cache. a. What is the cache block size in words? b. How many entries does the cache have? Tag 31-13 Index 12-6 Offset 5-0
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
  • Text book image
    Systems Architecture
    Computer Science
    ISBN:9781305080195
    Author:Stephen D. Burd
    Publisher:Cengage Learning
Text book image
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning