Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- convolve :: VS.Vector Float -> Pipe IQ IQ IO ()
- convolve kernel = do
- let klen = VS.length kernel
- bufSz = 1024
- mkCInt = CInt . fromIntegral
- inBuf <- lift $ VSM.replicate bufSz 0.0
- outBuf <- lift $ VSM.replicate bufSz 0.0
- stateBuf <- lift $ VSM.replicate klen (0.0 :+ 0.0 :: IQ)
- lift $ VSM.mapM_ yield outBuf
- Error:
- • Couldn't match type ‘PrimState (Proxy () IQ () IQ IO)’
- with ‘RealWorld’
- Expected type: MVector (PrimState (Proxy () IQ () IQ IO)) IQ
- Actual type: MVector RealWorld IQ
- • In the second argument of ‘mapM_’, namely ‘outBuf’
- In a stmt of a 'do' block: mapM_ yield outBuf
- In the expression:
- do let klen = length kernel
- bufSz = 1024
- ....
- inBuf <- lift $ replicate bufSz 0.0
- outBuf <- lift $ replicate bufSz 0.0
- stateBuf <- lift $ replicate klen (0.0 :+ 0.0 :: IQ)
- ....
- |
- 71 | VSM.mapM_ yield outBuf
- | ^^^^^^
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement