Marcel-Rodekamp / NSL

Nanosystem Simulation Library (NSL) implements statistical simulations for systems on the nanoscale
Other
2 stars 0 forks source link

Feature/hackathon2022 shift transpose #101

Closed keshvituteja closed 2 years ago

keshvituteja commented 2 years ago

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 .

Marcel-Rodekamp commented 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: