Added new kernel with embedded for loop and parameterized shared mem.