 C++高性能并行编程与优化 -  课件 - 03 现代 C++ 进阶:模板元编程现代 C++ 进阶:模板元编程 by 彭于斌( @archibate ) 往期录播: https://www.bilibili.com/video/BV1fa411r7zp 课程 PPT 和代码: https://github.com/parallel101/course 高性能并行编程与优化 - 课程大纲 • 分为前半段和后半段,前半段主要介绍现代 C++ ,后半段主要介绍并行编程与优化。 • 但是却没有出错,这是因为模板没有被调用,所以不会被实际编译! • 而只有当 main 调用了这个函数,才会被编译,才会报错! • 用一个假模板实现延迟编译的技术,可以加快编译的速度,用于代理模式等。 模板函数:一个例子 • 比如,要打印任意一个 vector : 模板函数:配合运算符重载 • 实现用 std::cout << a 打印任意 vector : 模板函数:大家学废了吗! decltype(auto) p = func(); • 会自动推导为 func() 的返回类型。 • 和下面这种方式等价: • decltype(func()) p = func(); • 在代理模式中,用于完美转发函数返回值。比如: • decltype(auto) at(size_t i) const { • return m_internal_class.at(i); } using0 码力 | 82 页 | 12.15 MB | 1 年前3 C++高性能并行编程与优化 -  课件 - 03 现代 C++ 进阶:模板元编程现代 C++ 进阶:模板元编程 by 彭于斌( @archibate ) 往期录播: https://www.bilibili.com/video/BV1fa411r7zp 课程 PPT 和代码: https://github.com/parallel101/course 高性能并行编程与优化 - 课程大纲 • 分为前半段和后半段,前半段主要介绍现代 C++ ,后半段主要介绍并行编程与优化。 • 但是却没有出错,这是因为模板没有被调用,所以不会被实际编译! • 而只有当 main 调用了这个函数,才会被编译,才会报错! • 用一个假模板实现延迟编译的技术,可以加快编译的速度,用于代理模式等。 模板函数:一个例子 • 比如,要打印任意一个 vector : 模板函数:配合运算符重载 • 实现用 std::cout << a 打印任意 vector : 模板函数:大家学废了吗! decltype(auto) p = func(); • 会自动推导为 func() 的返回类型。 • 和下面这种方式等价: • decltype(func()) p = func(); • 在代理模式中,用于完美转发函数返回值。比如: • decltype(auto) at(size_t i) const { • return m_internal_class.at(i); } using0 码力 | 82 页 | 12.15 MB | 1 年前3
 THE FIRST EXPLORATION OF PROJECT SPARROWyears(~11 years on Mobile dev)  Actively participating Open Source Communities: https://github.com/XianBeiTuoBaFeng2015/MySlides  Recently, focus on infrastructure of Cloud/Edge Overview I. Background  https://en.wikipedia.org/wiki/Microkernel Security I. Background  Difference Between Microkernel and Monolithic Kernel: Source: https://www.guru99.com/mi I. Background  . Source: https://os.inf.tu-dresden.de/Studium/MkK//SS2021/01_intro.pdf Architecture & Design 1.2 L4 Overview I. Background  https://en.wikipedia.org/wiki/L4_microkernel_family0 码力 | 68 页 | 13.14 MB | 1 年前3 THE FIRST EXPLORATION OF PROJECT SPARROWyears(~11 years on Mobile dev)  Actively participating Open Source Communities: https://github.com/XianBeiTuoBaFeng2015/MySlides  Recently, focus on infrastructure of Cloud/Edge Overview I. Background  https://en.wikipedia.org/wiki/Microkernel Security I. Background  Difference Between Microkernel and Monolithic Kernel: Source: https://www.guru99.com/mi I. Background  . Source: https://os.inf.tu-dresden.de/Studium/MkK//SS2021/01_intro.pdf Architecture & Design 1.2 L4 Overview I. Background  https://en.wikipedia.org/wiki/L4_microkernel_family0 码力 | 68 页 | 13.14 MB | 1 年前3
 whats new in visual studio@TartanLlama C++ Product Team, Microsoft @VisualC https://aka.ms/cpp Welcome to CppCon 2021! Join #visual_studio channel on CppCon Discord https://aka.ms/cppcon/discord • Meet the Microsoft C++ team team • Ask any questions • Discuss the latest announcements Take our survey https://aka.ms/cppcon 🚀 Mission of the C++ product team at Microsoft Empower every C++ developer and their teams to achieve browsing CMake, vcpkg and git integrations SSH/container/WSL remote experiences and much much more… https://aka.ms/cpp/code Thu 10/28 – 2pm An Editor Can Do That? Debugging Assembly Language and GPU Kernels0 码力 | 42 页 | 19.02 MB | 6 月前3 whats new in visual studio@TartanLlama C++ Product Team, Microsoft @VisualC https://aka.ms/cpp Welcome to CppCon 2021! Join #visual_studio channel on CppCon Discord https://aka.ms/cppcon/discord • Meet the Microsoft C++ team team • Ask any questions • Discuss the latest announcements Take our survey https://aka.ms/cppcon 🚀 Mission of the C++ product team at Microsoft Empower every C++ developer and their teams to achieve browsing CMake, vcpkg and git integrations SSH/container/WSL remote experiences and much much more… https://aka.ms/cpp/code Thu 10/28 – 2pm An Editor Can Do That? Debugging Assembly Language and GPU Kernels0 码力 | 42 页 | 19.02 MB | 6 月前3
 基于 Rust Arrow Flight 的物联网和时序数据传输及转换工具 霍琳贺parser. TDengine 应用开发组 • Python/Rust/Go 连接器 • 数据可视化 • 数据库运维工具 • 第三方数据源接入 • BI 系统接入 https://taosdata.com/ https://github.com/zitsen CONTENTS 自 我 介 绍 T D e n g i n e t a o s X R u s t 使 用 TDengine: Async runtime: https://crates.io/crates/tokio • Job Scheduler: https://crates.io/crates/tokio-cron-scheduler • MPMC Channel: https://crates.io/crates/flume • Web Service: • Framework: https://crates.io/crates/actix-web io/crates/actix-web • OpenAPI:https://crates.io/crates/utoipa • Metrics: https://crates.io/crates/metrics • Database: https://crates.io/crates/sqlx • RPC: https://crates.io/crates/arrow-flight https://crates.io/crates/tonic0 码力 | 29 页 | 2.26 MB | 1 年前3 基于 Rust Arrow Flight 的物联网和时序数据传输及转换工具 霍琳贺parser. TDengine 应用开发组 • Python/Rust/Go 连接器 • 数据可视化 • 数据库运维工具 • 第三方数据源接入 • BI 系统接入 https://taosdata.com/ https://github.com/zitsen CONTENTS 自 我 介 绍 T D e n g i n e t a o s X R u s t 使 用 TDengine: Async runtime: https://crates.io/crates/tokio • Job Scheduler: https://crates.io/crates/tokio-cron-scheduler • MPMC Channel: https://crates.io/crates/flume • Web Service: • Framework: https://crates.io/crates/actix-web io/crates/actix-web • OpenAPI:https://crates.io/crates/utoipa • Metrics: https://crates.io/crates/metrics • Database: https://crates.io/crates/sqlx • RPC: https://crates.io/crates/arrow-flight https://crates.io/crates/tonic0 码力 | 29 页 | 2.26 MB | 1 年前3
 C++高性能并行编程与优化 -  课件 - 11 现代 CMake 进阶指南现代 CMake 进阶指南 by 彭于斌( @archibate ) 往期录播: https://www.bilibili.com/video/BV1fa411r7zp 课程 PPT 和代码: https://github.com/parallel101/course 为什么要学习现代 CMake ? • 现代 CMake 指的是 CMake 3.x 。 • 古代 CMake 指的是 CMake PROJECT_IS_TOP_LEVEL : BOOL 类型,表示当前项目是否是(最顶层的)根项目 • PROJECT_NAME :当前项目名 • CMAKE_PROJECT_NAME :根项目的项目名 • 详见: https://cmake.org/cmake/help/latest/command/project.html 子模块里也可以用 project 命令,将当前目录作为一个独立的子项目 这样一来 PROJECT_SOURCE_DIR Objective-C++ ( 3.16 版本新增) • ISPC :一种因特尔的自动 SIMD 编程语言( 3.18 版本新增) • 如果不指定 LANGUAGES ,默认为 C 和 CXX 。 https://cmake.org/cmake/help/latest/command/project.html 常见问题: LANGUAGES 中没有启用 C 语言,但是却用到了 C 语言 解决:改成0 码力 | 166 页 | 6.54 MB | 1 年前3 C++高性能并行编程与优化 -  课件 - 11 现代 CMake 进阶指南现代 CMake 进阶指南 by 彭于斌( @archibate ) 往期录播: https://www.bilibili.com/video/BV1fa411r7zp 课程 PPT 和代码: https://github.com/parallel101/course 为什么要学习现代 CMake ? • 现代 CMake 指的是 CMake 3.x 。 • 古代 CMake 指的是 CMake PROJECT_IS_TOP_LEVEL : BOOL 类型,表示当前项目是否是(最顶层的)根项目 • PROJECT_NAME :当前项目名 • CMAKE_PROJECT_NAME :根项目的项目名 • 详见: https://cmake.org/cmake/help/latest/command/project.html 子模块里也可以用 project 命令,将当前目录作为一个独立的子项目 这样一来 PROJECT_SOURCE_DIR Objective-C++ ( 3.16 版本新增) • ISPC :一种因特尔的自动 SIMD 编程语言( 3.18 版本新增) • 如果不指定 LANGUAGES ,默认为 C 和 CXX 。 https://cmake.org/cmake/help/latest/command/project.html 常见问题: LANGUAGES 中没有启用 C 语言,但是却用到了 C 语言 解决:改成0 码力 | 166 页 | 6.54 MB | 1 年前3
 C++高性能并行编程与优化 -  课件 - 02 现代 C++ 入门:RAII 内存管理现代 C++ 入门: RAII 内存管 理 by 彭于斌( github@archibate ) 往期录播: https://space.bilibili.com/263032155 PPT 和代码: https://github.com/parallel101/course 高性能并行编程与优化 - 课程大纲 • 分为前半段和后半段,前半段主要介绍现代 C++ ,后半段主要介绍并行编程与优化。 • 求一个列表中所有数的和: # 参考资料 - [ 热心观众整理的学习资料 ](https://github.com/jiayaozhang/OpenVDB_and_TBB) - [C++ 官方文档 ](https://en.cppreference.com/w/) - [C++ 核心开发规范 ](https://github.com/isocpp/CppCoreGuidelines/blob delines.md) - [LearnCpp 中文版 ](https://learncpp-cn.github.io/) - [C++ 并发编程实战 ](https://www.bookstack.cn/read/Cpp_Concurrency_In_Action/README.md) - [ 因特尔 TBB 编程指南 ](https://www.inf.ed.ac.uk/teaching/co0 码力 | 96 页 | 16.28 MB | 1 年前3 C++高性能并行编程与优化 -  课件 - 02 现代 C++ 入门:RAII 内存管理现代 C++ 入门: RAII 内存管 理 by 彭于斌( github@archibate ) 往期录播: https://space.bilibili.com/263032155 PPT 和代码: https://github.com/parallel101/course 高性能并行编程与优化 - 课程大纲 • 分为前半段和后半段,前半段主要介绍现代 C++ ,后半段主要介绍并行编程与优化。 • 求一个列表中所有数的和: # 参考资料 - [ 热心观众整理的学习资料 ](https://github.com/jiayaozhang/OpenVDB_and_TBB) - [C++ 官方文档 ](https://en.cppreference.com/w/) - [C++ 核心开发规范 ](https://github.com/isocpp/CppCoreGuidelines/blob delines.md) - [LearnCpp 中文版 ](https://learncpp-cn.github.io/) - [C++ 并发编程实战 ](https://www.bookstack.cn/read/Cpp_Concurrency_In_Action/README.md) - [ 因特尔 TBB 编程指南 ](https://www.inf.ed.ac.uk/teaching/co0 码力 | 96 页 | 16.28 MB | 1 年前3
 CeresDB Rust 生产实践 任春韶Tokio 支持 async/await ,提供了高效的异步锁、异步队列等。 3. Tokio 社区支持好。 生产实践 – Tokio Rust future preemption https://docs.rs/tokio/latest/tokio/#cpu-bound-tasks-and-blocking-code However, this kind of swapping can other tasks from running. 生产实践 – Future 循环 Run Return https://rust-lang.github.io/async-book/04_pinning/01_chapter.html#why-pinning https://doc.rust-lang.org/beta/unstable-book/language-features/generators enerators.html 生产实践 – Async lock Req0 Req1 Req2 Memory cache https://docs.rs/tokio/1.28.2/tokio/sync/ struct.Mutex.html#which-kind-of-mutex-should-you-use 生产实践 – Async lock runtime.spawn(task0) runtime0 码力 | 22 页 | 6.95 MB | 1 年前3 CeresDB Rust 生产实践 任春韶Tokio 支持 async/await ,提供了高效的异步锁、异步队列等。 3. Tokio 社区支持好。 生产实践 – Tokio Rust future preemption https://docs.rs/tokio/latest/tokio/#cpu-bound-tasks-and-blocking-code However, this kind of swapping can other tasks from running. 生产实践 – Future 循环 Run Return https://rust-lang.github.io/async-book/04_pinning/01_chapter.html#why-pinning https://doc.rust-lang.org/beta/unstable-book/language-features/generators enerators.html 生产实践 – Async lock Req0 Req1 Req2 Memory cache https://docs.rs/tokio/1.28.2/tokio/sync/ struct.Mutex.html#which-kind-of-mutex-should-you-use 生产实践 – Async lock runtime.spawn(task0) runtime0 码力 | 22 页 | 6.95 MB | 1 年前3
 C++高性能并行编程与优化 -  课件 - 16 现代 CMake 模块化项目管理指南现代 CMake 模块化项目管理指南 彭于斌( @archibate ) 课件 & 源码: https://github.com/parallel101/course 往期录播: https://space.bilibili.com/263032155 找不到头文 件怎么办呀 CMake Cookbook 小彭老师建议 : ~~-·~·~-·~ -~·-·~·- 第一章:文件 / ories( 项目名 PUBLIC include) • 源码文件中写: • #include < 项目名 / 模块名 .h> • 项目名 :: 函数名 (); 完整案例请看源码仓库: https://github.com/parallel101/course/tree/master/16/00 推荐的目录组织方式 • 头文件(项目名 /include/ 项目名 / 模块名 .h )中写: namespace 项目名 { • void 函数名 () { 函数实现 } • } 完整案例请看源码仓库: https://github.com/parallel101/course/tree/master/16/00 推荐的目录组织方式 完整案例请看源码仓库: https://github.com/parallel101/course/tree/master/16/00 一、划分子项目0 码力 | 56 页 | 6.87 MB | 1 年前3 C++高性能并行编程与优化 -  课件 - 16 现代 CMake 模块化项目管理指南现代 CMake 模块化项目管理指南 彭于斌( @archibate ) 课件 & 源码: https://github.com/parallel101/course 往期录播: https://space.bilibili.com/263032155 找不到头文 件怎么办呀 CMake Cookbook 小彭老师建议 : ~~-·~·~-·~ -~·-·~·- 第一章:文件 / ories( 项目名 PUBLIC include) • 源码文件中写: • #include < 项目名 / 模块名 .h> • 项目名 :: 函数名 (); 完整案例请看源码仓库: https://github.com/parallel101/course/tree/master/16/00 推荐的目录组织方式 • 头文件(项目名 /include/ 项目名 / 模块名 .h )中写: namespace 项目名 { • void 函数名 () { 函数实现 } • } 完整案例请看源码仓库: https://github.com/parallel101/course/tree/master/16/00 推荐的目录组织方式 完整案例请看源码仓库: https://github.com/parallel101/course/tree/master/16/00 一、划分子项目0 码力 | 56 页 | 6.87 MB | 1 年前3
 Borsh 安全高效的二进制序列化Repository Rust https://github.com/near/borsh-rs Typescript https://github.com/dao-xyz/borsh-ts Java, Kotlin, Scala https://github.com/near/borshj Go https://github.com/near/borsh-go Python https://github ruct-py C# https://github.com/hexarc-software/hexarc-b orsh C++ https://github.com/Stolkerve/borsh-cpp Assemblyscript https://github.com/gagdiez/serial-as/tree/ma in/borsh Elixir https://github.com/alexfilatov/borsh com/alexfilatov/borsh 欢迎使用 https://github.com/near/borsh-rs borsh.io •near/near-jsonrpc-client-rs •near/near-cli-rs •near/near-sdk-rs •near/workspaces-rs •near/borsh-rs •… 欢迎申请: 有偿的开源贡献者 Thank0 码力 | 21 页 | 3.35 MB | 1 年前3 Borsh 安全高效的二进制序列化Repository Rust https://github.com/near/borsh-rs Typescript https://github.com/dao-xyz/borsh-ts Java, Kotlin, Scala https://github.com/near/borshj Go https://github.com/near/borsh-go Python https://github ruct-py C# https://github.com/hexarc-software/hexarc-b orsh C++ https://github.com/Stolkerve/borsh-cpp Assemblyscript https://github.com/gagdiez/serial-as/tree/ma in/borsh Elixir https://github.com/alexfilatov/borsh com/alexfilatov/borsh 欢迎使用 https://github.com/near/borsh-rs borsh.io •near/near-jsonrpc-client-rs •near/near-cli-rs •near/near-sdk-rs •near/workspaces-rs •near/borsh-rs •… 欢迎申请: 有偿的开源贡献者 Thank0 码力 | 21 页 | 3.35 MB | 1 年前3
 C++高性能并行编程与优化 -  课件 - 15 C++ 系列课:字符与字符串C++ 系列课:字符与字符串 by 小彭老师( @archibate ) 课件 & 代码: https://github.com/parallel101/course 上期回顾: https://www.bilibili.com/video/BV1m34y157wb 课程安排 1. vector 容器初体验 & 迭代器入门 (BV1qF411T7sd) 2. 你所不知道的 标准输入输出流 & 字符串格式化 8. traits 技术,用户自定义迭代器与算法 9. allocator ,内存管理与对象生命周期 ASCII 码 第 1 章 计算机如何表达字符 https://zh.wikipedia.org/wiki/ASCII 计算机如何表达字符 • 众所周知,计算机只能处理二进制 整数,字符要怎么办呢? • 于是就有了 ASCII 码表,他规定, 每个英文字符(包括大小写字母、 • 为什么把 to_string 作为全局函数,而不是 string 类的构造函数? • 因为 cpp 之父喜欢解耦,他不想让数字转字符串这个特定的需求 ,和字符串本身的实现有太多耦合。 https://en.cppreference.com/w/cpp/string/basic_string/to_string to_string 应用案例 std::to_wstring 数字转宽字符串0 码力 | 162 页 | 40.20 MB | 1 年前3 C++高性能并行编程与优化 -  课件 - 15 C++ 系列课:字符与字符串C++ 系列课:字符与字符串 by 小彭老师( @archibate ) 课件 & 代码: https://github.com/parallel101/course 上期回顾: https://www.bilibili.com/video/BV1m34y157wb 课程安排 1. vector 容器初体验 & 迭代器入门 (BV1qF411T7sd) 2. 你所不知道的 标准输入输出流 & 字符串格式化 8. traits 技术,用户自定义迭代器与算法 9. allocator ,内存管理与对象生命周期 ASCII 码 第 1 章 计算机如何表达字符 https://zh.wikipedia.org/wiki/ASCII 计算机如何表达字符 • 众所周知,计算机只能处理二进制 整数,字符要怎么办呢? • 于是就有了 ASCII 码表,他规定, 每个英文字符(包括大小写字母、 • 为什么把 to_string 作为全局函数,而不是 string 类的构造函数? • 因为 cpp 之父喜欢解耦,他不想让数字转字符串这个特定的需求 ,和字符串本身的实现有太多耦合。 https://en.cppreference.com/w/cpp/string/basic_string/to_string to_string 应用案例 std::to_wstring 数字转宽字符串0 码力 | 162 页 | 40.20 MB | 1 年前3
共 58 条
- 1
- 2
- 3
- 4
- 5
- 6













