35 #ifndef _BLAZE_MATH_SMP_THREADS_DENSEMATRIX_H_
36 #define _BLAZE_MATH_SMP_THREADS_DENSEMATRIX_H_
91 template<
typename MT1
94 void smpAssign_backend( DenseMatrix<MT1,SO>& lhs,
const DenseMatrix<MT2,rowMajor>& rhs )
102 typedef IntrinsicTrait<typename MT1::ElementType> IT;
103 typedef typename SubmatrixExprTrait<MT1,aligned>::Type AlignedTarget;
104 typedef typename SubmatrixExprTrait<MT1,unaligned>::Type UnalignedTarget;
106 const bool vectorizable( MT1::vectorizable && MT2::vectorizable && IsSame<ET1,ET2>::value );
107 const bool lhsAligned ( (~lhs).isAligned() );
108 const bool rhsAligned ( (~rhs).isAligned() );
110 const size_t threads ( TheThreadBackend::size() );
111 const size_t addon ( ( ( (~lhs).
rows() % threads ) != 0UL )? 1UL : 0UL );
112 const size_t equalShare ( (~lhs).
rows() / threads + addon );
113 const size_t rest ( equalShare & ( IT::size - 1UL ) );
114 const size_t rowsPerThread( ( vectorizable && rest )?( equalShare - rest + IT::size ):( equalShare ) );
116 for(
size_t i=0UL; i<threads; ++i )
118 const size_t row( i*rowsPerThread );
123 const size_t m( min( rowsPerThread, (~lhs).
rows() -
row ) );
125 if( vectorizable && lhsAligned && rhsAligned ) {
126 AlignedTarget target( submatrix<aligned>( ~lhs,
row, 0UL, m, (~lhs).
columns() ) );
127 TheThreadBackend::scheduleAssign( target, submatrix<aligned>( ~rhs,
row, 0UL, m, (~lhs).
columns() ) );
129 else if( vectorizable && lhsAligned ) {
130 AlignedTarget target( submatrix<aligned>( ~lhs,
row, 0UL, m, (~lhs).
columns() ) );
131 TheThreadBackend::scheduleAssign( target, submatrix<unaligned>( ~rhs,
row, 0UL, m, (~lhs).
columns() ) );
133 else if( vectorizable && rhsAligned ) {
134 UnalignedTarget target( submatrix<unaligned>( ~lhs,
row, 0UL, m, (~lhs).
columns() ) );
135 TheThreadBackend::scheduleAssign( target, submatrix<aligned>( ~rhs,
row, 0UL, m, (~lhs).
columns() ) );
138 UnalignedTarget target( submatrix<unaligned>( ~lhs,
row, 0UL, m, (~lhs).
columns() ) );
139 TheThreadBackend::scheduleAssign( target, submatrix<unaligned>( ~rhs,
row, 0UL, m, (~lhs).
columns() ) );
143 TheThreadBackend::wait();
166 template<
typename MT1
169 void smpAssign_backend( DenseMatrix<MT1,SO>& lhs,
const DenseMatrix<MT2,columnMajor>& rhs )
177 typedef IntrinsicTrait<typename MT1::ElementType> IT;
178 typedef typename SubmatrixExprTrait<MT1,aligned>::Type AlignedTarget;
179 typedef typename SubmatrixExprTrait<MT1,unaligned>::Type UnalignedTarget;
181 const bool vectorizable( MT1::vectorizable && MT2::vectorizable && IsSame<ET1,ET2>::value );
182 const bool lhsAligned ( (~lhs).isAligned() );
183 const bool rhsAligned ( (~rhs).isAligned() );
185 const size_t threads ( TheThreadBackend::size() );
186 const size_t addon ( ( ( (~lhs).
columns() % threads ) != 0UL )? 1UL : 0UL );
187 const size_t equalShare ( (~lhs).
columns() / threads + addon );
188 const size_t rest ( equalShare & ( IT::size - 1UL ) );
189 const size_t colsPerThread( ( vectorizable && rest )?( equalShare - rest + IT::size ):( equalShare ) );
191 for(
size_t i=0UL; i<threads; ++i )
193 const size_t column( i*colsPerThread );
198 const size_t n( min( colsPerThread, (~lhs).
columns() -
column ) );
200 if( vectorizable && lhsAligned && rhsAligned ) {
201 AlignedTarget target( submatrix<aligned>( ~lhs, 0UL,
column, (~lhs).
rows(), n ) );
202 TheThreadBackend::scheduleAssign( target, submatrix<aligned>( ~rhs, 0UL,
column, (~lhs).
rows(), n ) );
204 else if( vectorizable && lhsAligned ) {
205 AlignedTarget target( submatrix<aligned>( ~lhs, 0UL,
column, (~lhs).
rows(), n ) );
206 TheThreadBackend::scheduleAssign( target, submatrix<unaligned>( ~rhs, 0UL,
column, (~lhs).
rows(), n ) );
208 else if( vectorizable && rhsAligned ) {
209 UnalignedTarget target( submatrix<unaligned>( ~lhs, 0UL,
column, (~lhs).
rows(), n ) );
210 TheThreadBackend::scheduleAssign( target, submatrix<aligned>( ~rhs, 0UL,
column, (~lhs).
rows(), n ) );
213 UnalignedTarget target( submatrix<unaligned>( ~lhs, 0UL,
column, (~lhs).
rows(), n ) );
214 TheThreadBackend::scheduleAssign( target, submatrix<unaligned>( ~rhs, 0UL,
column, (~lhs).
rows(), n ) );
218 TheThreadBackend::wait();
241 template<
typename MT1
244 void smpAssign_backend( DenseMatrix<MT1,SO>& lhs,
const SparseMatrix<MT2,rowMajor>& rhs )
252 typedef typename SubmatrixExprTrait<MT1,unaligned>::Type UnalignedTarget;
254 const size_t threads ( TheThreadBackend::size() );
255 const size_t addon ( ( ( (~lhs).
rows() % threads ) != 0UL )? 1UL : 0UL );
256 const size_t rowsPerThread( (~lhs).
rows() / threads + addon );
258 for(
size_t i=0UL; i<threads; ++i )
260 const size_t row( i*rowsPerThread );
265 const size_t m( min( rowsPerThread, (~lhs).
rows() -
row ) );
266 UnalignedTarget target( submatrix<unaligned>( ~lhs,
row, 0UL, m, (~lhs).
columns() ) );
267 TheThreadBackend::scheduleAssign( target, submatrix<unaligned>( ~rhs,
row, 0UL, m, (~lhs).
columns() ) );
270 TheThreadBackend::wait();
293 template<
typename MT1
296 void smpAssign_backend( DenseMatrix<MT1,SO>& lhs,
const SparseMatrix<MT2,columnMajor>& rhs )
304 typedef typename SubmatrixExprTrait<MT1,unaligned>::Type UnalignedTarget;
306 const size_t threads ( TheThreadBackend::size() );
307 const size_t addon ( ( ( (~lhs).
columns() % threads ) != 0UL )? 1UL : 0UL );
308 const size_t colsPerThread( (~lhs).
columns() / threads + addon );
310 for(
size_t i=0UL; i<threads; ++i )
312 const size_t column( i*colsPerThread );
317 const size_t n( min( colsPerThread, (~lhs).
columns() -
column ) );
318 UnalignedTarget target( submatrix<unaligned>( ~lhs, 0UL,
column, (~lhs).
rows(), n ) );
319 TheThreadBackend::scheduleAssign( target, submatrix<unaligned>( ~rhs, 0UL,
column, (~lhs).
rows(), n ) );
322 TheThreadBackend::wait();
346 template<
typename MT1
350 inline typename DisableIf< And< IsSMPAssignable<MT1>, IsSMPAssignable<MT2> > >::Type
351 smpAssign( DenseMatrix<MT1,SO1>& lhs,
const Matrix<MT2,SO2>& rhs )
382 template<
typename MT1
386 inline typename EnableIf< And< IsSMPAssignable<MT1>, IsSMPAssignable<MT2> > >::Type
387 smpAssign( DenseMatrix<MT1,SO1>& lhs,
const Matrix<MT2,SO2>& rhs )
403 smpAssign_backend( ~lhs, ~rhs );
436 template<
typename MT1
439 void smpAddAssign_backend( DenseMatrix<MT1,SO>& lhs,
const DenseMatrix<MT2,rowMajor>& rhs )
447 typedef IntrinsicTrait<typename MT1::ElementType> IT;
448 typedef typename SubmatrixExprTrait<MT1,aligned>::Type AlignedTarget;
449 typedef typename SubmatrixExprTrait<MT1,unaligned>::Type UnalignedTarget;
451 const bool vectorizable( MT1::vectorizable && MT2::vectorizable && IsSame<ET1,ET2>::value );
452 const bool lhsAligned ( (~lhs).isAligned() );
453 const bool rhsAligned ( (~rhs).isAligned() );
455 const size_t threads ( TheThreadBackend::size() );
456 const size_t addon ( ( ( (~lhs).
rows() % threads ) != 0UL )? 1UL : 0UL );
457 const size_t equalShare ( (~lhs).
rows() / threads + addon );
458 const size_t rest ( equalShare & ( IT::size - 1UL ) );
459 const size_t rowsPerThread( ( vectorizable && rest )?( equalShare - rest + IT::size ):( equalShare ) );
461 for(
size_t i=0UL; i<threads; ++i )
463 const size_t row( i*rowsPerThread );
468 const size_t m( min( rowsPerThread, (~lhs).
rows() -
row ) );
470 if( vectorizable && lhsAligned && rhsAligned ) {
471 AlignedTarget target( submatrix<aligned>( ~lhs,
row, 0UL, m, (~lhs).
columns() ) );
472 TheThreadBackend::scheduleAddAssign( target, submatrix<aligned>( ~rhs,
row, 0UL, m, (~lhs).
columns() ) );
474 else if( vectorizable && lhsAligned ) {
475 AlignedTarget target( submatrix<aligned>( ~lhs,
row, 0UL, m, (~lhs).
columns() ) );
476 TheThreadBackend::scheduleAddAssign( target, submatrix<unaligned>( ~rhs,
row, 0UL, m, (~lhs).
columns() ) );
478 else if( vectorizable && rhsAligned ) {
479 UnalignedTarget target( submatrix<unaligned>( ~lhs,
row, 0UL, m, (~lhs).
columns() ) );
480 TheThreadBackend::scheduleAddAssign( target, submatrix<aligned>( ~rhs,
row, 0UL, m, (~lhs).
columns() ) );
483 UnalignedTarget target( submatrix<unaligned>( ~lhs,
row, 0UL, m, (~lhs).
columns() ) );
484 TheThreadBackend::scheduleAddAssign( target, submatrix<unaligned>( ~rhs,
row, 0UL, m, (~lhs).
columns() ) );
488 TheThreadBackend::wait();
511 template<
typename MT1
514 void smpAddAssign_backend( DenseMatrix<MT1,SO>& lhs,
const DenseMatrix<MT2,columnMajor>& rhs )
522 typedef IntrinsicTrait<typename MT1::ElementType> IT;
523 typedef typename SubmatrixExprTrait<MT1,aligned>::Type AlignedTarget;
524 typedef typename SubmatrixExprTrait<MT1,unaligned>::Type UnalignedTarget;
526 const bool vectorizable( MT1::vectorizable && MT2::vectorizable && IsSame<ET1,ET2>::value );
527 const bool lhsAligned ( (~lhs).isAligned() );
528 const bool rhsAligned ( (~rhs).isAligned() );
530 const size_t threads ( TheThreadBackend::size() );
531 const size_t addon ( ( ( (~lhs).
columns() % threads ) != 0UL )? 1UL : 0UL );
532 const size_t equalShare ( (~lhs).
columns() / threads + addon );
533 const size_t rest ( equalShare & ( IT::size - 1UL ) );
534 const size_t colsPerThread( ( vectorizable && rest )?( equalShare - rest + IT::size ):( equalShare ) );
536 for(
size_t i=0UL; i<threads; ++i )
538 const size_t column( i*colsPerThread );
543 const size_t n( min( colsPerThread, (~lhs).
columns() -
column ) );
545 if( vectorizable && lhsAligned && rhsAligned ) {
546 AlignedTarget target( submatrix<aligned>( ~lhs, 0UL,
column, (~lhs).
rows(), n ) );
547 TheThreadBackend::scheduleAddAssign( target, submatrix<aligned>( ~rhs, 0UL,
column, (~lhs).
rows(), n ) );
549 else if( vectorizable && lhsAligned ) {
550 AlignedTarget target( submatrix<aligned>( ~lhs, 0UL,
column, (~lhs).
rows(), n ) );
551 TheThreadBackend::scheduleAddAssign( target, submatrix<unaligned>( ~rhs, 0UL,
column, (~lhs).
rows(), n ) );
553 else if( vectorizable && rhsAligned ) {
554 UnalignedTarget target( submatrix<unaligned>( ~lhs, 0UL,
column, (~lhs).
rows(), n ) );
555 TheThreadBackend::scheduleAddAssign( target, submatrix<aligned>( ~rhs, 0UL,
column, (~lhs).
rows(), n ) );
558 UnalignedTarget target( submatrix<unaligned>( ~lhs, 0UL,
column, (~lhs).
rows(), n ) );
559 TheThreadBackend::scheduleAddAssign( target, submatrix<unaligned>( ~rhs, 0UL,
column, (~lhs).
rows(), n ) );
563 TheThreadBackend::wait();
586 template<
typename MT1
589 void smpAddAssign_backend( DenseMatrix<MT1,SO>& lhs,
const SparseMatrix<MT2,rowMajor>& rhs )
597 typedef typename SubmatrixExprTrait<MT1,unaligned>::Type UnalignedTarget;
599 const size_t threads ( TheThreadBackend::size() );
600 const size_t addon ( ( ( (~lhs).
rows() % threads ) != 0UL )? 1UL : 0UL );
601 const size_t rowsPerThread( (~lhs).
rows() / threads + addon );
603 for(
size_t i=0UL; i<threads; ++i )
605 const size_t row( i*rowsPerThread );
610 const size_t m( min( rowsPerThread, (~lhs).
rows() -
row ) );
611 UnalignedTarget target( submatrix<unaligned>( ~lhs,
row, 0UL, m, (~lhs).
columns() ) );
612 TheThreadBackend::scheduleAddAssign( target, submatrix<unaligned>( ~rhs,
row, 0UL, m, (~lhs).
columns() ) );
615 TheThreadBackend::wait();
638 template<
typename MT1
641 void smpAddAssign_backend( DenseMatrix<MT1,SO>& lhs,
const SparseMatrix<MT2,columnMajor>& rhs )
649 typedef typename SubmatrixExprTrait<MT1,unaligned>::Type UnalignedTarget;
651 const size_t threads ( TheThreadBackend::size() );
652 const size_t addon ( ( ( (~lhs).
columns() % threads ) != 0UL )? 1UL : 0UL );
653 const size_t colsPerThread( (~lhs).
columns() / threads + addon );
655 for(
size_t i=0UL; i<threads; ++i )
657 const size_t column( i*colsPerThread );
662 const size_t n( min( colsPerThread, (~lhs).
columns() -
column ) );
663 UnalignedTarget target( submatrix<unaligned>( ~lhs, 0UL,
column, (~lhs).
rows(), n ) );
664 TheThreadBackend::scheduleAddAssign( target, submatrix<unaligned>( ~rhs, 0UL,
column, (~lhs).
rows(), n ) );
667 TheThreadBackend::wait();
692 template<
typename MT1
696 inline typename DisableIf< And< IsSMPAssignable<MT1>, IsSMPAssignable<MT2> > >::Type
697 smpAddAssign( DenseMatrix<MT1,SO1>& lhs,
const Matrix<MT2,SO2>& rhs )
728 template<
typename MT1
732 inline typename EnableIf< And< IsSMPAssignable<MT1>, IsSMPAssignable<MT2> > >::Type
733 smpAddAssign( DenseMatrix<MT1,SO1>& lhs,
const Matrix<MT2,SO2>& rhs )
749 smpAddAssign_backend( ~lhs, ~rhs );
782 template<
typename MT1
785 void smpSubAssign_backend( DenseMatrix<MT1,SO>& lhs,
const DenseMatrix<MT2,rowMajor>& rhs )
793 typedef IntrinsicTrait<typename MT1::ElementType> IT;
794 typedef typename SubmatrixExprTrait<MT1,aligned>::Type AlignedTarget;
795 typedef typename SubmatrixExprTrait<MT1,unaligned>::Type UnalignedTarget;
797 const bool vectorizable( MT1::vectorizable && MT2::vectorizable && IsSame<ET1,ET2>::value );
798 const bool lhsAligned ( (~lhs).isAligned() );
799 const bool rhsAligned ( (~rhs).isAligned() );
801 const size_t threads ( TheThreadBackend::size() );
802 const size_t addon ( ( ( (~lhs).
rows() % threads ) != 0UL )? 1UL : 0UL );
803 const size_t equalShare ( (~lhs).
rows() / threads + addon );
804 const size_t rest ( equalShare & ( IT::size - 1UL ) );
805 const size_t rowsPerThread( ( vectorizable && rest )?( equalShare - rest + IT::size ):( equalShare ) );
807 for(
size_t i=0UL; i<threads; ++i )
809 const size_t row( i*rowsPerThread );
814 const size_t m( min( rowsPerThread, (~lhs).
rows() -
row ) );
816 if( vectorizable && lhsAligned && rhsAligned ) {
817 AlignedTarget target( submatrix<aligned>( ~lhs,
row, 0UL, m, (~lhs).
columns() ) );
818 TheThreadBackend::scheduleSubAssign( target, submatrix<aligned>( ~rhs,
row, 0UL, m, (~lhs).
columns() ) );
820 else if( vectorizable && lhsAligned ) {
821 AlignedTarget target( submatrix<aligned>( ~lhs,
row, 0UL, m, (~lhs).
columns() ) );
822 TheThreadBackend::scheduleSubAssign( target, submatrix<unaligned>( ~rhs,
row, 0UL, m, (~lhs).
columns() ) );
824 else if( vectorizable && rhsAligned ) {
825 UnalignedTarget target( submatrix<unaligned>( ~lhs,
row, 0UL, m, (~lhs).
columns() ) );
826 TheThreadBackend::scheduleSubAssign( target, submatrix<aligned>( ~rhs,
row, 0UL, m, (~lhs).
columns() ) );
829 UnalignedTarget target( submatrix<unaligned>( ~lhs,
row, 0UL, m, (~lhs).
columns() ) );
830 TheThreadBackend::scheduleSubAssign( target, submatrix<unaligned>( ~rhs,
row, 0UL, m, (~lhs).
columns() ) );
834 TheThreadBackend::wait();
857 template<
typename MT1
860 void smpSubAssign_backend( DenseMatrix<MT1,SO>& lhs,
const DenseMatrix<MT2,columnMajor>& rhs )
868 typedef IntrinsicTrait<typename MT1::ElementType> IT;
869 typedef typename SubmatrixExprTrait<MT1,aligned>::Type AlignedTarget;
870 typedef typename SubmatrixExprTrait<MT1,unaligned>::Type UnalignedTarget;
872 const bool vectorizable( MT1::vectorizable && MT2::vectorizable && IsSame<ET1,ET2>::value );
873 const bool lhsAligned ( (~lhs).isAligned() );
874 const bool rhsAligned ( (~rhs).isAligned() );
876 const size_t threads ( TheThreadBackend::size() );
877 const size_t addon ( ( ( (~lhs).
columns() % threads ) != 0UL )? 1UL : 0UL );
878 const size_t equalShare ( (~lhs).
columns() / threads + addon );
879 const size_t rest ( equalShare & ( IT::size - 1UL ) );
880 const size_t colsPerThread( ( vectorizable && rest )?( equalShare - rest + IT::size ):( equalShare ) );
882 for(
size_t i=0UL; i<threads; ++i )
884 const size_t column( i*colsPerThread );
889 const size_t n( min( colsPerThread, (~lhs).
columns() -
column ) );
891 if( vectorizable && lhsAligned && rhsAligned ) {
892 AlignedTarget target( submatrix<aligned>( ~lhs, 0UL,
column, (~lhs).
rows(), n ) );
893 TheThreadBackend::scheduleSubAssign( target, submatrix<aligned>( ~rhs, 0UL,
column, (~lhs).
rows(), n ) );
895 else if( vectorizable && lhsAligned ) {
896 AlignedTarget target( submatrix<aligned>( ~lhs, 0UL,
column, (~lhs).
rows(), n ) );
897 TheThreadBackend::scheduleSubAssign( target, submatrix<unaligned>( ~rhs, 0UL,
column, (~lhs).
rows(), n ) );
899 else if( vectorizable && rhsAligned ) {
900 UnalignedTarget target( submatrix<unaligned>( ~lhs, 0UL,
column, (~lhs).
rows(), n ) );
901 TheThreadBackend::scheduleSubAssign( target, submatrix<aligned>( ~rhs, 0UL,
column, (~lhs).
rows(), n ) );
904 UnalignedTarget target( submatrix<unaligned>( ~lhs, 0UL,
column, (~lhs).
rows(), n ) );
905 TheThreadBackend::scheduleSubAssign( target, submatrix<unaligned>( ~rhs, 0UL,
column, (~lhs).
rows(), n ) );
909 TheThreadBackend::wait();
932 template<
typename MT1
935 void smpSubAssign_backend( DenseMatrix<MT1,SO>& lhs,
const SparseMatrix<MT2,rowMajor>& rhs )
943 typedef typename SubmatrixExprTrait<MT1,unaligned>::Type UnalignedTarget;
945 const size_t threads ( TheThreadBackend::size() );
946 const size_t addon ( ( ( (~lhs).
rows() % threads ) != 0UL )? 1UL : 0UL );
947 const size_t rowsPerThread( (~lhs).
rows() / threads + addon );
949 for(
size_t i=0UL; i<threads; ++i )
951 const size_t row( i*rowsPerThread );
956 const size_t m( min( rowsPerThread, (~lhs).
rows() -
row ) );
957 UnalignedTarget target( submatrix<unaligned>( ~lhs,
row, 0UL, m, (~lhs).
columns() ) );
958 TheThreadBackend::scheduleSubAssign( target, submatrix<unaligned>( ~rhs,
row, 0UL, m, (~lhs).
columns() ) );
961 TheThreadBackend::wait();
984 template<
typename MT1
987 void smpSubAssign_backend( DenseMatrix<MT1,SO>& lhs,
const SparseMatrix<MT2,columnMajor>& rhs )
995 typedef typename SubmatrixExprTrait<MT1,unaligned>::Type UnalignedTarget;
997 const size_t threads ( TheThreadBackend::size() );
998 const size_t addon ( ( ( (~lhs).
columns() % threads ) != 0UL )? 1UL : 0UL );
999 const size_t colsPerThread( (~lhs).
columns() / threads + addon );
1001 for(
size_t i=0UL; i<threads; ++i )
1003 const size_t column( i*colsPerThread );
1008 const size_t n( min( colsPerThread, (~lhs).
columns() -
column ) );
1009 UnalignedTarget target( submatrix<unaligned>( ~lhs, 0UL,
column, (~lhs).
rows(), n ) );
1010 TheThreadBackend::scheduleSubAssign( target, submatrix<unaligned>( ~rhs, 0UL,
column, (~lhs).
rows(), n ) );
1013 TheThreadBackend::wait();
1038 template<
typename MT1
1042 inline typename DisableIf< And< IsSMPAssignable<MT1>, IsSMPAssignable<MT2> > >::Type
1043 smpSubAssign( DenseMatrix<MT1,SO1>& lhs,
const Matrix<MT2,SO2>& rhs )
1075 template<
typename MT1
1079 inline typename EnableIf< And< IsSMPAssignable<MT1>, IsSMPAssignable<MT2> > >::Type
1080 smpSubAssign( DenseMatrix<MT1,SO1>& lhs,
const Matrix<MT2,SO2>& rhs )
1096 smpSubAssign_backend( ~lhs, ~rhs );
1129 template<
typename MT1
1133 inline void smpMultAssign( DenseMatrix<MT1,SO1>& lhs,
const Matrix<MT2,SO2>& rhs )
Header file for mathematical functions.
void smpSubAssign(DenseMatrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:152
#define BLAZE_BOOST_THREADS_PARALLEL_MODE
Compilation switch for the Boost parallelization.This compilation switch enables/disables the paralle...
Definition: SMP.h:122
void smpMultAssign(DenseVector< VT1, TF1 > &lhs, const Vector< VT2, TF2 > &rhs)
Default implementation of the SMP multiplication assignment of a vector to a dense vector...
Definition: DenseVector.h:179
Header file for the IsSame and IsStrictlySame type traits.
DisableIf< Or< IsComputation< MT >, IsTransExpr< MT > >, typename ColumnExprTrait< MT >::Type >::Type column(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific column of the given matrix.
Definition: Column.h:103
Header file for the And class template.
Header file for the intrinsic trait.
Header file for the SparseMatrix base class.
Header file for the matrix storage order types.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_SMP_ASSIGNABLE(T)
Constraint on the data type.In case the given data type T is SMP-assignable (can be assigned by multi...
Definition: SMPAssignable.h:118
void smpAddAssign(DenseMatrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP addition assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:122
Header file for the DisableIf class template.
Header file for the complete DenseSubmatrix implementation.
System settings for the shared-memory parallelization.
Header file for the IsSMPAssignable type trait.
Header file for the DenseMatrix base class.
void assign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the assignment of a matrix to a matrix.
Definition: Matrix.h:271
Header file for the serial section implementation.
#define BLAZE_CPP_THREADS_PARALLEL_MODE
Compilation switch for the C++11 parallelization.This compilation switch enables/disables the paralle...
Definition: SMP.h:95
Header file for the parallel section implementation.
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2406
void multAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the multiplication assignment of a matrix to a matrix.
Definition: Matrix.h:361
Header file for the EnableIf class template.
#define BLAZE_PARALLEL_SECTION
Section for the debugging of the shared-memory parallelization.During the shared-memory parallel (SMP...
Definition: ParallelSection.h:245
void smpAssign(DenseMatrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:92
DisableIf< Or< IsComputation< MT >, IsTransExpr< MT > >, typename RowExprTrait< MT >::Type >::Type row(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific row of the given matrix.
Definition: Row.h:103
bool isSerialSectionActive()
Returns whether a serial section is active or not.
Definition: SerialSection.h:212
Header file for the SubmatrixExprTrait class template.
Header file for run time assertion macros.
void addAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the addition assignment of a matrix to a matrix.
Definition: Matrix.h:301
Header file for the complete SparseSubmatrix implementation.
void subAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the subtraction assignment of a matrix to matrix.
Definition: Matrix.h:331
bool isParallelSectionActive()
Returns whether a parallel section is active or not.
Definition: ParallelSection.h:212
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:157
size_t columns(const Matrix< MT, SO > &m)
Returns the current number of columns of the matrix.
Definition: Matrix.h:170
Header file for the C++11 and Boost thread backend.
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.In case of an invalid compile time expression, a compilation error is cr...
Definition: StaticAssert.h:143
size_t rows(const Matrix< MT, SO > &m)
Returns the current number of rows of the matrix.
Definition: Matrix.h:154
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_INTERNAL_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERTION flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:101
Constraint on the data type.
Header file for the FunctionTrace class.