Removed some unneccessary memory padding in functions and rmm kernels

Did one of the TODOs in the rmm kernel (breaking up inner loop into
two loops) which gave a ~20% speedup in that kernel in my tests
Took care of other TODO in rmm kernel - now only launches kernels with blocks
that actually have something to do. Gives a few percent speedup (maybe there's a better way?)