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.