Hidden Overhead of a Function APIperformance, we typically think about the function logic. We’ll see that a well designed function API can have an even larger impact.How will we compare performance? ● Benchmarks at this low level are advance(RandIter& iter, Diff n, random_access_iterator_tag) { iter += n; } ● Access token to make some API available only inside the library (like the default “package private” access modifier in Java) Empty0 码力 | 158 页 | 2.46 MB | 6 月前3
GraphBLAS: Building a C++ Matrix API for Graph Algorithmsthe important data structures and concepts? Prior work in the GraphBLAS community, C API Overview of our draft C++ API How might this interoperate with standard C++, graph library proposal? 4[DISTRIBUTION the important data structures and concepts? Prior work in the GraphBLAS community, C API Overview of our draft C++ API How might this interoperate with standard C++, graph library proposal? 5[DISTRIBUTION the important data structures and concepts? Prior work in the GraphBLAS community, C API Overview of our draft C++ API How might this interoperate with standard C++, graph library proposal? 6[DISTRIBUTION0 码力 | 172 页 | 7.40 MB | 6 月前3
Dependency Injection in C++TestCalcEngine TestCalcEngine MOCK_METHOD(bool, execute, (...), (override)); MOCK_METHOD(bool, apply, (...), (override)); MOCK_METHOD(bool, calculate, (), (override)); MOCK_METHOD(bool, apply, (...), (override));Create calculate(const Data& rdata); }; struct TestCalcEngine { TestCalcEngine(); MOCK_METHOD(bool, apply, (const Data&)); MOCK_METHOD(bool, calculate, (const Data&)); }; Injection DependencytemplateMOCK_METHOD(bool, apply, (const Data&)); MOCK_METHOD(bool, calculate, (const Data&)); }; template concept CalcEngineT 0 码力 | 106 页 | 1.76 MB | 6 月前3
Retiring the Singleton Patterndaunting so it's easier to have a global grab bag • Other user groups using a long established API in legacy codebase are unwilling to change their function calls • Efficiency, I only create one std::endl; // Further validation of rec values ... }class MockClient : public CommWrapper { public: MOCK_METHOD1(send, Response(const Request&)); }; Bloomberg 20 TEST(XTest, sendData) { MockClient a_client; }; struct Service { static CommWrapper comm_; }; Bloomberg 23 Modern C++struct MockClient { MOCK_METHOD1(send, Response(Request)); Response operator()(Request req) { return send(std::move(req));0 码力 | 70 页 | 1.59 MB | 6 月前3
Leveraging a Functional Approach for More Testable and Maintainable ROS 2 Codepath_generator_service_; }; ● PathGenerator inherits from rclcpp::Node making it inextricably linked to the ROS 2 API ● set_map_service and generate_path_service are callback functions that run when requests are sent path_generator_service_; }; ● PathGenerator inherits from rclcpp::Node making it inextricably linked to the ROS 2 API ● set_map_service and generate_path_service are callback functions that run when requests are sent path_generator_service_; }; ● PathGenerator inherits from rclcpp::Node making it inextricably linked to the ROS 2 API ● set_map_service and generate_path_service are callback functions that run when requests are sent0 码力 | 200 页 | 1.77 MB | 6 月前3
Building Effective Embedded Systems: Architectural Best Practices(Try to mock as little as possible)How Hardware tests should look like Init Write Read ComparePrepare dataInitWriteReadCompareHighly Effective: ⊡ Testing customer interfaces ⊡ Exemplary API usageHighly usageHighly Effective: ⊡ Testing customer interfaces ⊡ Exemplary API usageHighly Effective: ⊡ Testing customer interfaces ⊡ Exemplary API usageMotivation for layer separation: ⊡ Simplifies testing ⊡ Promotes0 码力 | 241 页 | 2.28 MB | 6 月前3
Back To Basics Debugging and Testingconnection attempt is made. Then error code ETOOMANY is returned.UNIT TESTS Test a module in isolation. ‘Mock’ interfaces to other modules / system. Bugs are generally shallow / easy-to-fix. Tests run fast #includeclass MockFS : public FS { public: MOCK_METHOD(int, read, (int fd, void*buf, size_t len), (override)); MOCK_METHOD(int, write, (int fd, const void *buf, size_t len), (override)); 0 码力 | 50 页 | 2.04 MB | 6 月前3
Changing Legacy Code: With Confidencereading • Ability to add diagnostics • Reduce locations where variable is changed • Ability to mock or override reads/writes • Prevent proliferation to other files void SetNextWindow(Window nextWindow); cppAnd what does this gain us? • Single path for external and internal callers • Dogfooding public API • Changes to logic occur in one location • Ability to override for testing void VHFDevice::NewPacketCallback0 码力 | 114 页 | 982.54 KB | 6 月前3
Scientific Unit Testingunder test fails, and for no other reason" -- Titus Winters 28Option 1: Isolation Unit Testing: Mock the external thing Create the external thing as part of the test (forking a process to open a socket)0 码力 | 45 页 | 1.91 MB | 6 月前3
Conan 2.0 Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.3 New public Python API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.4 New build multiple auth protocols (LDAP), Virtual and Remote repositories to create advanced topologies, a Rest API, and generic repositories to host any artifact. • The conan_server is a small server distributed together reference is the source of truth for the interfaces of every public command, class, method, helper, API and configuration file that can be used. It is not designed to be read fully, but to check for individual0 码力 | 652 页 | 4.00 MB | 1 年前3
共 188 条
- 1
- 2
- 3
- 4
- 5
- 6
- 19
相关搜索词
HiddenOverheadofFunctionAPIGraphBLASBuildingC++MatrixforGraphAlgorithmsDependencyInjectioninRetiringtheSingletonPatternLeveragingFunctionalApproachMoreTestableandMaintainableROSCodeEffectiveEmbeddedSystemsArchitecturalBestPracticesBackToBasicsDebuggingTestingChangingLegacyWithConfidenceScientificUnitConan2.0Documentation













