MFEM
v3.3.2
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, Lawrence Livermore National Security, LLC. Produced at
2
// the Lawrence Livermore National Laboratory. LLNL-CODE-443211. All Rights
3
// reserved. See file COPYRIGHT for details.
4
//
5
// This file is part of the MFEM library. For more information and source code
6
// availability see http://mfem.org.
7
//
8
// MFEM is free software; you can redistribute it and/or modify it under the
9
// terms of the GNU Lesser General Public License (as published by the Free
10
// Software Foundation) version 2.1 dated February 1999.
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
#define MFEM_TEMPLATE_BLOCK_SIZE 4
33
#define MFEM_SIMD_SIZE 32
34
#define MFEM_TEMPLATE_ENABLE_SERIALIZE
35
36
// #define MFEM_TEMPLATE_ELTRANS_HAS_NODE_DOFS
37
// #define MFEM_TEMPLATE_ELTRANS_RESULT_HAS_NODES
38
// #define MFEM_TEMPLATE_FIELD_EVAL_DATA_HAS_DOFS
39
#define MFEM_TEMPLATE_INTRULE_COEFF_PRECOMP
40
41
// derived macros
42
#define MFEM_ROUNDUP(val,base) ((((val)+(base)-1)/(base))*(base))
43
#define MFEM_ALIGN_SIZE(size,type) \
44
MFEM_ROUNDUP(size,(MFEM_SIMD_SIZE)/sizeof(type))
45
46
namespace
mfem
47
{
48
namespace
internal
49
{
50
long
long
flop_count;
51
}
52
}
53
54
#ifdef MFEM_COUNT_FLOPS
55
#define MFEM_FLOPS_RESET() (mfem::internal::flop_count = 0)
56
#define MFEM_FLOPS_ADD(cnt) (mfem::internal::flop_count += (cnt))
57
#define MFEM_FLOPS_GET() (mfem::internal::flop_count)
58
#else
59
#define MFEM_FLOPS_RESET()
60
#define MFEM_FLOPS_ADD(cnt)
61
#define MFEM_FLOPS_GET() (0)
62
#endif
63
64
#endif // MFEM_TEMPLATE_CONFIG
config.hpp
Generated on Fri Feb 18 2022 19:42:05 for MFEM by
1.8.5