This file contains 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
"""A 1-dimensional example of adaptive mesh refinement in JAX. In this case, a simple | |
implementation of quadrature. | |
Static shapes don't mean you can't do this. Heap allocation is *not* necessary! | |
Not extensively tested; any bugs leave a comment below. | |
""" | |
import functools as ft | |
from collections.abc import Callable |
This file contains 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
import Distributed | |
foo_quote = quote | |
function foo(name::String)::String | |
id = Distributed.myid() | |
return "Hello $name from $id" | |
end | |
end | |
function run(num_procs::Integer)::Array{String} |