Update generate-tensor.cpp

introduced TensorBase (previously TensorSlice) as super class of Tensor