scatterRecv :: (RecvInto v) => Comm -> Rank -> v -> IO ()
scatterRecv comm root recvVal = do
   recvInto recvVal $ \recvPtr recvElements recvType ->
     Internal.scatter nullPtr 0 byte (castPtr recvPtr) recvElements recvType root comm

-- | Variant of 'scatterSend' that allows to send data in uneven chunks.
-- Since interface is tailored for speed, @counts@ and @displacements@ should be in 'StorableArray's.
scatterRecv :: (RecvInto v) => Comm -> Rank -> v -> IO ()
scatterRecv comm root recvVal = do
   recvInto recvVal $ \recvPtr recvElements recvType ->
     Internal.scatter nullPtr 0 byte (castPtr recvPtr) recvElements recvType root comm

-- | Variant of 'scatterSend' that allows to send data in uneven chunks.
-- Since interface is tailored for speed, @counts@ and @displacements@ should be in 'StorableArray's.
scatterRecv comm root recvVal = do
   recvInto recvVal $ \recvPtr recvElements recvType ->
     Internal.scatter nullPtr 0 byte (castPtr recvPtr) recvElements recvType root comm

-- | Variant of 'scatterSend' that allows to send data in uneven chunks.
-- Since interface is tailored for speed, @counts@ and @displacements@ should be in 'StorableArray's.