Reference documentation for deal.II version Git 8596a7cd07 2020-12-04 07:30:43 +0100
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
vectorization.cc
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2018 - 2020 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 
17 
19 
20 // VectorizedArray must be a POD (plain old data) type to make sure it
21 // can use maximum level of compiler optimization.
22 // A type is POD if it has standard layout (similar to a C struct)
23 // and it is trivial (can be statically default initialized)
24 // Here, the trait std::is_pod cannot be used because it is deprecated
25 // in C++20.
26 static_assert(std::is_standard_layout<VectorizedArray<double>>::value &&
27  std::is_trivial<VectorizedArray<double>>::value,
28  "VectorizedArray<double> must be a POD type");
29 static_assert(std::is_standard_layout<VectorizedArray<float>>::value &&
30  std::is_trivial<VectorizedArray<float>>::value,
31  "VectorizedArray<float> must be a POD type");
32 
33 // For the specializations of VectorizedArray, we need to instantiate the
34 // static constexpr variable for some compilers. On the other hand, MSCV wants
35 // us explicitly to not do so, otherwise we get: "error C2908: explicit
36 // specialization 'const unsigned int
37 // ::VectorizedArray<double, 2>::n_array_elements' has already been
38 // instantiated".
39 #if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 128 && !defined(DEAL_II_MSVC)
40 # if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 512
43 # endif
44 
45 # if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 256
48 # endif
49 
50 # if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 128
53 # endif
54 #endif
55 
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:372
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:371