11cimport symengine
22from 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"
38
49cdef class Basic(object ):
510 cdef rcp_const_basic thisptr
@@ -22,3 +27,38 @@ cdef class DictBasicIter(object):
2227 cdef init(self , map_basic_basic.iterator begin, map_basic_basic.iterator end)
2328
2429cdef 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