Changes kernel to not compute zero elements.
Changes kernel to use local memory. Not optimized.