/external/python/pybind11/ |
D | CMakeLists.txt | 1 # CMakeLists.txt -- Build system for the pybind11 modules 6 # BSD-style license that can be found in the LICENSE file. 20 file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/include/pybind11/detail/common.h" 29 if(PYBIND11_VERSION_PATCH MATCHES [[\.([a-zA-Z0-9]+)$]]) 32 string(REGEX MATCH "^[0-9]+" PYBIND11_VERSION_PATCH "${PYBIND11_VERSION_PATCH}") 35 pybind11 project 45 message(STATUS "pybind11 v${pybind11_VERSION} ${pybind11_VERSION_TYPE}") 48 # Avoid infinite recursion if tests include this as a subdirectory 53 # Check if pybind11 is being used directly or via add_subdirectory 55 ### Warn if not an out-of-source builds [all …]
|
D | setup.cfg | 3 long_description_content_type = text/x-rst 7 url = https://github.com/pybind/pybind11 11 Development Status :: 5 - Production/Stable 40 [check-manifest] 42 tests/** 47 pybind11/include/** 48 pybind11/share/** 53 max-line-length = 99 65 files = pybind11 69 # Currently (0.800) identical to --strict
|
/external/python/pybind11/.github/ |
D | CONTRIBUTING.md | 8 provided at [pybind11.readthedocs.org][] or in the [issue tracker][]. You can 12 question, it's essential that you submit a self-contained and minimal piece of 28 * Add tests for any new functionality and run the test suite (`cmake --build 29 build --target pytest`) to ensure that no existing features break. 30 * Please run [`pre-commit`][pre-commit] to check your code matches the 31 project style. (Note that `gawk` is required.) Use `pre-commit run 32 --all-files` before committing (or use installed-mode, check pre-commit docs) 39 pybind11 is provided under a BSD-style license that can be found in the 48 hereby grant the following license: a non-exclusive, royalty-free perpetual 54 ## Development of pybind11 [all …]
|
/external/python/pybind11/docs/ |
D | limitations.rst | 7 pybind11 strives to be a general solution to binding generation, but it also has 10 - pybind11 casts away ``const``-ness in function arguments and return values. 15 - The NumPy interface ``pybind11::array`` greatly simplifies accessing 16 numerical data from C++ (and vice versa), but it's not a full-blown array 18 directly supported, however, with ``pybind11/eigen.h``. 20 Large but useful features could be implemented in pybind11 but would lead to a 21 significant increase in complexity. Pybind11 strives to be simple and compact. 23 pybind11; see `pybind11_json <https://github.com/pybind/pybind11_json>`_ for an 34 - Intel 20.2 is currently having an issue with the test suite. 35 `#2573 <https://github.com/pybind/pybind11/pull/2573>`_ [all …]
|
D | basics.rst | 6 This sections demonstrates the basic features of pybind11. Before getting 15 ----------- 17 On Linux you'll need to install the **python-dev** or **python3-dev** packages as 23 .. code-block:: bash 28 make check -j 4 30 The last line will both compile and run the tests. 33 ------- 35 On Windows, only **Visual Studio 2015** and newer are supported since pybind11 relies 40 To use the C++17 in Visual Studio 2017 (MSVC 14.1), pybind11 requires the flag 41 ``/permissive-`` to be passed to the compiler `to enforce standard conformance`_. When [all …]
|
D | compiling.rst | 6 .. _build-setuptools: 18 A helper file is provided with pybind11 that can simplify usage with setuptools. 20 To use pybind11 inside your ``setup.py``, you have to have some system to 21 ensure that ``pybind11`` is installed when you build your package. There are 22 four possible ways to do this, and pybind11 supports all four: You can ask all 23 users to install pybind11 beforehand (bad), you can use 24 :ref:`setup_helpers-pep518` (good, but very new and requires Pip 10), 25 :ref:`setup_helpers-setup_requires` (discouraged by Python packagers now that 27 :ref:`setup_helpers-copy-manually` (always works but you have to manually sync 30 An example of a ``setup.py`` using pybind11's helpers: [all …]
|
/external/python/pybind11/docs/advanced/cast/ |
D | stl.rst | 7 When including the additional header file :file:`pybind11/stl.h`, conversions 13 :file:`pybind11/pybind11.h` header. 16 converted (i.e. copied) on every Python->C++ and C++->Python transition, which 26 The file :file:`tests/test_stl.cpp` contains a complete 34 The :file:`pybind11/stl.h` header also includes support for ``std::optional<>`` 39 pybind11 provides an easy way to specialize the ``type_caster`` for such 42 .. code-block:: cpp 44 // `boost::optional` as an example -- can be any `std::optional`-like container 45 namespace pybind11 { namespace detail { 54 .. code-block:: cpp [all …]
|
D | functional.rst | 4 The following features must be enabled by including :file:`pybind11/functional.h`. 19 (stateful or stateless) with signature ``int -> int`` as an argument and runs 22 .. code-block:: cpp 28 The example below is more involved: it takes a function of signature ``int -> int`` 33 .. code-block:: cpp 45 .. code-block:: cpp 52 After including the extra header file :file:`pybind11/functional.h`, it is almost 55 .. code-block:: cpp 57 #include <pybind11/functional.h> 67 .. code-block:: pycon [all …]
|
D | eigen.rst | 4 `Eigen <http://eigen.tuxfamily.org>`_ is C++ header-based library for dense and 5 sparse linear algebra. Due to its popularity and widespread adoption, pybind11 9 To enable the built-in Eigen support you must include the optional header file 10 :file:`pybind11/eigen.h`. 12 Pass-by-value 16 example, ``Eigen::MatrixXd``), pybind11 will accept any input value that is 24 Pass-by-reference 29 binding functions that change their (Matrix) arguments. Pybind11 allows you to 35 type, pybind11 will attempt to avoid copying by using an ``Eigen::Map`` object 45 because the storage is incompatible), pybind11 makes a temporary copy and [all …]
|
/external/python/pybind11/.github/workflows/ |
D | ci.yml | 8 - master 9 - stable 10 - v* 13 # This is the "main" test suite, which tests a large number of different 17 fail-fast: false 19 runs-on: [ubuntu-latest, windows-latest, macos-latest] 21 - 2.7 22 - 3.5 23 - 3.6 24 - 3.9 [all …]
|
/external/python/pybind11/tests/extra_python_package/ |
D | test_files.py | 1 # -*- coding: utf-8 -*- 10 # These tests must be run explicitly 11 # They require CMake 3.15+ (--install) 18 "include/pybind11/attr.h", 19 "include/pybind11/buffer_info.h", 20 "include/pybind11/cast.h", 21 "include/pybind11/chrono.h", 22 "include/pybind11/common.h", 23 "include/pybind11/complex.h", 24 "include/pybind11/eigen.h", [all …]
|
/external/python/pybind11/tests/ |
D | pybind11_tests.h | 2 #include <pybind11/pybind11.h> 3 #include <pybind11/eval.h> 10 namespace py = pybind11; 11 using namespace pybind11::literals; 27 /// Dummy type which is not exported anywhere -- something to trigger a conversion error 30 /// A user-defined type which is exported and can be used by any test 40 int i = -1; 43 /// Like UserType, but increments `value` on copy for quick reference vs. copy tests 60 /// Custom cast-only type that casts to a string "rvalue" or "lvalue" depending on the cast context. 63 PYBIND11_NAMESPACE_BEGIN(pybind11) [all …]
|
D | cross_module_gil_utils.cpp | 2 tests/cross_module_gil_utils.cpp -- tools for acquiring GIL from a different module 7 BSD-style license that can be found in the LICENSE file. 9 #include <pybind11/pybind11.h> 12 // This file mimics a DSO that makes pybind11 calls but does not define a 14 // py::gil_scoped_acquire when the running thread is in a GIL-released state. 18 // shared logic used internally by multiple pybind11 modules. 22 namespace py = pybind11;
|
D | test_copy_move.cpp | 2 tests/test_copy_move_policies.cpp -- 'copy' and 'move' return value policies 3 and related tests 8 BSD-style license that can be found in the LICENSE file. 13 #include <pybind11/stl.h> 71 PYBIND11_NAMESPACE_BEGIN(pybind11) 76 …static handle cast(const MoveOnlyInt &m, return_value_policy r, handle p) { return pybind11::cast(… in cast() 82 …static handle cast(const MoveOrCopyInt &m, return_value_policy r, handle p) { return pybind11::cas… in cast() 91 …static handle cast(const CopyOnlyInt &m, return_value_policy r, handle p) { return pybind11::cast(… in cast() 98 template <typename T> using cast_op_type = pybind11::detail::cast_op_type<T>; 101 PYBIND11_NAMESPACE_END(pybind11) in PYBIND11_NAMESPACE_END() argument [all …]
|
D | pybind11_cross_module_tests.cpp | 2 tests/pybind11_cross_module_tests.cpp -- contains tests that require multiple modules 7 BSD-style license that can be found in the LICENSE file. 12 #include <pybind11/stl_bind.h> 16 m.doc() = "pybind11 cross-module test module"; in PYBIND11_MODULE() 18 // test_local_bindings.py tests: in PYBIND11_MODULE() 30 m.def("throw_pybind_value_error", []() { throw py::value_error("pybind11 value error"); }); in PYBIND11_MODULE() 31 m.def("throw_pybind_type_error", []() { throw py::type_error("pybind11 type error"); }); in PYBIND11_MODULE()
|
D | CMakeLists.txt | 1 # CMakeLists.txt -- Build system for the pybind11 test suite 6 # BSD-style license that can be found in the LICENSE file. 32 if(_FILE_FOUND GREATER -1) 64 option(PYBIND11_CUDA_TESTS "Enable building CUDA tests (requires CMake 3.12+)" OFF) 67 CACHE STRING "Tests from ;-separated list of *.cpp files will be built instead of all tests") 70 CACHE STRING "Tests from ;-separated list of *.cpp files will be removed from all tests") 75 find_package(pybind11 REQUIRED CONFIG) 79 message(STATUS "Setting tests build type to MinSizeRel as none was specified") 136 # cmake -DPYBIND11_TEST_OVERRIDE="test_callbacks.cpp;test_pickling.cpp" .. 137 # lets you override the tests that get compiled and run. You can restore to all tests with: [all …]
|
D | test_custom_type_casters.cpp | 2 tests/test_custom_type_casters.cpp -- tests type_caster<T> 7 BSD-style license that can be found in the LICENSE file. 18 namespace pybind11 { namespace detail { namespace 62 } // namespace pybind11 74 namespace pybind11 { namespace detail { namespace 84 } // namespace pybind11 91 // Test converting. The ArgAlwaysConverts is just there to make the first no-conversion pass in TEST_SUBMODULE() 98 return a.arg + "\n" + b.arg + "\n" + std::to_string(c) + "\n" + d->arg; in TEST_SUBMODULE() 125 …m.def("custom_caster_destroy_const", []() -> const DestructionTester * { return new DestructionTes… in TEST_SUBMODULE()
|
D | pybind11_tests.cpp | 2 tests/pybind11_tests.cpp -- pybind example plugin 7 BSD-style license that can be found in the LICENSE file. 21 It is NOT recommended as a way to use pybind11 in practice, however: the initialization order will 23 individual pybind11 test .cpp files), but most likely not what you want when using pybind11 66 m.doc() = "pybind11 test module"; in PYBIND11_MODULE()
|
/external/tensorflow/tensorflow/compiler/xla/python/ |
D | pytree.h | 7 http://www.apache.org/licenses/LICENSE-2.0 33 #include "pybind11/pybind11.h" 34 #include "pybind11/pytypes.h" 35 #include "pybind11/stl.h" 44 pybind11::object type; 45 // A function with signature: object -> (iterable, aux_data) 46 pybind11::function to_iterable; 47 // A function with signature: (aux_data, iterable) -> object 48 pybind11::function from_iterable; 53 static void Register(pybind11::object type, pybind11::function to_iterable, [all …]
|
D | py_client.h | 7 http://www.apache.org/licenses/LICENSE-2.0 24 #include "pybind11/pybind11.h" 43 // writing tests. 45 // To maintain PyClient references, we define pybind11 holder classes that 47 // pybind11 has a `keep_alive` feature that has a similar goal, but it doesn't 58 // pybind11 requires that we define a constructor that takes a raw pointer, 73 T* operator->() const { return contents; } 88 // We use a wrapper class to add Python-specific functionality. 98 return pjrt_client_->platform_name(); in platform_name() 101 return pjrt_client_->addressable_device_count(); in addressable_device_count() [all …]
|
/external/python/pybind11/docs/advanced/ |
D | classes.rst | 17 .. code-block:: cpp 38 .. code-block:: cpp 41 return animal->go(3); 46 .. code-block:: cpp 65 .. code-block:: cpp 87 take a string-valued name argument between the *Parent class* and *Name of the 94 .. code-block:: cpp 95 :emphasize-lines: 2,3 98 py::class_<Animal, PyAnimal /* <--- trampoline*/>(m, "Animal") 108 Importantly, pybind11 is made aware of the trampoline helper class by [all …]
|
D | smart_ptrs.rst | 10 .. code-block:: cpp 14 .. code-block:: cpp 21 by pybind11. 23 .. code-block:: cpp 44 .. code-block:: cpp 46 py::class_<Example, std::shared_ptr<Example> /* <- holder type */> obj(m, "Example"); 54 .. code-block:: cpp 77 .. code-block:: python 85 pybind11 will create a second independent ``std::shared_ptr<...>`` that also 97 .. code-block:: cpp [all …]
|
/external/llvm-project/mlir/ |
D | CMakeLists.txt | 15 check_c_compiler_flag("-Werror=implicit-function-declaration" C_SUPPORTS_WERROR_IMPLICIT_FUNCTION_D… 16 append_if(C_SUPPORTS_WERROR_IMPLICIT_FUNCTION_DECLARATION "-Werror=implicit-function-declaration" C… 20 # mlir-generic-headers are dialect-independent. 21 add_custom_target(mlir-generic-headers) 22 set_target_properties(mlir-generic-headers PROPERTIES FOLDER "Misc") 23 # mlir-headers may be dialect-dependent. 24 add_custom_target(mlir-headers) 25 set_target_properties(mlir-headers PROPERTIES FOLDER "Misc") 26 add_dependencies(mlir-headers mlir-generic-headers) 27 add_custom_target(mlir-doc) [all …]
|
/external/tensorflow/tensorflow/python/util/ |
D | BUILD | 5 # buildifier: disable=same-origin-load 8 # buildifier: disable=same-origin-load 11 # buildifier: disable=same-origin-load 14 # buildifier: disable=same-origin-load 75 "@pybind11", 88 "@pybind11", 100 "@pybind11", 131 "@pybind11", 145 "@pybind11", 156 "@pybind11", [all …]
|
/external/libkmsxx/ |
D | meson_options.txt | 4 option('static-libc', type : 'boolean', value : false, 5 description : 'Build with -static-libgcc -static-libstdc++') 11 description : 'Build an assortment of kms++ utils and tests') 16 option('system-pybind11', type : 'feature', value : 'auto', 17 description : 'Use pybind11 from the system or from meson subproject')
|