C++高性能并行编程与优化 - 课件 - 15 C++ 系列课:字符与字符串中的方法,方便用户通过模板扩展(性能上或功能上) 。 • 例如: basic_string。 char_traits 内函数的实现 Unicode 与宽字符 第 9 章 ASCII 码的局限 • 一开始的计算机是美国人发明的,他们只考虑到自己 方便,设计了 ASCII 码表,建立了英文字母和标点 符号到 0x00~0x7F 的一一映射。 ,那么看到其他编码格式的网站就会出现乱码。如何统一世界上这么多 文字的编码?所以出现了俗称“万国码”的 Unicode 。他给世界上所有的字符编 码,从英文字母到中文汉字到古埃及象形文字,现在全部都可以用一个 0x000000~0x10FFFF 的整数表示了,是不是很暴力? 暴力解决: UTF-32 • 但是 Unicode 表只解决了把全世界所有字符映射到一个 整数的问题,没有解决如何把 0x000000~0x10FFFF char 表示这么宽的字符?有很多种解决方案。 • 一种方案是:索性放弃 char ,改用 wchar_t 做字符类型 。 • wchar_t 在 Linux 上为 4 字节,完全足够表示 Unicode 这 0x000000~0x10FFFF 的范围,甚至还有 1 字节浪费 。 wchar_t 的普及 • 所以他们提议:以后用 const wchar_t * 代替 const char 0 码力 | 162 页 | 40.20 MB | 1 年前3
C++23: An Overview of Almost All New and Updated Featuresstd::to_underlying() Associative Containers Heterogeneous Erasure Removed Features Garbage Collection Support7 Explicit Object Parameters Instead of implicit this, explicitly specify the object parameter std::to_underlying() Associative Containers Heterogeneous Erasure Removed Features Garbage Collection Support13 if consteval Syntax: if consteval { /* A */ } else { /* B */ } No condition Braces are std::to_underlying() Associative Containers Heterogeneous Erasure Removed Features Garbage Collection Support17 Multidimensional Subscript Operator In the past, two options for accessing multidimensional0 码力 | 105 页 | 759.96 KB | 6 月前3
Working with Asynchrony Generically: A Tour of C++ Executorsthe hands of the caller.51 COMING UP IN THE NEXT HOUR: Structured concurrency Cancellation support in sender/receiver Extended example: Sender/receiver and ranges52 ADDITIONAL RESOURCES P2300R2: 6. Senders and coroutines55 WHAT’S COMING IN PART 2 1. Structured concurrency 2. Cancellation support in the sender/receiver abstraction 3. An extended example56 Structured concurrency57 IN THE BEGINNING deep support for cooperative cancellation is essential for good performance.72 CANCELLATION IN SENDER/RECEIVER73 CANCELLATION SUPPORT IN C++20 Built on top of C++20’s std::stop_token support Calling0 码力 | 121 页 | 7.73 MB | 6 月前3
whats new in visual studio#1 most used code editor [StackOverflow Developer Surveys] Free, open-source code editor Runs on Windows, macOS, and Linux C++ IntelliSense, debug & code browsing CMake, vcpkg and git integrations SSH/container/WSL it Real Sunny Chatterjee – _2 Address Sanitizer /fsanitize=address support in MSVC now generally-available • x86 and X64 support • Debug configurations (/MTd, /MDd) included • Runtime libraries automatically • MSBuild & CMake support for Windows & Linux • Debugger integration for MSVC and Clang/LLVM Visit https://aka.ms/asan to learn more Announcing today Experimental libFuzzer Support • An in-process, coverage-guided0 码力 | 42 页 | 19.02 MB | 6 月前3
NativeScript 101did NativeScript come to be? Swift/Obj-C Java .NET We ❤ Web. But… We need: • Better offline support • Access to all device APIs • Home screen availability • Push notifications • App monetization created with JS/TypeScript • Angular Support (or not ?) • 100% Day 0 API Access • Everything Runs on UI Thread* • Plugins created with native code • React Support • API Access via Native Modules • UI Behind o Vanilla JavaScript o Built-in MVVM Pattern o Angular Support o TypeScript Support o Vue Support (Community-Driven) o Preact Support (Community-Driven) Debugging Strategies o Debug by alert (no0 码力 | 90 页 | 40.11 MB | 1 年前3
Introduction to Mobile UI Test AutomationJava Appium Easy to write tests Single code base for both platforms Extended gesture and action support Image comparison Device management Reporting nativescript-dev-appium Installation npm install testing on pull requests Numbers > 10 real test devices > 15 build machines (10 OS X, 4 Linux, 3 Windows) > 2000 tests > 600 CI jobs > 8000 images Links Repository: www.github.com/NativeScript/na0 码力 | 41 页 | 4.75 MB | 1 年前3
C++高性能并行编程与优化 - 课件 - 11 现代 CMake 进阶指南cmake -B build 免去了先创建 build 目录再切换进去再指定源码目录的麻烦。 • cmake --build build 统一了不同平台( Linux 上会调用 make , Windows 上调用 devenv.exe ) • 结论:从现在开始,如果在命令行操作 cmake ,请使用更方便的 -B 和 --build 命令。 // 在源码目录用 -B 直接创建 build ) -G 选项:指定要用的生成器 • 众所周知, CMake 是一个跨平台的构建系统,可以从 CMakeLists.txt 生成不同类型的构建系 统(比如 Linux 的 make , Windows 的 MSBuild ),从而让构建规则可以只写一份,跨平 台使用。 • 过去的软件(例如 TBB )要跨平台,只好 Makefile 的构建规则写一份, MSBuild 也写一份 。 • Unix Makefiles 生成器; Windows 系统默认是 Visual Studio 2019 生成器; MacOS 系统默认是 Xcode 生成器。 • 可以用 -G 参数改用别的生成器,例如 cmake -GNinja 会生成 Ninja 这个构建系统的构 建规则。 Ninja 是一个高性能,跨平台的构建系统, Linux 、 Windows 、 MacOS 上都可 以用。 •0 码力 | 166 页 | 6.54 MB | 1 年前3
C++高性能并行编程与优化 - 课件 - 16 现代 CMake 模块化项目管理指南负责把包配置文件放到这里。如果第三方库的作者比较懒,没提供 CMake 支持(由安装 程序提供 XXXConfig.cmake ),那么得用另外的一套方法( FindXXX.cmake ),稍后细 谈。 Windows 系统下的搜索路径 •/ • /cmake/ • / */ • / */cmake/ • /
*/(lib/ |lib*|share)/ */cmake/ • 其中 是变量 ${CMAKE_PREFIX_PATH} , Windows 平台默认为 C:/Program Files 。 • 是你在 find_package( REQUIRED) 命令中指定的包名。 • 是系统的架构名。 Qt5/Qt5Config.cmake • /usr/Qt5/share/Qt5/Qt5Config.cmake 举例说明 find_package 搜索路径 • 例如你是 64 位的 Windows 系统, find_package(Qt5 REQUIRED) 会依次搜索: • C:/Program Files/Qt5Config.cmake • C:/Program Files/cmake/Qt5Config 0 码力 | 56 页 | 6.87 MB | 1 年前3
C++20's satellites’ atomic clocks. No file_clock Unspecified Typically: Jan 1, 1970 on POSIX; Jan 1, 1601 on Windows Used to create the time_point system used for file_time_type Unspecified * Coordinated Universal leap second story in MSVC… It’s complicated.32 The leap second story in MSVC… • Previously, the Windows operating system did not keep track of leap seconds. • Leap seconds were not tracked individually it was 1 second behind and make the adjustment then. • BUT as of Windows 10 October 2018 update and Windows Server 2019, Windows OS will now track leap seconds! • HOWEVER, they will not track leap0 码力 | 55 页 | 8.67 MB | 6 月前3
C++高性能并行编程与优化 - 课件 - 12 从计算机组成原理看 C 语言指针)。 • 64 位计算机:小丑竟是我自己 lscpu 命令查看处理器相关信息 C 语言中的整数类型 C 语言的基础整数类型 类型 Unix 32 位 Unix 64 位 Windows 32 位 Windows 64 位 char 8 位 8 位 8 位 8 位 short 16 位 16 位 16 位 16 位 int 32 位 32 位 32 位 32 位 long 32 位 long long 是超长整数类型,大小为 64 位或者说 8 字节。 long 比较特殊,在 Unix 上随系统位数变化, Windows 上始终是 32 位。 C 语言的基础整数类型 类型 Unix 32 位 Unix 64 位 Windows 32 位 Windows 64 位 char 8 位 8 位 8 位 8 位 short 16 位 16 位 16 位 16 位 int 32 位 Unix 64 位 Windows 32 位 Windows 64 位 char 8 位 8 位 8 位 8 位 short 16 位 16 位 16 位 16 位 int 32 位 32 位 32 位 32 位 long 32 位 64 位 32 位 32 位 long long 64 位 64 位 64 位 64 位 注意到 Unix 和 Windows 关于 long 的定义有分歧:0 码力 | 128 页 | 2.95 MB | 1 年前3
共 38 条
- 1
- 2
- 3
- 4













