Reference documentation for deal.II version 8.4.2
source
base
parallel.cc
1
// ---------------------------------------------------------------------
2
//
3
// Copyright (C) 2009 - 2015 by the deal.II authors
4
//
5
// This file is part of the deal.II library.
6
//
7
// The deal.II library is free software; you can use it, redistribute
8
// it, and/or modify it under the terms of the GNU Lesser General
9
// Public License as published by the Free Software Foundation; either
10
// version 2.1 of the License, or (at your option) any later version.
11
// The full text of the license can be found in the file LICENSE at
12
// the top level of the deal.II distribution.
13
//
14
// ---------------------------------------------------------------------
15
16
17
#include <deal.II/base/parallel.h>
18
19
20
DEAL_II_NAMESPACE_OPEN
21
22
namespace
internal
23
{
24
namespace
Vector
25
{
26
// set minimum grain size. this value is
27
// roughly in accordance with the curve
28
// in the TBB book (fig 3.2) that shows
29
// run time as a function of grain size
30
// -- there, values from 200 upward are
31
// so that the scheduling overhead
32
// amortizes well (for very large values
33
// in that example, the grain size is too
34
// large to split the work load into
35
// enough chunks and the problem becomes
36
// badly balanced)
37
unsigned
int
minimum_parallel_grain_size = 1024;
38
}
39
40
41
namespace
SparseMatrix
42
{
43
// set this value to 1/4 of the value of
44
// the minimum grain size of
45
// vectors. this rests on the fact that
46
// we have to do a lot more work per row
47
// of a matrix than per element of a
48
// vector. it could possibly be reduced
49
// even further but that doesn't appear
50
// worth it any more for anything but
51
// very small matrices that we don't care
52
// that much about anyway.
53
unsigned
int
minimum_parallel_grain_size = 256;
54
}
55
}
56
57
58
59
60
DEAL_II_NAMESPACE_CLOSE
Vector
Definition:
function.h:34
SparseMatrix
Definition:
dof_accessor.h:30
internal
Definition:
aligned_vector.h:275
Generated by
1.8.12