pmap_test2   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/examples/core/xthread.xtm

Implementation

(bind-func pmap_test2
  (lambda (arr:i64* size:i64 num_procs:i64)
    (let ((subs (/ size num_procs)))
      (foldl (lambda (a:i64 b) (+ a b)) 0
             (pmap (lambda (xs:i64*) (vsum xs subs))
                   (map (lambda (idx) (pref-ptr arr idx))
                        (range 0 size subs)))))))


Back to Index

Similar Entries

  • array-test2    xtlang
  • callback-test2-helper    xtlang
  • eq_test2    xtlang
  • map_test2    xtlang
  • my-test20    xtlang
  • my-test25    xtlang
  • my-test26    xtlang
  • my-test27    xtlang
  • my-test28    xtlang
  • my-test29    xtlang
  • pmap    xtlang
  • pmap_test    xtlang
  • test2    xtlang
  • vector-test2    xtlang