1
1
cimport symengine
2
2
from symengine cimport RCP, map_basic_basic, rcp_const_basic
3
+ from libcpp.vector cimport vector
4
+ from libcpp.string cimport string
5
+ from libcpp cimport bool as cppbool
6
+
7
+ include " config.pxi"
3
8
4
9
cdef class Basic(object ):
5
10
cdef rcp_const_basic thisptr
@@ -22,3 +27,38 @@ cdef class DictBasicIter(object):
22
27
cdef init(self , map_basic_basic.iterator begin, map_basic_basic.iterator end)
23
28
24
29
cdef object c2py(rcp_const_basic o)
30
+
31
+ cdef class _Lambdify(object ):
32
+ cdef size_t args_size, tot_out_size
33
+ cdef list out_shapes
34
+ cdef readonly bint real
35
+ cdef readonly size_t n_exprs
36
+ cdef public str order
37
+ cdef vector[int ] accum_out_sizes
38
+ cdef object numpy_dtype
39
+
40
+ cdef _init(self , symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse)
41
+ cdef _load(self , const string & s)
42
+ cpdef unsafe_real(self ,
43
+ double [::1 ] inp, double [::1 ] out,
44
+ int inp_offset = * , int out_offset = * )
45
+ cpdef unsafe_complex(self , double complex [::1 ] inp, double complex [::1 ] out,
46
+ int inp_offset = * , int out_offset = * )
47
+ cpdef eval_real(self , inp, out)
48
+ cpdef eval_complex(self , inp, out)
49
+
50
+ cdef class LambdaDouble(_Lambdify):
51
+ cdef vector[symengine.LambdaRealDoubleVisitor] lambda_double
52
+ cdef vector[symengine.LambdaComplexDoubleVisitor] lambda_double_complex
53
+ cdef _init(self , symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse)
54
+ cpdef unsafe_real(self , double [::1 ] inp, double [::1 ] out, int inp_offset = * , int out_offset = * )
55
+ cpdef unsafe_complex(self , double complex [::1 ] inp, double complex [::1 ] out, int inp_offset = * , int out_offset = * )
56
+ cpdef as_scipy_low_level_callable(self )
57
+
58
+ IF HAVE_SYMENGINE_LLVM:
59
+ cdef class LLVMDouble(_Lambdify):
60
+ cdef vector[symengine.LLVMDoubleVisitor] lambda_double
61
+ cdef _init(self , symengine.vec_basic& args_, symengine.vec_basic& outs_, cppbool cse)
62
+ cdef _load(self , const string & s)
63
+ cpdef unsafe_real(self , double [::1 ] inp, double [::1 ] out, int inp_offset = * , int out_offset = * )
64
+ cpdef as_scipy_low_level_callable(self )
0 commit comments