Changes between Version 29 and Version 30 of SIMD


Ignore:
Timestamp:
Nov 14, 2011 2:08:46 PM (4 years ago)
Author:
duncan
Comment:

fix array indexing/read/write types

Legend:

Unmodified
Added
Removed
Modified
  • SIMD

    v29 v30  
    278278In the following, `<t>` ranges over `Int<w>`, `Word<w>`, `Float`, `Double`.
    279279
    280 Loading and storing vectors in arrays, ByteArray# and raw Addr#
    281 {{{
    282 readInt<w>Vec<m>Array#  :: MutableByteArray# d -> Int# -> Int#    -> State# d -> State# d
    283 readWord<w>Vec<m>Array# :: MutableByteArray# d -> Int# -> Word#   -> State# d -> State# d
    284 readFloatVec<m>Array#   :: MutableByteArray# d -> Int# -> Float#  -> State# d -> State# d
    285 readDoubleVec<m>Array#  :: MutableByteArray# d -> Int# -> Double# -> State# d -> State# d
    286 
    287 writeInt<w>Vec<m>Array#  :: MutableByteArray# d -> Int# -> Int#    -> State# d -> State# d
    288 writeWord<w>Vec<m>Array# :: MutableByteArray# d -> Int# -> Word#   -> State# d -> State# d
    289 writeFloatVec<m>Array#   :: MutableByteArray# d -> Int# -> Float#  -> State# d -> State# d
    290 writeDoubleVec<m>Array#  :: MutableByteArray# d -> Int# -> Double# -> State# d -> State# d
    291 
    292 readInt<w>Vec<m>OffAddr#  :: Addr# -> Int# -> Int#    -> State# d -> State# d
    293 readWord<w>Vec<m>OffAddr# :: Addr# -> Int# -> Word#   -> State# d -> State# d
    294 readFloatVec<m>OffAddr#   :: Addr# -> Int# -> Float#  -> State# d -> State# d
    295 readDoubleVec<m>OffAddr#  :: Addr# -> Int# -> Double# -> State# d -> State# d
    296 
    297 writeInt<w>Vec<m>OffAddr#  :: Addr# -> Int# -> Int#    -> State# d -> State# d
    298 writeWord<w>Vec<m>OffAddr# :: Addr# -> Int# -> Word#   -> State# d -> State# d
    299 writeFloatVec<m>OffAddr#   :: Addr# -> Int# -> Float#  -> State# d -> State# d
    300 writeDoubleVec<m>OffAddr#  :: Addr# -> Int# -> Double# -> State# d -> State# d
     280Loading and storing vectors in arrays, `ByteArray#` and raw `Addr#`
     281{{{
     282indexInt<w>Vec<m>Array#  :: ByteArray# -> Int# -> Int<w>Vec<m>#
     283indexWord<w>Vec<m>Array# :: ByteArray# -> Int# -> Word<w>Vec<m>#
     284indexFloatVec<m>Array#   :: ByteArray# -> Int# -> FloatVec<m>#
     285indexDoubleVec<m>Array#  :: ByteArray# -> Int# -> DoubleVec<m>#
     286
     287readInt<w>Vec<m>Array#  :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int<w>Vec<m>#  #)
     288readWord<w>Vec<m>Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word<w>Vec<m># #)
     289readFloatVec<m>Array#   :: MutableByteArray# d -> Int# -> State# d -> (# State# d, FloatVec<m>#   #)
     290readDoubleVec<m>Array#  :: MutableByteArray# d -> Int# -> State# d -> (# State# d, DoubleVec<m>#  #)
     291
     292writeInt<w>Vec<m>Array#  :: MutableByteArray# d -> Int# -> Int<w>Vec<m>#  -> State# d -> State# d
     293writeWord<w>Vec<m>Array# :: MutableByteArray# d -> Int# -> Word<w>Vec<m># -> State# d -> State# d
     294writeFloatVec<m>Array#   :: MutableByteArray# d -> Int# -> FloatVec<m>#   -> State# d -> State# d
     295writeDoubleVec<m>Array#  :: MutableByteArray# d -> Int# -> DoubleVec<m>#  -> State# d -> State# d
     296
     297readInt<w>Vec<m>OffAddr#  :: Addr# -> Int# -> State# d -> (# State# d, Int<w>Vec<m># #)
     298readWord<w>Vec<m>OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Word<w>Vec<m># #)
     299readFloatVec<m>OffAddr#   :: Addr# -> Int# -> State# d -> (# State# d, FloatVec<m># #)
     300readDoubleVec<m>OffAddr#  :: Addr# -> Int# -> State# d -> (# State# d, DoubleVec<m># #)
     301
     302writeInt<w>Vec<m>OffAddr#  :: Addr# -> Int# -> Int<w>Vec<m>#  -> State# d -> State# d
     303writeWord<w>Vec<m>OffAddr# :: Addr# -> Int# -> Word<w>Vec<m># -> State# d -> State# d
     304writeFloatVec<m>OffAddr#   :: Addr# -> Int# -> FloatVec<m>#   -> State# d -> State# d
     305writeDoubleVec<m>OffAddr#  :: Addr# -> Int# -> DoubleVec<m>#  -> State# d -> State# d
    301306}}}
    302307