[Dune-devel] [Dune-Commit] [Commit] dune-istl - 04a4280: [Release][BCRSMatrix] Add a more efficient interface for setting all column indices of a row
Markus Blatt
markus at dr-blatt.de
Mon Dec 16 11:14:25 CET 2013
On Mon, Dec 16, 2013 at 10:38:26AM +0100, Steffen Müthing wrote:
+ template<typename It>
> + void setIndices(size_type row, It begin, It end)
> + {
> + size_type cols = 0;
> + size_type* col_it = r[row].getindexptr();
> + for (; begin != end; ++begin, ++col_it, ++cols)
> + {
> + *col_it = *begin;
> + }
> + if (cols != r[row].size())
Out of curiosity: Is there a special reason not to use
void setIndices(size_type row, It begin, It end)
if(std::copy(begin, end, col_it)) != r[row].getindexptr()+cols)
DUNE_THROW ...
Markus
--
Do you need more support with DUNE or HPC in general?
Dr. Markus Blatt - HPC-Simulation-Software & Services http://www.dr-blatt.de
Hans-Bunte-Str. 8-10, 69123 Heidelberg, Germany
Tel.: +49 (0) 160 97590858 Fax: +49 (0)322 1108991658
More information about the Dune-devel
mailing list