servicecppcon_add_library(service LIBRARIES Asio::asio) add_subdirectory(tests)0 码力 | 1 页 | 73.00 B | 6 月前3
Pipeline Architectures in C++: Overloaded Pipe Operator | and Its Monadic Operationsoverview of what the poster reports on. Title: Pipeline architectures in C++: overloaded pipe operator | std::expected and its monadic operations Brief overview: Functional programming in C++ is the overloaded pipe operator. In this poster I show how to implement a custom pipeline framework that employs std::expected, available since C++23. An overloaded custom pipe operator | will be presented my book about C++ [1][3]. One of the topics was to describe the behavior of the overloaded pipe operator | in std::ranges. I came across Ankur's Satle lecture [4] and decided to expand on this topic –0 码力 | 3 页 | 422.24 KB | 6 月前3
Techniques to Optimise Multi-threaded Data Building During Game DevelopmentSpeaker notesDATA BUILDING SYSTEMS • Spectrum of possible designs ▪ No data building – use raw text, mesh, image files in game ▪ Full optimisation – use optimised custom formats • Usually somewhere in the latest from cache Different people care about different data at different times Examples include Nav Mesh - or rendering data for global illumination ▶ Process everything in parallel Speaker notesASSUMPTIONS many times Both at construction and during queries Speaker notesSORTING GRID NODES inline bool operator<(const GridNode& left, const GridNode& right) { return std::tie(left.type, left.properties_hash0 码力 | 99 页 | 2.40 MB | 6 月前3
What's Eating my RAM?What’s that alarm? Consequences: ● Swap: performance degradation ● Out-of-memory (OOM) killer: service disruption ● Multi-tenant environment: resources are shared by different processes🚨 90% Memory Fragmentation = 1 - LargestAllocableBlock / TotalFreeMemory mallinfo(3) mallinfo(3) mallinfo service A: Total bytes (arena): 244 355 072 Total in-use allocations: 31 650 352 Total 63 248 External Fragmentation = 0.9997How to estimate Fragmentation? mallinfo(3) mallinfo service B: Total bytes (arena): 33 292 288 Total in-use allocations: 30 316 416 Total free0 码力 | 88 页 | 3.49 MB | 6 月前3
stdx::interval, a library for intervals on totally ordered setscomparison. A generalization of membership. Similar to operator<=>, but with heterogeneous operands. Interval comparison. Also similar to operator<=>, but not transitive. Result is nonzero if the operands basic mathematical concept that appear in all kinds of algorithms, from recursive sorting to adaptive mesh refinement. Interval notation allows a more natural expression of the idea of an algorithm, replacing cases in stdx::interval because the analysis is exhaustive. Reliability: Testing the intersection operator Eliminating edge cases means exhaustively testing all combinatorial possibilities of constructing0 码力 | 1 页 | 45.14 KB | 6 月前3
C++高性能并行编程与优化 - 课件 - 10 从稀疏数据结构到量化数据类型个 bit 用 map 来存储 读取:如果不存在,则读到 0 写入:如果不存在,则创建该表项 用 unordered_map 来存储 map 基于红黑树,会按照键值排序,需要键值具有 operator< 重载,复杂度 O(logn) C++11 新增的 unordered_map 基于哈希表,不保证顺序但更高效,需要键值能被哈希,复杂度 O(1) 用 unordered_map 按 16x16 的稀疏体积,可以存储符号距 离场 (SDF) ,也可以存储烟雾仿真的结果 等。 • 据张心欣说, OpenVDB 赢得了奥斯卡奖 。 • 因为他经常用在影视特效中,主要是符号 距离场有时比 mesh 处理起来方便很多。 OpenVDB 的设计:如果用 SNode 来表示 • hash().pointer(5).pointer(4).dense(3) ZENO 中就大量使用了 OpenVDB • 不过效率比我们手写的低很多…… 不推荐使用 std::vector• 不建议使用 vector 的原因:他返回的不是真正的引用,而是一个重载了 operator= 和 operator bool 的 std::_Bit_reference 对象,而且效率很低。 • 如果配合用 decltype 和 auto 的话,他们不会正确推导出 bool ,影响我们正常使用模板元编 0 码力 | 102 页 | 9.50 MB | 1 年前3
Retiring the Singleton Patternreturn instance_; } void func(...); private: Singleton(); Singleton(const Singleton&); void operator=(const Singleton&); }; Bloomberg 6 // Somewhere else.cpp Singleton::instance()->func(...); Notable void func(...); static void init(...); private: Singleton(); Singleton(const Singleton&); void operator=(const Singleton&); }; Bloomberg 7 // Somewhere else.cpp Singleton::instance()->func(...); Notable CommWrapper { enum { SERVICE_ID = 249409 }; public : CommWrapper(int service_id = SERVICE_ID); Response send(const Request& req); private: TcpClient raw_client; }; Bloomberg 14 struct Service { static CommWrapper0 码力 | 70 页 | 1.59 MB | 6 月前3
2020: The Year of Sanitizers?[conformant/strict] powerful (visual) debugger linter/formatter test framework perf profiler CI/CD service SCM client package manager static analyzer dynamic analyzer (runtime) automated refactoring "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in clang_rt.asan_cxx-i386.lib(asan_new_delete.cc.obj) >uafxcw.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete(void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z) already defined in clang_rt.asan_cxx-i386.lib(asan_new_delete.cc.obj) >uafxcw.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete[](void0 码力 | 135 页 | 27.77 MB | 6 月前3
Back to Basics: Designing Classes (part 1 of 2)concerns 😍 Move the member into a private namespace … … or into another class (as a separate service).Design for Testability 65 template< class T, class Allocator = std::allocator> Copy constructor Widget& operator=( Widget const& other ); // Copy assignment operator Widget( Widget&& other ) noexcept; // Move constructor Widget& operator=( Widget&& other ) noexcept; // // Move assignment operator ~Widget(); // Destructor Widget( ); // Default constructorResource Management 70 class Widget { public: // ... // ... private: }; // - i as a representative 0 码力 | 87 页 | 5.64 MB | 6 月前3
Thinking Functionally In C++basis. Because of the awesome discount, the gift card value is going to be $10 for each year of service. To make it even more personal, they will print out a birthday card with the gift card options basis. Because of the awesome discount, the gift card value is going to be $10 for each year of service. To make it even more personal, they will print out a birthday card with the gift card options basis. Because of the awesome discount, the gift card value is going to be $10 for each year of service. To make it even more personal, they will print out a birthday card with the gift card options0 码力 | 114 页 | 3.14 MB | 6 月前3
共 269 条
- 1
- 2
- 3
- 4
- 5
- 6
- 27
相关搜索词
servicePipelineArchitecturesinC++OverloadedPipeOperatorandItsMonadicOperationsTechniquestoOptimiseMultithreadedDataBuildingDuringGameDevelopmentWhatEatingmyRAMstdxintervallibraryforintervalsontotallyorderedsets高性性能高性能并行编程优化课件10RetiringtheSingletonPattern2020TheYearofSanitizersBackBasicsDesigningClassespartThinkingFunctionallyIn













