You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @ziotom78, hope you're faring well. I'd like to hear your thoughts on the following enhancement, based on my use of this library.
Since we are already going to make a breaking release to include the SHTs, it would be nice if we also changed Healpix.jl to leverage more of the Julia language. Currently, both Map{T} and Alm{T} contain Array{T} instead of parametrizing on both T and AbstractArray, and there are functions which mention explicitly Array instead of AbstractArray, or Map instead of GenericMap. I think there are just too many strict type hints.
Consider the following interesting array types which could be used for the data in a Map,
CUArray for trivial offloading of map processing to the GPU
SharedArray or DistributedArray for parallelism
FillArray for a lazy constant map / flat spectrum.
External users can't even really inherit from GenericMap since none of the functions dispatch on that, so they would have to rewrite this library for their map type.
One approach is to make a change where we parametrize also on array types like Map{T,AA} or Alm{T,AA}, see AA in OffsetArrays. At the very least, more abstract types in functions could be used. This might be a somewhat large set of changes, so apologies if this is an annoying suggestion.
The text was updated successfully, but these errors were encountered:
Hey @ziotom78, hope you're faring well. I'd like to hear your thoughts on the following enhancement, based on my use of this library.
Since we are already going to make a breaking release to include the SHTs, it would be nice if we also changed Healpix.jl to leverage more of the Julia language. Currently, both
Map{T}
andAlm{T}
containArray{T}
instead of parametrizing on bothT
andAbstractArray
, and there are functions which mention explicitlyArray
instead ofAbstractArray
, orMap
instead ofGenericMap
. I think there are just too many strict type hints.Consider the following interesting array types which could be used for the data in a Map,
CUArray
for trivial offloading of map processing to the GPUSharedArray
orDistributedArray
for parallelismFillArray
for a lazy constant map / flat spectrum.External users can't even really inherit from
GenericMap
since none of the functions dispatch on that, so they would have to rewrite this library for their map type.One approach is to make a change where we parametrize also on array types like
Map{T,AA}
orAlm{T,AA}
, seeAA
in OffsetArrays. At the very least, more abstract types in functions could be used. This might be a somewhat large set of changes, so apologies if this is an annoying suggestion.The text was updated successfully, but these errors were encountered: