More specific fixes

See merge request oss/rotgen!47
This commit is contained in:
Joel Falcou 2025-12-02 14:40:01 +01:00
parent 083ada097e
commit 8e80d1d083
34 changed files with 1171 additions and 416 deletions

View file

@ -239,12 +239,22 @@ void CLASSNAME::adjointInPlace()
}
#endif
TYPE CLASSNAME::dot(CLASSNAME const& rhs) const
TYPE CLASSNAME::dot(CLASSNONCONSTNAME const& rhs) const
{
return storage_->data.reshaped().dot(rhs.storage()->data.reshaped());
}
TYPE CLASSNAME::dot(TRANSCLASSNAME const& rhs) const
TYPE CLASSNAME::dot(CLASSCONSTNAME const& rhs) const
{
return storage_->data.reshaped().dot(rhs.storage()->data.reshaped());
}
TYPE CLASSNAME::dot(TRANSCLASSNONCONSTNAME const& rhs) const
{
return storage_->data.reshaped().dot(rhs.storage()->data.reshaped());
}
TYPE CLASSNAME::dot(TRANSCLASSCONSTNAME const& rhs) const
{
return storage_->data.reshaped().dot(rhs.storage()->data.reshaped());
}
@ -378,7 +388,7 @@ SOURCENAME CLASSNAME::operator-() const
#if !defined(USE_CONST)
CLASSNAME& CLASSNAME::operator+=(CLASSNAME const& rhs)
{
storage_->data += rhs.storage_->data;
storage_->data += rhs.storage()->data;
return *this;
}
@ -388,9 +398,21 @@ CLASSNAME& CLASSNAME::operator+=(CLASSCONSTNAME const& rhs)
return *this;
}
CLASSNAME& CLASSNAME::operator+=(TRANSCLASSNONCONSTNAME const& rhs)
{
storage_->data.reshaped() += rhs.storage()->data.reshaped();
return *this;
}
CLASSNAME& CLASSNAME::operator+=(TRANSCLASSCONSTNAME const& rhs)
{
storage_->data.reshaped() += rhs.storage()->data.reshaped();
return *this;
}
CLASSNAME& CLASSNAME::operator-=(CLASSNAME const& rhs)
{
storage_->data -= rhs.storage_->data;
storage_->data -= rhs.storage()->data;
return *this;
}
@ -400,9 +422,21 @@ CLASSNAME& CLASSNAME::operator-=(CLASSCONSTNAME const& rhs)
return *this;
}
CLASSNAME& CLASSNAME::operator-=(TRANSCLASSNONCONSTNAME const& rhs)
{
storage_->data.reshaped() -= rhs.storage()->data.reshaped();
return *this;
}
CLASSNAME& CLASSNAME::operator-=(TRANSCLASSCONSTNAME const& rhs)
{
storage_->data.reshaped() -= rhs.storage()->data.reshaped();
return *this;
}
CLASSNAME& CLASSNAME::operator*=(CLASSNAME const& rhs)
{
storage_->data *= rhs.storage_->data;
storage_->data *= rhs.storage()->data;
return *this;
}
@ -412,6 +446,18 @@ CLASSNAME& CLASSNAME::operator*=(CLASSCONSTNAME const& rhs)
return *this;
}
CLASSNAME& CLASSNAME::operator*=(TRANSCLASSNONCONSTNAME const& rhs)
{
storage_->data *= rhs.storage()->data;
return *this;
}
CLASSNAME& CLASSNAME::operator*=(TRANSCLASSCONSTNAME const& rhs)
{
storage_->data *= rhs.storage()->data;
return *this;
}
CLASSNAME& CLASSNAME::operator*=(TYPE s)
{
storage_->data *= s;