Added writeVectorToBuffer to update a CL buffer.