All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DenseVector.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_SMP_OPENMP_DENSEVECTOR_H_
36 #define _BLAZE_MATH_SMP_OPENMP_DENSEVECTOR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <omp.h>
47 #include <blaze/math/Functions.h>
52 #include <blaze/system/OpenMP.h>
53 #include <blaze/util/Assert.h>
54 #include <blaze/util/EnableIf.h>
58 
59 
60 namespace blaze {
61 
62 //=================================================================================================
63 //
64 // GLOBAL FUNCTIONS
65 //
66 //=================================================================================================
67 
68 //*************************************************************************************************
84 template< typename VT1 // Type of the left-hand side dense vector
85  , bool TF1 // Transpose flag of the left-hand side dense vector
86  , typename VT2 // Type of the right-hand side vector
87  , bool TF2 > // Transpose flag of the right-hand side vector
88 inline void smpAssign( DenseVector<VT1,TF1>& lhs, const Vector<VT2,TF2>& rhs )
89 {
91 
92  BLAZE_INTERNAL_ASSERT( (~lhs).size() == (~rhs).size(), "Invalid vector sizes" );
93  assign( ~lhs, ~rhs );
94 }
96 //*************************************************************************************************
97 
98 
99 //*************************************************************************************************
114 template< typename VT1 // Type of the left-hand side dense vector
115  , bool TF1 // Transpose flag of the left-hand side dense vector
116  , typename VT2 // Type of the right-hand side dense vector
117  , bool TF2 > // Transpose flag of the right-hand side dense vector
118 typename EnableIfTrue< VT1::smpAssignable && VT2::smpAssignable >::Type
119  smpAssign( DenseVector<VT1,TF1>& lhs, const DenseVector<VT2,TF2>& rhs )
120 {
122 
123  BLAZE_INTERNAL_ASSERT( (~lhs).size() == (~rhs).size(), "Invalid vector sizes" );
124 
125  if( isSerialSectionActive() || omp_get_num_threads() != 1 || !(~rhs).canSMPAssign() ) {
126  assign( ~lhs, ~rhs );
127  return;
128  }
129 
130  typedef typename VT1::ElementType ET1;
131  typedef typename VT2::ElementType ET2;
132  typedef IntrinsicTrait<typename VT1::ElementType> IT;
133  typedef typename SubvectorExprTrait<VT1,aligned>::Type AlignedTarget;
134  typedef typename SubvectorExprTrait<VT1,unaligned>::Type UnalignedTarget;
135 
136  const bool vectorizable( VT1::vectorizable && VT2::vectorizable && IsSame<ET1,ET2>::value );
137  const bool lhsAligned ( (~lhs).isAligned() );
138  const bool rhsAligned ( (~rhs).isAligned() );
139 
140 #pragma omp parallel shared( lhs, rhs )
141  {
142  const int threads ( omp_get_num_threads() );
143  const size_t addon ( ( ( (~lhs).size() % threads ) != 0UL )? 1UL : 0UL );
144  const size_t equalShare ( (~lhs).size() / threads + addon );
145  const size_t rest ( equalShare & ( IT::size - 1UL ) );
146  const size_t sizePerThread( ( vectorizable && rest )?( equalShare - rest + IT::size ):( equalShare ) );
147 
148 #pragma omp for schedule(dynamic,1) nowait
149  for( int i=0UL; i<threads; ++i )
150  {
151  const size_t index( i*sizePerThread );
152 
153  if( index >= (~lhs).size() )
154  continue;
155 
156  const size_t size( min( sizePerThread, (~lhs).size() - index ) );
157 
158  if( vectorizable && lhsAligned && rhsAligned ) {
159  AlignedTarget target( subvector<aligned>( ~lhs, index, size ) );
160  assign( target, subvector<aligned>( ~rhs, index, size ) );
161  }
162  else if( vectorizable && lhsAligned ) {
163  AlignedTarget target( subvector<aligned>( ~lhs, index, size ) );
164  assign( target, subvector<unaligned>( ~rhs, index, size ) );
165  }
166  else if( vectorizable && rhsAligned ) {
167  UnalignedTarget target( subvector<unaligned>( ~lhs, index, size ) );
168  assign( target, subvector<aligned>( ~rhs, index, size ) );
169  }
170  else {
171  UnalignedTarget target( subvector<unaligned>( ~lhs, index, size ) );
172  assign( target, subvector<unaligned>( ~rhs, index, size ) );
173  }
174  }
175  }
176 }
178 //*************************************************************************************************
179 
180 
181 //*************************************************************************************************
196 template< typename VT1 // Type of the left-hand side dense vector
197  , bool TF1 // Transpose flag of the left-hand side dense vector
198  , typename VT2 // Type of the right-hand side dense vector
199  , bool TF2 > // Transpose flag of the right-hand side dense vector
200 typename EnableIfTrue< VT1::smpAssignable && VT2::smpAssignable >::Type
201  smpAssign( DenseVector<VT1,TF1>& lhs, const SparseVector<VT2,TF2>& rhs )
202 {
204 
205  BLAZE_INTERNAL_ASSERT( (~lhs).size() == (~rhs).size(), "Invalid vector sizes" );
206 
207  if( isSerialSectionActive() || omp_get_num_threads() != 1 || !(~rhs).canSMPAssign() ) {
208  assign( ~lhs, ~rhs );
209  return;
210  }
211 
212  typedef typename VT1::ElementType ET1;
213  typedef typename VT2::ElementType ET2;
214  typedef typename SubvectorExprTrait<VT1,unaligned>::Type UnalignedTarget;
215 
216 #pragma omp parallel shared( lhs, rhs )
217  {
218  const int threads ( omp_get_num_threads() );
219  const size_t addon ( ( ( (~lhs).size() % threads ) != 0UL )? 1UL : 0UL );
220  const size_t sizePerThread( (~lhs).size() / threads + addon );
221 
222 #pragma omp for schedule(dynamic,1) nowait
223  for( int i=0UL; i<threads; ++i )
224  {
225  const size_t index( i*sizePerThread );
226 
227  if( index >= (~lhs).size() )
228  continue;
229 
230  const size_t size( min( sizePerThread, (~lhs).size() - index ) );
231  UnalignedTarget target( subvector<unaligned>( ~lhs, index, size ) );
232  assign( target, subvector<unaligned>( ~rhs, index, size ) );
233  }
234  }
235 }
237 //*************************************************************************************************
238 
239 
240 //*************************************************************************************************
257 template< typename VT1 // Type of the left-hand side dense vector
258  , bool TF1 // Transpose flag of the left-hand side dense vector
259  , typename VT2 // Type of the right-hand side vector
260  , bool TF2 > // Transpose flag of the right-hand side vector
261 inline void smpAddAssign( DenseVector<VT1,TF1>& lhs, const Vector<VT2,TF2>& rhs )
262 {
264 
265  BLAZE_INTERNAL_ASSERT( (~lhs).size() == (~rhs).size(), "Invalid vector sizes" );
266  addAssign( ~lhs, ~rhs );
267 }
269 //*************************************************************************************************
270 
271 
272 //*************************************************************************************************
289 template< typename VT1 // Type of the left-hand side dense vector
290  , bool TF1 // Transpose flag of the left-hand side dense vector
291  , typename VT2 // Type of the right-hand side dense vector
292  , bool TF2 > // Transpose flag of the right-hand side dense vector
293 typename EnableIfTrue< VT1::smpAssignable && VT2::smpAssignable >::Type
294  smpAddAssign( DenseVector<VT1,TF1>& lhs, const DenseVector<VT2,TF2>& rhs )
295 {
297 
298  BLAZE_INTERNAL_ASSERT( (~lhs).size() == (~rhs).size(), "Invalid vector sizes" );
299 
300  if( isSerialSectionActive() || omp_get_num_threads() != 1 || !(~rhs).canSMPAssign() ) {
301  addAssign( ~lhs, ~rhs );
302  return;
303  }
304 
305  typedef typename VT1::ElementType ET1;
306  typedef typename VT2::ElementType ET2;
307  typedef IntrinsicTrait<typename VT1::ElementType> IT;
308  typedef typename SubvectorExprTrait<VT1,aligned>::Type AlignedTarget;
309  typedef typename SubvectorExprTrait<VT1,unaligned>::Type UnalignedTarget;
310 
311  const bool vectorizable( VT1::vectorizable && VT2::vectorizable && IsSame<ET1,ET2>::value );
312  const bool lhsAligned ( (~lhs).isAligned() );
313  const bool rhsAligned ( (~rhs).isAligned() );
314 
315 #pragma omp parallel shared( lhs, rhs )
316  {
317  const int threads ( omp_get_num_threads() );
318  const size_t addon ( ( ( (~lhs).size() % threads ) != 0UL )? 1UL : 0UL );
319  const size_t equalShare ( (~lhs).size() / threads + addon );
320  const size_t rest ( equalShare & ( IT::size - 1UL ) );
321  const size_t sizePerThread( ( vectorizable && rest )?( equalShare - rest + IT::size ):( equalShare ) );
322 
323 #pragma omp for schedule(dynamic,1) nowait
324  for( int i=0UL; i<threads; ++i )
325  {
326  const size_t index( i*sizePerThread );
327 
328  if( index >= (~lhs).size() )
329  continue;
330 
331  const size_t size( min( sizePerThread, (~lhs).size() - index ) );
332 
333  if( vectorizable && lhsAligned && rhsAligned ) {
334  AlignedTarget target( subvector<aligned>( ~lhs, index, size ) );
335  addAssign( target, subvector<aligned>( ~rhs, index, size ) );
336  }
337  else if( vectorizable && lhsAligned ) {
338  AlignedTarget target( subvector<aligned>( ~lhs, index, size ) );
339  addAssign( target, subvector<unaligned>( ~rhs, index, size ) );
340  }
341  else if( vectorizable && rhsAligned ) {
342  UnalignedTarget target( subvector<unaligned>( ~lhs, index, size ) );
343  addAssign( target, subvector<aligned>( ~rhs, index, size ) );
344  }
345  else {
346  UnalignedTarget target( subvector<unaligned>( ~lhs, index, size ) );
347  addAssign( target, subvector<unaligned>( ~rhs, index, size ) );
348  }
349  }
350  }
351 }
353 //*************************************************************************************************
354 
355 
356 //*************************************************************************************************
373 template< typename VT1 // Type of the left-hand side dense vector
374  , bool TF1 // Transpose flag of the left-hand side dense vector
375  , typename VT2 // Type of the right-hand side dense vector
376  , bool TF2 > // Transpose flag of the right-hand side dense vector
377 typename EnableIfTrue< VT1::smpAssignable && VT2::smpAssignable >::Type
378  smpAddAssign( DenseVector<VT1,TF1>& lhs, const SparseVector<VT2,TF2>& rhs )
379 {
381 
382  BLAZE_INTERNAL_ASSERT( (~lhs).size() == (~rhs).size(), "Invalid vector sizes" );
383 
384  if( isSerialSectionActive() || omp_get_num_threads() != 1 || !(~rhs).canSMPAssign() ) {
385  addAssign( ~lhs, ~rhs );
386  return;
387  }
388 
389  typedef typename VT1::ElementType ET1;
390  typedef typename VT2::ElementType ET2;
391  typedef typename SubvectorExprTrait<VT1,unaligned>::Type UnalignedTarget;
392 
393 #pragma omp parallel shared( lhs, rhs )
394  {
395  const int threads ( omp_get_num_threads() );
396  const size_t addon ( ( ( (~lhs).size() % threads ) != 0UL )? 1UL : 0UL );
397  const size_t sizePerThread( (~lhs).size() / threads + addon );
398 
399 #pragma omp for schedule(dynamic,1) nowait
400  for( int i=0UL; i<threads; ++i )
401  {
402  const size_t index( i*sizePerThread );
403 
404  if( index >= (~lhs).size() )
405  continue;
406 
407  const size_t size( min( sizePerThread, (~lhs).size() - index ) );
408  UnalignedTarget target( subvector<unaligned>( ~lhs, index, size ) );
409  addAssign( target, subvector<unaligned>( ~rhs, index, size ) );
410  }
411  }
412 }
414 //*************************************************************************************************
415 
416 
417 //*************************************************************************************************
434 template< typename VT1 // Type of the left-hand side dense vector
435  , bool TF1 // Transpose flag of the left-hand side dense vector
436  , typename VT2 // Type of the right-hand side vector
437  , bool TF2 > // Transpose flag of the right-hand side vector
438 inline void smpSubAssign( DenseVector<VT1,TF1>& lhs, const Vector<VT2,TF2>& rhs )
439 {
441 
442  BLAZE_INTERNAL_ASSERT( (~lhs).size() == (~rhs).size(), "Invalid vector sizes" );
443  subAssign( ~lhs, ~rhs );
444 }
446 //*************************************************************************************************
447 
448 
449 //*************************************************************************************************
466 template< typename VT1 // Type of the left-hand side dense vector
467  , bool TF1 // Transpose flag of the left-hand side dense vector
468  , typename VT2 // Type of the right-hand side dense vector
469  , bool TF2 > // Transpose flag of the right-hand side dense vector
470 typename EnableIfTrue< VT1::smpAssignable && VT2::smpAssignable >::Type
471  smpSubAssign( DenseVector<VT1,TF1>& lhs, const DenseVector<VT2,TF2>& rhs )
472 {
474 
475  BLAZE_INTERNAL_ASSERT( (~lhs).size() == (~rhs).size(), "Invalid vector sizes" );
476 
477  if( isSerialSectionActive() || omp_get_num_threads() != 1 || !(~rhs).canSMPAssign() ) {
478  subAssign( ~lhs, ~rhs );
479  return;
480  }
481 
482  typedef typename VT1::ElementType ET1;
483  typedef typename VT2::ElementType ET2;
484  typedef IntrinsicTrait<typename VT1::ElementType> IT;
485  typedef typename SubvectorExprTrait<VT1,aligned>::Type AlignedTarget;
486  typedef typename SubvectorExprTrait<VT1,unaligned>::Type UnalignedTarget;
487 
488  const bool vectorizable( VT1::vectorizable && VT2::vectorizable && IsSame<ET1,ET2>::value );
489  const bool lhsAligned ( (~lhs).isAligned() );
490  const bool rhsAligned ( (~rhs).isAligned() );
491 
492 #pragma omp parallel shared( lhs, rhs )
493  {
494  const int threads ( omp_get_num_threads() );
495  const size_t addon ( ( ( (~lhs).size() % threads ) != 0UL )? 1UL : 0UL );
496  const size_t equalShare ( (~lhs).size() / threads + addon );
497  const size_t rest ( equalShare & ( IT::size - 1UL ) );
498  const size_t sizePerThread( ( vectorizable && rest )?( equalShare - rest + IT::size ):( equalShare ) );
499 
500 #pragma omp for schedule(dynamic,1) nowait
501  for( int i=0UL; i<threads; ++i )
502  {
503  const size_t index( i*sizePerThread );
504 
505  if( index >= (~lhs).size() )
506  continue;
507 
508  const size_t size( min( sizePerThread, (~lhs).size() - index ) );
509 
510  if( vectorizable && lhsAligned && rhsAligned ) {
511  AlignedTarget target( subvector<aligned>( ~lhs, index, size ) );
512  subAssign( target, subvector<aligned>( ~rhs, index, size ) );
513  }
514  else if( vectorizable && lhsAligned ) {
515  AlignedTarget target( subvector<aligned>( ~lhs, index, size ) );
516  subAssign( target, subvector<unaligned>( ~rhs, index, size ) );
517  }
518  else if( vectorizable && rhsAligned ) {
519  UnalignedTarget target( subvector<unaligned>( ~lhs, index, size ) );
520  subAssign( target, subvector<aligned>( ~rhs, index, size ) );
521  }
522  else {
523  UnalignedTarget target( subvector<unaligned>( ~lhs, index, size ) );
524  subAssign( target, subvector<unaligned>( ~rhs, index, size ) );
525  }
526  }
527  }
528 }
530 //*************************************************************************************************
531 
532 
533 //*************************************************************************************************
550 template< typename VT1 // Type of the left-hand side dense vector
551  , bool TF1 // Transpose flag of the left-hand side dense vector
552  , typename VT2 // Type of the right-hand side dense vector
553  , bool TF2 > // Transpose flag of the right-hand side dense vector
554 typename EnableIfTrue< VT1::smpAssignable && VT2::smpAssignable >::Type
555  smpSubAssign( DenseVector<VT1,TF1>& lhs, const SparseVector<VT2,TF2>& rhs )
556 {
558 
559  BLAZE_INTERNAL_ASSERT( (~lhs).size() == (~rhs).size(), "Invalid vector sizes" );
560 
561  if( isSerialSectionActive() || omp_get_num_threads() != 1 || !(~rhs).canSMPAssign() ) {
562  subAssign( ~lhs, ~rhs );
563  return;
564  }
565 
566  typedef typename VT1::ElementType ET1;
567  typedef typename VT2::ElementType ET2;
568  typedef typename SubvectorExprTrait<VT1,unaligned>::Type UnalignedTarget;
569 
570 #pragma omp parallel shared( lhs, rhs )
571  {
572  const int threads ( omp_get_num_threads() );
573  const size_t addon ( ( ( (~lhs).size() % threads ) != 0UL )? 1UL : 0UL );
574  const size_t sizePerThread( (~lhs).size() / threads + addon );
575 
576 #pragma omp for schedule(dynamic,1) nowait
577  for( int i=0UL; i<threads; ++i )
578  {
579  const size_t index( i*sizePerThread );
580 
581  if( index >= (~lhs).size() )
582  continue;
583 
584  const size_t size( min( sizePerThread, (~lhs).size() - index ) );
585  UnalignedTarget target( subvector<unaligned>( ~lhs, index, size ) );
586  subAssign( target, subvector<unaligned>( ~rhs, index, size ) );
587  }
588  }
589 }
591 //*************************************************************************************************
592 
593 
594 //*************************************************************************************************
611 template< typename VT1 // Type of the left-hand side dense vector
612  , bool TF1 // Transpose flag of the left-hand side dense vector
613  , typename VT2 // Type of the right-hand side vector
614  , bool TF2 > // Transpose flag of the right-hand side vector
615 inline void smpMultAssign( DenseVector<VT1,TF1>& lhs, const Vector<VT2,TF2>& rhs )
616 {
618 
619  BLAZE_INTERNAL_ASSERT( (~lhs).size() == (~rhs).size(), "Invalid vector sizes" );
620  multAssign( ~lhs, ~rhs );
621 }
623 //*************************************************************************************************
624 
625 
626 //*************************************************************************************************
643 template< typename VT1 // Type of the left-hand side dense vector
644  , bool TF1 // Transpose flag of the left-hand side dense vector
645  , typename VT2 // Type of the right-hand side dense vector
646  , bool TF2 > // Transpose flag of the right-hand side dense vector
647 typename EnableIfTrue< VT1::smpAssignable && VT2::smpAssignable >::Type
648  smpMultAssign( DenseVector<VT1,TF1>& lhs, const DenseVector<VT2,TF2>& rhs )
649 {
651 
652  BLAZE_INTERNAL_ASSERT( (~lhs).size() == (~rhs).size(), "Invalid vector sizes" );
653 
654  if( isSerialSectionActive() || omp_get_num_threads() != 1 || !(~rhs).canSMPAssign() ) {
655  multAssign( ~lhs, ~rhs );
656  return;
657  }
658 
659  typedef typename VT1::ElementType ET1;
660  typedef typename VT2::ElementType ET2;
661  typedef IntrinsicTrait<typename VT1::ElementType> IT;
662  typedef typename SubvectorExprTrait<VT1,aligned>::Type AlignedTarget;
663  typedef typename SubvectorExprTrait<VT1,unaligned>::Type UnalignedTarget;
664 
665  const bool vectorizable( VT1::vectorizable && VT2::vectorizable && IsSame<ET1,ET2>::value );
666  const bool lhsAligned ( (~lhs).isAligned() );
667  const bool rhsAligned ( (~rhs).isAligned() );
668 
669 #pragma omp parallel shared( lhs, rhs )
670  {
671  const int threads ( omp_get_num_threads() );
672  const size_t addon ( ( ( (~lhs).size() % threads ) != 0UL )? 1UL : 0UL );
673  const size_t equalShare ( (~lhs).size() / threads + addon );
674  const size_t rest ( equalShare & ( IT::size - 1UL ) );
675  const size_t sizePerThread( ( vectorizable && rest )?( equalShare - rest + IT::size ):( equalShare ) );
676 
677 #pragma omp for schedule(dynamic,1) nowait
678  for( int i=0UL; i<threads; ++i )
679  {
680  const size_t index( i*sizePerThread );
681 
682  if( index >= (~lhs).size() )
683  continue;
684 
685  const size_t size( min( sizePerThread, (~lhs).size() - index ) );
686 
687  if( vectorizable && lhsAligned && rhsAligned ) {
688  AlignedTarget target( subvector<aligned>( ~lhs, index, size ) );
689  multAssign( target, subvector<aligned>( ~rhs, index, size ) );
690  }
691  else if( vectorizable && lhsAligned ) {
692  AlignedTarget target( subvector<aligned>( ~lhs, index, size ) );
693  multAssign( target, subvector<unaligned>( ~rhs, index, size ) );
694  }
695  else if( vectorizable && rhsAligned ) {
696  UnalignedTarget target( subvector<unaligned>( ~lhs, index, size ) );
697  multAssign( target, subvector<aligned>( ~rhs, index, size ) );
698  }
699  else {
700  UnalignedTarget target( subvector<unaligned>( ~lhs, index, size ) );
701  multAssign( target, subvector<unaligned>( ~rhs, index, size ) );
702  }
703  }
704  }
705 }
707 //*************************************************************************************************
708 
709 
710 //*************************************************************************************************
727 template< typename VT1 // Type of the left-hand side dense vector
728  , bool TF1 // Transpose flag of the left-hand side dense vector
729  , typename VT2 // Type of the right-hand side dense vector
730  , bool TF2 > // Transpose flag of the right-hand side dense vector
731 typename EnableIfTrue< VT1::smpAssignable && VT2::smpAssignable >::Type
732  smpMultAssign( DenseVector<VT1,TF1>& lhs, const SparseVector<VT2,TF2>& rhs )
733 {
735 
736  BLAZE_INTERNAL_ASSERT( (~lhs).size() == (~rhs).size(), "Invalid vector sizes" );
737 
738  if( isSerialSectionActive() || omp_get_num_threads() != 1 || !(~rhs).canSMPAssign() ) {
739  multAssign( ~lhs, ~rhs );
740  return;
741  }
742 
743  typedef typename VT1::ElementType ET1;
744  typedef typename VT2::ElementType ET2;
745  typedef typename SubvectorExprTrait<VT1,unaligned>::Type UnalignedTarget;
746 
747 #pragma omp parallel shared( lhs, rhs )
748  {
749  const int threads ( omp_get_num_threads() );
750  const size_t addon ( ( ( (~lhs).size() % threads ) != 0UL )? 1UL : 0UL );
751  const size_t sizePerThread( (~lhs).size() / threads + addon );
752 
753 #pragma omp for schedule(dynamic,1) nowait
754  for( int i=0UL; i<threads; ++i )
755  {
756  const size_t index( i*sizePerThread );
757 
758  if( index >= (~lhs).size() )
759  continue;
760 
761  const size_t size( min( sizePerThread, (~lhs).size() - index ) );
762  UnalignedTarget target( subvector<unaligned>( ~lhs, index, size ) );
763  multAssign( target, subvector<unaligned>( ~rhs, index, size ) );
764  }
765  }
766 }
768 //*************************************************************************************************
769 
770 
771 
772 
773 //=================================================================================================
774 //
775 // COMPILE TIME CONSTRAINT
776 //
777 //=================================================================================================
778 
779 //*************************************************************************************************
781 namespace {
782 
784 
785 }
787 //*************************************************************************************************
788 
789 } // namespace blaze
790 
791 #endif
Header file for mathematical functions.
Header file for the SparseVector base class.
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:151
Header file for the complete DenseSubvector implementation.
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:178
Header file for the IsSame and IsStrictlySame type traits.
Header file for the DenseVector base class.
Header file for the intrinsic trait.
Header file for the complete SparseSubvector implementation.
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:121
Compile time assertion.
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:179
Header file for the serial section implementation.
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2382
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:269
Header file for the EnableIf class template.
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:91
bool isSerialSectionActive()
Returns whether a serial section is active or not.
Definition: SerialSection.h:211
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:209
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:239
#define BLAZE_OPENMP_PARALLEL_MODE
Compilation switch for the OpenMP parallelization.This compilation switch enables/disables the OpenMP...
Definition: OpenMP.h:65
#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
System settings for the OpenMP parallelization.
Header file for the SubvectorExprTrait class template.
#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
#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
Header file for the FunctionTrace class.