SciML / RuntimeGeneratedFunctions.jl

Functions generated at runtime without world-age issues or overhead
https://docs.sciml.ai/RuntimeGeneratedFunctions/stable/
MIT License
100 stars 14 forks source link

Allow cache module to be given in RGF constructor #26

Closed c42f closed 3 years ago

c42f commented 3 years ago

This exposes the full constructor (without the need for specifying module tags), as we seem to need this for utility functions which want to cache the RGF in a user-specified module.

Looks like this is needed to make https://github.com/SciML/ModelingToolkit.jl/pull/769 less hacky.

codecov[bot] commented 3 years ago

Codecov Report

Merging #26 (f76395c) into master (076d6df) will increase coverage by 3.97%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #26      +/-   ##
==========================================
+ Coverage   89.36%   93.33%   +3.97%     
==========================================
  Files           1        1              
  Lines          47       45       -2     
==========================================
  Hits           42       42              
+ Misses          5        3       -2     
Impacted Files Coverage Δ
src/RuntimeGeneratedFunctions.jl 93.33% <100.00%> (+3.97%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 076d6df...eec806a. Read the comment docs.

ChrisRackauckas commented 3 years ago

Should this get mentioned in the README? I think it should, and it should be the "final" piece of this library. Thanks @c42f for taking the difficult parts on!

c42f commented 3 years ago

the "final" piece of this library

25 could be nice I guess. But really it would be great if the compiler just supported callable methods more directly... this library is always going to be a hack :-)

ChrisRackauckas commented 3 years ago

A hack, but a useful one for at least the next year or two!

c42f commented 3 years ago

Right!