[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-512903-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-512903-en":130},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","cs-598-communication-cost-analysis-of-algorithms-lecture-9-the-ideal-cache-model-and-the-discrete-fourier-transform","CS 598 - Communication Cost Analysis of Algorithms - Lecture 9 - The Ideal Cache Model and the Discrete Fourier Transform","","Lecture 9 presents the ideal cache model for analyzing memory bandwidth and latency costs in algorithms. It introduces fast/slow memory and cache-efficent techniques based on minimizing the surface-to-volume ratio via temporal and spatial locality. The lecture derives cache-aware memory traffic for matrix multiplication and LU decomposition, then extends the analysis to symmetric eigenvalue decomposition and tridiagonalization using two-sided orthogonalization and band reduction. It concludes with an enhanced model that incorporates cache line size L to count cache misses.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/research-report/","Research & Report",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/cs-598-communication-cost-analysis-of-algorithms-lecture-9-the-ideal-cache-model-and-the-discrete-fourier-transform/512903/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/cs-598-communication-cost-analysis-of-algorithms-lecture-9-the-ideal-cache-model-and-the-discrete-fourier-transform/512903.png","ImageObject",300,407,{"name":42,"@type":43},"Quinn Holloway","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-19","2026-10-06",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",10,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What does the ideal cache model assume about memory and transfers?","Question",{"text":63,"@type":64},"It models a computer with unlimited memory and a cache of size H. Algorithms manually manage memory-to-cache transfers, tracking bandwidth cost (data moved) and latency cost (number of synchronous transfers).","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"How does the lecture derive the memory latency cost for block matrix multiplication?",{"text":68,"@type":64},"It constrains block sizes so A[i;k], B[k;j], and C[i;j] fit in cache simultaneously. The asymptotic latency cost equals the number of inner loop iterations, giving n3 = (stv).",{"name":70,"@type":61,"acceptedAnswer":71},"Why does eigenvalue decomposition require extra memory-bandwidth considerations?",{"text":72,"@type":64},"The lecture notes that stable algorithms first reduce the symmetric matrix to tridiagonal form, which dominates the cost and requires two-sided orthogonalization to preserve eigenvalues, affecting memory access patterns and reuse.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},512903,1791334323,{"code":4,"msg":82,"data":83},"success",[84,88,92,96,101,106,111,115,120,123,126],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":93,"show_sort_weight":94,"slug":95},"Exam",70,"exam",{"id":97,"doc_module":4,"doc_module_name":25,"category_name":98,"show_sort_weight":99,"slug":100},5,"Comic",60,"comic",{"id":102,"doc_module":4,"doc_module_name":25,"category_name":103,"show_sort_weight":104,"slug":105},6,"Technology",50,"technology",{"id":107,"doc_module":4,"doc_module_name":25,"category_name":108,"show_sort_weight":109,"slug":110},7,"Healthcare",40,"healthcare",{"id":112,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":113,"slug":114},8,30,"research-report",{"id":116,"doc_module":4,"doc_module_name":25,"category_name":117,"show_sort_weight":118,"slug":119},9,"Religion & Spirituality",20,"religion-spirituality",{"id":118,"doc_module":4,"doc_module_name":25,"category_name":121,"show_sort_weight":118,"slug":122},"World Cup","world-cup",{"id":55,"doc_module":4,"doc_module_name":25,"category_name":124,"show_sort_weight":55,"slug":125},"Lifestyle","lifestyle",{"id":127,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":97,"slug":129},19,"General","general",{"code":4,"msg":82,"data":131},{"doc_id":79,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":112,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":118,"language":139,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":140,"faqs":141,"seo_title":142,"seo_description":12,"update_tm":143,"read_time":104,"preview_page_count":33,"preview_urls":144},2336474466712,"https://ap-avatar.wpscdn.com/davatar_a8503ba1806abce46bf441b54a3ca4cd","CS 598: Communication Cost Analysis of Algorithms  \nLecture 9: The Ideal Cache Model and the Discrete Fourier Transform  \nEdgar Solomonik University of Illinois at Urbana-Champaign  \nSeptember 21, 2016  \nIdeal cache model Fast and slow memory  \nAlgorithmic cache management  \nConsider a computer with unlimited memory and a cache of size H  we can design algorithms by manually managing cache transfers  simple metrics:  \n amount of data moved from memory to cache (bandwidth cost)  \n number of synchronous memory-to-cache transfers (latency cost)  generally, e􀀎cient algorithms in this model try to select blocks of computation that minimize the surface-to-volume ratio  \n i.e. , do as much computation with the cache-resident data as possible  in other words, exploit temporal and spatial locality  \nIdeal cache model Fast and slow memory  \nCache-e􀀎cient matrix multiplication  \nConsider multiplication of n 􀀂 n matrices C = A 􀀁 B  \nFor i 2 [1 ; n=s]; j 2 [1 ; n=t], k 2 [1 ; n=v ], de􀀌ne blocks C [i ; j], A [i ; k], B [k ; j] with dimensions s 􀀂 t , s 􀀂 v , and v 􀀂 t, respectively  \nfor ( i = 1 to n / s )  \nfor ( j = 1 to n / t )  \ninitialize C [i , j ] = 0 in cache  \nfor ( k = 1 to n / v )  \nload A [i , k ] into cache  \nload B [k , j ] into cache  \nC [i , j ] = C [i , j ] + A [i , k ] * B [k , j ]  \nend  \nwrite C [i , j ] to memory  \nend  \nend  \nQ: What restriction must we impose to insure A [i ; k], B [k ; j] and C [i ; j] 􀀌tin cache simultaneously?  \nA: st + sv + vt 􀀔 H  \nIdeal cache model Fast and slow memory  \nMemory-bandwidth analysis of matrix multiplication  \nSo we have the constraint, st + sv + vt 􀀔 H  \n there are a total of (n=s)(n=t)(n=v) inner loop iterations  \n Q: what is the asymptotic memory latency cost of the algorithm  A: the number of inner loop iterations, n3 = (stv)  \n since each block of C stays resident in the innermost loop, we write each element of C to memory only once  \n we read each block s 􀀂 v block of A and v 􀀂 t block of B in each innermost loop  \n Q: how many times do we read each element of A and B?  A: n=t and n=s, respectively  \n therefore, the bandwidth cost is  \nQ = n2 + (n=s + n=t)n2 = n2 + n3 =s + n3 =t  \n if we pick s = t = v = pH=3, we satisfy the constraint and obtain Q 􀀙 2n3 = pH=3, with n3 =H3=2 memory latency cost  \n if we pick s = t = pH 􀀀 2 pH and v = 1, we obtain Q 􀀙 2n3 = pH with n3 =H memory latency cost  \nIdeal cache model Fast and slow memory  \nMemory-bandwidth cost of LU decomposition  \nFor most dense linear algebra problems, achieving good bandwidth cost is strictly easier in the sequential case than in the parallel case  \n example: non-pivoted LU factorization  \n we can use the same recursive algorithm, two recursive calls, O(1) matrix multiplications  \n T (n ; H) = 2T(n=2) + O(􀀗 􀀁 n3 = pH  ) where 􀀗 is inverse of memory bandwidth  \n cost decreases geometrically by factor  of 4 with each level, we can stop at base case dimension n0 = pH and compute LU sequentially  \n memory latency cost is just O (n3 =H3=2 􀀁 􀀗), same as matrix multiplication  \n Q: given memory bandwidth cost O (n3 = pH 􀀁 􀀗), why is it not possible to have less than a 􀀂(n3 =H3=2) memory latency cost?  \n A: we cannot transfer messages larger than the cache size H  \nIdeal cache model Fast and slow memory  \nMemory-bandwidth cost of eigenvalue decompositions  \nThe symmetric matrix eigenvalue problem (nearly same as nonsymmtric SVD) provides a nice example of where memory-bandwidth requires extra consideration with respect to distributed memory bandwidth cost  \n probably the last dense numerical linear algebra problem we study in this course  \n given a symmetric matrix A, we would like to compute its eigenvalues  \n stable algorithms work by 􀀌rst reducing A to tridiagonal form, then using the MRRR algorithm  \n the reduction to tridiagonal form dominates the cost  \n needs to be done via two-sided orthogonalization to preserve eigenvalues T = QT AQ  \nIdeal cache model Fast and slow memory  \nDirect tridiagonalization  \nWe can p","cbCaimVSIYKAVdqC","https://ap.wps.com/l/cbCaimVSIYKAVdqC","pdf",271577,"English","# The Ideal Cache Model and Cache-Efficient Algorithms\n# Cache-Efficient Matrix Multiplication\n# Memory-Bandwidth and Latency Analysis\n# Memory-Bandwidth Cost of LU Decomposition\n# Memory Considerations for Eigenvalue Decompositions\n# Tridiagonalization: Householder QR and Full-to-Band Reduction\n# Symmetric Band Reduction (Bulge Chasing)\n# Cache Line Model and Cache Misses","[{\"question\":\"What does the ideal cache model assume about memory and transfers?\",\"answer\":\"It models a computer with unlimited memory and a cache of size H. Algorithms manually manage memory-to-cache transfers, tracking bandwidth cost (data moved) and latency cost (number of synchronous transfers).\"},{\"question\":\"How does the lecture derive the memory latency cost for block matrix multiplication?\",\"answer\":\"It constrains block sizes so A[i;k], B[k;j], and C[i;j] fit in cache simultaneously. The asymptotic latency cost equals the number of inner loop iterations, giving n3 = (stv).\"},{\"question\":\"Why does eigenvalue decomposition require extra memory-bandwidth considerations?\",\"answer\":\"The lecture notes that stable algorithms first reduce the symmetric matrix to tridiagonal form, which dominates the cost and requires two-sided orthogonalization to preserve eigenvalues, affecting memory access patterns and reuse.\"}]","CS 598 - Communication Cost Analysis of Algorithms - Lecture 9 - The Ideal Cache Model and the Discrete Fourier Transform | PDF",1791277456,[145,149,152,156],{"page_no":22,"url":146,"width":147,"height":148},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/e9f30ca6708490af97d9d2cd0cc1f392.webp",983,736,{"page_no":26,"url":150,"width":151,"height":148},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/645104188d17c0a88296a1af732e8d3a.webp",982,{"page_no":30,"url":153,"width":154,"height":155},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/ea928a35df5eb64515911b19f7460261.webp",981,735,{"page_no":33,"url":157,"width":158,"height":159},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/2fa8fe15bf66b0f78fe0db4011881fcb.webp",980,734]