Differential Equations Solutions 5

# Differential Equations Solutions 5 - m = 16, s = 1. We...

This preview shows page 1. Sign up to view the full content.

Chapter 3 Solutions: Computer Memory and Arithmetic: A Look Under the Hood CHALLENGE 3.1. See problem1.m on the website. CHALLENGE 3.2. The counts of the number of blocks moved are summarized in the following table: Dot-product Total Saxpy Total column A 32 x 128 128/8 x 32 oriented x 32/8 x 128 4624 32/8 x 1 1028 storage y 128/8 x 1 128/8 x 32 row A 32/8 x 128 128 x 32 oriented x 32/8 x 128 1040 32/8 x 1 4612 storage y 128/8 x 1 128/8 x 32 Therefore, for good performance, we should use the dot-product formulation if storage is row-oriented and the saxpy formulation if storage is column-oriented. CHALLENGE 3.3. No answer provided. CHALLENGE 3.4. Consider
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: m = 16, s = 1. We access each of the 16 elements 16 times, and we have 2 cache misses, one for each block of 8 elements. So the total time is 256 + 2 ∗ 16 ns for the 256 accesses, for an average of 1 . 125 ns. When s is increased to 16, we access only z (1), so the total time drops to 256 + 16 ns. For m = 64, the array no longer ±ts in cache and each block that we use must be reloaded for each cycle. For s = 4, we have a cache miss for every other access to the array, so the average access time is (1 + 16 / 2) = 9 ns. The other entries are similar. 15...
View Full Document

## This note was uploaded on 01/21/2012 for the course MAP 3302 taught by Professor Dr.robin during the Fall '11 term at University of Florida.

Ask a homework question - tutors are online