@@ -32,8 +32,8 @@ cache and custom-index it by the three coordinates.
3232
3333The winning Zone(s) drive the note synthesis.
3434
35- This source file implements a generalization of that setup . See computeInstSmashup. We must know all the "subspaces"
36- (range specifications) up front which we "smash" together to populate the flat vector.
35+ This source file implements a generalization of above definition . See computeInstSmashup. We must know all the
36+ "subspaces" (range specifications) up front which we "smash" together to populate the flat vector.
3737
3838> data Smashing i =
3939> Smashing {
@@ -96,10 +96,10 @@ You see there is some overlap between Zone 1 and Zone 2.
9696> let
9797> enumAssocs :: [(Int , (i , i ))]
9898> enumAssocs =
99- > profess
100- > (0 <= mag && mag <= 32_768 && all (uncurry validRange) (zip dims rngs))
101- > (unwords [fName, " range violation" , tag, show mag, show dims, show spaces])
102- > (map (, (spaceId, 1 )) is)
99+ > profess
100+ > (0 <= mag && mag <= 32_768 && all (uncurry validRange) (zip dims rngs))
101+ > (unwords [fName, " range violation" , tag, show mag, show dims, show spaces])
102+ > (map (, (spaceId, 1 )) is)
103103> where
104104> fName = " enumAssocs"
105105>
@@ -150,10 +150,13 @@ as a zipper to carry out the you-know-what (smashing, stupid!)
150150> validCoords :: ∀ i . (Integral i , Ix i , VU. Unbox i ) ⇒ [i ] → Smashing i → Bool
151151> validCoords coords Smashing { .. }
152152> = and $ zipWith inZRange coords smashDims
153- >
154- > getLeafCells :: ∀ i . (Integral i , Show i , VU. Unbox i ) ⇒ [i ] → Smashing i → VU. Vector (i , i )
155- > getLeafCells coords Smashing { .. }
153+
154+ Navigation ============================================================================================================
155+
156+ > getLeafCells :: ∀ i . (Integral i , Ix i , Show i , VU. Unbox i ) ⇒ [i ] → Smashing i → VU. Vector (i , i )
157+ > getLeafCells coords smashup@ Smashing { .. }
156158> | traceNot trace_GLC False = undefined
159+ > | not (validCoords coords smashup) = error $ unwords [fName, " invalid coords" ]
157160> | otherwise = VU. slice cellix leafDim smashVec
158161> where
159162> fName = " getLeafCells"
0 commit comments