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
There is a way to abstract parallel loading as far as Load class is concerned to be an arbitrary Monad for loadP, just as it is already with loadS. This would enforce safer instances for Loadable arrays. Here is the proposed function to be added to Load as a replacement for loadP:
loadWithWorkers
::Monadm=>Int--^ Total number of workers-> (m()->m()) --^ A monadic action that will schedule work for the workers->Arrayrixe--^ Array that is being loaded-> (Int->me) --^ Function that reads an element from target array-> (Int->e->m()) --^ Function that writes an element into target array->m()
This is a pure safety and clarity improvement, as such it is not urgent. Moreover it would be considered a breaking change, therefore this implementation will be postponed to v0.3, whenever that will happen :)
The text was updated successfully, but these errors were encountered:
Argument function that could elements of the target array was removed as it turned out to be useless. This is now done:
--| Load an array into memory.
loadArrayM
::Monadm=>Int--^ Total number of workers (for `Seq` it's always 1)-> (m()->m())
--^ A monadic action that will schedule work for the workers (for `Seq` it's always `id`)->Arrayrixe--^ Array that is being loaded-> (Int->e->m()) --^ Function that writes an element into target array->m()
There is a way to abstract parallel loading as far as
Load
class is concerned to be an arbitraryMonad
forloadP
, just as it is already withloadS
. This would enforce safer instances for Loadable arrays. Here is the proposed function to be added toLoad
as a replacement forloadP
:And the function that does the actual loading:
This is a pure safety and clarity improvement, as such it is not urgent. Moreover it would be considered a breaking change, therefore this implementation will be postponed to
v0.3
, whenever that will happen :)The text was updated successfully, but these errors were encountered: