Created buffers for the input data, results and scratch memory.