void
parallel_for(
Functor & functor,
- size_type start,
- size_type end,
+ const size_type start,
+ const size_type end,
const std::shared_ptr<parallel::internal::TBBPartitioner> &partitioner)
{
#ifdef DEAL_II_WITH_THREADS
- size_type vec_size = end - start;
+ const size_type vec_size = end - start;
// only go to the parallel function in case there are at least 4 parallel
// items, otherwise the overhead is too large
if (vec_size >=
template <typename Number>
struct Vector_set
{
- Vector_set(Number value, Number *dst)
+ Vector_set(const Number value, Number *const dst)
: value(value)
, dst(dst)
{
template <typename Number, typename OtherNumber>
struct Vector_copy
{
- Vector_copy(const OtherNumber *src, Number *dst)
+ Vector_copy(const OtherNumber *const src, Number *const dst)
: src(src)
, dst(dst)
{
template <typename Number>
struct Vectorization_multiply_factor
{
- Vectorization_multiply_factor(Number *val, Number factor)
+ Vectorization_multiply_factor(Number *const val, const Number factor)
: val(val)
, factor(factor)
{}
}
}
- Number *val;
- Number factor;
+ Number *const val;
+ const Number factor;
};
template <typename Number>
struct Vectorization_add_av
{
- Vectorization_add_av(Number *val, const Number *v_val, Number factor)
+ Vectorization_add_av(Number *const val,
+ const Number *const v_val,
+ const Number factor)
: val(val)
, v_val(v_val)
, factor(factor)
}
}
- Number * val;
- const Number *v_val;
- Number factor;
+ Number *const val;
+ const Number *const v_val;
+ const Number factor;
};
template <typename Number>
struct Vectorization_sadd_xav
{
- Vectorization_sadd_xav(Number * val,
- const Number *v_val,
- Number a,
- Number x)
+ Vectorization_sadd_xav(Number * val,
+ const Number *const v_val,
+ const Number a,
+ const Number x)
: val(val)
, v_val(v_val)
, a(a)
}
}
- Number * val;
- const Number *v_val;
- Number a;
- Number x;
+ Number *const val;
+ const Number *const v_val;
+ const Number a;
+ const Number x;
};
template <typename Number>
struct Vectorization_subtract_v
{
- Vectorization_subtract_v(Number *val, const Number *v_val)
+ Vectorization_subtract_v(Number *val, const Number *const v_val)
: val(val)
, v_val(v_val)
{}
}
}
- Number * val;
- const Number *v_val;
+ Number *const val;
+ const Number *const v_val;
};
template <typename Number>
struct Vectorization_add_factor
{
- Vectorization_add_factor(Number *val, Number factor)
+ Vectorization_add_factor(Number *const val, const Number factor)
: val(val)
, factor(factor)
{}
}
}
- Number *val;
- Number factor;
+ Number *const val;
+ const Number factor;
};
template <typename Number>
struct Vectorization_add_v
{
- Vectorization_add_v(Number *val, const Number *v_val)
+ Vectorization_add_v(Number *const val, const Number *const v_val)
: val(val)
, v_val(v_val)
{}
}
}
- Number * val;
- const Number *v_val;
+ Number *const val;
+ const Number *const v_val;
};
template <typename Number>
struct Vectorization_add_avpbw
{
- Vectorization_add_avpbw(Number * val,
- const Number *v_val,
- const Number *w_val,
- Number a,
- Number b)
+ Vectorization_add_avpbw(Number *const val,
+ const Number *const v_val,
+ const Number *const w_val,
+ const Number a,
+ const Number b)
: val(val)
, v_val(v_val)
, w_val(w_val)
}
}
- Number * val;
- const Number *v_val;
- const Number *w_val;
- Number a;
- Number b;
+ Number *const val;
+ const Number *const v_val;
+ const Number *const w_val;
+ const Number a;
+ const Number b;
};
template <typename Number>
struct Vectorization_sadd_xv
{
- Vectorization_sadd_xv(Number *val, const Number *v_val, Number x)
+ Vectorization_sadd_xv(Number *const val,
+ const Number *const v_val,
+ const Number x)
: val(val)
, v_val(v_val)
, x(x)
}
}
- Number * val;
- const Number *v_val;
- Number x;
+ Number *const val;
+ const Number *const v_val;
+ const Number x;
};
template <typename Number>
}
}
- Number * val;
- const Number *v_val;
- const Number *w_val;
- Number x;
- Number a;
- Number b;
+ Number *const val;
+ const Number *const v_val;
+ const Number *const w_val;
+ const Number x;
+ const Number a;
+ const Number b;
};
template <typename Number>
struct Vectorization_scale
{
- Vectorization_scale(Number *val, const Number *v_val)
+ Vectorization_scale(Number *const val, const Number *const v_val)
: val(val)
, v_val(v_val)
{}
}
}
- Number * val;
- const Number *v_val;
+ Number *const val;
+ const Number *const v_val;
};
template <typename Number>
struct Vectorization_equ_au
{
- Vectorization_equ_au(Number *val, const Number *u_val, Number a)
+ Vectorization_equ_au(Number *const val,
+ const Number *const u_val,
+ const Number a)
: val(val)
, u_val(u_val)
, a(a)
}
}
- Number * val;
- const Number *u_val;
- Number a;
+ Number *const val;
+ const Number *const u_val;
+ const Number a;
};
template <typename Number>
struct Vectorization_equ_aubv
{
- Vectorization_equ_aubv(Number * val,
- const Number *u_val,
- const Number *v_val,
- Number a,
- Number b)
+ Vectorization_equ_aubv(Number *const val,
+ const Number *const u_val,
+ const Number *const v_val,
+ const Number a,
+ const Number b)
: val(val)
, u_val(u_val)
, v_val(v_val)
}
}
- Number * val;
- const Number *u_val;
- const Number *v_val;
- Number a;
- Number b;
+ Number *const val;
+ const Number *const u_val;
+ const Number *const v_val;
+ const Number a;
+ const Number b;
};
template <typename Number>
struct Vectorization_equ_aubvcw
{
- Vectorization_equ_aubvcw(Number *val,
- Number *u_val,
- Number *v_val,
- Number *w_val,
- Number a,
- Number b,
- Number c)
+ Vectorization_equ_aubvcw(Number * val,
+ const Number *u_val,
+ const Number *v_val,
+ const Number *w_val,
+ const Number a,
+ const Number b,
+ const Number c)
: val(val)
, u_val(u_val)
, v_val(v_val)
}
}
- Number *val;
- Number *u_val;
- Number *v_val;
- Number *w_val;
- Number a;
- Number b;
- Number c;
+ Number *const val;
+ const Number *const u_val;
+ const Number *const v_val;
+ const Number *const w_val;
+ const Number a;
+ const Number b;
+ const Number c;
};
template <typename Number>
struct Vectorization_ratio
{
- Vectorization_ratio(Number *val, Number *a_val, Number *b_val)
+ Vectorization_ratio(Number *val, const Number *a_val, const Number *b_val)
: val(val)
, a_val(a_val)
, b_val(b_val)
}
}
- Number *val;
- Number *a_val;
- Number *b_val;
+ Number *const val;
+ const Number *const a_val;
+ const Number *const b_val;
};
std::is_same<Number, Number2>::value &&
(VectorizedArray<Number>::n_array_elements > 1);
- Dot(const Number *X, const Number2 *Y)
+ Dot(const Number *const X, const Number2 *const Y)
: X(X)
, Y(Y)
{}
return x * y;
}
- const Number * X;
- const Number2 *Y;
+ const Number *const X;
+ const Number2 *const Y;
};
template <typename Number, typename RealType>
static const bool vectorizes =
VectorizedArray<Number>::n_array_elements > 1;
- Norm2(const Number *X)
+ Norm2(const Number *const X)
: X(X)
{}
return x * x;
}
- const Number *X;
+ const Number *const X;
};
template <typename Number, typename RealType>
return std::pow(std::abs(x), p);
}
- const Number *X;
- RealType p;
+ const Number * X;
+ const RealType p;
};
template <typename Number>
static const bool vectorizes =
VectorizedArray<Number>::n_array_elements > 1;
- AddAndDot(Number *X, const Number *V, const Number *W, Number a)
+ AddAndDot(Number *const X,
+ const Number *const V,
+ const Number *const W,
+ const Number a)
: X(X)
, V(V)
, W(W)
return x * w;
}
- Number * X;
- const Number *V, *W;
- Number a;
+ Number *const X;
+ const Number *const V;
+ const Number *const W;
+ const Number a;
};
void
accumulate_regular(
const Operation &op,
- size_type & n_chunks,
+ const size_type &n_chunks,
size_type & index,
ResultType (&outer_results)[vector_accumulation_recursion_threshold],
std::integral_constant<bool, false>)
const std::shared_ptr<parallel::internal::TBBPartitioner> &partitioner)
{
#ifdef DEAL_II_WITH_THREADS
- size_type vec_size = end - start;
+ const size_type vec_size = end - start;
// only go to the parallel function in case there are at least 4 parallel
// items, otherwise the overhead is too large
if (vec_size >=
& thread_loop_partitioner,
const size_type size,
real_type & sum,
- real_type p,
+ const real_type p,
::dealii::MemorySpace::MemorySpaceData<Number,
::dealii::MemorySpace::Host>
&data)