#include "pybind11.h"
#include "detail/common.h"
#include "complex.h"
#include "gil_safe_call_once.h"
#include "pytypes.h"
#include <algorithm>
#include <array>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <numeric>
#include <sstream>
#include <string>
#include <type_traits>
#include <typeindex>
#include <utility>
#include <vector>
Go to the source code of this file.
Typedefs | |
template<typename T > | |
using | is_pod = all_of< std::is_standard_layout< T >, std::is_trivial< T > > |
template<typename T > | |
using | is_pod_struct = all_of< std::is_standard_layout< T >, std::is_trivially_copyable< T >, satisfies_none_of< T, std::is_reference, std::is_array, is_std_array, std::is_arithmetic, is_complex, std::is_enum > > |
template<typename T > | |
using | remove_all_extents_t = typename array_info< T >::type |
Enumerations | |
enum | broadcast_trivial { broadcast_trivial::non_trivial, broadcast_trivial::c_trivial, broadcast_trivial::f_trivial } |
Functions | |
const PyArrayDescr1_Proxy * | array_descriptor1_proxy (const PyObject *ptr) |
const PyArrayDescr2_Proxy * | array_descriptor2_proxy (const PyObject *ptr) |
const PyArrayDescr_Proxy * | array_descriptor_proxy (const PyObject *ptr) |
PyArrayDescr_Proxy * | array_descriptor_proxy (PyObject *ptr) |
const PyArray_Proxy * | array_proxy (const void *ptr) |
PyArray_Proxy * | array_proxy (void *ptr) |
template<size_t N> | |
broadcast_trivial | broadcast (const std::array< buffer_info, N > &buffers, ssize_t &ndim, std::vector< ssize_t > &shape) |
template<ssize_t Dim = 0, typename Strides > | |
ssize_t | byte_offset_unsafe (const Strides &) |
template<ssize_t Dim = 0, typename Strides , typename... Ix> | |
ssize_t | byte_offset_unsafe (const Strides &strides, ssize_t i, Ix... index) |
bool | check_flags (const void *ptr, int flag) |
numpy_internals & | get_numpy_internals () |
PYBIND11_NOINLINE module_ | import_numpy_core_submodule (const char *submodule_name) |
PYBIND11_NOINLINE void | load_numpy_internals (numpy_internals *&ptr) |
template<typename Concrete > | |
constexpr int | platform_lookup () |
template<typename Concrete , typename T , typename... Ts, typename... Ints> | |
constexpr int | platform_lookup (int I, Ints... Is) |
PYBIND11_NOINLINE void | register_structured_dtype (any_container< field_descriptor > fields, const std::type_info &tinfo, ssize_t itemsize, bool(*direct_converter)(PyObject *, void *&)) |
template<typename Func , detail::enable_if_t< detail::is_lambda< Func >::value, int > = 0> | |
auto | vectorize (Func &&f) -> decltype(detail::vectorize_extractor(std::forward< Func >(f),(detail::function_signature_t< Func > *) nullptr)) |
template<typename Return , typename... Args> | |
detail::vectorize_helper< Return(*)(Args...), Return, Args... > | vectorize (Return(*f)(Args...)) |
template<typename Return , typename Class , typename... Args, typename Helper = detail::vectorize_helper< decltype(std::mem_fn(std::declval<Return (Class::*)(Args...)>())), Return, Class *, Args...>> | |
Helper | vectorize (Return(Class::*f)(Args...)) |
template<typename Func , typename Return , typename... Args> | |
vectorize_helper< Func, Return, Args... > | vectorize_extractor (const Func &f, Return(*)(Args...)) |
#define PYBIND11_DECL_CHAR_FMT |
#define PYBIND11_EVAL | ( | ... | ) | PYBIND11_EVAL4(PYBIND11_EVAL4(PYBIND11_EVAL4(__VA_ARGS__))) |
#define PYBIND11_EVAL1 | ( | ... | ) | PYBIND11_EVAL0(PYBIND11_EVAL0(PYBIND11_EVAL0(__VA_ARGS__))) |
#define PYBIND11_EVAL2 | ( | ... | ) | PYBIND11_EVAL1(PYBIND11_EVAL1(PYBIND11_EVAL1(__VA_ARGS__))) |
#define PYBIND11_EVAL3 | ( | ... | ) | PYBIND11_EVAL2(PYBIND11_EVAL2(PYBIND11_EVAL2(__VA_ARGS__))) |
#define PYBIND11_EVAL4 | ( | ... | ) | PYBIND11_EVAL3(PYBIND11_EVAL3(PYBIND11_EVAL3(__VA_ARGS__))) |
#define PYBIND11_FIELD_DESCRIPTOR | ( | T, | |
Field | |||
) | PYBIND11_FIELD_DESCRIPTOR_EX(T, Field, #Field) |
#define PYBIND11_FIELD_DESCRIPTOR_EX | ( | T, | |
Field, | |||
Name | |||
) |
#define PYBIND11_MAP2_LIST | ( | f, | |
t, | |||
... | |||
) | PYBIND11_EVAL(PYBIND11_MAP2_LIST1(f, t, __VA_ARGS__, (), 0)) |
#define PYBIND11_MAP2_LIST0 | ( | f, | |
t, | |||
x1, | |||
x2, | |||
peek, | |||
... | |||
) | f(t, x1, x2) PYBIND11_MAP2_LIST_NEXT(peek, PYBIND11_MAP2_LIST1)(f, t, peek, __VA_ARGS__) |
#define PYBIND11_MAP2_LIST1 | ( | f, | |
t, | |||
x1, | |||
x2, | |||
peek, | |||
... | |||
) | f(t, x1, x2) PYBIND11_MAP2_LIST_NEXT(peek, PYBIND11_MAP2_LIST0)(f, t, peek, __VA_ARGS__) |
#define PYBIND11_MAP2_LIST_NEXT | ( | test, | |
next | |||
) | PYBIND11_MAP2_LIST_NEXT1(PYBIND11_MAP_GET_END test, next) |
#define PYBIND11_MAP2_LIST_NEXT1 | ( | test, | |
next | |||
) | PYBIND11_MAP_NEXT0(test, PYBIND11_MAP_COMMA next, 0) |
#define PYBIND11_MAP_GET_END | ( | ) | 0, PYBIND11_MAP_END |
#define PYBIND11_MAP_LIST | ( | f, | |
t, | |||
... | |||
) | PYBIND11_EVAL(PYBIND11_MAP_LIST1(f, t, __VA_ARGS__, (), 0)) |
#define PYBIND11_MAP_LIST0 | ( | f, | |
t, | |||
x, | |||
peek, | |||
... | |||
) | f(t, x) PYBIND11_MAP_LIST_NEXT(peek, PYBIND11_MAP_LIST1)(f, t, peek, __VA_ARGS__) |
#define PYBIND11_MAP_LIST1 | ( | f, | |
t, | |||
x, | |||
peek, | |||
... | |||
) | f(t, x) PYBIND11_MAP_LIST_NEXT(peek, PYBIND11_MAP_LIST0)(f, t, peek, __VA_ARGS__) |
#define PYBIND11_MAP_LIST_NEXT | ( | test, | |
next | |||
) | PYBIND11_MAP_LIST_NEXT1(PYBIND11_MAP_GET_END test, next) |
#define PYBIND11_MAP_LIST_NEXT1 | ( | test, | |
next | |||
) | PYBIND11_MAP_NEXT0(test, PYBIND11_MAP_COMMA next, 0) |
#define PYBIND11_MAP_NEXT | ( | test, | |
next | |||
) | PYBIND11_MAP_NEXT1(PYBIND11_MAP_GET_END test, next) |
#define PYBIND11_MAP_NEXT0 | ( | test, | |
next, | |||
... | |||
) | next PYBIND11_MAP_OUT |
#define PYBIND11_MAP_NEXT1 | ( | test, | |
next | |||
) | PYBIND11_MAP_NEXT0(test, next, 0) |
#define PYBIND11_NUMPY_DTYPE | ( | Type, | |
... | |||
) |
#define PYBIND11_NUMPY_DTYPE_EX | ( | Type, | |
... | |||
) |
using is_pod_struct = all_of<std::is_standard_layout<T>, std::is_trivially_copyable<T>, satisfies_none_of<T, std::is_reference, std::is_array, is_std_array, std::is_arithmetic, is_complex, std::is_enum> > |
using remove_all_extents_t = typename array_info<T>::type |
|
strong |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
broadcast_trivial broadcast | ( | const std::array< buffer_info, N > & | buffers, |
ssize_t & | ndim, | ||
std::vector< ssize_t > & | shape | ||
) |
ssize_t byte_offset_unsafe | ( | const Strides & | ) |
|
inline |
PYBIND11_NOINLINE module_ import_numpy_core_submodule | ( | const char * | submodule_name | ) |
PYBIND11_NOINLINE void load_numpy_internals | ( | numpy_internals *& | ptr | ) |
|
constexpr |
PYBIND11_NOINLINE void register_structured_dtype | ( | any_container< field_descriptor > | fields, |
const std::type_info & | tinfo, | ||
ssize_t | itemsize, | ||
bool(*)(PyObject *, void *&) | direct_converter | ||
) |
auto vectorize | ( | Func && | f | ) | -> decltype(detail::vectorize_extractor(std::forward<Func>(f), (detail::function_signature_t<Func> *) nullptr)) |
detail::vectorize_helper<Return (*)(Args...), Return, Args...> vectorize | ( | Return(*)(Args...) | f | ) |
Helper vectorize | ( | Return(Class::*)(Args...) | f | ) |
vectorize_helper<Func, Return, Args...> vectorize_extractor | ( | const Func & | f, |
Return(*)(Args...) | |||
) |