The Main Points of C++The Main Points of C++ Misha4.2 Point4.2 Point, as in:1. Just one point (dot) 3-4 .1. Just one point (dot) • In floating-point literals 4.2 .2 4. followed by suffix or exponent (e or p) .1. Just access operators • Member of object • Pointer to member of object • In module names export module Main.SubM.SubSubM; “Dots have no intrinsic meaning, however they are used informally to represent hierarchy0 码力 | 34 页 | 344.31 KB | 6 月前3
How Meta Made Debugging Async Code Easier with Coroutines and Sendersprocess_file(...) pool.run() _clone … … process_file(...) pool.run() _clone … … process_file(...) pool.run() _clone … … Stack Traces for Async Code are Unhelpful Threadpool threads: #0 process_file(...) #5 pool.run() #10 __clone … … IO Thread: #0 async_read_some_at(...) #3 ctx.run() #5 __clone … … Main thread: #0 unifex::sync_wait( unifex::sync_wait(...) #4 main() #7 __libc_start_main() … …What would be better? Threadpool threads: #0 process_file(...) #5 pool.run() #10 … IO Thread: … #0 async_read_some_at(0 码力 | 131 页 | 907.41 KB | 6 月前3
LLVM's Realtime Safety Revolution: Tools for Modern Mission Critical Systemsright time.Missed deadlines Real-time programmingReal-time code in C++ Real-time programmingvoid process (float * audio) { // You have 11.6 ms from now, GO!!!! ... }void dispatch (Data& audio) ... } 🚨void dispatch() { x = make_unique(); ... } 🚨Sometimes it’s hiddenvoid process_audio() { numbers_[1] = 2; ... } 🤔void dispatch() { auto const x = input_array(); post_report([x, y](auto & data) { data.input = x; data.output = y; }); } 🤔void process_audio() { fftw_execute(plan); ... } 🤔How can we be confident that our code is real-time 0 码力 | 153 页 | 1.38 MB | 6 月前3
ethercat stackciere.com Beckhoff SSC extern "C" Plugins User provides functionality: ▶ Calls the main loop ▶ Provides call for process data handling ▶ Provides calls for interrupt control ▶ Calls interface on interrupts Project The Interface Called in our main loop. The main loop processing for SSC void MainLoop(void); Called from SSC when cyclic data is available. void process_cycle(TOBJ7000 *pdo_in, TOBJ6000 *pdo_out); Episode 283 Main loops all the way down extern "C" { void process_app(TOBJ7000 *pdo_in, TOBJ6000 *pdo_out) { // UGLY THINGS WE DON'T PUT ON SLIDES } } extern "C" { // This is the main loop in the SSC0 码力 | 65 页 | 2.54 MB | 6 月前3
POCOAS in C++: A Portable Abstraction for Distributed Data Structuresnum_values, MPI_FLOAT, 0, 0, MPI_COMM_WORLD); // Data is now in // `recv_values` Process 0 Process 1How do I program one? - Message Passing - processes issue matching send and receive calls num_values, MPI_FLOAT, 0, 0, MPI_COMM_WORLD); // Data is now in // `recv_values` Process 0 Process 1How do I program one? - Message Passing - processes issue matching send and receive calls num_values, MPI_FLOAT, 0, 0, MPI_COMM_WORLD); // Data is now in // `recv_values` Process 0 Process 1 P0 and P1 must both participate in message.How do I program one? - Message Passing - processes0 码力 | 128 页 | 2.03 MB | 6 月前3
Overload ResolutionOverload Resolution ● When will declaring an Overload fail ● Overview of the Process ● When to Use Overloads vs Using a Template ● Process to find the Best Overload ● When the Best Match is Not What You Wanted function, method, or constructor overloading ■ multiple declarations which have different signatures ■ main topic for this presentation 6Overload Resolution ● Overload vs Override ○ method overriding ■ used ● might add two numbers or concatenate two strings ■ implemented using the overload resolution process 8Overload Resolution ● Why is Overload Resolution Required ○ an overload occurs when two or more0 码力 | 55 页 | 209.57 KB | 6 月前3
Working with Asynchrony Generically: A Tour of C++ ExecutorsEXAMPLE: LAUNCHING CONCURRENT WORK namespace ex = std::execution; int compute_intensive(int); int main() { unifex::static_thread_pool pool{8}; ex::scheduler auto sched = pool.get_scheduler(); ex::sender EXAMPLE: LAUNCHING CONCURRENT WORK namespace ex = std::execution; int compute_intensive(int); int main() { unifex::static_thread_pool pool{8}; ex::scheduler auto sched = pool.get_scheduler(); ex::sender Use pipe syntax if you want to. namespace ex = std::execution; int compute_intensive(int); int main() { unifex::static_thread_pool pool{8}; ex::scheduler auto sched = pool.get_scheduler(); ex::sender0 码力 | 121 页 | 7.73 MB | 6 月前3
Conan 1.20 Documentationcreated with a newer version of the client. Additionally, starting in version 1.6, we began the process of deprecating Python2 support. Features already working with python2 will continue to do so, but TO CONAN REPOSITORY FOLDER sys.path.append(conan_repo_path) from conans.client.command import main main(sys.argv[1:]) Test your conan script. 2.4. Install the binaries 9 Conan Documentation, Release Listing 1: md5.cpp #include "Poco/MD5Engine.h" #include "Poco/DigestStream.h" #includeint main(int argc, char** argv) { Poco::MD5Engine md5; Poco::DigestOutputStream ds(md5); ds << "abcdefghijklmnopqrstuvwxyz"; 0 码力 | 611 页 | 4.89 MB | 1 年前3
Conan 1.19 Documentationcreated with a newer version of the client. Additionally, starting in version 1.6, we began the process of deprecating Python2 support. Features already working with python2 will continue to do so, but TO CONAN REPOSITORY FOLDER sys.path.append(conan_repo_path) from conans.client.command import main main(sys.argv[1:]) Test your conan script. 2.4. Install the binaries 9 Conan Documentation, Release Listing 1: md5.cpp #include "Poco/MD5Engine.h" #include "Poco/DigestStream.h" #includeint main(int argc, char** argv) { Poco::MD5Engine md5; Poco::DigestOutputStream ds(md5); ds << "abcdefghijklmnopqrstuvwxyz"; 0 码力 | 609 页 | 4.88 MB | 1 年前3
Conan 1.26 Documentationcompiler versions, etc) for any number of different versions of a package, using exactly the same process in all platforms. As it is decentralized, it is easy to run your own server to host your own packages TO CONAN REPOSITORY FOLDER sys.path.append(conan_repo_path) from conans.client.command import main main(sys.argv[1:]) Test your conan script. 2.4. Install the binaries 9 Conan Documentation, Release Listing 1: md5.cpp #include "Poco/MD5Engine.h" #include "Poco/DigestStream.h" #includeint main(int argc, char** argv) { Poco::MD5Engine md5; Poco::DigestOutputStream ds(md5); ds << "abcdefghijklmnopqrstuvwxyz"; 0 码力 | 669 页 | 5.51 MB | 1 年前3
共 327 条
- 1
- 2
- 3
- 4
- 5
- 6
- 33
相关搜索词













