Added function for setting local memory via kernel argument.