inducer / arraycontext

Choose your favorite numpy-workalike!
6 stars 11 forks source link

Allow dataclass containers with DeviceArrays #153

Closed alexfikl closed 2 years ago

alexfikl commented 2 years ago

This essentially just made DeviceArray and DeviceScalar into distinct Protocol classes (not just DeviceScalar = Any) and added a little check in dataclass_array_container.

The motivation is to maybe eventually replace boxtree.DeviceDataRecord with some standard dataclasses that support arraycontext.

inducer commented 2 years ago

Looks great. Thanks for working on this!