uwhpsc-2016 / homework2

Homework #2
0 stars 3 forks source link

Report question two clarification - solve_upper_triangular cache question #36

Open philw16 opened 8 years ago

philw16 commented 8 years ago

For this part of the report

Assuming the cache create a copy of memory at and after a requested / particular location do you think solve_upper_triangular has any inefficiencies? Why or why not? (Note that the cache may not actually behave in this way but assume it does.)

When talking about creating a copy of memory "at and after" does this mean at time of use and after completion? The way I am seeing it is a double dip in accessing a cache line from memory

mvelegar commented 8 years ago

@cswiercz please address this!

samrkinn commented 8 years ago

I'd also like a clarification on this question.

cswiercz commented 8 years ago

I mentioned in class when we talked about the cache that when a piece of data in memory is requested (e.g. an element of an array) then, instead of just that once piece of data propagating its way through the cache, an entire chunk of memory is propagated through the cache instead.

In this question, I'm asking you to assume that when a piece of data in location i of memory is requested then the data at locations i, i+1, i+2, ..., i+(C-1) are also loaded into the cache where C is some constant.

(Note that the cache does not actually behave this way but for this exercise we will assume that it does.)