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 g) { iter += n; } ● Access token to make some API available only inside the library (like the default “package private” access modifier in Java) Empty parameter : use cases 118Empty parameter :0 码力 | 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
The Roles of Symmetry And Orthogonality In DesignExamples: • C++ Language Specification (Is all about “Guarantees”) • System/Subsystem Design (Defines API boundaries and behavior) • Implementation details (e.g., “lock-free” and “wait-free” algorithms provide Examples: • C++ Language Specification (Is all about “Guarantees”) • System/Subsystem Design (Defines API boundaries and behavior) • Implementation details (e.g., “lock-free” and “wait-free” algorithms provide adaptive behavior may invoke novel execution paths • Examples: • Prefer generalized solution, but plugin API allows for custom processing (such as hardware offloading) • Prefer default configuration, but permit0 码力 | 151 页 | 3.20 MB | 6 月前3
Reflection Based Libraries to Look Forward Toabstractions, and clean APIs Why me 4What is reflection Reflection in other languages (Go, Python, Java) Reflection in C++ as per P2996 Syntax and examples Reflection libraries! Python bindings ABI ion 16Java 17Surprisingly, quite similar in feel to Python and Go. Reflection is “runtime”, in the sense that the object type saves type information accessible at program runtime. java.lang.reflect reflect Reflecting Java 18Reflecting Java // Surprising, lookup types with string! Class cls = Class.forName("method1"); Method methlist[] = cls.getDeclaredMethods(); for (int i = 0; i < methlist.length;0 码力 | 118 页 | 14.33 MB | 6 月前3
Dynamically Loaded Libraries Outside the Standardmodules) – LoadModule directive • C extension for CPython (.pyd on Windows) – import module_name • Java Native Interface (JNI) – System.loadLibrary(name) Customized file formats for dynamic loading9 CppCon • pybind11: You write C++ code that sets up the module in Python • JNA (Java Native Access): You declare C functions using Java grammar • pydffi (DragonFFI for Python): You declare C or C++ functions PLUGINAPP_API LPPLUGINSTRUCT plugin_app_create_plugin(void); PLUGINAPP_API void plugin_app_destroy_plugin(LPPLUGINSTRUCT); PLUGINAPP_API const gchar* plugin_app_get_plugin_name(void); PLUGINAPP_API const0 码力 | 100 页 | 3.98 MB | 6 月前3
C++高性能并行编程与优化 - 课件 - 17 由浅入深学习 map 容器小彭老师说“我在拉答辩。”那么同学认为这个答辩指的是答辩(物理),小彭老师在上厕所。 而不会认为小彭老师在制作三体动画。 • 所以这位同学是人类思维,相当于 Python 的精分 API 。而如果另一个同学是硬核的计算 机思维,相当于 C++ 的一视同仁 API ,他会以为小彭老师真的在吃答辩。 • 这是通常来说,不过万一小彭老师真的这么重口味在吃答辩呢?要怎么传达这个信息? C++ 一视同仁的接口就能处理这种罕见的情况,不过 自动创建零值,而是能抛出异常的 at 函数。 C++ 和 Python 用法对比 C++ 和 Python 用法对比(运算符重载展开成普通函数后) 简单粗暴的 Java 用法 • 与 Python 和 C++ 不同, Java 放弃了花里胡哨的运算符重载,索性都采用成员函数 get put 来表示,非常明确。主要是为了把 get 和 put 作为接口函数,可以对应多个具体 实现。 错误示范0 码力 | 90 页 | 8.76 MB | 1 年前3
《深入浅出MFC》2/e框架十分了解,但在编程过程中仍然 感到生疏,主要是函数的运用和函数的参数十分复杂。我对WINDOWS SDK 编程较少,是 否应该要熟悉WINDOWS API 函数后,结合MFC 框架编程? 侯俊杰回复:的确如此。MFC 其实就是把Windows API 做了一层薄薄包装,包装于各个设 计良好的classes 而已。所以,掌握了MFC framework 架构组织之后,接下来在programming 第二版。本以为这么大一本书,一定很难K,但从第一眼开始我 就深深的被其中优雅且适当的文辞所吸引。尤其当阅读第三章时,那些表格让我回忆起以前 修过advanced compiler 去trace java compiler 的那段过程,不禁发出会心一笑。 由于我本身学的是电机,所以不同于一般信息人员所着重的应用层面。从大二时因为想充实 自己的计算机实力,努力学写程序开始,就在浩翰的书海中发现你独特的风格。尤其现今电书 與 MFC / 327 縱覽 MFC / 329 General Purpose classes / 330 Windows API classes / 333 深入淺出 MFC 18 Application framework classes / 334 High level0 码力 | 1009 页 | 11.08 MB | 1 年前3
Conan 1.4 DocumentationDocumentation, Release 1.4.5 Let’s suppose that both are being compiled as static libraries, and that the API exposed by MyOtherLib to MyLib/1.0 through the public headers has not changed at all. Then, it is not the final consumer will link against both Mylib/1.0 and MyOtherLib/2.1. It could happen that the API exposed by MyOtherLib in public headers has changed, but without affecting the MyLib/ 1.0 binary, for assumes semver compatibility, i.e, if a version changes from minor 2.0 to 2.1 conan will assume that the API is compatible (headers not changing), and that it is not necessary to build a new binary for it. Exactly0 码力 | 421 页 | 2.84 MB | 1 年前3
Conan 1.5 DocumentationThe answer: It depends. Let’s suppose that both are being compiled as static libraries and that the API exposed by MyOtherLib to MyLib/1. 0 through the public headers has not changed at all. Then, it is will link against both Mylib/1.0 and MyOtherLib/2.1. On the other hand, it could happen that the API exposed by MyOtherLib in public headers has changed, but without affecting the MyLib/1.0 binary for semver compatibility. e.g., if a version changes from minor 2.0 to 2.1 Conan will assume that the API is compatible (headers not changing), and that it is not necessary to build a new binary for it. Exactly0 码力 | 422 页 | 2.85 MB | 1 年前3
Conan 1.6 DocumentationThe answer: It depends. Let’s suppose that both are being compiled as static libraries and that the API exposed by MyOtherLib to MyLib/1. 0 through the public headers has not changed at all. Then, it is will link against both Mylib/1.0 and MyOtherLib/2.1. On the other hand, it could happen that the API exposed by MyOtherLib in public headers has changed, but without affecting the MyLib/1.0 binary for semver compatibility. e.g., if a version changes from minor 2.0 to 2.1 Conan will assume that the API is compatible (headers not changing), and that it is not necessary to build a new binary for it. Exactly0 码力 | 428 页 | 2.87 MB | 1 年前3
共 211 条
- 1
- 2
- 3
- 4
- 5
- 6
- 22













