Divide symmetric tensor by scalar
The division of a symmetric tensor by a scalar is implemented.
Codecov Report
:x: Patch coverage is 52.63158% with 27 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 28.15%. Comparing base (2932e64) to head (6706900).
:warning: Report is 51 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #674 +/- ##
==========================================
+ Coverage 28.05% 28.15% +0.10%
==========================================
Files 215 215
Lines 43948 43974 +26
Branches 16805 16825 +20
==========================================
+ Hits 12328 12381 +53
+ Misses 29617 29568 -49
- Partials 2003 2025 +22
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
We should prepare another PR to update the error message.
We should prepare another PR to update the error message.
Is there an issue with it? I thought it is such a minor change that I do not bother everyone with a new PR. But if it is needed I can create a separate one.
5d21fc8 can be compiled without 28b86ff. It should fall back to the UniTensor_base implementation, which just drops an error message. For the division to work correctly the implementations of Div_ in 28b86ff are needed.
5d21fc8 can be compiled without 28b86ff. It should fall back to the UniTensor_base implementation, which just drops an error message. For the division to work correctly the implementations of
Div_in 28b86ff are needed.
Here is the link error while I tried to build a simple program at 5d21fc8.
/lib/gcc/x86_64-conda-linux-gnu/13.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /tmp/cckLbN6y.ltrans0.ltrans.o:(.data.rel.ro+0x2c0): undefined reference to `cytnx::BlockUniTensor::Div_(boost::intrusive_ptr<cytnx::UniTensor_base> const&)'
/lib/gcc/x86_64-conda-linux-gnu/13.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: /tmp/cckLbN6y.ltrans1.ltrans.o:(.data.rel.ro+0x288): undefined reference to `cytnx::BlockFermionicUniTensor::Div_(boost::intrusive_ptr<cytnx::UniTensor_base> const&)'
collect2: error: ld returned 1 exit status
program:
#include "cytnx.hpp"
int main() {
cytnx::Bond bond(cytnx::BD_IN, {cytnx::Qs(1) >> 1}, {cytnx::Symmetry::FermionNumber()});
cytnx::UniTensor unitensor({bond});
unitensor.Div_(cytnx::Scalar(1.1));
unitensor.Div_(unitensor);
}
You are right, Div_ is declared for Block(Fermionic)UniTensors but not implemented in 5d21fc8. So please ignore that commit by itself. I added the implementation in 28b86ff.
Also, I confused myself: this pull request is not about the division by a scalar (which is already implemented and working), but about the element-wise division by a tensor.
Sorry for all the confusion.
I added some unittests for elementwise linalg operations.
Is there any issue left with this pull request?