[Tensor] Operational Improvements and Functionality Simplification
authorDonghyeon Jeong <dhyeon.jeong@samsung.com>
Fri, 12 Jul 2024 07:33:11 +0000 (16:33 +0900)
committerJijoong Moon <jijoong.moon@samsung.com>
Fri, 26 Jul 2024 01:27:26 +0000 (10:27 +0900)
commit2cd99a125f98363e995fb3d59dfb7994266d8d95
tree08fb3d5d25faa5b9932eb8370b16a5da839528d3
parent3dba61670e7a0f4563853669f4d3787c25821a7a
[Tensor] Operational Improvements and Functionality Simplification

This commit moves several operations implementations to each Tensor class for easier management.
This allows users to create a new data type Tensor without unnecessary modification to the Tensor class.

**Changes proposed in this PR:**
- static function Tensor::cat() uses each tensor's member function concat().
- Tensor::copy() logic is simplified by not differentiating by its data type.
- Tensor::copy_with_stride() uses an internal function to operate.

**Self-evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test:   [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: Donghyeon Jeong <dhyeon.jeong@samsung.com>
nntrainer/tensor/float_tensor.cpp
nntrainer/tensor/float_tensor.h
nntrainer/tensor/half_tensor.cpp
nntrainer/tensor/half_tensor.h
nntrainer/tensor/tensor.cpp
nntrainer/tensor/tensor.h
nntrainer/tensor/tensor_base.h