/external/python/cpython3/Include/internal/ |
D | pycore_abstract.h | 15 PyNumberMethods *tp_as_number = Py_TYPE(obj)->tp_as_number; in _PyIndex_Check() local 16 return (tp_as_number != NULL && tp_as_number->nb_index != NULL); in _PyIndex_Check()
|
/external/python/cpython3/Objects/ |
D | boolobject.c | 64 return PyLong_Type.tp_as_number->nb_and(a, b); in bool_and() 72 return PyLong_Type.tp_as_number->nb_or(a, b); in bool_or() 80 return PyLong_Type.tp_as_number->nb_xor(a, b); in bool_xor()
|
D | abstract.c | 822 return o && Py_TYPE(o)->tp_as_number && in PyNumber_Check() 823 (Py_TYPE(o)->tp_as_number->nb_index || in PyNumber_Check() 824 Py_TYPE(o)->tp_as_number->nb_int || in PyNumber_Check() 825 Py_TYPE(o)->tp_as_number->nb_float); in PyNumber_Check() 853 if (Py_TYPE(v)->tp_as_number != NULL) in binary_op1() 854 slotv = NB_BINOP(Py_TYPE(v)->tp_as_number, op_slot); in binary_op1() 856 Py_TYPE(w)->tp_as_number != NULL) { in binary_op1() 857 slotw = NB_BINOP(Py_TYPE(w)->tp_as_number, op_slot); in binary_op1() 942 mv = Py_TYPE(v)->tp_as_number; in ternary_op() 943 mw = Py_TYPE(w)->tp_as_number; in ternary_op() [all …]
|
D | typeobject.c | 2615 type->tp_as_number = &et->as_number; in type_new() 2993 type->tp_as_number = &res->as_number; in PyType_FromModuleAndSpec() 5193 #define COPYNUM(SLOT) COPYSLOT(tp_as_number->SLOT) in inherit_slots() 5201 if (type->tp_as_number != NULL && base->tp_as_number != NULL) { in inherit_slots() 5203 if (basebase->tp_as_number == NULL) in inherit_slots() 5570 if (type->tp_as_number == NULL) in PyType_Ready() 5571 type->tp_as_number = base->tp_as_number; in PyType_Ready() 6322 Py_TYPE(other)->tp_as_number != NULL && \ 6323 Py_TYPE(other)->tp_as_number->SLOTNAME == TESTFUNC; \ 6324 if (Py_TYPE(self)->tp_as_number != NULL && \ [all …]
|
D | complexobject.c | 961 nbr = Py_TYPE(r)->tp_as_number; in complex_new_impl() 973 nbi = Py_TYPE(i)->tp_as_number; in complex_new_impl()
|
D | floatobject.c | 248 nb = Py_TYPE(op)->tp_as_number; in PyFloat_AsDouble() 761 return PyComplex_Type.tp_as_number->nb_power(v, w, z); in float_pow() 1525 PyNumberMethods *long_methods = PyLong_Type.tp_as_number; in float_as_integer_ratio_impl()
|
D | object.c | 1402 else if (Py_TYPE(v)->tp_as_number != NULL && in PyObject_IsTrue() 1403 Py_TYPE(v)->tp_as_number->nb_bool != NULL) in PyObject_IsTrue() 1404 res = (*Py_TYPE(v)->tp_as_number->nb_bool)(v); in PyObject_IsTrue()
|
/external/python/cpython2/Objects/ |
D | boolobject.c | 73 return PyInt_Type.tp_as_number->nb_and(a, b); in bool_and() 82 return PyInt_Type.tp_as_number->nb_or(a, b); in bool_or() 91 return PyInt_Type.tp_as_number->nb_xor(a, b); in bool_xor()
|
D | intobject.c | 152 if (op == NULL || (nb = Py_TYPE(op)->tp_as_number) == NULL || in PyInt_AsLong() 224 if ((nb = Py_TYPE(op)->tp_as_number) == NULL || in PyInt_AsSsize_t() 273 if (op == NULL || (nb = Py_TYPE(op)->tp_as_number) == NULL || in PyInt_AsUnsignedLongMask() 318 if (op == NULL || (nb = Py_TYPE(op)->tp_as_number) == NULL || in PyInt_AsUnsignedLongLongMask() 478 return PyLong_Type.tp_as_number->nb_add((PyObject *)v, (PyObject *)w); in int_add() 491 return PyLong_Type.tp_as_number->nb_subtract((PyObject *)v, in int_sub() 556 return PyLong_Type.tp_as_number->nb_multiply(v, w); in int_mul() 629 return PyLong_Type.tp_as_number->nb_divide((PyObject *)x, in int_div() 650 return PyLong_Type.tp_as_number->nb_divide((PyObject *)x, in int_classic_div() 680 return PyLong_Type.tp_as_number->nb_true_divide( in int_true_divide() [all …]
|
D | abstract.c | 885 return o && o->ob_type->tp_as_number && 886 (o->ob_type->tp_as_number->nb_int || 887 o->ob_type->tp_as_number->nb_float); 929 if (v->ob_type->tp_as_number != NULL && NEW_STYLE_NUMBER(v)) 930 slotv = NB_BINOP(v->ob_type->tp_as_number, op_slot); 932 w->ob_type->tp_as_number != NULL && NEW_STYLE_NUMBER(w)) { 933 slotw = NB_BINOP(w->ob_type->tp_as_number, op_slot); 962 PyNumberMethods *mv = v->ob_type->tp_as_number; 1047 mv = v->ob_type->tp_as_number; 1048 mw = w->ob_type->tp_as_number; [all …]
|
D | object.c | 1581 else if (v->ob_type->tp_as_number != NULL && in PyObject_IsTrue() 1582 v->ob_type->tp_as_number->nb_nonzero != NULL) in PyObject_IsTrue() 1583 res = (*v->ob_type->tp_as_number->nb_nonzero)(v); in PyObject_IsTrue() 1631 if (v->ob_type->tp_as_number && v->ob_type->tp_as_number->nb_coerce) { in PyNumber_CoerceEx() 1632 res = (*v->ob_type->tp_as_number->nb_coerce)(pv, pw); in PyNumber_CoerceEx() 1636 if (w->ob_type->tp_as_number && w->ob_type->tp_as_number->nb_coerce) { in PyNumber_CoerceEx() 1637 res = (*w->ob_type->tp_as_number->nb_coerce)(pw, pv); in PyNumber_CoerceEx()
|
D | typeobject.c | 2364 (base->tp_as_number == NULL)) in type_new() 2368 type->tp_as_number = &et->as_number; in type_new() 3827 if ((!type->tp_as_number && base->tp_as_number) || 3830 if (!type->tp_as_number && !type->tp_as_sequence) { 3837 if (!type->tp_as_number && base->tp_as_number) { 3945 #define COPYNUM(SLOT) COPYSLOT(tp_as_number->SLOT) 3953 if (type->tp_as_number != NULL && base->tp_as_number != NULL) { 3955 if (basebase->tp_as_number == NULL) 4285 if (type->tp_as_number == NULL) 4286 type->tp_as_number = base->tp_as_number; [all …]
|
D | complexobject.c | 1186 nbr = r->ob_type->tp_as_number; in complex_new() 1188 nbi = i->ob_type->tp_as_number; in complex_new()
|
D | floatobject.c | 273 if ((nb = Py_TYPE(op)->tp_as_number) == NULL || nb->nb_float == NULL) { in PyFloat_AsDouble() 1721 PyNumberMethods *long_methods = PyLong_Type.tp_as_number; in float_as_integer_ratio()
|
/external/python/cpython2/Doc/includes/ |
D | typestruct.h | 17 PyNumberMethods *tp_as_number; member
|
/external/python/cpython3/Doc/includes/ |
D | typestruct.h | 18 PyNumberMethods *tp_as_number; member
|
/external/python/cpython2/Modules/ |
D | _randommodule.c | 237 n = PyInt_Type.tp_as_number->nb_absolute(arg); in random_seed() 240 n = PyLong_Type.tp_as_number->nb_absolute(arg); in random_seed()
|
/external/python/cpython2/Include/ |
D | abstract.h | 849 ((obj)->ob_type->tp_as_number != NULL && \ 851 (obj)->ob_type->tp_as_number->nb_index != NULL)
|
D | object.h | 340 PyNumberMethods *tp_as_number; member
|
/external/tensorflow/tensorflow/python/lib/core/ |
D | bfloat16.cc | 184 return PyArray_Type.tp_as_number->nb_add(a, b); in PyBfloat16_Add() 192 return PyArray_Type.tp_as_number->nb_subtract(a, b); in PyBfloat16_Subtract() 200 return PyArray_Type.tp_as_number->nb_multiply(a, b); in PyBfloat16_Multiply() 208 return PyArray_Type.tp_as_number->nb_true_divide(a, b); in PyBfloat16_TrueDivide()
|
/external/python/cpython3/Include/cpython/ |
D | object.h | 210 PyNumberMethods *tp_as_number; member
|
/external/python/pybind11/include/pybind11/ |
D | cast.h | 1205 else if (auto tp_as_number = src.ptr()->ob_type->tp_as_number) { 1206 if (PYBIND11_NB_BOOL(tp_as_number)) { 1207 res = (*PYBIND11_NB_BOOL(tp_as_number))(src.ptr());
|
/external/python/cpython2/Doc/c-api/ |
D | typeobj.rst | 293 .. c:member:: PyNumberMethods* tp_as_number 299 The :c:member:`~PyTypeObject.tp_as_number` field is not inherited, but the contained fields are 422 …:c:member:`~PyTypeObject.tp_as_number`, :c:member:`~PyTypeObject.tp_as_sequence`, :c:member:`~PyTy… 467 … :c:member:`~PyTypeObject.tp_as_number` contain the fields for in-place operators. In particular, 481 … :c:type:`PyNumberMethods` structure referenced by :c:member:`~PyTypeObject.tp_as_number` accept 1286 addition via the :c:member:`~PyTypeObject.tp_as_number.nb_add` slot. 1292 multiplication via the :c:member:`~PyTypeObject.tp_as_number.nb_multiply`
|
/external/python/cpython2/Python/ |
D | bltinmodule.c | 1212 if ((nb = v->ob_type->tp_as_number) == NULL || in builtin_hex() 1480 if (v == NULL || (nb = v->ob_type->tp_as_number) == NULL || in builtin_oct() 1788 (nb = Py_TYPE(arg)->tp_as_number) == NULL || in get_range_long_argument()
|
/external/python/pybind11/include/pybind11/detail/ |
D | class.h | 666 type->tp_as_number = &heap_type->as_number; in make_new_python_type()
|