You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.7 KiB
59 lines
1.7 KiB
#ifndef DGTD_TEMPLATE_CONFIG
|
|
#define DGTD_TEMPLATE_CONFIG
|
|
|
|
// the main DGTD config header
|
|
#include "config.hpp"
|
|
|
|
// --- DGTD_STATIC_ASSERT
|
|
#if (__cplusplus >= 201103L)
|
|
#define DGTD_STATIC_ASSERT(cond, msg) static_assert((cond), msg)
|
|
#else
|
|
#define DGTD_STATIC_ASSERT(cond, msg) if (cond) { }
|
|
#endif
|
|
|
|
// --- DGTD_ALWAYS_INLINE
|
|
#if !defined(DGTD_DEBUG) && (defined(__GNUC__) || defined(__clang__))
|
|
#define DGTD_ALWAYS_INLINE __attribute__((always_inline))
|
|
#else
|
|
#define DGTD_ALWAYS_INLINE
|
|
#endif
|
|
|
|
// --- DGTD_VECTORIZE_LOOP (disabled)
|
|
#if (__cplusplus >= 201103L) && !defined(DGTD_DEBUG) && defined(__GNUC__)
|
|
//#define DGTD_VECTORIZE_LOOP _Pragma("GCC ivdep")
|
|
#define DGTD_VECTORIZE_LOOP
|
|
#else
|
|
#define DGTD_VECTORIZE_LOOP
|
|
#endif
|
|
|
|
// DGTD_TEMPLATE_BLOCK_SIZE is the block size used by the template matrix-matrix
|
|
// multiply, Mult_AB, defined in tmatrix.hpp. This parameter will generally
|
|
// require tuning to determine good value. It is probably highly influenced by
|
|
// the SIMD width when Mult_AB is used with a SIMD type like AutoSIMD.
|
|
#define DGTD_TEMPLATE_BLOCK_SIZE 4
|
|
|
|
#define DGTD_TEMPLATE_ENABLE_SERIALIZE
|
|
|
|
// #define DGTD_TEMPLATE_ELTRANS_HAS_NODE_DOFS
|
|
// #define DGTD_TEMPLATE_ELTRANS_RESULT_HAS_NODES
|
|
// #define DGTD_TEMPLATE_FIELD_EVAL_DATA_HAS_DOFS
|
|
#define DGTD_TEMPLATE_INTRULE_COEFF_PRECOMP
|
|
|
|
#ifdef DGTD_COUNT_FLOPS
|
|
namespace DGTD
|
|
{
|
|
namespace internal
|
|
{
|
|
extern long long flop_count;
|
|
}
|
|
}
|
|
#define DGTD_FLOPS_RESET() (DGTD::internal::flop_count = 0)
|
|
#define DGTD_FLOPS_ADD(cnt) (DGTD::internal::flop_count += (cnt))
|
|
#define DGTD_FLOPS_GET() (DGTD::internal::flop_count)
|
|
#else
|
|
#define DGTD_FLOPS_RESET()
|
|
#define DGTD_FLOPS_ADD(cnt)
|
|
#define DGTD_FLOPS_GET() (0)
|
|
#endif
|
|
|
|
#endif // DGTD_TEMPLATE_CONFIG
|
|
|