Testing functional API only (oss/rotgen#17)
Co-authored-by: Jules Pénuchot <jules@penuchot.com> See merge request oss/rotgen!42
This commit is contained in:
parent
6fa95fb22d
commit
4a7aa08cdb
11 changed files with 192 additions and 192 deletions
|
|
@ -218,17 +218,20 @@ namespace rotgen
|
|||
//-----------------------------------------------------------------------------------------------
|
||||
// Reductions
|
||||
//-----------------------------------------------------------------------------------------------
|
||||
auto trace(concepts::entity auto const& arg)
|
||||
auto trace(auto const& arg)
|
||||
requires requires { arg.trace(); }
|
||||
{
|
||||
return arg.trace();
|
||||
}
|
||||
|
||||
auto squaredNorm(concepts::entity auto const& arg)
|
||||
auto squaredNorm(auto const& arg)
|
||||
requires requires { arg.squaredNorm(); }
|
||||
{
|
||||
return arg.squaredNorm();
|
||||
}
|
||||
|
||||
auto norm(concepts::entity auto const& arg)
|
||||
auto norm(auto const& arg)
|
||||
requires requires { arg.norm(); }
|
||||
{
|
||||
return arg.norm();
|
||||
}
|
||||
|
|
@ -239,12 +242,14 @@ namespace rotgen
|
|||
return arg.sum();
|
||||
}
|
||||
|
||||
auto prod(concepts::entity auto const& arg)
|
||||
auto prod(auto const& arg)
|
||||
requires requires { arg.prod(); }
|
||||
{
|
||||
return arg.prod();
|
||||
}
|
||||
|
||||
auto mean(concepts::entity auto const& arg)
|
||||
auto mean(auto const& arg)
|
||||
requires requires { arg.mean(); }
|
||||
{
|
||||
return arg.mean();
|
||||
}
|
||||
|
|
@ -272,17 +277,15 @@ namespace rotgen
|
|||
}
|
||||
|
||||
template<std::integral IndexType>
|
||||
auto maxCoeff(concepts::entity auto const& arg,
|
||||
IndexType* row,
|
||||
IndexType* col)
|
||||
auto maxCoeff(auto const& arg, IndexType* row, IndexType* col)
|
||||
requires(requires { arg.maxCoeff(row, col); })
|
||||
{
|
||||
return arg.maxCoeff(row, col);
|
||||
}
|
||||
|
||||
template<std::integral IndexType>
|
||||
auto minCoeff(concepts::entity auto const& arg,
|
||||
IndexType* row,
|
||||
IndexType* col)
|
||||
auto minCoeff(auto const& arg, IndexType* row, IndexType* col)
|
||||
requires(requires { arg.minCoeff(row, col); })
|
||||
{
|
||||
return arg.minCoeff(row, col);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue