[Dune-devel] Random-Access Iterators

Jö Fahlke jorrit at jorrit.de
Wed Oct 1 15:20:51 CEST 2014


Am Wed,  1. Oct 2014, 08:58:23 +0200 schrieb Oliver Sander:
> thanks for the work.  As usual, it seems very well thought-out.
> However, mainly to satisfy my curiosity, here a two questions:
> - was this discussed in Berlin?  I can't find it in the meeting minutes,
Christian answered that already
> - what is the use-case for random access iterators?
On-the-fly partitioning of the grid for threaded assembly.  I.e. you know
there are n elements and p partitions, so thread r just does

  first = gv.template begin<0>();
  std::advance(first, n*r/p);

to get it's begin iterator.  This is particularly useful with tbb, where the
work packages are split dynamically during scheduling to achieve better load
balancing (otherwise you could just compute the entry points in a sequntial
preprocessing step).

Regards,
Jö.

-- 
Jorrit (Jö) Fahlke, Institute for Computational und Applied Mathematics,
University of Münster, Orleans-Ring 10, D-48149 Münster
Tel: +49 251 83 35146 Fax: +49 251 83 32729

Spaß mit I18N.  Hier StumpWM/clisp:
WARNUNG: DEFUN/DEFMACRO(GET-WM-CLASS): #<PACKAGE XLIB> ist abgeschlossen.
         Das Schloss umgehen und weitermachen.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune-devel/attachments/20141001/aca765d4/attachment.sig>


More information about the Dune-devel mailing list