Source/Systems

Coppelius.Build.Graph

systems/coppelius/src/Coppelius/Build/Graph.alpha

3,462 lines536 declarations124.9 KiBSHA-256 878726898dd9

def · lines 1304–1316

cgPieces

Full file
A range of units in pieces of at most `piece`; affine launch repetition is shared.
1304def cgPieces =
1305  (lambda unrestricted total : Nat .
1306    (lambda unrestricted piece : Nat .
1307      (lambda unrestricted body : (pi unrestricted offset : Nat . (pi unrestricted units : Nat . (family NvidiaLaunchSchedule))) .
1308        (let unrestricted full =
1309          (naturalDivideUnchecked total piece)
1310          in
1311          (let unrestricted rest =
1312            (naturalModuloUnchecked total piece)
1313            in
1314            (cgThen
1315              (nvidiaAffineLaunchRepeat full (lambda unrestricted i : Nat . (body (naturalMultiply i piece) piece)))
1316              (cgIf (naturalNonzero rest) (body (naturalMultiply full piece) rest) cgNothing)))))))

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.