offsetMemoryInExp offsets (Op (Inner (GroupStream w max_chunk lam accs arrs))) =
  Op (Inner (GroupStream w max_chunk lam' accs arrs))
  where lam' =
          lam { groupStreamLambdaBody = offsetMemoryInBody offsets $
                                        groupStreamLambdaBody lam
              , groupStreamAccParams = map (offsetMemoryInParam offsets) $
                                       groupStreamAccParams lam
              , groupStreamArrParams = map (offsetMemoryInParam offsets) $
                                       groupStreamArrParams lam
              }
offsetMemoryInExp offsets (Op (Inner (GroupStream w max_chunk lam accs arrs))) =
  Op (Inner (GroupStream w max_chunk lam' accs arrs))
  where lam' =
          lam { groupStreamLambdaBody = offsetMemoryInBody offsets $
                                        groupStreamLambdaBody lam
              , groupStreamAccParams = map (offsetMemoryInParam offsets) $
                                       groupStreamAccParams lam
              , groupStreamArrParams = map (offsetMemoryInParam offsets) $
                                       groupStreamArrParams lam
              }
offsetMemoryInExp offsets (Op (Inner (GroupStream w max_chunk lam accs arrs))) =
  Op (Inner (GroupStream w max_chunk lam' accs arrs))
  where lam' =
          lam { groupStreamLambdaBody = offsetMemoryInBody offsets $
                                        groupStreamLambdaBody lam
              , groupStreamAccParams = map (offsetMemoryInParam offsets) $
                                       groupStreamAccParams lam
              , groupStreamArrParams = map (offsetMemoryInParam offsets) $
                                       groupStreamArrParams lam
              }