set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
-# PROJECT_VERSION should have the following structure:
-# VERSION-dev[-SUFFIX] where the VERSION should have the for: vMajor.vMinor.vPatch
-#
-# The "-dev" suffix is important to keep because it makes possible to distinguish
-# between a build from official release and a build from git release branch on a
-# machine with no git.
-#
-# NOTE: when releasing the "-dev" suffix needs to be stripped off!
-# REGRESSIONTEST_VERSION and REGRESSIONTEST_BRANCH should always be
-# defined.
-set(PROJECT_VERSION "5.0.1-dev")
-# If this is a released tarball, "-dev" will not be present in
-# PROJECT_VERSION, and REGRESSIONTEST_VERSION specifies the version
-# number of the regressiontest tarball against which the code tarball
-# can be tested. This will be the version of the last patch release.
-set(REGRESSIONTEST_VERSION "5.0.1-dev")
-# The MD5 checksum of the regressiontest tarball. Only used if "-dev"
-# is not present in the PROJECT_VERSION
-set(REGRESSIONTEST_MD5SUM "a07524afebca5013540d4f2f72df2dce")
-# If this is not a released tarball, "-dev" will be present in
-# PROJECT_VERSION, and REGRESSIONTEST_BRANCH specifies the name of the
-# gerrit.gromacs.org branch whose HEAD can test this code, *if* this
-# code contains all recent fixes from the corresponding code branch.
-set(REGRESSIONTEST_BRANCH "refs/heads/release-5-0")
-
-set(CUSTOM_VERSION_STRING ""
- CACHE STRING "Custom version string (if empty, use hard-coded default)")
-mark_as_advanced(CUSTOM_VERSION_STRING)
-if (CUSTOM_VERSION_STRING)
- set(PROJECT_VERSION ${CUSTOM_VERSION_STRING})
-endif()
-set(LIBRARY_SOVERSION 0)
-set(LIBRARY_VERSION ${LIBRARY_SOVERSION}.0.0)
-# It is a bit irritating, but this has to be set separately for now!
-SET(CPACK_PACKAGE_VERSION_MAJOR "5")
-SET(CPACK_PACKAGE_VERSION_MINOR "0")
-#SET(CPACK_PACKAGE_VERSION_PATCH "0")
-
-# The numerical gromacs version. It is 40600 for 4.6.0.
-# The #define GMX_VERSION in gromacs/version.h is set to this value.
-math(EXPR NUM_VERSION
- "${CPACK_PACKAGE_VERSION_MAJOR}*10000 + ${CPACK_PACKAGE_VERSION_MINOR}*100")
-if(CPACK_PACKAGE_VERSION_PATCH)
- math(EXPR NUM_VERSION
- "${NUM_VERSION} + ${CPACK_PACKAGE_VERSION_PATCH}")
-endif()
-
-# The API version tracks the numerical Gromacs version (for now).
-# It is potentially different from the Gromacs version in the future, if
-# the programs/libraries diverge from the presumably more stable API.
-# The #define GMX_API_VERSION in version.h is set to this value to
-# provide backward compatibility of software written against the Gromacs API.
-set(API_VERSION ${NUM_VERSION})
+# Set up common version variables, as well as general information about
+# the build tree (whether the build is from a source package or from a git
+# repository). Also declares a few functions that will be used for generating
+# version info files later.
+include(gmxVersionInfo)
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND UNIX)
set(CMAKE_INSTALL_PREFIX "/usr/local/gromacs" CACHE STRING "Installation prefix (installation will need write permissions here)" FORCE)
endif()
include(gmxBuildTypeReference)
+include(gmxBuildTypeProfile)
include(gmxBuildTypeTSAN)
include(gmxBuildTypeASAN)
include(gmxBuildTypeReleaseWithAssert)
if(NOT CMAKE_BUILD_TYPE)
- set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel Reference RelWithAssert." FORCE)
+ set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel Reference RelWithAssert Profile." FORCE)
# There's no need to offer a user the choice of ThreadSanitizer
# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
- "MinSizeRel" "RelWithDebInfo" "Reference" "RelWithAssert")
+ "MinSizeRel" "RelWithDebInfo" "Reference" "RelWithAssert" "Profile")
endif()
if(CMAKE_CONFIGURATION_TYPES)
# Add appropriate GROMACS-specific build types for the Visual
"List of configuration types"
FORCE)
endif()
-set(build_types_with_explicit_flags RELEASE DEBUG RELWITHDEBUGINFO RELWITHASSERT MINSIZEREL)
+set(build_types_with_explicit_flags RELEASE DEBUG RELWITHDEBUGINFO RELWITHASSERT MINSIZEREL PROFILE)
-enable_language(C)
-enable_language(CXX)
+ set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS ON)
-
set(CPACK_PACKAGE_NAME "gromacs")
-set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
+set(CPACK_PACKAGE_VERSION_MAJOR ${GMX_VERSION_MAJOR})
+set(CPACK_PACKAGE_VERSION_MINOR ${GMX_VERSION_MINOR})
+set(CPACK_PACKAGE_VERSION_PATCH ${GMX_VERSION_PATCH})
+set(CPACK_PACKAGE_VERSION ${GMX_VERSION_STRING})
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
set(CPACK_PACKAGE_VENDOR "gromacs.org")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Gromacs - a toolkit for high-performance molecular simulation")
"File that contains suppressions for the memory checker")
include(CTest)
-set(SOURCE_IS_GIT_REPOSITORY OFF)
-set(SOURCE_IS_SOURCE_DISTRIBUTION OFF)
-if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
- set(SOURCE_IS_GIT_REPOSITORY ON)
-endif()
-if(NOT EXISTS "${CMAKE_SOURCE_DIR}/admin/.isreposource")
- set(SOURCE_IS_SOURCE_DISTRIBUTION ON)
-endif()
+# Variables that accumulate stuff influencing the installed headers
+set(INSTALLED_HEADER_INCLUDE_DIRS "")
+set(INSTALLED_HEADER_DEFINITIONS "")
########################################################################
# Check and warn if cache generated on a different host is being reused
"Hostname of the machine where the cache was generated.")
endif()
+ ########################################################################
+ # Detect architecture before setting options so we can alter defaults
+ ########################################################################
+ # Detect the architecture the compiler is targetting, detect
+ # SIMD instructions possibilities on that hardware, suggest SIMD instruction set
+ # to use if none is specified, and populate the cache option for CPU
+ # SIMD.
+ include(gmxDetectTargetArchitecture)
+ gmx_detect_target_architecture()
+
########################################################################
# User input options #
########################################################################
set(CMAKE_PREFIX_PATH "" CACHE STRING "Extra locations to search for external libraries and tools (give directory without lib, bin, or include)")
- option(GMX_DOUBLE "Use double precision (much slower, use only if you really need it)" OFF)
+ if(GMX_TARGET_FUJITSU_SPARC64)
+ # Fujitsu only has SIMD in double precision, so this will be faster
+ set(GMX_DOUBLE_DEFAULT ON)
+ else()
+ set(GMX_DOUBLE_DEFAULT OFF)
+ endif()
+ option(GMX_DOUBLE "Use double precision (much slower, use only if you really need it)" ${GMX_DOUBLE_DEFAULT})
+ option(GMX_RELAXED_DOUBLE_PRECISION "Accept single precision 1/sqrt(x) when using Fujitsu HPC-ACE SIMD" OFF)
+ mark_as_advanced(GMX_RELAXED_DOUBLE_PRECISION)
+
option(GMX_MPI "Build a parallel (message-passing) version of GROMACS" OFF)
option(GMX_THREAD_MPI "Build a thread-MPI-based multithreaded version of GROMACS (not compatible with MPI)" ON)
gmx_dependent_option(
set(REQUIRED_CUDA_COMPUTE_CAPABILITY 2.0)
include(gmxManageGPU)
- # Detect the architecture the compiler is targetting, detect
- # SIMD instructions possibilities on that hardware, suggest SIMD instruction set
- # to use if none is specified, and populate the cache option for CPU
- # SIMD.
- include(gmxDetectTargetArchitecture)
- gmx_detect_target_architecture()
-
if(GMX_CPU_ACCELERATION)
# Stay compatible with old Jenkins command line options for specific SIMD acceleration
set(GMX_SIMD "${GMX_CPU_ACCELERATION}" CACHE STRING "SIMD instruction set level and compiler optimization" FORCE)
option(GMX_USE_TNG "Use the TNG library for trajectory I/O" ON)
-option(GMX_GIT_VERSION_INFO "Generate git version information" ${SOURCE_IS_GIT_REPOSITORY})
-mark_as_advanced(GMX_GIT_VERSION_INFO)
-
if(UNIX)
option(GMX_SYMLINK_OLD_BINARY_NAMES "Create symbolic links for pre-5.0 binary names" ON)
endif()
endif()
-
-set(PKG_CFLAGS "")
if(GMX_DOUBLE)
add_definitions(-DGMX_DOUBLE)
- set(PKG_CFLAGS "${PKG_CFLAGS} -DGMX_DOUBLE")
+ list(APPEND INSTALLED_HEADER_DEFINITIONS "-DGMX_DOUBLE")
+ if(GMX_RELAXED_DOUBLE_PRECISION)
+ add_definitions(-DGMX_RELAXED_DOUBLE_PRECISION)
+ endif()
endif()
if(GMX_SOFTWARE_INVSQRT)
- set(PKG_CFLAGS "${PKG_CFLAGS} -DGMX_SOFTWARE_INVSQRT")
+ list(APPEND INSTALLED_HEADER_DEFINITIONS "-DGMX_SOFTWARE_INVSQRT")
endif()
if(WIN32 AND NOT CYGWIN)
- set(GMX_WSOCKLIB_PATH CACHE PATH "Path to winsock (wsock32.lib) library.")
- mark_as_advanced(GMX_WSOCKLIB_PATH)
- find_library(WSOCK32_LIBRARY NAMES wsock32 PATHS ${GMX_WSOCKLIB_PATH})
- if(WSOCK32_LIBRARY)
- list(APPEND GMX_EXTRA_LIBRARIES ${WSOCK32_LIBRARY})
- add_definitions(-DGMX_HAVE_WINSOCK)
- else()
- message(STATUS "No winsock found. Cannot use interactive molecular dynamics (IMD).")
- endif(WSOCK32_LIBRARY)
+ list(APPEND GMX_EXTRA_LIBRARIES "wsock32")
+ add_definitions(-DGMX_HAVE_WINSOCK)
endif()
include(gmxManageBlueGene)
endif()
+ if(GMX_TARGET_FUJITSU_SPARC64)
+ include(gmxManageFujitsuSparc64)
+ endif()
+
########################################################################
#Process MPI settings
########################################################################
add_definitions(-DNOMINMAX)
endif()
-# only bother with finding git and using version.h if the source is a git repo
-if(GMX_GIT_VERSION_INFO)
- if (NOT SOURCE_IS_GIT_REPOSITORY)
- message(FATAL_ERROR
- "Cannot generate git version information from source tree not under git. "
- "Set GMX_GIT_VERSION_INFO=OFF to proceed.")
- endif()
- # We need at least git v1.5.3 be able to parse git's date output. If not
- # found or the version is too small, we can't generate version information.
- find_package(Git)
-
- if(NOT GIT_FOUND OR GIT_VERSION_STRING VERSION_LESS "1.5.3")
- message(FATAL_ERROR
- "No compatible git version found (>= 1.5.3 required). "
- "Won't be able to generate development version information. "
- "Set GMX_GIT_VERSION_INFO=OFF to proceed.")
- endif()
-endif()
-
# Detect boost unless GMX_EXTERNAL_BOOST is explicitly OFF
# Used for default if GMX_EXTERNAL_BOOST is not defined (first CMake pass)
if(NOT DEFINED GMX_EXTERNAL_BOOST OR GMX_EXTERNAL_BOOST)
gmx_test_zlib(HAVE_ZLIB)
endif()
-########################################################################
-# Generate development version info for cache
-########################################################################
-# set(GEN_VERSION_INFO_INTERNAL "ON")
-# include(gmxGenerateVersionString)
-
########################################################################
# Our own GROMACS tests
########################################################################
include_directories(BEFORE ${CMAKE_SOURCE_DIR}/src/external/thread_mpi/include)
# Required for config.h, maybe should only be set in src/CMakeLists.txt
include_directories(BEFORE ${CMAKE_BINARY_DIR}/src)
-# Required for gmx_header_config_gen.h to be found before installation
-include_directories(BEFORE ${CMAKE_BINARY_DIR}/src/gromacs/utility)
-# Required for now to make old code compile
-include_directories(BEFORE ${CMAKE_SOURCE_DIR}/src/gromacs/legacyheaders)
include(gmxTestInlineASM)
gmx_test_inline_asm_gcc_x86(GMX_X86_GCC_INLINE_ASM)
set(GMX_EXE_LINKER_FLAGS ${GMX_EXE_LINKER_FLAGS} ${OpenMP_LINKER_FLAGS})
set(GMX_SHARED_LINKER_FLAGS ${GMX_SHARED_LINKER_FLAGS} ${OpenMP_SHARED_LINKER_FLAGS})
endif()
-set(PKG_CFLAGS "${PKG_CFLAGS} ${OpenMP_C_FLAGS}")
########################################################################
# Specify install locations
# These variables are used internally to provide a central location for
# customizing the install locations.
-set(LIB_INSTALL_DIR ${GMX_LIB_INSTALL_DIR})
-set(BIN_INSTALL_DIR bin)
-set(DATA_INSTALL_DIR share/${GMX_DATA_INSTALL_DIR})
-set(MAN_INSTALL_DIR share/man)
-set(INCL_INSTALL_DIR include)
+set(LIB_INSTALL_DIR ${GMX_LIB_INSTALL_DIR})
+set(BIN_INSTALL_DIR bin)
+set(DATA_INSTALL_DIR share/${GMX_DATA_INSTALL_DIR})
+set(MAN_INSTALL_DIR share/man)
+# If the nesting level wrt. the installation root is changed,
+# gromacs-config.cmake.cmakein needs to be adapted.
+set(CMAKE_INSTALL_DIR share/cmake)
+# TODO: Make GMXRC adapt if this is changed
+set(PKGCONFIG_INSTALL_DIR ${LIB_INSTALL_DIR}/pkgconfig)
+set(INCL_INSTALL_DIR include)
# These variables get written into config.h for use in finding the data
# directories.
set(GMXLIB_SEARCH_DIR share/${GMX_DATA_INSTALL_DIR}/top)
set(GMXLIB_FALLBACK ${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}/top)
+list(APPEND INSTALLED_HEADER_INCLUDE_DIRS ${INCL_INSTALL_DIR})
+
# Binary and library suffix options
include(gmxManageSuffixes)
if(GMX_EXTERNAL_BOOST)
include_directories(${Boost_INCLUDE_DIRS})
- set(PKG_CFLAGS "${PKG_CFLAGS} -I${Boost_INCLUDE_DIRS}")
+ list(APPEND INSTALLED_HEADER_INCLUDE_DIRS ${Boost_INCLUDE_DIRS})
else()
include_directories(BEFORE ${CMAKE_SOURCE_DIR}/src/external/boost)
+ list(APPEND INSTALLED_HEADER_INCLUDE_DIRS ${INCL_INSTALL_DIR}/gromacs/external/boost)
+ list(APPEND INSTALLED_HEADED_DEFINITIONS "-DBOOST_NO_TYPEID")
# typeid not supported for minimal internal version
# (would add significant amount of code)
add_definitions(-DBOOST_NO_TYPEID)
- # TODO: Propagate the above settings to the installed CMakeFiles.txt template
- # (from share/template/)
- set(PKG_CFLAGS "${PKG_CFLAGS} -DBOOST_NO_TYPEID -I${CMAKE_INSTALL_PREFIX}/${INCL_INSTALL_DIR}/gromacs/external/boost")
if (NOT GMX_BUILD_MDRUN_ONLY)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/external/boost/boost
DESTINATION ${INCL_INSTALL_DIR}/gromacs/external/boost
# be set up elsewhere and passed to this function, but it is
# inconvenient in CMake to pass more than one list, and such a
# list is only used here.
- foreach(build_type RELWITHDEBUGINFO RELWITHASSERT MINSIZEREL)
+ foreach(build_type RELWITHDEBUGINFO RELWITHASSERT MINSIZEREL PROFILE)
set(GMXC_${language}FLAGS_${build_type} "${GMXC_${language}FLAGS_RELEASE}")
endforeach()
# Copy the flags that are only used by the real Release build
# Since 4.8 on by default. For previous version disabling is a no-op. Only disabling for Release because with assert
# the warnings are OK.
GMX_TEST_CFLAG(CFLAGS_WARN_REL "-Wno-array-bounds" GMXC_CFLAGS_RELEASE_ONLY)
- # Since gcc 4.8 strict - false postives with old gmx_fatal. TODO: Remove in master
- GMX_TEST_CFLAG(CFLAGS_WARN_UNINIT "-Wno-maybe-uninitialized" GMXC_CFLAGS)
if(CYGWIN)
GMX_TEST_CFLAG(CFLAGS_WARN_SUBSCRIPT "-Wno-char-subscripts" GMXC_CFLAGS)
endif()
# new in gcc 4.5
GMX_TEST_CFLAG(CFLAGS_EXCESS_PREC "-fexcess-precision=fast" GMXC_CFLAGS_RELEASE)
- GMX_TEST_CFLAG(CFLAGS_COPT "-fomit-frame-pointer -funroll-all-loops"
+ GMX_TEST_CFLAG(CFLAGS_COPT "-funroll-all-loops"
GMXC_CFLAGS_RELEASE)
GMX_TEST_CFLAG(CFLAGS_NOINLINE "-fno-inline" GMXC_CFLAGS_DEBUG)
endif()
GMX_TEST_CFLAG(CXXFLAGS_WARN_REL "-Wno-array-bounds" GMXC_CXXFLAGS_RELEASE_ONLY)
# new in gcc 4.5
GMX_TEST_CXXFLAG(CXXFLAGS_EXCESS_PREC "-fexcess-precision=fast" GMXC_CXXFLAGS_RELEASE)
- GMX_TEST_CXXFLAG(CXXFLAGS_COPT "-fomit-frame-pointer -funroll-all-loops"
+ GMX_TEST_CXXFLAG(CXXFLAGS_COPT "-funroll-all-loops"
GMXC_CXXFLAGS_RELEASE)
GMX_TEST_CXXFLAG(CXXFLAGS_NOINLINE "-fno-inline" GMXC_CXXFLAGS_DEBUG)
endif()
GMX_TEST_CXXFLAG(CXXFLAGS_WARN_EXTRA "-Wextra -Wno-missing-field-initializers -Wpointer-arith" GMXC_CXXFLAGS)
endif()
+ # Fujitsu compilers on PrimeHPC/Sparc64
+ if(${CMAKE_C_COMPILER_ID} MATCHES Fujitsu OR
+ (${CMAKE_C_COMPILER_ID} MATCHES unknown AND ${CMAKE_C_COMPILER} MATCHES ^fcc))
+ GMX_TEST_CFLAG(CFLAG_GNUCOMPAT "-Xg -w" GMXC_CFLAGS)
+ GMX_TEST_CFLAG(CFLAG_OPT "-Kfast,reduction,swp,simd=2,uxsimd,fsimple -x100" GMXC_CFLAGS)
+ endif()
+
+ if(${CMAKE_CXX_COMPILER_ID} MATCHES Fujitsu OR
+ (${CMAKE_CXX_COMPILER_ID} MATCHES unknown AND ${CMAKE_CXX_COMPILER} MATCHES ^FCC))
+ GMX_TEST_CXXFLAG(CXXFLAG_GNUCOMPAT "-Xg -w" GMXC_CXXFLAGS)
+ GMX_TEST_CXXFLAG(CXXFLAG_OPT "-Kfast,reduction,swp,simd=2,uxsimd,fsimple -x100" GMXC_CXXFLAGS)
+ endif()
+
# now actually set the flags:
if (NOT GMX_SKIP_DEFAULT_CFLAGS)
gmx_set_cmake_compiler_flags()
message(STATUS "Detecting best SIMD instructions for this CPU")
# Get CPU SIMD properties information
- set(_compile_definitions "${GCC_INLINE_ASM_DEFINE} -I${CMAKE_SOURCE_DIR}/src/gromacs/legacyheaders -DGMX_CPUID_STANDALONE")
+ set(_compile_definitions "${GCC_INLINE_ASM_DEFINE} -I${CMAKE_SOURCE_DIR}/src -DGMX_CPUID_STANDALONE")
if(GMX_TARGET_X86)
set(_compile_definitions "${_compile_definitions} -DGMX_TARGET_X86")
endif()
if(NOT DEFINED GMX_SIMD)
if(GMX_TARGET_BGQ)
set(${_suggested_simd} "IBM_QPX")
+ elseif(GMX_TARGET_FUJITSU_SPARC64)
+ # HPC-ACE is always present. In the future we
+ # should add detection for HPC-ACE2 here.
+ set(${_suggested_simd} "Sparc64_HPC_ACE")
elseif(GMX_TARGET_X86)
gmx_suggest_x86_simd(${_suggested_simd})
else()
is determined by CMake.
The name of the directory can be changed using `GMX_LIB_INSTALL_DIR` CMake
variable.
+`lib/pkgconfig/`
+ : Information about the installed `libgromacs` library for `pkg-config` is
+ installed here. The `lib/` part adapts to the installation location of the
+ libraries. The installed files contain the installation prefix as absolute
+ paths.
+`share/cmake/`
+ : CMake package configuration files are installed here.
`share/gromacs/`
: Various data files and some documentation go here.
The `gromacs` part can be changed using `GMX_DATA_INSTALL_DIR`. Using this
cmake .. -DCMAKE_C_COMPILER=mpicc \
-DCMAKE_CXX_COMPILER=mpicxx \
- -DCMAKE_TOOLCHAIN_FILE=Platform/BlueGeneQ-static-XL-CXX \
+ -DCMAKE_TOOLCHAIN_FILE=Platform/BlueGeneQ-static-XL-CXX.cmake \
-DCMAKE_PREFIX_PATH=/your/fftw/installation/prefix \
-DGMX_MPI=ON \
-DGMX_BUILD_MDRUN_ONLY=ON
This is the architecture of the K computer, which uses Fujitsu
`Sparc64VIIIfx` chips. On this platform, GROMACS @PROJECT_VERSION@ has
- accelerated group kernels, no accelerated Verlet kernels, and a custom
- build toolchain.
+ accelerated group kernels using the HPC-ACE instructions, no
+ accelerated Verlet kernels, and a custom build toolchain. Since this
+ particular chip only does double precision SIMD, the default setup
+ is to build Gromacs in double. Since most users only need single, we have added
+ an option GMX_RELAXED_DOUBLE_PRECISION to accept single precision square root
+ accuracy in the group kernels; unless you know that you really need 15 digits
+ of accuracy in each individual force, we strongly recommend you use this. Note
+ that all summation and other operations are still done in double.
+
+ The recommended configuration is to use
+
+ cmake .. -DCMAKE_TOOLCHAIN_FILE=Toolchain-Fujitsu-Sparc64-mpi.cmake \
+ -DCMAKE_PREFIX_PATH=/your/fftw/installation/prefix \
+ -DCMAKE_INSTALL_PREFIX=/where/gromacs/should/be/installed \
+ -DGMX_MPI=ON \
+ -DGMX_BUILD_MDRUN_ONLY=ON \
+ -DGMX_RELAXED_DOUBLE_PRECISION=ON
+ make
+ make install
### Intel Xeon Phi ###
*
* \inlibraryapi
*/
+ #ifndef GMX_CONFIG_H
+ #define GMX_CONFIG_H
#include "gromacs/utility/gmx_header_config.h"
/* TODO: For now, disable Doxygen warnings from here */
/* Binary directory for the build */
#cmakedefine CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@"
-/* Turn off water-water neighborlist optimization only - not used right now */
-#cmakedefine DISABLE_WATERWATER_NLIST
-
-/* Turn off all water neighborlist optimization - not used right now */
-#cmakedefine DISABLE_WATER_NLIST
-
/* IEEE754 floating-point format. Memory layout is defined by macros
* GMX_IEEE754_BIG_ENDIAN_BYTE_ORDER and GMX_IEEE754_BIG_ENDIAN_WORD_ORDER.
*/
/* Target platform is BlueGene/Q */
#cmakedefine GMX_TARGET_BGQ
+/** Define if we are building for Cygwin */
+#cmakedefine GMX_CYGWIN
+
+/** Define if we have sufficient C++11 support */
+#cmakedefine GMX_CXX11
+
/* GCC bug in AVX maskload/maskstore arguments - worked around internally */
#cmakedefine GMX_SIMD_X86_AVX_GCC_MASKLOAD_BUG
/* Define if SIGUSR1 is present */
#cmakedefine HAVE_SIGUSR1
-/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
-#cmakedefine _LARGEFILE_SOURCE
-
-/* Define for large files, on AIX-style hosts. */
-#cmakedefine _LARGE_FILES
-
-/* Some systems requires this to be set to 64 for large file support */
-#cmakedefine _FILE_OFFSET_BITS @_FILE_OFFSET_BITS@
-
-/* Build special-purpose mdrun library */
-#cmakedefine GMX_FAHCORE
-
/* Enable gromacs quotes */
#cmakedefine GMX_COOL_QUOTES
-#ifdef GMX_FAHCORE
-#define FULLINDIRECT 1
-#define USE_FAH_XDR 1
-#include "swindirect.h"
-#endif
-
/* default name mangling maybe wrong on exotic plattforms */
#define F77_FUNC(name,NAME) name ## _
/* Define if we have zlib */
#cmakedefine HAVE_ZLIB
+ #endif
+
/*! \endcond */
* \author Teemu Murtola <teemu.murtola@gmail.com>
* \ingroup module_commandline
*/
+#include "gmxpre.h"
+
#include "cmdlinemodulemanager.h"
#include <cstdio>
#include <string>
#include <utility>
+#include "config.h"
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#include "gromacs/legacyheaders/copyrite.h"
-#include "gromacs/legacyheaders/network.h"
#include "gromacs/commandline/cmdlinehelpcontext.h"
#include "gromacs/commandline/cmdlinehelpmodule.h"
#include "gromacs/commandline/cmdlineprogramcontext.h"
#include "gromacs/options/basicoptions.h"
#include "gromacs/options/options.h"
+#include "gromacs/utility/basenetwork.h"
#include "gromacs/utility/exceptions.h"
+#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/gmxassert.h"
#include "gromacs/utility/stringutil.h"
-// For GMX_BINARY_SUFFIX
-#include "config.h"
-
namespace gmx
{
return shortDescription_;
}
+ virtual void init(CommandLineModuleSettings * /*settings*/)
+ {
+ }
virtual int run(int argc, char *argv[])
{
return mainFunction_(argc, argv);
}
virtual void writeHelp(const CommandLineHelpContext &context) const
{
- char *argv[2];
- int argc = 1;
- // TODO: The constness should not be cast away.
- argv[0] = const_cast<char *>(name_);
- argv[1] = NULL;
- GlobalCommandLineHelpContext global(context);
- mainFunction_(argc, argv);
+ writeCommandLineHelpCMain(context, name_, mainFunction_);
}
private:
const char *name_;
const char *shortDescription_;
CMainFunction mainFunction_;
-
};
//! \}
CommandLineCommonOptionsHolder::CommandLineCommonOptionsHolder()
: options_(NULL, NULL), bHelp_(false), bHidden_(false),
- bQuiet_(false), bVersion_(false), bCopyright_(true)
+ bQuiet_(false), bVersion_(false), bCopyright_(true),
+ niceLevel_(19), debugLevel_(0)
{
binaryInfoSettings_.copyright(true);
}
.description("Print extended version information and quit"));
options_.addOption(BooleanOption("copyright").store(&bCopyright_)
.description("Print copyright information on startup"));
+ options_.addOption(IntegerOption("nice").store(&niceLevel_)
+ .description("Set the nicelevel (default depends on command)"));
+ options_.addOption(IntegerOption("debug").store(&debugLevel_)
+ .hidden().defaultValueIfSet(1)
+ .description("Write file with debug information, "
+ "1: short (default), 2: also x and f"));
}
bool CommandLineCommonOptionsHolder::finishOptions()
return !bVersion_;
}
+void CommandLineCommonOptionsHolder::adjustFromSettings(
+ const CommandLineModuleSettings &settings)
+{
+ if (!options_.isSet("nice"))
+ {
+ niceLevel_ = settings.defaultNiceLevel();
+ }
+}
+
/********************************************************************
* CommandLineModuleManager::Impl
*/
int CommandLineModuleManager::run(int argc, char *argv[])
{
CommandLineModuleInterface *module;
- const bool bMaster = (!gmx_mpi_initialized() || gmx_node_rank() == 0);
+ const bool bMaster = (gmx_node_rank() == 0);
bool bQuiet = impl_->bQuiet_ || !bMaster;
CommandLineCommonOptionsHolder optionsHolder;
try
{
return 0;
}
- int rc = module->run(argc, argv);
+
+ CommandLineModuleSettings settings;
+ module->init(&settings);
+ optionsHolder.adjustFromSettings(settings);
+
+ // Open the debug file.
+ if (optionsHolder.debugLevel() > 0)
+ {
+ std::string filename(impl_->programContext_.programName());
+ if (gmx_node_num() > 1)
+ {
+ filename.append(formatString("%d", gmx_node_rank()));
+ }
+ filename.append(".debug");
+
+ fprintf(stderr, "Will write debug log file: %s\n", filename.c_str());
+ gmx_init_debug(optionsHolder.debugLevel(), filename.c_str());
+ }
- #if defined(HAVE_UNISTD_H) && !defined(GMX_NO_NICE)
++#if defined(HAVE_UNISTD_H) && !defined(GMX_NO_NICE) && !defined(__MINGW32__)
+ // Set the nice level unless disabled in the configuration.
+ if (optionsHolder.niceLevel() != 0)
+ {
+ static bool bNiceSet = false; // Only set it once.
+ if (!bNiceSet)
+ {
+ if (nice(optionsHolder.niceLevel()) == -1)
+ {
+ // Do nothing, but use the return value to avoid warnings.
+ }
+ bNiceSet = true;
+ }
+ }
+#endif
+
+ int rc = 0;
+ if (!(module == impl_->helpModule_ && !bMaster))
+ {
+ rc = module->run(argc, argv);
+ }
if (!bQuiet)
{
gmx_thanx(stderr);
* To help us fund GROMACS development, we humbly ask that you cite
* the research papers on the package. Check out http://www.gromacs.org.
*/
+#include "gmxpre.h"
+
#include "tngio.h"
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "config.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "gromacs/legacyheaders/copyrite.h"
-#include "gromacs/legacyheaders/gmx_fatal.h"
-#include "gromacs/legacyheaders/main.h"
-#include "gromacs/legacyheaders/physics.h"
+#include "gromacs/legacyheaders/types/ifunc.h"
+
+#include "gromacs/fileio/gmxfio.h"
+#include "gromacs/math/units.h"
#include "gromacs/math/utilities.h"
+#include "gromacs/topology/topology.h"
+#include "gromacs/utility/basenetwork.h"
#include "gromacs/utility/common.h"
+#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/gmxassert.h"
#include "gromacs/utility/programcontext.h"
-#include "gmxfio.h"
static const char *modeToVerb(char mode)
{
// tng_last_program_name_set(*tng, programInfo);
// }
- #ifdef HAVE_UNISTD_H
+ #if defined(HAVE_UNISTD_H) && !defined(__MINGW32__)
char username[256];
if (!getlogin_r(username, 256))
{
* To help us fund GROMACS development, we humbly ask that you cite
* the research papers on the package. Check out http://www.gromacs.org.
*/
+#include "gmxpre.h"
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "vmdio.h"
+
+#include "config.h"
/* Derived from PluginMgr.C and catdcd.c */
#include <string.h>
#include <assert.h>
-#include <config.h>
/*
* Plugin header files; get plugin source from www.ks.uiuc.edu/Research/vmd"
*/
#ifndef GMX_NATIVE_WINDOWS
#include <glob.h>
#else
+ #ifndef _WIN32_IE
+ #define _WIN32_IE 0x0500 /* SHGetFolderPath is available since WinXP/IE5 */
+ #endif
#include <windows.h>
#include <shlobj.h>
#endif
-#include "gromacs/utility/smalloc.h"
-#include "futil.h"
-#include "vmdio.h"
-
-#include "types/simple.h"
-#include "vec.h"
-#include "gmxfio.h"
+#include "gromacs/fileio/gmxfio.h"
+#include "gromacs/fileio/trx.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/utility/basedefinitions.h"
+#include "gromacs/utility/futil.h"
+#include "gromacs/utility/smalloc.h"
typedef int (*initfunc)(void);
/* The source code in this file should be thread-safe.
Please keep it that way. */
+#include "gmxpre.h"
+#include "gromacs/legacyheaders/checkpoint.h"
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "config.h"
+#include <errno.h>
+#include <stdlib.h>
#include <string.h>
#include <time.h>
+#include <fcntl.h>
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#include <sys/locking.h>
#endif
-#include "copyrite.h"
-#include "names.h"
-#include "typedefs.h"
-#include "types/commrec.h"
-#include "gromacs/utility/smalloc.h"
-#include "txtdump.h"
-#include "vec.h"
-#include "network.h"
-#include "checkpoint.h"
-#include "main.h"
-#include "gromacs/utility/cstringutil.h"
-#include <fcntl.h>
+#include "gromacs/legacyheaders/copyrite.h"
+#include "gromacs/legacyheaders/names.h"
+#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/legacyheaders/types/commrec.h"
+#include "gromacs/legacyheaders/txtdump.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/network.h"
#include "gromacs/fileio/filenm.h"
-#include "gromacs/fileio/futil.h"
+#include "gromacs/utility/futil.h"
#include "gromacs/fileio/gmxfio.h"
#include "gromacs/fileio/xdrf.h"
#include "gromacs/fileio/xdr_datatype.h"
+#include "gromacs/utility/basenetwork.h"
#include "gromacs/utility/baseversion.h"
-#include "gmx_fatal.h"
+#include "gromacs/utility/cstringutil.h"
+#include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/smalloc.h"
#include "buildinfo.h"
return 0;
#else
FILE *fp;
- int rc;
fp = fopen(filename, "rb+");
return -1;
}
+ #ifdef _MSC_VER
return _chsize_s( fileno(fp), size);
+ #else
+ return _chsize( fileno(fp), size);
+ #endif
#endif
}
#endif
{
if (dtc == xdr_datatype_double)
{
+ /* cppcheck-suppress invalidPointerCast
+ * Only executed if real is anyhow double */
vd = (double *)vp;
}
else
static int do_cpte_real(XDR *xd, int cptp, int ecpt, int sflags,
real *r, FILE *list)
{
- int n;
-
return do_cpte_reals_low(xd, cptp, ecpt, sflags, 1, NULL, &r, list, ecprREAL);
}
bool_t res = 0;
int dtc = xdr_datatype_int;
int *vp, *va = NULL;
- int nf, dt, i;
+ int nf, dt;
nf = n;
res = xdr_int(xd, &nf);
bool_t res = 0;
int dtc = xdr_datatype_double;
double *vp, *va = NULL;
- int nf, dt, i;
+ int nf, dt;
nf = n;
res = xdr_int(xd, &nf);
static int do_cpte_rvecs(XDR *xd, int cptp, int ecpt, int sflags,
int n, rvec **v, FILE *list)
{
- int n3;
-
return do_cpte_reals_low(xd, cptp, ecpt, sflags,
n*DIM, NULL, (real **)v, list, ecprRVEC);
}
matrix v, FILE *list)
{
real *vr;
- real ret;
+ int ret;
vr = (real *)&(v[0][0]);
ret = do_cpte_reals_low(xd, cptp, ecpt, sflags,
int n, real **v, FILE *list)
{
int i;
- real *vr;
- real ret, reti;
+ int ret, reti;
char name[CPTSTRLEN];
ret = 0;
}
for (i = 0; i < n; i++)
{
- reti = 0;
- vr = v[i];
reti = do_cpte_reals_low(xd, cptp, ecpt, sflags, n, NULL, &(v[i]), NULL, ecprREAL);
if (list && reti == 0)
{
sprintf(name, "%s[%d]", st_names(cptp, ecpt), i);
pr_reals(list, 0, name, v[i], n);
}
- if (reti == 0)
+ if (reti != 0)
{
- ret = 0;
+ ret = reti;
}
}
return ret;
bool_t res = 0;
int magic;
int idum = 0;
- int i;
char *fhost;
if (bRead)
{
enerhist->ener_sum_sim[i] = enerhist->ener_sum[i];
}
- fflags |= (1<<eenhENERGY_SUM_SIM);
}
if ( (fflags & (1<<eenhENERGY_NSUM)) &&
{
/* Assume we have an old file format and copy nsum to nsteps */
enerhist->nsteps = enerhist->nsum;
- fflags |= (1<<eenhENERGY_NSTEPS);
}
if ( (fflags & (1<<eenhENERGY_NSUM_SIM)) &&
!(fflags & (1<<eenhENERGY_NSTEPS_SIM)))
{
/* Assume we have an old file format and copy nsum to nsteps */
enerhist->nsteps_sim = enerhist->nsum_sim;
- fflags |= (1<<eenhENERGY_NSTEPS_SIM);
}
return ret;
static int do_cpt_EDstate(XDR *xd, gmx_bool bRead,
edsamstate_t *EDstate, FILE *list)
{
- int i, j;
+ int i;
int ret = 0;
char buf[STRLEN];
gmx_file_position_t **p_outputfiles, int *nfiles,
FILE *list, int file_version)
{
- int i, j;
+ int i;
gmx_off_t offset;
gmx_off_t mask = 0xFFFFFFFFL;
int offset_high, offset_low;
char *fntemp; /* the temporary checkpoint file name */
time_t now;
char timebuf[STRLEN];
- int nppnodes, npmenodes, flag_64bit;
+ int nppnodes, npmenodes;
char buf[1024], suffix[5+STEPSTRSIZE], sbuf[STEPSTRSIZE];
gmx_file_position_t *outputfiles;
int noutputfiles;
char *ftime;
- int flags_eks, flags_enh, flags_dfh, i;
+ int flags_eks, flags_enh, flags_dfh;
t_fileio *ret;
if (DOMAINDECOMP(cr))
*/
int gmx_major, gmx_minor;
int cpt_major, cpt_minor;
- sscanf(gmx_version(), "VERSION %d.%d", &gmx_major, &gmx_minor);
- sscanf(version, "VERSION %d.%d", &cpt_major, &cpt_minor);
+ sscanf(gmx_version(), "VERSION %5d.%5d", &gmx_major, &gmx_minor);
+ sscanf(version, "VERSION %5d.%5d", &cpt_major, &cpt_minor);
version_differs = (gmx_major != cpt_major || gmx_minor != cpt_minor);
}
int file_version;
char *version, *btime, *buser, *bhost, *fprog, *ftime;
int double_prec;
- char filename[STRLEN], buf[STEPSTRSIZE];
- int nppnodes, eIntegrator_f, nppnodes_f, npmenodes_f;
+ char buf[STEPSTRSIZE];
+ int eIntegrator_f, nppnodes_f, npmenodes_f;
ivec dd_nc_f;
int natoms, ngtc, nnhpres, nhchainlength, nlambda, fflags, flags_eks, flags_enh, flags_dfh;
int d;
if (!PAR(cr))
{
- nppnodes = 1;
cr->npmenodes = 0;
}
else if (cr->nnodes == nppnodes_f + npmenodes_f)
{
cr->npmenodes = npmenodes_f;
}
- nppnodes = cr->nnodes - cr->npmenodes;
+ int nppnodes = cr->nnodes - cr->npmenodes;
if (nppnodes == nppnodes_f)
{
for (d = 0; d < DIM; d++)
}
}
}
- else
- {
- /* The number of PP nodes has not been set yet */
- nppnodes = -1;
- }
if (fflags != state->flags)
{
ivec dd_nc;
t_state state;
int flags_eks, flags_enh, flags_dfh;
- int indent;
- int i, j;
int ret;
gmx_file_position_t *outputfiles;
int nfiles;
* To help us fund GROMACS development, we humbly ask that you cite
* the research papers on the package. Check out http://www.gromacs.org.
*/
+#include "gmxpre.h"
+
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include "config.h"
#endif
#ifdef HAVE_SCHED_H
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
- #ifdef _MSC_VER
+ #ifdef GMX_NATIVE_WINDOWS
/* MSVC definition for __cpuid() */
- #include <intrin.h>
+ #ifdef _MSC_VER
+ #include <intrin.h>
+ #endif
/* sysinfo functions */
- #include <windows.h>
+ #include <windows.h>
#endif
#ifdef HAVE_UNISTD_H
/* sysconf() definition */
- #include <unistd.h>
+ #include <unistd.h>
#endif
-#include "gmx_cpuid.h"
+#include "gromacs/legacyheaders/gmx_cpuid.h"
}
}
}
+ free(unique);
return nunique;
}
* To help us fund GROMACS development, we humbly ask that you cite
* the research papers on the package. Check out http://www.gromacs.org.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
- #if defined(HAVE_SCHED_H)
+ #ifdef HAVE_SCHED_AFFINITY
# ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
# endif
#include "thread_mpi/threads.h"
-#include "typedefs.h"
-#include "types/commrec.h"
-#include "types/hw_info.h"
-#include "copyrite.h"
-#include "gmx_cpuid.h"
-#include "gmx_omp_nthreads.h"
-#include "md_logging.h"
-#include "gmx_thread_affinity.h"
-
-#include "gmx_fatal.h"
+#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/legacyheaders/types/commrec.h"
+#include "gromacs/legacyheaders/types/hw_info.h"
+#include "gromacs/legacyheaders/copyrite.h"
+#include "gromacs/legacyheaders/gmx_cpuid.h"
+#include "gromacs/legacyheaders/gmx_omp_nthreads.h"
+#include "gromacs/legacyheaders/md_logging.h"
+#include "gromacs/legacyheaders/gmx_thread_affinity.h"
+
+#include "gromacs/utility/basenetwork.h"
+#include "gromacs/utility/cstringutil.h"
+#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/gmxomp.h"
+#include "gromacs/utility/smalloc.h"
static int
get_thread_affinity_layout(FILE *fplog,
* Note that this will only work on Linux as we use a GNU feature.
*/
void
-gmx_check_thread_affinity_set(FILE gmx_unused *fplog,
- const t_commrec gmx_unused *cr,
- gmx_hw_opt_t gmx_unused *hw_opt,
- int gmx_unused nthreads_hw_avail,
- gmx_bool gmx_unused bAfterOpenmpInit)
+gmx_check_thread_affinity_set(FILE *fplog,
+ const t_commrec *cr,
+ gmx_hw_opt_t *hw_opt,
+ int gmx_unused nthreads_hw_avail,
+ gmx_bool bAfterOpenmpInit)
{
#ifdef HAVE_SCHED_AFFINITY
cpu_set_t mask_current;
int i, ret, cpu_count, cpu_set;
gmx_bool bAllSet;
+#endif
assert(hw_opt);
+ if (!bAfterOpenmpInit)
+ {
+ /* Check for externally set OpenMP affinity and turn off internal
+ * pinning if any is found. We need to do this check early to tell
+ * thread-MPI whether it should do pinning when spawning threads.
+ * TODO: the above no longer holds, we should move these checks later
+ */
+ if (hw_opt->thread_affinity != threadaffOFF)
+ {
+ char *message;
+ if (!gmx_omp_check_thread_affinity(&message))
+ {
+ /* TODO: with -pin auto we should only warn when using all cores */
+ md_print_warn(cr, fplog, "%s", message);
+ sfree(message);
+ hw_opt->thread_affinity = threadaffOFF;
+ }
+ }
+
+ /* With thread-MPI this is needed as pinning might get turned off,
+ * which needs to be known before starting thread-MPI.
+ * With thread-MPI hw_opt is processed here on the master rank
+ * and passed to the other ranks later, so we only do this on master.
+ */
+ if (!SIMMASTER(cr))
+ {
+ return;
+ }
+#ifndef GMX_THREAD_MPI
+ return;
+#endif
+ }
+
+#ifdef HAVE_SCHED_GETAFFINITY
if (hw_opt->thread_affinity == threadaffOFF)
{
/* internal affinity setting is off, don't bother checking process affinity */
* To help us fund GROMACS development, we humbly ask that you cite
* the research papers on the package. Check out http://www.gromacs.org.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
-#include "vec.h"
-#include "typedefs.h"
-#include "nonbonded.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/legacyheaders/nonbonded.h"
#include "nb_kernel.h"
-#include "nrnb.h"
-#include "macros.h"
+#include "gromacs/legacyheaders/nrnb.h"
+#include "gromacs/legacyheaders/macros.h"
#include "nb_free_energy.h"
-#include "gmx_fatal.h"
+#include "gromacs/utility/fatalerror.h"
void
gmx_nb_free_energy_kernel(const t_nblist * gmx_restrict nlist,
#define NSTATES 2
int i, j, n, ii, is3, ii3, k, nj0, nj1, jnr, j3, ggid;
real shX, shY, shZ;
- real Fscal, FscalC[NSTATES], FscalV[NSTATES], tx, ty, tz;
- real Vcoul[NSTATES], Vvdw[NSTATES];
+ real tx, ty, tz, Fscal;
+ double FscalC[NSTATES], FscalV[NSTATES]; /* Needs double for sc_power==48 */
+ double Vcoul[NSTATES], Vvdw[NSTATES]; /* Needs double for sc_power==48 */
real rinv6, r, rt, rtC, rtV;
real iqA, iqB;
real qq[NSTATES], vctot, krsq;
double dvdl_coul, dvdl_vdw;
real lfac_coul[NSTATES], dlfac_coul[NSTATES], lfac_vdw[NSTATES], dlfac_vdw[NSTATES];
real sigma6[NSTATES], alpha_vdw_eff, alpha_coul_eff, sigma2_def, sigma2_min;
- real rp, rpm2, rC, rV, rinvC, rpinvC, rinvV, rpinvV;
+ double rp, rpm2, rC, rV, rinvC, rpinvC, rinvV, rpinvV; /* Needs double for sc_power==48 */
real sigma2[NSTATES], sigma_pow[NSTATES], sigma_powm2[NSTATES], rs, rs2;
int do_tab, tab_elemsize;
int n0, n1C, n1V, nnn;
bDoPotential = kernel_data->flags & GMX_NONBONDED_DO_POTENTIAL;
rcoulomb = fr->rcoulomb;
- sh_ewald = fr->ic->sh_ewald;
rvdw = fr->rvdw;
sh_invrc6 = fr->ic->sh_invrc6;
sh_lj_ewald = fr->ic->sh_lj_ewald;
fpdecl = open('nb_kernel_' + Arch + '.c','w')
fpdecl.write( FileHeader )
-fpdecl.write( '#ifndef nb_kernel_' + Arch + '_h\n' )
-fpdecl.write( '#define nb_kernel_' + Arch + '_h\n\n' )
+fpdecl.write( '#include "gmxpre.h"\n\n' )
fpdecl.write( '#include "../nb_kernel.h"\n\n' )
for KernelElec in ElectrostaticsList:
fpdecl.write( kerneldecl[-1] + '\n' )
fpdecl.write( '};\n\n' )
fpdecl.write( 'int\n' )
-fpdecl.write( ' kernellist_'+Arch+'_size = sizeof(kernellist_'+Arch+')/sizeof(kernellist_'+Arch+'[0]);\n\n')
-fpdecl.write( '#endif\n')
+fpdecl.write( ' kernellist_'+Arch+'_size = sizeof(kernellist_'+Arch+')/sizeof(kernellist_'+Arch+'[0]);\n')
fpdecl.close()
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
r00 = _fjsp_mul_v2r8(rsq00,rinv00);
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
r00 = _fjsp_mul_v2r8(rsq00,rinv00);
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
**************************/
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* LENNARD-JONES DISPERSION/REPULSION */
**************************/
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* LENNARD-JONES DISPERSION/REPULSION */
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
r00 = _fjsp_mul_v2r8(rsq00,rinv00);
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
r00 = _fjsp_mul_v2r8(rsq00,rinv00);
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* COULOMB ELECTROSTATICS */
velec = _fjsp_mul_v2r8(qq00,rinv00);
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* COULOMB ELECTROSTATICS */
velec = _fjsp_mul_v2r8(qq00,rinv00);
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* COULOMB ELECTROSTATICS */
velec = _fjsp_mul_v2r8(qq00,rinv00);
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* COULOMB ELECTROSTATICS */
velec = _fjsp_mul_v2r8(qq00,rinv00);
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
**************************/
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* LENNARD-JONES DISPERSION/REPULSION */
**************************/
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* LENNARD-JONES DISPERSION/REPULSION */
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* vvdw6 = [C6 - C6grid * (1-poly)]/r6 */
- vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(-c6grid_00,_fjsp_sub_v2r8(one,poly),c6_00),rinvsix);
+ vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(c6grid_00,_fjsp_sub_v2r8(poly,one),c6_00),rinvsix);
vvdw12 = _fjsp_mul_v2r8(c12_00,_fjsp_mul_v2r8(rinvsix,rinvsix));
vvdw = _fjsp_msub_v2r8(_fjsp_nmsub_v2r8(c12_00,_fjsp_mul_v2r8(sh_vdw_invrcut6,sh_vdw_invrcut6),vvdw12),one_twelfth,
_fjsp_mul_v2r8(_fjsp_sub_v2r8(vvdw6,_fjsp_madd_v2r8(c6grid_00,sh_lj_ewald,_fjsp_mul_v2r8(c6_00,sh_vdw_invrcut6))),one_sixth));
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
- c6grid_00 = gmx_fjsp_load_1real_swizzle_v2r8(vdwgridparam+vdwioffset0+vdwjidx0A);
+ c6grid_00 = gmx_fjsp_load_2real_swizzle_v2r8(vdwgridparam+vdwioffset0+vdwjidx0A,
+ vdwgridparam+vdwioffset0+vdwjidx0B);
/* EWALD ELECTROSTATICS */
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* vvdw6 = [C6 - C6grid * (1-poly)]/r6 */
- vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(-c6grid_00,_fjsp_sub_v2r8(one,poly),c6_00),rinvsix);
+ vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(c6grid_00,_fjsp_sub_v2r8(poly,one),c6_00),rinvsix);
vvdw12 = _fjsp_mul_v2r8(c12_00,_fjsp_mul_v2r8(rinvsix,rinvsix));
vvdw = _fjsp_msub_v2r8(_fjsp_nmsub_v2r8(c12_00,_fjsp_mul_v2r8(sh_vdw_invrcut6,sh_vdw_invrcut6),vvdw12),one_twelfth,
_fjsp_mul_v2r8(_fjsp_sub_v2r8(vvdw6,_fjsp_madd_v2r8(c6grid_00,sh_lj_ewald,_fjsp_mul_v2r8(c6_00,sh_vdw_invrcut6))),one_sixth));
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* f6A = 6 * C6grid * (1 - poly) */
- f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_msub_v2r8(one,poly));
+ f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_sub_v2r8(one,poly));
/* f6B = C6grid * exponent * beta^6 */
f6B = _fjsp_mul_v2r8(_fjsp_mul_v2r8(c6grid_00,one_sixth),_fjsp_mul_v2r8(exponent,ewclj6));
/* fvdw = 12*C12/r13 - ((6*C6 - f6A)/r6 + f6B)/r */
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
- c6grid_00 = gmx_fjsp_load_1real_swizzle_v2r8(vdwgridparam+vdwioffset0+vdwjidx0A);
+ c6grid_00 = gmx_fjsp_load_2real_swizzle_v2r8(vdwgridparam+vdwioffset0+vdwjidx0A,
+ vdwgridparam+vdwioffset0+vdwjidx0B);
/* EWALD ELECTROSTATICS */
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* f6A = 6 * C6grid * (1 - poly) */
- f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_msub_v2r8(one,poly));
+ f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_sub_v2r8(one,poly));
/* f6B = C6grid * exponent * beta^6 */
f6B = _fjsp_mul_v2r8(_fjsp_mul_v2r8(c6grid_00,one_sixth),_fjsp_mul_v2r8(exponent,ewclj6));
/* fvdw = 12*C12/r13 - ((6*C6 - f6A)/r6 + f6B)/r */
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* vvdw6 = [C6 - C6grid * (1-poly)]/r6 */
- vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(-c6grid_00,_fjsp_sub_v2r8(one,poly),c6_00),rinvsix);
+ vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(c6grid_00,_fjsp_sub_v2r8(poly,one),c6_00),rinvsix);
vvdw12 = _fjsp_mul_v2r8(c12_00,_fjsp_mul_v2r8(rinvsix,rinvsix));
vvdw = _fjsp_msub_v2r8(_fjsp_nmsub_v2r8(c12_00,_fjsp_mul_v2r8(sh_vdw_invrcut6,sh_vdw_invrcut6),vvdw12),one_twelfth,
_fjsp_mul_v2r8(_fjsp_sub_v2r8(vvdw6,_fjsp_madd_v2r8(c6grid_00,sh_lj_ewald,_fjsp_mul_v2r8(c6_00,sh_vdw_invrcut6))),one_sixth));
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
- c6grid_00 = gmx_fjsp_load_1real_swizzle_v2r8(vdwgridparam+vdwioffset0+vdwjidx0A);
+ c6grid_00 = gmx_fjsp_load_2real_swizzle_v2r8(vdwgridparam+vdwioffset0+vdwjidx0A,
+ vdwgridparam+vdwioffset0+vdwjidx0B);
/* EWALD ELECTROSTATICS */
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* vvdw6 = [C6 - C6grid * (1-poly)]/r6 */
- vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(-c6grid_00,_fjsp_sub_v2r8(one,poly),c6_00),rinvsix);
+ vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(c6grid_00,_fjsp_sub_v2r8(poly,one),c6_00),rinvsix);
vvdw12 = _fjsp_mul_v2r8(c12_00,_fjsp_mul_v2r8(rinvsix,rinvsix));
vvdw = _fjsp_msub_v2r8(_fjsp_nmsub_v2r8(c12_00,_fjsp_mul_v2r8(sh_vdw_invrcut6,sh_vdw_invrcut6),vvdw12),one_twelfth,
_fjsp_mul_v2r8(_fjsp_sub_v2r8(vvdw6,_fjsp_madd_v2r8(c6grid_00,sh_lj_ewald,_fjsp_mul_v2r8(c6_00,sh_vdw_invrcut6))),one_sixth));
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* f6A = 6 * C6grid * (1 - poly) */
- f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_msub_v2r8(one,poly));
+ f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_sub_v2r8(one,poly));
/* f6B = C6grid * exponent * beta^6 */
f6B = _fjsp_mul_v2r8(_fjsp_mul_v2r8(c6grid_00,one_sixth),_fjsp_mul_v2r8(exponent,ewclj6));
/* fvdw = 12*C12/r13 - ((6*C6 - f6A)/r6 + f6B)/r */
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
- c6grid_00 = gmx_fjsp_load_1real_swizzle_v2r8(vdwgridparam+vdwioffset0+vdwjidx0A);
+ c6grid_00 = gmx_fjsp_load_2real_swizzle_v2r8(vdwgridparam+vdwioffset0+vdwjidx0A,
+ vdwgridparam+vdwioffset0+vdwjidx0B);
/* EWALD ELECTROSTATICS */
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* f6A = 6 * C6grid * (1 - poly) */
- f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_msub_v2r8(one,poly));
+ f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_sub_v2r8(one,poly));
/* f6B = C6grid * exponent * beta^6 */
f6B = _fjsp_mul_v2r8(_fjsp_mul_v2r8(c6grid_00,one_sixth),_fjsp_mul_v2r8(exponent,ewclj6));
/* fvdw = 12*C12/r13 - ((6*C6 - f6A)/r6 + f6B)/r */
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* vvdw6 = [C6 - C6grid * (1-poly)]/r6 */
- vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(-c6grid_00,_fjsp_sub_v2r8(one,poly),c6_00),rinvsix);
+ vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(c6grid_00,_fjsp_sub_v2r8(poly,one),c6_00),rinvsix);
vvdw12 = _fjsp_mul_v2r8(c12_00,_fjsp_mul_v2r8(rinvsix,rinvsix));
vvdw = _fjsp_msub_v2r8(_fjsp_nmsub_v2r8(c12_00,_fjsp_mul_v2r8(sh_vdw_invrcut6,sh_vdw_invrcut6),vvdw12),one_twelfth,
_fjsp_mul_v2r8(_fjsp_sub_v2r8(vvdw6,_fjsp_madd_v2r8(c6grid_00,sh_lj_ewald,_fjsp_mul_v2r8(c6_00,sh_vdw_invrcut6))),one_sixth));
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* vvdw6 = [C6 - C6grid * (1-poly)]/r6 */
- vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(-c6grid_00,_fjsp_sub_v2r8(one,poly),c6_00),rinvsix);
+ vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(c6grid_00,_fjsp_sub_v2r8(poly,one),c6_00),rinvsix);
vvdw12 = _fjsp_mul_v2r8(c12_00,_fjsp_mul_v2r8(rinvsix,rinvsix));
vvdw = _fjsp_msub_v2r8(_fjsp_nmsub_v2r8(c12_00,_fjsp_mul_v2r8(sh_vdw_invrcut6,sh_vdw_invrcut6),vvdw12),one_twelfth,
_fjsp_mul_v2r8(_fjsp_sub_v2r8(vvdw6,_fjsp_madd_v2r8(c6grid_00,sh_lj_ewald,_fjsp_mul_v2r8(c6_00,sh_vdw_invrcut6))),one_sixth));
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* f6A = 6 * C6grid * (1 - poly) */
- f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_msub_v2r8(one,poly));
+ f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_sub_v2r8(one,poly));
/* f6B = C6grid * exponent * beta^6 */
f6B = _fjsp_mul_v2r8(_fjsp_mul_v2r8(c6grid_00,one_sixth),_fjsp_mul_v2r8(exponent,ewclj6));
/* fvdw = 12*C12/r13 - ((6*C6 - f6A)/r6 + f6B)/r */
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* f6A = 6 * C6grid * (1 - poly) */
- f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_msub_v2r8(one,poly));
+ f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_sub_v2r8(one,poly));
/* f6B = C6grid * exponent * beta^6 */
f6B = _fjsp_mul_v2r8(_fjsp_mul_v2r8(c6grid_00,one_sixth),_fjsp_mul_v2r8(exponent,ewclj6));
/* fvdw = 12*C12/r13 - ((6*C6 - f6A)/r6 + f6B)/r */
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* vvdw6 = [C6 - C6grid * (1-poly)]/r6 */
- vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(-c6grid_00,_fjsp_sub_v2r8(one,poly),c6_00),rinvsix);
+ vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(c6grid_00,_fjsp_sub_v2r8(poly,one),c6_00),rinvsix);
vvdw12 = _fjsp_mul_v2r8(c12_00,_fjsp_mul_v2r8(rinvsix,rinvsix));
vvdw = _fjsp_msub_v2r8(_fjsp_nmsub_v2r8(c12_00,_fjsp_mul_v2r8(sh_vdw_invrcut6,sh_vdw_invrcut6),vvdw12),one_twelfth,
_fjsp_mul_v2r8(_fjsp_sub_v2r8(vvdw6,_fjsp_madd_v2r8(c6grid_00,sh_lj_ewald,_fjsp_mul_v2r8(c6_00,sh_vdw_invrcut6))),one_sixth));
r00 = _fjsp_mul_v2r8(rsq00,rinv00);
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
- c6grid_00 = gmx_fjsp_load_1real_swizzle_v2r8(vdwgridparam+vdwioffset0+vdwjidx0A);
+ c6grid_00 = gmx_fjsp_load_2real_swizzle_v2r8(vdwgridparam+vdwioffset0+vdwjidx0A,
+ vdwgridparam+vdwioffset0+vdwjidx0B);
/* Analytical LJ-PME */
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* vvdw6 = [C6 - C6grid * (1-poly)]/r6 */
- vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(-c6grid_00,_fjsp_sub_v2r8(one,poly),c6_00),rinvsix);
+ vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(c6grid_00,_fjsp_sub_v2r8(poly,one),c6_00),rinvsix);
vvdw12 = _fjsp_mul_v2r8(c12_00,_fjsp_mul_v2r8(rinvsix,rinvsix));
vvdw = _fjsp_msub_v2r8(_fjsp_nmsub_v2r8(c12_00,_fjsp_mul_v2r8(sh_vdw_invrcut6,sh_vdw_invrcut6),vvdw12),one_twelfth,
_fjsp_mul_v2r8(_fjsp_sub_v2r8(vvdw6,_fjsp_madd_v2r8(c6grid_00,sh_lj_ewald,_fjsp_mul_v2r8(c6_00,sh_vdw_invrcut6))),one_sixth));
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* f6A = 6 * C6grid * (1 - poly) */
- f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_msub_v2r8(one,poly));
+ f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_sub_v2r8(one,poly));
/* f6B = C6grid * exponent * beta^6 */
f6B = _fjsp_mul_v2r8(_fjsp_mul_v2r8(c6grid_00,one_sixth),_fjsp_mul_v2r8(exponent,ewclj6));
/* fvdw = 12*C12/r13 - ((6*C6 - f6A)/r6 + f6B)/r */
r00 = _fjsp_mul_v2r8(rsq00,rinv00);
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
- c6grid_00 = gmx_fjsp_load_1real_swizzle_v2r8(vdwgridparam+vdwioffset0+vdwjidx0A);
+ c6grid_00 = gmx_fjsp_load_2real_swizzle_v2r8(vdwgridparam+vdwioffset0+vdwjidx0A,
+ vdwgridparam+vdwioffset0+vdwjidx0B);
/* Analytical LJ-PME */
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* f6A = 6 * C6grid * (1 - poly) */
- f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_msub_v2r8(one,poly));
+ f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_sub_v2r8(one,poly));
/* f6B = C6grid * exponent * beta^6 */
f6B = _fjsp_mul_v2r8(_fjsp_mul_v2r8(c6grid_00,one_sixth),_fjsp_mul_v2r8(exponent,ewclj6));
/* fvdw = 12*C12/r13 - ((6*C6 - f6A)/r6 + f6B)/r */
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* vvdw6 = [C6 - C6grid * (1-poly)]/r6 */
- vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(-c6grid_00,_fjsp_sub_v2r8(one,poly),c6_00),rinvsix);
+ vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(c6grid_00,_fjsp_sub_v2r8(poly,one),c6_00),rinvsix);
vvdw12 = _fjsp_mul_v2r8(c12_00,_fjsp_mul_v2r8(rinvsix,rinvsix));
vvdw = _fjsp_msub_v2r8(_fjsp_nmsub_v2r8(c12_00,_fjsp_mul_v2r8(sh_vdw_invrcut6,sh_vdw_invrcut6),vvdw12),one_twelfth,
_fjsp_mul_v2r8(_fjsp_sub_v2r8(vvdw6,_fjsp_madd_v2r8(c6grid_00,sh_lj_ewald,_fjsp_mul_v2r8(c6_00,sh_vdw_invrcut6))),one_sixth));
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* vvdw6 = [C6 - C6grid * (1-poly)]/r6 */
- vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(-c6grid_00,_fjsp_sub_v2r8(one,poly),c6_00),rinvsix);
+ vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(c6grid_00,_fjsp_sub_v2r8(poly,one),c6_00),rinvsix);
vvdw12 = _fjsp_mul_v2r8(c12_00,_fjsp_mul_v2r8(rinvsix,rinvsix));
vvdw = _fjsp_msub_v2r8(_fjsp_nmsub_v2r8(c12_00,_fjsp_mul_v2r8(sh_vdw_invrcut6,sh_vdw_invrcut6),vvdw12),one_twelfth,
_fjsp_mul_v2r8(_fjsp_sub_v2r8(vvdw6,_fjsp_madd_v2r8(c6grid_00,sh_lj_ewald,_fjsp_mul_v2r8(c6_00,sh_vdw_invrcut6))),one_sixth));
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* f6A = 6 * C6grid * (1 - poly) */
- f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_msub_v2r8(one,poly));
+ f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_sub_v2r8(one,poly));
/* f6B = C6grid * exponent * beta^6 */
f6B = _fjsp_mul_v2r8(_fjsp_mul_v2r8(c6grid_00,one_sixth),_fjsp_mul_v2r8(exponent,ewclj6));
/* fvdw = 12*C12/r13 - ((6*C6 - f6A)/r6 + f6B)/r */
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* f6A = 6 * C6grid * (1 - poly) */
- f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_msub_v2r8(one,poly));
+ f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_sub_v2r8(one,poly));
/* f6B = C6grid * exponent * beta^6 */
f6B = _fjsp_mul_v2r8(_fjsp_mul_v2r8(c6grid_00,one_sixth),_fjsp_mul_v2r8(exponent,ewclj6));
/* fvdw = 12*C12/r13 - ((6*C6 - f6A)/r6 + f6B)/r */
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* EWALD ELECTROSTATICS */
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* EWALD ELECTROSTATICS */
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* EWALD ELECTROSTATICS */
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* EWALD ELECTROSTATICS */
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
{
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* LENNARD-JONES DISPERSION/REPULSION */
{
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* LENNARD-JONES DISPERSION/REPULSION */
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* EWALD ELECTROSTATICS */
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* EWALD ELECTROSTATICS */
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* EWALD ELECTROSTATICS */
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* EWALD ELECTROSTATICS */
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
r00 = _fjsp_mul_v2r8(rsq00,rinv00);
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* LENNARD-JONES DISPERSION/REPULSION */
r00 = _fjsp_mul_v2r8(rsq00,rinv00);
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* LENNARD-JONES DISPERSION/REPULSION */
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
r00 = _fjsp_mul_v2r8(rsq00,rinv00);
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
r00 = _fjsp_mul_v2r8(rsq00,rinv00);
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* vvdw6 = [C6 - C6grid * (1-poly)]/r6 */
- vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(-c6grid_00,_fjsp_sub_v2r8(one,poly),c6_00),rinvsix);
+ vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(c6grid_00,_fjsp_sub_v2r8(poly,one),c6_00),rinvsix);
vvdw12 = _fjsp_mul_v2r8(c12_00,_fjsp_mul_v2r8(rinvsix,rinvsix));
vvdw = _fjsp_msub_v2r8(vvdw12,one_twelfth,_fjsp_mul_v2r8(vvdw6,one_sixth));
/* fvdw = vvdw12/r - (vvdw6/r + (C6grid * exponent * beta^6)/r) */
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
- c6grid_00 = gmx_fjsp_load_1real_swizzle_v2r8(vdwgridparam+vdwioffset0+vdwjidx0A);
+ c6grid_00 = gmx_fjsp_load_2real_swizzle_v2r8(vdwgridparam+vdwioffset0+vdwjidx0A,
+ vdwgridparam+vdwioffset0+vdwjidx0B);
/* EWALD ELECTROSTATICS */
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* vvdw6 = [C6 - C6grid * (1-poly)]/r6 */
- vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(-c6grid_00,_fjsp_sub_v2r8(one,poly),c6_00),rinvsix);
+ vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(c6grid_00,_fjsp_sub_v2r8(poly,one),c6_00),rinvsix);
vvdw12 = _fjsp_mul_v2r8(c12_00,_fjsp_mul_v2r8(rinvsix,rinvsix));
vvdw = _fjsp_msub_v2r8(vvdw12,one_twelfth,_fjsp_mul_v2r8(vvdw6,one_sixth));
/* fvdw = vvdw12/r - (vvdw6/r + (C6grid * exponent * beta^6)/r) */
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* f6A = 6 * C6grid * (1 - poly) */
- f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_msub_v2r8(one,poly));
+ f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_sub_v2r8(one,poly));
/* f6B = C6grid * exponent * beta^6 */
f6B = _fjsp_mul_v2r8(_fjsp_mul_v2r8(c6grid_00,one_sixth),_fjsp_mul_v2r8(exponent,ewclj6));
/* fvdw = 12*C12/r13 - ((6*C6 - f6A)/r6 + f6B)/r */
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
- c6grid_00 = gmx_fjsp_load_1real_swizzle_v2r8(vdwgridparam+vdwioffset0+vdwjidx0A);
+ c6grid_00 = gmx_fjsp_load_2real_swizzle_v2r8(vdwgridparam+vdwioffset0+vdwjidx0A,
+ vdwgridparam+vdwioffset0+vdwjidx0B);
/* EWALD ELECTROSTATICS */
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* f6A = 6 * C6grid * (1 - poly) */
- f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_msub_v2r8(one,poly));
+ f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_sub_v2r8(one,poly));
/* f6B = C6grid * exponent * beta^6 */
f6B = _fjsp_mul_v2r8(_fjsp_mul_v2r8(c6grid_00,one_sixth),_fjsp_mul_v2r8(exponent,ewclj6));
/* fvdw = 12*C12/r13 - ((6*C6 - f6A)/r6 + f6B)/r */
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* vvdw6 = [C6 - C6grid * (1-poly)]/r6 */
- vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(-c6grid_00,_fjsp_sub_v2r8(one,poly),c6_00),rinvsix);
+ vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(c6grid_00,_fjsp_sub_v2r8(poly,one),c6_00),rinvsix);
vvdw12 = _fjsp_mul_v2r8(c12_00,_fjsp_mul_v2r8(rinvsix,rinvsix));
vvdw = _fjsp_msub_v2r8(vvdw12,one_twelfth,_fjsp_mul_v2r8(vvdw6,one_sixth));
/* fvdw = vvdw12/r - (vvdw6/r + (C6grid * exponent * beta^6)/r) */
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
- c6grid_00 = gmx_fjsp_load_1real_swizzle_v2r8(vdwgridparam+vdwioffset0+vdwjidx0A);
+ c6grid_00 = gmx_fjsp_load_2real_swizzle_v2r8(vdwgridparam+vdwioffset0+vdwjidx0A,
+ vdwgridparam+vdwioffset0+vdwjidx0B);
/* EWALD ELECTROSTATICS */
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* vvdw6 = [C6 - C6grid * (1-poly)]/r6 */
- vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(-c6grid_00,_fjsp_sub_v2r8(one,poly),c6_00),rinvsix);
+ vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(c6grid_00,_fjsp_sub_v2r8(poly,one),c6_00),rinvsix);
vvdw12 = _fjsp_mul_v2r8(c12_00,_fjsp_mul_v2r8(rinvsix,rinvsix));
vvdw = _fjsp_msub_v2r8(vvdw12,one_twelfth,_fjsp_mul_v2r8(vvdw6,one_sixth));
/* fvdw = vvdw12/r - (vvdw6/r + (C6grid * exponent * beta^6)/r) */
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* f6A = 6 * C6grid * (1 - poly) */
- f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_msub_v2r8(one,poly));
+ f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_sub_v2r8(one,poly));
/* f6B = C6grid * exponent * beta^6 */
f6B = _fjsp_mul_v2r8(_fjsp_mul_v2r8(c6grid_00,one_sixth),_fjsp_mul_v2r8(exponent,ewclj6));
/* fvdw = 12*C12/r13 - ((6*C6 - f6A)/r6 + f6B)/r */
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
- c6grid_00 = gmx_fjsp_load_1real_swizzle_v2r8(vdwgridparam+vdwioffset0+vdwjidx0A);
+ c6grid_00 = gmx_fjsp_load_2real_swizzle_v2r8(vdwgridparam+vdwioffset0+vdwjidx0A,
+ vdwgridparam+vdwioffset0+vdwjidx0B);
/* EWALD ELECTROSTATICS */
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* f6A = 6 * C6grid * (1 - poly) */
- f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_msub_v2r8(one,poly));
+ f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_sub_v2r8(one,poly));
/* f6B = C6grid * exponent * beta^6 */
f6B = _fjsp_mul_v2r8(_fjsp_mul_v2r8(c6grid_00,one_sixth),_fjsp_mul_v2r8(exponent,ewclj6));
/* fvdw = 12*C12/r13 - ((6*C6 - f6A)/r6 + f6B)/r */
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* vvdw6 = [C6 - C6grid * (1-poly)]/r6 */
- vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(-c6grid_00,_fjsp_sub_v2r8(one,poly),c6_00),rinvsix);
+ vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(c6grid_00,_fjsp_sub_v2r8(poly,one),c6_00),rinvsix);
vvdw12 = _fjsp_mul_v2r8(c12_00,_fjsp_mul_v2r8(rinvsix,rinvsix));
vvdw = _fjsp_msub_v2r8(vvdw12,one_twelfth,_fjsp_mul_v2r8(vvdw6,one_sixth));
/* fvdw = vvdw12/r - (vvdw6/r + (C6grid * exponent * beta^6)/r) */
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* vvdw6 = [C6 - C6grid * (1-poly)]/r6 */
- vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(-c6grid_00,_fjsp_sub_v2r8(one,poly),c6_00),rinvsix);
+ vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(c6grid_00,_fjsp_sub_v2r8(poly,one),c6_00),rinvsix);
vvdw12 = _fjsp_mul_v2r8(c12_00,_fjsp_mul_v2r8(rinvsix,rinvsix));
vvdw = _fjsp_msub_v2r8(vvdw12,one_twelfth,_fjsp_mul_v2r8(vvdw6,one_sixth));
/* fvdw = vvdw12/r - (vvdw6/r + (C6grid * exponent * beta^6)/r) */
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* f6A = 6 * C6grid * (1 - poly) */
- f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_msub_v2r8(one,poly));
+ f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_sub_v2r8(one,poly));
/* f6B = C6grid * exponent * beta^6 */
f6B = _fjsp_mul_v2r8(_fjsp_mul_v2r8(c6grid_00,one_sixth),_fjsp_mul_v2r8(exponent,ewclj6));
/* fvdw = 12*C12/r13 - ((6*C6 - f6A)/r6 + f6B)/r */
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* f6A = 6 * C6grid * (1 - poly) */
- f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_msub_v2r8(one,poly));
+ f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_sub_v2r8(one,poly));
/* f6B = C6grid * exponent * beta^6 */
f6B = _fjsp_mul_v2r8(_fjsp_mul_v2r8(c6grid_00,one_sixth),_fjsp_mul_v2r8(exponent,ewclj6));
/* fvdw = 12*C12/r13 - ((6*C6 - f6A)/r6 + f6B)/r */
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* vvdw6 = [C6 - C6grid * (1-poly)]/r6 */
- vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(-c6grid_00,_fjsp_sub_v2r8(one,poly),c6_00),rinvsix);
+ vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(c6grid_00,_fjsp_sub_v2r8(poly,one),c6_00),rinvsix);
vvdw12 = _fjsp_mul_v2r8(c12_00,_fjsp_mul_v2r8(rinvsix,rinvsix));
vvdw = _fjsp_msub_v2r8(vvdw12,one_twelfth,_fjsp_mul_v2r8(vvdw6,one_sixth));
/* fvdw = vvdw12/r - (vvdw6/r + (C6grid * exponent * beta^6)/r) */
r00 = _fjsp_mul_v2r8(rsq00,rinv00);
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
- c6grid_00 = gmx_fjsp_load_1real_swizzle_v2r8(vdwgridparam+vdwioffset0+vdwjidx0A);
+ c6grid_00 = gmx_fjsp_load_2real_swizzle_v2r8(vdwgridparam+vdwioffset0+vdwjidx0A,
+ vdwgridparam+vdwioffset0+vdwjidx0B);
/* Analytical LJ-PME */
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* vvdw6 = [C6 - C6grid * (1-poly)]/r6 */
- vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(-c6grid_00,_fjsp_sub_v2r8(one,poly),c6_00),rinvsix);
+ vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(c6grid_00,_fjsp_sub_v2r8(poly,one),c6_00),rinvsix);
vvdw12 = _fjsp_mul_v2r8(c12_00,_fjsp_mul_v2r8(rinvsix,rinvsix));
vvdw = _fjsp_msub_v2r8(vvdw12,one_twelfth,_fjsp_mul_v2r8(vvdw6,one_sixth));
/* fvdw = vvdw12/r - (vvdw6/r + (C6grid * exponent * beta^6)/r) */
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* f6A = 6 * C6grid * (1 - poly) */
- f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_msub_v2r8(one,poly));
+ f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_sub_v2r8(one,poly));
/* f6B = C6grid * exponent * beta^6 */
f6B = _fjsp_mul_v2r8(_fjsp_mul_v2r8(c6grid_00,one_sixth),_fjsp_mul_v2r8(exponent,ewclj6));
/* fvdw = 12*C12/r13 - ((6*C6 - f6A)/r6 + f6B)/r */
r00 = _fjsp_mul_v2r8(rsq00,rinv00);
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
- c6grid_00 = gmx_fjsp_load_1real_swizzle_v2r8(vdwgridparam+vdwioffset0+vdwjidx0A);
+ c6grid_00 = gmx_fjsp_load_2real_swizzle_v2r8(vdwgridparam+vdwioffset0+vdwjidx0A,
+ vdwgridparam+vdwioffset0+vdwjidx0B);
/* Analytical LJ-PME */
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* f6A = 6 * C6grid * (1 - poly) */
- f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_msub_v2r8(one,poly));
+ f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_sub_v2r8(one,poly));
/* f6B = C6grid * exponent * beta^6 */
f6B = _fjsp_mul_v2r8(_fjsp_mul_v2r8(c6grid_00,one_sixth),_fjsp_mul_v2r8(exponent,ewclj6));
/* fvdw = 12*C12/r13 - ((6*C6 - f6A)/r6 + f6B)/r */
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* vvdw6 = [C6 - C6grid * (1-poly)]/r6 */
- vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(-c6grid_00,_fjsp_sub_v2r8(one,poly),c6_00),rinvsix);
+ vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(c6grid_00,_fjsp_sub_v2r8(poly,one),c6_00),rinvsix);
vvdw12 = _fjsp_mul_v2r8(c12_00,_fjsp_mul_v2r8(rinvsix,rinvsix));
vvdw = _fjsp_msub_v2r8(vvdw12,one_twelfth,_fjsp_mul_v2r8(vvdw6,one_sixth));
/* fvdw = vvdw12/r - (vvdw6/r + (C6grid * exponent * beta^6)/r) */
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* vvdw6 = [C6 - C6grid * (1-poly)]/r6 */
- vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(-c6grid_00,_fjsp_sub_v2r8(one,poly),c6_00),rinvsix);
+ vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(c6grid_00,_fjsp_sub_v2r8(poly,one),c6_00),rinvsix);
vvdw12 = _fjsp_mul_v2r8(c12_00,_fjsp_mul_v2r8(rinvsix,rinvsix));
vvdw = _fjsp_msub_v2r8(vvdw12,one_twelfth,_fjsp_mul_v2r8(vvdw6,one_sixth));
/* fvdw = vvdw12/r - (vvdw6/r + (C6grid * exponent * beta^6)/r) */
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* f6A = 6 * C6grid * (1 - poly) */
- f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_msub_v2r8(one,poly));
+ f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_sub_v2r8(one,poly));
/* f6B = C6grid * exponent * beta^6 */
f6B = _fjsp_mul_v2r8(_fjsp_mul_v2r8(c6grid_00,one_sixth),_fjsp_mul_v2r8(exponent,ewclj6));
/* fvdw = 12*C12/r13 - ((6*C6 - f6A)/r6 + f6B)/r */
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* f6A = 6 * C6grid * (1 - poly) */
- f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_msub_v2r8(one,poly));
+ f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_sub_v2r8(one,poly));
/* f6B = C6grid * exponent * beta^6 */
f6B = _fjsp_mul_v2r8(_fjsp_mul_v2r8(c6grid_00,one_sixth),_fjsp_mul_v2r8(exponent,ewclj6));
/* fvdw = 12*C12/r13 - ((6*C6 - f6A)/r6 + f6B)/r */
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* EWALD ELECTROSTATICS */
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* EWALD ELECTROSTATICS */
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* EWALD ELECTROSTATICS */
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* EWALD ELECTROSTATICS */
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
**************************/
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* LENNARD-JONES DISPERSION/REPULSION */
**************************/
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* LENNARD-JONES DISPERSION/REPULSION */
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* GENERALIZED BORN AND COULOMB ELECTROSTATICS */
isaprod = _fjsp_mul_v2r8(isai0,isaj0);
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* GENERALIZED BORN AND COULOMB ELECTROSTATICS */
isaprod = _fjsp_mul_v2r8(isai0,isaj0);
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
r00 = _fjsp_mul_v2r8(rsq00,rinv00);
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
r00 = _fjsp_mul_v2r8(rsq00,rinv00);
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* vvdw6 = [C6 - C6grid * (1-poly)]/r6 */
- vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(-c6grid_00,_fjsp_sub_v2r8(one,poly),c6_00),rinvsix);
+ vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(c6grid_00,_fjsp_sub_v2r8(poly,one),c6_00),rinvsix);
vvdw12 = _fjsp_mul_v2r8(c12_00,_fjsp_mul_v2r8(rinvsix,rinvsix));
vvdw = _fjsp_msub_v2r8(_fjsp_nmsub_v2r8(c12_00,_fjsp_mul_v2r8(sh_vdw_invrcut6,sh_vdw_invrcut6),vvdw12),one_twelfth,
_fjsp_mul_v2r8(_fjsp_sub_v2r8(vvdw6,_fjsp_madd_v2r8(c6grid_00,sh_lj_ewald,_fjsp_mul_v2r8(c6_00,sh_vdw_invrcut6))),one_sixth));
r00 = _fjsp_mul_v2r8(rsq00,rinv00);
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
- c6grid_00 = gmx_fjsp_load_1real_swizzle_v2r8(vdwgridparam+vdwioffset0+vdwjidx0A);
+ c6grid_00 = gmx_fjsp_load_2real_swizzle_v2r8(vdwgridparam+vdwioffset0+vdwjidx0A,
+ vdwgridparam+vdwioffset0+vdwjidx0B);
/* Analytical LJ-PME */
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* vvdw6 = [C6 - C6grid * (1-poly)]/r6 */
- vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(-c6grid_00,_fjsp_sub_v2r8(one,poly),c6_00),rinvsix);
+ vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(c6grid_00,_fjsp_sub_v2r8(poly,one),c6_00),rinvsix);
vvdw12 = _fjsp_mul_v2r8(c12_00,_fjsp_mul_v2r8(rinvsix,rinvsix));
vvdw = _fjsp_msub_v2r8(_fjsp_nmsub_v2r8(c12_00,_fjsp_mul_v2r8(sh_vdw_invrcut6,sh_vdw_invrcut6),vvdw12),one_twelfth,
_fjsp_mul_v2r8(_fjsp_sub_v2r8(vvdw6,_fjsp_madd_v2r8(c6grid_00,sh_lj_ewald,_fjsp_mul_v2r8(c6_00,sh_vdw_invrcut6))),one_sixth));
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* f6A = 6 * C6grid * (1 - poly) */
- f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_msub_v2r8(one,poly));
+ f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_sub_v2r8(one,poly));
/* f6B = C6grid * exponent * beta^6 */
f6B = _fjsp_mul_v2r8(_fjsp_mul_v2r8(c6grid_00,one_sixth),_fjsp_mul_v2r8(exponent,ewclj6));
/* fvdw = 12*C12/r13 - ((6*C6 - f6A)/r6 + f6B)/r */
r00 = _fjsp_mul_v2r8(rsq00,rinv00);
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
- c6grid_00 = gmx_fjsp_load_1real_swizzle_v2r8(vdwgridparam+vdwioffset0+vdwjidx0A);
+ c6grid_00 = gmx_fjsp_load_2real_swizzle_v2r8(vdwgridparam+vdwioffset0+vdwjidx0A,
+ vdwgridparam+vdwioffset0+vdwjidx0B);
/* Analytical LJ-PME */
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* f6A = 6 * C6grid * (1 - poly) */
- f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_msub_v2r8(one,poly));
+ f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_sub_v2r8(one,poly));
/* f6B = C6grid * exponent * beta^6 */
f6B = _fjsp_mul_v2r8(_fjsp_mul_v2r8(c6grid_00,one_sixth),_fjsp_mul_v2r8(exponent,ewclj6));
/* fvdw = 12*C12/r13 - ((6*C6 - f6A)/r6 + f6B)/r */
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* vvdw6 = [C6 - C6grid * (1-poly)]/r6 */
- vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(-c6grid_00,_fjsp_sub_v2r8(one,poly),c6_00),rinvsix);
+ vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(c6grid_00,_fjsp_sub_v2r8(poly,one),c6_00),rinvsix);
vvdw12 = _fjsp_mul_v2r8(c12_00,_fjsp_mul_v2r8(rinvsix,rinvsix));
vvdw = _fjsp_msub_v2r8(vvdw12,one_twelfth,_fjsp_mul_v2r8(vvdw6,one_sixth));
/* fvdw = vvdw12/r - (vvdw6/r + (C6grid * exponent * beta^6)/r) */
r00 = _fjsp_mul_v2r8(rsq00,rinv00);
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
- c6grid_00 = gmx_fjsp_load_1real_swizzle_v2r8(vdwgridparam+vdwioffset0+vdwjidx0A);
+ c6grid_00 = gmx_fjsp_load_2real_swizzle_v2r8(vdwgridparam+vdwioffset0+vdwjidx0A,
+ vdwgridparam+vdwioffset0+vdwjidx0B);
/* Analytical LJ-PME */
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* vvdw6 = [C6 - C6grid * (1-poly)]/r6 */
- vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(-c6grid_00,_fjsp_sub_v2r8(one,poly),c6_00),rinvsix);
+ vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(c6grid_00,_fjsp_sub_v2r8(poly,one),c6_00),rinvsix);
vvdw12 = _fjsp_mul_v2r8(c12_00,_fjsp_mul_v2r8(rinvsix,rinvsix));
vvdw = _fjsp_msub_v2r8(vvdw12,one_twelfth,_fjsp_mul_v2r8(vvdw6,one_sixth));
/* fvdw = vvdw12/r - (vvdw6/r + (C6grid * exponent * beta^6)/r) */
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* f6A = 6 * C6grid * (1 - poly) */
- f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_msub_v2r8(one,poly));
+ f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_sub_v2r8(one,poly));
/* f6B = C6grid * exponent * beta^6 */
f6B = _fjsp_mul_v2r8(_fjsp_mul_v2r8(c6grid_00,one_sixth),_fjsp_mul_v2r8(exponent,ewclj6));
/* fvdw = 12*C12/r13 - ((6*C6 - f6A)/r6 + f6B)/r */
r00 = _fjsp_mul_v2r8(rsq00,rinv00);
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
- c6grid_00 = gmx_fjsp_load_1real_swizzle_v2r8(vdwgridparam+vdwioffset0+vdwjidx0A);
+ c6grid_00 = gmx_fjsp_load_2real_swizzle_v2r8(vdwgridparam+vdwioffset0+vdwjidx0A,
+ vdwgridparam+vdwioffset0+vdwjidx0B);
/* Analytical LJ-PME */
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq00,rinvsq00),rinvsq00);
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq00);
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* f6A = 6 * C6grid * (1 - poly) */
- f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_msub_v2r8(one,poly));
+ f6A = _fjsp_mul_v2r8(c6grid_00,_fjsp_sub_v2r8(one,poly));
/* f6B = C6grid * exponent * beta^6 */
f6B = _fjsp_mul_v2r8(_fjsp_mul_v2r8(c6grid_00,one_sixth),_fjsp_mul_v2r8(exponent,ewclj6));
/* fvdw = 12*C12/r13 - ((6*C6 - f6A)/r6 + f6B)/r */
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
{
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* LENNARD-JONES DISPERSION/REPULSION */
{
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* LENNARD-JONES DISPERSION/REPULSION */
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
r00 = _fjsp_mul_v2r8(rsq00,rinv00);
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* LENNARD-JONES DISPERSION/REPULSION */
r00 = _fjsp_mul_v2r8(rsq00,rinv00);
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* LENNARD-JONES DISPERSION/REPULSION */
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
**************************/
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* LENNARD-JONES DISPERSION/REPULSION */
**************************/
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* LENNARD-JONES DISPERSION/REPULSION */
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
r00 = _fjsp_mul_v2r8(rsq00,rinv00);
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
r00 = _fjsp_mul_v2r8(rsq00,rinv00);
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* REACTION-FIELD ELECTROSTATICS */
velec = _fjsp_mul_v2r8(qq00,_fjsp_sub_v2r8(_fjsp_madd_v2r8(krf,rsq00,rinv00),crf));
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* REACTION-FIELD ELECTROSTATICS */
felec = _fjsp_mul_v2r8(qq00,_fjsp_msub_v2r8(rinv00,rinvsq00,krf2));
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* REACTION-FIELD ELECTROSTATICS */
velec = _fjsp_mul_v2r8(qq00,_fjsp_sub_v2r8(_fjsp_madd_v2r8(krf,rsq00,rinv00),crf));
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* REACTION-FIELD ELECTROSTATICS */
felec = _fjsp_mul_v2r8(qq00,_fjsp_msub_v2r8(rinv00,rinvsq00,krf2));
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
{
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* LENNARD-JONES DISPERSION/REPULSION */
{
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* LENNARD-JONES DISPERSION/REPULSION */
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* REACTION-FIELD ELECTROSTATICS */
velec = _fjsp_mul_v2r8(qq00,_fjsp_sub_v2r8(_fjsp_madd_v2r8(krf,rsq00,rinv00),crf));
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* REACTION-FIELD ELECTROSTATICS */
felec = _fjsp_mul_v2r8(qq00,_fjsp_msub_v2r8(rinv00,rinvsq00,krf2));
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* REACTION-FIELD ELECTROSTATICS */
velec = _fjsp_mul_v2r8(qq00,_fjsp_sub_v2r8(_fjsp_madd_v2r8(krf,rsq00,rinv00),crf));
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* REACTION-FIELD ELECTROSTATICS */
felec = _fjsp_mul_v2r8(qq00,_fjsp_msub_v2r8(rinv00,rinvsq00,krf2));
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
r00 = _fjsp_mul_v2r8(rsq00,rinv00);
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* LENNARD-JONES DISPERSION/REPULSION */
r00 = _fjsp_mul_v2r8(rsq00,rinv00);
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* LENNARD-JONES DISPERSION/REPULSION */
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
r00 = _fjsp_mul_v2r8(rsq00,rinv00);
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
r00 = _fjsp_mul_v2r8(rsq00,rinv00);
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* Calculate table index by multiplying r with table scale and truncate to integer */
rt = _fjsp_mul_v2r8(r00,vftabscale);
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* REACTION-FIELD ELECTROSTATICS */
velec = _fjsp_mul_v2r8(qq00,_fjsp_sub_v2r8(_fjsp_madd_v2r8(krf,rsq00,rinv00),crf));
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* REACTION-FIELD ELECTROSTATICS */
felec = _fjsp_mul_v2r8(qq00,_fjsp_msub_v2r8(rinv00,rinvsq00,krf2));
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* REACTION-FIELD ELECTROSTATICS */
velec = _fjsp_mul_v2r8(qq00,_fjsp_sub_v2r8(_fjsp_madd_v2r8(krf,rsq00,rinv00),crf));
/* Compute parameters for interactions between i and j atoms */
qq00 = _fjsp_mul_v2r8(iq0,jq0);
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* REACTION-FIELD ELECTROSTATICS */
felec = _fjsp_mul_v2r8(qq00,_fjsp_msub_v2r8(rinv00,rinvsq00,krf2));
/*
* Note: this file was generated by the GROMACS sparc64_hpc_ace_double kernel generator.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
**************************/
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* LENNARD-JONES DISPERSION/REPULSION */
**************************/
/* Compute parameters for interactions between i and j atoms */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,&c6_00,&c12_00);
+ gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset0+vdwjidx0A,
+ vdwparam+vdwioffset0+vdwjidx0B,&c6_00,&c12_00);
/* LENNARD-JONES DISPERSION/REPULSION */
#error This file must be processed with the Gromacs pre-preprocessor
/* #endif */
/* #if INCLUDE_HEADER */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "../nb_kernel.h"
-#include "types/simple.h"
-#include "gromacs/legacyheaders/vec.h"
-#include "nrnb.h"
+#include "gromacs/legacyheaders/types/simple.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/nrnb.h"
#include "kernelutil_sparc64_hpc_ace_double.h"
/* #endif */
/* #define INNERFLOPS INNERFLOPS+1 */
/* #endif */
/* #if 'vdw' in INTERACTION_FLAGS[I][J] */
- /* #if ROUND == 'Loop' */
gmx_fjsp_load_2pair_swizzle_v2r8(vdwparam+vdwioffset{I}+vdwjidx{J}A,
vdwparam+vdwioffset{I}+vdwjidx{J}B,&c6_{I}{J},&c12_{I}{J});
- /* #if 'LJEwald' in KERNEL_VDW */
+ /* #if 'LJEwald' in KERNEL_VDW */
c6grid_{I}{J} = gmx_fjsp_load_2real_swizzle_v2r8(vdwgridparam+vdwioffset{I}+vdwjidx{J}A,
vdwgridparam+vdwioffset{I}+vdwjidx{J}B);
- /* #endif */
- /* #else */
- gmx_fjsp_load_1pair_swizzle_v2r8(vdwparam+vdwioffset{I}+vdwjidx{J}A,&c6_{I}{J},&c12_{I}{J});
-
- /* #if 'LJEwald' in KERNEL_VDW */
- c6grid_{I}{J} = gmx_fjsp_load_1real_swizzle_v2r8(vdwgridparam+vdwioffset{I}+vdwjidx{J}A);
- /* #endif */
/* #endif */
/* #endif */
/* #endif */
rinvsix = _fjsp_mul_v2r8(_fjsp_mul_v2r8(rinvsq{I}{J},rinvsq{I}{J}),rinvsq{I}{J});
ewcljrsq = _fjsp_mul_v2r8(ewclj2,rsq{I}{J});
ewclj6 = _fjsp_mul_v2r8(ewclj2,_fjsp_mul_v2r8(ewclj2,ewclj2));
- exponent = gmx_simd_exp_d(-ewcljrsq);
+ exponent = gmx_simd_exp_d(ewcljrsq);
/* poly = exp(-(beta*r)^2) * (1 + (beta*r)^2 + (beta*r)^4 /2) */
poly = _fjsp_mul_v2r8(exponent,_fjsp_madd_v2r8(_fjsp_mul_v2r8(ewcljrsq,ewcljrsq),one_half,_fjsp_sub_v2r8(one,ewcljrsq)));
/* #define INNERFLOPS INNERFLOPS+9 */
/* #if 'Potential' in KERNEL_VF or KERNEL_MOD_VDW=='PotentialSwitch' */
/* vvdw6 = [C6 - C6grid * (1-poly)]/r6 */
- vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(-c6grid_{I}{J},_fjsp_sub_v2r8(one,poly),c6_{I}{J}),rinvsix);
+ vvdw6 = _fjsp_mul_v2r8(_fjsp_madd_v2r8(c6grid_{I}{J},_fjsp_sub_v2r8(poly,one),c6_{I}{J}),rinvsix);
vvdw12 = _fjsp_mul_v2r8(c12_{I}{J},_fjsp_mul_v2r8(rinvsix,rinvsix));
/* #define INNERFLOPS INNERFLOPS+5 */
/* #if KERNEL_MOD_VDW=='PotentialShift' */
/* #endif */
/* #elif KERNEL_VF=='Force' */
/* f6A = 6 * C6grid * (1 - poly) */
- f6A = _fjsp_mul_v2r8(c6grid_{I}{J},_fjsp_msub_v2r8(one,poly));
+ f6A = _fjsp_mul_v2r8(c6grid_{I}{J},_fjsp_sub_v2r8(one,poly));
/* f6B = C6grid * exponent * beta^6 */
f6B = _fjsp_mul_v2r8(_fjsp_mul_v2r8(c6grid_{I}{J},one_sixth),_fjsp_mul_v2r8(exponent,ewclj6));
/* fvdw = 12*C12/r13 - ((6*C6 - f6A)/r6 + f6B)/r */
* To help us fund GROMACS development, we humbly ask that you cite
* the research papers on the package. Check out http://www.gromacs.org.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <ctype.h>
-#include <stdlib.h>
#include <limits.h>
-#include "sysstuff.h"
-#include "gromacs/utility/smalloc.h"
-#include "typedefs.h"
-#include "physics.h"
-#include "names.h"
-#include "gmx_fatal.h"
-#include "macros.h"
-#include "index.h"
-#include "symtab.h"
+#include <stdlib.h>
+
+#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/math/units.h"
+#include "gromacs/legacyheaders/names.h"
+#include "gromacs/legacyheaders/macros.h"
+#include "gromacs/topology/index.h"
#include "gromacs/utility/cstringutil.h"
-#include "readinp.h"
-#include "warninp.h"
+#include "gromacs/legacyheaders/readinp.h"
+#include "gromacs/legacyheaders/warninp.h"
#include "readir.h"
#include "toputil.h"
-#include "index.h"
-#include "network.h"
-#include "vec.h"
-#include "pbc.h"
-#include "mtop_util.h"
-#include "chargegroup.h"
-#include "inputrec.h"
+#include "gromacs/legacyheaders/network.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/pbcutil/pbc.h"
+#include "gromacs/topology/mtop_util.h"
+#include "gromacs/legacyheaders/chargegroup.h"
+#include "gromacs/legacyheaders/inputrec.h"
#include "calc_verletbuf.h"
+#include "gromacs/topology/block.h"
+#include "gromacs/topology/symtab.h"
+#include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/smalloc.h"
+
#define MAXPTR 254
#define NOGID 255
sprintf(err_buf, "tau-p must be > 0 instead of %g\n", ir->tau_p);
CHECK(ir->tau_p <= 0);
- if (ir->tau_p/dt_pcoupl < pcouple_min_integration_steps(ir->epc))
+ if (ir->tau_p/dt_pcoupl < pcouple_min_integration_steps(ir->epc) - 10*GMX_REAL_EPS)
{
sprintf(warn_buf, "For proper integration of the %s barostat, tau-p (%g) should be at least %d times larger than nstpcouple*dt (%g)",
EPCOUPLTYPE(ir->epc), ir->tau_p, pcouple_min_integration_steps(ir->epc), dt_pcoupl);
int np = 0;
char *copy0, *copy;
- copy0 = strdup(str);
+ copy0 = gmx_strdup(str);
copy = copy0;
ltrim(copy);
while (*copy != '\0')
}
for (i = 0; i < ir->nwall; i++)
{
- opts->wall_atomtype[i] = strdup(names[i]);
+ opts->wall_atomtype[i] = gmx_strdup(names[i]);
}
if (ir->wall_type == ewt93 || ir->wall_type == ewt104)
{
if (ir->efep != efepNO)
{
- opts->couple_moltype = strdup(is->couple_moltype);
+ opts->couple_moltype = gmx_strdup(is->couple_moltype);
if (opts->couple_lam0 == opts->couple_lam1)
{
warning(wi, "The lambda=0 and lambda=1 states for coupling are identical");
double a, phi;
int i;
- t = strdup(s);
+ t = gmx_strdup(s);
trim(t);
cosine->n = 0;
void make_IMD_group(t_IMD *IMDgroup, char *IMDgname, t_blocka *grps, char **gnames)
{
- int ig = -1, i;
+ int ig, i;
ig = search_string(IMDgname, grps->nr, gnames);
nstcmin = tcouple_min_integration_steps(ir->etc);
if (nstcmin > 1)
{
- if (tau_min/(ir->delta_t*ir->nsttcouple) < nstcmin)
+ if (tau_min/(ir->delta_t*ir->nsttcouple) < nstcmin - 10*GMX_REAL_EPS)
{
sprintf(warn_buf, "For proper integration of the %s thermostat, tau-t (%g) should be at least %d times larger than nsttcouple*dt (%g)",
ETCOUPLTYPE(ir->etc),
* To help us fund GROMACS development, we humbly ask that you cite
* the research papers on the package. Check out http://www.gromacs.org.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
+ #include <assert.h>
#include <math.h>
#include <string.h>
-#include "gromacs/utility/smalloc.h"
-#include "sysstuff.h"
-#include "macros.h"
+#include "gromacs/legacyheaders/macros.h"
#include "topdirs.h"
#include "toputil.h"
-#include "symtab.h"
-#include "gmx_fatal.h"
#include "gpp_atomtype.h"
+#include "gromacs/topology/block.h"
+#include "gromacs/topology/symtab.h"
+#include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/smalloc.h"
+
/* UTILITIES */
void set_p_string(t_param *p, const char *s)
{
return;
}
- if ((pr->nr == 0) && (pr->param != NULL))
- {
- fprintf(stderr, "Warning: dangling pointer at %lx\n",
- (unsigned long)pr->param);
- pr->param = NULL;
- }
+ assert(!((pr->nr == 0) && (pr->param != NULL)));
if (pr->nr+extra > pr->maxnr)
{
pr->maxnr = max(1.2*pr->maxnr, pr->maxnr + extra);
* \ingroup module_simd
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "config.h"
#include <stddef.h>
-#include "gromacs/legacyheaders/types/simple.h"
+
+#include "gromacs/utility/basedefinitions.h"
/* Forward declarations so memory allocation can be used in implementations */
static gmx_inline float * gmx_simd_align_f(float *p);
# include "gromacs/simd/impl_x86_sse2/impl_x86_sse2.h"
#elif defined GMX_SIMD_IBM_QPX
# include "gromacs/simd/impl_ibm_qpx/impl_ibm_qpx.h"
+ #elif defined GMX_SIMD_SPARC64_HPC_ACE
+ # include "gromacs/simd/impl_sparc64_hpc_ace/impl_sparc64_hpc_ace.h"
#elif (defined GMX_SIMD_REFERENCE) || (defined DOXYGEN)
/* Plain C SIMD reference implementation, also serves as documentation.
* For now this code path will also be taken for Sparc64_HPC_ACE since we have
* To help us fund GROMACS development, we humbly ask that you cite
* the research papers on the package. Check out http://www.gromacs.org.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include "simd.h"
const gmx_simd_real_t rSimd_ExpDouble = setSimdRealFrom3R( 6.287393598732017379054414e+176,
8.794495252903116023030553e-140,
-3.637060701570496477655022e+202);
- // Magic FP numbers corresponding to specific bit patterns
- const gmx_simd_real_t rSimd_Bits1 = setSimdRealFrom1R(-1.07730874267432137e+236);
- const gmx_simd_real_t rSimd_Bits2 = setSimdRealFrom1R(-9.25596313493178307e+061);
- const gmx_simd_real_t rSimd_Bits3 = setSimdRealFrom1R(-8.57750588235293981e+003);
- const gmx_simd_real_t rSimd_Bits4 = setSimdRealFrom1R( 1.22416778341839096e-250);
- const gmx_simd_real_t rSimd_Bits5 = setSimdRealFrom1R(-1.15711777004554095e+294);
- const gmx_simd_real_t rSimd_Bits6 = setSimdRealFrom1R( 1.53063836115600621e-018);
- # else
- // Magic FP numbers corresponding to specific bit patterns
- const gmx_simd_real_t rSimd_Bits1 = setSimdRealFrom1R(-5.9654142337e+29);
- const gmx_simd_real_t rSimd_Bits2 = setSimdRealFrom1R(-1.0737417600e+08);
- const gmx_simd_real_t rSimd_Bits3 = setSimdRealFrom1R(-6.0235290527e+00);
- const gmx_simd_real_t rSimd_Bits4 = setSimdRealFrom1R( 1.0788832913e-31);
- const gmx_simd_real_t rSimd_Bits5 = setSimdRealFrom1R(-1.0508719529e+37);
- const gmx_simd_real_t rSimd_Bits6 = setSimdRealFrom1R( 1.1488970369e-02);
# endif
#endif // GMX_SIMD_HAVE_REAL
#ifdef GMX_SIMD_HAVE_INT32
* To help us fund GROMACS development, we humbly ask that you cite
* the research papers on the package. Check out http://www.gromacs.org.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include "simd4.h"
const gmx_simd4_real_t rSimd_ExpDouble = setSimd4RealFrom3R( 6.287393598732017379054414e+176,
8.794495252903116023030553e-140,
-3.637060701570496477655022e+202);
- // Magic FP numbers corresponding to specific bit patterns
- const gmx_simd4_real_t rSimd4_Bits1 = setSimd4RealFrom1R(-1.07730874267432137e+236);
- const gmx_simd4_real_t rSimd4_Bits2 = setSimd4RealFrom1R(-9.25596313493178307e+061);
- const gmx_simd4_real_t rSimd4_Bits3 = setSimd4RealFrom1R(-8.57750588235293981e+003);
- const gmx_simd4_real_t rSimd4_Bits4 = setSimd4RealFrom1R( 1.22416778341839096e-250);
- const gmx_simd4_real_t rSimd4_Bits5 = setSimd4RealFrom1R(-1.15711777004554095e+294);
- const gmx_simd4_real_t rSimd4_Bits6 = setSimd4RealFrom1R( 1.53063836115600621e-018);
- # else
- const gmx_simd4_real_t rSimd4_Bits1 = setSimd4RealFrom1R(-5.9654142337e+29);
- const gmx_simd4_real_t rSimd4_Bits2 = setSimd4RealFrom1R(-1.0737417600e+08);
- const gmx_simd4_real_t rSimd4_Bits3 = setSimd4RealFrom1R(-6.0235290527e+00);
- const gmx_simd4_real_t rSimd4_Bits4 = setSimd4RealFrom1R( 1.0788832913e-31);
- const gmx_simd4_real_t rSimd4_Bits5 = setSimd4RealFrom1R(-1.0508719529e+37);
- const gmx_simd4_real_t rSimd4_Bits6 = setSimd4RealFrom1R( 1.1488970369e-02);
# endif
::std::vector<real>
* To help us fund GROMACS development, we humbly ask that you cite
* the research papers on the package. Check out http://www.gromacs.org.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "gromacs/math/utilities.h"
}
#ifdef GMX_SIMD4_HAVE_LOGICAL
+ /* 1.3333282470703125 has mantissa 0101010101010101 (followed by zeros)
+ * 1.79998779296875 has mantissa 1100110011001100 (followed by zeros)
+ * 1.26666259765625 has mantissa 0100010001000100 (followed by zeros)
+ * 1.8666534423828125 has mantissa 1101110111011101 (followed by zeros)
+ *
+ * Since all of them have the same exponent (2^0), the exponent will
+ * not change with AND or OR operations.
+ */
TEST_F(Simd4FloatingpointTest, gmxSimd4AndR)
{
- GMX_EXPECT_SIMD4_REAL_EQ(rSimd4_Bits3, gmx_simd4_and_r(rSimd4_Bits1, rSimd4_Bits2)); // Bits1 & Bits2 = Bits3
+ GMX_EXPECT_SIMD4_REAL_EQ(setSimd4RealFrom1R(1.26666259765625),
+ gmx_simd4_and_r(gmx_simd4_set1_r(1.3333282470703125),
+ gmx_simd4_set1_r(1.79998779296875)));
}
- TEST_F(Simd4FloatingpointTest, gmxSimd4AndnotR)
+ TEST_F(Simd4FloatingpointTest, gmxSimd4OrR)
{
- GMX_EXPECT_SIMD4_REAL_EQ(rSimd4_Bits4, gmx_simd4_andnot_r(rSimd4_Bits1, rSimd4_Bits2)); // (~Bits1) & Bits2 = Bits3
+ GMX_EXPECT_SIMD4_REAL_EQ(setSimd4RealFrom1R(1.8666534423828125),
+ gmx_simd4_or_r(gmx_simd4_set1_r(1.3333282470703125),
+ gmx_simd4_set1_r(1.79998779296875)));
}
- TEST_F(Simd4FloatingpointTest, gmxSimd4OrR)
+ TEST_F(Simd4FloatingpointTest, gmxSimd4XorR)
{
- GMX_EXPECT_SIMD4_REAL_EQ(rSimd4_Bits5, gmx_simd4_or_r(rSimd4_Bits1, rSimd4_Bits2)); // Bits1 | Bits2 = Bits3
+ /* Test xor by taking xor with a number and its negative. This should result
+ * in only the sign bit being set. We then use this bit change the sign of
+ * different numbers.
+ */
+ gmx_simd4_real_t signbit = gmx_simd4_xor_r(gmx_simd4_set1_r(1.5), gmx_simd4_set1_r(-1.5));
+ GMX_EXPECT_SIMD4_REAL_EQ(setSimd4RealFrom3R(-1, 2, -3), gmx_simd4_xor_r(signbit, setSimd4RealFrom3R(1, -2, 3)));
}
- TEST_F(Simd4FloatingpointTest, gmxSimd4XorR)
+ TEST_F(Simd4FloatingpointTest, gmxSimd4AndnotR)
{
- GMX_EXPECT_SIMD4_REAL_EQ(rSimd4_Bits6, gmx_simd4_xor_r(rSimd4_Bits1, rSimd4_Bits2)); // Bits1 ^ Bits2 = Bits3
+ /* Use xor (which we already tested, so fix that first if both tests fail)
+ * to extract the sign bit, and then use andnot to take absolute values.
+ */
+ gmx_simd4_real_t signbit = gmx_simd4_xor_r(gmx_simd4_set1_r(1.5), gmx_simd4_set1_r(-1.5));
+ GMX_EXPECT_SIMD4_REAL_EQ(setSimd4RealFrom3R(1, 2, 3), gmx_simd4_andnot_r(signbit, setSimd4RealFrom3R(-1, 2, -3)));
}
+
#endif
TEST_F(Simd4FloatingpointTest, gmxSimd4MaxR)
* To help us fund GROMACS development, we humbly ask that you cite
* the research papers on the package. Check out http://www.gromacs.org.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
+#include "config.h"
#include <math.h>
#include "gromacs/math/utilities.h"
}
#ifdef GMX_SIMD_HAVE_LOGICAL
+ /* 1.3333282470703125 has mantissa 0101010101010101 (followed by zeros)
+ * 1.79998779296875 has mantissa 1100110011001100 (followed by zeros)
+ * 1.26666259765625 has mantissa 0100010001000100 (followed by zeros)
+ * 1.8666534423828125 has mantissa 1101110111011101 (followed by zeros)
+ *
+ * Since all of them have the same exponent (2^0), the exponent will
+ * not change with AND or OR operations.
+ */
TEST_F(SimdFloatingpointTest, gmxSimdAndR)
{
- GMX_EXPECT_SIMD_REAL_EQ(rSimd_Bits3, gmx_simd_and_r(rSimd_Bits1, rSimd_Bits2)); // Bits1 & Bits2 = Bits3
+ GMX_EXPECT_SIMD_REAL_EQ(setSimdRealFrom1R(1.26666259765625),
+ gmx_simd_and_r(gmx_simd_set1_r(1.3333282470703125),
+ gmx_simd_set1_r(1.79998779296875)));
}
- TEST_F(SimdFloatingpointTest, gmxSimdAndnotR)
+ TEST_F(SimdFloatingpointTest, gmxSimdOrR)
{
- GMX_EXPECT_SIMD_REAL_EQ(rSimd_Bits4, gmx_simd_andnot_r(rSimd_Bits1, rSimd_Bits2)); // (~Bits1) & Bits2 = Bits3
+ GMX_EXPECT_SIMD_REAL_EQ(setSimdRealFrom1R(1.8666534423828125),
+ gmx_simd_or_r(gmx_simd_set1_r(1.3333282470703125),
+ gmx_simd_set1_r(1.79998779296875)));
}
- TEST_F(SimdFloatingpointTest, gmxSimdOrR)
+ TEST_F(SimdFloatingpointTest, gmxSimdXorR)
{
- GMX_EXPECT_SIMD_REAL_EQ(rSimd_Bits5, gmx_simd_or_r(rSimd_Bits1, rSimd_Bits2)); // Bits1 | Bits2 = Bits3
+ /* Test xor by taking xor with a number and its negative. This should result
+ * in only the sign bit being set. We then use this bit change the sign of
+ * different numbers.
+ */
+ gmx_simd_real_t signbit = gmx_simd_xor_r(gmx_simd_set1_r(1.5), gmx_simd_set1_r(-1.5));
+ GMX_EXPECT_SIMD_REAL_EQ(setSimdRealFrom3R(-1, 2, -3), gmx_simd_xor_r(signbit, setSimdRealFrom3R(1, -2, 3)));
}
- TEST_F(SimdFloatingpointTest, gmxSimdXorR)
+ TEST_F(SimdFloatingpointTest, gmxSimdAndnotR)
{
- GMX_EXPECT_SIMD_REAL_EQ(rSimd_Bits6, gmx_simd_xor_r(rSimd_Bits1, rSimd_Bits2)); // Bits1 ^ Bits2 = Bits3
+ /* Use xor (which we already tested, so fix that first if both tests fail)
+ * to extract the sign bit, and then use andnot to take absolute values.
+ */
+ gmx_simd_real_t signbit = gmx_simd_xor_r(gmx_simd_set1_r(1.5), gmx_simd_set1_r(-1.5));
+ GMX_EXPECT_SIMD_REAL_EQ(setSimdRealFrom3R(1, 2, 3), gmx_simd_andnot_r(signbit, setSimdRealFrom3R(-1, 2, -3)));
}
+
#endif
TEST_F(SimdFloatingpointTest, gmxSimdMaxR)
--- /dev/null
- #if defined(HAVE_UNISTD_H) && !defined(__native_client__)
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
+ * Copyright (c) 2001-2004, The GROMACS development team.
+ * Copyright (c) 2013,2014, 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.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+#include "gmxpre.h"
+
+#include "basenetwork.h"
+
+#include "config.h"
+
+#include <cctype>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+
+#include <algorithm>
+#include <exception>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include "gromacs/utility/cstringutil.h"
+#include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/gmxmpi.h"
+#include "gromacs/utility/programcontext.h"
+
+int gmx_gethostname(char *name, size_t len)
+{
+ if (len < 8)
+ {
+ gmx_incons("gmx_gethostname called with len<8");
+ }
++#if defined(HAVE_UNISTD_H) && !defined(__native_client__) && !defined(__MINGW32__)
+ if (gethostname(name, len-1) != 0)
+ {
+ std::strncpy(name, "unknown", 8);
+ return -1;
+ }
+ return 0;
+#else
+ std::strncpy(name, "unknown", 8);
+ return -1;
+#endif
+}
+
+gmx_bool gmx_mpi_initialized(void)
+{
+#ifndef GMX_MPI
+ return 0;
+#else
+ int n;
+ MPI_Initialized(&n);
+
+ return n;
+#endif
+}
+
+int gmx_node_num(void)
+{
+#ifndef GMX_MPI
+ return 1;
+#else
+#ifdef GMX_THREAD_MPI
+ if (!gmx_mpi_initialized())
+ {
+ return 1;
+ }
+#endif
+ int i;
+ (void) MPI_Comm_size(MPI_COMM_WORLD, &i);
+ return i;
+#endif
+}
+
+int gmx_node_rank(void)
+{
+#ifndef GMX_MPI
+ return 0;
+#else
+#ifdef GMX_THREAD_MPI
+ if (!gmx_mpi_initialized())
+ {
+ return 0;
+ }
+#endif
+ int i;
+ (void) MPI_Comm_rank(MPI_COMM_WORLD, &i);
+ return i;
+#endif
+}
+
+static int mpi_hostname_hash(void)
+{
+ int hash_int;
+
+#ifndef GMX_LIB_MPI
+ /* We have a single physical node */
+ hash_int = 0;
+#else
+ int resultlen;
+ char mpi_hostname[MPI_MAX_PROCESSOR_NAME];
+
+ /* This procedure can only differentiate nodes with different names.
+ * Architectures where different physical nodes have identical names,
+ * such as IBM Blue Gene, should use an architecture specific solution.
+ */
+ MPI_Get_processor_name(mpi_hostname, &resultlen);
+
+ /* The string hash function returns an unsigned int. We cast to an int.
+ * Negative numbers are converted to positive by setting the sign bit to 0.
+ * This makes the hash one bit smaller.
+ * A 63-bit hash (with 64-bit int) should be enough for unique node hashes,
+ * even on a million node machine. 31 bits might not be enough though!
+ */
+ hash_int =
+ (int)gmx_string_fullhash_func(mpi_hostname, gmx_string_hash_init);
+ if (hash_int < 0)
+ {
+ hash_int -= INT_MIN;
+ }
+#endif
+
+ return hash_int;
+}
+
+#if defined GMX_LIB_MPI && defined GMX_TARGET_BGQ
+#ifdef __clang__
+/* IBM's declaration of this function in
+ * /bgsys/drivers/V1R2M2/ppc64/spi/include/kernel/process.h
+ * erroneously fails to specify __INLINE__, despite
+ * /bgsys/drivers/V1R2M2/ppc64/spi/include/kernel/cnk/process_impl.h
+ * specifiying __INLINE__, so bgclang thinks they are different enough
+ * to complain about. */
+static uint64_t Kernel_GetJobID();
+#endif
+#include <spi/include/kernel/location.h>
+
+static int bgq_nodenum(void)
+{
+ int hostnum;
+ Personality_t personality;
+ Kernel_GetPersonality(&personality, sizeof(personality));
+ /* Each MPI rank has a unique coordinate in a 6-dimensional space
+ (A,B,C,D,E,T), with dimensions A-E corresponding to different
+ physical nodes, and T within each node. Each node has sixteen
+ physical cores, each of which can have up to four hardware
+ threads, so 0 <= T <= 63 (but the maximum value of T depends on
+ the confituration of ranks and OpenMP threads per
+ node). However, T is irrelevant for computing a suitable return
+ value for gmx_hostname_num().
+ */
+ hostnum = personality.Network_Config.Acoord;
+ hostnum *= personality.Network_Config.Bnodes;
+ hostnum += personality.Network_Config.Bcoord;
+ hostnum *= personality.Network_Config.Cnodes;
+ hostnum += personality.Network_Config.Ccoord;
+ hostnum *= personality.Network_Config.Dnodes;
+ hostnum += personality.Network_Config.Dcoord;
+ hostnum *= personality.Network_Config.Enodes;
+ hostnum += personality.Network_Config.Ecoord;
+
+ if (debug)
+ {
+ std::fprintf(debug,
+ "Torus ID A: %d / %d B: %d / %d C: %d / %d D: %d / %d E: %d / %d\n"
+ "Node ID T: %d / %d core: %d / %d hardware thread: %d / %d\n",
+ personality.Network_Config.Acoord,
+ personality.Network_Config.Anodes,
+ personality.Network_Config.Bcoord,
+ personality.Network_Config.Bnodes,
+ personality.Network_Config.Ccoord,
+ personality.Network_Config.Cnodes,
+ personality.Network_Config.Dcoord,
+ personality.Network_Config.Dnodes,
+ personality.Network_Config.Ecoord,
+ personality.Network_Config.Enodes,
+ Kernel_ProcessorCoreID(),
+ 16,
+ Kernel_ProcessorID(),
+ 64,
+ Kernel_ProcessorThreadID(),
+ 4);
+ }
+ return hostnum;
+}
+#endif
+
+int gmx_physicalnode_id_hash(void)
+{
+ int hash;
+
+#ifndef GMX_MPI
+ hash = 0;
+#else
+#ifdef GMX_THREAD_MPI
+ /* thread-MPI currently puts the thread number in the process name,
+ * we might want to change this, as this is inconsistent with what
+ * most MPI implementations would do when running on a single node.
+ */
+ hash = 0;
+#else
+#ifdef GMX_TARGET_BGQ
+ hash = bgq_nodenum();
+#else
+ hash = mpi_hostname_hash();
+#endif
+#endif
+#endif
+
+ if (debug)
+ {
+ fprintf(debug, "In gmx_physicalnode_id_hash: hash %d\n", hash);
+ }
+
+ return hash;
+}
+
+#ifdef GMX_LIB_MPI
+void gmx_abort(int errorno)
+{
+ const char *programName = "GROMACS";
+ try
+ {
+ programName = gmx::getProgramContext().displayName();
+ }
+ catch (const std::exception &)
+ {
+ }
+ const int nnodes = gmx_node_num();
+ const int noderank = gmx_node_rank();
+ if (nnodes > 1)
+ {
+ std::fprintf(stderr, "Halting parallel program %s on rank %d out of %d\n",
+ programName, noderank, nnodes);
+ }
+ else
+ {
+ std::fprintf(stderr, "Halting program %s\n", programName);
+ }
+
+ MPI_Abort(MPI_COMM_WORLD, errorno);
+ std::exit(errorno);
+}
+#endif
* the research papers on the package. Check out http://www.gromacs.org.
*/
/* This file is completely threadsafe - keep it that way! */
+#include "gmxpre.h"
+
#include "cstringutil.h"
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "config.h"
#include <assert.h>
#include <ctype.h>
#include <unistd.h>
#endif
-#include "gromacs/legacyheaders/types/simple.h"
-#include "gromacs/legacyheaders/gmx_fatal.h"
-#include "gromacs/legacyheaders/main.h"
-
-#include "gromacs/fileio/futil.h"
+#include "gromacs/utility/basedefinitions.h"
+#include "gromacs/utility/basenetwork.h"
+#include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/futil.h"
#include "gromacs/utility/smalloc.h"
int continuing(char *s)
char *
gmx_ctime_r(const time_t *clock, char *buf, int n)
{
- char tmpbuf[STRLEN];
-
- #ifdef GMX_NATIVE_WINDOWS
+ #ifdef _MSC_VER
/* Windows */
- ctime_s( tmpbuf, STRLEN, clock );
+ ctime_s( buf, n, clock );
+ #elif defined(GMX_NATIVE_WINDOWS)
+ char *tmpbuf = ctime( clock );
+ strncpy(buf, tmpbuf, n-1);
+ buf[n-1] = '\0';
#elif (defined(__sun))
/*Solaris*/
- ctime_r(clock, tmpbuf, n);
+ ctime_r(clock, buf, n);
#else
+ char tmpbuf[STRLEN];
ctime_r(clock, tmpbuf);
- #endif
strncpy(buf, tmpbuf, n-1);
buf[n-1] = '\0';
-
+ #endif
return buf;
}
{
const char *unk = "onbekend";
time_t clock;
- const char *user = unk;
+ const char *user;
int gh;
#ifdef HAVE_PWD_H
uid_t uid;
/* pw returns null on error (e.g. compute nodes lack /etc/passwd) */
user = pw ? pw->pw_name : unk;
#else
- uid = 0;
- gh = -1;
+ uid = 0;
+ gh = -1;
+ user = unk;
#endif
gmx_ctime_r(&clock, timebuf, STRLEN);
#endif
}
+char *gmx_step_str(gmx_int64_t i, char *buf)
+{
+ sprintf(buf, "%"GMX_PRId64, i);
+ return buf;
+}
+
void parse_digits_from_plain_string(const char *digitstring, int *ndigits, int **digitlist)
{
int i;
* To help us fund GROMACS development, we humbly ask that you cite
* the research papers on the package. Check out http://www.gromacs.org.
*/
-#ifdef HAVE_CONFIG_H
+#include "gmxpre.h"
+
+#include "gromacs/utility/futil.h"
+
#include "config.h"
-#endif
#include <stdio.h>
#include <stdlib.h>
#endif
#ifdef GMX_NATIVE_WINDOWS
+ #include <windows.h>
#include <direct.h>
#include <io.h>
#endif
#include "thread_mpi/threads.h"
-#include "gromacs/legacyheaders/gmx_fatal.h"
-#include "gromacs/legacyheaders/types/commrec.h"
-#include "gromacs/legacyheaders/network.h"
-
-#include "gromacs/fileio/futil.h"
-#include "gromacs/fileio/path.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/exceptions.h"
+#include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/path.h"
#include "gromacs/utility/programcontext.h"
#include "gromacs/utility/smalloc.h"
#include "gromacs/utility/stringutil.h"
} t_pstack;
static t_pstack *pstack = NULL;
-static gmx_bool bUnbuffered = FALSE;
+static bool bUnbuffered = false;
/* this linked list is an intrinsically globally shared object, so we have
to protect it with mutexes */
static tMPI_Thread_mutex_t pstack_mutex = TMPI_THREAD_MUTEX_INITIALIZER;
-void no_buffers(void)
+void gmx_disable_file_buffering(void)
{
- bUnbuffered = TRUE;
+ bUnbuffered = true;
}
void push_ps(FILE *fp)
}
-#ifdef rewind
-#undef rewind
-#endif
-
void frewind(FILE *fp)
{
tMPI_Thread_mutex_lock(&pstack_mutex);
return ftello(stream);
#else
#ifdef HAVE__FSEEKI64
+ #ifndef __MINGW32__
return _ftelli64(stream);
+ #else
+ return ftello64(stream);
+ #endif
#else
return ftell(stream);
#endif
#endif
}
-
-gmx_bool is_pipe(FILE *fp)
-{
- tMPI_Thread_mutex_lock(&pstack_mutex);
-
- t_pstack *ps = pstack;
- while (ps != NULL)
- {
- if (ps->fp == fp)
- {
- tMPI_Thread_mutex_unlock(&pstack_mutex);
- return TRUE;
- }
- ps = ps->prev;
- }
- tMPI_Thread_mutex_unlock(&pstack_mutex);
- return FALSE;
-}
-
-
static FILE *uncompress(const char *fn, const char *mode)
{
FILE *fp;
}
}
-
-gmx_bool gmx_fexist_master(const char *fname, t_commrec *cr)
-{
- gmx_bool bExist;
-
- if (SIMMASTER(cr))
- {
- bExist = gmx_fexist(fname);
- }
- if (PAR(cr))
- {
- gmx_bcast(sizeof(bExist), &bExist, cr);
- }
- return bExist;
-}
-
-gmx_bool gmx_eof(FILE *fp)
-{
- char data[4];
- gmx_bool beof;
-
- if (is_pipe(fp))
- {
- return feof(fp);
- }
- else
- {
- if ((beof = fread(data, 1, 1, fp)) == 1)
- {
- gmx_fseek(fp, -1, SEEK_CUR);
- }
- return !beof;
- }
-}
-
static char *backup_fn(const char *file, int count_max)
{
/* Use a reasonably low value for countmax; we might
/* Our own implementation of dirent-like functionality to scan directories. */
struct gmx_directory
{
- #ifdef HAVE_DIRENT_H
- DIR * dirent_handle;
- #elif (defined GMX_NATIVE_WINDOWS)
+ #if defined(GMX_NATIVE_WINDOWS)
intptr_t windows_handle;
struct _finddata_t finddata;
int first;
+ #elif defined(HAVE_DIRENT_H)
+ DIR * dirent_handle;
#else
int dummy;
#endif
*p_gmxdir = gmxdir;
- #ifdef HAVE_DIRENT_H
- if ( (gmxdir->dirent_handle = opendir(dirname)) != NULL)
- {
- rc = 0;
- }
- else
- {
- sfree(gmxdir);
- *p_gmxdir = NULL;
- rc = EINVAL;
- }
- #elif (defined GMX_NATIVE_WINDOWS)
-
+ #if defined(GMX_NATIVE_WINDOWS)
if (dirname != NULL && strlen(dirname) > 0)
{
char * tmpname;
{
rc = EINVAL;
}
+ #elif defined(HAVE_DIRENT_H)
+ if ( (gmxdir->dirent_handle = opendir(dirname)) != NULL)
+ {
+ rc = 0;
+ }
+ else
+ {
+ sfree(gmxdir);
+ *p_gmxdir = NULL;
+ rc = EINVAL;
+ }
#else
gmx_fatal(FARGS,
"Source compiled without POSIX dirent or windows support - cannot scan directories.\n"
{
int rc;
- #ifdef HAVE_DIRENT_H
+ #if defined(GMX_NATIVE_WINDOWS)
+ if (gmxdir != NULL)
+ {
+ if (gmxdir->windows_handle <= 0)
+ {
+ name[0] = '\0';
+ rc = ENOENT;
+ }
+ else if (gmxdir->first == 1)
+ {
+ strncpy(name, gmxdir->finddata.name, maxlength_name);
+ rc = 0;
+ gmxdir->first = 0;
+ }
+ else
+ {
+ if (_findnext(gmxdir->windows_handle, &gmxdir->finddata) == 0)
+ {
+ strncpy(name, gmxdir->finddata.name, maxlength_name);
+ rc = 0;
+ }
+ else
+ {
+ name[0] = '\0';
+ rc = ENOENT;
+ }
+ }
+ }
+ else
+ {
+ name[0] = '\0';
+ rc = EINVAL;
+ }
+ #elif defined(HAVE_DIRENT_H)
struct dirent * direntp_large;
struct dirent * p;
name[0] = '\0';
rc = EINVAL;
}
-
- #elif (defined GMX_NATIVE_WINDOWS)
-
- if (gmxdir != NULL)
- {
- if (gmxdir->windows_handle <= 0)
- {
-
- name[0] = '\0';
- rc = ENOENT;
- }
- else if (gmxdir->first == 1)
- {
- strncpy(name, gmxdir->finddata.name, maxlength_name);
- rc = 0;
- gmxdir->first = 0;
- }
- else
- {
- if (_findnext(gmxdir->windows_handle, &gmxdir->finddata) == 0)
- {
- strncpy(name, gmxdir->finddata.name, maxlength_name);
- rc = 0;
- }
- else
- {
- name[0] = '\0';
- rc = ENOENT;
- }
- }
- }
-
#else
gmx_fatal(FARGS,
"Source compiled without POSIX dirent or windows support - cannot scan directories.\n");
gmx_directory_close(gmx_directory_t gmxdir)
{
int rc;
- #ifdef HAVE_DIRENT_H
- rc = (gmxdir != NULL) ? closedir(gmxdir->dirent_handle) : EINVAL;
- #elif (defined GMX_NATIVE_WINDOWS)
+ #if defined(GMX_NATIVE_WINDOWS)
rc = (gmxdir != NULL) ? _findclose(gmxdir->windows_handle) : EINVAL;
+ #elif defined(HAVE_DIRENT_H)
+ rc = (gmxdir != NULL) ? closedir(gmxdir->dirent_handle) : EINVAL;
#else
gmx_fatal(FARGS,
"Source compiled without POSIX dirent or windows support - cannot scan directories.\n");
/* name in Buf should now be OK */
}
-int gmx_truncatefile(char *path, gmx_off_t length)
-{
-#ifdef GMX_NATIVE_WINDOWS
- /* Microsoft visual studio does not have "truncate" */
- HANDLE fh;
- LARGE_INTEGER win_length;
-
- win_length.QuadPart = length;
-
- fh = CreateFile(path, GENERIC_READ | GENERIC_WRITE, 0, NULL,
- OPEN_EXISTING, 0, NULL);
- SetFilePointerEx(fh, win_length, NULL, FILE_BEGIN);
- SetEndOfFile(fh);
- CloseHandle(fh);
-
- return 0;
-#else
- return truncate(path, length);
-#endif
-}
-
-
int gmx_file_rename(const char *oldname, const char *newname)
{
#ifndef GMX_NATIVE_WINDOWS
rc = fah_fsync(fp);
#else /* GMX_FAHCORE */
{
- int fn = -1;
+ int fn;
/* get the file number */
#if defined(HAVE_FILENO)
fn = fileno(fp);
#elif defined(HAVE__FILENO)
fn = _fileno(fp);
+#else
+ fn = -1;
#endif
/* do the actual fsync */
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012, by the GROMACS development team, led by
+ * Copyright (c) 2012,2014, 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.
* \brief
* Include file for configuration macros that affect installed headers.
*
- * This include file (or rather, one that it includes) will configured by CMake
- * and installed with GROMACS header files so that they can refer to a central
- * location for \#defines that will be available for builds of projects that
- * depend on GROMACS.
- *
- * The actual defines are in gmx_header_config_gen.h to allow usage of relative
- * include paths before installation.
+ * This include file will be installed with GROMACS header files so that they
+ * can refer to a central location for \#defines that will be available for
+ * builds of projects that depend on GROMACS.
*
* \todo
- * It would be better to have the defines here such that they are not generated
- * from CMake, but instead detected using \#ifdefs (possible for some of the
- * macros currently used).
- * Even better would be to not have these defines at all.
+ * It would be better to not have these defines at all in installed headers.
*
* \inlibraryapi
* \ingroup module_utility
*/
-#include "gmx_header_config_gen.h"
+
- /* We currently don't support MingW. And ICC also defines it */
- #ifdef _MSC_VER
++#if defined( _WIN32 ) || defined( _WIN64 )
+#define GMX_NATIVE_WINDOWS
+#endif
#ifndef GMX_UTILITY_OMP_H
#define GMX_UTILITY_OMP_H
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+
+#include <stdio.h>
#ifndef GMX_NATIVE_WINDOWS
/* Ugly hack because the openmp implementation below hacks into the SIMD
#include <windows.h>
#endif
-#include "types/commrec.h"
-#include "mdrun.h"
+#include "basedefinitions.h"
#ifdef __cplusplus
extern "C"
/*! \brief
* Check for externally set thread affinity to avoid conflicts with \Gromacs
* internal setting.
+ *
+ * \param[out] message Receives the message to be shown to the user.
+ * \returns `true` if we can set thread affinity ourselves.
+ *
+ * While GNU OpenMP does not set affinity by default, the Intel OpenMP library
+ * does. This conflicts with the internal affinity (especially thread-MPI)
+ * setting, results in incorrectly locked threads, and causes dreadful performance.
+ *
+ * The KMP_AFFINITY environment variable is used by Intel, GOMP_CPU_AFFINITY
+ * by the GNU compilers (Intel also honors it well). If any of the variables
+ * is set, we should honor it and disable the internal pinning.
+ * When using Intel OpenMP, we will disable affinity if the user did not set it
+ * manually through one of the aforementioned environment variables.
+ *
+ * Note that the Intel OpenMP affinity disabling will only take effect if this
+ * function is called before the OpenMP library gets initialized, which happens
+ * when the first call is made into a compilation unit that contains OpenMP
+ * pragmas.
+ *
+ * If this function returns `false`, the caller is responsible to disable the
+ * pinning, show the message from \p *message to the user, and free the memory
+ * allocated for \p *message.
+ * If the return value is `true`, \p *message is NULL.
*/
-void gmx_omp_check_thread_affinity(FILE *fplog, const t_commrec *cr,
- gmx_hw_opt_t *hw_opt);
+gmx_bool gmx_omp_check_thread_affinity(char **message);
/*! \brief
* Pause for use in a spin-wait loop.
*/
static gmx_inline void gmx_pause()
{
- #ifndef GMX_NATIVE_WINDOWS
+ #ifndef _MSC_VER
/* Ugly hack because the openmp implementation below hacks into the SIMD
* settings to decide when to use _mm_pause(). This should eventually be
* changed into proper detection of the intrinsics uses, not SIMD.
*/
- #if (defined GMX_SIMD_X86_SSE2) || (defined GMX_SIMD_X86_SSE4_1) || \
+ #if ((defined GMX_SIMD_X86_SSE2) || (defined GMX_SIMD_X86_SSE4_1) || \
(defined GMX_SIMD_X86_AVX_128_FMA) || (defined GMX_SIMD_X86_AVX_256) || \
- (defined GMX_SIMD_X86_AVX2_256)
+ (defined GMX_SIMD_X86_AVX2_256)) && !defined(__MINGW32__)
/* Replace with tbb::internal::atomic_backoff when/if we use TBB */
_mm_pause();
#elif defined __MIC__
* To help us fund GROMACS development, we humbly ask that you cite
* the research papers on the package. Check out http://www.gromacs.org.
*/
+#include "gmxpre.h"
+
#include "gromacs/utility/smalloc.h"
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "config.h"
#include <errno.h>
#include <stdio.h>
#ifdef WITH_DMALLOC
#include <dmalloc.h>
#endif
+ #ifdef HAVE__ALIGNED_MALLOC
+ #include <malloc.h>
+ #endif
-#include "gromacs/legacyheaders/gmx_fatal.h"
+#include "thread_mpi/threads.h"
+#include "gromacs/utility/fatalerror.h"
#ifdef PRINT_ALLOC_KB
-#include "gromacs/legacyheaders/network.h"
+#include "gromacs/utility/basenetwork.h"
#include "gromacs/utility/gmxmpi.h"
#endif
-#ifdef DEBUG
-#include "thread_mpi/threads.h"
+static gmx_bool g_bOverAllocDD = FALSE;
+static tMPI_Thread_mutex_t g_over_alloc_mutex = TMPI_THREAD_MUTEX_INITIALIZER;
+#ifdef DEBUG
static void log_action(int bMal, const char *what, const char *file, int line,
int nelem, int size, void *ptr)
{
}
#endif
- allocate_fail = FALSE; /* stop compiler warnings */
#ifdef HAVE_POSIX_MEMALIGN
allocate_fail = (0 != posix_memalign(&malloced, alignment, nelem*elsize));
#elif defined HAVE_MEMALIGN
}
/* This routine can NOT be called with any pointer */
- void save_free_aligned(const char *name, const char *file, int line, void *ptr)
+ void save_free_aligned(const char gmx_unused *name, const char gmx_unused *file, int gmx_unused line, void *ptr)
{
int i, j;
void *free = ptr;
#endif
}
}
+
+void set_over_alloc_dd(gmx_bool set)
+{
+ tMPI_Thread_mutex_lock(&g_over_alloc_mutex);
+ /* we just make sure that we don't set this at the same time.
+ We don't worry too much about reading this rarely-set variable */
+ g_bOverAllocDD = set;
+ tMPI_Thread_mutex_unlock(&g_over_alloc_mutex);
+}
+
+int over_alloc_dd(int n)
+{
+ if (g_bOverAllocDD)
+ {
+ return OVER_ALLOC_FAC*n + 100;
+ }
+ else
+ {
+ return n;
+ }
+}
* \author Mark Abraham <mark.j.abraham@gmail.com>
* \ingroup module_testutils
*/
+#include "gmxpre.h"
+
#include "integrationtests.h"
#include "testutils/testoptions.h"
#include <stdlib.h>
#include <stdio.h>
+#include "config.h"
+
namespace gmx
{
namespace test
// TODO fix this when we have an encapsulation layer for handling
// environment variables
#ifdef GMX_NATIVE_WINDOWS
- _putenv_s("GMX_MAXBACKUP", s_maxBackup.c_str());
+ _putenv(("GMX_MAXBACKUP="+s_maxBackup).c_str());
#else
setenv("GMX_MAXBACKUP", s_maxBackup.c_str(), true);
#endif