Also remove c/c++ bool check given that it isn't needed
anymore.
Change-Id: I8b1c34a5fe3130c1a2754eed81815fa36020bd89
message(WARNING "Currently tested PGI compiler versions (up to 15.7) generate binaries that do not pass all regression test, and the generated binaries are significantly slower than with GCC, ICC or Clang. For now we do not recommend PGI beyond development testing - make sure to run the regressiontests.")
endif()
message(WARNING "Currently tested PGI compiler versions (up to 15.7) generate binaries that do not pass all regression test, and the generated binaries are significantly slower than with GCC, ICC or Clang. For now we do not recommend PGI beyond development testing - make sure to run the regressiontests.")
endif()
- # Test that C bool and C++ bool size is the same
- include(CheckTypeSize)
- set(CMAKE_EXTRA_INCLUDE_FILES "stdbool.h")
- CHECK_TYPE_SIZE("bool" C_BOOL_SIZE LANGUAGE "C")
- set(CMAKE_EXTRA_INCLUDE_FILES "")
- CHECK_TYPE_SIZE("bool" CXX_BOOL_SIZE LANGUAGE "CXX")
- if(NOT C_BOOL_SIZE EQUAL CXX_BOOL_SIZE)
- message(FATAL_ERROR "Size of bool of C and C++ compiler don't match. Make sure you use compatible C and C++ compilers. If both compilers are from the same vendor, please report the issue to redmine.gromacs.org.")
- endif()
endmacro(gmx_test_compiler_problems)
endmacro(gmx_test_compiler_problems)
#ifndef _fftpack_h
#define _fftpack_h
#ifndef _fftpack_h
#define _fftpack_h
-#include "gromacs/utility/real.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
extern "C" {
#endif
+#if GMX_DOUBLE
+#define Treal double
+#else
+#define Treal float
+#endif
void fftpack_cffti1(int n, Treal wa[], int ifac[]);
void fftpack_cfftf1(int n, Treal c[], Treal ch[], const Treal wa[], const int ifac[], int isign);
void fftpack_cffti1(int n, Treal wa[], int ifac[]);
void fftpack_cfftf1(int n, Treal c[], Treal ch[], const Treal wa[], const int ifac[], int isign);
#include "gromacs/mdtypes/nblist.h"
#include "gromacs/utility/real.h"
#include "gromacs/mdtypes/nblist.h"
#include "gromacs/utility/real.h"
-#if 0
-} /* fixes auto-indentation problems */
-#endif
-
/*! \def gmx_inline
* \brief
* Keyword to use in C code instead of C99 `inline`.
/*! \def gmx_inline
* \brief
* Keyword to use in C code instead of C99 `inline`.
* to indicate a function is inlined.
* C++ code should use plain `inline`, as that is already in C++98.
*/
* to indicate a function is inlined.
* C++ code should use plain `inline`, as that is already in C++98.
*/
-#if !defined __cplusplus && defined _MSC_VER
-#define gmx_inline __inline
-#else
-/* C++ or C99 */
#define gmx_inline inline
#define gmx_inline inline
return (m[XX][XX]+m[YY][YY]+m[ZZ][ZZ]);
}
return (m[XX][XX]+m[YY][YY]+m[ZZ][ZZ]);
}
template <typename T> T norm2(T* v) { return ::norm2(v); }
} // namespace gmx
/*! \} */
template <typename T> T norm2(T* v) { return ::norm2(v); }
} // namespace gmx
/*! \} */
#ifndef GMX_MATH_VECTYPES_H
#define GMX_MATH_VECTYPES_H
#ifndef GMX_MATH_VECTYPES_H
#define GMX_MATH_VECTYPES_H
#include <cmath>
#include <type_traits>
#include <cmath>
#include <type_traits>
-#else
-
-#include <math.h> // since this file used from C source files
-
-#endif
-
#include "gromacs/utility/real.h"
#define XX 0 /* Defines for indexing in */
#include "gromacs/utility/real.h"
#define XX 0 /* Defines for indexing in */
-#endif // ifdef __cplusplus
-
#ifndef GMX_MDTYPES_TYPES_FORCEREC_H
#define GMX_MDTYPES_TYPES_FORCEREC_H
#ifndef GMX_MDTYPES_TYPES_FORCEREC_H
#define GMX_MDTYPES_TYPES_FORCEREC_H
-#include "gromacs/math/vectypes.h"
-#ifdef __cplusplus
#include "gromacs/math/paddedvector.h"
#include "gromacs/math/paddedvector.h"
+#include "gromacs/math/vectypes.h"
#include "gromacs/mdtypes/interaction_const.h"
#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/basedefinitions.h"
#include "gromacs/mdtypes/interaction_const.h"
#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/basedefinitions.h"
* PPPM/PME/Ewald/posres/ForceProviders
*/
/* True when we have contributions that are directly added to the virial */
* PPPM/PME/Ewald/posres/ForceProviders
*/
/* True when we have contributions that are directly added to the virial */
- gmx_bool haveDirectVirialContributions;
-#ifdef __cplusplus
+ gmx_bool haveDirectVirialContributions;
/* TODO: Replace the pointer by an object once we got rid of C */
std::vector<gmx::RVec> *forceBufferForDirectVirialContributions;
/* TODO: Replace the pointer by an object once we got rid of C */
std::vector<gmx::RVec> *forceBufferForDirectVirialContributions;
-#else
- void *forceBufferForDirectVirialContributions_dummy;
-#endif
/* Data for PPPM/PME/Ewald */
struct gmx_pme_t *pmedata;
/* Data for PPPM/PME/Ewald */
struct gmx_pme_t *pmedata;
/* Deprecated, C-style version of RangePartitioning */
typedef struct t_block
{
/* Deprecated, C-style version of RangePartitioning */
typedef struct t_block
{
int blockSize(int blockIndex) const
{
GMX_ASSERT(blockIndex < nr, "blockIndex should be in range");
return index[blockIndex + 1] - index[blockIndex];
}
int blockSize(int blockIndex) const
{
GMX_ASSERT(blockIndex < nr, "blockIndex should be in range");
return index[blockIndex + 1] - index[blockIndex];
}
int nr; /* The number of blocks */
int *index; /* Array of indices (dim: nr+1) */
int nr; /* The number of blocks */
int *index; /* Array of indices (dim: nr+1) */
#include <cinttypes>
#include <cstddef>
#include <cinttypes>
#include <cstddef>
-#else
-#include <stdbool.h>
-#endif
//! Identical to bool
typedef bool gmx_bool;
//! Identical to bool
typedef bool gmx_bool;
/** Number of gmx_bool values. */
#define BOOL_NR 2
/** Number of gmx_bool values. */
#define BOOL_NR 2
namespace gmx
{
/*! \brief Integer type for indexing into arrays or vectors
namespace gmx
{
/*! \brief Integer type for indexing into arrays or vectors
*/
using index = std::ptrdiff_t;
}
*/
using index = std::ptrdiff_t;
}
/* ICC, GCC, MSVC, Pathscale, PGI, XLC support __restrict.
* Any other compiler can be added here. */
/* ICC, GCC, MSVC, Pathscale, PGI, XLC support __restrict.
* Any other compiler can be added here. */
#define DIAGNOSTIC_RESET
#endif
#define DIAGNOSTIC_RESET
#endif
namespace gmx
{
namespace internal
namespace gmx
{
namespace internal
*/
#define GMX_IGNORE_RETURN_VALUE(call) \
::gmx::internal::ignoreValueHelper(call)
*/
#define GMX_IGNORE_RETURN_VALUE(call) \
::gmx::internal::ignoreValueHelper(call)
/*! \brief User defined literal for real numbers.
*
* Examples: 2._real, 2.5_real, .5_real. The number is always of type real.
/*! \brief User defined literal for real numbers.
*
* Examples: 2._real, 2.5_real, .5_real. The number is always of type real.
* See https://en.cppreference.com/w/cpp/language/user_literal for details on this lanuage feature.
*/
constexpr real operator"" _real(long double x) { return real(x); }
* See https://en.cppreference.com/w/cpp/language/user_literal for details on this lanuage feature.
*/
constexpr real operator"" _real(long double x) { return real(x); }