3D Graphics for Dummies3D Graphics for Dummies Significant content “borrowed” from Dan Chang @ Nintendo NTD “with permission” Chris Ryan CppCon 2021 github.com/ChrisR98008/CppCon20213 3D Graphics for Dummies4 3D Graphics Dummies5 3D Graphics for Dummies6 3D Graphics for Dummies7 3D Graphics for Dummies8 3D Graphics for Dummies9 3D Graphics for Dummies10 3D Graphics for Dummies11 3D Graphics for Dummies12 3D Graphics Graphics for Dummies13 3D Graphics for Dummies14 3D Graphics for Dummies15 3D Graphics for Dummies Winding / Right Hand Rule Fingers curled in the order of the points, thumb points up Counter clockwise0 码力 | 79 页 | 4.61 MB | 6 月前3
Data Is All You Need for FusionData is all you need for fusion N 1int x = 4; callee(x); // do work } #include#include #include "benchmark.h" #include "matrix_lib.h" int main(..){ std::vector a; a.reserve(100); reserve(100); // Initialize other data // data-structures. cblas_sgemm(a.data()...); cblas_sgemm(....); return 0; } High Performance code is about Hardware Matrix Multiply 2int x = 4; callee(x); // "matrix_lib.h" int main(..){ std::vector a; a.reserve(100); // Initialize other data // data-structures. cblas_sgemm(a.data()...); cblas_sgemm(....); return 0; } High Performance code is about Hardware 0 码力 | 151 页 | 9.90 MB | 6 月前3
Back to Basics: Algebraic Data TypesBack to Basics: Algebraic Data Types I also do C++ training! arthur.j.odwyer@gmail.com Arthur O’Dwyer 2020-09-16Outline ● Why the name “algebraic data types”? [3–18] ○ Memory layout diagrams. Why pair C++98. The original algebraic data type. tuple C++11. optional C++17. variant C++17, with minor tweaks to its constructors in C++20. 3Why do we say “algebraic”? It’s about the The memory layout of pair or tuple is going to be pretty much the same as the layout of a plain old data struct. pair tuple 6 A The compiler will do some padding for alignment, and may0 码力 | 73 页 | 267.05 KB | 6 月前3
CppCon 2021: Persistent Data StructuresIntroduction Persistent Hash Map Persistent Transactional Data Structures Live Demonstration ReferencesIntroduction Persistent Hash Map Persistent Transactional Data Structures Live Demonstration References Overview Transactional Data Structures Design Goals Methodology Performance Results Live Demonstration A Persistent Hash Map for Graph Processing Workloads and a Methodology for Persistent Transactional Data Structures Structures 2IntroductionIntroduction Persistent Hash Map Persistent Transactional Data Structures Live Demonstration References Introduction Persistent Memory ▶ Persistent Memory is positioned as a new tier0 码力 | 56 页 | 1.90 MB | 6 月前3
Reusable Code & Reusable Data Structuresvertical_center(WidgetContainer const& c) { } 1 2 auto rects = tc::make_vector(tc::transform(c, 3 [](widget const& w) { return w.bounding_box(); } 4 )); 5 // Magic happens 6 tc::for_each(tc::zip(c vertical_center(WidgetContainer const& c) { } 1 2 auto rects = tc::make_vector(tc::transform(c, 3 [](widget const& w) { return w.bounding_box(); } 4 )); 5 // Magic happens 6 tc::for_each(tc::zip(c https://github.com/think-cell/think-cell-library 1 2 void vertical_center(WidgetContainer const& c) { 3 4 5 // Magic happens 6 tc::for_each(tc::zip(c, rects), 7 [&](widget& w, rect r) { 8 widget0 码力 | 132 页 | 14.20 MB | 6 月前3
Can Data-Oriented-Design be Improved?1Can data-oriented-design be improved? Ollivier Roberge Collège Jean-de-Brébeuf 2A brief historic • 1960s • FORTRAN • Lisp • 1980s • OOP • Structured programming • Modules • 2000s • Template Concurrency • 2020s • ??? 3What is DoD about? • DoD (“Data oriented design”) • Not about cache lines, nor struct layout (at its core) • From wikipedia: ”As a design paradigm, data-oriented-design focuses transformations of data and focuses on modelling programs as transforms.” 4Minimalist definition of DoD 𝐷𝑎𝑡𝑎!"#$"# = 𝐹(𝐷𝑎𝑡𝑎%&$"#) Transformation Input Data Output Data Specific transformation0 码力 | 39 页 | 1.18 MB | 6 月前3
Data Structures That Make Video Games Go RoundExposing the Games Industry: One Data Structure At A TimeGames are … COMPLICATEDBack in the old days, games were: ● Simple; 2D, 2.5D mostly. ● Single threaded. ● Made from scratch (no game engine) engine). ● Short release cycle. ● Small, by modern standards.Today: ● 3D, Photorealistic, Physics based. ● Multi-threaded. ● Made with a game engine. ● Long development cycles. ● Large, complex ● Environment Variables. ● Error Handler. ● Job system. ● Resource Registry. ● Reads boot data. ● Listens to kernel message pump.Resource Registry Games are constructed with a wide variety of0 码力 | 196 页 | 3.03 MB | 6 月前3
Designing Fast and Efficient List-like Data StructuresList-like data structures std::vector std::list std::dequestd::vector C++ version of the array-list data structure Backed by a C-style array Automatically allocates a new backing array when inserting public: // constructor, accessors, ... private: size_t size_; size_t capacity_; T* data_; }; 1 2 3 4 5 6 7 8 9 10std::vector Compact layout - elements stored in contiguous memory Inserting elements at positions other than the end is expensive (O(n))std::list C++ version of the linked-list data structure Elements stored in nodes referencing the next nodestd::list Node Node Node Node Node0 码力 | 29 页 | 852.61 KB | 6 月前3
POCOAS in C++: A Portable Abstraction for Distributed Data StructuresDistributed Data Structures Extending to GPUsThis Talk Background: how do we write a program for a supercomputer? Introduce PGAS Model, RDMA Building Remote Pointer Types Building Distributed Data Structures Distributed Data Structures Extending to GPUsThis Talk Background: how do we write a program for a supercomputer? Introduce PGAS Model, RDMA Building Remote Pointer Types Building Distributed Data Structures a supercomputer? Introduce PGAS Model, RDMA Building Remote Pointer Types Building Distributed Data Structures Extending to GPUsWhat This Talk Is Not - A distributed implementation of the STL - A0 码力 | 128 页 | 2.03 MB | 6 月前3
Distributed Ranges: A Model for Building Distributed Data Structures, Algorithms, and ViewsMulti-GPU, multi-CPU systems require partitioning data - Users must manually split up data amongst GPUs / nodes - High-level mechanisms for data distribution / execution necessary. CPU NIC GPU 1 Tile 0 GPU Tile 1 Tile 0 Xe LinkProject Goals - Offer high-level, standard C++ distributed data structures - Support distributed algorithms - Achieve high performance for both multi-GPU, NUMA Background (Ranges, Parallelism, Distributed Data Structures) - Distributed Ranges (Concepts) - Implementation (Algorithms and views) - Complex Data Structures (Dense and sparse matrices)0 码力 | 127 页 | 2.06 MB | 6 月前3
共 416 条
- 1
- 2
- 3
- 4
- 5
- 6
- 42













