Last active
September 25, 2020 16:50
-
-
Save xrq-phys/e83e1a98929e6a0061d77b41af14de73 to your computer and use it in GitHub Desktop.
Example of batch defining Julia functions. Will be used in BLIS.jl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module BatchDef | |
macro def_numed_fun(funname, num) | |
numed_funname = Symbol(string(funname, num)) | |
@show numed_funname | |
return quote | |
$(esc(numed_funname))() = $num | |
end | |
end | |
@def_numed_fun("testfun", 1); | |
@def_numed_fun("testfun", 2); | |
@def_numed_fun("testfun", 3); | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment