check_library_exists(m sqrt "" HAVE_LIBM)
check_library_exists(rt clock_gettime "" HAVE_CLOCK_GETTIME)
-
-include(CheckTypeSize)
-
-check_type_size("int" SIZEOF_INT)
-check_type_size("long int" SIZEOF_LONG_INT)
-check_type_size("long long int" SIZEOF_LONG_LONG_INT)
-check_type_size("off_t" SIZEOF_OFF_T)
-check_type_size("void *" SIZEOF_VOIDP)
-
include(TestBigEndian)
test_big_endian(GMX_INTEGER_BIG_ENDIAN)
include(CheckFunctionExists)
include(CheckFortranFunctionExists)
+include(CheckTypeSize)
set(_blas_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
list(GET _ACML_GPU_ROOT 0 _ACML_GPU_ROOT)
if( _ACML_ROOT )
get_filename_component( _ACML_ROOT ${_ACML_ROOT} PATH )
+ check_type_size("int" SIZEOF_INTEGER)
if( SIZEOF_INTEGER EQUAL 8 )
set( _ACML_PATH_SUFFIX "_int64" )
else()
# However, it is YOUR job to make sure these defines are set in a cmakedefine so they
# end up in a config.h file that is included in your source if necessary!
+include(CheckTypeSize)
+
MACRO(GMX_TEST_LARGE_FILES VARIABLE)
IF(NOT DEFINED ${VARIABLE})
elseif(HAVE__FSEEKI64)
SET(${VARIABLE} 1 CACHE INTERNAL "Result of test for large file support" FORCE)
SET(HAVE__FSEEKI64 1 CACHE INTERNAL "Windows 64-bit fseek" FORCE)
- elseif(SIZEOF_LONG_INT EQUAL 8) #standard fseek is OK for 64bit
- SET(${VARIABLE} 1 CACHE INTERNAL "Result of test for large file support" FORCE)
else()
- SET(${VARIABLE} 0 CACHE INTERNAL "Result of test for large file support" FORCE)
- MESSAGE(FATAL_ERROR "Checking for 64bit file support failed.")
+ check_type_size("long int" SIZEOF_LONG_INT)
+ if(SIZEOF_LONG_INT EQUAL 8) #standard fseek is OK for 64bit
+ SET(${VARIABLE} 1 CACHE INTERNAL "Result of test for large file support" FORCE)
+ else()
+ SET(${VARIABLE} 0 CACHE INTERNAL "Result of test for large file support" FORCE)
+ MESSAGE(FATAL_ERROR "Checking for 64bit file support failed.")
+ endif()
endif()
ENDIF(NOT DEFINED ${VARIABLE})
/* Define if SIGUSR1 is present */
#cmakedefine HAVE_SIGUSR1
-/* The size of int, as computed by sizeof. */
-#cmakedefine SIZEOF_INT @SIZEOF_INT@
-
-/* The size of long int, as computed by sizeof. */
-#cmakedefine SIZEOF_LONG_INT @SIZEOF_LONG_INT@
-
-/* The size of long long int, as computed by sizeof. */
-#cmakedefine SIZEOF_LONG_LONG_INT @SIZEOF_LONG_LONG_INT@
-
-/* The size of off_t, as computed by sizeof. */
-#cmakedefine SIZEOF_OFF_T @SIZEOF_OFF_T@
-
-/* The size of void*, as computed by sizeof. */
-#cmakedefine SIZEOF_VOIDP @SIZEOF_VOIDP@
-
/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
#cmakedefine _LARGEFILE_SOURCE
int i, s;
double min, max;
int nbin;
-#if (defined SIZEOF_LONG_LONG_INT) && (SIZEOF_LONG_LONG_INT >= 8)
- long long int *histo;
-#else
- double *histo;
-#endif
+ gmx_int64_t *histo;
min = val[0][0];
max = val[0][0];
char **grpname;
int *isize, isize_cm = 0, nrdf = 0, max_i, isize0, isize_g;
atom_id **index, *index_cm = NULL;
-#if (defined SIZEOF_LONG_LONG_INT) && (SIZEOF_LONG_LONG_INT >= 8)
- long long int *sum;
-#else
- double *sum;
-#endif
+ gmx_int64_t *sum;
real t, rmax2, cut2, r, r2, r2ii, invhbinw, normfac;
real segvol, spherevol, prev_spherevol, **rdf;
rvec *x, dx, *x0 = NULL, *x_i1, xi;
{
return -1;
}
-#if (SIZEOF_GMX_OFF_T > 4)
outputfiles[i].offset = ( ((gmx_off_t) offset_high) << 32 ) | ( (gmx_off_t) offset_low & mask );
-#else
- outputfiles[i].offset = offset_low;
-#endif
}
else
{
}
else
{
-#if (SIZEOF_GMX_OFF_T > 4)
offset_low = (int) (offset & mask);
offset_high = (int) ((offset >> 32) & mask);
-#else
- offset_low = offset;
- offset_high = 0;
-#endif
}
if (do_cpt_int(xd, "file_offset_high", &offset_high, list) != 0)
{
int ntypes, tpi, tpj, thisLBdiff, thisgeomdiff;
int *typecount;
real tol;
-#if (defined SIZEOF_LONG_LONG_INT) && (SIZEOF_LONG_LONG_INT >= 8)
- long long int npair, npair_ij;
-#else
- double npair, npair_ij;
-#endif
double geometricdiff, LBdiff;
double c6i, c6j, c12i, c12j;
double c6, c6_geometric, c6_LB;
*bC6ParametersWorkWithGeometricRules = TRUE;
bCanDoLBRules = TRUE;
bCanDoGeometricRules = TRUE;
- npair = 0;
ntypes = mtop->ffparams.atnr;
snew(typecount, ntypes);
gmx_mtop_count_atomtypes(mtop, state, typecount);
* ====================================================
*/
-#if ( (defined SIZEOF_INT && SIZEOF_INT == 4) || (SIZEOF_INT_MAX == 2147483647) )
-typedef int erf_int32_t;
-typedef unsigned int erf_u_int32_t;
-#elif (LONG_MAX == 2147483647L)
-typedef long erf_int32_t;
-typedef unsigned long erf_u_int32_t;
-#elif (SHRT_MAX == 2147483647)
-typedef short erf_int32_t;
-typedef unsigned short erf_u_int32_t;
-#else
-# error ERROR: No 32 bit wide integer type found!
-#endif
-
-
static const double
tiny = 1e-300,
half = 5.00000000000000000000e-01, /* 0x3FE00000, 0x00000000 */
double gmx_erfd(double x)
{
-
- erf_int32_t hx, ix, i;
+ gmx_int32_t hx, ix, i;
double R, S, P, Q, s, y, z, r;
union
if (ix >= 0x7ff00000)
{
/* erf(nan)=nan */
- i = ((erf_u_int32_t)hx>>31)<<1;
+ i = ((gmx_uint32_t)hx>>31)<<1;
return (double)(1-i)+one/x; /* erf(+-inf)=+-1 */
}
double gmx_erfcd(double x)
{
- erf_int32_t hx, ix;
+ gmx_int32_t hx, ix;
double R, S, P, Q, s, y, z, r;
union
{
/* erfc(nan)=nan */
/* erfc(+-inf)=0,2 */
- return (double)(((erf_u_int32_t)hx>>31)<<1)+one/x;
+ return (double)(((gmx_uint32_t)hx>>31)<<1)+one/x;
}
if (ix < 0x3feb0000)
typedef union
{
float value;
- erf_u_int32_t word;
+ gmx_uint32_t word;
} ieee_float_shape_type;
#define GET_FLOAT_WORD(i, d) \
float gmx_erff(float x)
{
- erf_int32_t hx, ix, i;
+ gmx_int32_t hx, ix, i;
float R, S, P, Q, s, y, z, r;
union
if (ix >= 0x7f800000)
{
/* erf(nan)=nan */
- i = ((erf_u_int32_t)hx>>31)<<1;
+ i = ((gmx_uint32_t)hx>>31)<<1;
return (float)(1-i)+onef/x; /* erf(+-inf)=+-1 */
}
float gmx_erfcf(float x)
{
- erf_int32_t hx, ix;
+ gmx_int32_t hx, ix;
float R, S, P, Q, s, y, z, r;
union
{
/* erfc(nan)=nan */
/* erfc(+-inf)=0,2 */
- return (float)(((erf_u_int32_t)hx>>31)<<1)+onef/x;
+ return (float)(((gmx_uint32_t)hx>>31)<<1)+onef/x;
}
if (ix < 0x3f580000)
const t_atoms *atoms, *atoms_tpi;
const t_blocka *excl;
int mb, nmol, nmolc, i, j, tpi, tpj, j1, j2, k, n, nexcl, q;
-#if (defined SIZEOF_LONG_LONG_INT) && (SIZEOF_LONG_LONG_INT >= 8)
- long long int npair, npair_ij, tmpi, tmpj;
-#else
- double npair, npair_ij, tmpi, tmpj;
-#endif
+ gmx_int64_t npair, npair_ij, tmpi, tmpj;
double csix, ctwelve;
int ntp, *typecount;
gmx_bool bBHAM;
set(_outputopt --xml)
endif()
set(_common_flags
- --enable=style
- -DSIZEOF_LONG_LONG_INT=8 -DSIZEOF_INT=4 -DLINUX
+ --enable=style -DLINUX
-I src/gromacs/legacyheaders -I src
-I ${CMAKE_BINARY_DIR}/src -I ${CMAKE_BINARY_DIR}/src/gromacs/utility
--quiet