Data Structures That Make Video Games Go RoundHood Hashing Because the probe sequence length (PSL) keeps growing, inserted elements starts clustering around the mean of the container. Ideally, you would keep the PSL for each element roughly the0 码力 | 196 页 | 3.03 MB | 6 月前3
Distributed Ranges: A Model for Building Distributed Data Structures, Algorithms, and Views7 Row Pointers Values Column Indices CSR FormatDense and Sparse Matrices 0 1 0 1 1 2 2 2 3 1 2 2 2 3 0 0 2 0 1 3 2 0 1 3 6 7 Row Pointers Values Column Indices - Sparse matrices Matrices 0 1 0 1 1 2 2 2 3 1 2 2 2 3 0 0 2 0 1 3 2 0 1 3 6 7 Row Pointers Values Column Indices - Sparse matrices can have many different formats - Each format may support different Matrices 0 1 0 1 1 2 2 2 3 1 2 2 2 3 0 0 2 0 1 3 2 0 1 3 6 7 Row Pointers Values Column Indices - Sparse matrices can have many different formats - Each format may support different0 码力 | 127 页 | 2.06 MB | 6 月前3
GraphBLAS: Building a C++ Matrix API for Graph Algorithmsrelease and unlimited distribution. 93 0 2 3 3 3 6 6 0 2 2 2 3 4 3 7 8 2 5 7 1 2 9 Row Pointers Column Indices Values Compressed Sparse Row (CSR) Storage Format 8 2 5 7 1 2 1 Sparse Matrix Formats - This means we need to use a custom reference type for indices Sparse Matrix Representation Column Indices[DISTRIBUTION STATEMENT A] This material has been approved for public release and unlimited - This means we need to use a custom reference type for indices Sparse Matrix Representation Column Indices[DISTRIBUTION STATEMENT A] This material has been approved for public release and unlimited0 码力 | 172 页 | 7.40 MB | 6 月前3
Performance Engineering: Being Friendly to Your Hardwarearray to get selected.Memory 20 ACT Row Column RD/WR wait • Send column address and actual memory operation – another commandMemory 21 ACT Row Column RD/WR wait wait • Wait for a portion of 22 ACT Row Column RD/WR wait wait data • Actual data transfer. • Wider and shorter transaction for DDR4 • Narrower and longer transaction for DDR5Memory 23 ACT Row Column RD/WR wait wait Row Column RD/WR wait wait data PRE wait • One row active at a time • All rows need to be refreshed periodically • Request scheduling • Row size != page sizeMemory 25 ACT Row Column RD/WR0 码力 | 111 页 | 2.23 MB | 6 月前3
Linear Algebra with The Eigen Cpp Libraryhierarchy: • Most member functions are defined on Eigen::MatrixBase • Eigen::Vector class: 𝑚 × 1 column vector Eigen Daniel Hanson CppCon 2024 11• The Eigen::Matrix class supports the (usual) numerical Daniel Hanson CppCon 2024 13 Note: Although data is entered in row-major order, it is stored in column-major order More info (documentation): https://eigen.tuxfamily.org/dox/group__TutorialMatrixClass matrix 𝐗 will contain monthly returns for each index in separate columns (plus the intercept term column at left): • In matrix form the regression equation is 𝐘 = 𝐗𝛃 • Apply QR Decomposition on0 码力 | 35 页 | 1.10 MB | 6 月前3
Is std::mdspan a Zero-overhead Abstraction? - Oleksandr Bakirov - CppConoptimized for column-major matricesWhich layout should we use? Our BLAS-like interface specifies one row stride, and elements are assumed to be contiguous in each each row, so the column stride is always should we use? BLAS specifies one row stride, and elements are contiguous in each each row, so the column stride is always 1. Sound like we should use std::layout_stride, right? 24 Wrong! std::layout_stride0 码力 | 75 页 | 1.04 MB | 6 月前3
More Ranges Please○ resize() implies we are sorting too much - nth_element() requires O(SP) average steps ○ Each column is already sorted - we can merge() ■ Complexity can go down to O(SlogP) ■ merge() allow lazy evaluation iter_swap is much more expensive than comparison ○ For example - sorting rows of a table by one column ○ Projections stress the potential difference between the objects in question. ● Suggested algorithm:0 码力 | 27 页 | 1.08 MB | 6 月前3
C++20 镶 SQLcopy and paste both ways from and interactive SQL terminalAnnotations u Columns u /*:type*/ u The column name is immediately to the left of the comment u Parameters u /*:name:type*/ Type annotation C++auto read_row(sqlite3_stmt *stmt) { RowType row = {}; std::size_t count = sqlite3_column_count(stmt); auto size = meta_struct_size(row); assert(size == count); int index = 0; meta_struct_for_each( 0 码力 | 46 页 | 775.02 KB | 6 月前3
Linear Algebra Coming to Standard C++Layout mapping maps multi-D index (i, j) → 1-D offset k • Different layout example • Nondefault column major (layout_left) • Instead of default row major (layout_right) #includemdspan A{A_raw_pointer Upper triangle: 𝐴𝑖𝑗, 𝑖 ≤ 𝑗 Parts of a matrix Diagonal: 𝐴𝑖𝑗, 𝑖 = 𝑗 Row index 𝑖 Column index 𝑗28 Detailed example: Cholesky matrix factorization Solve a symmetric positive definite 0 码力 | 46 页 | 2.95 MB | 6 月前3
Spanny 2: Rise of std::mdspanindices to storage locations data = row major<3, 3> = column major<3, 3> = 0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8 0 3 6 1 4 7 2 5 8github.com/griswaldbrooks/spanny2 layout_right(i, j): return i*M + j 26github.com/griswaldbrooks/spanny2 layout_right = layout_leftT column major Eigen, Fortran, MATLAB layout_left (i, j): return i + j*N 27github.com/griswaldbrooks/spanny2 0 码力 | 117 页 | 2.02 MB | 6 月前3
共 74 条
- 1
- 2
- 3
- 4
- 5
- 6
- 8
相关搜索词













