C++高性能并行编程与优化 - 课件 - 16 现代 CMake 模块化项目管理指南• 疑问 2 :加了 CONFIGURE_DEPENDS 这个选项有什么区别? • 如果不加,在你创建新文件时, myvar 不会自动更新,还是旧的那几个文件,可能出现 undefined symbol ,需要重新运行 cmake -B build 才能更新。 • 加了,则每次 cmake --build 时自动检测目录是否更新,如果目录有新文件了, CMake 会自动帮你重新运行 cmake 类,一定要打开相应的 cmake 文件看看注释,才能确定他是 古代风格还是现代风格。 • 古代 CMake 的命名规范高度不统一,有的是 ${XXX_LIBRARIES} ,有的又是 $ {XXX_LIBRARY} 非常沙雕,需要看相应 cmake 文件的注释,才能确定具体是怎么命名的 。 • 现代 CMake 就好多了,统一用 包名 :: 组件名 的格式。但是具体的组件名,还是要查看 cmake ${XXX_INCLUDE_DIRS}) • Q: 我明明链接了 XXX 库,编译时却报错“找不到头文件 XXX.h” 怎么办? • A: 你漏了上面的 2 。 • Q: 我明明编译都通过了,链接却报错“ undefined symbol : XXXfunc” 怎么办? • A: 你漏了上面的 1 。 • 打印检查一下这两个变量是不是空的: message(“!!!!!!” ${XXX_INCLUDE_DIRS}) • 如果为空说明你变量名打错了,0 码力 | 56 页 | 6.87 MB | 1 年前3
C++23: An Overview of Almost All New and Updated FeaturesProfessional C++, 2nd, 3rd, 4th, and 5th Edition Co-author of C++ Standard Library Quick Reference& C++17 Standard Library Quick Reference Founder of the Belgian C++ Users Group (BeCPP) C++204 Agenda Character Escapes Trim Whitespace Before Line Splicing C++23 Standard Library String Formatting Improvements Standard Library Modules std::flat_(multi)map / std::flat_(multi)set std::mdspan d_overwrite() Monadic Operations for std::optional Stacktrace Library Changes to Ranges Library Changes to Views Library std::expected std::move_only_function<> std::spanstream 0 码力 | 105 页 | 759.96 KB | 6 月前3
C++20: An (Almost) Complete OverviewEdition 5th Edition (C++20) coming later this year Co-author of C++ Standard Library Quick Reference& C++17 Standard Library Quick Reference Founder of the Belgian C++ Users Group (BeCPP)3 C++20 C++20 Concurrency Changes Atomic Smart Pointers Joining & Cancellable Threads The C++20 Synchronization Library Semaphores, efficient atomic waiting, latches, and barriers std::atomic_ref Designated Initializers Math Constants std::source_location [[nodiscard(reason)]] Bit Operations Small Standard Library Additions5 Agenda New keywords: concept requires constinit consteval co_await0 码力 | 85 页 | 512.18 KB | 6 月前3
陈东 - 利用Rust重塑移动应用开发-230618重塑移动应用开发 Photo / image / chart Rust FFI On IOS - Rust targets for IOS - Build the static universal library for different target - Call the function on the swift code 利用 Rust 重塑移动应用开发 Photo / image / chart com/KeystoneHQ/rcc_android https://github.com/aaronisme/rcc_ios Rust Crypto Core Core business logic library , can be shared on different platform. - Signer - cryptography support - Blockchain Support 利用 Rust 重塑移动应用开发 Photo / image / chart RCC_Android 利用 Rust 重塑移动应用开发 - RCC_Andorid is an rust library which is to binding Rust code into Android application. - Use the crate rifgen, flapigen to0 码力 | 22 页 | 2.10 MB | 1 年前3
C++20's IANA time zone database. • This functionality requires several new types to be added to the library: • tzdb • tzdb_list • time_zone • zoned_time • time_zone_link • ambiguous_local_time • nonexistent_local_time for time zone data We had a few options... • Ship the entire IANA time zone database with the library The IANA time zone database is huge (1.25MB) – we would have some very unhappy customers if their for time zone data We had a few options... • Ship the entire IANA time zone database with the library The IANA time zone database is huge (1.25MB) – we would have some very unhappy customers if their0 码力 | 55 页 | 8.67 MB | 6 月前3
C++高性能并行编程与优化 - 课件 - 01 学 C++ 从 CMake 学起-C build • 以下命令和上一个等价,但更跨平台: • > cmake --build build • 执行生成的 a.out : • > build/a.out 为什么需要库( library ) • 有时候我们会有多个可执行文件,他们之间用到的某些功能是相同的,我们想把这些共用 的功能做成一个库,方便大家一起共享。 • 库中的函数可以被可执行文件调用,也可以被其他库文件调用。 可以生成可执行文件外,还可以通过 add_library 生成库 文件。 • add_library 的语法与 add_executable 大致相同,除了他需要指定是动态库还是静态库: • add_library(test STATIC source1.cpp source2.cpp) # 生成静态库 libtest.a • add_library(test SHARED source10 码力 | 32 页 | 11.40 MB | 1 年前3
whats new in visual studiobasic_string and basic_string_view • Other small features 🕙 Coming next for C++23 • STL • Standard library modules • Coroutines 💡 C++98* * with /permissive- 💡 C++11 💡 C++14 💡 C++17 💡 C++20* *awaiting Team Productivity Simplify C++ dependency management with . vcpkg Open-source library manager for Windows, Linux, and macOS 1700+ popular open-source libraries available for installation Create your own private library catalog for use within vcpkg; great for internal, closed-source 3rd party libraries and community repositories 🔢 Versioning Choose which library versions you want (works0 码力 | 42 页 | 19.02 MB | 6 月前3
Making Libraries Consumable for Non-C++ Developerssort. The typical result is ... undefined. What compiler flags (clang) were used by the library? By the library consumer? -fsjlj-exceptions? -fignore-exceptions? -fdwarf-exceptions? -fseh-exceptions? to have thread affinity at interop boundaries. • Consider how the consumer’s tools work with your library’s memory model.Conclusion • Document what you want and assume. • Understand assumptions and be0 码力 | 29 页 | 1.21 MB | 6 月前3
Bringing Existing Code to CUDA Using constexpr and std::pmrx[i][j] + y[i][j]; } Using constexpr 42 |constexpr ALL the Things! 43 |• std library • GSL Guidelines Support Library • … constexpr Opens Up Third Party Libraries 44 |• Your existing code should • Providing a way to instrument your code and identify inefficiencies. • Requires your std library support std::pmr. 48 |constexpr • constexpr expands the set of functions available to the GPU0 码力 | 51 页 | 3.68 MB | 6 月前3
hazard pointer synchronous reclamationreclamation is invoked when the number of retired objects reaches some threshold: • In the Folly library: • The threshold is the max of 1000 and twice the number of hazard pointers in the process. • Otherwise Hazard Pointer Synchronous Reclamation Beyond Concurrency TS2 – Maged Michael Folly open-source library: github.com/facebook/folly under synchronization/Hazptr.h Is Asynchronous Reclamation Always Enough happens. • Folly supports transitive global cleanup. • Stronger semantics than TS2 global cleanup. In Library How about Custom Domains? Hazard Pointer Synchronous Reclamation Beyond Concurrency TS2 – Maged0 码力 | 31 页 | 856.38 KB | 6 月前3
共 18 条
- 1
- 2













