Refactoring Tensor
Adding context to Tensor
Adding "active area" to Tensor
Forward declaring TensorImpl in Tensor instead of the another way around
CPU storage is unsigned char instead of void *
todo: memory location for device different than CPU
todo: a Tensor can share a TensorImpl with another Tensor
TensorImpl = storage
Tensor = view on storage
Notes:
-
Tensor::getImpl()returns a reference not a pointer, thus client code must replacegetImpl()->bygetImpl(). -
Tensor.hppdoes not includesbackend\TensorImpl.hppbutbackend\TensorImpl.hppincludesTensor.hpp. Thus client code needs to includebackend\TensorImpl.hpp(with or withoutTensor.hpp)
Edited by laurent soulier