Hello all,
I am implementing Symbolic Algorithms for LPython as a part of my GSoC project . Y'all can find the abstract of the project here
Program Project | Google Summer of CodeSo I am working on a program which goes as follows
@ccall(header="symengine/cwrapper.h")
def basic_new_stack(x: CPtr) -> None:
pass
@ccall(header="symengine/cwrapper.h")
def basic_const_pi(x: CPtr) -> None:
pass
@ccall(header="symengine/cwrapper.h")
def basic_str(x: CPtr) -> str:
pass
@ccall
def _lfortran_malloc(size: i32) -> CPtr:
pass
def main0():
x: CPtr = _lfortran_malloc(i32(sizeof(i64)))
basic_new_stack(x)
basic_const_pi(x)
s: str = basic_str(x)
print(s)
main0()
Here I am using LFortran's malloc function but I am curious to know if there is an internal function available within the SymEngine library that handles the memory allocation internally. I went through SymEngine's documentation but didn't wasn't able to find anything. Any idea of what could be used would be great
Regards,
Anutosh Bhat