parent
0d592290e2
commit
23a277b953
2 changed files with 74 additions and 0 deletions
|
|
@ -66,6 +66,8 @@ namespace rotgen
|
|||
using parent::setConstant;
|
||||
using parent::setRandom;
|
||||
using parent::setIdentity;
|
||||
using parent::outerStride;
|
||||
using parent::innerStride;
|
||||
|
||||
using parent::operator=;
|
||||
|
||||
|
|
@ -99,6 +101,12 @@ namespace rotgen
|
|||
static_assert((Ref::storage_order & 1) == storage_order, "ref: Incompatible storage layout");
|
||||
}
|
||||
|
||||
template<typename TT, int OO, typename SS>
|
||||
ref ( ref<TT,OO,SS>& b )
|
||||
requires(std::same_as<value_type, typename TT::value_type> && (TT::storage_order & 1) == storage_order)
|
||||
: parent(b.data(), b.rows(), b.cols(), stride_type{b.outerStride(),b.innerStride()})
|
||||
{}
|
||||
|
||||
ref(parent& m) : parent(m.data(), m.rows(), m.cols()) {}
|
||||
|
||||
friend std::ostream& operator<<(std::ostream& os, ref const& r)
|
||||
|
|
@ -152,6 +160,8 @@ namespace rotgen
|
|||
using parent::Constant;
|
||||
using parent::Random;
|
||||
using parent::Identity;
|
||||
using parent::outerStride;
|
||||
using parent::innerStride;
|
||||
|
||||
using parent::operator=;
|
||||
|
||||
|
|
@ -178,6 +188,12 @@ namespace rotgen
|
|||
: parent(b.data(), b.rows(), b.cols(), stride_type{b.outerStride(),b.innerStride()})
|
||||
{}
|
||||
|
||||
template<typename TT, int OO, typename SS>
|
||||
ref ( ref<TT,OO,SS> const& b )
|
||||
requires(std::same_as<value_type, typename TT::value_type> && (TT::storage_order & 1) == storage_order)
|
||||
: parent(b.data(), b.rows(), b.cols(), stride_type{b.outerStride(),b.innerStride()})
|
||||
{}
|
||||
|
||||
ref(parent const& m) : parent(m.data(), m.rows(), m.cols()) {}
|
||||
|
||||
friend std::ostream& operator<<(std::ostream& os, ref const& r)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue