 High-Performance Cross-Platform Architecture: C++20 Innovationsclasses, an illustrative example from a larger project • Project build issues • Inclusion of platform-specific header files • Concept hierarchies • Class and Function DesignOCP: The Open–Closed Principle header file to define the common definitions • The header file is responsible for including the platform-specific code • A series of preprocessor macros handles generating the header file name to load • result = vcopyq_laneq_f32(negation, 0, value, 0); return Quat High-Performance Cross-Platform Architecture: C++20 Innovationsclasses, an illustrative example from a larger project • Project build issues • Inclusion of platform-specific header files • Concept hierarchies • Class and Function DesignOCP: The Open–Closed Principle header file to define the common definitions • The header file is responsible for including the platform-specific code • A series of preprocessor macros handles generating the header file name to load • result = vcopyq_laneq_f32(negation, 0, value, 0); return Quat- (result); }Usage of Platform-specific Implementation Quat - eval(Quat - a, Quat - b, Quat - c) { return (a * 0 码力 | 75 页 | 581.83 KB | 6 月前3
 Get off my thread: Techniques for moving k to background threadsstd::async(std::launch::async,...) Platform-specific APIsSpawning new threads There are lots of ways to spawn new threads: std::thread std::jthread std::async(std::launch::async,...) Platform-specific APIs They all have0 码力 | 90 页 | 6.97 MB | 6 月前3 Get off my thread: Techniques for moving k to background threadsstd::async(std::launch::async,...) Platform-specific APIsSpawning new threads There are lots of ways to spawn new threads: std::thread std::jthread std::async(std::launch::async,...) Platform-specific APIs They all have0 码力 | 90 页 | 6.97 MB | 6 月前3
 Dynamically Loaded Libraries Outside the StandardEXPORT_UNDNAME #else #define EXPORT_UNDNAME __attribute__((visibility("default"))) #endif Platform-specific tricks to export a variable without mangling83 CppCon 2021 | auto load = [] { return plugi0 码力 | 100 页 | 3.98 MB | 6 月前3 Dynamically Loaded Libraries Outside the StandardEXPORT_UNDNAME #else #define EXPORT_UNDNAME __attribute__((visibility("default"))) #endif Platform-specific tricks to export a variable without mangling83 CppCon 2021 | auto load = [] { return plugi0 码力 | 100 页 | 3.98 MB | 6 月前3
 Interesting Upcoming Features from Low Latency, Parallelism and ConcurrencyCustomizable Functions: ● Customization through policy-aware schedulers. ● Flexibility to support platform-specific optimizations. Example Customization: ● Using CUDA-specific scheduler for std::for_each.0 码力 | 56 页 | 514.85 KB | 6 月前3 Interesting Upcoming Features from Low Latency, Parallelism and ConcurrencyCustomizable Functions: ● Customization through policy-aware schedulers. ● Flexibility to support platform-specific optimizations. Example Customization: ● Using CUDA-specific scheduler for std::for_each.0 码力 | 56 页 | 514.85 KB | 6 月前3
 Back to Basics: Concurrency3Why does C++ care about it? Standard C++03 didn’t have “threads.” You’d just use some platform-specific library, such as pthreads. But then what could the Standard say about multithreaded programs0 码力 | 58 页 | 333.56 KB | 6 月前3 Back to Basics: Concurrency3Why does C++ care about it? Standard C++03 didn’t have “threads.” You’d just use some platform-specific library, such as pthreads. But then what could the Standard say about multithreaded programs0 码力 | 58 页 | 333.56 KB | 6 月前3
 Back to Basics: The structure of a ProgramSteagall K E W B C O M P U T I N G What is an ABI? • ABI (application binary interface) is the platform-specific specification of how entities defined in one TU interact with entities defined in another TU0 码力 | 64 页 | 390.34 KB | 6 月前3 Back to Basics: The structure of a ProgramSteagall K E W B C O M P U T I N G What is an ABI? • ABI (application binary interface) is the platform-specific specification of how entities defined in one TU interact with entities defined in another TU0 码力 | 64 页 | 390.34 KB | 6 月前3
 Working with Asynchrony Generically: A Tour of C++ Executorstrigger (ctrl_c.event()) completes… (demo 4)118 All that remains is a boat-load of nasty platform-specific hackery (hook Windows events, play clicky sounds). You can find all the demo code including0 码力 | 121 页 | 7.73 MB | 6 月前3 Working with Asynchrony Generically: A Tour of C++ Executorstrigger (ctrl_c.event()) completes… (demo 4)118 All that remains is a boat-load of nasty platform-specific hackery (hook Windows events, play clicky sounds). You can find all the demo code including0 码力 | 121 页 | 7.73 MB | 6 月前3
 C++26 Preview1 2 3 66.1Library - Utilities 67P1759 Native handles and file streams // No need to use platform-specific APIs to open the file { std::ofstream of("~/foo.txt"); auto lm = last_modified(of.native_handle());0 码力 | 118 页 | 2.02 MB | 6 月前3 C++26 Preview1 2 3 66.1Library - Utilities 67P1759 Native handles and file streams // No need to use platform-specific APIs to open the file { std::ofstream of("~/foo.txt"); auto lm = last_modified(of.native_handle());0 码力 | 118 页 | 2.02 MB | 6 月前3
 Techniques to Optimise Multi-threaded Data Building During Game Developmentspinning - rather than processing Not likely to get lock either - it is 1 of 19 waiting Speaker notes◼ : Ordinary Job ◼ : Processing Job ◼ : Saving Job (Waiting) ◼ : Saving Job (Writing) ◼ : CPU Usage regular jobs use 50% CPU 100% usage is SpinLocks - Followed by 20% usage in saving jobs Speaker notes38Speaker notesAVOID BLOCKING – CONFIRMATION • Changed from SpinLock to mutex • Result: ▪ CPU usage minimal Speaker notes◼ : Ordinary Job ◼ : Processing Job ◼ : Saving Job (Waiting) ◼ : Saving Job (Writing) ◼ : CPU Usage 40Same as before - except 100% usage replaced by 0% Speaker notes41Speaker notesAVOID0 码力 | 99 页 | 2.40 MB | 6 月前3 Techniques to Optimise Multi-threaded Data Building During Game Developmentspinning - rather than processing Not likely to get lock either - it is 1 of 19 waiting Speaker notes◼ : Ordinary Job ◼ : Processing Job ◼ : Saving Job (Waiting) ◼ : Saving Job (Writing) ◼ : CPU Usage regular jobs use 50% CPU 100% usage is SpinLocks - Followed by 20% usage in saving jobs Speaker notes38Speaker notesAVOID BLOCKING – CONFIRMATION • Changed from SpinLock to mutex • Result: ▪ CPU usage minimal Speaker notes◼ : Ordinary Job ◼ : Processing Job ◼ : Saving Job (Waiting) ◼ : Saving Job (Writing) ◼ : CPU Usage 40Same as before - except 100% usage replaced by 0% Speaker notes41Speaker notesAVOID0 码力 | 99 页 | 2.40 MB | 6 月前3
 Back To Basics FunctionsFunctions can have zero or more inputs. This function has exactly one parameter of type std::string Notes on function parameters: ● Functions names must start with a letter or underscore. ● Note: Sometimes value returned. Functions return at most 1 value (The type is ‘void’ if we return no values). Notes on return values: ● There are a few ways to get more than 1 value returned from a function: ○ We the function name. Local variables declared in the function body follow normal scoping rules. Notes on function body: ● Later on we’ll see that the function body usually is defined in a source (.cpp)0 码力 | 123 页 | 7.26 MB | 6 月前3 Back To Basics FunctionsFunctions can have zero or more inputs. This function has exactly one parameter of type std::string Notes on function parameters: ● Functions names must start with a letter or underscore. ● Note: Sometimes value returned. Functions return at most 1 value (The type is ‘void’ if we return no values). Notes on return values: ● There are a few ways to get more than 1 value returned from a function: ○ We the function name. Local variables declared in the function body follow normal scoping rules. Notes on function body: ● Later on we’ll see that the function body usually is defined in a source (.cpp)0 码力 | 123 页 | 7.26 MB | 6 月前3
共 103 条
- 1
- 2
- 3
- 4
- 5
- 6
- 11
相关搜索词
 HighPerformanceCrossPlatformArchitectureC++20InnovationsGetoffmythreadTechniquesformovingtobackgroundthreadsDynamicallyLoadedLibrariesOutsidetheStandardInterestingUpcomingFeaturesfromLowLatencyParallelismandConcurrencyBackBasicsThestructureofProgramWorkingwithAsynchronyGenericallyTourExecutors26PreviewOptimiseMultithreadedDataBuildingDuringGameDevelopmentToFunctions













