A New Dragon in the Den: Fast Conversion From Floating-Point Numbers
0 码力 | 171 页 | 6.42 MB | 1 年前文档主要讨论了浮点数转换为整数的快速方法,通过计算F和E的范围,利用预计算的N(E)值存储在查找表中进行优化。文档详细介绍了公式推导和优化策略,包括如何计算F、如何处理E的范围以及如何通过预计算提高转换效率。
10 Problems Large Companies Have with Managing C++ Dependencies and How to Solve Them
0 码力 | 46 页 | 917.72 KB | 1 年前文档详细讨论了大型公司在管理C++依赖时遇到的10个主要问题,并提供了相应的解决方案。这些问题包括难以跟踪所有依赖、重复的维护成本、构建开源依赖的困难、缺乏一致的依赖管理流程、跨组织的ABI不稳定性以及潜在的安全漏洞等。解决方案包括使用包管理器(如vcpkg或Conan)来简化依赖管理、建立SBOM(软件物料清单)以提高透明度、使用二进制缓存以减少构建时间、制定漏洞监控策略以及通过容器化和工具链策略来实现一致性和安全性。
stdx::interval, a library for intervals on totally ordered sets
0 码力 | 1 页 | 45.14 KB | 1 年前文档介绍了stdx::interval,这是一个用于处理有序集合上区间的C++库。该库将区间视为集合,支持多种区间类型,包括空集、单点、有限和无限区间。库提供了成员检查、交集、并集和切割等操作,并通过全面测试确保可靠性,避免了传统意义上的“边缘情况”。文档还讨论了区间在不同上下文中的应用,如字符串和时间持续性,并强调了对所有可能情况的全面分析。
micrograd++: A 500 line C++ Machine Learning Library
0 码力 | 3 页 | 1.73 MB | 1 年前文档介绍了micrograd++,这是一个纯C++的机器学习库,旨在为构建和训练机器学习模型提供简单而强大的框架。该库仅包含头文件,采用C++17编写,具有高性能和小体积(122KB),适用于边缘设备等CPU环境。micrograd++支持神经网络、反向传播和梯度剪裁等功能,并计划未来添加Web Assembly兼容性和GPU支持。
jsc::chunk_evenly Range Adaptor for Distributing Work Across Tasks
0 码力 | 1 页 | 1.38 MB | 1 年前文档详细介绍了jsc::chunk_evenly范围适配器的设计与实现,该适配器用于在多个任务之间均匀分配工作负载。通过分析不同的分块方法和设计原则,文档展示了如何优化任务分配的效率和性能。此外,文档还讨论了异步执行的应用场景,并提出了未来改进的方向,如支持随机访问和开发更多通用组件。
Real-Time Circuit Simulation With Wave Digital Filters in C++
0 码力 | 1 页 | 5.09 MB | 1 年前The document presents a header-only C++ library called chowdsp_wdf that implements Wave Digital Filters (WDF) for real-time circuit simulation. WDF uses wave variables instead of traditional Kirchhoff variables, enabling efficient modeling of analog circuits. The library supports common circuit components and can be extended for custom elements. Performance comparisons with other WDF libraries show chowdsp_wdf achieves superior or competitive results. The document also provides examples of implementing circuit models using WDF components and demonstrates how to construct a simple RC lowpass filter.
Pipeline Architectures in C++: Overloaded Pipe Operator | and Its Monadic Operations
0 码力 | 3 页 | 422.24 KB | 1 年前The document explores the implementation of custom pipeline architectures in modern C++ using the overloaded pipe operator and the std::expected type introduced in C++23. It discusses the integration of functional programming concepts, such as function composition and monadic operations, to build efficient and error-handling pipelines. The focus is on leveraging the std::expected type and its monadic functions (e.g., and_then, or_else, transform, transform_error) to create robust pipeline frameworks. The document also highlights the importance of functional programming patterns in C++ and their practical applications.
Named Optional Parameters - JavaScript Style
0 码力 | 1 页 | 3.17 MB | 1 年前文档探讨了在C++中实现类似JavaScript和Python的命名可选参数功能的方法。通过使用POD结构体、指定初始化器、结构化绑定和函数重载,C++可以避免参数交换错误,提高代码的可读性和安全性。文档提出了三种实现方式:显式参数列表作为结构体、隐式参数列表作为结构体,以及两者结合。这些方法旨在减少歧义并优化代码结构。
Modern C++ for Parallelism in High Performance Computing
0 码力 | 3 页 | 91.16 KB | 1 年前文档介绍了D2D基准测试,旨在探索在高性能计算中使用现代C++进行并行化的优雅表达和性能表现。通过不同并行化策略(如OpenMP、mdspan、Kokkos和Sycl)实现相同代码,并分析其性能结果。D2D基准测试使用2阶拉普拉斯算子进行 stencil操作,评估不同并行化策略的扩展性和效率。文档还讨论了 stencil操作的两个关键特征:完全并行化能力和带宽限制,并对不同并行模型的性能进行了比较分析。
C++26 for C++14 Developers: STL-Preview
0 码力 | 3 页 | 129.06 KB | 1 年前本文介绍了stl-preview,一个将C++26最新标准库特性移植到C++14的库,确保与现有STL兼容。它实现了C++17至C++26间约300个STL功能,支持多平台编译器,解决了旧编译器的兼容性问题。通过提供现代C++功能,stl-preview帮助开发者在不升级编译器的情况下逐步过渡到新标准。
共 380 条
- 1
- 2
- 3
- 4
- 5
- 6
- 38













