Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

from cpython.object cimport PyObject 

  

cdef union double_op_params: 

PyObject* func 

double (*f)(double) 

double (*ff)(double, double) 

double c 

int n 

  

cdef struct fast_double_op: 

char type 

double_op_params params 

  

cdef class FastDoubleFunc: 

cdef readonly int max_height 

cdef readonly int nargs 

cdef readonly int nops 

cdef fast_double_op* ops 

  

cdef double* argv 

cdef double* stack 

  

# need to keep this around because structs can't contain (ref-counted) python objects 

cdef py_funcs 

  

cdef int allocate_stack(FastDoubleFunc self) except -1 

cdef double _call_c(FastDoubleFunc self, double* argv) except? -2 

cpdef bint is_pure_c(self) 

cdef FastDoubleFunc cfunc(FastDoubleFunc self, void* func) 

cdef FastDoubleFunc unop(FastDoubleFunc self, char type)