MFEM
v4.2.0
Finite element discretization library
Main Page
Related Pages
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Pages
config
tconfig.hpp
Go to the documentation of this file.
1
// Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
2
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
3
// LICENSE and NOTICE for details. LLNL-CODE-806117.
4
//
5
// This file is part of the MFEM library. For more information and source code
6
// availability visit https://mfem.org.
7
//
8
// MFEM is free software; you can redistribute it and/or modify it under the
9
// terms of the BSD-3 license. We welcome feedback and contributions, see file
10
// CONTRIBUTING.md for details.
11
12
#ifndef MFEM_TEMPLATE_CONFIG
13
#define MFEM_TEMPLATE_CONFIG
14
15
// the main MFEM config header
16
#include "
config.hpp
"
17
18
// --- MFEM_STATIC_ASSERT
19
#if (__cplusplus >= 201103L)
20
#define MFEM_STATIC_ASSERT(cond, msg) static_assert((cond), msg)
21
#else
22
#define MFEM_STATIC_ASSERT(cond, msg) if (cond) { }
23
#endif
24
25
// --- MFEM_ALWAYS_INLINE
26
#if !defined(MFEM_DEBUG) && (defined(__GNUC__) || defined(__clang__))
27
#define MFEM_ALWAYS_INLINE __attribute__((always_inline))
28
#else
29
#define MFEM_ALWAYS_INLINE
30
#endif
31
32
// --- MFEM_VECTORIZE_LOOP (disabled)
33
#if (__cplusplus >= 201103L) && !defined(MFEM_DEBUG) && defined(__GNUC__)
34
//#define MFEM_VECTORIZE_LOOP _Pragma("GCC ivdep")
35
#define MFEM_VECTORIZE_LOOP
36
#else
37
#define MFEM_VECTORIZE_LOOP
38
#endif
39
40
// MFEM_TEMPLATE_BLOCK_SIZE is the block size used by the template matrix-matrix
41
// multiply, Mult_AB, defined in tmatrix.hpp. This parameter will generally
42
// require tuning to determine good value. It is probably highly influenced by
43
// the SIMD width when Mult_AB is used with a SIMD type like AutoSIMD.
44
#define MFEM_TEMPLATE_BLOCK_SIZE 4
45
46
#define MFEM_TEMPLATE_ENABLE_SERIALIZE
47
48
// #define MFEM_TEMPLATE_ELTRANS_HAS_NODE_DOFS
49
// #define MFEM_TEMPLATE_ELTRANS_RESULT_HAS_NODES
50
// #define MFEM_TEMPLATE_FIELD_EVAL_DATA_HAS_DOFS
51
#define MFEM_TEMPLATE_INTRULE_COEFF_PRECOMP
52
53
#ifdef MFEM_COUNT_FLOPS
54
namespace
mfem
55
{
56
namespace
internal
57
{
58
extern
long
long
flop_count;
59
}
60
}
61
#define MFEM_FLOPS_RESET() (mfem::internal::flop_count = 0)
62
#define MFEM_FLOPS_ADD(cnt) (mfem::internal::flop_count += (cnt))
63
#define MFEM_FLOPS_GET() (mfem::internal::flop_count)
64
#else
65
#define MFEM_FLOPS_RESET()
66
#define MFEM_FLOPS_ADD(cnt)
67
#define MFEM_FLOPS_GET() (0)
68
#endif
69
70
#endif // MFEM_TEMPLATE_CONFIG
config.hpp
Generated on Fri Oct 30 2020 15:47:58 for MFEM by
1.8.5