C++高性能并行编程与优化 - 课件 - 16 现代 CMake 模块化项目管理指南/include/ 项目名 / 模块名 .h • 项目名 /src/ 模块名 .cpp • CMakeLists.txt 中写: • target_include_directories( 项目名 PUBLIC include) • 源码文件中写: • #include < 项目名 / 模块名 .h> • 项目名 :: 函数名 (); 完整案例请看源码仓库: https://github.co include 。 • 因为子项目的 CMakeLists.txt 里指定的路径都是相对路径 ,所以这里指定 include 实际上是:根 /biology/include 。 • 注意我们用了 PUBLIC 修饰符,这是为了让链接 biology 的 pybmain 也能够共享 根 /biology/include 这个头文件搜 索路径。 五、子项目的源文件 • 这里我们给 biology target_link_libraries(pybmain PUBLIC biology) • 由于 PUBLIC 属性具有传染性,根 /biology/include 现在也加入 pybmain 的 头文件搜索路径了,因此 pybmain 里可以 #include 到 biology 的头文件。 • 同理如果又有一个 target_link_libraries(zxxpig PUBLIC pybmain) 那么 zxxpig0 码力 | 56 页 | 6.87 MB | 1 年前3
C++高性能并行编程与优化 - 课件 - 01 学 C++ 从 CMake 学起之后执行该命令,操作系统会读取刚刚生成的可执行文件,从而执行其中编译成机器码, 调用系统提供的 printf 函数,并在终端显示出 Hello, world 。 厂商 C C++ Fortran GNU gcc g++ gfortran LLVM clang clang++ flang 多文件编译与链接 • 单文件编译虽然方便,但也有如下缺点: 1. 所有的代码都堆在一起,不利于模块化和理解。 论如何使用他人的库。 • 创建库以后,要在某个可执行文件中使用该库,只需要: • target_link_libraries(myexec PUBLIC test) # 为 myexec 链接刚刚制作的库 libtest.a • 其中 PUBLIC 的含义稍后会说明( CMake 中有很多这样的大写修饰符) 为什么 C++ 需要声明 • 在多文件编译章中,说到了需要在 main.cpp hellolib 的可执行文件自动添加这个路径,把 PUBLIC 改成 PRIVATE 即可。这就是他们的用途:决定一个属性要不要在被 link 的时候传播。 目标的一些其他选项 • 除了头文件搜索目录以外,还有这些选项, PUBLIC 和 PRIVATE 对他们同理: • target_include_directories(myapp PUBLIC /usr/include/eigen3)0 码力 | 32 页 | 11.40 MB | 1 年前3
C++20's is a clock? #include#include using namespace std::chrono; class MyClock { public: using rep = long long; using period = std::milli; // millisecond granularity using utc_clock • tai_clock • gps_clock • (file_clock)22 Why have all these different clocks? Clock Epoch General Description Tracks leap seconds? system_cloc k Jan 1, 1970 00:00:00 Tracks UTC or GMT* time. No 0 码力 | 55 页 | 8.67 MB | 6 月前3
Harbor Deep Dive - Open source trusted cloud native registryenterprise products: VIC and PKS GitHub Repo: https://github.com/go harbor/harbor/ Apache 2.0 license An open source trusted cloud native registry project HARBOR More integrations in future Harbor0 码力 | 15 页 | 8.40 MB | 1 年前3
THE FIRST EXPLORATION OF PROJECT SPARROWg_from_sources.html … III. Sparrow Development add a WebAssembly-license file to $SRC_RENODE/lib/resources/libraries/ and rebuild: … III. Sparrow Development0 码力 | 68 页 | 13.14 MB | 1 年前3
C++20 STL Features: 1 Year of Development on GitHub04 CppCon 2019 CppCon 2020 • Announced at CppCon 2019 • github.com/microsoft/STL • Apache License v2.0 with LLVM Exception • Implemented ~50 C++20 features • Majority from our amazing contributors0 码力 | 45 页 | 702.09 KB | 6 月前3
唐刚 - Use Rust to Develop the Decentralized Open Data Application - RustChinaConf2023just a gimmick by cloud platform ➔ Wants to extend the financial computation/storage model to general cases • Limites of On-chain VM computation • Limites of MPT • Limites of K-V db Problems of Web3: Protocol 1 app 1 app 2 app 3 app n Every app has its own backend and frontend implementations. General User Text Persistence protocol https://github.com/eightfish-org/gutp A Case: GUTP MeBlog is a blog0 码力 | 30 页 | 2.53 MB | 1 年前3
Analyzing MySQL Logs with ClickHouseworks • service clicktail start • To run as a service © 2018 Percona. 15 MySQL Logs Primer General Query Log Binary Log Slow Query Log Audit Log © 2018 Percona. 16 MySQL Audit Logs to ClickHouse0 码力 | 43 页 | 2.70 MB | 1 年前3
KubeCon2020/大型Kubernetes集群的资源编排优化optimization of kubernetes cluster in large scale Patrickxie ( 谢谆志) Background Cloud has been the general trend. How to manage so many clusters ,resources and businesses How to ensure load balancing of0 码力 | 27 页 | 3.91 MB | 1 年前3
hazard pointer synchronous reclamation(wg21.link/n4895) for working draft of Concurrency TS2 Example Using Hazard Pointers class Foo : public hazard_pointer_obj_base{ /* Foo members */ }; Result read_and_use(std::atomic & src, Func Concurrency TS2 – Maged Michael class hazard_pointer_obj_base { public: void retire(D d = D()) noexcept; }; class hazard_pointer { public: hazard_pointer() noexcept; // Empty hazard_pointer(hazard_pointer&&) class hazard_pointer_obj_base { public: void set_cohort(hazard_pointer_cohort* cohort) noexcept; void retire(D d = D()) noexcept; }; class hazard_pointer_cohort { public: hazard_pointer_cohort(); 0 码力 | 31 页 | 856.38 KB | 6 月前3
共 16 条
- 1
- 2













