Source/Packages

Runtime.NativeDataParallelOwned

packages/execution/src/Runtime/NativeDataParallelOwned.alpha

2,874 lines126 declarations142.2 KiBSHA-256 de18258423c4

def · lines 432–472

dpoSelect

Full file
432def dpoSelect =
433  (lambda unrestricted k : Nat .
434    (lambda unrestricted out : Nat .
435      (lambda unrestricted left : Nat .
436        (lambda unrestricted right : Nat .
437          (dpEach
438            k
439            (lambda unrestricted index : Nat .
440              (lambda unrestricted tail : (family NativePhysicalCommands) .
441                (let unrestricted rightMask =
442                  (nativePointwiseAt right (naturalAdd k index))
443                  in
444                  (let unrestricted leftMask =
445                    (nativePointwiseAt left (naturalAdd k index))
446                    in
447                    (dpCopy
448                      (nativePointwiseAt out index)
449                      (nativePointwiseAt left index)
450                      dpWord
451                      (dpCopy
452                        (nativePointwiseAt out (naturalAdd k index))
453                        leftMask
454                        dpWord
455                        (nativeWhenEqual
456                          (nativeMemoryLoad rightMask)
457                          (nativeLaunchRecipeImmediate 1)
458                          b"data-parallel-assembly-select"
459                          (nativeLaunchRecipeAssertEqual
460                            (nativeMemoryLoad leftMask)
461                            (nativeLaunchRecipeImmediate 0)
462                            b"data-parallel-assembly-overlap"
463                            (dpCopy
464                              (nativePointwiseAt out index)
465                              (nativePointwiseAt right index)
466                              dpWord
467                              (nativeMemoryStoreWord64
468                                b"data-parallel-assembly-owned"
469                                (nativePointwiseAt out (naturalAdd k index))
470                                (nativeLaunchRecipeImmediate 1)
471                                dpEnd)))
472                          tail))))))))))))

The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.