Working with Asynchrony Generically: A Tour of C++ Executors
std::execution; int compute_intensive(int); int main() { unifex::static_thread_pool pool{8}; ex::scheduler auto sched = pool.get_scheduler(); ex::sender auto work = ex::when_all( ex::then(ex::schedule(sched) std::execution; int compute_intensive(int); int main() { unifex::static_thread_pool pool{8}; ex::scheduler auto sched = pool.get_scheduler(); ex::sender auto work = ex::when_all( ex::then(ex::schedule(sched) std::execution; int compute_intensive(int); int main() { unifex::static_thread_pool pool{8}; ex::scheduler auto sched = pool.get_scheduler(); ex::sender auto work = ex::when_all( ex::schedule(sched)0 码力 | 121 页 | 7.73 MB | 5 月前3谈谈MYSQL那点事
选项 缺省值 推荐值 说明 innodb_buffer_pool_size 32M 10G InnoDB 使用一个缓冲池来保存索引和原始数据 , 这里你设置越大 , 你在存取表里面数据时所需要的 磁盘 I/O 越少,一般是内存的一半,不超过 2G , 否则系统会崩溃,这个参数非常重要 innodb_additional_mem _pool_size 2M 512M InnoDB 用来保存 metadata 对速度影响比较大,同时也关系数据完整性 innodb_log_file_size 8M 512M 在日志组中每个日志文件的大小 , 一般是 innodb_buffer_pool_size 的 25% ,官方推荐是 innodb_buffer_pool_size 的 40-50%, 设置大 一点来避免在日志文件覆写上不必要的缓冲池刷新 行为 innodb_log_buffer_size 128K 64M 用来缓冲日志数据的缓冲区的大小0 码力 | 38 页 | 2.04 MB | 1 年前3KubeCon2020/大型Kubernetes集群的资源编排优化
Product2 Quota Quota transfer Quota transfer Offline Quota Control Cluster1 Offline pool(30%) Online pool(70%) Product1 Quota Online Pod Offline Pod Cannot exceed quota of Product1 Product20 码力 | 27 页 | 3.91 MB | 1 年前3Bringing Existing Code to CUDA Using constexpr and std::pmr
com/blog/unified-memory-in-cuda- 6/ CPU vs GPU Memory System Memory GPU Memory 12 |“Unified Memory creates a pool of managed memory that is shared between the CPU and GPU, bridging the CPU-GPU divide. Managed memory gsl::spany) { for (int i = 0; i < n; i++) y[i] += f(i); } 23 |“Unified Memory creates a pool of managed memory that is shared between the CPU and GPU, bridging the CPU-GPU divide. Managed memory 0 码力 | 51 页 | 3.68 MB | 5 月前3JVM 内存模型
JVM 内存模型 Heap Method Area Runtime Constant Pool Thread Thread Thread PC Register JVM Stack Native Method Stack PC Register JVM Stack Native Method Stack PC Register JVM Stack Native Method0 码力 | 1 页 | 48.42 KB | 1 年前3C++高性能并行编程与优化 - 课件 - 06 TBB 开启的并行编程之旅
全局队列里去。每个线程空闲时会不断地从那个 队列里取出数据,即“认领任务”。然后执行,执行 完毕后才去认领下一个任务,从而即使每个任务 工作量不一也能自动适应。 • 这种技术又称为线程池( thread pool ),避免了 线程需要保存上下文的开销。但是需要我们管理 一个任务队列,而且要是线程安全的队列。 struct Task { int x0, y0; int nx, ny; }; std::queue0 码力 | 116 页 | 15.85 MB | 1 年前3C++高性能并行编程与优化 - 课件 - 05 C++11 开始的多线程编程
RAII 思想,解构时自动 join() • C++20 引入了 std::jthread 类,和 std::thread 不同在于:他的解构函数里会 自动调用 join() 函数,从而保证 pool 解 构时会自动等待全部线程执行完毕。 小彭老师快乐吐槽时间 • 多线程、异步、无阻塞、并发,能提升程序响应速度,对现实世界中的软件工程至关重要 。 • 反面教材: blender 在运0 码力 | 79 页 | 14.11 MB | 1 年前3
共 7 条
- 1