Also, I'm not sure if makes sense, but I think a 2 arity version of map->struct would be helpful:
(defn map->struct
([dtype data]
(map->struct dtype data :gc))
([dtype data track-type]
(map->struct! data (new-struct dtype {:container-type :native-heap
:resource-type track-type}))))
If not, then I would suggest that the doc string also document the relevant values for :resource-type. Otherwise, you have to follow read the doc strings for dt-struct/new-struct, native-buffer/malloc, and tech.v3.resource/track.
These struct helpers seem really useful.
Also, I'm not sure if makes sense, but I think a 2 arity version of
map->struct
would be helpful:If not, then I would suggest that the doc string also document the relevant values for
:resource-type
. Otherwise, you have to follow read the doc strings for dt-struct/new-struct, native-buffer/malloc, andtech.v3.resource/track
.