Closed kaushikcfd closed 3 years ago
would take a python callable,
return a JIT-ed function
Returns a "potentially more efficient" version of the function. (Returning f itself is valid.)
Terminology: "Operator" is very FEM-specific. CompiledArrayFunction
?
I agree with the semantics you give.
This issue appears to be what was actually implemented in Pytato/Arraycontext.
Yep, I think it's good to close.
Yep it was, closing this one.
Background
ArrayContext
. ArrayContext.compile would take a python callable,f
, and return a JIT-ed function corresponding tof
.Looking at PyOpenCLArrayContext
Proposal: PytatoPyOpenCLArrayContext
pytato
for lazy evaluation and any valued arrays are represented via pyopencl arrays.Union[pytato.Array, pyopencl.array]
and returns apyopencl.array
without the actx's queue.pyopencl.array
and returns apytato.DataWrapper
with the actx's namespace and queue attached to the cl array.A: CompiledOperator
that would have a methodA.__call__(self, x: np.ndarray[DofArray[PyOpenCLArray]]) -> np.ndarray[DofArray[PyOpenCLArray]]
. The pyopencl arrays fed into and out ofA.__call__
would still have the actx's command queue.