Combining Co-Routines and Functions into a Job System
Helmut Hlavacs – Combining Co-Routines and Functions into a Job System - CppCon 2021 1 / 39Helmut Hlavacs – Combining Co-Routines and Functions into a Job System - CppCon 2021 2 / 39 About Myself • Professor for Information Processing) Technical Committee 14 Entertainment ComputingHelmut Hlavacs – Combining Co-Routines and Functions into a Job System - CppCon 2021 3 / 39 Creating Game Engines with C++ • Vienna • GUI • = Vienna Vulkan Game Engine 2.0 https://github.com/hlavacs 20Helmut Hlavacs – Combining Co-Routines and Functions into a Job System - CppCon 2021 4 / 39 The Game Loop auto prev = high_res0 码力 | 39 页 | 1.23 MB | 5 月前3Using BCC and bpftrace with Performance Co-Pilot
Using BCC and bpftrace with Performance Co-Pilot Andreas Gerstmayr October 28, 2020 Source: https://pcp.io https://github.com/iovisor/bcc https://bpftrace.org 2 eBPF Compiler Collection bpftrace bpftrace BCC high-level tracing language for eBPF Performance Co-Pilot system performance analysis toolkit Performance Co-Pilot 3 Toolkit for collecting, analyzing, visualizing and responding to the0 码力 | 4 页 | 487.04 KB | 1 年前3Behavioral Modeling in HW/SW Co-design Using C++ Coroutines
2023 Intel Corporation and Jeffrey E. Erickson cppcon 2023 1cppcon 2023 Behavioral Modeling in HW/SW Co-design using C++ coroutines Jeffrey E Erickson, Ph.D. Sebastian Schönberg, Ph.D.© 2023 Intel Corporation 10 Keywords • co_awaitor lhs = co_await • Pause execution of the coroutine until the arg becomes ready • lhs applies only when waiting for a coroutine that yields • co_yield • Pause Pause execution and provides a value to the awaiter • co_return • Ends execution of the coroutine and optionally returns a valueIntel Confidential Department or Event Name 11 © 2023 Intel Corporation 0 码力 | 44 页 | 584.69 KB | 5 月前3Building a Coroutine-Based Job System Without Standard Library
C++ COROUTINE IN 10 MINS • Core concepts: promise object, coroutine handle • Keywords: co_return, co_await, co_yield(not covered here) • awaitables, awaiters • Customization point and how functions io/2017/11/17/understanding -operator-co-await • co_await is a unary operator(so in case the compiler can find the definition of operator function, it is valid) • awaitable - type supports co_await operator. • awaiter compile time and translate the co_await expression into code. 1. Retreive awaiter & awaitable 2. Awaiting the awaiter(suspend and resume happens here) Awaitable & awaiter & co_await Useful to know • According0 码力 | 120 页 | 2.20 MB | 5 月前3Deciphering C++ Coroutines
Andreas Weis CppCon 20243/55 About me - Andreas Weis (he/him) ComicSansMS cpp@andreas-weis.net Co-organizer of the Munich C++ User Group4/55 The story so far...5/55 Where we left off...6/55 The < end; ++i) { co_yield i; } }7/55 Return type example CustomType my_coroutine (); std:: generatorinteger_sequence (int begin , int end) { for (int i = begin; i < end; ++i) { co_yield i; } } data = co_await async_io (...); co_return IoResult :: from_io_data(data ); }24/55 Suspending nested coroutines Async inner_function () { auto data = co_await async_io (...); co_return 0 码力 | 156 页 | 1.79 MB | 5 月前3Back to Basics Almost Always Vector
wa_years.push_back(2016); wa_years.push_back(2017); wa_years.push_back(2018); std::vectorco_years = {2019, 2020, 2021, 2022, 2023, 2024}; // initializer list std::vector co_years = {2019, 2020, 2021, 2022, 2023, 2024}; // initializer list std::cout << "Accessing the first elements...\n"; std::cout << co_years[0] << std::endl; std::endl; std::cout << co_years.front() << std::endl; std::cout << "Accessing the last elements...\n"; std::cout << co_years.back() << std::endl; std::cout << co_years.at(5) << std::endl; 0 码力 | 62 页 | 4.86 MB | 5 月前3Coroutines and Structured Concurrency in Practice
}); // read length int32_t len; co_await async_read(s, buffer(&len, sizeof(len)), use_awaitable); // read data auto buf = make_unique(len); co_await async_read(s, buffer(buf.get() }); // read length int32_t len; co_await async_read(s, buffer(&len, sizeof(len)), use_awaitable); // read data auto buf = make_unique (len); co_await async_read(s, buffer(buf.get() }); // read length int32_t len; co_await async_read(s, buffer(&len, sizeof(len)), use_awaitable); // read data auto buf = make_unique (len); co_await async_read(s, buffer(buf.get() 0 码力 | 103 页 | 1.98 MB | 5 月前3Coroutine Patterns and How to Use Them: Problems and Solutions Using Coroutines in a Modern Codebase
CppCon 2023 10Overview – Task - Lazy Task<> foo() { println(“Hello”); co_await sleep(1); } auto t = foo(); println(“world”); co_await move(t); Francesco Zoffoli - Coroutine Patterns and How to Use Them Use Them - CppCon 2023 13Overview – Executor Task<> foo() { int a = 42; a -= 10; int bytes = co_await send(a); if (bytes == -1 ) { handle_error(); } } Francesco Zoffoli - Coroutine Patterns to Use Them - CppCon 2023 14Overview – Executor Task<> foo() { int a = 42; a -= 10; int bytes = co_await send(a); if (bytes == -1 ) { handle_error(); } } Francesco Zoffoli - Coroutine Patterns and0 码力 | 70 页 | 1.45 MB | 5 月前325-云原生应用可观测性实践-向阳
2021, YUNSHAN Networks Technology Co., Ltd. All rights reserved. 云原生应用可观测性实践 向阳 @ 云杉网络 2021-12-08 simplify the growing complexity © 2021, YUNSHAN Networks Technology Co., Ltd. All rights reserved. 可观测性 Technology Co., Ltd. All rights reserved. 1. 可观测性的成熟度模型 2. 构建内生的可观测性能力 3. 在混合云、边缘云中的实战 4. Talk is cheap, show me the demo! 目录 simplify the growing complexity © 2021, YUNSHAN Networks Technology Co., Ltd Networks Technology Co., Ltd. All rights reserved. 1.0 支柱:基础的可观测性要素 Metrics, tracing, and logging 2017.02.21 Peter Bourgon simplify the growing complexity © 2021, YUNSHAN Networks Technology Co., Ltd. All rights0 码力 | 39 页 | 8.44 MB | 5 月前3PyArmor Documentation v5.9.5
the following ways: • Obfuscate code object to protect constants and literal strings. • Obfuscate co_code of each function (code object) in runtime. • Clear f_locals of frame as soon as code object completed _execute(*args, **kwargs): for s in names: # For Python2 # if not (s.func_code.co_flags & 0x20000000): # For Python3 if not (s.__code__.co_flags & 0x20000000): raise RuntimeError('Access violate') # Also check check a piece of byte code for special function if s.__name__ == 'connect': if s.__code__.co_code[10:12] != b'\x90\xA2': raise RuntimeError('Access violate') return func(*args, **kwargs) return _execute0 码力 | 131 页 | 428.65 KB | 1 年前3
共 1000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 100
相关搜索词
CombiningCoRoutinesandFunctionsintoJobSystemUsingBCCbpftracewithPerformancePilotBehavioralModelinginHWSWdesignC++CoroutinesBuildingCoroutineBasedWithoutStandardLibraryDecipheringBacktoBasicsAlmostAlwaysVectorStructuredConcurrencyPracticePatternsHowUseThemProblemsSolutionsModernCodebase25原生应用观测实践向阳PyArmorDocumentationv59.5