An error occurred while fetching the assigned milestone of the selected merge_request.
To/matrices
2 unresolved threads
2 unresolved threads
Merge request reports
Activity
mentioned in commit a347d2e7
52 typename Device, 53 typename Index, 54 bool RowMajorOrder, 55 typename RealAllocator > 56 void 57 Dense< Real, Device, Index, RowMajorOrder, RealAllocator >:: 58 setElements( std::initializer_list< std::initializer_list< RealType > > data ) 59 { 60 IndexType rows = data.size(); 61 IndexType columns = 0; 62 for( auto row : data ) 63 columns = max( columns, row.size() ); 64 this->setDimensions( rows, columns ); 65 if( ! std::is_same< DeviceType, Devices::Host >::value ) 66 { 67 Dense< RealType, Devices::Host, IndexType > hostDense( rows, columns ); We should use
Devices::Sequential
instead ofDevices::Host
for stuff where parallelization is not used.Edited by Jakub Klinkovský
271 typename MatrixType, 272 template< typename, typename, typename > class Segments, 273 typename RealAllocator, 274 typename IndexAllocator > 275 template< typename MapIndex, 276 typename MapValue > 277 void 278 SparseMatrix< Real, Device, Index, MatrixType, Segments, RealAllocator, IndexAllocator >:: 279 setElements( const std::map< std::pair< MapIndex, MapIndex > , MapValue >& map ) 280 { 281 Containers::Vector< IndexType, Devices::Host, IndexType > rowsCapacities( this->getRows(), 0 ); 282 for( auto element : map ) 283 rowsCapacities[ element.first.first ]++; 284 if( !std::is_same< DeviceType, Devices::Host >::value ) 285 { 286 SparseMatrix< Real, Devices::Host, Index, MatrixType, Segments > hostMatrix( this->getRows(), this->getColumns() );
Please register or sign in to reply