GMX_TEST_CXXFLAG(CXXFLAGS_PRAGMA "-Wno-unknown-pragmas" GMXC_CXXFLAGS)
endif()
if (GMX_COMPILER_WARNINGS)
- GMX_TEST_CXXFLAG(CXXFLAGS_WARN "-Wall -Wno-unused-function" GMXC_CXXFLAGS)
+ GMX_TEST_CXXFLAG(CXXFLAGS_WARN "-Wall" GMXC_CXXFLAGS)
# Problematic with CUDA
# GMX_TEST_CXXFLAG(CXXFLAGS_WARN_EFFCXX "-Wnon-virtual-dtor" GMXC_CXXFLAGS)
GMX_TEST_CXXFLAG(CXXFLAGS_WARN_EXTRA "-Wextra -Wno-missing-field-initializers -Wpointer-arith" GMXC_CXXFLAGS)
GMX_TEST_CXXFLAG(CXXFLAGS_PRAGMA "-Wno-unknown-pragmas" GMXC_CXXFLAGS)
endif()
if (GMX_COMPILER_WARNINGS)
- GMX_TEST_CXXFLAG(CXXFLAGS_WARN "-Wall -Wno-unused-function" GMXC_CXXFLAGS)
+ GMX_TEST_CXXFLAG(CXXFLAGS_WARN "-Wall" GMXC_CXXFLAGS)
GMX_TEST_CXXFLAG(CXXFLAGS_WARN_EXTRA "-Wextra -Wno-missing-field-initializers -Wpointer-arith" GMXC_CXXFLAGS)
GMX_TEST_CXXFLAG(CXXFLAGS_DEPRECATED "-Wdeprecated" GMXC_CXXFLAGS)
endif()
# we do it in the compilation command (after testing that the compiler
# supports the suppressions).
include(CheckCXXCompilerFlag)
-check_cxx_compiler_flag(-Wno-unused-parameter HAS_NO_UNUSED_PARAMETER)
-if (HAS_NO_UNUSED_PARAMETER)
- set(_scanner_cpp_compiler_flags "${_scanner_cpp_compiler_flags} -Wno-unused-parameter")
+check_cxx_compiler_flag(-Wno-unused HAS_NO_UNUSED)
+if (HAS_NO_UNUSED)
+ set(_scanner_cpp_compiler_flags "${_scanner_cpp_compiler_flags} -Wno-unused-parameter -Wno-unused-function")
endif()
set_source_files_properties(selection/scanner.cpp PROPERTIES COMPILE_FLAGS "${_scanner_cpp_compiler_flags}")
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2010,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2010,2014,2015,2017, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
* \param[in] natoms_local An estimate of the number of home+communicated atoms
* \return a pointer to an initialized gmx_ga2la_t struct
*/
-static gmx_ga2la_t *ga2la_init(int natoms_total, int natoms_local)
+static inline gmx_ga2la_t *ga2la_init(int natoms_total, int natoms_local)
{
gmx_ga2la_t *ga2la;
* \param[in] a_loc The local atom index
* \param[in] cell The cell index
*/
-static void ga2la_set(gmx_ga2la_t *ga2la, int a_gl, int a_loc, int cell)
+static inline void ga2la_set(gmx_ga2la_t *ga2la, int a_gl, int a_loc, int cell)
{
int ind, ind_prev, i;
* \param[in,out] ga2la The global to local atom struct
* \param[in] a_gl The global atom index
*/
-static void ga2la_del(gmx_ga2la_t *ga2la, int a_gl)
+static inline void ga2la_del(gmx_ga2la_t *ga2la, int a_gl)
{
int ind, ind_prev;
* \param[in] a_gl The global atom index
* \param[in] a_loc The new local atom index
*/
-static void ga2la_change_la(gmx_ga2la_t *ga2la, int a_gl, int a_loc)
+static inline void ga2la_change_la(gmx_ga2la_t *ga2la, int a_gl, int a_loc)
{
int ind;
* \param[out] cell If the return value is TRUE, the zone or for atoms more than one cell away zone+nzone
* \return if the global atom a_gl available locally
*/
-static gmx_bool ga2la_get(const gmx_ga2la_t *ga2la, int a_gl, int *a_loc, int *cell)
+static inline gmx_bool ga2la_get(const gmx_ga2la_t *ga2la, int a_gl, int *a_loc, int *cell)
{
int ind;
* \param[out] a_loc If the return value is TRUE, the local atom index
* \return if the global atom a_gl is a home atom
*/
-static gmx_bool ga2la_get_home(const gmx_ga2la_t *ga2la, int a_gl, int *a_loc)
+static inline gmx_bool ga2la_get_home(const gmx_ga2la_t *ga2la, int a_gl, int *a_loc)
{
int ind;
* \param[in] a_gl The global atom index
* \return if the global atom a_gl is a home atom
*/
-static gmx_bool ga2la_is_home(const gmx_ga2la_t *ga2la, int a_gl)
+static inline gmx_bool ga2la_is_home(const gmx_ga2la_t *ga2la, int a_gl)
{
int ind;
* With the current number of keys check if the table size is still
* good, if not optimize it with the current number of keys.
*/
-static void gmx_hash_clear_and_optimize(gmx_hash_t *hash)
+static inline void gmx_hash_clear_and_optimize(gmx_hash_t *hash)
{
/* Resize the hash table when the occupation is < 1/4 or > 2/3 */
if (hash->nkey > 0 &&
}
//! Initialize hash table.
-static gmx_hash_t *gmx_hash_init(int nkey_used_estimate)
+static inline gmx_hash_t *gmx_hash_init(int nkey_used_estimate)
{
gmx_hash_t *hash;
}
//! Delete the hash entry for key.
-static void gmx_hash_del(gmx_hash_t *hash, int key)
+static inline void gmx_hash_del(gmx_hash_t *hash, int key)
{
int ind, ind_prev;
}
//! Change the value for present hash entry for key.
-static void gmx_hash_change_value(gmx_hash_t *hash, int key, int value)
+static inline void gmx_hash_change_value(gmx_hash_t *hash, int key, int value)
{
int ind;
}
//! Change the hash value if already set, otherwise set the hash value.
-static void gmx_hash_change_or_set(gmx_hash_t *hash, int key, int value)
+static inline void gmx_hash_change_or_set(gmx_hash_t *hash, int key, int value)
{
int ind;
}
//! Returns if the key is present, if the key is present *value is set.
-static gmx_bool gmx_hash_get(const gmx_hash_t *hash, int key, int *value)
+static inline gmx_bool gmx_hash_get(const gmx_hash_t *hash, int key, int *value)
{
int ind;
}
#endif
-/* largest factor */
-static int l2factor(int z)
-{
- int i;
- if (z == 1)
- {
- i = 1;
- }
- else
- {
- i = z/2;
- while (z%i != 0)
- {
- i--;
- }
- }
- return i;
-}
-
-/* largest prime factor: WARNING: slow recursion, only use for small numbers */
-static int lpfactor(int z)
-{
- int f = l2factor(z);
- if (f == 1)
- {
- return z;
- }
- return std::max(lpfactor(f), lpfactor(z/f));
-}
-
#if !GMX_MPI
#if HAVE_GETTIMEOFDAY
#include <sys/time.h>
}
//! \brief Convert a double array, typed char*, to float
-static void convertArrayRealPrecision(const char *c, float *v, int n)
+gmx_unused static void convertArrayRealPrecision(const char *c, float *v, int n)
{
// cppcheck-suppress invalidPointerCast
const double *d = reinterpret_cast<const double *>(c);
return nh;
}
-static size_t get_nvsite_mt(gmx_moltype_t *mt)
-{
- static int vs_func[] = {
- F_VSITE2, F_VSITE3, F_VSITE3FD, F_VSITE3FAD,
- F_VSITE3OUT, F_VSITE4FD, F_VSITE4FDN, F_VSITEN
- };
- int i, ft;
- size_t nh = 0;
- for (i = 0; (i < asize(vs_func)); i++)
- {
- ft = vs_func[i];
- nh += mt->ilist[ft].nr/(interaction_function[ft].nratoms+1);
- }
- return nh;
-}
-
static int get_nharm(const gmx_mtop_t *mtop)
{
int nh = 0;
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2010,2011,2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2013,2014,2015,2017, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
real t; /* Interface thickness */
} t_interf;
-static void init_interf(t_interf *surf)
+static inline void init_interf(t_interf *surf)
{
surf->Z = 0;
surf->t = 0;
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2017, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
#define REAL_FUNC_TERM ;
#define REAL_FUNC_TERM_WITH_RETURN(arg) ;
-#define NULL_FUNC_QUALIFIER static
+#define NULL_FUNC_QUALIFIER gmx_unused static
#define NULL_FUNC_ARGUMENT(arg) /*arg*/
#define NULL_FUNC_TERM {}
#define NULL_FUNC_TERM_WITH_RETURN(arg) { return (arg); }
* much more fragile than our x86 detection, but it does not depend on
* specific system calls, intrinsics or assembly instructions.
*/
-void
+gmx_unused void
detectProcCpuInfo(CpuInfo::Vendor * vendor,
std::string * brand,
int * family,
return d;
}
-static t_complex rcexp(real r)
+static inline t_complex rcexp(real r)
{
t_complex c;
}
-static t_complex cadd(t_complex a, t_complex b)
+static inline t_complex cadd(t_complex a, t_complex b)
{
t_complex c;
return c;
}
-static t_complex csub(t_complex a, t_complex b)
+static inline t_complex csub(t_complex a, t_complex b)
{
t_complex c;
return d;
}
-static real cabs2(t_complex c)
+static inline real cabs2(t_complex c)
{
real abs2;
abs2 = (c.re*c.re)+(c.im*c.im);
return abs2;
}
-static t_complex cdiv(t_complex teller, t_complex noemer)
+static inline t_complex cdiv(t_complex teller, t_complex noemer)
{
t_complex res, anoemer;
#endif // GMX_SIMD_HAVE_REAL
/* Determine the distances and right-hand side for the next iteration */
-static void calc_dist_iter(int b0,
- int b1,
- const int * bla,
- const rvec * gmx_restrict xp,
- const real * gmx_restrict bllen,
- const real * gmx_restrict blc,
- const t_pbc * pbc,
- real wfac,
- real * gmx_restrict rhs,
- real * gmx_restrict sol,
- gmx_bool * bWarn)
+gmx_unused static void calc_dist_iter(
+ int b0,
+ int b1,
+ const int * bla,
+ const rvec * gmx_restrict xp,
+ const real * gmx_restrict bllen,
+ const real * gmx_restrict blc,
+ const t_pbc * pbc,
+ real wfac,
+ real * gmx_restrict rhs,
+ real * gmx_restrict sol,
+ gmx_bool * bWarn)
{
int b;
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013,2014,2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
* the reduction in computional cost due to parallelization. This routine
* returns 1 when the overhead is expected to be higher than the gain.
*/
-static int gmx_omp_nthreads_get_simple_rvec_task(int mod, int nrvec)
+static inline int gmx_omp_nthreads_get_simple_rvec_task(int mod, int nrvec)
{
/* There can be a relatively large overhead to an OpenMP parallel for loop.
* This overhead increases, slowly, with the numbe of threads used.
}
}
-static void clear_nbat_real(int na, int nbatFormat, real *xnb, int a0)
-{
- int j, c;
-
- switch (nbatFormat)
- {
- case nbatXYZ:
- for (int a = 0; a < na; a++)
- {
- for (int d = 0; d < DIM; d++)
- {
- xnb[(a0+a)*STRIDE_XYZ+d] = 0;
- }
- }
- break;
- case nbatXYZQ:
- for (int a = 0; a < na; a++)
- {
- for (int d = 0; d < DIM; d++)
- {
- xnb[(a0+a)*STRIDE_XYZQ+d] = 0;
- }
- }
- break;
- case nbatX4:
- j = atom_to_x_index<c_packX4>(a0);
- c = a0 & (c_packX4 - 1);
- for (int a = 0; a < na; a++)
- {
- xnb[j+XX*c_packX4] = 0;
- xnb[j+YY*c_packX4] = 0;
- xnb[j+ZZ*c_packX4] = 0;
- j++;
- c++;
- if (c == c_packX4)
- {
- j += (DIM-1)*c_packX4;
- c = 0;
- }
- }
- break;
- case nbatX8:
- j = atom_to_x_index<c_packX8>(a0);
- c = a0 & (c_packX8-1);
- for (int a = 0; a < na; a++)
- {
- xnb[j+XX*c_packX8] = 0;
- xnb[j+YY*c_packX8] = 0;
- xnb[j+ZZ*c_packX8] = 0;
- j++;
- c++;
- if (c == c_packX8)
- {
- j += (DIM-1)*c_packX8;
- c = 0;
- }
- }
- break;
- }
-}
-
void copy_rvec_to_nbat_real(const int *a, int na, int na_round,
const rvec *x, int nbatFormat,
real *xnb, int a0)
}
}
-static void
+gmx_unused static void
nbnxn_atomdata_reduce_reals(real * gmx_restrict dest,
gmx_bool bDestSet,
real ** gmx_restrict src,
}
}
-static void
+gmx_unused static void
nbnxn_atomdata_reduce_reals_simd(real gmx_unused * gmx_restrict dest,
gmx_bool gmx_unused bDestSet,
real gmx_unused ** gmx_restrict src,
}
/* Packed coordinates, bb order xyz0 */
-static void calc_bounding_box_x_x4_halves(int na, const real *x,
- nbnxn_bb_t *bb, nbnxn_bb_t *bbj)
+gmx_unused static void calc_bounding_box_x_x4_halves(int na, const real *x,
+ nbnxn_bb_t *bb, nbnxn_bb_t *bbj)
{
// TODO: During SIMDv2 transition only some archs use namespace (remove when done)
using namespace gmx;
}
}
-static void init_buffer_flags(nbnxn_buffer_flags_t *flags,
- int natoms)
-{
- flags->nflag = (natoms + NBNXN_BUFFERFLAG_SIZE - 1)/NBNXN_BUFFERFLAG_SIZE;
- if (flags->nflag > flags->flag_nalloc)
- {
- flags->flag_nalloc = over_alloc_large(flags->nflag);
- srenew(flags->flag, flags->flag_nalloc);
- }
- for (int b = 0; b < flags->nflag; b++)
- {
- bitmask_clear(&(flags->flag[b]));
- }
-}
-
/* Sets up a grid and puts the atoms on the grid.
* This function only operates on one domain of the domain decompostion.
* Note that without domain decomposition there is only one domain.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013,2014,2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
int stride, const real *x,
nbnxn_list_work_t *work);
-static gmx_icell_set_x_t icell_set_x_simple;
-#if GMX_SIMD
-static gmx_icell_set_x_t icell_set_x_simple_simd_4xn;
-static gmx_icell_set_x_t icell_set_x_simple_simd_2xnn;
-#endif
-static gmx_icell_set_x_t icell_set_x_supersub;
-
/* Local cycle count struct for profiling */
typedef struct {
int count;
} nbnxn_search_t_t;
-static void nbs_cycle_start(nbnxn_cycle_t *cc)
+static inline void nbs_cycle_start(nbnxn_cycle_t *cc)
{
cc->start = gmx_cycles_read();
}
-static void nbs_cycle_stop(nbnxn_cycle_t *cc)
+static inline void nbs_cycle_stop(nbnxn_cycle_t *cc)
{
cc->c += gmx_cycles_read() - cc->start;
cc->count++;
fprintf(fp, "\n");
}
-static gmx_inline int ci_to_cj(int ci, int na_cj_2log)
+gmx_unused static gmx_inline int ci_to_cj(int ci, int na_cj_2log)
{
switch (na_cj_2log)
{
}
/* Reference code calculating the distance^2 between two bounding boxes */
-static float box_dist2(float bx0, float bx1, float by0,
+/*
+ static float box_dist2(float bx0, float bx1, float by0,
float by1, float bz0, float bz1,
const nbnxn_bb_t *bb)
-{
+ {
float d2;
float dl, dh, dm, dm0;
d2 += dm0*dm0;
return d2;
-}
+ }
+ */
/* Plain C code calculating the distance^2 between two bounding boxes */
static float subc_bb_dist2(int si, const nbnxn_bb_t *bb_i_ci,
}
/* Returns a diagonal or off-diagonal interaction mask for cj-size=2 */
-static unsigned int get_imask_simd_j2(gmx_bool rdiag, int ci, int cj)
+gmx_unused static unsigned int get_imask_simd_j2(gmx_bool rdiag, int ci, int cj)
{
return (rdiag && ci*2 == cj ? NBNXN_INTERACTION_MASK_DIAG_J2_0 :
(rdiag && ci*2+1 == cj ? NBNXN_INTERACTION_MASK_DIAG_J2_1 :
}
/* Returns a diagonal or off-diagonal interaction mask for cj-size=4 */
-static unsigned int get_imask_simd_j4(gmx_bool rdiag, int ci, int cj)
+gmx_unused static unsigned int get_imask_simd_j4(gmx_bool rdiag, int ci, int cj)
{
return (rdiag && ci == cj ? NBNXN_INTERACTION_MASK_DIAG : NBNXN_INTERACTION_MASK_ALL);
}
/* Returns a diagonal or off-diagonal interaction mask for cj-size=8 */
-static unsigned int get_imask_simd_j8(gmx_bool rdiag, int ci, int cj)
+gmx_unused static unsigned int get_imask_simd_j8(gmx_bool rdiag, int ci, int cj)
{
return (rdiag && ci == cj*2 ? NBNXN_INTERACTION_MASK_DIAG_J8_0 :
(rdiag && ci == cj*2+1 ? NBNXN_INTERACTION_MASK_DIAG_J8_1 :
#endif
/* Sets a super-cell and sub cell bounding boxes, including PBC shift */
-static void set_icell_bb_supersub(const nbnxn_bb_t *bb, int ci,
- real shx, real shy, real shz,
- nbnxn_bb_t *bb_ci)
+gmx_unused static void set_icell_bb_supersub(const nbnxn_bb_t *bb, int ci,
+ real shx, real shy, real shz,
+ nbnxn_bb_t *bb_ci)
{
for (int i = 0; i < c_gpuNumClusterPerCell; i++)
{
/* Returns the sum of the vsite ilist sizes over all vsite types */
-static int vsiteIlistNrCount(const t_ilist *ilist)
+gmx_unused static int vsiteIlistNrCount(const t_ilist *ilist)
{
int nr = 0;
for (int ftype = c_ftypeVsiteStart; ftype < c_ftypeVsiteEnd; ftype++)
clear_mat(ekin_total);
};
-static void init_swapstate(swaphistory_t *swapstate)
-{
- /* Ion/water position swapping */
- swapstate->eSwapCoords = 0;
- swapstate->nIonTypes = 0;
- swapstate->nAverage = 0;
- swapstate->fluxleak = 0;
- swapstate->fluxleak_p = nullptr;
- swapstate->bFromCpt = 0;
- swapstate->nat[eChan0] = 0;
- swapstate->nat[eChan1] = 0;
- swapstate->xc_old_whole[eChan0] = nullptr;
- swapstate->xc_old_whole[eChan1] = nullptr;
- swapstate->xc_old_whole_p[eChan0] = nullptr;
- swapstate->xc_old_whole_p[eChan1] = nullptr;
- swapstate->ionType = nullptr;
-}
-
void init_gtc_state(t_state *state, int ngtc, int nnhpres, int nhchainlength)
{
state->ngtc = ngtc;
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2017, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
* added to \f$1/r\f$ the error will be insignificant.
*
*/
-static SimdDouble gmx_simdcall
+static inline SimdDouble gmx_simdcall
pmeForceCorrectionSingleAccuracy(SimdDouble z2)
{
const SimdDouble FN6(-1.7357322914161492954e-8);
* This approximation achieves an accuracy slightly lower than 1e-6; when
* added to \f$1/r\f$ the error will be insignificant.
*/
-static SimdDouble gmx_simdcall
+static inline SimdDouble gmx_simdcall
pmePotentialCorrectionSingleAccuracy(SimdDouble z2)
{
const SimdDouble VN6(1.9296833005951166339e-8);
return sc;
}
-/* Calculate the potential and force for an r value
- * in exactly the same way it is done in the inner loop.
- * VFtab is a pointer to the table data, offset is
- * the point where we should begin and stride is
- * 4 if we have a buckingham table, 3 otherwise.
- * If you want to evaluate table no N, set offset to 4*N.
- *
- * We use normal precision here, since that is what we
- * will use in the inner loops.
- */
-static void evaluate_table(real VFtab[], int offset, int stride,
- real tabscale, real r, real *y, real *yp)
-{
- int n;
- real rt, eps, eps2;
- real Y, F, Geps, Heps2, Fp;
-
- rt = r*tabscale;
- n = (int)rt;
- eps = rt - n;
- eps2 = eps*eps;
- n = offset+stride*n;
- Y = VFtab[n];
- F = VFtab[n+1];
- Geps = eps*VFtab[n+2];
- Heps2 = eps2*VFtab[n+3];
- Fp = F+Geps+Heps2;
- *y = Y+eps*Fp;
- *yp = (Fp+Geps+2.0*Heps2)*tabscale;
-}
-
static void copy2table(int n, int offset, int stride,
double x[], double Vtab[], double Ftab[], real scalefactor,
real dest[])
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2015, by the GROMACS development team, led by
+ * Copyright (c) 2015,2017, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
* gmx::alignedMalloc(). Just like system-provided routines, it provides
* memory that is aligned - but not padded.
*/
-static void *
+gmx_unused static void *
alignedMallocGeneric(std::size_t bytes, std::size_t alignment)
{
// The amount of extra memory (beyound what the user asked for) we need is:
* \note This is an internal routine that should only be called from
* gmx::alignedFree().
*/
-static void
+gmx_unused static void
alignedFreeGeneric(void *p)
{
if (p)
}
/* Returns that maximum OpenMP thread count that passes the efficiency check */
-static int nthreads_omp_efficient_max(int gmx_unused nrank,
- const gmx::CpuInfo &cpuInfo,
- gmx_bool bUseGPU)
+gmx_unused static int nthreads_omp_efficient_max(int gmx_unused nrank,
+ const gmx::CpuInfo &cpuInfo,
+ gmx_bool bUseGPU)
{
#if GMX_OPENMP && GMX_MPI
if (nrank > 1)
/* Return the number of thread-MPI ranks to use.
* This is chosen such that we can always obey our own efficiency checks.
*/
-static int get_tmpi_omp_thread_division(const gmx_hw_info_t *hwinfo,
- const gmx_hw_opt_t &hw_opt,
- int nthreads_tot,
- int ngpu)
+gmx_unused static int get_tmpi_omp_thread_division(const gmx_hw_info_t *hwinfo,
+ const gmx_hw_opt_t &hw_opt,
+ int nthreads_tot,
+ int ngpu)
{
int nrank;
const gmx::CpuInfo &cpuInfo = *hwinfo->cpuInfo;
}
-static int getMaxGpuUsable(const gmx_hw_info_t *hwinfo,
- int cutoff_scheme)
+gmx_unused static int getMaxGpuUsable(const gmx_hw_info_t *hwinfo,
+ int cutoff_scheme)
{
/* This code relies on the fact that GPU are not detected when GPU
* acceleration was disabled at run time by the user, either with
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2013, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
eg0, egTOPOL, egCONFIN, egPARAM, eg1, eg1PROC, eg32PROC
};
-static void Extract(t_dlg *dlg, int ID, char *buf)
-{
- char *et;
-
- et = EditText(dlg, ID);
- if (et)
- {
- std::strcpy(buf, et);
- }
-}
-
enum bond_set {
ebShowH = 11, ebDPlus, ebRMPBC, ebCue, ebSkip, ebWait
};
esFUNCT = 1, esBSHOW, esINFIL, esINDEXFIL, esLSQ, esSHOW, esPLOTFIL
};
-static bool in_set(int i, int n, int set[])
-{
- int j;
- for (j = 0; (j < n); j++)
- {
- if (set[j] == i)
- {
- return true;
- }
- }
- return false;
-}
-
typedef t_dlg *t_mmb (t_x11 *x11, t_gmx *gmx);
typedef struct {