Opened 8 years ago

#611 new enhancement

more typical C code for kernels

Reported by: pkienzle Owned by:
Priority: major Milestone: SasView WishList
Component: SasView Keywords:
Cc: Work Package: SasView Bug Fixing


Kernel models could use #include instead of sources = […]. Make include of sasmodels.h explicit rather than implicit.

Kernels embedded in python should use:

kernel = """

#include <sasmodels.h>

…typical C code complete with function declarations…

rather than

Iq = """…function body with implied parameters…"""
Iqxy = """…function body with implied parameters…"""

Maybe reconsider automatic string translation from double to float in models, and instead use typedef'd "real".

Figure out how to get library-like behaviour so that sas_erf.c is only included if the sas_erf function is used in the code.

The use of includes and the fake librarian will require a lot more inspection of the C code, so may not be worthwhile given the minor improvements to in the naturalness of the C code.

Change History (0)

Note: See TracTickets for help on using tickets.