Releases: SX-Aurora/py-veo
Updated to level of NLCPY
In this release the license was changed to BSD-2-Clause, and code developed inside the NLCPY project was merged, thus adding that repository's BSD-3-Clause license. Thanks to xpress.ai for stripping py-veo out of NLCPY in https://github.com/XpressAI/py-veo.
Some more comfort on python3 string vs. bytes handling is included, and the build is fixed for "many" python versions.
The wheels have been uploaded to PyPi, you should be able to install them with pip install py-veo==1.5.0
.
py-veo with python3 fixes
v1.4.0 Tweaked setup.py to upload cleanly to PyPi with twine.
Implicit function search, Fortran and in-Python VE builds
The current version support building VE kernels inside the Python program. It is simple to use for simple things:
from veo import *
b=VeBuild()
b.set_c_source("_test", r"""
double mysum(double *a, int n)
{
int i; double sum;
for (i = 0; i < n; i++)
sum += a[i];
return sum;
}
""")
veo_name = b.build_so()
p = VeoProc(0)
lib = p.load_library(os.getcwd() + "/" + veo_name)
lib.mysum.args_type("double *", "int")
lib.mysum.ret_type("double")
Rather new is also the implicit function search. Instead of
f = lib.find_function("myfunc")
f.args_type("char *", "int")
req = f(ctxt, "abc", 15)
now you can do:
lib.myfunc.args_type("char *", "int")
req = lib.myfunc(ctxt, "abc", 15)
OnStack() now works with any variables that support the buffer protocol, so now numpy arrays can be passed on stack (IN, INOUT, OUT) to fortran VE function.
This release can also be installed from PYPI:
pip install --upgrade py-veo
Implicit function search and Fortran calls
This version supports implicit function search. Instead of
f = lib.find_function("myfunc")
f.args_type("char *", "int")
req = f(ctxt, "abc", 15)
now you can do:
lib.myfunc.args_type("char *", "int")
req = lib.myfunc(ctxt, "abc", 15)
OnStack() now works with any variables that support the buffer protocol, so now numpy arrays can be passed on stack (IN, INOUT, OUT) to fortran VE function.
The module can be installed from PYPI, also in virtualenvs:
pip install py-veo