Source/Systems

Coppelius.Build.Graph

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

3,461 lines536 declarations124.9 KiBSHA-256 6b9f923bd170

def · lines 1303–1315

cgPieces

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