35#ifndef _BLAZE_MATH_DENSE_UNIFORMMATRIX_H_
36#define _BLAZE_MATH_DENSE_UNIFORMMATRIX_H_
192template<
typename Type
196 :
public Expression< DenseMatrix< UniformMatrix<Type,SO,Tag>, SO > >
230 template<
typename NewType >
239 template<
size_t NewM
268 template< typename MT,
bool SO2 >
306 template< typename MT,
bool SO2 > inline
UniformMatrix& operator= ( const
Matrix<MT,SO2>& rhs ) &;
307 template< typename MT,
bool SO2 > inline
UniformMatrix& operator+=( const
Matrix<MT,SO2>& rhs ) &;
308 template< typename MT,
bool SO2 > inline
UniformMatrix& operator-=( const
Matrix<MT,SO2>& rhs ) &;
309 template< typename MT,
bool SO2 > inline
UniformMatrix& operator%=( const
Matrix<MT,SO2>& rhs ) &;
310 template< typename MT,
bool SO2 > inline
UniformMatrix& operator*=( const
Matrix<MT,SO2>& rhs ) &;
312 template< typename ST >
315 template< typename ST >
323 constexpr
size_t rows() const noexcept;
327 constexpr
size_t capacity(
size_t i ) const noexcept;
332 constexpr
void resize (
size_t m,
size_t n,
bool preserve=true );
333 constexpr
void extend (
size_t m,
size_t n,
bool preserve=true );
344 template< typename Other > inline
UniformMatrix& scale( const Other& scalar );
358 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
359 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
403template< typename
Type
420template<
typename Type
440template<
typename Type
460template<
typename Type
474 if(
m_ > 0UL &&
n_ > 0UL ) {
499template<
typename Type
526template<
typename Type
556template<
typename Type
575template<
typename Type
602template<
typename Type
629template<
typename Type
656template<
typename Type
683template<
typename Type
713template<
typename Type
735template<
typename Type
743 using TT =
decltype(
trans( *
this ) );
744 using CT =
decltype(
ctrans( *
this ) );
760 n_ = (*rhs).columns();
762 if( (*rhs).rows() > 0UL && (*rhs).columns() > 0UL ) {
782template<
typename Type
792 if( (*rhs).rows() !=
m_ || (*rhs).columns() !=
n_ ) {
800 if(
m_ > 0UL &&
n_ > 0UL ) {
801 value_ += (*rhs)(0UL,0UL);
819template<
typename Type
829 if( (*rhs).rows() !=
m_ || (*rhs).columns() !=
n_ ) {
837 if(
m_ > 0UL &&
n_ > 0UL ) {
838 value_ -= (*rhs)(0UL,0UL);
856template<
typename Type
866 if( (*rhs).rows() !=
m_ || (*rhs).columns() !=
n_ ) {
874 if(
m_ > 0UL &&
n_ > 0UL ) {
875 value_ *= (*rhs)(0UL,0UL);
893template<
typename Type
903 if( (*rhs).rows() !=
n_ ) {
911 n_ = (*rhs).columns();
913 if(
m_ > 0UL &&
n_ > 0UL ) {
929template<
typename Type
932template<
typename ST >
933inline auto UniformMatrix<Type,SO,Tag>::operator*=( ST scalar ) &
952template<
typename Type
955template<
typename ST >
981template<
typename Type
996template<
typename Type
1016template<
typename Type
1021 return SO ?
m_ :
n_;
1031template<
typename Type
1052template<
typename Type
1060 return SO ?
m_ :
n_;
1074template<
typename Type
1099template<
typename Type
1109 const size_t tmp( SO ?
m_ :
n_ );
1123template<
typename Type
1142template<
typename Type
1167template<
typename Type
1192template<
typename Type
1208template<
typename Type
1235template<
typename Type
1254template<
typename Type
1286template<
typename Type
1289template<
typename Other >
1292 if(
m_ > 0UL &&
n_ > 0UL ) {
1319template<
typename Type
1322template<
typename Other >
1325 return static_cast<const void*
>( this ) ==
static_cast<const void*
>( alias );
1340template<
typename Type
1343template<
typename Other >
1346 return static_cast<const void*
>( this ) ==
static_cast<const void*
>( alias );
1360template<
typename Type
1380template<
typename Type
1385 return (
rows() *
columns() >= SMP_DMATASSIGN_THRESHOLD );
1405template<
typename Type
1411 return loada( i, j );
1431template<
typename Type
1466template<
typename Type
1501template< RelaxationFlag RF,
typename Type,
bool SO,
typename Tag >
1504template<
typename Type,
bool SO,
typename Tag >
1507template<
typename Type,
bool SO,
typename Tag >
1567template<
typename Type
1587template<
typename Type
1639template<
bool SO = defaultStorageOrder,
typename T >
1640constexpr decltype(
auto)
uniform(
size_t m,
size_t n, T&& init )
1657template<
typename Type,
bool SO,
typename Tag >
1658struct IsUniform< UniformMatrix<Type,SO,Tag> >
1675template<
typename Type,
bool SO,
typename Tag >
1693template<
typename T1,
typename T2 >
1694struct AddTraitEval1< T1, T2
1731template<
typename T1,
typename T2 >
1732struct SubTraitEval1< T1, T2
1769template<
typename T1,
typename T2 >
1770struct SchurTraitEval1< T1, T2
1803template<
typename T1,
typename T2 >
1804struct MultTraitEval1< T1, T2
1815template<
typename T1,
typename T2 >
1816struct MultTraitEval1< T1, T2
1827template<
typename T1,
typename T2 >
1828struct MultTraitEval1< T1, T2
1839template<
typename T1,
typename T2 >
1840struct MultTraitEval1< T1, T2
1867template<
typename T1,
typename T2 >
1868struct KronTraitEval1< T1, T2
1892template<
typename T1,
typename T2 >
1893struct DivTraitEval1< T1, T2
1916template<
typename T,
typename OP >
1917struct UnaryMapTraitEval1< T, OP
1922 using ElementType =
decltype( std::declval<OP>()( std::declval< ElementType_t<T> >() ) );
1934template<
typename T1,
typename T2,
typename OP >
1935struct BinaryMapTraitEval1< T1, T2, OP
1941 using ElementType =
decltype( std::declval<OP>()( std::declval< ElementType_t<T1> >()
1942 , std::declval< ElementType_t<T2> >() ) );
1949template<
typename T1,
typename T2,
typename OP >
1950struct BinaryMapTraitEval1< T1, T2, OP
1956 using ElementType =
decltype( std::declval<OP>()( std::declval< ElementType_t<T1> >()
1957 , std::declval< ElementType_t<T2> >() ) );
1990template<
typename T,
size_t E >
1991struct ExpandTraitEval1< T, E
2013template<
typename T,
size_t R0,
size_t R1 >
2014struct RepeatTraitEval1< T, R0, R1,
inf
2036template<
typename T1,
bool SO,
typename Tag,
typename T2 >
2039 using Type = UniformMatrix< typename HighType<T1,T2>::Type, SO, Tag >;
2055template<
typename T1,
bool SO,
typename Tag,
typename T2 >
2058 using Type = UniformMatrix< typename LowType<T1,T2>::Type, SO, Tag >;
2074template<
typename MT,
size_t I,
size_t J,
size_t M,
size_t N >
2075struct SubmatrixTraitEval1< MT, I, J, M, N
2096template<
typename MT,
size_t M >
2097struct RowsTraitEval1< MT, M
2118template<
typename MT,
size_t N >
2119struct ColumnsTraitEval1< MT, N
Header file for the addition trait.
Header file for auxiliary alias declarations.
typename ResultType_t< T >::TagType TagType_t
Alias declaration for nested TagType type definitions.
Definition Aliases.h:530
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.
Definition Aliases.h:190
Header file for the alignment flag enumeration.
Header file for run time assertion macros.
Header file for the columns trait.
Header file for the conjugate shim.
Constraint on the data type.
Header file for the division trait.
Header file for the EnableIf class template.
Header file for the EvaluateTrait class template.
Header file for the expand trait.
Header file for the HighType type trait.
Header file for the IntegralConstant class template.
Header file for the IsAligned type trait.
Header file for the IsColumnVector type trait.
Header file for the isDefault shim.
Header file for the IsDenseMatrix type trait.
Header file for the IsMatrix type trait.
Header file for the IsRowVector type trait.
Header file for the IsSMPAssignable type trait.
Header file for the IsScalar type trait.
Header file for the IsSymmetric type trait.
Header file for the IsVector type trait.
Header file for the IsVectorizable type trait.
Header file for the Kron product trait.
Header file for the LowType type trait.
Header file for the map trait.
Header file for the MAYBE_UNUSED function template.
Header file for the multiplication trait.
Constraint on the data type.
Constraint on the data type.
Header file for the relaxation flag enumeration.
Header file for the RemoveCVRef type trait.
Header file for the RemoveConst type trait.
Header file for the repeat trait.
Header file for the rows trait.
Header file for all SIMD functionality.
Header file for the Schur product trait.
Header file for the subtraction trait.
Header file for the submatrix trait.
Constraint on the data type.
Constraint on the data type.
Header file for the YieldsZero type trait.
Base class for matrices.
Definition Matrix.h:85
Header file for the DenseMatrix base class.
Header file for the Expression base class.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VOLATILE(T)
Constraint on the data type.
Definition Volatile.h:79
#define BLAZE_CONSTRAINT_MUST_NOT_BE_POINTER_TYPE(T)
Constraint on the data type.
Definition Pointer.h:79
#define BLAZE_CONSTRAINT_MUST_BE_VECTORIZABLE_TYPE(T)
Constraint on the data type.
Definition Vectorizable.h:61
#define BLAZE_CONSTRAINT_MUST_NOT_BE_CONST(T)
Constraint on the data type.
Definition Const.h:79
#define BLAZE_CONSTRAINT_MUST_BE_SAME_TAG(A, B)
Data type constraint.
Definition SameTag.h:68
#define BLAZE_CONSTRAINT_MUST_NOT_BE_REFERENCE_TYPE(T)
Constraint on the data type.
Definition Reference.h:79
decltype(auto) ctrans(const DenseMatrix< MT, SO > &dm)
Returns the conjugate transpose matrix of dm.
Definition DMatMapExpr.h:1501
bool isUniform(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a uniform matrix.
Definition DenseMatrix.h:1766
decltype(auto) trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition DMatTransExpr.h:766
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition DiagonalMatrix.h:207
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b) noexcept
Swapping the contents of two matrices.
Definition DiagonalMatrix.h:225
bool isDefault(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the given diagonal matrix is in default state.
Definition DiagonalMatrix.h:169
BLAZE_ALWAYS_INLINE void conjugate(T &a) noexcept(IsNumeric_v< T >)
In-place conjugation of the given value/object.
Definition Conjugate.h:118
typename SubTrait< T1, T2 >::Type SubTrait_t
Auxiliary alias declaration for the SubTrait class template.
Definition SubTrait.h:163
typename AddTrait< T1, T2 >::Type AddTrait_t
Auxiliary alias declaration for the AddTrait class template.
Definition AddTrait.h:163
typename MapTrait< Args... >::Type MapTrait_t
Auxiliary alias declaration for the MapTrait class template.
Definition MapTrait.h:131
typename DivTrait< T1, T2 >::Type DivTrait_t
Auxiliary alias declaration for the DivTrait class template.
Definition DivTrait.h:164
typename MultTrait< T1, T2 >::Type MultTrait_t
Auxiliary alias declaration for the MultTrait class template.
Definition MultTrait.h:165
constexpr bool IsSymmetric_v
Auxiliary variable template for the IsSymmetric type trait.
Definition IsSymmetric.h:172
constexpr bool IsScalar_v
Auxiliary variable template for the IsScalar type trait.
Definition IsScalar.h:104
constexpr bool IsUniform_v
Auxiliary variable template for the IsUniform type trait.
Definition IsUniform.h:164
constexpr bool StorageOrder_v
Auxiliary variable template for the StorageOrder type trait.
Definition StorageOrder.h:93
constexpr bool IsVector_v
Auxiliary variable template for the IsVector type trait.
Definition IsVector.h:125
constexpr bool YieldsUniform_v
Auxiliary variable template for the YieldsUniform type trait.
Definition YieldsUniform.h:125
constexpr bool IsZero_v
Auxiliary variable template for the IsZero type trait.
Definition IsZero.h:166
constexpr bool YieldsZero_v
Auxiliary variable template for the YieldsZero type trait.
Definition YieldsZero.h:125
constexpr bool IsMatrix_v
Auxiliary variable template for the IsMatrix type trait.
Definition IsMatrix.h:124
constexpr bool IsColumnVector_v
Auxiliary variable template for the IsColumnVector type trait.
Definition IsColumnVector.h:126
constexpr bool IsSMPAssignable_v
Auxiliary variable template for the IsSMPAssignable type trait.
Definition IsSMPAssignable.h:132
constexpr bool IsRowVector_v
Auxiliary variable template for the IsRowVector type trait.
Definition IsRowVector.h:126
constexpr bool IsDenseMatrix_v
Auxiliary variable template for the IsDenseMatrix type trait.
Definition IsDenseMatrix.h:124
RelaxationFlag
Relaxation flag for strict or relaxed semantics.
Definition RelaxationFlag.h:66
constexpr Infinity inf
Global Infinity instance.
Definition Infinity.h:1080
constexpr void clear(Matrix< MT, SO > &matrix)
Clearing the given matrix.
Definition Matrix.h:960
constexpr size_t size(const Matrix< MT, SO > &matrix) noexcept
Returns the total number of elements of the matrix.
Definition Matrix.h:676
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.
Definition Assert.h:101
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.
Definition Assert.h:117
BLAZE_ALWAYS_INLINE const EnableIf_t< IsIntegral_v< T > &&HasSize_v< T, 1UL >, If_t< IsSigned_v< T >, SIMDint8, SIMDuint8 > > set(T value) noexcept
Sets all values in the vector to the given 1-byte integral value.
Definition Set.h:75
typename SIMDTrait< T >::Type SIMDTrait_t
Auxiliary alias declaration for the SIMDTrait class template.
Definition SIMDTrait.h:315
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition Inline.h:85
constexpr bool IsSame_v
Auxiliary variable template for the IsSame type trait.
Definition IsSame.h:159
constexpr bool IsVectorizable_v
Auxiliary variable template for the IsVectorizable type trait.
Definition IsVectorizable.h:157
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition MaybeUnused.h:81
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.
Definition EnableIf.h:138
BoolConstant< true > TrueType
Type traits base class.
Definition IntegralConstant.h:132
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.
Definition Exception.h:331
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.
Definition Exception.h:235
Header file for the exception macros of the math module.
Header file for all forward declarations of the math module.
constexpr bool rowMajor
Storage order flag for row-major matrices.
Definition StorageOrder.h:71
constexpr bool columnMajor
Storage order flag for column-major matrices.
Definition StorageOrder.h:99
Header file for all forward declarations for dense vectors and matrices.
Header file for the StorageOrder type trait.
Header file for the clear shim.
Header file for the reset shim.
Base class for all expression templates.
Definition Expression.h:60
Base template for the HighType type trait.
Definition HighType.h:322
Compile time check for the alignment of data types.
Definition IsAligned.h:88
Base template for the LowType type trait.
Definition LowType.h:322
System settings for the inline keywords.
Header file for the thresholds for matrix/vector and matrix/matrix multiplications.
Header file for the IsZero type trait.
Header file for basic type definitions.