Skip to content
Snippets Groups Projects

Refactoring Tensor

Closed laurent soulier requested to merge fix/TensorPIMPL into main

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 replace getImpl()-> by getImpl().
  • Tensor.hpp does not includes backend\TensorImpl.hpp but backend\TensorImpl.hpp includes Tensor.hpp. Thus client code needs to include backend\TensorImpl.hpp (with or without Tensor.hpp)
Edited by laurent soulier

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading