Classes | Macros | Enumerations | Functions | Variables
operators.h File Reference
#include "pybind11.h"
Include dependency graph for operators.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  op_< id, ot, L, R >
 Operator implementation generator. More...
 
struct  op_impl< op_id, op_type, B, L, R >
 base template of operator implementations More...
 
struct  self_t
 
struct  undefined_t
 Type for an unused type slot. More...
 

Macros

#define PYBIND11_BINARY_OPERATOR(id, rid, op, expr)
 
#define PYBIND11_INPLACE_OPERATOR(id, op, expr)
 
#define PYBIND11_UNARY_OPERATOR(id, op, expr)
 

Enumerations

enum  op_id : int {
  op_add, op_sub, op_mul, op_div,
  op_mod, op_divmod, op_pow, op_lshift,
  op_rshift, op_and, op_xor, op_or,
  op_neg, op_pos, op_abs, op_invert,
  op_int, op_long, op_float, op_str,
  op_cmp, op_gt, op_ge, op_lt,
  op_le, op_eq, op_ne, op_iadd,
  op_isub, op_imul, op_idiv, op_imod,
  op_ilshift, op_irshift, op_iand, op_ixor,
  op_ior, op_complex, op_bool, op_nonzero,
  op_repr, op_truediv, op_itruediv, op_hash
}
 Enumeration with all supported operator types. More...
 
enum  op_type : int { op_l, op_r, op_u }
 

Functions

self_t __self ()
 Don't warn about an unused variable. More...
 

Variables

static const self_t self = self_t()
 

Macro Definition Documentation

◆ PYBIND11_BINARY_OPERATOR

#define PYBIND11_BINARY_OPERATOR (   id,
  rid,
  op,
  expr 
)
Value:
template <typename B, typename L, typename R> \
static char const *name() { return "__" #id "__"; } \
static auto execute(const L &l, const R &r) -> decltype(expr) { return (expr); } \
static B execute_cast(const L &l, const R &r) { return B(expr); } \
}; \
template <typename B, typename L, typename R> \
static char const *name() { return "__" #rid "__"; } \
static auto execute(const R &r, const L &l) -> decltype(expr) { return (expr); } \
static B execute_cast(const R &r, const L &l) { return B(expr); } \
}; \
inline op_<op_##id, op_l, self_t, self_t> op(const self_t &, const self_t &) { \
} \
template <typename T> \
op_<op_##id, op_l, self_t, T> op(const self_t &, const T &) { \
} \
template <typename T> \
op_<op_##id, op_r, T, self_t> op(const T &, const self_t &) { \
}
Matrix< SCALARB, Dynamic, Dynamic, opt_B > B
Definition: bench_gemm.cpp:49
Operator implementation generator.
Definition: attr.h:171
Rot2 R(Rot2::fromAngle(0.1))
MatrixXd L
Definition: LLT_example.cpp:6
static const Line3 l(Rot3(), 1, 1)
base template of operator implementations
Definition: operators.h:82

Definition at line 105 of file operators.h.

◆ PYBIND11_INPLACE_OPERATOR

#define PYBIND11_INPLACE_OPERATOR (   id,
  op,
  expr 
)
Value:
template <typename B, typename L, typename R> \
static char const *name() { return "__" #id "__"; } \
static auto execute(L &l, const R &r) -> decltype(expr) { return expr; } \
static B execute_cast(L &l, const R &r) { return B(expr); } \
}; \
template <typename T> \
op_<op_##id, op_l, self_t, T> op(const self_t &, const T &) { \
}
Matrix< SCALARB, Dynamic, Dynamic, opt_B > B
Definition: bench_gemm.cpp:49
Operator implementation generator.
Definition: attr.h:171
Rot2 R(Rot2::fromAngle(0.1))
MatrixXd L
Definition: LLT_example.cpp:6
static const Line3 l(Rot3(), 1, 1)
base template of operator implementations
Definition: operators.h:82

Definition at line 130 of file operators.h.

◆ PYBIND11_UNARY_OPERATOR

#define PYBIND11_UNARY_OPERATOR (   id,
  op,
  expr 
)
Value:
template <typename B, typename L> \
static char const *name() { return "__" #id "__"; } \
static auto execute(const L &l) -> decltype(expr) { return expr; } \
static B execute_cast(const L &l) { return B(expr); } \
}; \
}
Matrix< SCALARB, Dynamic, Dynamic, opt_B > B
Definition: bench_gemm.cpp:49
Operator implementation generator.
Definition: attr.h:171
MatrixXd L
Definition: LLT_example.cpp:6
static const Line3 l(Rot3(), 1, 1)
base template of operator implementations
Definition: operators.h:82

Definition at line 142 of file operators.h.

Enumeration Type Documentation

◆ op_id

enum op_id : int

Enumeration with all supported operator types.

Enumerator
op_add 
op_sub 
op_mul 
op_div 
op_mod 
op_divmod 
op_pow 
op_lshift 
op_rshift 
op_and 
op_xor 
op_or 
op_neg 
op_pos 
op_abs 
op_invert 
op_int 
op_long 
op_float 
op_str 
op_cmp 
op_gt 
op_ge 
op_lt 
op_le 
op_eq 
op_ne 
op_iadd 
op_isub 
op_imul 
op_idiv 
op_imod 
op_ilshift 
op_irshift 
op_iand 
op_ixor 
op_ior 
op_complex 
op_bool 
op_nonzero 
op_repr 
op_truediv 
op_itruediv 
op_hash 

Definition at line 18 of file operators.h.

◆ op_type

enum op_type : int
Enumerator
op_l 
op_r 
op_u 

Definition at line 65 of file operators.h.

Function Documentation

◆ __self()

self_t __self ( )
inline

Don't warn about an unused variable.

Definition at line 78 of file operators.h.

Variable Documentation

◆ self

const self_t self = self_t()
static

Definition at line 72 of file operators.h.



gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:40:51