Closed keshvituteja closed 2 years ago
The first test shiftTensor
in the way how it is written tests basically nothing as the first element of A
will not be the first element of Ashift
(due to the shift). Therefore, the addresses are never the same. It would be best to add a facility isViewOf
to the Tensor class to simplify this kind of checks.
The second test shiftTensorBySize
should test not only the zeroth dimension but all dimensions.
This test needs alot rework and expansion (see list below). We reject it here so that a reworked version can be merged into devel later.
Things to add:
Ashift
is not (for NSL::LinAlg
) a view of A.shiftTensorBySize
-size_arr
to shiftTensorBySize
(should also be an identity operation)
Tests for shift and transpose for LinAlg and Tensor. Haven't remove the previous tests, just added more tests in the same cpp files. The test for transpose matmul ( (AB)^T = B^T A^T) may or may not pass, since the precision is very low .