sadasd
authorMax <Infinity2573@gmail.com>
Sat, 18 Dec 2021 00:33:39 +0000 (03:33 +0300)
committerMax <Infinity2573@gmail.com>
Sat, 18 Dec 2021 00:33:39 +0000 (03:33 +0300)
267 files changed:
CMakeLists.txt
cmake/FindGROMACS.cmake
src/dssp.cpp
src/include/gromacs/external/boost/stl_interfaces/fwd.hpp [deleted file]
src/include/gromacs/external/boost/stl_interfaces/iterator_interface.hpp [deleted file]
src/include/gromacs/external/clFFT/src/include/clAmdFft.h [deleted file]
src/include/gromacs/external/clFFT/src/include/clAmdFft.version.h [deleted file]
src/include/gromacs/external/clFFT/src/include/clFFT.h [deleted file]
src/include/gromacs/external/clFFT/src/include/clFFT.version.h [deleted file]
src/include/gromacs/external/clFFT/src/include/convenienceFunctions.h [deleted file]
src/include/gromacs/external/clFFT/src/include/sharedLibrary.h [deleted file]
src/include/gromacs/external/clFFT/src/include/stdafx.h [deleted file]
src/include/gromacs/external/clFFT/src/include/targetver.h [deleted file]
src/include/gromacs/external/clFFT/src/include/unicode.compatibility.h [deleted file]
src/include/gromacs/external/clFFT/src/library/action.h [deleted file]
src/include/gromacs/external/clFFT/src/library/action.transpose.h [deleted file]
src/include/gromacs/external/clFFT/src/library/fft_binary_lookup.h [deleted file]
src/include/gromacs/external/clFFT/src/library/generator.h [deleted file]
src/include/gromacs/external/clFFT/src/library/generator.stockham.h [deleted file]
src/include/gromacs/external/clFFT/src/library/generator.transpose.gcn.h [deleted file]
src/include/gromacs/external/clFFT/src/library/generator.transpose.h [deleted file]
src/include/gromacs/external/clFFT/src/library/lock.h [deleted file]
src/include/gromacs/external/clFFT/src/library/mainpage.h [deleted file]
src/include/gromacs/external/clFFT/src/library/md5sum.h [deleted file]
src/include/gromacs/external/clFFT/src/library/plan.h [deleted file]
src/include/gromacs/external/clFFT/src/library/private.h [deleted file]
src/include/gromacs/external/clFFT/src/library/repo.h [deleted file]
src/include/gromacs/external/clFFT/src/statTimer/statisticalTimer.CPU.h [deleted file]
src/include/gromacs/external/clFFT/src/statTimer/statisticalTimer.GPU.h [deleted file]
src/include/gromacs/external/clFFT/src/statTimer/statisticalTimer.extern.h [deleted file]
src/include/gromacs/external/clFFT/src/statTimer/statisticalTimer.h [deleted file]
src/include/gromacs/external/clFFT/src/statTimer/stdafx.h [deleted file]
src/include/gromacs/external/clFFT/src/statTimer/targetver.h [deleted file]
src/include/gromacs/external/fftpack/fftpack.h [deleted file]
src/include/gromacs/external/googletest/googlemock/include/gmock/gmock-actions.h [deleted file]
src/include/gromacs/external/googletest/googlemock/include/gmock/gmock-cardinalities.h [deleted file]
src/include/gromacs/external/googletest/googlemock/include/gmock/gmock-function-mocker.h [deleted file]
src/include/gromacs/external/googletest/googlemock/include/gmock/gmock-matchers.h [deleted file]
src/include/gromacs/external/googletest/googlemock/include/gmock/gmock-more-actions.h [deleted file]
src/include/gromacs/external/googletest/googlemock/include/gmock/gmock-more-matchers.h [deleted file]
src/include/gromacs/external/googletest/googlemock/include/gmock/gmock-nice-strict.h [deleted file]
src/include/gromacs/external/googletest/googlemock/include/gmock/gmock-spec-builders.h [deleted file]
src/include/gromacs/external/googletest/googlemock/include/gmock/gmock.h [deleted file]
src/include/gromacs/external/googletest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h [deleted file]
src/include/gromacs/external/googletest/googlemock/include/gmock/internal/custom/gmock-matchers.h [deleted file]
src/include/gromacs/external/googletest/googlemock/include/gmock/internal/custom/gmock-port.h [deleted file]
src/include/gromacs/external/googletest/googlemock/include/gmock/internal/gmock-internal-utils.h [deleted file]
src/include/gromacs/external/googletest/googlemock/include/gmock/internal/gmock-port.h [deleted file]
src/include/gromacs/external/googletest/googlemock/include/gmock/internal/gmock-pp.h [deleted file]
src/include/gromacs/external/googletest/googlemock/test/gmock_link_test.h [deleted file]
src/include/gromacs/external/googletest/googletest/include/gtest/gtest-death-test.h [deleted file]
src/include/gromacs/external/googletest/googletest/include/gtest/gtest-matchers.h [deleted file]
src/include/gromacs/external/googletest/googletest/include/gtest/gtest-message.h [deleted file]
src/include/gromacs/external/googletest/googletest/include/gtest/gtest-param-test.h [deleted file]
src/include/gromacs/external/googletest/googletest/include/gtest/gtest-printers.h [deleted file]
src/include/gromacs/external/googletest/googletest/include/gtest/gtest-spi.h [deleted file]
src/include/gromacs/external/googletest/googletest/include/gtest/gtest-test-part.h [deleted file]
src/include/gromacs/external/googletest/googletest/include/gtest/gtest-typed-test.h [deleted file]
src/include/gromacs/external/googletest/googletest/include/gtest/gtest.h [deleted file]
src/include/gromacs/external/googletest/googletest/include/gtest/gtest_pred_impl.h [deleted file]
src/include/gromacs/external/googletest/googletest/include/gtest/gtest_prod.h [deleted file]
src/include/gromacs/external/googletest/googletest/include/gtest/internal/custom/gtest-port.h [deleted file]
src/include/gromacs/external/googletest/googletest/include/gtest/internal/custom/gtest-printers.h [deleted file]
src/include/gromacs/external/googletest/googletest/include/gtest/internal/custom/gtest.h [deleted file]
src/include/gromacs/external/googletest/googletest/include/gtest/internal/gtest-death-test-internal.h [deleted file]
src/include/gromacs/external/googletest/googletest/include/gtest/internal/gtest-filepath.h [deleted file]
src/include/gromacs/external/googletest/googletest/include/gtest/internal/gtest-internal.h [deleted file]
src/include/gromacs/external/googletest/googletest/include/gtest/internal/gtest-param-util.h [deleted file]
src/include/gromacs/external/googletest/googletest/include/gtest/internal/gtest-port-arch.h [deleted file]
src/include/gromacs/external/googletest/googletest/include/gtest/internal/gtest-port.h [deleted file]
src/include/gromacs/external/googletest/googletest/include/gtest/internal/gtest-string.h [deleted file]
src/include/gromacs/external/googletest/googletest/include/gtest/internal/gtest-type-util.h [deleted file]
src/include/gromacs/external/googletest/googletest/samples/prime_tables.h [deleted file]
src/include/gromacs/external/googletest/googletest/samples/sample1.h [deleted file]
src/include/gromacs/external/googletest/googletest/samples/sample2.h [deleted file]
src/include/gromacs/external/googletest/googletest/samples/sample3-inl.h [deleted file]
src/include/gromacs/external/googletest/googletest/samples/sample4.h [deleted file]
src/include/gromacs/external/googletest/googletest/src/gtest-internal-inl.h [deleted file]
src/include/gromacs/external/googletest/googletest/test/googletest-param-test-test.h [deleted file]
src/include/gromacs/external/googletest/googletest/test/gtest-typed-test_test.h [deleted file]
src/include/gromacs/external/googletest/googletest/test/production.h [deleted file]
src/include/gromacs/external/lmfit/lmmin.h [deleted file]
src/include/gromacs/external/lmfit/lmstruct.h [deleted file]
src/include/gromacs/external/muparser/include/muParser.h [deleted file]
src/include/gromacs/external/muparser/include/muParserBase.h [deleted file]
src/include/gromacs/external/muparser/include/muParserBytecode.h [deleted file]
src/include/gromacs/external/muparser/include/muParserCallback.h [deleted file]
src/include/gromacs/external/muparser/include/muParserDLL.h [deleted file]
src/include/gromacs/external/muparser/include/muParserDef.h [deleted file]
src/include/gromacs/external/muparser/include/muParserError.h [deleted file]
src/include/gromacs/external/muparser/include/muParserFixes.h [deleted file]
src/include/gromacs/external/muparser/include/muParserInt.h [deleted file]
src/include/gromacs/external/muparser/include/muParserTemplateMagic.h [deleted file]
src/include/gromacs/external/muparser/include/muParserTest.h [deleted file]
src/include/gromacs/external/muparser/include/muParserToken.h [deleted file]
src/include/gromacs/external/muparser/include/muParserTokenReader.h [deleted file]
src/include/gromacs/external/thread_mpi/include/thread_mpi.h [deleted file]
src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic.h [deleted file]
src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/cce.h [deleted file]
src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/cce_intrinsics.h [deleted file]
src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/cce_spinlock.h [deleted file]
src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/cycles.h [deleted file]
src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/derived.h [deleted file]
src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/fujitsu_sparc64.h [deleted file]
src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/gcc.h [deleted file]
src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/gcc_ia64.h [deleted file]
src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/gcc_intrinsics.h [deleted file]
src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/gcc_ppc.h [deleted file]
src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/gcc_spinlock.h [deleted file]
src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/gcc_x86.h [deleted file]
src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/msvc.h [deleted file]
src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/suncc-sparc.h [deleted file]
src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/xlc_ppc.h [deleted file]
src/include/gromacs/external/thread_mpi/include/thread_mpi/barrier.h [deleted file]
src/include/gromacs/external/thread_mpi/include/thread_mpi/collective.h [deleted file]
src/include/gromacs/external/thread_mpi/include/thread_mpi/event.h [deleted file]
src/include/gromacs/external/thread_mpi/include/thread_mpi/hwinfo.h [deleted file]
src/include/gromacs/external/thread_mpi/include/thread_mpi/list.h [deleted file]
src/include/gromacs/external/thread_mpi/include/thread_mpi/lock.h [deleted file]
src/include/gromacs/external/thread_mpi/include/thread_mpi/mpi_bindings.h [deleted file]
src/include/gromacs/external/thread_mpi/include/thread_mpi/numa_malloc.h [deleted file]
src/include/gromacs/external/thread_mpi/include/thread_mpi/threads.h [deleted file]
src/include/gromacs/external/thread_mpi/include/thread_mpi/tmpi.h [deleted file]
src/include/gromacs/external/thread_mpi/include/thread_mpi/visibility.h [deleted file]
src/include/gromacs/external/thread_mpi/include/thread_mpi/wait.h [deleted file]
src/include/gromacs/external/thread_mpi/include/tmpi.h [deleted file]
src/include/gromacs/external/thread_mpi/src/collective.h [deleted file]
src/include/gromacs/external/thread_mpi/src/impl.h [deleted file]
src/include/gromacs/external/thread_mpi/src/p2p.h [deleted file]
src/include/gromacs/external/thread_mpi/src/profile.h [deleted file]
src/include/gromacs/external/thread_mpi/src/pthreads.h [deleted file]
src/include/gromacs/external/thread_mpi/src/settings.h [deleted file]
src/include/gromacs/external/thread_mpi/src/tmpi_ops.h [deleted file]
src/include/gromacs/external/thread_mpi/src/unused.h [deleted file]
src/include/gromacs/external/thread_mpi/src/winthreads.h [deleted file]
src/include/gromacs/external/tinyxml2/tinyxml2.h [deleted file]
src/include/gromacs/external/tng_io/external/zlib/crc32.h [deleted file]
src/include/gromacs/external/tng_io/external/zlib/deflate.h [deleted file]
src/include/gromacs/external/tng_io/external/zlib/inffast.h [deleted file]
src/include/gromacs/external/tng_io/external/zlib/inffixed.h [deleted file]
src/include/gromacs/external/tng_io/external/zlib/inflate.h [deleted file]
src/include/gromacs/external/tng_io/external/zlib/inftrees.h [deleted file]
src/include/gromacs/external/tng_io/external/zlib/trees.h [deleted file]
src/include/gromacs/external/tng_io/external/zlib/zconf.h [deleted file]
src/include/gromacs/external/tng_io/external/zlib/zlib.h [deleted file]
src/include/gromacs/external/tng_io/external/zlib/zutil.h [deleted file]
src/include/gromacs/external/tng_io/include/compression/bwlzh.h [deleted file]
src/include/gromacs/external/tng_io/include/compression/bwt.h [deleted file]
src/include/gromacs/external/tng_io/include/compression/coder.h [deleted file]
src/include/gromacs/external/tng_io/include/compression/dict.h [deleted file]
src/include/gromacs/external/tng_io/include/compression/fixpoint.h [deleted file]
src/include/gromacs/external/tng_io/include/compression/huffman.h [deleted file]
src/include/gromacs/external/tng_io/include/compression/lz77.h [deleted file]
src/include/gromacs/external/tng_io/include/compression/merge_sort.h [deleted file]
src/include/gromacs/external/tng_io/include/compression/mtf.h [deleted file]
src/include/gromacs/external/tng_io/include/compression/my64bit.h [deleted file]
src/include/gromacs/external/tng_io/include/compression/rle.h [deleted file]
src/include/gromacs/external/tng_io/include/compression/tng_compress.h [deleted file]
src/include/gromacs/external/tng_io/include/compression/vals16.h [deleted file]
src/include/gromacs/external/tng_io/include/compression/warnmalloc.h [deleted file]
src/include/gromacs/external/tng_io/include/compression/widemuldiv.h [deleted file]
src/include/gromacs/external/tng_io/include/tng/md5.h [deleted file]
src/include/gromacs/external/tng_io/include/tng/tng_io.h [deleted file]
src/include/gromacs/external/tng_io/include/tng/tng_io.hpp [deleted file]
src/include/gromacs/external/tng_io/include/tng/tng_io_fwd.h [deleted file]
src/include/gromacs/external/tng_io/include/tng/version.h.in [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test1.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test10.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test11.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test12.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test13.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test14.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test15.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test16.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test17.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test18.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test19.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test2.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test20.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test21.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test22.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test23.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test24.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test25.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test26.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test27.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test28.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test29.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test3.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test30.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test31.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test32.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test33.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test34.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test35.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test36.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test37.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test38.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test39.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test4.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test40.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test41.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test42.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test43.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test44.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test45.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test46.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test47.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test48.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test49.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test5.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test50.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test51.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test52.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test53.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test54.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test55.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test56.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test57.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test58.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test59.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test6.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test60.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test61.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test62.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test63.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test64.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test65.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test66.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test67.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test68.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test69.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test7.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test70.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test71.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test72.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test73.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test74.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test75.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test76.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test77.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test78.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test8.h [deleted file]
src/include/gromacs/external/tng_io/src/tests/compression/test9.h [deleted file]
src/include/gromacs/external/vmd_molfile/molfile_plugin.h [deleted file]
src/include/gromacs/external/vmd_molfile/vmddlopen.h [deleted file]
src/include/gromacs/external/vmd_molfile/vmdplugin.h [deleted file]
src/include/gromacs/fileio/confio.h [deleted file]
src/include/gromacs/fileio/filetypes.h [deleted file]
src/include/gromacs/fileio/oenv.h [deleted file]
src/include/gromacs/fileio/pdbio.h [deleted file]
src/include/gromacs/fileio/tpxio.h [deleted file]
src/include/gromacs/fileio/trxio.h [deleted file]
src/include/gromacs/math/do_fit.h [deleted file]
src/include/gromacs/math/functions.h [deleted file]
src/include/gromacs/math/units.h [deleted file]
src/include/gromacs/math/utilities.h [deleted file]
src/include/gromacs/math/vec.h [deleted file]
src/include/gromacs/math/vectypes.h [deleted file]
src/include/gromacs/restraint/restraintpotential.h [deleted file]
src/include/gromacs/utility/arrayref.h [deleted file]
src/include/gromacs/utility/basedefinitions.h [deleted file]
src/include/gromacs/utility/current_function.h [deleted file]
src/include/gromacs/utility/exceptions.h [deleted file]
src/include/gromacs/utility/gmxassert.h [deleted file]
src/include/gromacs/utility/listoflists.h [deleted file]
src/include/gromacs/utility/real.h [deleted file]

index 33536f62c2ec4bb981aea7ca7b77692d1a93fb09..14405a0572835554ab9283d88b24c5957005a5ad 100644 (file)
@@ -28,7 +28,7 @@ else()
     set(GROMACS_SUFFIX ${GMX_SUFFIX})
 endif()
 
-find_package(GROMACS 2022 REQUIRED)
+find_package(GROMACS REQUIRED)
 gromacs_check_double(GMX_DOUBLE)
 gromacs_check_compiler(CXX)
 
index 1b7a94c9483e9685ad1218380961531ab6f00700..908b5c8ae9b2f7405eb3742d0ff9ef4da1dfb288 100644 (file)
 
 # Propagate all flags passed to parent find_package() to the config call below.
 
-#set(GROMACS_DIR "/usr/local/gromacs/share/cmake/gromacs/")
-set(GROMACS_DIR "/home/max/GROMACS/gromacs-2022-beta2/build/src/gromacs/")
+#set(GROMACS_DIR "/home/max/GROMACS/gromacs-2022-beta2/build/src/gromacs/")
 #set(GROMACS_DIR "/home/max/GROMACS/gromacs libs/share/cmake/gromacs/")
 
-#set(GROMACS_DIR "/usr/local/gromacs/share/cmake")
-#set(GROMACS_DIR "/home/max/gromacs-2021.3/build/src/gromacs/")
-#set(GROMACS_DIR "/home/max/gromacs-2022-beta1/build/src/gromacs/")
-#set(GROMACS_DIR "/home/max/gromacs-2022-beta1/build/src/gromacs/CMakeFiles/Export/share/cmake/gromacs/")
-
 set(_gmx_find_args "")
 if (GROMACS_FIND_VERSION)
     if (GROMACS_FIND_VERSION VERSION_LESS "5.1")
index 186d57b19df3514173ee2f6fbd8c8d80f2411d47..ff86a1a5b2c715f19fec0cceaf64ebcd2c9273e1 100644 (file)
@@ -51,9 +51,9 @@
 #include "gromacs/selection/nbsearch.h"
 #include "gromacs/analysisdata/modules/average.h"
 #include "gromacs/analysisdata/modules/plot.h"
-#include "gromacs/fileio/pdbio.h"
-#include "gromacs/math/units.h"
-#include "gromacs/math/vec.h"
+#include "../api/legacy/include/gromacs/fileio/pdbio.h"
+#include "../api/legacy/include/gromacs/math/units.h"
+#include "../api/legacy/include/gromacs/math/vec.h"
 #include "gromacs/options/basicoptions.h"
 #include "gromacs/options/ioptionscontainer.h"
 #include "gromacs/pbcutil/pbc.h"
@@ -67,7 +67,7 @@
 #include "gromacs/utility/pleasecite.h"
 #include "gromacs/utility/smalloc.h"
 #include "gromacs/utility/stringutil.h"
-#include "gromacs/fileio/trxio.h"
+#include "../api/legacy/include/gromacs/fileio/trxio.h"
 #include <set>
 #include <fstream>
 
diff --git a/src/include/gromacs/external/boost/stl_interfaces/fwd.hpp b/src/include/gromacs/external/boost/stl_interfaces/fwd.hpp
deleted file mode 100644 (file)
index aa2f478..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright (C) 2019 T. Zachary Laine
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-#ifndef BOOST_STL_INTERFACES_FWD_HPP
-#define BOOST_STL_INTERFACES_FWD_HPP
-
-#include <iterator>
-
-#ifndef BOOST_STL_INTERFACES_DOXYGEN
-
-// It is not known whether intel has fixed this issue, but it was
-// observed to be present in icc 19.1.2.20200623. Update the version
-// check when it is fixed.
-#if defined(_MSC_VER) || defined(__GNUC__) && __GNUC__ < 8 || defined(__INTEL_COMPILER) && __INTEL_COMPILER < 1920
-#define BOOST_STL_INTERFACES_NO_HIDDEN_FRIEND_CONSTEXPR
-#define BOOST_STL_INTERFACES_HIDDEN_FRIEND_CONSTEXPR
-#else
-#define BOOST_STL_INTERFACES_HIDDEN_FRIEND_CONSTEXPR constexpr
-#endif
-
-#if defined(__GNUC__) && __GNUC__ < 9
-#define BOOST_STL_INTERFACES_CONCEPT concept bool
-#else
-#define BOOST_STL_INTERFACES_CONCEPT concept
-#endif
-
-#endif
-
-
-namespace boost { namespace stl_interfaces {
-    inline namespace v1 {
-
-        /** An enumeration used to indicate whether the underlying data have a
-            contiguous or discontiguous layout when instantiating
-            `view_interface` and `sequence_container_interface`. */
-        enum class element_layout : bool {
-            discontiguous = false,
-            contiguous = true
-        };
-
-        namespace v1_dtl {
-            template<typename... T>
-            using void_t = void;
-
-            template<typename Iter>
-            using iter_difference_t =
-                typename std::iterator_traits<Iter>::difference_type;
-
-            template<typename Range, typename = void>
-            struct iterator;
-            template<typename Range>
-            struct iterator<
-                Range,
-                void_t<decltype(std::declval<Range &>().begin())>>
-            {
-                using type = decltype(std::declval<Range &>().begin());
-            };
-            template<typename Range>
-            using iterator_t = typename iterator<Range>::type;
-
-            template<typename Range, typename = void>
-            struct sentinel;
-            template<typename Range>
-            struct sentinel<
-                Range,
-                void_t<decltype(std::declval<Range &>().end())>>
-            {
-                using type = decltype(std::declval<Range &>().end());
-            };
-            template<typename Range>
-            using sentinel_t = typename sentinel<Range>::type;
-
-            template<typename Range>
-            using range_difference_t = iter_difference_t<iterator_t<Range>>;
-
-            template<typename Range>
-            using common_range =
-                std::is_same<iterator_t<Range>, sentinel_t<Range>>;
-
-            template<typename Range, typename = void>
-            struct decrementable_sentinel : std::false_type
-            {
-            };
-            template<typename Range>
-            struct decrementable_sentinel<
-                Range,
-                void_t<decltype(--std::declval<sentinel_t<Range> &>())>>
-                : std::true_type
-            {
-            };
-        }
-
-    }
-}}
-
-#endif
diff --git a/src/include/gromacs/external/boost/stl_interfaces/iterator_interface.hpp b/src/include/gromacs/external/boost/stl_interfaces/iterator_interface.hpp
deleted file mode 100644 (file)
index 5f39619..0000000
+++ /dev/null
@@ -1,623 +0,0 @@
-// Copyright (C) 2019 T. Zachary Laine
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-#ifndef BOOST_STL_INTERFACES_ITERATOR_INTERFACE_HPP
-#define BOOST_STL_INTERFACES_ITERATOR_INTERFACE_HPP
-
-#include "./fwd.hpp"
-
-#include <utility>
-#include <type_traits>
-#if defined(__cpp_lib_three_way_comparison)
-#include <compare>
-#endif
-
-
-namespace boost { namespace stl_interfaces {
-
-    /** A type for granting access to the private members of an iterator
-        derived from `iterator_interface`. */
-    struct access
-    {
-#ifndef BOOST_STL_INTERFACES_DOXYGEN
-
-        template<typename D>
-        static constexpr auto base(D & d) noexcept
-            -> decltype(d.base_reference())
-        {
-            return d.base_reference();
-        }
-        template<typename D>
-        static constexpr auto base(D const & d) noexcept
-            -> decltype(d.base_reference())
-        {
-            return d.base_reference();
-        }
-
-#endif
-    };
-
-    /** The return type of `operator->()` in a proxy iterator.
-
-        This template is used as the default `Pointer` template parameter in
-        the `proxy_iterator_interface` template alias.  Note that the use of
-        this template implies a copy or move of the underlying object of type
-        `T`. */
-    template<typename T>
-    struct proxy_arrow_result
-    {
-        constexpr proxy_arrow_result(T const & value) noexcept(
-            noexcept(T(value))) :
-            value_(value)
-        {}
-        constexpr proxy_arrow_result(T && value) noexcept(
-            noexcept(T(std::move(value)))) :
-            value_(std::move(value))
-        {}
-
-        constexpr T const * operator->() const noexcept { return &value_; }
-        constexpr T * operator->() noexcept { return &value_; }
-
-    private:
-        T value_;
-    };
-
-    namespace detail {
-        template<typename Pointer, typename T>
-        auto make_pointer(
-            T && value,
-            std::enable_if_t<std::is_pointer<Pointer>::value, int> = 0)
-            -> decltype(std::addressof(value))
-        {
-            return std::addressof(value);
-        }
-
-        template<typename Pointer, typename T>
-        auto make_pointer(
-            T && value,
-            std::enable_if_t<!std::is_pointer<Pointer>::value, int> = 0)
-        {
-            return Pointer(std::forward<T>(value));
-        }
-
-        template<typename IteratorConcept>
-        struct concept_category
-        {
-            using type = IteratorConcept;
-        };
-        template<typename IteratorConcept>
-        using concept_category_t =
-            typename concept_category<IteratorConcept>::type;
-
-        template<typename Pointer, typename IteratorConcept>
-        struct pointer
-        {
-            using type = Pointer;
-        };
-        template<typename Pointer>
-        struct pointer<Pointer, std::output_iterator_tag>
-        {
-            using type = void;
-        };
-        template<typename Pointer, typename IteratorConcept>
-        using pointer_t = typename pointer<Pointer, IteratorConcept>::type;
-
-        template<typename T, typename U>
-        using interoperable = std::integral_constant<
-            bool,
-            (std::is_convertible<T, U>::value ||
-             std::is_convertible<U, T>::value)>;
-
-        template<typename T, typename U>
-        using common_t =
-            std::conditional_t<std::is_convertible<T, U>::value, U, T>;
-
-        template<typename T>
-        using use_base = decltype(access::base(std::declval<T &>()));
-
-        template<typename... T>
-        using void_t = void;
-
-        template<
-            typename AlwaysVoid,
-            template<class...> class Template,
-            typename... Args>
-        struct detector : std::false_type
-        {
-        };
-
-        template<template<class...> class Template, typename... Args>
-        struct detector<void_t<Template<Args...>>, Template, Args...>
-            : std::true_type
-        {
-        };
-
-        template<
-            typename T,
-            typename U,
-            bool UseBase = detector<void, use_base, T>::value>
-        struct common_eq
-        {
-            static constexpr auto call(T lhs, U rhs)
-            {
-                return static_cast<common_t<T, U>>(lhs).derived() ==
-                       static_cast<common_t<T, U>>(rhs).derived();
-            }
-        };
-        template<typename T, typename U>
-        struct common_eq<T, U, true>
-        {
-            static constexpr auto call(T lhs, U rhs)
-            {
-                return access::base(lhs) == access::base(rhs);
-            }
-        };
-
-        template<typename T, typename U>
-        constexpr auto common_diff(T lhs, U rhs) noexcept(noexcept(
-            static_cast<common_t<T, U>>(lhs) -
-            static_cast<common_t<T, U>>(rhs)))
-            -> decltype(
-                static_cast<common_t<T, U>>(lhs) -
-                static_cast<common_t<T, U>>(rhs))
-        {
-            return static_cast<common_t<T, U>>(lhs) -
-                   static_cast<common_t<T, U>>(rhs);
-        }
-    }
-
-}}
-
-namespace boost { namespace stl_interfaces { inline namespace v1 {
-
-    /** A CRTP template that one may derive from to make defining iterators
-        easier.
-
-        The template parameter `D` for `iterator_interface` may be an
-        incomplete type.  Before any member of the resulting specialization of
-        `iterator_interface` other than special member functions is
-        referenced, `D` shall be complete, and model
-        `std::derived_from<iterator_interface<D>>`. */
-    template<
-        typename Derived,
-        typename IteratorConcept,
-        typename ValueType,
-        typename Reference = ValueType &,
-        typename Pointer = ValueType *,
-        typename DifferenceType = std::ptrdiff_t
-#ifndef BOOST_STL_INTERFACES_DOXYGEN
-        ,
-        typename E = std::enable_if_t<
-            std::is_class<Derived>::value &&
-            std::is_same<Derived, std::remove_cv_t<Derived>>::value>
-#endif
-        >
-    struct iterator_interface;
-
-    namespace v1_dtl {
-        template<typename Iterator, typename = void>
-        struct ra_iter : std::false_type
-        {
-        };
-        template<typename Iterator>
-        struct ra_iter<Iterator, void_t<typename Iterator::iterator_concept>>
-            : std::integral_constant<
-                  bool,
-                  std::is_base_of<
-                      std::random_access_iterator_tag,
-                      typename Iterator::iterator_concept>::value>
-        {
-        };
-
-        template<typename Iterator, typename DifferenceType, typename = void>
-        struct plus_eq : std::false_type
-        {
-        };
-        template<typename Iterator, typename DifferenceType>
-        struct plus_eq<
-            Iterator,
-            DifferenceType,
-            void_t<decltype(
-                std::declval<Iterator &>() += std::declval<DifferenceType>())>>
-            : std::true_type
-        {
-        };
-
-        template<
-            typename D,
-            typename IteratorConcept,
-            typename ValueType,
-            typename Reference,
-            typename Pointer,
-            typename DifferenceType>
-        void derived_iterator(iterator_interface<
-                              D,
-                              IteratorConcept,
-                              ValueType,
-                              Reference,
-                              Pointer,
-                              DifferenceType> const &);
-    }
-
-    template<
-        typename Derived,
-        typename IteratorConcept,
-        typename ValueType,
-        typename Reference,
-        typename Pointer,
-        typename DifferenceType
-#ifndef BOOST_STL_INTERFACES_DOXYGEN
-        ,
-        typename E
-#endif
-        >
-    struct iterator_interface
-    {
-#ifndef BOOST_STL_INTERFACES_DOXYGEN
-    private:
-        constexpr Derived & derived() noexcept
-        {
-            return static_cast<Derived &>(*this);
-        }
-        constexpr Derived const & derived() const noexcept
-        {
-            return static_cast<Derived const &>(*this);
-        }
-
-        template<typename T, typename U, bool UseBase>
-        friend struct detail::common_eq;
-#endif
-
-    public:
-        using iterator_concept = IteratorConcept;
-        using iterator_category = detail::concept_category_t<iterator_concept>;
-        using value_type = std::remove_const_t<ValueType>;
-        using reference = Reference;
-        using pointer = detail::pointer_t<Pointer, iterator_concept>;
-        using difference_type = DifferenceType;
-
-        template<typename D = Derived>
-        constexpr auto operator*() const
-            noexcept(noexcept(*access::base(std::declval<D const &>())))
-                -> decltype(*access::base(std::declval<D const &>()))
-        {
-            return *access::base(derived());
-        }
-
-        template<typename D = Derived>
-        constexpr auto operator-> () const noexcept(
-            noexcept(detail::make_pointer<pointer>(*std::declval<D const &>())))
-            -> decltype(
-                detail::make_pointer<pointer>(*std::declval<D const &>()))
-        {
-            return detail::make_pointer<pointer>(*derived());
-        }
-
-        template<typename D = Derived>
-        constexpr auto operator[](difference_type i) const noexcept(noexcept(
-            D(std::declval<D const &>()),
-            std::declval<D &>() += i,
-            *std::declval<D &>()))
-            -> decltype(std::declval<D &>() += i, *std::declval<D &>())
-        {
-            D retval = derived();
-            retval += i;
-            return *retval;
-        }
-
-        template<
-            typename D = Derived,
-            typename Enable =
-                std::enable_if_t<!v1_dtl::plus_eq<D, difference_type>::value>>
-        constexpr auto
-        operator++() noexcept(noexcept(++access::base(std::declval<D &>())))
-            -> decltype(++access::base(std::declval<D &>()))
-        {
-            return ++access::base(derived());
-        }
-
-        template<typename D = Derived>
-        constexpr auto operator++() noexcept(
-            noexcept(std::declval<D &>() += difference_type(1)))
-            -> decltype(
-                std::declval<D &>() += difference_type(1), std::declval<D &>())
-        {
-            derived() += difference_type(1);
-            return derived();
-        }
-        template<typename D = Derived>
-        constexpr auto operator++(int)noexcept(
-            noexcept(D(std::declval<D &>()), ++std::declval<D &>()))
-            -> std::remove_reference_t<decltype(
-                D(std::declval<D &>()),
-                ++std::declval<D &>(),
-                std::declval<D &>())>
-        {
-            D retval = derived();
-            ++derived();
-            return retval;
-        }
-
-        template<typename D = Derived>
-        constexpr auto operator+=(difference_type n) noexcept(
-            noexcept(access::base(std::declval<D &>()) += n))
-            -> decltype(access::base(std::declval<D &>()) += n)
-        {
-            return access::base(derived()) += n;
-        }
-
-        template<typename D = Derived>
-        constexpr auto operator+(difference_type i) const
-            noexcept(noexcept(D(std::declval<D &>()), std::declval<D &>() += i))
-                -> std::remove_reference_t<decltype(
-                    D(std::declval<D &>()),
-                    std::declval<D &>() += i,
-                    std::declval<D &>())>
-        {
-            D retval = derived();
-            retval += i;
-            return retval;
-        }
-        friend BOOST_STL_INTERFACES_HIDDEN_FRIEND_CONSTEXPR Derived
-        operator+(difference_type i, Derived it) noexcept
-        {
-            return it + i;
-        }
-
-        template<
-            typename D = Derived,
-            typename Enable =
-                std::enable_if_t<!v1_dtl::plus_eq<D, difference_type>::value>>
-        constexpr auto
-        operator--() noexcept(noexcept(--access::base(std::declval<D &>())))
-            -> decltype(--access::base(std::declval<D &>()))
-        {
-            return --access::base(derived());
-        }
-
-        template<typename D = Derived>
-        constexpr auto operator--() noexcept(noexcept(
-            D(std::declval<D &>()), std::declval<D &>() += -difference_type(1)))
-            -> decltype(
-                std::declval<D &>() += -difference_type(1), std::declval<D &>())
-        {
-            derived() += -difference_type(1);
-            return derived();
-        }
-        template<typename D = Derived>
-        constexpr auto operator--(int)noexcept(
-            noexcept(D(std::declval<D &>()), --std::declval<D &>()))
-            -> std::remove_reference_t<decltype(
-                D(std::declval<D &>()),
-                --std::declval<D &>(),
-                std::declval<D &>())>
-        {
-            D retval = derived();
-            --derived();
-            return retval;
-        }
-
-        template<typename D = Derived>
-        constexpr D & operator-=(difference_type i) noexcept
-        {
-            derived() += -i;
-            return derived();
-        }
-
-        template<typename D = Derived>
-        constexpr auto operator-(D other) const noexcept(noexcept(
-            access::base(std::declval<D const &>()) - access::base(other)))
-            -> decltype(
-                access::base(std::declval<D const &>()) - access::base(other))
-        {
-            return access::base(derived()) - access::base(other);
-        }
-
-        friend BOOST_STL_INTERFACES_HIDDEN_FRIEND_CONSTEXPR Derived
-        operator-(Derived it, difference_type i) noexcept
-        {
-            Derived retval = it;
-            retval += -i;
-            return retval;
-        }
-    };
-
-    /** Implementation of `operator==()`, implemented in terms of the iterator
-        underlying IteratorInterface, for all iterators derived from
-        `iterator_interface`, except those with an iterator category derived
-        from `std::random_access_iterator_tag`.  */
-    template<
-        typename IteratorInterface1,
-        typename IteratorInterface2,
-        typename Enable =
-            std::enable_if_t<!v1_dtl::ra_iter<IteratorInterface1>::value>>
-    constexpr auto
-    operator==(IteratorInterface1 lhs, IteratorInterface2 rhs) noexcept
-        -> decltype(
-            access::base(std::declval<IteratorInterface1 &>()) ==
-            access::base(std::declval<IteratorInterface2 &>()))
-    {
-        return access::base(lhs) == access::base(rhs);
-    }
-
-    /** Implementation of `operator==()` for all iterators derived from
-        `iterator_interface` that have an iterator category derived from
-        `std::random_access_iterator_tag`.  */
-    template<
-        typename IteratorInterface1,
-        typename IteratorInterface2,
-        typename Enable =
-            std::enable_if_t<v1_dtl::ra_iter<IteratorInterface1>::value>>
-    constexpr auto
-    operator==(IteratorInterface1 lhs, IteratorInterface2 rhs) noexcept(
-        noexcept(detail::common_diff(lhs, rhs)))
-        -> decltype(
-            v1_dtl::derived_iterator(lhs), detail::common_diff(lhs, rhs) == 0)
-    {
-        return detail::common_diff(lhs, rhs) == 0;
-    }
-
-    /** Implementation of `operator!=()` for all iterators derived from
-        `iterator_interface`.  */
-    template<typename IteratorInterface1, typename IteratorInterface2>
-    constexpr auto operator!=(
-        IteratorInterface1 lhs,
-        IteratorInterface2 rhs) noexcept(noexcept(!(lhs == rhs)))
-        -> decltype(v1_dtl::derived_iterator(lhs), !(lhs == rhs))
-    {
-        return !(lhs == rhs);
-    }
-
-    /** Implementation of `operator<()` for all iterators derived from
-        `iterator_interface` that have an iterator category derived from
-        `std::random_access_iterator_tag`.  */
-    template<typename IteratorInterface1, typename IteratorInterface2>
-    constexpr auto
-    operator<(IteratorInterface1 lhs, IteratorInterface2 rhs) noexcept(
-        noexcept(detail::common_diff(lhs, rhs)))
-        -> decltype(
-            v1_dtl::derived_iterator(lhs), detail::common_diff(lhs, rhs) < 0)
-    {
-        return detail::common_diff(lhs, rhs) < 0;
-    }
-
-    /** Implementation of `operator<=()` for all iterators derived from
-        `iterator_interface` that have an iterator category derived from
-        `std::random_access_iterator_tag`.  */
-    template<typename IteratorInterface1, typename IteratorInterface2>
-    constexpr auto
-    operator<=(IteratorInterface1 lhs, IteratorInterface2 rhs) noexcept(
-        noexcept(detail::common_diff(lhs, rhs)))
-        -> decltype(
-            v1_dtl::derived_iterator(lhs), detail::common_diff(lhs, rhs) <= 0)
-    {
-        return detail::common_diff(lhs, rhs) <= 0;
-    }
-
-    /** Implementation of `operator>()` for all iterators derived from
-        `iterator_interface` that have an iterator category derived from
-        `std::random_access_iterator_tag`.  */
-    template<typename IteratorInterface1, typename IteratorInterface2>
-    constexpr auto
-    operator>(IteratorInterface1 lhs, IteratorInterface2 rhs) noexcept(
-        noexcept(detail::common_diff(lhs, rhs)))
-        -> decltype(
-            v1_dtl::derived_iterator(lhs), detail::common_diff(lhs, rhs) > 0)
-    {
-        return detail::common_diff(lhs, rhs) > 0;
-    }
-
-    /** Implementation of `operator>=()` for all iterators derived from
-        `iterator_interface` that have an iterator category derived from
-        `std::random_access_iterator_tag`.  */
-    template<typename IteratorInterface1, typename IteratorInterface2>
-    constexpr auto
-    operator>=(IteratorInterface1 lhs, IteratorInterface2 rhs) noexcept(
-        noexcept(detail::common_diff(lhs, rhs)))
-        -> decltype(
-            v1_dtl::derived_iterator(lhs), detail::common_diff(lhs, rhs) >= 0)
-    {
-        return detail::common_diff(lhs, rhs) >= 0;
-    }
-
-
-    /** A template alias useful for defining proxy iterators.  \see
-        `iterator_interface`. */
-    template<
-        typename Derived,
-        typename IteratorConcept,
-        typename ValueType,
-        typename Reference = ValueType,
-        typename DifferenceType = std::ptrdiff_t>
-    using proxy_iterator_interface = iterator_interface<
-        Derived,
-        IteratorConcept,
-        ValueType,
-        Reference,
-        proxy_arrow_result<Reference>,
-        DifferenceType>;
-
-}}}
-
-#ifdef BOOST_STL_INTERFACES_DOXYGEN
-
-/** `static_asserts` that type `type` models concept `concept_name`.  This is
-    useful for checking that an iterator, view, etc. that you write using one
-    of the *`_interface` templates models the right C++ concept.
-
-    For example: `BOOST_STL_INTERFACES_STATIC_ASSERT_CONCEPT(my_iter,
-    std::input_iterator)`.
-
-    \note This macro expands to nothing when `__cpp_lib_concepts` is not
-    defined. */
-#define BOOST_STL_INTERFACES_STATIC_ASSERT_CONCEPT(type, concept_name)
-
-/** `static_asserts` that the types of all typedefs in
-    `std::iterator_traits<iter>` match the remaining macro parameters.  This
-    is useful for checking that an iterator you write using
-    `iterator_interface` has the correct iterator traits.
-
-    For example: `BOOST_STL_INTERFACES_STATIC_ASSERT_ITERATOR_TRAITS(my_iter,
-    std::input_iterator_tag, std::input_iterator_tag, int, int &, int *, std::ptrdiff_t)`.
-
-    \note This macro ignores the `concept` parameter when `__cpp_lib_concepts`
-    is not defined. */
-#define BOOST_STL_INTERFACES_STATIC_ASSERT_ITERATOR_TRAITS(                    \
-    iter, category, concept, value_type, reference, pointer, difference_type)
-
-#else
-
-#define BOOST_STL_INTERFACES_STATIC_ASSERT_ITERATOR_CONCEPT_IMPL(              \
-    type, concept_name)                                                        \
-    static_assert(concept_name<type>, "");
-
-#define BOOST_STL_INTERFACES_STATIC_ASSERT_CONCEPT(iter, concept_name)
-
-#define BOOST_STL_INTERFACES_STATIC_ASSERT_ITERATOR_TRAITS_IMPL(               \
-    iter, category, value_t, ref, ptr, diff_t)                                 \
-    static_assert(                                                             \
-        std::is_same<                                                          \
-            typename std::iterator_traits<iter>::iterator_category,            \
-            category>::value,                                                  \
-        "");                                                                   \
-    static_assert(                                                             \
-        std::is_same<                                                          \
-            typename std::iterator_traits<iter>::value_type,                   \
-            value_t>::value,                                                   \
-        "");                                                                   \
-    static_assert(                                                             \
-        std::is_same<typename std::iterator_traits<iter>::reference, ref>::    \
-            value,                                                             \
-        "");                                                                   \
-    static_assert(                                                             \
-        std::is_same<typename std::iterator_traits<iter>::pointer, ptr>::      \
-            value,                                                             \
-        "");                                                                   \
-    static_assert(                                                             \
-        std::is_same<                                                          \
-            typename std::iterator_traits<iter>::difference_type,              \
-            diff_t>::value,                                                    \
-        "");
-
-#if 201703L < __cplusplus && defined(__cpp_lib_ranges)
-#define BOOST_STL_INTERFACES_STATIC_ASSERT_ITERATOR_TRAITS(                    \
-    iter, category, concept, value_type, reference, pointer, difference_type)  \
-    static_assert(                                                             \
-        std::is_same<                                                          \
-            typename std::iterator_traits<iter>::iterator_concept,             \
-            concept>::value,                                                   \
-        "");                                                                   \
-    BOOST_STL_INTERFACES_STATIC_ASSERT_ITERATOR_TRAITS_IMPL(                   \
-        iter, category, value_type, reference, pointer, difference_type)
-#else
-#define BOOST_STL_INTERFACES_STATIC_ASSERT_ITERATOR_TRAITS(                    \
-    iter, category, concept, value_type, reference, pointer, difference_type)  \
-    BOOST_STL_INTERFACES_STATIC_ASSERT_ITERATOR_TRAITS_IMPL(                   \
-        iter, category, value_type, reference, pointer, difference_type)
-#endif
-
-#endif
-
-#endif
diff --git a/src/include/gromacs/external/clFFT/src/include/clAmdFft.h b/src/include/gromacs/external/clFFT/src/include/clAmdFft.h
deleted file mode 100644 (file)
index 848d076..0000000
+++ /dev/null
@@ -1,535 +0,0 @@
-/* ************************************************************************
- * Copyright 2013 Advanced Micro Devices, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ************************************************************************/
-
-
-/*! @file clAmdFft.h
- * /note clAmdFft.h is a deprecated header file.  
- * This header is provided to help projects that were written with the older clAmdFft codebase, to help them 
- * port to the new API at their own schedule.  It will not be maintained or updated, and will be removed after 
- * a reasonable amount of time has passed.  All new code should be written against clFFT.h.  
- * Older projects should migrate to the new header at their earliest convenience.
- */
-
-#pragma once
-#if !defined( CLAMDFFT_DOTH )
-#define CLAMDFFT_DOTH
-
-#include "clFFT.h"
-
-/* The following header defines a fixed version number as this header is deprecated and won't be updated */
-#include "clAmdFft.version.h"
-
-/*     In general, you can not use namespaces for strict C compliance, so we prefix our public accessible names
- *     with the string clAmdFft
- */
-
-/*     All functions will return pre-defined error codes, and will NOT throw exceptions to the caller
- */
-
-/*!  @brief clAmdFft error codes definition, incorporating OpenCL error definitions
- *
- *   This enumeration is a superset of the OpenCL error codes.  For example, CL_OUT_OF_HOST_MEMORY,
- *   which is defined in cl.h is aliased as CLFFT_OUT_OF_HOST_MEMORY.  The set of basic OpenCL
- *   error codes is extended to add extra values specific to the clAmdFft package.
- */
-typedef enum clfftStatus_ clAmdFftStatus;
-
-/*!  @brief The dimension of the input and output buffers that will be fed into all FFT transforms */
-typedef enum clfftDim_ clAmdFftDim;
-
-/*!  @brief These are the expected layouts of the buffers */
-typedef enum clfftLayout_ clAmdFftLayout;
-
-/*!  @brief This is the expected precision of each FFT.
- */
-typedef enum clfftPrecision_ clAmdFftPrecision;
-
-/*!  @brief What is the expected direction of each FFT, time or the frequency domains */
-typedef enum clfftDirection_ clAmdFftDirection;
-
-/*!  @brief Are the input buffers overwritten with the results */
-typedef enum clfftResultLocation_ clAmdFftResultLocation;
-
-/*! @brief This determines whether the result is returned in original order. It is valid only for
-dimensions greater than 1. */
-typedef enum clfftResultTransposed_ clAmdFftResultTransposed;
-
-/*! @brief Data structure that can be passed to clAmdFftSetup() to control the behavior of the FFT runtime
- *  @details This structure contains values that can be initialized before instantiation of the FFT runtime
- *  with ::clAmdFftSetup().  To initialize this structure, pass a pointer to a user struct to ::clAmdFftInitSetupData( ),
- *  which will clear the structure and set the version member variables to the current values.
- */
-typedef struct clfftSetupData_ clAmdFftSetupData;
-
-/*!  @brief An abstract handle to the object that represents the state of the FFT(s) */
-typedef clfftPlanHandle clAmdFftPlanHandle;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-       /*! @brief Initialize an clAmdFftSetupData struct for the client
-        *  @details clAmdFftSetupData is passed to clAmdFftSetup to control behavior of the FFT runtime
-        *  @param[out] setupData Data structure is cleared, initialized with version information and default values
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       __inline clAmdFftStatus clAmdFftInitSetupData( clAmdFftSetupData* setupData )
-       {
-               return clfftInitSetupData( setupData );
-       }
-
-       /*! @brief Initialize internal FFT resources.
-        *  @details AMD's FFT implementation caches kernels, programs and buffers for its internal use.
-        *  @param[in] setupData Data structure that can be passed into the setup routine to control FFT generation behavior
-        *      and debug functionality
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       __inline clAmdFftStatus clAmdFftSetup( const clAmdFftSetupData* setupData )
-       {
-               return clfftSetup( setupData );
-       }
-
-       /*! @brief Release all internal resources.
-        *  @details Call when client is done with this FFT library, allowing the library to destroy all resources it has cached
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       __inline clAmdFftStatus clAmdFftTeardown( )
-       {
-               return clfftTeardown( );
-       }
-
-       /*! @brief Query the FFT library for version information
-        *  @details Return the major, minor and patch version numbers associated with this FFT library
-        *  @param[out] major Major functionality change
-        *  @param[out] minor Minor functionality change
-        *  @param[out] patch Bug fixes, documentation changes, no new features introduced
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       __inline clAmdFftStatus clAmdFftGetVersion( cl_uint* major, cl_uint* minor, cl_uint* patch )
-       {
-               return clfftGetVersion( major, minor, patch );
-       }
-
-       /*! @brief Create a plan object initialized entirely with default values.
-        *  @details A plan is a repository of state for calculating FFT's.  Allows the runtime to pre-calculate kernels, programs
-        *      and buffers and associate them with buffers of specified dimensions.
-        *  @param[out] plHandle Handle to the newly created plan
-        *  @param[in] context Client is responsible for providing an OpenCL context for the plan
-        *  @param[in] dim The dimensionality of the FFT transform; describes how many elements are in the array
-        *  @param[in] clLengths An array of lengths, of size 'dim'.  Each value describes the length of additional dimensions
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       __inline clAmdFftStatus clAmdFftCreateDefaultPlan( clAmdFftPlanHandle* plHandle, cl_context context, const clAmdFftDim dim,
-                                                               const size_t* clLengths )
-       {
-               return clfftCreateDefaultPlan( plHandle, context, dim, clLengths );
-       }
-
-       /*! @brief Create a copy of an existing plan.
-        *  @details This API allows a client to create a new plan based upon an existing plan.  This is a convenience function
-        *  provided for quickly creating plans that are similar, but may differ slightly.
-        *  @param[out] out_plHandle Handle to the newly created plan that is based on in_plHandle
-        *  @param[in] new_context Client is responsible for providing a new context for the new plan
-        *  @param[in] in_plHandle Handle to a plan to be copied, previously created
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       __inline clAmdFftStatus clAmdFftCopyPlan( clAmdFftPlanHandle* out_plHandle, cl_context new_context, clAmdFftPlanHandle in_plHandle )
-       {
-               return clfftCopyPlan( out_plHandle, new_context, in_plHandle );
-       }
-
-       /*! @brief Prepare the plan for execution.
-        *  @details After all plan parameters are set, the client has the option of 'baking' the plan, which tells the runtime that
-        *  no more changes to the plan's parameters are expected, and the OpenCL kernels should be compiled.  This optional function
-        *  allows the client application to perform this function when the application is being initialized instead of on the first
-        *  execution.
-        *  At this point, the clAmdFft runtime will apply all implimented optimizations, possibly including
-        *  running kernel experiments on the devices in the plan context.
-        *  <p>  Users should assume that this function will take a long time to execute.  If a plan is not baked before being executed,
-        *  users should assume that the first call to clAmdFftEnqueueTransform will take a long time to execute.
-        *  <p>  If any significant parameter of a plan is changed after the plan is baked (by a subsequent call to one of
-        *  the clAmdFftSetPlan____ functions), that will not be considered an error.  Instead, the plan will revert back to
-        *  the unbaked state, discarding the benefits of the baking operation.
-        *  @param[in] plHandle Handle to a plan previously created
-        *  @param[in] numQueues Number of command queues in commQueueFFT; 0 is a valid value, in which case client does not want
-        *      the runtime to run load experiments and only pre-calculate state information
-        *  @param[in] commQueueFFT An array of cl_command_queues created by the client; the command queues must be a proper subset of
-        *      the devices included in the plan context
-        *  @param[in] pfn_notify A function pointer to a notification routine. The notification routine is a callback function that
-        *  an application can register and which will be called when the program executable has been built (successfully or unsuccessfully).
-        *  Currently, this parameter MUST be NULL or nullptr.
-        *  @param[in] user_data Passed as an argument when pfn_notify is called.
-        *  Currently, this parameter MUST be NULL or nullptr.
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       __inline clAmdFftStatus clAmdFftBakePlan( clAmdFftPlanHandle plHandle, cl_uint numQueues, cl_command_queue* commQueueFFT,
-                                                       void (CL_CALLBACK *pfn_notify)(clAmdFftPlanHandle plHandle, void *user_data), void* user_data )
-       {
-               return clfftBakePlan( plHandle, numQueues, commQueueFFT, pfn_notify, user_data );
-       }
-
-       /*! @brief Release the resources of a plan.
-        *  @details A plan may include kernels, programs and buffers associated with it that consume memory.  When a plan
-        *  is not needed anymore, the client should release the plan.
-        *  @param[in,out] plHandle Handle to a plan previously created
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       __inline clAmdFftStatus clAmdFftDestroyPlan( clAmdFftPlanHandle* plHandle )
-       {
-               return clfftDestroyPlan( plHandle );
-       }
-
-       /*! @brief Retrieve the OpenCL context of a previously created plan.
-        *  @details User should pass a reference to an cl_context variable, which will be changed to point to a
-        *  context set in the specified plan.
-        *  @param[in] plHandle Handle to a plan previously created
-        *  @param[out] context Reference to user allocated cl_context, which will point to context set in plan
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       __inline clAmdFftStatus clAmdFftGetPlanContext( const clAmdFftPlanHandle plHandle, cl_context* context )
-       {
-               return clfftGetPlanContext( plHandle, context );
-       }
-
-       /*! @brief Retrieve the floating point precision of the FFT data
-        *  @details User should pass a reference to an clAmdFftPrecision variable, which will be set to the
-        *  precision of the FFT complex data in the plan.
-        *  @param[in] plHandle Handle to a plan previously created
-        *  @param[out] precision Reference to user clAmdFftPrecision enum
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       __inline clAmdFftStatus clAmdFftGetPlanPrecision( const clAmdFftPlanHandle plHandle, clAmdFftPrecision* precision )
-       {
-               return clfftGetPlanPrecision( plHandle, precision );
-       }
-
-       /*! @brief Set the floating point precision of the FFT data
-        *  @details Set the plan property which will be the precision of the FFT complex data in the plan.
-        *  @param[in] plHandle Handle to a plan previously created
-        *  @param[in] precision Reference to user clAmdFftPrecision enum
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       __inline clAmdFftStatus clAmdFftSetPlanPrecision( clAmdFftPlanHandle plHandle, clAmdFftPrecision precision )
-       {
-               return clfftSetPlanPrecision( plHandle, precision );
-       }
-
-       /*! @brief Retrieve the scaling factor that should be applied to the FFT data
-        *  @details User should pass a reference to an cl_float variable, which will be set to the
-        *  floating point scaling factor that will be multiplied across the FFT data.
-        *  @param[in] plHandle Handle to a plan previously created
-        *  @param[in] dir Which direction does the scaling factor apply to
-        *  @param[out] scale Reference to user cl_float variable
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       __inline clAmdFftStatus clAmdFftGetPlanScale( const clAmdFftPlanHandle plHandle, clAmdFftDirection dir, cl_float* scale )
-       {
-               return clfftGetPlanScale( plHandle, dir, scale );
-       }
-
-       /*! @brief Set the scaling factor that should be applied to the FFT data
-        *  @details Set the plan property which will be the floating point scaling factor that will be
-        *  multiplied across the FFT data.
-        *  @param[in] plHandle Handle to a plan previously created
-        *  @param[in] dir Which direction does the scaling factor apply to
-        *  @param[in] scale Reference to user cl_float variable
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       __inline clAmdFftStatus clAmdFftSetPlanScale( clAmdFftPlanHandle plHandle, clAmdFftDirection dir, cl_float scale )
-       {
-               return clfftSetPlanScale( plHandle, dir, scale );
-       }
-
-       /*! @brief Retrieve the number of discrete arrays that this plan can handle concurrently
-        *  @details User should pass a reference to an cl_uint variable, which will be set to the
-        *  number of discrete arrays (1D or 2D) that will be batched together for this plan
-        *  @param[in] plHandle Handle to a plan previously created
-        *  @param[out] batchSize How many discrete number of FFT's are to be performed
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       __inline clAmdFftStatus clAmdFftGetPlanBatchSize( const clAmdFftPlanHandle plHandle, size_t* batchSize )
-       {
-               return clfftGetPlanBatchSize( plHandle, batchSize );
-       }
-
-       /*! @brief Set the number of discrete arrays that this plan can handle concurrently
-        *  @details Set the plan property which will be set to the number of discrete arrays (1D or 2D)
-        *  that will be batched together for this plan
-        *  @param[in] plHandle Handle to a plan previously created
-        *  @param[in] batchSize How many discrete number of FFT's are to be performed
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       __inline clAmdFftStatus clAmdFftSetPlanBatchSize( clAmdFftPlanHandle plHandle, size_t batchSize )
-       {
-               return clfftSetPlanBatchSize( plHandle, batchSize );
-       }
-
-       /*! @brief Retrieve the dimensionality of FFT's to be transformed in the plan
-        *  @details Queries a plan object and retrieves the dimensionality that the plan is set for.  A size is returned to
-        *  help the client allocate the proper storage to hold the dimensions in a further call to clAmdFftGetPlanLength
-        *  @param[in] plHandle Handle to a plan previously created
-        *  @param[out] dim The dimensionality of the FFT's to be transformed
-        *  @param[out] size Value used to allocate an array to hold the FFT dimensions.
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       __inline clAmdFftStatus clAmdFftGetPlanDim( const clAmdFftPlanHandle plHandle, clAmdFftDim* dim, cl_uint* size )
-       {
-               return clfftGetPlanDim( plHandle, dim, size );
-       }
-
-       /*! @brief Set the dimensionality of FFT's to be transformed by the plan
-        *  @details Set the dimensionality of FFT's to be transformed by the plan
-        *  @param[in] plHandle Handle to a plan previously created
-        *  @param[in] dim The dimensionality of the FFT's to be transformed
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       __inline clAmdFftStatus clAmdFftSetPlanDim( clAmdFftPlanHandle plHandle, const clAmdFftDim dim )
-       {
-               return clfftSetPlanDim( plHandle, dim );
-       }
-
-       /*! @brief Retrieve the length of each dimension of the FFT
-        *  @details User should pass a reference to a size_t array, which will be set to the
-        *  length of each discrete dimension of the FFT
-        *  @param[in] plHandle Handle to a plan previously created
-        *  @param[in] dim The dimension of the length parameters; describes how many elements are in the array
-        *  @param[out] clLengths An array of lengths, of size 'dim'.  Each array value describes the length of each dimension
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       __inline clAmdFftStatus clAmdFftGetPlanLength( const clAmdFftPlanHandle plHandle, const clAmdFftDim dim, size_t* clLengths )
-       {
-               return clfftGetPlanLength( plHandle, dim, clLengths );
-       }
-
-       /*! @brief Set the length of each dimension of the FFT
-        *  @details Set the plan property which will be the length of each discrete dimension of the FFT
-        *  @param[in] plHandle Handle to a plan previously created
-        *  @param[in] dim The dimension of the length parameters; describes how many elements are in the array
-        *  @param[in] clLengths An array of lengths, of size 'dim'.  Each value describes the length of additional dimensions
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       __inline clAmdFftStatus clAmdFftSetPlanLength( clAmdFftPlanHandle plHandle, const clAmdFftDim dim, const size_t* clLengths )
-       {
-               return clfftSetPlanLength( plHandle, dim, clLengths );
-       }
-
-       /*! @brief Retrieve the distance between consecutive elements for input buffers in a dimension.
-        *  @details Depending on how the dimension is set in the plan (for 2D or 3D FFT's), strideY or strideZ can be safely
-        *  ignored
-        *  @param[in] plHandle Handle to a plan previously created
-        *  @param[in] dim The dimension of the stride parameters; describes how many elements are in the array
-        *  @param[out] clStrides An array of strides, of size 'dim'.
-        */
-       __inline clAmdFftStatus clAmdFftGetPlanInStride( const clAmdFftPlanHandle plHandle, const clAmdFftDim dim, size_t* clStrides )
-       {
-               return clfftGetPlanInStride( plHandle, dim, clStrides );
-       }
-
-       /*! @brief Set the distance between consecutive elements for input buffers in a dimension.
-        *  @details Set the plan properties which will be the distance between elements in a given dimension
-        *  (units are in terms of clAmdFftPrecision)
-        *  @param[in] plHandle Handle to a plan previously created
-        *  @param[in] dim The dimension of the stride parameters; describes how many elements are in the array
-        *  @param[in] clStrides An array of strides, of size 'dim'. Usually strideX=1 so that successive elements in the first dimension are stored contiguously.
-        *      Typically strideY=LenX, strideZ=LenX*LenY such that successive elements in the second and third dimensions are stored in packed format.
-        *  See  @ref DistanceStridesandPitches for details.
-        */
-       __inline clAmdFftStatus clAmdFftSetPlanInStride( clAmdFftPlanHandle plHandle, const clAmdFftDim dim, size_t* clStrides )
-       {
-               return clfftSetPlanInStride( plHandle, dim, clStrides );
-       }
-
-       /*! @brief Retrieve the distance between consecutive elements for output buffers in a dimension.
-        *  @details Depending on how the dimension is set in the plan (for 2D or 3D FFT's), strideY or strideZ can be safely
-        *  ignored
-        *  @param[in] plHandle Handle to a plan previously created
-        *  @param[in] dim The dimension of the stride parameters; describes how many elements are in the array
-        *  @param[out] clStrides An array of strides, of size 'dim'.
-        */
-       __inline clAmdFftStatus clAmdFftGetPlanOutStride( const clAmdFftPlanHandle plHandle, const clAmdFftDim dim, size_t* clStrides )
-       {
-               return clfftGetPlanOutStride( plHandle, dim, clStrides );
-       }
-
-       /*! @brief Set the distance between consecutive elements for output buffers in a dimension.
-        *  @details Set the plan properties which will be the distance between elements in a given dimension
-        *  (units are in terms of clAmdFftPrecision)
-        *  @param[in] plHandle Handle to a plan previously created
-        *  @param[in] dim The dimension of the stride parameters; describes how many elements are in the array
-        *  @param[in] clStrides An array of strides, of size 'dim'.  Usually strideX=1 so that successive elements in the first dimension are stored contiguously.
-        *      Typically strideY=LenX, strideZ=LenX*LenY such that successive elements in the second and third dimensions are stored in packed format.
-        *  @sa clAmdFftSetPlanInStride
-        */
-       __inline clAmdFftStatus clAmdFftSetPlanOutStride( clAmdFftPlanHandle plHandle, const clAmdFftDim dim, size_t* clStrides )
-       {
-               return clfftSetPlanOutStride( plHandle, dim, clStrides );
-       }
-
-       /*! @brief Retrieve the distance between Array objects
-        *  @details Pitch is the distance between each discrete array object in an FFT array. This is only used
-        *  for 'array' dimensions in clAmdFftDim; see clAmdFftSetPlanDimension (units are in terms of clAmdFftPrecision)
-        *  @param[in] plHandle Handle to a plan previously created
-        *  @param[out] iDist The distance between the beginning elements of the discrete array objects in memory on input.
-        *  For contiguous arrays in memory, iDist=(strideX*strideY*strideZ)
-        *  @param[out] oDist The distance between the beginning elements of the discrete array objects in memory on output.
-        *  For contiguous arrays in memory, oDist=(strideX*strideY*strideZ)
-        */
-       __inline clAmdFftStatus clAmdFftGetPlanDistance( const clAmdFftPlanHandle plHandle, size_t* iDist, size_t* oDist )
-       {
-               return clfftGetPlanDistance( plHandle, iDist, oDist );
-       }
-
-       /*! @brief Set the distance between Array objects
-        *  @details Pitch is the distance between each discrete array object in an FFT array. This is only used
-        *  for 'array' dimensions in clAmdFftDim; see clAmdFftSetPlanDimension (units are in terms of clAmdFftPrecision)
-        *  @param[in] plHandle Handle to a plan previously created
-        *  @param[out] iDist The distance between the beginning elements of the discrete array objects in memory on input.
-        *  For contiguous arrays in memory, iDist=(strideX*strideY*strideZ)
-        *  @param[out] oDist The distance between the beginning elements of the discrete array objects in memory on output.
-        *  For contiguous arrays in memory, oDist=(strideX*strideY*strideZ)
-        */
-       __inline clAmdFftStatus clAmdFftSetPlanDistance( clAmdFftPlanHandle plHandle, size_t iDist, size_t oDist )
-       {
-               return clfftSetPlanDistance( plHandle, iDist, oDist );
-       }
-
-       /*! @brief Retrieve the expected layout of the input and output buffers
-        *  @details Output buffers can be filled with either hermitian or complex numbers.  Complex numbers can be stored
-        *  in various layouts; this informs the FFT engine what layout to produce on output
-        *  @param[in] plHandle Handle to a plan previously created
-        *  @param[out] iLayout Indicates how the input buffers are laid out in memory
-        *  @param[out] oLayout Indicates how the output buffers are laid out in memory
-        */
-       __inline clAmdFftStatus clAmdFftGetLayout( const clAmdFftPlanHandle plHandle, clAmdFftLayout* iLayout, clAmdFftLayout* oLayout )
-       {
-               return clfftGetLayout( plHandle, iLayout, oLayout );
-       }
-
-       /*! @brief Set the expected layout of the input and output buffers
-        *  @details Output buffers can be filled with either hermitian or complex numbers.  Complex numbers can be stored
-        *  in various layouts; this informs the FFT engine what layout to produce on output
-        *  @param[in] plHandle Handle to a plan previously created
-        *  @param[in] iLayout Indicates how the input buffers are laid out in memory
-        *  @param[in] oLayout Indicates how the output buffers are laid out in memory
-        */
-       __inline clAmdFftStatus clAmdFftSetLayout( clAmdFftPlanHandle plHandle, clAmdFftLayout iLayout, clAmdFftLayout oLayout )
-       {
-               return clfftSetLayout( plHandle, iLayout, oLayout );
-       }
-
-       /*! @brief Retrieve whether the input buffers are going to be overwritten with results
-        *  @details If the setting is to do an in-place transform, the input buffers are overwritten with the results of the
-        *  transform.  If the setting is for out-of-place transforms, the engine knows to look for separate output buffers
-        *  on the Enqueue call.
-        *  @param[in] plHandle Handle to a plan previously created
-        *  @param[out] placeness Tells the FFT engine to clobber the input buffers or to expect output buffers for results
-        */
-       __inline clAmdFftStatus clAmdFftGetResultLocation( const clAmdFftPlanHandle plHandle, clAmdFftResultLocation* placeness )
-       {
-               return clfftGetResultLocation( plHandle, placeness );
-       }
-
-       /*! @brief Set whether the input buffers are going to be overwritten with results
-        *  @details If the setting is to do an in-place transform, the input buffers are overwritten with the results of the
-        *  transform.  If the setting is for out-of-place transforms, the engine knows to look for separate output buffers
-        *  on the Enqueue call.
-        *  @param[in] plHandle Handle to a plan previously created
-        *  @param[in] placeness Tells the FFT engine to clobber the input buffers or to expect output buffers for results
-        */
-       __inline clAmdFftStatus clAmdFftSetResultLocation( clAmdFftPlanHandle plHandle, clAmdFftResultLocation placeness )
-       {
-               return clfftSetResultLocation( plHandle, placeness );
-       }
-
-       /*! @brief Retrieve the final transpose setting of a muti-dimensional FFT
-        *  @details A multi-dimensional FFT typically transposes the data several times during calculation.  If the client
-        *  does not care about the final transpose to put data back in proper dimension, the final transpose can be skipped
-        *  for possible speed improvements
-        *  @param[in] plHandle Handle to a plan previously created
-        *  @param[out] transposed Parameter specifies whether the final transpose can be skipped
-        */
-       __inline clAmdFftStatus clAmdFftGetPlanTransposeResult( const clAmdFftPlanHandle plHandle, clAmdFftResultTransposed * transposed )
-       {
-               return clfftGetPlanTransposeResult( plHandle, transposed );
-       }
-
-       /*! @brief Set the final transpose setting of a muti-dimensional FFT
-        *  @details A multi-dimensional FFT typically transposes the data several times during calculation.  If the client
-        *  does not care about the final transpose to put data back in proper dimension, the final transpose can be skipped
-        *  for possible speed improvements
-        *  @param[in] plHandle Handle to a plan previously created
-        *  @param[in] transposed Parameter specifies whether the final transpose can be skipped
-        */
-       __inline clAmdFftStatus clAmdFftSetPlanTransposeResult( clAmdFftPlanHandle plHandle, clAmdFftResultTransposed transposed )
-       {
-               return clfftSetPlanTransposeResult( plHandle, transposed );
-       }
-
-       /*! @brief Get buffer size (in bytes), which may be needed internally for an intermediate buffer
-        *  @details Very large FFT transforms may need multiple passes, and the operation would need a temporary buffer to hold
-        *  intermediate results. This function is only valid after the plan is baked, otherwise an invalid operation error
-        *  is returned. If buffersize returns as 0, the runtime needs no temporary buffer.
-        *  @param[in] plHandle Handle to a plan previously created
-        *  @param[out] buffersize Size in bytes for intermediate buffer
-        */
-       __inline clAmdFftStatus clAmdFftGetTmpBufSize( const clAmdFftPlanHandle plHandle, size_t* buffersize )
-       {
-               return clfftGetTmpBufSize( plHandle, buffersize );
-       }
-
-       /*! @brief Enqueue an FFT transform operation, and return immediately (non-blocking)
-        *  @details This transform API is the function that actually computes the FFT transfrom. It is non-blocking as it
-        *  only enqueues the OpenCL kernels for execution. The synchronization step has to be managed by the user.
-        *  @param[in] plHandle Handle to a plan previously created
-        *  @param[in] dir Forwards or backwards transform
-        *  @param[in] numQueuesAndEvents Number of command queues in commQueues; number of expected events to be returned in outEvents
-        *  @param[in] commQueues An array of cl_command_queues created by the client; the command queues must be a proper subset of
-        *      the devices included in the plan context
-        *  @param[in] numWaitEvents Specify the number of elements in the eventWaitList array
-        *  @param[in] waitEvents Events that this transform should wait to complete before executing on the device
-        *  @param[out] outEvents The runtime fills this array with events corresponding 1 to 1 with the input command queues passed
-        *      in commQueues.  This parameter can be NULL or nullptr, in which case client is not interested in receiving notifications
-        *      when transforms are finished, otherwise if not NULL the client is responsible for allocating this array, with at least
-        *      as many elements as specified in numQueuesAndEvents.
-        *  @param[in] inputBuffers An array of cl_mem objects that contain data for processing by the FFT runtime.  If the transform
-        *  is in place, the FFT results will overwrite the input buffers
-        *  @param[out] outputBuffers An array of cl_mem objects that will store the results of out of place transforms.  If the transform
-        *  is in place, this parameter may be NULL or nullptr.  It is completely ignored
-        *  @param[in] tmpBuffer A cl_mem object that is reserved as a temporary buffer for FFT processing. If clTmpBuffers is NULL or nullptr,
-        *  and the runtime needs temporary storage, an internal temporary buffer will be created on the fly managed by the runtime.
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       __inline clAmdFftStatus clAmdFftEnqueueTransform(
-                                                                                               clAmdFftPlanHandle plHandle,
-                                                                                               clAmdFftDirection dir,
-                                                                                               cl_uint numQueuesAndEvents,
-                                                                                               cl_command_queue* commQueues,
-                                                                                               cl_uint numWaitEvents,
-                                                                                               const cl_event* waitEvents,
-                                                                                               cl_event* outEvents,
-                                                                                               cl_mem* inputBuffers,
-                                                                                               cl_mem* outputBuffers,
-                                                                                               cl_mem tmpBuffer
-                                                                                               )
-       {
-               return clfftEnqueueTransform( plHandle, dir, numQueuesAndEvents, commQueues, numWaitEvents, waitEvents, outEvents, 
-                       inputBuffers, outputBuffers, tmpBuffer );
-       }
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/src/include/gromacs/external/clFFT/src/include/clAmdFft.version.h b/src/include/gromacs/external/clFFT/src/include/clAmdFft.version.h
deleted file mode 100644 (file)
index ec9ef54..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/* ************************************************************************
- * Copyright 2013 Advanced Micro Devices, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ************************************************************************/
-
-/*! @file clAmdFft.version.h
- * /note clAmdFft.version.h is a deprecated header file.  
- * This header is provided to help projects that were written with the older clAmdFft codebase, to help them 
- * port to the new API at their own schedule.  It will not be maintained or updated, and will be removed after 
- * a reasonable amount of time has passed.  All new code should be written against clFFT.h.  
- * Older projects should migrate to the new header at their earliest convenience.
- */
-
-/* the configured version and settings for clFFT
- */
-#define clAmdFftVersionMajor 2
-#define clAmdFftVersionMinor 0
-#define clAmdFftVersionPatch 0
diff --git a/src/include/gromacs/external/clFFT/src/include/clFFT.h b/src/include/gromacs/external/clFFT/src/include/clFFT.h
deleted file mode 100644 (file)
index cb68425..0000000
+++ /dev/null
@@ -1,601 +0,0 @@
-/* ************************************************************************
- * Copyright 2013-2015 Advanced Micro Devices, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ************************************************************************/
-
-
-/*! @file clFFT.h
- * clFFT.h defines all the public interfaces and types that are used by clFFT clients
- * This is the only public header file that should be consumed by clFFT clients.  It is written to adhere to native "C"
- * interfaces to make clFFT library as portable as possible; it should be callable from C, C++, .NET and Fortran,
- * either with the proper linking or using wrapper classes.
- *
- */
-
-#pragma once
-#if !defined( CLFFT_H )
-#define CLFFT_H
-
-#if defined(__APPLE__) || defined(__MACOSX)
-       #include <OpenCL/cl.h>
-#else
-       #include <CL/cl.h>
-#endif
-
-#include "clFFT.version.h"
-
-/*! This preprocessor definition is the standard way to export APIs
- *  from a DLL simpler. All files within this DLL are compiled with the CLFFT_EXPORTS
- *  symbol defined on the command line. This symbol must not be defined on any project
- *  that uses this DLL. This ensures source files of any other project that include this file see
- *  clfft functions as being imported from a DLL, whereas the DLL sees symbols
- *  defined with this macro as being exported.
- */
-#if defined( _WIN32 )
-       #if !defined( __cplusplus )
-               #define inline __inline
-       #endif
-
-    #if defined( CLFFT_STATIC )
-        #define CLFFTAPI
-    #elif defined( CLFFT_EXPORTS )
-        #define CLFFTAPI __declspec( dllexport )
-    #else
-        #define CLFFTAPI __declspec( dllimport )
-    #endif
-#else
-       #define CLFFTAPI
-#endif
-
-/*     In general, you cannot use namespaces for strict C compliance, so we prefix our public accessible names
- *     with the string clfft
- */
-
-/*     All functions return pre-defined error codes, and do NOT throw exceptions to the caller.
- */
-
-/*!  @brief clfft error codes definition(incorporating OpenCL error definitions)
- *
- *   This enumeration is a superset of the OpenCL error codes.  For example, CL_OUT_OF_HOST_MEMORY,
- *   which is defined in cl.h is aliased as CLFFT_OUT_OF_HOST_MEMORY.  The set of basic OpenCL
- *   error codes is extended to add extra values specific to the clfft package.
- */
-enum clfftStatus_
-{
-       CLFFT_INVALID_GLOBAL_WORK_SIZE                  = CL_INVALID_GLOBAL_WORK_SIZE,
-       CLFFT_INVALID_MIP_LEVEL                                 = CL_INVALID_MIP_LEVEL,
-       CLFFT_INVALID_BUFFER_SIZE                               = CL_INVALID_BUFFER_SIZE,
-       CLFFT_INVALID_GL_OBJECT                                 = CL_INVALID_GL_OBJECT,
-       CLFFT_INVALID_OPERATION                                 = CL_INVALID_OPERATION,
-       CLFFT_INVALID_EVENT                                             = CL_INVALID_EVENT,
-       CLFFT_INVALID_EVENT_WAIT_LIST                   = CL_INVALID_EVENT_WAIT_LIST,
-       CLFFT_INVALID_GLOBAL_OFFSET                             = CL_INVALID_GLOBAL_OFFSET,
-       CLFFT_INVALID_WORK_ITEM_SIZE                    = CL_INVALID_WORK_ITEM_SIZE,
-       CLFFT_INVALID_WORK_GROUP_SIZE                   = CL_INVALID_WORK_GROUP_SIZE,
-       CLFFT_INVALID_WORK_DIMENSION                    = CL_INVALID_WORK_DIMENSION,
-       CLFFT_INVALID_KERNEL_ARGS                               = CL_INVALID_KERNEL_ARGS,
-       CLFFT_INVALID_ARG_SIZE                                  = CL_INVALID_ARG_SIZE,
-       CLFFT_INVALID_ARG_VALUE                                 = CL_INVALID_ARG_VALUE,
-       CLFFT_INVALID_ARG_INDEX                                 = CL_INVALID_ARG_INDEX,
-       CLFFT_INVALID_KERNEL                                    = CL_INVALID_KERNEL,
-       CLFFT_INVALID_KERNEL_DEFINITION                 = CL_INVALID_KERNEL_DEFINITION,
-       CLFFT_INVALID_KERNEL_NAME                               = CL_INVALID_KERNEL_NAME,
-       CLFFT_INVALID_PROGRAM_EXECUTABLE                = CL_INVALID_PROGRAM_EXECUTABLE,
-       CLFFT_INVALID_PROGRAM                                   = CL_INVALID_PROGRAM,
-       CLFFT_INVALID_BUILD_OPTIONS                             = CL_INVALID_BUILD_OPTIONS,
-       CLFFT_INVALID_BINARY                                    = CL_INVALID_BINARY,
-       CLFFT_INVALID_SAMPLER                                   = CL_INVALID_SAMPLER,
-       CLFFT_INVALID_IMAGE_SIZE                                = CL_INVALID_IMAGE_SIZE,
-       CLFFT_INVALID_IMAGE_FORMAT_DESCRIPTOR   = CL_INVALID_IMAGE_FORMAT_DESCRIPTOR,
-       CLFFT_INVALID_MEM_OBJECT                                = CL_INVALID_MEM_OBJECT,
-       CLFFT_INVALID_HOST_PTR                                  = CL_INVALID_HOST_PTR,
-       CLFFT_INVALID_COMMAND_QUEUE                             = CL_INVALID_COMMAND_QUEUE,
-       CLFFT_INVALID_QUEUE_PROPERTIES                  = CL_INVALID_QUEUE_PROPERTIES,
-       CLFFT_INVALID_CONTEXT                                   = CL_INVALID_CONTEXT,
-       CLFFT_INVALID_DEVICE                                    = CL_INVALID_DEVICE,
-       CLFFT_INVALID_PLATFORM                                  = CL_INVALID_PLATFORM,
-       CLFFT_INVALID_DEVICE_TYPE                               = CL_INVALID_DEVICE_TYPE,
-       CLFFT_INVALID_VALUE                                             = CL_INVALID_VALUE,
-       CLFFT_MAP_FAILURE                                               = CL_MAP_FAILURE,
-       CLFFT_BUILD_PROGRAM_FAILURE                             = CL_BUILD_PROGRAM_FAILURE,
-       CLFFT_IMAGE_FORMAT_NOT_SUPPORTED                = CL_IMAGE_FORMAT_NOT_SUPPORTED,
-       CLFFT_IMAGE_FORMAT_MISMATCH                             = CL_IMAGE_FORMAT_MISMATCH,
-       CLFFT_MEM_COPY_OVERLAP                                  = CL_MEM_COPY_OVERLAP,
-       CLFFT_PROFILING_INFO_NOT_AVAILABLE              = CL_PROFILING_INFO_NOT_AVAILABLE,
-       CLFFT_OUT_OF_HOST_MEMORY                                = CL_OUT_OF_HOST_MEMORY,
-       CLFFT_OUT_OF_RESOURCES                                  = CL_OUT_OF_RESOURCES,
-       CLFFT_MEM_OBJECT_ALLOCATION_FAILURE             = CL_MEM_OBJECT_ALLOCATION_FAILURE,
-       CLFFT_COMPILER_NOT_AVAILABLE                    = CL_COMPILER_NOT_AVAILABLE,
-       CLFFT_DEVICE_NOT_AVAILABLE                              = CL_DEVICE_NOT_AVAILABLE,
-       CLFFT_DEVICE_NOT_FOUND                                  = CL_DEVICE_NOT_FOUND,
-       CLFFT_SUCCESS                                                   = CL_SUCCESS,
-       //-------------------------- Extended status codes for clfft ----------------------------------------
-       CLFFT_BUGCHECK =  4*1024,       /*!< Bugcheck. */
-       CLFFT_NOTIMPLEMENTED,           /*!< Functionality is not implemented yet. */
-       CLFFT_TRANSPOSED_NOTIMPLEMENTED, /*!< Transposed functionality is not implemented for this transformation. */
-       CLFFT_FILE_NOT_FOUND,           /*!< Tried to open an existing file on the host system, but failed. */
-       CLFFT_FILE_CREATE_FAILURE,      /*!< Tried to create a file on the host system, but failed. */
-       CLFFT_VERSION_MISMATCH,         /*!< Version conflict between client and library. */
-       CLFFT_INVALID_PLAN,                     /*!< Requested plan could not be found. */
-       CLFFT_DEVICE_NO_DOUBLE,         /*!< Double precision not supported on this device. */
-       CLFFT_DEVICE_MISMATCH,          /*!< Attempt to run on a device using a plan baked for a different device. */
-       CLFFT_ENDSTATUS                         /* The last value of the enum, and marks the length of clfftStatus. */
-};
-typedef enum clfftStatus_ clfftStatus;
-
-/*!  @brief The dimension of the input and output buffers that is fed into all FFT transforms */
-typedef enum clfftDim_
-{
-       CLFFT_1D                = 1,            /*!< 1 Dimensional FFT transform (default). */
-       CLFFT_2D,                                       /*!< 2 Dimensional FFT transform. */
-       CLFFT_3D,                                       /*!< 3 Dimensional FFT transform. */
-       ENDDIMENSION                    /*!< The last value of the enum, and marks the length of clfftDim. */
-} clfftDim;
-
-/*!  @brief Specify the expected layouts of the buffers */
-typedef enum clfftLayout_
-{
-       CLFFT_COMPLEX_INTERLEAVED       = 1,    /*!< An array of complex numbers, with real and imaginary components together (default). */
-       CLFFT_COMPLEX_PLANAR,                           /*!< Separate arrays of real components and imaginary components. */
-       CLFFT_HERMITIAN_INTERLEAVED,            /*!< Compressed form of complex numbers; complex-conjugates are not stored, real and imaginary components are stored in the same array. */
-       CLFFT_HERMITIAN_PLANAR,                         /*!< Compressed form of complex numbers; complex-conjugates are not stored, real and imaginary components are stored in separate arrays. */
-       CLFFT_REAL,                                                     /*!< An array of real numbers, with no corresponding imaginary components. */
-       ENDLAYOUT                       /*!< The last value of the enum, and marks the length of clfftLayout. */
-} clfftLayout;
-
-/*!  @brief Specify the expected precision of each FFT.
- */
-typedef enum clfftPrecision_
-{
-       CLFFT_SINGLE    = 1,    /*!< An array of complex numbers, with real and imaginary components saved as floats (default). */
-       CLFFT_DOUBLE,                   /*!< An array of complex numbers, with real and imaginary components saved as doubles. */
-       CLFFT_SINGLE_FAST,              /*!< Faster implementation preferred. */
-       CLFFT_DOUBLE_FAST,              /*!< Faster implementation preferred. */
-       ENDPRECISION    /*!< The last value of the enum, and marks the length of clfftPrecision. */
-} clfftPrecision;
-
-/*!  @brief Specify the expected direction of each FFT, time or the frequency domains */
-typedef enum clfftDirection_
-{
-       CLFFT_FORWARD   = -1,           /*!< FFT transform from time to frequency domain. */
-       CLFFT_BACKWARD  = 1,            /*!< FFT transform from frequency to time domain. */
-       CLFFT_MINUS             = -1,           /*!< Alias for the forward transform. */
-       CLFFT_PLUS              = 1,            /*!< Alias for the backward transform. */
-       ENDDIRECTION                    /*!< The last value of the enum, and marks the length of clfftDirection. */
-} clfftDirection;
-
-/*!  @brief Specify wheter the input buffers are overwritten with results */
-typedef enum clfftResultLocation_
-{
-       CLFFT_INPLACE           = 1,            /*!< Input and output buffers are the same (default). */
-       CLFFT_OUTOFPLACE,                               /*!< Input and output buffers are separate. */
-       ENDPLACE                                /*!< The last value of the enum, and marks the length of clfftPlaceness. */
-} clfftResultLocation;
-
-/*! @brief Determines whether the result is returned in original order. It is valid only for
-dimensions greater than 1. */
-typedef enum clfftResultTransposed_ {
-       CLFFT_NOTRANSPOSE = 1,          /*!< The result is returned in the original order (default) */
-       CLFFT_TRANSPOSED,                       /*!< The result is transposed where transpose kernel is supported (possibly faster) */
-       ENDTRANSPOSED                   /*!< The last value of the enum, and marks the length of clfftResultTransposed */
-} clfftResultTransposed;
-
-/*!    BitMasks to be used with clfftSetupData.debugFlags */
-#define CLFFT_DUMP_PROGRAMS 0x1
-
-/*! @brief Data structure that can be passed to clfftSetup() to control the behavior of the FFT runtime
- *  @details This structure contains values that can be initialized before instantiation of the FFT runtime
- *  with ::clfftSetup().  To initialize this structure, pass a pointer to a user struct to ::clfftInitSetupData( ),
- *  which clears the structure and sets the version member variables to the current values.
- */
-struct clfftSetupData_
-{
-       cl_uint major;          /*!< Major version number of the project; signifies possible major API changes. */
-       cl_uint minor;          /*!< Minor version number of the project; minor API changes that can break backward compatibility. */
-       cl_uint patch;          /*!< Patch version number of the project; always incrementing number, signifies change over time. */
-
-       /*!     Bitwise flags that control the behavior of library debug logic. */
-       cl_ulong debugFlags;  /*! This must be set to zero, except when debugging the clfft library.
-                              *  <p> debugFlags can be set to CLFFT_DUMP_PROGRAMS, in which case the dynamically generated OpenCL kernels are
-                              *  written to text files in the current working directory.  These files have a *.cl suffix.
-                              */
-};
-typedef struct clfftSetupData_ clfftSetupData;
-
-/*! @brief Type of Callback function.
-*/
-typedef enum clfftCallbackType_
-{
-       PRECALLBACK,    /*!< Callback function is invoked only once for every point of input at the beginning of FFT transform. */
-       POSTCALLBACK    /*!< Callback function is invoked only once for every point of output at the end of FFT transform. */
-}clfftCallbackType;
-
-/*!  @brief An abstract handle to the object that represents the state of the FFT(s) */
-typedef size_t clfftPlanHandle;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-       /*! @brief Initialize a clfftSetupData struct for the client
-        *  @details clfftSetupData is passed to clfftSetup to control behavior of the FFT runtime.
-        *  @param[out] setupData Data structure is cleared and initialized with version information and default values
-        *  @return Enum describes the error condition; superset of OpenCL error codes
-        */
-       CLFFTAPI clfftStatus clfftInitSetupData( clfftSetupData* setupData );
-
-
-       /*! @brief Initialize the internal FFT resources.
-        *  @details The internal resources include FFT implementation caches kernels, programs, and buffers.
-        *  @param[in] setupData Data structure that is passed into the setup routine to control FFT generation behavior
-        *      and debug functionality
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       CLFFTAPI clfftStatus    clfftSetup( const clfftSetupData* setupData );
-
-       /*! @brief Release all internal resources.
-        *  @details Called when client is done with the FFT library, allowing the library to destroy all resources it has cached
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       CLFFTAPI clfftStatus    clfftTeardown( );
-
-       /*! @brief Query the FFT library for version information
-        *  @details Returns the major, minor and patch version numbers associated with the FFT library
-        *  @param[out] major Major functionality change
-        *  @param[out] minor Minor functionality change
-        *  @param[out] patch Bug fixes, documentation changes, no new features introduced
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       CLFFTAPI clfftStatus    clfftGetVersion( cl_uint* major, cl_uint* minor, cl_uint* patch );
-
-       /*! @brief Create a plan object initialized entirely with default values.
-        *  @details A plan is a repository of state for calculating FFT's.  Allows the runtime to pre-calculate kernels, programs
-        *      and buffers and associate them with buffers of specified dimensions.
-        *  @param[out] plHandle Handle to the newly created plan
-        *  @param[in] context Client is responsible for providing an OpenCL context for the plan
-        *  @param[in] dim Dimensionality of the FFT transform; describes how many elements are in the array
-        *  @param[in] clLengths An array of length of size 'dim';  each array value describes the length of each dimension
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       CLFFTAPI clfftStatus    clfftCreateDefaultPlan( clfftPlanHandle* plHandle, cl_context context, const clfftDim dim,
-                                                               const size_t* clLengths );
-
-       /*! @brief Create a copy of an existing plan.
-        *  @details This API allows a client to create a new plan based upon an existing plan.  This function can be used to
-        *  quickly create plans that are similar, but may differ slightly.
-        *  @param[out] out_plHandle Handle to the newly created plan that is based on in_plHandle
-        *  @param[in] new_context Client is responsible for providing a new context for the new plan
-        *  @param[in] in_plHandle Handle to a previously created plan that is to be copied
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       CLFFTAPI clfftStatus    clfftCopyPlan( clfftPlanHandle* out_plHandle, cl_context new_context, clfftPlanHandle in_plHandle );
-
-       /*! @brief Prepare the plan for execution.
-        *  @details After all plan parameters are set, the client has the option of 'baking' the plan, which informs the runtime that
-        *  no more change to the parameters of the plan is expected, and the OpenCL kernels can be compiled.  This optional function
-        *  allows the client application to perform the OpenCL kernel compilation when the application is initialized instead of during the first
-        *  execution.
-        *  At this point, the clfft runtime applies all implimented optimizations, including
-        *  running kernel experiments on the devices in the plan context.
-        *  <p>  This function takes a long time to execute. If a plan is not baked before being executed,
-        *  the first call to clfftEnqueueTransform takes a long time to execute.
-        *  <p>  If any significant parameter of a plan is changed after the plan is baked (by a subsequent call to any one of
-        *  the functions that has the prefix "clfftSetPlan"), it is not considered an error.  Instead, the plan reverts back to
-        *  the unbaked state, discarding the benefits of the baking operation.
-        *  @param[in] plHandle Handle to a previously created plan
-        *  @param[in] numQueues Number of command queues in commQueueFFT; 0 is a valid value, in which case the client does not want
-        *      the runtime to run load experiments and only pre-calculate state information
-        *  @param[in] commQueueFFT An array of cl_command_queues created by the client; the command queues must be a proper subset of
-        *      the devices included in the plan context
-        *  @param[in] pfn_notify A function pointer to a notification routine. The notification routine is a callback function that
-        *  an application can register and is called when the program executable is built (successfully or unsuccessfully).
-        *  Currently, this parameter MUST be NULL or nullptr.
-        *  @param[in] user_data Passed as an argument when pfn_notify is called.
-        *  Currently, this parameter MUST be NULL or nullptr.
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       CLFFTAPI clfftStatus    clfftBakePlan( clfftPlanHandle plHandle, cl_uint numQueues, cl_command_queue* commQueueFFT,
-                                                       void (CL_CALLBACK *pfn_notify)(clfftPlanHandle plHandle, void *user_data), void* user_data );
-
-       /*! @brief Release the resources of a plan.
-        *  @details A plan may include resources, such as kernels, programs, and buffers that consume memory.  When a plan
-        *  is no more needed, the client must release the plan.
-        *  @param[in,out] plHandle Handle to a previously created plan
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       CLFFTAPI clfftStatus    clfftDestroyPlan( clfftPlanHandle* plHandle );
-
-       /*! @brief Retrieve the OpenCL context of a previously created plan.
-        *  @details The user must pass a reference to a cl_context variable, which is modified to point to a
-        *  context set in the specified plan.
-        *  @param[in] plHandle Handle to a previously created plan
-        *  @param[out] context Reference to the user allocated cl_context, which points to context set in the plan
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       CLFFTAPI clfftStatus    clfftGetPlanContext( const clfftPlanHandle plHandle, cl_context* context );
-
-       /*! @brief Retrieve the floating point precision of the FFT data
-        *  @details The user must pass a reference to a clfftPrecision variable, which is set to the
-        *  precision of the FFT complex data in the plan.
-        *  @param[in] plHandle Handle to a previously created plan
-        *  @param[out] precision Reference to the user clfftPrecision enum
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       CLFFTAPI clfftStatus    clfftGetPlanPrecision( const clfftPlanHandle plHandle, clfftPrecision* precision );
-
-       /*! @brief Set the floating point precision of the FFT data
-        *  @details Sets the floating point precision of the FFT complex data in the plan.
-        *  @param[in] plHandle Handle to a previously created plan
-        *  @param[in] precision Reference to the user clfftPrecision enum
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       CLFFTAPI clfftStatus    clfftSetPlanPrecision( clfftPlanHandle plHandle, clfftPrecision precision );
-
-       /*! @brief Retrieve the scaling factor that is applied to the FFT data
-        *  @details The user must pass a reference to a cl_float variable, which is set to the
-        *  floating point scaling factor that is multiplied across the FFT data.
-        *  @param[in] plHandle Handle to a previously created plan
-        *  @param[in] dir Direction of the applied scaling factor
-        *  @param[out] scale Reference to the user cl_float variable
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       CLFFTAPI clfftStatus    clfftGetPlanScale( const clfftPlanHandle plHandle, clfftDirection dir, cl_float* scale );
-
-       /*! @brief Set the scaling factor that is applied to the FFT data
-        *  @details Sets the floating point scaling factor that is
-        *  multiplied across the FFT data.
-        *  @param[in] plHandle Handle to a previously created plan
-        *  @param[in] dir Direction of the applied scaling factor
-        *  @param[in] scale Reference to the user cl_float variable
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       CLFFTAPI clfftStatus    clfftSetPlanScale( clfftPlanHandle plHandle, clfftDirection dir, cl_float scale );
-
-       /*! @brief Retrieve the number of discrete arrays that the plan can concurrently handle
-        *  @details The user must pass a reference to a cl_uint variable, which is set to the
-        *  number of discrete arrays (1D or 2D) that is batched together for the plan
-        *  @param[in] plHandle Handle to a previously created plan
-        *  @param[out] batchSize Number of discrete FFTs performed
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       CLFFTAPI clfftStatus    clfftGetPlanBatchSize( const clfftPlanHandle plHandle, size_t* batchSize );
-
-       /*! @brief Set the number of discrete arrays that the plan can concurrently handle
-        *  @details Sets the plan property which sets the number of discrete arrays (1D or 2D)
-        *  that is batched together for the plan
-        *  @param[in] plHandle Handle to a previously created plan
-        *  @param[in] batchSize Number of discrete FFTs performed
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       CLFFTAPI clfftStatus    clfftSetPlanBatchSize( clfftPlanHandle plHandle, size_t batchSize );
-
-       /*! @brief Retrieve the dimensionality of the data that is transformed
-        *  @details Queries a plan object and retrieves the value of the dimensionality that the plan is set for.  A size is returned to
-        *  help the client allocate sufficient storage to hold the dimensions in a further call to clfftGetPlanLength
-        *  @param[in] plHandle Handle to a previously created plan
-        *  @param[out] dim The dimensionality of the FFT to be transformed
-        *  @param[out] size Value to allocate an array to hold the FFT dimensions.
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       CLFFTAPI clfftStatus    clfftGetPlanDim( const clfftPlanHandle plHandle, clfftDim* dim, cl_uint* size );
-
-       /*! @brief Set the dimensionality of the data that is transformed
-        *  @details Set the dimensionality of the data that is transformed by the plan
-        *  @param[in] plHandle Handle to a previously created plan
-        *  @param[in] dim The dimensionality of the FFT to be transformed
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       CLFFTAPI clfftStatus    clfftSetPlanDim( clfftPlanHandle plHandle, const clfftDim dim );
-
-       /*! @brief Retrieve the length of each dimension of the FFT
-        *  @details The user must pass a reference to a size_t array, which is set to the
-        *  length of each discrete dimension of the FFT
-        *  @param[in] plHandle Handle to a previously created plan
-        *  @param[in] dim Dimension of the FFT; describes how many elements are in the clLengths array
-        *  @param[out] clLengths An array of length of size 'dim';  each array value describes the length of each dimension
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       CLFFTAPI clfftStatus    clfftGetPlanLength( const clfftPlanHandle plHandle, const clfftDim dim, size_t* clLengths );
-
-       /*! @brief Set the length of each dimension of the FFT
-        *  @details Sets the plan property which is the length of each discrete dimension of the FFT
-        *  @param[in] plHandle Handle to a previously created plan
-        *  @param[in] dim The dimension of the FFT; describes how many elements are in the clLengths array
-        *  @param[in] clLengths An array of length of size 'dim';  each array value describes the length of each dimension
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       CLFFTAPI clfftStatus    clfftSetPlanLength( clfftPlanHandle plHandle, const clfftDim dim, const size_t* clLengths );
-
-       /*! @brief Retrieve the distance between consecutive elements of input buffers in each dimension.
-        *  @details Depending on how the dimension is set in the plan (for 2D or 3D FFT), strideY or strideZ can be safely
-        *  ignored
-        *  @param[in] plHandle Handle to a previously created plan
-        *  @param[in] dim The dimension of the stride parameters; provides the number of elements in the array
-        *  @param[out] clStrides An array of strides, of size 'dim'.
-        */
-       CLFFTAPI clfftStatus    clfftGetPlanInStride( const clfftPlanHandle plHandle, const clfftDim dim, size_t* clStrides );
-
-       /*! @brief Set the distance between consecutive elements of input buffers in each dimension.
-        *  @details Set the plan properties which is the distance between elements in all dimensions of the input buffer
-        *  (units are in terms of clfftPrecision)
-        *  @param[in] plHandle Handle to a previously created plan
-        *  @param[in] dim The dimension of the stride parameters; provides the number of elements in the clStrides array
-        *  @param[in] clStrides An array of strides of size 'dim'. Usually, strideX=1 so that successive elements in the first dimension are stored contiguously.
-        *      Typically, strideY=LenX and strideZ=LenX*LenY with the successive elements in the second and third dimensions stored in packed format.
-        *  See  @ref DistanceStridesandPitches for details.
-        */
-       CLFFTAPI clfftStatus    clfftSetPlanInStride( clfftPlanHandle plHandle, const clfftDim dim, size_t* clStrides );
-
-       /*! @brief Retrieve the distance between consecutive elements of output buffers in each dimension.
-        *  @details Depending on how the dimension is set in the plan (for 2D or 3D FFT), strideY or strideZ can be safely
-        *  ignored
-        *  @param[in] plHandle Handle to a previously created plan
-        *  @param[in] dim The dimension of the stride parameters; provides the number of elements in the clStrides array
-        *  @param[out] clStrides An array of strides, of size 'dim'.
-        */
-       CLFFTAPI clfftStatus    clfftGetPlanOutStride( const clfftPlanHandle plHandle, const clfftDim dim, size_t* clStrides );
-
-       /*! @brief Set the distance between consecutive elements of output buffers in a dimension.
-        *  @details Sets the plan properties which is the distance between elements in all dimensions of the output buffer
-        *  (units are in terms of clfftPrecision)
-        *  @param[in] plHandle Handle to a previously created plan
-        *  @param[in] dim The dimension of the stride parameters; provides the number of elements in the clStrides array
-        *  @param[in] clStrides An array of strides of size 'dim'.  Usually, strideX=1 so that successive elements in the first dimension are stored contiguously.
-        *      Typically, strideY=LenX and strideZ=LenX*LenY cause the successive elements in the second and third dimensions be stored in packed format.
-        *  @sa clfftSetPlanInStride
-        */
-       CLFFTAPI clfftStatus    clfftSetPlanOutStride( clfftPlanHandle plHandle, const clfftDim dim, size_t* clStrides );
-
-       /*! @brief Retrieve the distance between array objects
-        *  @details Pitch is the distance between each discrete array object in an FFT array. This is only used
-        *  for 'array' dimensions in clfftDim; see clfftSetPlanDimension (units are in terms of clfftPrecision)
-        *  @param[in] plHandle Handle to a previously created plan
-        *  @param[out] iDist The distance between the beginning elements of the discrete array objects in input buffer.
-        *  For contiguous arrays in memory, iDist=(strideX*strideY*strideZ)
-        *  @param[out] oDist The distance between the beginning elements of the discrete array objects in output buffer.
-        *  For contiguous arrays in memory, oDist=(strideX*strideY*strideZ)
-        */
-       CLFFTAPI clfftStatus    clfftGetPlanDistance( const clfftPlanHandle plHandle, size_t* iDist, size_t* oDist );
-
-       /*! @brief Set the distance between array objects
-        *  @details Pitch is the distance between each discrete array object in an FFT array. This is only used
-        *  for 'array' dimensions in clfftDim; see clfftSetPlanDimension (units are in terms of clfftPrecision)
-        *  @param[in] plHandle Handle to a previously created plan
-        *  @param[out] iDist The distance between the beginning elements of the discrete array objects in input buffer.
-        *  For contiguous arrays in memory, iDist=(strideX*strideY*strideZ)
-        *  @param[out] oDist The distance between the beginning elements of the discrete array objects in output buffer.
-        *  For contiguous arrays in memory, oDist=(strideX*strideY*strideZ)
-        */
-       CLFFTAPI clfftStatus    clfftSetPlanDistance( clfftPlanHandle plHandle, size_t iDist, size_t oDist );
-
-       /*! @brief Retrieve the expected layout of the input and output buffers
-        *  @details Input and output buffers can be filled with either Hermitian, complex, or real numbers.  Complex numbers are stored
-        *  in various layouts; this function retrieves the layouts used by input and output
-        *  @param[in] plHandle Handle to a previously created plan
-        *  @param[out] iLayout Indicates how the input buffers are laid out in memory
-        *  @param[out] oLayout Indicates how the output buffers are laid out in memory
-        */
-       CLFFTAPI clfftStatus    clfftGetLayout( const clfftPlanHandle plHandle, clfftLayout* iLayout, clfftLayout* oLayout );
-
-       /*! @brief Set the expected layout of the input and output buffers
-        *  @details Input and output buffers can be filled with either Hermitian, complex, or real numbers.  Complex numbers can be stored
-        *  in various layouts; this function informs the library what layouts to use for input and output
-        *  @param[in] plHandle Handle to a previously created plan
-        *  @param[in] iLayout Indicates how the input buffers are laid out in memory
-        *  @param[in] oLayout Indicates how the output buffers are laid out in memory
-        */
-       CLFFTAPI clfftStatus    clfftSetLayout( clfftPlanHandle plHandle, clfftLayout iLayout, clfftLayout oLayout );
-
-       /*! @brief Retrieve whether the input buffers are to be overwritten with results
-        *  @details If the setting performs an in-place transform, the input buffers are overwritten with the results of the
-        *  transform.  If the setting performs an out-of-place transforms, the library looks for separate output buffers
-        *  on the Enqueue call.
-        *  @param[in] plHandle Handle to a previously created plan
-        *  @param[out] placeness Informs the library to either overwrite the input buffers with results or to write them in separate output buffers
-        */
-       CLFFTAPI clfftStatus    clfftGetResultLocation( const clfftPlanHandle plHandle, clfftResultLocation* placeness );
-
-       /*! @brief Set whether the input buffers are to be overwritten with results
-        *  @details If the setting performs an in-place transform, the input buffers are overwritten with the results of the
-        *  transform.  If the setting performs an out-of-place transforms, the library looks for separate output buffers
-        *  on the Enqueue call.
-        *  @param[in] plHandle Handle to a previously created plan
-        *  @param[in] placeness Informs the library to either overwrite the input buffers with results or to write them in separate output buffers
-        */
-       CLFFTAPI clfftStatus    clfftSetResultLocation( clfftPlanHandle plHandle, clfftResultLocation placeness );
-
-       /*! @brief Retrieve the final transpose setting of a multi-dimensional FFT
-        *  @details A multi-dimensional FFT transposes the data several times during calculation. If the client
-        *  does not care about the final transpose, to put data back in proper dimension, the final transpose can be skipped
-        *  to improve speed
-        *  @param[in] plHandle Handle to a previously created plan
-        *  @param[out] transposed Specifies whether the final transpose can be skipped
-        */
-       CLFFTAPI clfftStatus    clfftGetPlanTransposeResult( const clfftPlanHandle plHandle, clfftResultTransposed * transposed );
-
-       /*! @brief Set the final transpose setting of a multi-dimensional FFT
-        *  @details A multi-dimensional FFT transposes the data several times during calculation.  If the client
-        *  does not care about the final transpose, to put data back in proper dimension, the final transpose can be skipped
-        *  to improve speed
-        *  @param[in] plHandle Handle to a previously created plan
-        *  @param[in] transposed Specifies whether the final transpose can be skipped
-        */
-       CLFFTAPI clfftStatus    clfftSetPlanTransposeResult( clfftPlanHandle plHandle, clfftResultTransposed transposed );
-
-
-       /*! @brief Get buffer size (in bytes), which may be needed internally for an intermediate buffer
-        *  @details Very large FFT transforms may need multiple passes, and the operation needs a temporary buffer to hold
-        *  intermediate results. This function is only valid after the plan is baked, otherwise, an invalid operation error
-        *  is returned. If the returned buffersize is 0, the runtime needs no temporary buffer.
-        *  @param[in] plHandle Handle to a previously created plan
-        *  @param[out] buffersize Size in bytes for intermediate buffer
-        */
-       CLFFTAPI clfftStatus clfftGetTmpBufSize( const clfftPlanHandle plHandle, size_t* buffersize );
-
-       /*! @brief Register the callback parameters
-        *  @details Client can provide a callback function to do custom processing while reading input data and/or
-        *  writing output data. The callback function is provided as a string.
-        *  clFFT library incorporates the callback function string into the main FFT kernel. This function is used
-        *  by client to set the necessary parameters for callback
-        *  @param[in] plHandle Handle to a previously created plan
-        *  @param[in] funcName Callback function name
-        *  @param[in] funcString Callback function in string form
-        *  @param[in] localMemSize Optional - Size (bytes) of the local memory used by callback function; pass 0 if no local memory is used
-        *  @param[in] callbackType Type of callback - Pre-Callback or Post-Callback
-        *  @param[in] userdata Supplementary data if any used by callback function
-        *  @param[in] numUserdataBuffers Number of userdata buffers
-        */
-       CLFFTAPI clfftStatus clfftSetPlanCallback(clfftPlanHandle plHandle, const char* funcName, const char* funcString,
-                                                                               int localMemSize, clfftCallbackType callbackType, cl_mem *userdata, int numUserdataBuffers);
-
-
-       /*! @brief Enqueue an FFT transform operation, and return immediately (non-blocking)
-        *  @details This transform API function computes the FFT transform. It is non-blocking as it
-        *  only enqueues the OpenCL kernels for execution. The synchronization step must be managed by the user.
-        *  @param[in] plHandle Handle to a previously created plan
-        *  @param[in] dir Forward or backward transform
-        *  @param[in] numQueuesAndEvents Number of command queues in commQueues; number of expected events to be returned in outEvents
-        *  @param[in] commQueues An array of cl_command_queues created by the client; the command queues must be a proper subset of
-        *      the devices included in the OpenCL context associated with the plan
-        *  @param[in] numWaitEvents Specify the number of elements in the eventWaitList array
-        *  @param[in] waitEvents Events for which the transform waits to complete before executing on the device
-        *  @param[out] outEvents The runtime fills this array with events corresponding one to one with the input command queues passed
-        *      in commQueues.  This parameter can have the value NULL or nullptr. When the value is NULL, the client is not interested in receiving notifications
-        *      when transforms are finished, otherwise, (if not NULL) the client is responsible for allocating this array with at least
-        *      as many elements as specified in numQueuesAndEvents.
-        *  @param[in] inputBuffers An array of cl_mem objects that contain data for processing by the FFT runtime. If the transform
-        *  is in-place, the FFT results overwrite the input buffers
-        *  @param[out] outputBuffers An array of cl_mem objects that store the results of out-of-place transforms. If the transform
-        *  is in-place, this parameter may be NULL or nullptr and is completely ignored
-        *  @param[in] tmpBuffer A cl_mem object that is reserved as a temporary buffer for FFT processing. If clTmpBuffers is NULL or nullptr,
-        *  and the library needs temporary storage, an internal temporary buffer is created on the fly managed by the library.
-        *  @return Enum describing error condition; superset of OpenCL error codes
-        */
-       CLFFTAPI clfftStatus    clfftEnqueueTransform(
-                                                                                               clfftPlanHandle plHandle,
-                                                                                               clfftDirection dir,
-                                                                                               cl_uint numQueuesAndEvents,
-                                                                                               cl_command_queue* commQueues,
-                                                                                               cl_uint numWaitEvents,
-                                                                                               const cl_event* waitEvents,
-                                                                                               cl_event* outEvents,
-                                                                                               cl_mem* inputBuffers,
-                                                                                               cl_mem* outputBuffers,
-                                                                                               cl_mem tmpBuffer
-                                                                                               );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/src/include/gromacs/external/clFFT/src/include/clFFT.version.h b/src/include/gromacs/external/clFFT/src/include/clFFT.version.h
deleted file mode 100644 (file)
index 6c04664..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/* ************************************************************************
- * Copyright 2013 Advanced Micro Devices, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ************************************************************************/
-
-
-/* the configured version and settings for clFFT
- */
-#define clfftVersionMajor 2
-#define clfftVersionMinor 14
-#define clfftVersionPatch 0
-
-#define CLFFT_STATIC 1
diff --git a/src/include/gromacs/external/clFFT/src/include/convenienceFunctions.h b/src/include/gromacs/external/clFFT/src/include/convenienceFunctions.h
deleted file mode 100644 (file)
index e32bd3f..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/* ************************************************************************
- * Copyright 2013 Advanced Micro Devices, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ************************************************************************/
-
-
-/*****************************************************/
-template< typename T >
-unsigned int float_as_hex( T a ) {
-       return *(unsigned int*)&a;
-}
-
-/*****************************************************/
-template< typename T >
-T hex_as_float( unsigned int a ) {
-       return *(T*)&a;
-}
\ No newline at end of file
diff --git a/src/include/gromacs/external/clFFT/src/include/sharedLibrary.h b/src/include/gromacs/external/clFFT/src/include/sharedLibrary.h
deleted file mode 100644 (file)
index 961dbca..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/* ************************************************************************
- * Copyright 2013 Advanced Micro Devices, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ************************************************************************/
-
-
-#pragma once
-#ifndef _SHAREDLIBRARY_H_
-#define _SHAREDLIBRARY_H_
-#include <string>
-
-//     _WIN32 is defined for both 32 & 64 bit environments
-#if defined( _WIN32 )
-       #define WIN32_LEAN_AND_MEAN                     // Exclude rarely-used stuff from Windows headers
-       // Windows Header Files:
-       #include <windows.h>
-#else
-       #include <dlfcn.h>
-#endif
-
-inline void* LoadSharedLibrary( std::string unixPrefix, std::string libraryName, bool quiet )
-{
-#if defined( _WIN32 )
-       libraryName += ".dll";
-
-       //      HMODULE is actually the load address; function returns NULL if it cannot find the shared library
-       HMODULE fileHandle      = ::LoadLibraryExA( libraryName.c_str( ), NULL, NULL );
-#elif defined(__linux__) || defined(__GNU__) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__))
-        tstring linuxName = unixPrefix;
-       linuxName += libraryName += ".so";
-       void* fileHandle = ::dlopen( linuxName.c_str( ), RTLD_NOW );
-       if( !quiet && !fileHandle )
-       {
-               std::cerr << ::dlerror( ) << std::endl;
-       }
-#elif defined(__APPLE__)
-  tstring appleName = unixPrefix;
-  appleName += libraryName += ".dylib";
-  void* fileHandle = ::dlopen( appleName.c_str( ), RTLD_NOW );
-  if( !quiet && !fileHandle )
-  {
-          std::cerr << ::dlerror( ) << std::endl;
-  }
-#elif defined(__FreeBSD__)
-        tstring freebsdName = unixPrefix;
-        freebsdName += libraryName += ".so";
-        void* fileHandle = ::dlopen( freebsdName.c_str( ), RTLD_NOW );
-        if( !quiet && !fileHandle )
-        {
-                std::cerr << ::dlerror( ) << std::endl;
-        }
-#else
-        #error "unsupported platform"
-#endif
-
-       return fileHandle;
-}
-
-//     If the function succeeds, the return value is nonzero.
-//     If the function fails, the return value is zero.
-inline int FreeSharedLibrary( void*& libHandle )
-{
-       int result      = 0;
-
-#if defined( _WIN32 )
-       if( libHandle != 0 )
-               result = ::FreeLibrary( reinterpret_cast< HMODULE >( libHandle ) );
-#else
-       if( libHandle != 0 )
-               result = ( ::dlclose( libHandle ) == 0 );
-#endif
-
-       libHandle       = NULL;
-
-       return result;
-}
-
-//     This takes a shared module handle returned from LoadSharedLibrary, and a text string of a symbol
-//     to load from the module, and returns a pointer to that symbol.  If the symbol is not found, NULL
-//     is returned.  If the module handle is NULL, NULL is returned.
-inline void* LoadFunctionAddr( void* libHandle, std::string funcName )
-{
-       if( libHandle == NULL )
-               return NULL;
-
-#if defined( _WIN32 )
-       HMODULE fileHandle = reinterpret_cast< HMODULE >( libHandle );
-
-       void* pFunc     = reinterpret_cast< void* >( ::GetProcAddress( fileHandle, funcName.c_str( ) ) );
-#else
-       void* pFunc = ::dlsym( libHandle, funcName.c_str( ) );
-#endif
-
-       return pFunc;
-}
-
-#endif // _SHAREDLIBRARY_H_
diff --git a/src/include/gromacs/external/clFFT/src/include/stdafx.h b/src/include/gromacs/external/clFFT/src/include/stdafx.h
deleted file mode 100644 (file)
index 4ab26bf..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/* ************************************************************************
- * Copyright 2013 Advanced Micro Devices, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ************************************************************************/
-
-
-// stdafx.h : include file for standard system include files,
-// or project specific include files that are used frequently, but
-// are changed infrequently
-//
-
-#pragma once
-
-#define _CRT_SECURE_NO_WARNINGS
-
-#include <iostream>
-#include <sstream>
-#include <fstream>
-#include <iomanip>
-#include <cstring>
-#include <memory>
-#include <vector>
-#include <valarray>
-#include <cstring>
-#include <stdarg.h>
-#include <assert.h>
-#include <complex>
-
-//     _WIN32 is defined for both 32 & 64 bit environments
-#if defined( _WIN32 )
-       #include <tchar.h>
-       #include "targetver.h"
-
-#if !defined( NOMINMAX )
-       #define NOMINMAX
-#endif
-
-    #define WIN32_LEAN_AND_MEAN                        // Exclude rarely-used stuff from Windows headers
-       // Windows Header Files:
-       #include <windows.h>
-#endif
diff --git a/src/include/gromacs/external/clFFT/src/include/targetver.h b/src/include/gromacs/external/clFFT/src/include/targetver.h
deleted file mode 100644 (file)
index 7c05692..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/* ************************************************************************
- * Copyright 2013 Advanced Micro Devices, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ************************************************************************/
-
-
-#pragma once
-
-// Including SDKDDKVer.h defines the highest available Windows platform.
-
-// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
-// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
-
-#include <SDKDDKVer.h>
diff --git a/src/include/gromacs/external/clFFT/src/include/unicode.compatibility.h b/src/include/gromacs/external/clFFT/src/include/unicode.compatibility.h
deleted file mode 100644 (file)
index 56a365f..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/* ************************************************************************
- * Copyright 2013 Advanced Micro Devices, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ************************************************************************/
-
-
-#pragma once
-#if !defined( amd_unicode_h )
-#define amd_unicode_h
-
-//     Typedefs to support unicode and ansii compilation
-#if defined( _UNICODE )
-       typedef std::wstring            tstring;
-       typedef std::wstringstream      tstringstream;
-       typedef std::wifstream          tifstream;
-       typedef std::wofstream          tofstream;
-       typedef std::wfstream           tfstream;
-       static std::wostream&   tout    = std::wcout;
-       static std::wostream&   terr    = std::wcerr;
-#else
-       typedef std::string tstring;
-       typedef std::stringstream tstringstream;
-       typedef std::ifstream           tifstream;
-       typedef std::ofstream           tofstream;
-       typedef std::fstream            tfstream;
-       static std::ostream&    tout    = std::cout;
-       static std::ostream&    terr    = std::cerr;
-#endif
-
-//     These macros help linux cope with the conventions of windows tchar.h file
-#if defined( _WIN32 )
-       #include <tchar.h>
-       #include <windows.h>
-#else
-       #if defined( __GNUC__ )
-               typedef char TCHAR;
-               typedef char _TCHAR;
-               #define _tmain main
-
-               #if defined( UNICODE )
-                       #define _T(x)   L ## x
-               #else
-                       #define _T(x)   x
-               #endif
-       #endif
-#endif
-
-#endif
diff --git a/src/include/gromacs/external/clFFT/src/library/action.h b/src/include/gromacs/external/clFFT/src/library/action.h
deleted file mode 100644 (file)
index aecbe58..0000000
+++ /dev/null
@@ -1,314 +0,0 @@
-/* ************************************************************************
- * Copyright 2013 Advanced Micro Devices, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ************************************************************************/
-
-
-#pragma once
-#if !defined( AMD_CLFFT_action_H )
-#define AMD_CLFFT_action_H
-
-#include "plan.h"
-
-
-//
-// FFTCopyAction
-//
-// Base class for every Copy action for the FFT.
-// Currently do nothing special. The kernel generation and compilation occurs
-// by the subclass FFTGeneratedCopyAction
-// 
-class FFTCopyAction : public FFTAction
-{
-public:
-    FFTCopyAction(clfftPlanHandle plHandle, FFTPlan * plan, cl_command_queue queue, clfftStatus & err);
-
-    clfftGenerators getGenerator() { return Copy; }
-};
-
-
-//
-// FFTStockhamAction
-//
-// Base class for every Stockham action for the FFT.
-// Currently do nothing special. The kernel generation and compilation occurs
-// by the subclasses FFTGeneratedStockhamAction or FFTStaticStockhamAction
-// 
-class FFTStockhamAction : public FFTAction
-{
-public:
-    FFTStockhamAction(clfftPlanHandle plHandle, FFTPlan * plan, cl_command_queue queue, clfftStatus & err);
-
-    clfftGenerators getGenerator() { return Stockham; }
-};
-
-
-
-
-//
-// FFTTransposeGCNAction
-//
-// Base class for every TransposeGCN action for the FFT.
-// Currently do nothing special. The kernel generation and compilation occurs
-// by the subclass FFTGeneratedTransposeGCNAction
-// 
-class FFTTransposeGCNAction : public FFTAction
-{
-public:
-    FFTTransposeGCNAction(clfftPlanHandle plHandle, FFTPlan * plan, cl_command_queue queue, clfftStatus & err);
-
-    clfftGenerators getGenerator() { return Transpose_GCN; }
-};
-
-//
-// FFTTransposeSquareAction
-//
-// Base class for every TransposeSquare action for the FFT.
-// Currently do nothing special. The kernel generation and compilation occurs
-// by the subclass FFTGeneratedTransposeSquareAction
-// 
-class FFTTransposeSquareAction : public FFTAction
-{
-public:
-    FFTTransposeSquareAction(clfftPlanHandle plHandle, FFTPlan * plan, cl_command_queue queue, clfftStatus & err);
-
-    clfftGenerators getGenerator() { return Transpose_SQUARE; }
-};
-
-//
-// FFTTransposeNonSquareAction
-//
-// Base class for every TransposeSquare action for the FFT.
-// Currently do nothing special. The kernel generation and compilation occurs
-// by the subclass FFTGeneratedTransposeSquareAction
-// 
-class FFTTransposeNonSquareAction : public FFTAction
-{
-public:
-    FFTTransposeNonSquareAction(clfftPlanHandle plHandle, FFTPlan * plan, cl_command_queue queue, clfftStatus & err);
-
-    clfftGenerators getGenerator() { return Transpose_NONSQUARE; }
-};
-
-//
-// FFTGeneratedCopyAction
-//
-// Implements a Copy action for the FFT
-// Its signature is represented by FFTKernelGenKeyParams structure
-// 
-// This class implements:
-//  - the generation of the kernel string
-//  - the build of the kernel
-//
-// The structure FFTKernelGenKeyParams is used to characterize and generate
-// the appropriate copy kernel. That structure is used for the signature of
-// this action. It is common to Stockham, copy and transpose methods. For
-// convenience, this structure is used for every FFTGenerated*Action class,
-// but in practice the copy action only use a few information of that
-// structure, so a proper structure should be used instead.
-//
-class FFTGeneratedCopyAction : public FFTCopyAction
-{
-public:
-    FFTGeneratedCopyAction(clfftPlanHandle plHandle, FFTPlan * plan, cl_command_queue queue, clfftStatus & err);
-
-    typedef FFTKernelSignature<FFTKernelGenKeyParams, FFT_DEFAULT_COPY_ACTION> Signature;
-
-private:
-    Signature signature;
-
-    clfftStatus generateKernel  (FFTRepo& fftRepo, const cl_command_queue commQueueFFT );
-    clfftStatus getWorkSizes    (std::vector<size_t> & globalws, std::vector<size_t> & localws);
-    clfftStatus initParams      ();
-
-    bool buildForwardKernel();
-    bool buildBackwardKernel();
-
-public:
-
-    virtual const Signature * getSignatureData()
-    {
-        return &this->signature;
-    }
-};
-
-
-//
-// FFTGeneratedStockhamAction
-//
-// Represents a Stockham action for the FFT. This class implements the former
-// mechanism of kernel generation and compilation for Stockham method.
-// 
-// This class implements:
-//  - the generation of the kernel string
-//  - the build of the kernel
-//
-// The structure FFTKernelGenKeyParams is used to characterize and generate
-// the appropriate kernel. That structure is used for the signature of this
-// action. For convenience, this structure is used for every
-// FFTGenerated*Action class, but a "Stockham-specific" version of that
-// structure should be used instead.
-//
-class FFTGeneratedStockhamAction : public FFTStockhamAction
-{
-public:
-    FFTGeneratedStockhamAction(clfftPlanHandle plHandle, FFTPlan * plan, cl_command_queue queue, clfftStatus & err);
-    
-    typedef FFTKernelSignature<FFTKernelGenKeyParams, FFT_DEFAULT_STOCKHAM_ACTION> Signature;
-
-private:
-    Signature signature;
-
-    clfftStatus generateKernel  (FFTRepo& fftRepo, const cl_command_queue commQueueFFT );
-    clfftStatus getWorkSizes    (std::vector<size_t> & globalws, std::vector<size_t> & localws);
-    clfftStatus initParams      ();
-
-    bool buildForwardKernel();
-    bool buildBackwardKernel();
-
-public:
-
-    virtual const Signature * getSignatureData()
-    {
-        return &this->signature;
-    }
-};
-
-
-
-
-// FFTGeneratedTransposeGCNAction
-//
-// Implements a TransposeGCN action for the FFT
-// Its signature is represented by FFTKernelGenKeyParams structure
-// 
-// This class implements:
-//  - the generation of the kernel string
-//  - the build of the kernel
-// 
-// The structure FFTKernelGenKeyParams is used to characterize and generate
-// the appropriate transpose kernel. That structure is used for the signature of
-// this action. It is common to Stockham, copy and transpose methods. For
-// convenience, this structure is used for every FFTGenerated*Action class,
-// but in practice the transpose action only use a few information of that
-// structure, so a proper structure should be used instead.
-//
-class FFTGeneratedTransposeGCNAction : public FFTTransposeGCNAction
-{
-public:
-    FFTGeneratedTransposeGCNAction(clfftPlanHandle plHandle, FFTPlan * plan, cl_command_queue queue, clfftStatus & err);
-
-    typedef FFTKernelSignature<FFTKernelGenKeyParams, FFT_DEFAULT_TRANSPOSE_ACTION> Signature;
-
-private:
-    Signature signature;
-
-    clfftStatus generateKernel  (FFTRepo& fftRepo, const cl_command_queue commQueueFFT );
-    clfftStatus getWorkSizes    (std::vector<size_t> & globalws, std::vector<size_t> & localws);
-    clfftStatus initParams      ();
-
-    bool buildForwardKernel();
-    bool buildBackwardKernel();
-
-public:
-
-    virtual const Signature * getSignatureData()
-    {
-        return &this->signature;
-    }
-};
-
-
-// FFTGeneratedTransposeSquareAction
-//
-// Implements a TransposeSquare action for the FFT
-// Its signature is represented by FFTKernelGenKeyParams structure
-// 
-// This class implements:
-//  - the generation of the kernel string
-//  - the build of the kernel
-// 
-// The structure FFTKernelGenKeyParams is used to characterize and generate
-// the appropriate transpose kernel. That structure is used for the signature of
-// this action. It is common to Stockham, copy and transpose methods. For
-// convenience, this structure is used for every FFTGenerated*Action class,
-// but in practice the transpose action only use a few information of that
-// structure, so a proper structure should be used instead.
-//
-class FFTGeneratedTransposeSquareAction : public FFTTransposeSquareAction
-{
-public:
-    FFTGeneratedTransposeSquareAction(clfftPlanHandle plHandle, FFTPlan * plan, cl_command_queue queue, clfftStatus & err);
-
-    typedef FFTKernelSignature<FFTKernelGenKeyParams, FFT_DEFAULT_TRANSPOSE_ACTION> Signature;
-
-private:
-    Signature signature;
-
-    clfftStatus generateKernel  (FFTRepo& fftRepo, const cl_command_queue commQueueFFT );
-    clfftStatus getWorkSizes    (std::vector<size_t> & globalws, std::vector<size_t> & localws);
-    clfftStatus initParams      ();
-
-    bool buildForwardKernel();
-    bool buildBackwardKernel();
-
-public:
-
-    virtual const Signature * getSignatureData()
-    {
-        return &this->signature;
-    }
-};
-
-// FFTGeneratedTransposeNonSquareAction
-//
-// Implements a TransposeSquare action for the FFT
-// Its signature is represented by FFTKernelGenKeyParams structure
-// 
-// This class implements:
-//  - the generation of the kernel string
-//  - the build of the kernel
-// 
-// The structure FFTKernelGenKeyParams is used to characterize and generate
-// the appropriate transpose kernel. That structure is used for the signature of
-// this action. It is common to Stockham, copy and transpose methods. For
-// convenience, this structure is used for every FFTGenerated*Action class,
-// but in practice the transpose action only use a few information of that
-// structure, so a proper structure should be used instead.
-//
-class FFTGeneratedTransposeNonSquareAction : public FFTTransposeNonSquareAction
-{
-public:
-    FFTGeneratedTransposeNonSquareAction(clfftPlanHandle plHandle, FFTPlan * plan, cl_command_queue queue, clfftStatus & err);
-
-    typedef FFTKernelSignature<FFTKernelGenKeyParams, FFT_DEFAULT_TRANSPOSE_ACTION> Signature;
-
-private:
-    Signature signature;
-
-    clfftStatus generateKernel(FFTRepo& fftRepo, const cl_command_queue commQueueFFT);
-    clfftStatus getWorkSizes(std::vector<size_t> & globalws, std::vector<size_t> & localws);
-    clfftStatus initParams();
-
-    bool buildForwardKernel();
-    bool buildBackwardKernel();
-
-public:
-
-    virtual const Signature * getSignatureData()
-    {
-        return &this->signature;
-    }
-};
-#endif // AMD_CLFFT_action_H
diff --git a/src/include/gromacs/external/clFFT/src/library/action.transpose.h b/src/include/gromacs/external/clFFT/src/library/action.transpose.h
deleted file mode 100644 (file)
index 532707a..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/* ************************************************************************
- * Copyright 2013 Advanced Micro Devices, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ************************************************************************/
-
-#pragma once
-#if !defined( AMD_CLFFT_action_transpose_H )
-#define AMD_CLFFT_action_transpose_H
-#include "private.h"
-#include "repo.h"
-#include "plan.h"
-
-#endif
-
diff --git a/src/include/gromacs/external/clFFT/src/library/fft_binary_lookup.h b/src/include/gromacs/external/clFFT/src/library/fft_binary_lookup.h
deleted file mode 100644 (file)
index 19081f3..0000000
+++ /dev/null
@@ -1,277 +0,0 @@
-/* ************************************************************************
- * Copyright 2014 Advanced Micro Devices, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ************************************************************************/
-
-#ifndef __CLFFT_CLFFT_BINARY_LOOKUP__
-#define __CLFFT_CLFFT_BINARY_LOOKUP__
-
-#if defined(__APPLE__) || defined(__MACOSX)
-#include <OpenCL/cl.h>
-#else
-#include <CL/cl.h>
-#endif
-
-#include <string>
-#include <vector>
-
-#include "generator.h"
-#include "plan.h"
-
-//
-// FFTBinaryLookup defines an API to manage the kernel cache on the disk
-//
-// The FFTBinaryLookup object provides methods to:
-//  * check if a cache file exists on the disk or not
-//  * fill-up the signature to characterize the program beeing built on the disk
-//  * build a cl_program from a string kernel or from a binary
-// 
-// A cache entry is a file stored on the disk which contains 3 sections:
-//  * A header section (providing information about file structure)
-//  * The binary contained in the cl_program
-//  * A signature which provides additionnal informations about the kernel
-//    and allows to characterize the kernel in the disk cache
-//
-// The environment variable CLFFT_CACHE_PATH defines the location of the
-// cache on the disk. If the variable CLFFT_CACHE_PATH is not defined, no
-// cache file is written on the disk, but the cl_program can be built and
-// remains on memory
-//
-// Concerning multithreading, the policy is that every thread build the
-// cl_program from the source, but only the first one writes it on the
-// disk. Other threads continue with the cl_program in memory.
-//
-// A typical cache query shall be composed of the following steps:
-//
-//  (1) Create a local instance of FFTBinaryLookup 
-//
-//  (2) Specify the additional characteristics (i.e. variants) of the
-//      requested program. Those information combined with the program
-//      name and the OpenCL context and device shall form a unique
-//      signature for the binary program.
-// 
-//  (3) Perform the effective search by calling the 'found' method
-// 
-//  (4) if the search was successfull then cl_program can be retreived 
-//      by a call to the 'getProgram' method
-// 
-//  (5) if the search was not successfull then a cl_program 
-//      must be created  and populated in the cache by a call 
-//      to the 'setProgram' method.
-// 
-//  (6) Destroy the FFTBinaryLookup local instance.
-// 
-// For instance, that could be 
-//
-//     cl_program program  ;
-//   
-//     The program name is part of the signature and shall be unique 
-//     const char * program_name = "... my unique program name ... " ;
-//   
-//     FFTBinaryLookup bl(context, device, program_name);
-//   
-//     //  Specify additionnal information used to build a
-//     //  signature signature for that cache entry 
-//                  
-//     bl.variantInt( vectorSize );
-//     bl.variantInt( hasBorder );
-//     ... 
-//   
-//     // Perform the query 
-//     if ( bl.found() ) 
-//     {
-//        //   Success! use the cl_program retreived from the cache
-//        program = bl.getProgram();
-//     }
-//     else 
-//     {
-//        //   Failure! we need to build the program ourself
-//        program = build_the_program(context,device,vectorSize,...) ; 
-//        //   Inform the lookup object of the program
-//        bl.setProgram(program);  
-//        //   And populate the cache
-//        bl.populateCache() 
-//     }
-// 
-// Remark: The members buildFromSource, buildFromBinary etc are utility 
-//         functions that can be used to build the cl_program from either 
-//         sources or binary (e.g. SPIR). Their use is optionnal. 
-//
-//
-class FFTBinaryLookup
- {
-public:
-    // Constructor
-    // \param ctxt the context for which the cl_program should be built
-    // \param device the device for which the cl_program should be built
-    // \param kernel_name the kernel identifier
-    FFTBinaryLookup(const clfftGenerators gen, const clfftPlanHandle plHandle, cl_context ctxt, cl_device_id device);
-    ~FFTBinaryLookup();
-
-    // Methods to fill up the signature of the cache entry
-    void variantInt(int num);
-    void variantDouble(double num);
-    void variantCompileOptions(const std::string & opts);
-    void variantRaw(const void * data, size_t bytes);
-
-    // Indicates whether or not the cache entry was found on the disk
-    // If the cache entry was found and is complete on the disk, its content
-    // is loaded
-    // \return true if a cache entry was found, false else
-    bool found();
-
-    // Build a cl_program from the source code and init attributes
-    // of the current structure
-    // so that the program can be accessed with the getProgram method
-    // Write the file to the cache
-    cl_int buildFromSource(const char * source);
-
-    // Build a cl_program from the source code and init attributes
-    // so that the program can be accessed with the getProgram method
-    // Write the file to the cache
-    cl_int buildFromBinary(const void * data, 
-                           size_t len);
-
-    // Returns the cl_program built from binary or loaded from disk
-    cl_program getProgram();
-
-    // Set the current m_program to the given program
-    void setProgram(cl_program program, const char * source);
-
-    // Build a cl_program from a text
-    static cl_program buildProgramFromSource(const char * filename,
-                                             cl_context context,
-                                             cl_device_id device,
-                                             cl_int & err,
-                                             const char * options = 0);
-
-    // Build a cl_program from binary
-    static cl_program buildProgramFromBinary(const char * data,
-                                             size_t data_size,
-                                             cl_context context,
-                                             cl_device_id device,
-                                             cl_int & err,
-                                             const char * options = 0);
-
-    // Initialize the whole cache file information (magic_key, header and program)
-    // and dump on the disk
-    cl_int populateCache();
-
-private:
-
-    // Serialize variants and compute the checksum to load the file from cache
-    void finalizeVariant();
-
-    // Build a cl_program from the source code and init attributes
-    // so that the program can be accessed with the getProgram method
-    // Do not write the file to the cache
-    cl_int buildFromLoadedBinary(const void * data, 
-                                 size_t len);
-
-    // Try to retrieve the header of the cache file
-    // Returns: ok if the header sections was successfully loaded, false else
-    bool loadHeader(std::ifstream &file, size_t length);
-
-    // Try to retrieve the cl_program and its signature in file
-    // Returns: ok if the binary and signature sections were successfully loaded, false else
-    bool loadBinaryAndSignature(std::ifstream &file);
-
-    // Try to create a file associated to the current program/variant in the cache folder
-    // Returns true if the file was successfully opened and loaded, false else
-    bool tryLoadCacheFile();
-
-    // Dump the file on the disk with the name stored in this->m_cache_entry_name
-    cl_int writeCacheFile(std::vector<unsigned char*> &data);
-
-    // Retrieve device name, device vendor and driver number by calling
-    // clGetDeviceInfo
-    cl_int retrieveDeviceAndDriverInfo();
-
-    // Cache entry name 
-    std::string m_cache_entry_name;
-
-    // Path for the cache entry name
-    std::string m_path;
-
-    // Header structure of a cache entry
-    typedef struct Header_
-    {
-        char magic_key[4]; // = |C|L|F|\0, useful to know that we are loading a clfft cache entry
-        size_t whole_file_size; // the whole file of the size to know if the current file is complete or not
-        size_t header_size; // = sizeof(Header)
-        size_t binary_size; // kernel binary size
-        size_t signature_size; // variant information
-    } Header;
-
-    Header m_header;
-
-    cl_context   m_context;
-    cl_device_id m_device;
-
-    cl_program   m_program;
-
-    std::string  m_source;
-
-    unsigned char * m_binary;
-    char *          m_signature;
-
-    enum VariantKind
-    {
-        INT,
-        DOUBLE,
-        STRING,
-        DATA
-    };
-
-    struct Variant
-    {
-        Variant();
-        Variant(VariantKind kind, char * data, size_t size);
-               Variant(const Variant &obj);
-               Variant &operator=(const Variant &obj);
-
-
-        ~Variant();
-
-        VariantKind m_kind;
-        size_t      m_size;
-        char *      m_data;
-        
-    };
-
-    // Cache entry, useful to abstract Windows and linux 
-    // cache entry file descriptor
-    struct CacheEntry
-    {
-        CacheEntry(const std::string & filename);
-        bool exclusive_create();
-        void close();
-        bool successful_creation();
-
-    private:
-        std::string m_filename;
-        bool        m_successful_creation;
-        void *      m_handle;
-    };
-
-    // Variants
-    std::vector<Variant> m_variants;
-
-    // Indicates whether the cache should be used or not
-    bool m_cache_enabled;
-};
-
-#undef SIZE
-
-#endif
diff --git a/src/include/gromacs/external/clFFT/src/library/generator.h b/src/include/gromacs/external/clFFT/src/library/generator.h
deleted file mode 100644 (file)
index fbf5cce..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/* ************************************************************************
- * Copyright 2013 Advanced Micro Devices, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ************************************************************************/
-
-
-#pragma once
-#if !defined( AMD_CLFFT_generator_H )
-#define AMD_CLFFT_generator_H
-
-//     Enum to help provide descriptive names to array indices, when indexing into our various vectors
-enum clfftGenerators
-{
-    Stockham, // Using the Stockham autosort frameworks
-    Transpose_GCN,
-    Transpose_SQUARE,
-    Transpose_NONSQUARE,
-    Copy,
-    ENDGENERATORS                      ///< This value will always be last, and marks the length of clfftGenerators
-};
-
-#endif
diff --git a/src/include/gromacs/external/clFFT/src/library/generator.stockham.h b/src/include/gromacs/external/clFFT/src/library/generator.stockham.h
deleted file mode 100644 (file)
index df5a37c..0000000
+++ /dev/null
@@ -1,2101 +0,0 @@
-/* ************************************************************************
- * Copyright 2013 Advanced Micro Devices, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ************************************************************************/
-
-#ifdef _MSC_VER
-#pragma warning(disable : 4996)
-#endif
-
-#pragma once
-#if !defined( AMD_CLFFT_generator_stockham_H )
-#define AMD_CLFFT_generator_stockham_H
-#include <stdio.h>
-#include "private.h"
-#include "repo.h"
-#include "plan.h"
-
-typedef union {
-       cl_float f;
-       cl_uint  u;
-       cl_int   i;
-} cb_t;
-
-namespace StockhamGenerator
-{
-       // Precision
-       enum Precision
-       {
-               P_SINGLE,
-               P_DOUBLE,
-       };
-
-       template <Precision PR>
-       inline size_t PrecisionWidth()
-       {
-               switch(PR)
-               {
-               case P_SINGLE:  return 1;
-               case P_DOUBLE:  return 2;
-               default:                assert(false); return 1;
-               }
-       }
-
-       template <Precision PR>
-       inline std::string ClPragma()
-       {
-               switch(PR)
-               {
-               case P_SINGLE:  return "";
-               case P_DOUBLE:  return  "\n#ifdef cl_khr_fp64\n"
-                                                               "#pragma OPENCL EXTENSION cl_khr_fp64 : enable\n"
-                                                               "#else\n"
-                                                               "#pragma OPENCL EXTENSION cl_amd_fp64 : enable\n"
-                                                               "#endif\n\n";
-               default:                assert(false); return "";
-               }
-       }
-
-       // Convert unsigned integers to string
-       inline std::string SztToStr(size_t i)
-       {
-               std::stringstream ss;
-               ss << i;
-               return ss.str();
-       }
-
-       inline std::string FloatToStr(double f)
-       {
-               std::stringstream ss;
-               ss.imbue(std::locale("C"));
-               ss.precision(16);
-               ss << std::scientific << f;
-               return ss.str();
-       }
-
-
-       //      Find the smallest power of 2 that is >= n; return its power of 2 factor
-       //      e.g., CeilPo2 (7) returns 3 : (2^3 >= 7)
-       inline size_t CeilPo2 (size_t n)
-       {
-               size_t v = 1, t = 0;
-               while(v < n)
-               {
-                       v <<= 1;
-                       t++;
-               }
-
-               return t;
-       }
-
-       inline size_t FloorPo2 (size_t n)
-       //      return the largest power of 2 that is <= n.
-       //      e.g., FloorPo2 (7) returns 4.
-       // *** TODO use x86 BSR instruction, using compiler intrinsics.
-       {
-               size_t tmp;
-               while (0 != (tmp = n & (n-1)))
-                       n = tmp;
-               return n;
-       }
-
-       typedef std::pair<std::string,std::string> stringpair;
-       inline stringpair ComplexMul(const char *type, const char * a, const char * b, bool forward = true)
-       {
-               stringpair result;
-               result.first = "(";
-               result.first += type;
-               result.first += ") ((";
-               result.first += a;
-               result.first += ".x * ";
-               result.first += b;
-               result.first += (forward ? ".x - " : ".x + ");
-               result.first += a;
-               result.first += ".y * ";
-               result.first += b;
-               result.first += ".y),";
-               result.second = "(";
-               result.second += a;
-               result.second += ".y * ";
-               result.second += b;
-               result.second += (forward ? ".x + " : ".x - ");
-               result.second += a;
-               result.second += ".x * ";
-               result.second += b;
-               result.second += ".y))";
-               return result;
-       }
-
-
-       // Register data base types
-       template <Precision PR>
-       inline std::string RegBaseType(size_t count)
-       {
-               switch(PR)
-               {
-               case P_SINGLE:
-                       switch(count)
-                       {
-                       case 1: return "float";
-                       case 2: return "float2";
-                       case 4: return "float4";
-                       default: assert(false); return "";
-                       }
-                       break;
-               case P_DOUBLE:
-                       switch(count)
-                       {
-                       case 1: return "double";
-                       case 2: return "double2";
-                       case 4: return "double4";
-                       default: assert(false); return "";
-                       }
-                       break;
-               default:
-                       assert(false); return "";
-               }
-       }
-
-       template <Precision PR>
-       inline std::string FloatSuffix()
-       {
-               // Suffix for constants
-               std::string sfx;
-               switch(PR)
-               {
-               case P_SINGLE: sfx = "f"; break;
-               case P_DOUBLE: sfx = "";  break;
-               default: assert(false);
-               }
-
-               return sfx;
-       }
-
-       inline std::string ButterflyName(size_t radix, size_t count, bool fwd)
-       {
-               std::string str;
-               if(fwd) str += "Fwd";
-               else    str += "Inv";
-               str += "Rad"; str += SztToStr(radix);
-               str += "B"; str += SztToStr(count);
-               return str;
-       }
-
-       inline std::string PassName(size_t pos, bool fwd)
-       {
-               std::string str;
-               if(fwd) str += "Fwd";
-               else    str += "Inv";
-               str += "Pass"; str += SztToStr(pos);
-               return str;
-       }
-
-       inline std::string TwTableName()
-       {
-               return "twiddles";
-       }
-
-       inline std::string TwTableLargeName()
-       {
-               return "twiddle_dee";
-       }
-
-       inline std::string TwTableLargeFunc()
-       {
-               return "TW3step";
-       }
-
-       // Twiddle factors table for large N
-       // used in 3-step algorithm
-    class TwiddleTableLarge
-    {
-        size_t N; // length
-               size_t X, Y;
-               size_t tableSize;
-               double *wc, *ws; // cosine, sine arrays
-
-       public:
-               TwiddleTableLarge(size_t length) : N(length)
-               {
-                       X = size_t(1) << ARBITRARY::TWIDDLE_DEE;
-                       Y = DivRoundingUp<size_t> (CeilPo2(N), ARBITRARY::TWIDDLE_DEE);
-                       tableSize = X * Y;
-
-                       // Allocate memory for the tables
-                       wc = new double[tableSize];
-                       ws = new double[tableSize];
-               }
-
-               ~TwiddleTableLarge()
-               {
-                       // Free
-                       delete[] wc;
-                       delete[] ws;
-               }
-
-               template <Precision PR>
-               void GenerateTwiddleTable(std::string &twStr)
-               {
-                       const double TWO_PI = -6.283185307179586476925286766559;
-
-                       // Generate the table
-                       size_t nt = 0;
-                       double phi = TWO_PI / double (N);
-                       for (size_t iY = 0; iY < Y; ++iY)
-                       {
-                               size_t i = size_t(1) << (iY * ARBITRARY::TWIDDLE_DEE);
-                               for (size_t iX = 0; iX < X; ++iX)
-                               {
-                                       size_t j = i * iX;
-
-                                       double c = cos(phi * (double)j);
-                                       double s = sin(phi * (double)j);
-
-                                       //if (fabs(c) < 1.0E-12)        c = 0.0;
-                                       //if (fabs(s) < 1.0E-12)        s = 0.0;
-
-                                       wc[nt]   = c;
-                                       ws[nt++] = s;
-                               }
-                       }
-
-                       std::string sfx = FloatSuffix<PR>();
-
-                       // Stringize the table
-                       std::stringstream ss;
-                       ss.imbue(std::locale("C"));
-                       ss.precision(34);
-                       ss << std::scientific;
-                       nt = 0;
-
-                       ss << "\n __constant ";
-                       ss << RegBaseType<PR>(2);
-                       ss << " " << TwTableLargeName();
-                       ss << "[" << Y << "][" << X << "] = {\n";
-                       for (size_t iY = 0; iY < Y; ++iY)
-                       {
-                               ss << "{ ";
-                               for (size_t iX = 0; iX < X; ++iX)
-                               {
-                                       ss << "("; ss << RegBaseType<PR>(2); ss << ")(";
-                                       ss << wc[nt] << sfx << ", ";
-                                       ss << ws[nt++] << sfx << "),\n";
-                               }
-                               ss << " },\n";
-                       }
-                       ss << "};\n\n";
-
-                       // Twiddle calc function
-                       ss << "__attribute__((always_inline)) ";
-                       ss << RegBaseType<PR>(2);
-                       ss << "\n" << TwTableLargeFunc() << "(size_t u)\n{\n";
-
-                       ss << "\t" "size_t j = u & " << unsigned(X-1) << ";\n";
-                       ss << "\t" ; ss << RegBaseType<PR>(2); ss << " result = ";
-                       ss << TwTableLargeName();
-                       ss << "[0][j];\n";
-
-                       for (size_t iY = 1; iY < Y; ++iY)
-                       {
-                               std::string phasor = TwTableLargeName();
-                               phasor += "[";
-                               phasor += SztToStr(iY);
-                               phasor += "][j]";
-
-                               stringpair product = ComplexMul((RegBaseType<PR>(2)).c_str(), "result", phasor.c_str());
-
-                               ss << "\t" "u >>= " << unsigned (ARBITRARY::TWIDDLE_DEE) << ";\n";
-                               ss << "\t" "j = u & " << unsigned(X-1) << ";\n";
-                               ss << "\t" "result = " << product.first << "\n";
-                               ss << "\t" "\t" << product.second <<";\n";
-                       }
-                       ss << "\t" "return result;\n}\n\n";
-
-                       twStr += ss.str();
-               }
-       };
-
-       // FFT butterfly
-    template <Precision PR>
-    class Butterfly
-    {
-               size_t radix;           // Base radix
-        size_t count;       // Number of basic butterflies, valid values: 1,2,4
-               bool fwd;                       // FFT direction
-               bool cReg;                      // registers are complex numbers, .x (real), .y(imag)
-
-               size_t BitReverse (size_t n, size_t N) const
-               {
-                       return (N < 2) ? n : (BitReverse (n >> 1, N >> 1) | ((n & 1) != 0 ? (N >> 1) : 0));
-               }
-
-               void GenerateButterflyStr(std::string &bflyStr) const
-               {
-                       std::string regType = cReg ? RegBaseType<PR>(2) : RegBaseType<PR>(count);
-
-                       // Function attribute
-                       bflyStr += "__attribute__((always_inline)) void \n";
-
-                       // Function name
-                       bflyStr += ButterflyName(radix, count, fwd);
-
-                       // Function Arguments
-                       bflyStr += "(";
-                       for(size_t i=0;;i++)
-                       {
-                               if(cReg)
-                               {
-                                       bflyStr += regType; bflyStr += " *R";
-                                       if(radix & (radix-1))   bflyStr += SztToStr(i);
-                                       else                                    bflyStr += SztToStr(BitReverse(i,radix));
-                               }
-                               else
-                               {
-                                       bflyStr += regType; bflyStr += " *R"; bflyStr += SztToStr(i); bflyStr += ", ";  // real arguments
-                                       bflyStr += regType; bflyStr += " *I"; bflyStr += SztToStr(i);                                   // imaginary arguments
-                               }
-
-                               if(i == radix-1)
-                               {
-                                       bflyStr += ")";
-                                       break;
-                               }
-                               else
-                               {
-                                       bflyStr += ", ";
-                               }
-                       }
-
-                       bflyStr += "\n{\n\n";
-
-
-                       // Temporary variables
-                       // Allocate temporary variables if we are not using complex registers (cReg = 0) or if cReg is true, then
-                       // allocate temporary variables only for non power-of-2 radices
-                       if (!( (radix == 7 && cReg) || (radix == 11 && cReg) || (radix == 13 && cReg) ))
-                       {
-                       if( (radix & (radix-1)) || (!cReg) )
-                       {
-                               bflyStr += "\t";
-                               if(cReg)
-                                       bflyStr += RegBaseType<PR>(1);
-                               else
-                                       bflyStr += regType;
-
-                               for(size_t i=0;;i++)
-                               {
-                                       bflyStr += " TR"; bflyStr += SztToStr(i); bflyStr += ",";       // real arguments
-                                       bflyStr += " TI"; bflyStr += SztToStr(i);                                       // imaginary arguments
-
-                                       if(i == radix-1)
-                                       {
-                                               bflyStr += ";";
-                                               break;
-                                       }
-                                       else
-                                       {
-                                               bflyStr += ",";
-                                       }
-                               }
-                       }
-                       else
-                       {
-                               bflyStr += "\t";
-                               bflyStr += RegBaseType<PR>(2);
-                               bflyStr += " T;";
-                               }
-                       }
-
-
-                       bflyStr += "\n\n\t";
-
-                       // Butterfly for different radices
-                       switch(radix)
-                       {
-                       case 2:
-                               {
-                                       if(cReg)
-                                       {
-                                               bflyStr +=
-                                               "(*R1) = (*R0) - (*R1);\n\t"
-                                               "(*R0) = 2.0f * (*R0) - (*R1);\n\t";
-                                       }
-                                       else
-                                       {
-                                               bflyStr +=
-                                               "TR0 = (*R0) + (*R1);\n\t"
-                                               "TI0 = (*I0) + (*I1);\n\t"
-                                               "TR1 = (*R0) - (*R1);\n\t"
-                                               "TI1 = (*I0) - (*I1);\n\t";
-                                       }
-
-                               } break;
-                       case 3:
-                               {
-                                       if(fwd)
-                                       {
-                                               if(cReg)
-                                               {
-                                                       bflyStr +=
-                                                       "TR0 = (*R0).x + (*R1).x + (*R2).x;\n\t"
-                                                       "TR1 = ((*R0).x - C3QA*((*R1).x + (*R2).x)) + C3QB*((*R1).y - (*R2).y);\n\t"
-                                                       "TR2 = ((*R0).x - C3QA*((*R1).x + (*R2).x)) - C3QB*((*R1).y - (*R2).y);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TI0 = (*R0).y + (*R1).y + (*R2).y;\n\t"
-                                                       "TI1 = ((*R0).y - C3QA*((*R1).y + (*R2).y)) - C3QB*((*R1).x - (*R2).x);\n\t"
-                                                       "TI2 = ((*R0).y - C3QA*((*R1).y + (*R2).y)) + C3QB*((*R1).x - (*R2).x);\n\t";
-                                               }
-                                               else
-                                               {
-                                                       bflyStr +=
-                                                       "TR0 = *R0 + *R1 + *R2;\n\t"
-                                                       "TR1 = (*R0 - C3QA*(*R1 + *R2)) + C3QB*(*I1 - *I2);\n\t"
-                                                       "TR2 = (*R0 - C3QA*(*R1 + *R2)) - C3QB*(*I1 - *I2);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TI0 = *I0 + *I1 + *I2;\n\t"
-                                                       "TI1 = (*I0 - C3QA*(*I1 + *I2)) - C3QB*(*R1 - *R2);\n\t"
-                                                       "TI2 = (*I0 - C3QA*(*I1 + *I2)) + C3QB*(*R1 - *R2);\n\t";
-                                               }
-                                       }
-                                       else
-                                       {
-                                               if(cReg)
-                                               {
-                                                       bflyStr +=
-                                                       "TR0 = (*R0).x + (*R1).x + (*R2).x;\n\t"
-                                                       "TR1 = ((*R0).x - C3QA*((*R1).x + (*R2).x)) - C3QB*((*R1).y - (*R2).y);\n\t"
-                                                       "TR2 = ((*R0).x - C3QA*((*R1).x + (*R2).x)) + C3QB*((*R1).y - (*R2).y);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TI0 = (*R0).y + (*R1).y + (*R2).y;\n\t"
-                                                       "TI1 = ((*R0).y - C3QA*((*R1).y + (*R2).y)) + C3QB*((*R1).x - (*R2).x);\n\t"
-                                                       "TI2 = ((*R0).y - C3QA*((*R1).y + (*R2).y)) - C3QB*((*R1).x - (*R2).x);\n\t";
-                                               }
-                                               else
-                                               {
-                                                       bflyStr +=
-                                                       "TR0 = *R0 + *R1 + *R2;\n\t"
-                                                       "TR1 = (*R0 - C3QA*(*R1 + *R2)) - C3QB*(*I1 - *I2);\n\t"
-                                                       "TR2 = (*R0 - C3QA*(*R1 + *R2)) + C3QB*(*I1 - *I2);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TI0 = *I0 + *I1 + *I2;\n\t"
-                                                       "TI1 = (*I0 - C3QA*(*I1 + *I2)) + C3QB*(*R1 - *R2);\n\t"
-                                                       "TI2 = (*I0 - C3QA*(*I1 + *I2)) - C3QB*(*R1 - *R2);\n\t";
-                                               }
-                                       }
-                               } break;
-                       case 4:
-                               {
-                                       if(fwd)
-                                       {
-                                               if(cReg)
-                                               {
-                                                       bflyStr +=
-                                                       "(*R1) = (*R0) - (*R1);\n\t"
-                                                       "(*R0) = 2.0f * (*R0) - (*R1);\n\t"
-                                                       "(*R3) = (*R2) - (*R3);\n\t"
-                                                       "(*R2) = 2.0f * (*R2) - (*R3);\n\t"
-                                                       "\n\t"
-                                                       "(*R2) = (*R0) - (*R2);\n\t"
-                                                       "(*R0) = 2.0f * (*R0) - (*R2);\n\t"
-                                                       "(*R3) = (*R1) + (fvect2)(-(*R3).y, (*R3).x);\n\t"
-                                                       "(*R1) = 2.0f * (*R1) - (*R3);\n\t";
-                                               }
-                                               else
-                                               {
-                                                       bflyStr +=
-                                                       "TR0 = (*R0) + (*R2) + (*R1) + (*R3);\n\t"
-                                                       "TR1 = (*R0) - (*R2) + (*I1) - (*I3);\n\t"
-                                                       "TR2 = (*R0) + (*R2) - (*R1) - (*R3);\n\t"
-                                                       "TR3 = (*R0) - (*R2) - (*I1) + (*I3);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TI0 = (*I0) + (*I2) + (*I1) + (*I3);\n\t"
-                                                       "TI1 = (*I0) - (*I2) - (*R1) + (*R3);\n\t"
-                                                       "TI2 = (*I0) + (*I2) - (*I1) - (*I3);\n\t"
-                                                       "TI3 = (*I0) - (*I2) + (*R1) - (*R3);\n\t";
-                                               }
-                                       }
-                                       else
-                                       {
-                                               if(cReg)
-                                               {
-                                                       bflyStr +=
-                                                       "(*R1) = (*R0) - (*R1);\n\t"
-                                                       "(*R0) = 2.0f * (*R0) - (*R1);\n\t"
-                                                       "(*R3) = (*R2) - (*R3);\n\t"
-                                                       "(*R2) = 2.0f * (*R2) - (*R3);\n\t"
-                                                       "\n\t"
-                                                       "(*R2) = (*R0) - (*R2);\n\t"
-                                                       "(*R0) = 2.0f * (*R0) - (*R2);\n\t"
-                                                       "(*R3) = (*R1) + (fvect2)((*R3).y, -(*R3).x);\n\t"
-                                                       "(*R1) = 2.0f * (*R1) - (*R3);\n\t";
-                                               }
-                                               else
-                                               {
-                                                       bflyStr +=
-                                                       "TR0 = (*R0) + (*R2) + (*R1) + (*R3);\n\t"
-                                                       "TR1 = (*R0) - (*R2) - (*I1) + (*I3);\n\t"
-                                                       "TR2 = (*R0) + (*R2) - (*R1) - (*R3);\n\t"
-                                                       "TR3 = (*R0) - (*R2) + (*I1) - (*I3);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TI0 = (*I0) + (*I2) + (*I1) + (*I3);\n\t"
-                                                       "TI1 = (*I0) - (*I2) + (*R1) - (*R3);\n\t"
-                                                       "TI2 = (*I0) + (*I2) - (*I1) - (*I3);\n\t"
-                                                       "TI3 = (*I0) - (*I2) - (*R1) + (*R3);\n\t";
-                                               }
-                                       }
-                               } break;
-                       case 5:
-                               {
-                                       if(fwd)
-                                       {
-                                               if(cReg)
-                                               {
-                                                       bflyStr +=
-                                                       "TR0 = (*R0).x + (*R1).x + (*R2).x + (*R3).x + (*R4).x;\n\t"
-                                                       "TR1 = ((*R0).x - C5QC*((*R2).x + (*R3).x)) + C5QB*((*R1).y - (*R4).y) + C5QD*((*R2).y - (*R3).y) + C5QA*(((*R1).x - (*R2).x) + ((*R4).x - (*R3).x));\n\t"
-                                                       "TR4 = ((*R0).x - C5QC*((*R2).x + (*R3).x)) - C5QB*((*R1).y - (*R4).y) - C5QD*((*R2).y - (*R3).y) + C5QA*(((*R1).x - (*R2).x) + ((*R4).x - (*R3).x));\n\t"
-                                                       "TR2 = ((*R0).x - C5QC*((*R1).x + (*R4).x)) - C5QB*((*R2).y - (*R3).y) + C5QD*((*R1).y - (*R4).y) + C5QA*(((*R2).x - (*R1).x) + ((*R3).x - (*R4).x));\n\t"
-                                                       "TR3 = ((*R0).x - C5QC*((*R1).x + (*R4).x)) + C5QB*((*R2).y - (*R3).y) - C5QD*((*R1).y - (*R4).y) + C5QA*(((*R2).x - (*R1).x) + ((*R3).x - (*R4).x));\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TI0 = (*R0).y + (*R1).y + (*R2).y + (*R3).y + (*R4).y;\n\t"
-                                                       "TI1 = ((*R0).y - C5QC*((*R2).y + (*R3).y)) - C5QB*((*R1).x - (*R4).x) - C5QD*((*R2).x - (*R3).x) + C5QA*(((*R1).y - (*R2).y) + ((*R4).y - (*R3).y));\n\t"
-                                                       "TI4 = ((*R0).y - C5QC*((*R2).y + (*R3).y)) + C5QB*((*R1).x - (*R4).x) + C5QD*((*R2).x - (*R3).x) + C5QA*(((*R1).y - (*R2).y) + ((*R4).y - (*R3).y));\n\t"
-                                                       "TI2 = ((*R0).y - C5QC*((*R1).y + (*R4).y)) + C5QB*((*R2).x - (*R3).x) - C5QD*((*R1).x - (*R4).x) + C5QA*(((*R2).y - (*R1).y) + ((*R3).y - (*R4).y));\n\t"
-                                                       "TI3 = ((*R0).y - C5QC*((*R1).y + (*R4).y)) - C5QB*((*R2).x - (*R3).x) + C5QD*((*R1).x - (*R4).x) + C5QA*(((*R2).y - (*R1).y) + ((*R3).y - (*R4).y));\n\t";
-                                               }
-                                               else
-                                               {
-                                                       bflyStr +=
-                                                       "TR0 = *R0 + *R1 + *R2 + *R3 + *R4;\n\t"
-                                                       "TR1 = (*R0 - C5QC*(*R2 + *R3)) + C5QB*(*I1 - *I4) + C5QD*(*I2 - *I3) + C5QA*((*R1 - *R2) + (*R4 - *R3));\n\t"
-                                                       "TR4 = (*R0 - C5QC*(*R2 + *R3)) - C5QB*(*I1 - *I4) - C5QD*(*I2 - *I3) + C5QA*((*R1 - *R2) + (*R4 - *R3));\n\t"
-                                                       "TR2 = (*R0 - C5QC*(*R1 + *R4)) - C5QB*(*I2 - *I3) + C5QD*(*I1 - *I4) + C5QA*((*R2 - *R1) + (*R3 - *R4));\n\t"
-                                                       "TR3 = (*R0 - C5QC*(*R1 + *R4)) + C5QB*(*I2 - *I3) - C5QD*(*I1 - *I4) + C5QA*((*R2 - *R1) + (*R3 - *R4));\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TI0 = *I0 + *I1 + *I2 + *I3 + *I4;\n\t"
-                                                       "TI1 = (*I0 - C5QC*(*I2 + *I3)) - C5QB*(*R1 - *R4) - C5QD*(*R2 - *R3) + C5QA*((*I1 - *I2) + (*I4 - *I3));\n\t"
-                                                       "TI4 = (*I0 - C5QC*(*I2 + *I3)) + C5QB*(*R1 - *R4) + C5QD*(*R2 - *R3) + C5QA*((*I1 - *I2) + (*I4 - *I3));\n\t"
-                                                       "TI2 = (*I0 - C5QC*(*I1 + *I4)) + C5QB*(*R2 - *R3) - C5QD*(*R1 - *R4) + C5QA*((*I2 - *I1) + (*I3 - *I4));\n\t"
-                                                       "TI3 = (*I0 - C5QC*(*I1 + *I4)) - C5QB*(*R2 - *R3) + C5QD*(*R1 - *R4) + C5QA*((*I2 - *I1) + (*I3 - *I4));\n\t";
-                                               }
-                                       }
-                                       else
-                                       {
-                                               if(cReg)
-                                               {
-                                                       bflyStr +=
-                                                       "TR0 = (*R0).x + (*R1).x + (*R2).x + (*R3).x + (*R4).x;\n\t"
-                                                       "TR1 = ((*R0).x - C5QC*((*R2).x + (*R3).x)) - C5QB*((*R1).y - (*R4).y) - C5QD*((*R2).y - (*R3).y) + C5QA*(((*R1).x - (*R2).x) + ((*R4).x - (*R3).x));\n\t"
-                                                       "TR4 = ((*R0).x - C5QC*((*R2).x + (*R3).x)) + C5QB*((*R1).y - (*R4).y) + C5QD*((*R2).y - (*R3).y) + C5QA*(((*R1).x - (*R2).x) + ((*R4).x - (*R3).x));\n\t"
-                                                       "TR2 = ((*R0).x - C5QC*((*R1).x + (*R4).x)) + C5QB*((*R2).y - (*R3).y) - C5QD*((*R1).y - (*R4).y) + C5QA*(((*R2).x - (*R1).x) + ((*R3).x - (*R4).x));\n\t"
-                                                       "TR3 = ((*R0).x - C5QC*((*R1).x + (*R4).x)) - C5QB*((*R2).y - (*R3).y) + C5QD*((*R1).y - (*R4).y) + C5QA*(((*R2).x - (*R1).x) + ((*R3).x - (*R4).x));\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TI0 = (*R0).y + (*R1).y + (*R2).y + (*R3).y + (*R4).y;\n\t"
-                                                       "TI1 = ((*R0).y - C5QC*((*R2).y + (*R3).y)) + C5QB*((*R1).x - (*R4).x) + C5QD*((*R2).x - (*R3).x) + C5QA*(((*R1).y - (*R2).y) + ((*R4).y - (*R3).y));\n\t"
-                                                       "TI4 = ((*R0).y - C5QC*((*R2).y + (*R3).y)) - C5QB*((*R1).x - (*R4).x) - C5QD*((*R2).x - (*R3).x) + C5QA*(((*R1).y - (*R2).y) + ((*R4).y - (*R3).y));\n\t"
-                                                       "TI2 = ((*R0).y - C5QC*((*R1).y + (*R4).y)) - C5QB*((*R2).x - (*R3).x) + C5QD*((*R1).x - (*R4).x) + C5QA*(((*R2).y - (*R1).y) + ((*R3).y - (*R4).y));\n\t"
-                                                       "TI3 = ((*R0).y - C5QC*((*R1).y + (*R4).y)) + C5QB*((*R2).x - (*R3).x) - C5QD*((*R1).x - (*R4).x) + C5QA*(((*R2).y - (*R1).y) + ((*R3).y - (*R4).y));\n\t";
-                                               }
-                                               else
-                                               {
-                                                       bflyStr +=
-                                                       "TR0 = *R0 + *R1 + *R2 + *R3 + *R4;\n\t"
-                                                       "TR1 = (*R0 - C5QC*(*R2 + *R3)) - C5QB*(*I1 - *I4) - C5QD*(*I2 - *I3) + C5QA*((*R1 - *R2) + (*R4 - *R3));\n\t"
-                                                       "TR4 = (*R0 - C5QC*(*R2 + *R3)) + C5QB*(*I1 - *I4) + C5QD*(*I2 - *I3) + C5QA*((*R1 - *R2) + (*R4 - *R3));\n\t"
-                                                       "TR2 = (*R0 - C5QC*(*R1 + *R4)) + C5QB*(*I2 - *I3) - C5QD*(*I1 - *I4) + C5QA*((*R2 - *R1) + (*R3 - *R4));\n\t"
-                                                       "TR3 = (*R0 - C5QC*(*R1 + *R4)) - C5QB*(*I2 - *I3) + C5QD*(*I1 - *I4) + C5QA*((*R2 - *R1) + (*R3 - *R4));\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TI0 = *I0 + *I1 + *I2 + *I3 + *I4;\n\t"
-                                                       "TI1 = (*I0 - C5QC*(*I2 + *I3)) + C5QB*(*R1 - *R4) + C5QD*(*R2 - *R3) + C5QA*((*I1 - *I2) + (*I4 - *I3));\n\t"
-                                                       "TI4 = (*I0 - C5QC*(*I2 + *I3)) - C5QB*(*R1 - *R4) - C5QD*(*R2 - *R3) + C5QA*((*I1 - *I2) + (*I4 - *I3));\n\t"
-                                                       "TI2 = (*I0 - C5QC*(*I1 + *I4)) - C5QB*(*R2 - *R3) + C5QD*(*R1 - *R4) + C5QA*((*I2 - *I1) + (*I3 - *I4));\n\t"
-                                                       "TI3 = (*I0 - C5QC*(*I1 + *I4)) + C5QB*(*R2 - *R3) - C5QD*(*R1 - *R4) + C5QA*((*I2 - *I1) + (*I3 - *I4));\n\t";
-                                               }
-                                       }
-                               } break;
-                       case 6:
-                               {
-                                       if(fwd)
-                                       {
-                                               if(cReg)
-                                               {
-                                                       bflyStr +=
-                                                       "TR0 = (*R0).x + (*R2).x + (*R4).x;\n\t"
-                                                       "TR2 = ((*R0).x - C3QA*((*R2).x + (*R4).x)) + C3QB*((*R2).y - (*R4).y);\n\t"
-                                                       "TR4 = ((*R0).x - C3QA*((*R2).x + (*R4).x)) - C3QB*((*R2).y - (*R4).y);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TI0 = (*R0).y + (*R2).y + (*R4).y;\n\t"
-                                                       "TI2 = ((*R0).y - C3QA*((*R2).y + (*R4).y)) - C3QB*((*R2).x - (*R4).x);\n\t"
-                                                       "TI4 = ((*R0).y - C3QA*((*R2).y + (*R4).y)) + C3QB*((*R2).x - (*R4).x);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TR1 = (*R1).x + (*R3).x + (*R5).x;\n\t"
-                                                       "TR3 = ((*R1).x - C3QA*((*R3).x + (*R5).x)) + C3QB*((*R3).y - (*R5).y);\n\t"
-                                                       "TR5 = ((*R1).x - C3QA*((*R3).x + (*R5).x)) - C3QB*((*R3).y - (*R5).y);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TI1 = (*R1).y + (*R3).y + (*R5).y;\n\t"
-                                                       "TI3 = ((*R1).y - C3QA*((*R3).y + (*R5).y)) - C3QB*((*R3).x - (*R5).x);\n\t"
-                                                       "TI5 = ((*R1).y - C3QA*((*R3).y + (*R5).y)) + C3QB*((*R3).x - (*R5).x);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "(*R0).x = TR0 + TR1;\n\t"
-                                                       "(*R1).x = TR2 + ( C3QA*TR3 + C3QB*TI3);\n\t"
-                                                       "(*R2).x = TR4 + (-C3QA*TR5 + C3QB*TI5);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "(*R0).y = TI0 + TI1;\n\t"
-                                                       "(*R1).y = TI2 + (-C3QB*TR3 + C3QA*TI3);\n\t"
-                                                       "(*R2).y = TI4 + (-C3QB*TR5 - C3QA*TI5);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "(*R3).x = TR0 - TR1;\n\t"
-                                                       "(*R4).x = TR2 - ( C3QA*TR3 + C3QB*TI3);\n\t"
-                                                       "(*R5).x = TR4 - (-C3QA*TR5 + C3QB*TI5);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "(*R3).y = TI0 - TI1;\n\t"
-                                                       "(*R4).y = TI2 - (-C3QB*TR3 + C3QA*TI3);\n\t"
-                                                       "(*R5).y = TI4 - (-C3QB*TR5 - C3QA*TI5);\n\t";
-                                               }
-                                               else
-                                               {
-                                                       bflyStr +=
-                                                       "TR0 = *R0 + *R2 + *R4;\n\t"
-                                                       "TR2 = (*R0 - C3QA*(*R2 + *R4)) + C3QB*(*I2 - *I4);\n\t"
-                                                       "TR4 = (*R0 - C3QA*(*R2 + *R4)) - C3QB*(*I2 - *I4);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TI0 = *I0 + *I2 + *I4;\n\t"
-                                                       "TI2 = (*I0 - C3QA*(*I2 + *I4)) - C3QB*(*R2 - *R4);\n\t"
-                                                       "TI4 = (*I0 - C3QA*(*I2 + *I4)) + C3QB*(*R2 - *R4);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TR1 = *R1 + *R3 + *R5;\n\t"
-                                                       "TR3 = (*R1 - C3QA*(*R3 + *R5)) + C3QB*(*I3 - *I5);\n\t"
-                                                       "TR5 = (*R1 - C3QA*(*R3 + *R5)) - C3QB*(*I3 - *I5);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TI1 = *I1 + *I3 + *I5;\n\t"
-                                                       "TI3 = (*I1 - C3QA*(*I3 + *I5)) - C3QB*(*R3 - *R5);\n\t"
-                                                       "TI5 = (*I1 - C3QA*(*I3 + *I5)) + C3QB*(*R3 - *R5);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "(*R0) = TR0 + TR1;\n\t"
-                                                       "(*R1) = TR2 + ( C3QA*TR3 + C3QB*TI3);\n\t"
-                                                       "(*R2) = TR4 + (-C3QA*TR5 + C3QB*TI5);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "(*I0) = TI0 + TI1;\n\t"
-                                                       "(*I1) = TI2 + (-C3QB*TR3 + C3QA*TI3);\n\t"
-                                                       "(*I2) = TI4 + (-C3QB*TR5 - C3QA*TI5);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "(*R3) = TR0 - TR1;\n\t"
-                                                       "(*R4) = TR2 - ( C3QA*TR3 + C3QB*TI3);\n\t"
-                                                       "(*R5) = TR4 - (-C3QA*TR5 + C3QB*TI5);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "(*I3) = TI0 - TI1;\n\t"
-                                                       "(*I4) = TI2 - (-C3QB*TR3 + C3QA*TI3);\n\t"
-                                                       "(*I5) = TI4 - (-C3QB*TR5 - C3QA*TI5);\n\t";
-                                               }
-                                       }
-                                       else
-                                       {
-                                               if(cReg)
-                                               {
-                                                       bflyStr +=
-                                                       "TR0 = (*R0).x + (*R2).x + (*R4).x;\n\t"
-                                                       "TR2 = ((*R0).x - C3QA*((*R2).x + (*R4).x)) - C3QB*((*R2).y - (*R4).y);\n\t"
-                                                       "TR4 = ((*R0).x - C3QA*((*R2).x + (*R4).x)) + C3QB*((*R2).y - (*R4).y);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TI0 = (*R0).y + (*R2).y + (*R4).y;\n\t"
-                                                       "TI2 = ((*R0).y - C3QA*((*R2).y + (*R4).y)) + C3QB*((*R2).x - (*R4).x);\n\t"
-                                                       "TI4 = ((*R0).y - C3QA*((*R2).y + (*R4).y)) - C3QB*((*R2).x - (*R4).x);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TR1 = (*R1).x + (*R3).x + (*R5).x;\n\t"
-                                                       "TR3 = ((*R1).x - C3QA*((*R3).x + (*R5).x)) - C3QB*((*R3).y - (*R5).y);\n\t"
-                                                       "TR5 = ((*R1).x - C3QA*((*R3).x + (*R5).x)) + C3QB*((*R3).y - (*R5).y);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TI1 = (*R1).y + (*R3).y + (*R5).y;\n\t"
-                                                       "TI3 = ((*R1).y - C3QA*((*R3).y + (*R5).y)) + C3QB*((*R3).x - (*R5).x);\n\t"
-                                                       "TI5 = ((*R1).y - C3QA*((*R3).y + (*R5).y)) - C3QB*((*R3).x - (*R5).x);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "(*R0).x = TR0 + TR1;\n\t"
-                                                       "(*R1).x = TR2 + ( C3QA*TR3 - C3QB*TI3);\n\t"
-                                                       "(*R2).x = TR4 + (-C3QA*TR5 - C3QB*TI5);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "(*R0).y = TI0 + TI1;\n\t"
-                                                       "(*R1).y = TI2 + ( C3QB*TR3 + C3QA*TI3);\n\t"
-                                                       "(*R2).y = TI4 + ( C3QB*TR5 - C3QA*TI5);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "(*R3).x = TR0 - TR1;\n\t"
-                                                       "(*R4).x = TR2 - ( C3QA*TR3 - C3QB*TI3);\n\t"
-                                                       "(*R5).x = TR4 - (-C3QA*TR5 - C3QB*TI5);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "(*R3).y = TI0 - TI1;\n\t"
-                                                       "(*R4).y = TI2 - ( C3QB*TR3 + C3QA*TI3);\n\t"
-                                                       "(*R5).y = TI4 - ( C3QB*TR5 - C3QA*TI5);\n\t";
-                                               }
-                                               else
-                                               {
-                                                       bflyStr +=
-                                                       "TR0 = *R0 + *R2 + *R4;\n\t"
-                                                       "TR2 = (*R0 - C3QA*(*R2 + *R4)) - C3QB*(*I2 - *I4);\n\t"
-                                                       "TR4 = (*R0 - C3QA*(*R2 + *R4)) + C3QB*(*I2 - *I4);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TI0 = *I0 + *I2 + *I4;\n\t"
-                                                       "TI2 = (*I0 - C3QA*(*I2 + *I4)) + C3QB*(*R2 - *R4);\n\t"
-                                                       "TI4 = (*I0 - C3QA*(*I2 + *I4)) - C3QB*(*R2 - *R4);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TR1 = *R1 + *R3 + *R5;\n\t"
-                                                       "TR3 = (*R1 - C3QA*(*R3 + *R5)) - C3QB*(*I3 - *I5);\n\t"
-                                                       "TR5 = (*R1 - C3QA*(*R3 + *R5)) + C3QB*(*I3 - *I5);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TI1 = *I1 + *I3 + *I5;\n\t"
-                                                       "TI3 = (*I1 - C3QA*(*I3 + *I5)) + C3QB*(*R3 - *R5);\n\t"
-                                                       "TI5 = (*I1 - C3QA*(*I3 + *I5)) - C3QB*(*R3 - *R5);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "(*R0) = TR0 + TR1;\n\t"
-                                                       "(*R1) = TR2 + ( C3QA*TR3 - C3QB*TI3);\n\t"
-                                                       "(*R2) = TR4 + (-C3QA*TR5 - C3QB*TI5);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "(*I0) = TI0 + TI1;\n\t"
-                                                       "(*I1) = TI2 + ( C3QB*TR3 + C3QA*TI3);\n\t"
-                                                       "(*I2) = TI4 + ( C3QB*TR5 - C3QA*TI5);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "(*R3) = TR0 - TR1;\n\t"
-                                                       "(*R4) = TR2 - ( C3QA*TR3 - C3QB*TI3);\n\t"
-                                                       "(*R5) = TR4 - (-C3QA*TR5 - C3QB*TI5);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "(*I3) = TI0 - TI1;\n\t"
-                                                       "(*I4) = TI2 - ( C3QB*TR3 + C3QA*TI3);\n\t"
-                                                       "(*I5) = TI4 - ( C3QB*TR5 - C3QA*TI5);\n\t";
-                                               }
-                                       }
-                               } break;
-                       case 7:
-                               {
-                                       static const char *C7SFR = "\
-                                       /*FFT7 Forward Real */ \n\
-                                       \n\
-                                               pr0 = *R1 + *R6; \n\
-                                               pi0 = *I1 + *I6; \n\
-                                               pr1 = *R1 - *R6; \n\
-                                               pi1 = *I1 - *I6; \n\
-                                               pr2 = *R2 + *R5; \n\
-                                               pi2 = *I2 + *I5; \n\
-                                               pr3 = *R2 - *R5; \n\
-                                               pi3 = *I2 - *I5; \n\
-                                               pr4 = *R4 + *R3; \n\
-                                               pi4 = *I4 + *I3; \n\
-                                               pr5 = *R4 - *R3; \n\
-                                               pi5 = *I4 - *I3; \n\
-                                       \n\
-                                               pr6 = pr2 + pr0; \n\
-                                               pi6 = pi2 + pi0; \n\
-                                               qr4 = pr2 - pr0; \n\
-                                               qi4 = pi2 - pi0; \n\
-                                               qr2 = pr0 - pr4; \n\
-                                               qi2 = pi0 - pi4; \n\
-                                               qr3 = pr4 - pr2; \n\
-                                               qi3 = pi4 - pi2; \n\
-                                               pr7 = pr5 + pr3; \n\
-                                               pi7 = pi5 + pi3; \n\
-                                               qr7 = pr5 - pr3; \n\
-                                               qi7 = pi5 - pi3; \n\
-                                               qr6 = pr1 - pr5; \n\
-                                               qi6 = pi1 - pi5; \n\
-                                               qr8 = pr3 - pr1; \n\
-                                               qi8 = pi3 - pi1; \n\
-                                               qr1 = pr6 + pr4; \n\
-                                               qi1 = pi6 + pi4; \n\
-                                               qr5 = pr7 + pr1; \n\
-                                               qi5 = pi7 + pi1; \n\
-                                               qr0 = *R0 + qr1; \n\
-                                               qi0 = *I0 + qi1; \n\
-                                       \n\
-                                               qr1 *= C7Q1; \n\
-                                               qi1 *= C7Q1; \n\
-                                               qr2 *= C7Q2; \n\
-                                               qi2 *= C7Q2; \n\
-                                               qr3 *= C7Q3; \n\
-                                               qi3 *= C7Q3; \n\
-                                               qr4 *= C7Q4; \n\
-                                               qi4 *= C7Q4; \n\
-                                       \n\
-                                               qr5 *= (C7Q5); \n\
-                                               qi5 *= (C7Q5); \n\
-                                               qr6 *= (C7Q6); \n\
-                                               qi6 *= (C7Q6); \n\
-                                               qr7 *= (C7Q7); \n\
-                                               qi7 *= (C7Q7); \n\
-                                               qr8 *= (C7Q8); \n\
-                                               qi8 *= (C7Q8); \n\
-                                       \n\
-                                               pr0 =  qr0 + qr1; \n\
-                                               pi0 =  qi0 + qi1; \n\
-                                               pr1 =  qr2 + qr3; \n\
-                                               pi1 =  qi2 + qi3; \n\
-                                               pr2 =  qr4 - qr3; \n\
-                                               pi2 =  qi4 - qi3; \n\
-                                               pr3 = -qr2 - qr4; \n\
-                                               pi3 = -qi2 - qi4; \n\
-                                               pr4 =  qr6 + qr7; \n\
-                                               pi4 =  qi6 + qi7; \n\
-                                               pr5 =  qr8 - qr7; \n\
-                                               pi5 =  qi8 - qi7; \n\
-                                               pr6 = -qr8 - qr6; \n\
-                                               pi6 = -qi8 - qi6; \n\
-                                               pr7 =  pr0 + pr1; \n\
-                                               pi7 =  pi0 + pi1; \n\
-                                               pr8 =  pr0 + pr2; \n\
-                                               pi8 =  pi0 + pi2; \n\
-                                               pr9 =  pr0 + pr3; \n\
-                                               pi9 =  pi0 + pi3; \n\
-                                               qr6 =  pr4 + qr5; \n\
-                                               qi6 =  pi4 + qi5; \n\
-                                               qr7 =  pr5 + qr5; \n\
-                                               qi7 =  pi5 + qi5; \n\
-                                               qr8 =  pr6 + qr5; \n\
-                                               qi8 =  pi6 + qi5; \n\
-                                       \n\
-                                               TR0 = qr0; TI0 = qi0; \n\
-                                               TR1 = pr7 + qi6; \n\
-                                               TI1 = pi7 - qr6; \n\
-                                               TR2 = pr9 + qi8; \n\
-                                               TI2 = pi9 - qr8; \n\
-                                               TR3 = pr8 - qi7; \n\
-                                               TI3 = pi8 + qr7; \n\
-                                               TR4 = pr8 + qi7; \n\
-                                               TI4 = pi8 - qr7; \n\
-                                               TR5 = pr9 - qi8; \n\
-                                               TI5 = pi9 + qr8; \n\
-                                               TR6 = pr7 - qi6; \n\
-                                               TI6 = pi7 + qr6; \n\
-                                       ";
-
-                                       static const char *C7SBR = "\
-                                       /*FFT7 Backward Real */ \n\
-                                       \n\
-                                               pr0 = *R1 + *R6; \n\
-                                               pi0 = *I1 + *I6; \n\
-                                               pr1 = *R1 - *R6; \n\
-                                               pi1 = *I1 - *I6; \n\
-                                               pr2 = *R2 + *R5; \n\
-                                               pi2 = *I2 + *I5; \n\
-                                               pr3 = *R2 - *R5; \n\
-                                               pi3 = *I2 - *I5; \n\
-                                               pr4 = *R4 + *R3; \n\
-                                               pi4 = *I4 + *I3; \n\
-                                               pr5 = *R4 - *R3; \n\
-                                               pi5 = *I4 - *I3; \n\
-                                       \n\
-                                               pr6 = pr2 + pr0; \n\
-                                               pi6 = pi2 + pi0; \n\
-                                               qr4 = pr2 - pr0; \n\
-                                               qi4 = pi2 - pi0; \n\
-                                               qr2 = pr0 - pr4; \n\
-                                               qi2 = pi0 - pi4; \n\
-                                               qr3 = pr4 - pr2; \n\
-                                               qi3 = pi4 - pi2; \n\
-                                               pr7 = pr5 + pr3; \n\
-                                               pi7 = pi5 + pi3; \n\
-                                               qr7 = pr5 - pr3; \n\
-                                               qi7 = pi5 - pi3; \n\
-                                               qr6 = pr1 - pr5; \n\
-                                               qi6 = pi1 - pi5; \n\
-                                               qr8 = pr3 - pr1; \n\
-                                               qi8 = pi3 - pi1; \n\
-                                               qr1 = pr6 + pr4; \n\
-                                               qi1 = pi6 + pi4; \n\
-                                               qr5 = pr7 + pr1; \n\
-                                               qi5 = pi7 + pi1; \n\
-                                               qr0 = *R0 + qr1; \n\
-                                               qi0 = *I0 + qi1; \n\
-                                       \n\
-                                               qr1 *= C7Q1; \n\
-                                               qi1 *= C7Q1; \n\
-                                               qr2 *= C7Q2; \n\
-                                               qi2 *= C7Q2; \n\
-                                               qr3 *= C7Q3; \n\
-                                               qi3 *= C7Q3; \n\
-                                               qr4 *= C7Q4; \n\
-                                               qi4 *= C7Q4; \n\
-                                       \n\
-                                               qr5 *= -(C7Q5); \n\
-                                               qi5 *= -(C7Q5); \n\
-                                               qr6 *= -(C7Q6); \n\
-                                               qi6 *= -(C7Q6); \n\
-                                               qr7 *= -(C7Q7); \n\
-                                               qi7 *= -(C7Q7); \n\
-                                               qr8 *= -(C7Q8); \n\
-                                               qi8 *= -(C7Q8); \n\
-                                       \n\
-                                               pr0 =  qr0 + qr1; \n\
-                                               pi0 =  qi0 + qi1; \n\
-                                               pr1 =  qr2 + qr3; \n\
-                                               pi1 =  qi2 + qi3; \n\
-                                               pr2 =  qr4 - qr3; \n\
-                                               pi2 =  qi4 - qi3; \n\
-                                               pr3 = -qr2 - qr4; \n\
-                                               pi3 = -qi2 - qi4; \n\
-                                               pr4 =  qr6 + qr7; \n\
-                                               pi4 =  qi6 + qi7; \n\
-                                               pr5 =  qr8 - qr7; \n\
-                                               pi5 =  qi8 - qi7; \n\
-                                               pr6 = -qr8 - qr6; \n\
-                                               pi6 = -qi8 - qi6; \n\
-                                               pr7 =  pr0 + pr1; \n\
-                                               pi7 =  pi0 + pi1; \n\
-                                               pr8 =  pr0 + pr2; \n\
-                                               pi8 =  pi0 + pi2; \n\
-                                               pr9 =  pr0 + pr3; \n\
-                                               pi9 =  pi0 + pi3; \n\
-                                               qr6 =  pr4 + qr5; \n\
-                                               qi6 =  pi4 + qi5; \n\
-                                               qr7 =  pr5 + qr5; \n\
-                                               qi7 =  pi5 + qi5; \n\
-                                               qr8 =  pr6 + qr5; \n\
-                                               qi8 =  pi6 + qi5; \n\
-                                       \n\
-                                               TR0 = qr0; TI0 = qi0; \n\
-                                               TR1 = pr7 + qi6; \n\
-                                               TI1 = pi7 - qr6; \n\
-                                               TR2 = pr9 + qi8; \n\
-                                               TI2 = pi9 - qr8; \n\
-                                               TR3 = pr8 - qi7; \n\
-                                               TI3 = pi8 + qr7; \n\
-                                               TR4 = pr8 + qi7; \n\
-                                               TI4 = pi8 - qr7; \n\
-                                               TR5 = pr9 - qi8; \n\
-                                               TI5 = pi9 + qr8; \n\
-                                               TR6 = pr7 - qi6; \n\
-                                               TI6 = pi7 + qr6; \n\
-                                       ";
-
-                                       static const char *C7SFC = "\
-                                       /*FFT7 Forward Complex */ \n\
-                                       \n\
-                                               p0 = *R1 + *R6; \n\
-                                               p1 = *R1 - *R6; \n\
-                                               p2 = *R2 + *R5; \n\
-                                               p3 = *R2 - *R5; \n\
-                                               p4 = *R4 + *R3; \n\
-                                               p5 = *R4 - *R3; \n\
-                                       \n\
-                                               p6 = p2 + p0; \n\
-                                               q4 = p2 - p0; \n\
-                                               q2 = p0 - p4; \n\
-                                               q3 = p4 - p2; \n\
-                                               p7 = p5 + p3; \n\
-                                               q7 = p5 - p3; \n\
-                                               q6 = p1 - p5; \n\
-                                               q8 = p3 - p1; \n\
-                                               q1 = p6 + p4; \n\
-                                               q5 = p7 + p1; \n\
-                                               q0 = *R0 + q1; \n\
-                                       \n\
-                                               q1 *= C7Q1; \n\
-                                               q2 *= C7Q2; \n\
-                                               q3 *= C7Q3; \n\
-                                               q4 *= C7Q4; \n\
-                                       \n\
-                                               q5 *= (C7Q5); \n\
-                                               q6 *= (C7Q6); \n\
-                                               q7 *= (C7Q7); \n\
-                                               q8 *= (C7Q8); \n\
-                                       \n\
-                                               p0 = q0 + q1; \n\
-                                               p1 = q2 + q3; \n\
-                                               p2 = q4 - q3; \n\
-                                               p3 = -q2 - q4; \n\
-                                               p4 = q6 + q7; \n\
-                                               p5 = q8 - q7; \n\
-                                               p6 = -q8 - q6; \n\
-                                               p7 = p0 + p1; \n\
-                                               p8 = p0 + p2; \n\
-                                               p9 = p0 + p3; \n\
-                                               q6 = p4 + q5; \n\
-                                               q7 = p5 + q5; \n\
-                                               q8 = p6 + q5; \n\
-                                       \n\
-                                               *R0 = q0; \n\
-                                               (*R1).x = p7.x + q6.y; \n\
-                                               (*R1).y = p7.y - q6.x; \n\
-                                               (*R2).x = p9.x + q8.y; \n\
-                                               (*R2).y = p9.y - q8.x; \n\
-                                               (*R3).x = p8.x - q7.y; \n\
-                                               (*R3).y = p8.y + q7.x; \n\
-                                               (*R4).x = p8.x + q7.y; \n\
-                                               (*R4).y = p8.y - q7.x; \n\
-                                               (*R5).x = p9.x - q8.y; \n\
-                                               (*R5).y = p9.y + q8.x; \n\
-                                               (*R6).x = p7.x - q6.y; \n\
-                                               (*R6).y = p7.y + q6.x; \n\
-                                       ";
-
-                                       static const char *C7SBC = "\
-                                       /*FFT7 Backward Complex */ \n\
-                                       \n\
-                                               p0 = *R1 + *R6; \n\
-                                               p1 = *R1 - *R6; \n\
-                                               p2 = *R2 + *R5; \n\
-                                               p3 = *R2 - *R5; \n\
-                                               p4 = *R4 + *R3; \n\
-                                               p5 = *R4 - *R3; \n\
-                                       \n\
-                                               p6 = p2 + p0; \n\
-                                               q4 = p2 - p0; \n\
-                                               q2 = p0 - p4; \n\
-                                               q3 = p4 - p2; \n\
-                                               p7 = p5 + p3; \n\
-                                               q7 = p5 - p3; \n\
-                                               q6 = p1 - p5; \n\
-                                               q8 = p3 - p1; \n\
-                                               q1 = p6 + p4; \n\
-                                               q5 = p7 + p1; \n\
-                                               q0 = *R0 + q1; \n\
-                                       \n\
-                                               q1 *= C7Q1; \n\
-                                               q2 *= C7Q2; \n\
-                                               q3 *= C7Q3; \n\
-                                               q4 *= C7Q4; \n\
-                                       \n\
-                                               q5 *= -(C7Q5); \n\
-                                               q6 *= -(C7Q6); \n\
-                                               q7 *= -(C7Q7); \n\
-                                               q8 *= -(C7Q8); \n\
-                                       \n\
-                                               p0 = q0 + q1; \n\
-                                               p1 = q2 + q3; \n\
-                                               p2 = q4 - q3; \n\
-                                               p3 = -q2 - q4; \n\
-                                               p4 = q6 + q7; \n\
-                                               p5 = q8 - q7; \n\
-                                               p6 = -q8 - q6; \n\
-                                               p7 = p0 + p1; \n\
-                                               p8 = p0 + p2; \n\
-                                               p9 = p0 + p3; \n\
-                                               q6 = p4 + q5; \n\
-                                               q7 = p5 + q5; \n\
-                                               q8 = p6 + q5; \n\
-                                       \n\
-                                               *R0 = q0; \n\
-                                               (*R1).x = p7.x + q6.y; \n\
-                                               (*R1).y = p7.y - q6.x; \n\
-                                               (*R2).x = p9.x + q8.y; \n\
-                                               (*R2).y = p9.y - q8.x; \n\
-                                               (*R3).x = p8.x - q7.y; \n\
-                                               (*R3).y = p8.y + q7.x; \n\
-                                               (*R4).x = p8.x + q7.y; \n\
-                                               (*R4).y = p8.y - q7.x; \n\
-                                               (*R5).x = p9.x - q8.y; \n\
-                                               (*R5).y = p9.y + q8.x; \n\
-                                               (*R6).x = p7.x - q6.y; \n\
-                                               (*R6).y = p7.y + q6.x; \n\
-                                       ";
-
-
-
-                                       if (!cReg) {
-                                               for (size_t i = 0; i < 10; i++)
-                                                       bflyStr += regType + " pr" + SztToStr(i) + ", pi" + SztToStr(i) + ";\n\t";
-                                               for (size_t i = 0; i < 9; i++)
-                                                       bflyStr += regType + " qr" + SztToStr(i) + ", qi" + SztToStr(i) + ";\n\t";
-
-                                               if (fwd)
-                                                       bflyStr += C7SFR;
-                                               else
-                                                       bflyStr += C7SBR;
-                                       } else {
-                                               for (size_t i = 0; i < 10; i++)
-                                                       bflyStr += regType + " p" + SztToStr(i) + ";\n\t";
-                                               for (size_t i = 0; i < 9; i++)
-                                                       bflyStr += regType + " q" + SztToStr(i) + ";\n\t";
-                                               if (fwd)
-                                                       bflyStr += C7SFC;
-                                               else
-                                                       bflyStr += C7SBC;
-                                       }
-                               }
-                               break;
-
-                       case 8:
-                               {
-                                       if(fwd)
-                                       {
-                                               if(cReg)
-                                               {
-                                                       bflyStr +=
-                                                       "(*R1) = (*R0) - (*R1);\n\t"
-                                                       "(*R0) = 2.0f * (*R0) - (*R1);\n\t"
-                                                       "(*R3) = (*R2) - (*R3);\n\t"
-                                                       "(*R2) = 2.0f * (*R2) - (*R3);\n\t"
-                                                       "(*R5) = (*R4) - (*R5);\n\t"
-                                                       "(*R4) = 2.0f * (*R4) - (*R5);\n\t"
-                                                       "(*R7) = (*R6) - (*R7);\n\t"
-                                                       "(*R6) = 2.0f * (*R6) - (*R7);\n\t"
-                                                       "\n\t"
-                                                       "(*R2) = (*R0) - (*R2);\n\t"
-                                                       "(*R0) = 2.0f * (*R0) - (*R2);\n\t"
-                                                       "(*R3) = (*R1) + (fvect2)(-(*R3).y, (*R3).x);\n\t"
-                                                       "(*R1) = 2.0f * (*R1) - (*R3);\n\t"
-                                                       "(*R6) = (*R4) - (*R6);\n\t"
-                                                       "(*R4) = 2.0f * (*R4) - (*R6);\n\t"
-                                                       "(*R7) = (*R5) + (fvect2)(-(*R7).y, (*R7).x);\n\t"
-                                                       "(*R5) = 2.0f * (*R5) - (*R7);\n\t"
-                                                       "\n\t"
-                                                       "(*R4) = (*R0) - (*R4);\n\t"
-                                                       "(*R0) = 2.0f * (*R0) - (*R4);\n\t"
-                                                       "(*R5) = ((*R1) - C8Q * (*R5)) - C8Q * (fvect2)((*R5).y, -(*R5).x);\n\t"
-                                                       "(*R1) = 2.0f * (*R1) - (*R5);\n\t"
-                                                       "(*R6) = (*R2) + (fvect2)(-(*R6).y, (*R6).x);\n\t"
-                                                       "(*R2) = 2.0f * (*R2) - (*R6);\n\t"
-                                                       "(*R7) = ((*R3) + C8Q * (*R7)) - C8Q * (fvect2)((*R7).y, -(*R7).x);\n\t"
-                                                       "(*R3) = 2.0f * (*R3) - (*R7);\n\t";
-                                               }
-                                               else
-                                               {
-                                                       bflyStr +=
-                                                       "TR0 = (*R0) + (*R4) + (*R2) + (*R6) +     (*R1)             +     (*R3)             +     (*R5)             +     (*R7)            ;\n\t"
-                                                       "TR1 = (*R0) - (*R4) + (*I2) - (*I6) + C8Q*(*R1) + C8Q*(*I1) - C8Q*(*R3) + C8Q*(*I3) - C8Q*(*R5) - C8Q*(*I5) + C8Q*(*R7) - C8Q*(*I7);\n\t"
-                                                       "TR2 = (*R0) + (*R4) - (*R2) - (*R6)             +     (*I1)             -     (*I3)             +     (*I5)             -     (*I7);\n\t"
-                                                       "TR3 = (*R0) - (*R4) - (*I2) + (*I6) - C8Q*(*R1) + C8Q*(*I1) + C8Q*(*R3) + C8Q*(*I3) + C8Q*(*R5) - C8Q*(*I5) - C8Q*(*R7) - C8Q*(*I7);\n\t"
-                                                       "TR4 = (*R0) + (*R4) + (*R2) + (*R6) -     (*R1)             -     (*R3)             -     (*R5)             -     (*R7)            ;\n\t"
-                                                       "TR5 = (*R0) - (*R4) + (*I2) - (*I6) - C8Q*(*R1) - C8Q*(*I1) + C8Q*(*R3) - C8Q*(*I3) + C8Q*(*R5) + C8Q*(*I5) - C8Q*(*R7) + C8Q*(*I7);\n\t"
-                                                       "TR6 = (*R0) + (*R4) - (*R2) - (*R6)             -    (*I1)              +     (*I3)             -     (*I5)             +     (*I7);\n\t"
-                                                       "TR7 = (*R0) - (*R4) - (*I2) + (*I6) + C8Q*(*R1) - C8Q*(*I1) - C8Q*(*R3) - C8Q*(*I3) - C8Q*(*R5) + C8Q*(*I5) + C8Q*(*R7) + C8Q*(*I7);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TI0 = (*I0) + (*I4) + (*I2) + (*I6)             +     (*I1)             +     (*I3)             +     (*I5)             +     (*I7);\n\t"
-                                                       "TI1 = (*I0) - (*I4) - (*R2) + (*R6) - C8Q*(*R1) + C8Q*(*I1) - C8Q*(*R3) - C8Q*(*I3) + C8Q*(*R5) - C8Q*(*I5) + C8Q*(*R7) + C8Q*(*I7);\n\t"
-                                                       "TI2 = (*I0) + (*I4) - (*I2) - (*I6) -     (*R1)             +     (*R3)             -     (*R5)             +     (*R7)            ;\n\t"
-                                                       "TI3 = (*I0) - (*I4) + (*R2) - (*R6) - C8Q*(*R1) - C8Q*(*I1) - C8Q*(*R3) + C8Q*(*I3) + C8Q*(*R5) + C8Q*(*I5) + C8Q*(*R7) - C8Q*(*I7);\n\t"
-                                                       "TI4 = (*I0) + (*I4) + (*I2) + (*I6)             -    (*I1)              -     (*I3)             -     (*I5)             -     (*I7);\n\t"
-                                                       "TI5 = (*I0) - (*I4) - (*R2) + (*R6) + C8Q*(*R1) - C8Q*(*I1) + C8Q*(*R3) + C8Q*(*I3) - C8Q*(*R5) + C8Q*(*I5) - C8Q*(*R7) - C8Q*(*I7);\n\t"
-                                                       "TI6 = (*I0) + (*I4) - (*I2) - (*I6) +     (*R1)             -     (*R3)             +     (*R5)             -     (*R7)            ;\n\t"
-                                                       "TI7 = (*I0) - (*I4) + (*R2) - (*R6) + C8Q*(*R1) + C8Q*(*I1) + C8Q*(*R3) - C8Q*(*I3) - C8Q*(*R5) - C8Q*(*I5) - C8Q*(*R7) + C8Q*(*I7);\n\t";
-                                               }
-                                       }
-                                       else
-                                       {
-                                               if(cReg)
-                                               {
-                                                       bflyStr +=
-                                                       "(*R1) = (*R0) - (*R1);\n\t"
-                                                       "(*R0) = 2.0f * (*R0) - (*R1);\n\t"
-                                                       "(*R3) = (*R2) - (*R3);\n\t"
-                                                       "(*R2) = 2.0f * (*R2) - (*R3);\n\t"
-                                                       "(*R5) = (*R4) - (*R5);\n\t"
-                                                       "(*R4) = 2.0f * (*R4) - (*R5);\n\t"
-                                                       "(*R7) = (*R6) - (*R7);\n\t"
-                                                       "(*R6) = 2.0f * (*R6) - (*R7);\n\t"
-                                                       "\n\t"
-                                                       "(*R2) = (*R0) - (*R2);\n\t"
-                                                       "(*R0) = 2.0f * (*R0) - (*R2);\n\t"
-                                                       "(*R3) = (*R1) + (fvect2)((*R3).y, -(*R3).x);\n\t"
-                                                       "(*R1) = 2.0f * (*R1) - (*R3);\n\t"
-                                                       "(*R6) = (*R4) - (*R6);\n\t"
-                                                       "(*R4) = 2.0f * (*R4) - (*R6);\n\t"
-                                                       "(*R7) = (*R5) + (fvect2)((*R7).y, -(*R7).x);\n\t"
-                                                       "(*R5) = 2.0f * (*R5) - (*R7);\n\t"
-                                                       "\n\t"
-                                                       "(*R4) = (*R0) - (*R4);\n\t"
-                                                       "(*R0) = 2.0f * (*R0) - (*R4);\n\t"
-                                                       "(*R5) = ((*R1) - C8Q * (*R5)) + C8Q * (fvect2)((*R5).y, -(*R5).x);\n\t"
-                                                       "(*R1) = 2.0f * (*R1) - (*R5);\n\t"
-                                                       "(*R6) = (*R2) + (fvect2)((*R6).y, -(*R6).x);\n\t"
-                                                       "(*R2) = 2.0f * (*R2) - (*R6);\n\t"
-                                                       "(*R7) = ((*R3) + C8Q * (*R7)) + C8Q * (fvect2)((*R7).y, -(*R7).x);\n\t"
-                                                       "(*R3) = 2.0f * (*R3) - (*R7);\n\t";
-                                               }
-                                               else
-                                               {
-                                                       bflyStr +=
-                                                       "TR0 = (*R0) + (*R4) + (*R2) + (*R6) +     (*R1)             +     (*R3)             +     (*R5)             +     (*R7)            ;\n\t"
-                                                       "TR1 = (*R0) - (*R4) - (*I2) + (*I6) + C8Q*(*R1) - C8Q*(*I1) - C8Q*(*R3) - C8Q*(*I3) - C8Q*(*R5) + C8Q*(*I5) + C8Q*(*R7) + C8Q*(*I7);\n\t"
-                                                       "TR2 = (*R0) + (*R4) - (*R2) - (*R6)             -     (*I1)             +     (*I3)             -     (*I5)             +     (*I7);\n\t"
-                                                       "TR3 = (*R0) - (*R4) + (*I2) - (*I6) - C8Q*(*R1) - C8Q*(*I1) + C8Q*(*R3) - C8Q*(*I3) + C8Q*(*R5) + C8Q*(*I5) - C8Q*(*R7) + C8Q*(*I7);\n\t"
-                                                       "TR4 = (*R0) + (*R4) + (*R2) + (*R6) -     (*R1)             -    (*R3)              -     (*R5)             -     (*R7)            ;\n\t"
-                                                       "TR5 = (*R0) - (*R4) - (*I2) + (*I6) - C8Q*(*R1) + C8Q*(*I1) + C8Q*(*R3) + C8Q*(*I3) + C8Q*(*R5) - C8Q*(*I5) - C8Q*(*R7) - C8Q*(*I7);\n\t"
-                                                       "TR6 = (*R0) + (*R4) - (*R2) - (*R6)             +     (*I1)             -     (*I3)             +     (*I5)             -     (*I7);\n\t"
-                                                       "TR7 = (*R0) - (*R4) + (*I2) - (*I6) + C8Q*(*R1) + C8Q*(*I1) - C8Q*(*R3) + C8Q*(*I3) - C8Q*(*R5) - C8Q*(*I5) + C8Q*(*R7) - C8Q*(*I7);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TI0 = (*I0) + (*I4) + (*I2) + (*I6)             +     (*I1)             +    (*I3)              +     (*I5)             +     (*I7);\n\t"
-                                                       "TI1 = (*I0) - (*I4) + (*R2) - (*R6) + C8Q*(*R1) + C8Q*(*I1) + C8Q*(*R3) - C8Q*(*I3) - C8Q*(*R5) - C8Q*(*I5) - C8Q*(*R7) + C8Q*(*I7);\n\t"
-                                                       "TI2 = (*I0) + (*I4) - (*I2) - (*I6) +     (*R1)             -     (*R3)             +     (*R5)             -     (*R7)            ;\n\t"
-                                                       "TI3 = (*I0) - (*I4) - (*R2) + (*R6) + C8Q*(*R1) - C8Q*(*I1) + C8Q*(*R3) + C8Q*(*I3) - C8Q*(*R5) + C8Q*(*I5) - C8Q*(*R7) - C8Q*(*I7);\n\t"
-                                                       "TI4 = (*I0) + (*I4) + (*I2) + (*I6)             -     (*I1)             -     (*I3)             -     (*I5)             -     (*I7);\n\t"
-                                                       "TI5 = (*I0) - (*I4) + (*R2) - (*R6) - C8Q*(*R1) - C8Q*(*I1) - C8Q*(*R3) + C8Q*(*I3) + C8Q*(*R5) + C8Q*(*I5) + C8Q*(*R7) - C8Q*(*I7);\n\t"
-                                                       "TI6 = (*I0) + (*I4) - (*I2) - (*I6) -     (*R1)             +     (*R3)             -     (*R5)             +     (*R7)            ;\n\t"
-                                                       "TI7 = (*I0) - (*I4) - (*R2) + (*R6) - C8Q*(*R1) + C8Q*(*I1) - C8Q*(*R3) - C8Q*(*I3) + C8Q*(*R5) - C8Q*(*I5) + C8Q*(*R7) + C8Q*(*I7);\n\t";
-                                               }
-                                       }
-                               } break;
-                       case 10:
-                               {
-                                       if(fwd)
-                                       {
-                                               if(cReg)
-                                               {
-                                                       bflyStr +=
-                                                       "TR0 = (*R0).x + (*R2).x + (*R4).x + (*R6).x + (*R8).x;\n\t"
-                                                       "TR2 = ((*R0).x - C5QC*((*R4).x + (*R6).x)) + C5QB*((*R2).y - (*R8).y) + C5QD*((*R4).y - (*R6).y) + C5QA*(((*R2).x - (*R4).x) + ((*R8).x - (*R6).x));\n\t"
-                                                       "TR8 = ((*R0).x - C5QC*((*R4).x + (*R6).x)) - C5QB*((*R2).y - (*R8).y) - C5QD*((*R4).y - (*R6).y) + C5QA*(((*R2).x - (*R4).x) + ((*R8).x - (*R6).x));\n\t"
-                                                       "TR4 = ((*R0).x - C5QC*((*R2).x + (*R8).x)) - C5QB*((*R4).y - (*R6).y) + C5QD*((*R2).y - (*R8).y) + C5QA*(((*R4).x - (*R2).x) + ((*R6).x - (*R8).x));\n\t"
-                                                       "TR6 = ((*R0).x - C5QC*((*R2).x + (*R8).x)) + C5QB*((*R4).y - (*R6).y) - C5QD*((*R2).y - (*R8).y) + C5QA*(((*R4).x - (*R2).x) + ((*R6).x - (*R8).x));\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TI0 = (*R0).y + (*R2).y + (*R4).y + (*R6).y + (*R8).y;\n\t"
-                                                       "TI2 = ((*R0).y - C5QC*((*R4).y + (*R6).y)) - C5QB*((*R2).x - (*R8).x) - C5QD*((*R4).x - (*R6).x) + C5QA*(((*R2).y - (*R4).y) + ((*R8).y - (*R6).y));\n\t"
-                                                       "TI8 = ((*R0).y - C5QC*((*R4).y + (*R6).y)) + C5QB*((*R2).x - (*R8).x) + C5QD*((*R4).x - (*R6).x) + C5QA*(((*R2).y - (*R4).y) + ((*R8).y - (*R6).y));\n\t"
-                                                       "TI4 = ((*R0).y - C5QC*((*R2).y + (*R8).y)) + C5QB*((*R4).x - (*R6).x) - C5QD*((*R2).x - (*R8).x) + C5QA*(((*R4).y - (*R2).y) + ((*R6).y - (*R8).y));\n\t"
-                                                       "TI6 = ((*R0).y - C5QC*((*R2).y + (*R8).y)) - C5QB*((*R4).x - (*R6).x) + C5QD*((*R2).x - (*R8).x) + C5QA*(((*R4).y - (*R2).y) + ((*R6).y - (*R8).y));\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TR1 = (*R1).x + (*R3).x + (*R5).x + (*R7).x + (*R9).x;\n\t"
-                                                       "TR3 = ((*R1).x - C5QC*((*R5).x + (*R7).x)) + C5QB*((*R3).y - (*R9).y) + C5QD*((*R5).y - (*R7).y) + C5QA*(((*R3).x - (*R5).x) + ((*R9).x - (*R7).x));\n\t"
-                                                       "TR9 = ((*R1).x - C5QC*((*R5).x + (*R7).x)) - C5QB*((*R3).y - (*R9).y) - C5QD*((*R5).y - (*R7).y) + C5QA*(((*R3).x - (*R5).x) + ((*R9).x - (*R7).x));\n\t"
-                                                       "TR5 = ((*R1).x - C5QC*((*R3).x + (*R9).x)) - C5QB*((*R5).y - (*R7).y) + C5QD*((*R3).y - (*R9).y) + C5QA*(((*R5).x - (*R3).x) + ((*R7).x - (*R9).x));\n\t"
-                                                       "TR7 = ((*R1).x - C5QC*((*R3).x + (*R9).x)) + C5QB*((*R5).y - (*R7).y) - C5QD*((*R3).y - (*R9).y) + C5QA*(((*R5).x - (*R3).x) + ((*R7).x - (*R9).x));\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TI1 = (*R1).y + (*R3).y + (*R5).y + (*R7).y + (*R9).y;\n\t"
-                                                       "TI3 = ((*R1).y - C5QC*((*R5).y + (*R7).y)) - C5QB*((*R3).x - (*R9).x) - C5QD*((*R5).x - (*R7).x) + C5QA*(((*R3).y - (*R5).y) + ((*R9).y - (*R7).y));\n\t"
-                                                       "TI9 = ((*R1).y - C5QC*((*R5).y + (*R7).y)) + C5QB*((*R3).x - (*R9).x) + C5QD*((*R5).x - (*R7).x) + C5QA*(((*R3).y - (*R5).y) + ((*R9).y - (*R7).y));\n\t"
-                                                       "TI5 = ((*R1).y - C5QC*((*R3).y + (*R9).y)) + C5QB*((*R5).x - (*R7).x) - C5QD*((*R3).x - (*R9).x) + C5QA*(((*R5).y - (*R3).y) + ((*R7).y - (*R9).y));\n\t"
-                                                       "TI7 = ((*R1).y - C5QC*((*R3).y + (*R9).y)) - C5QB*((*R5).x - (*R7).x) + C5QD*((*R3).x - (*R9).x) + C5QA*(((*R5).y - (*R3).y) + ((*R7).y - (*R9).y));\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "(*R0).x = TR0 + TR1;\n\t"
-                                                       "(*R1).x = TR2 + ( C5QE*TR3 + C5QD*TI3);\n\t"
-                                                       "(*R2).x = TR4 + ( C5QA*TR5 + C5QB*TI5);\n\t"
-                                                       "(*R3).x = TR6 + (-C5QA*TR7 + C5QB*TI7);\n\t"
-                                                       "(*R4).x = TR8 + (-C5QE*TR9 + C5QD*TI9);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "(*R0).y = TI0 + TI1;\n\t"
-                                                       "(*R1).y = TI2 + (-C5QD*TR3 + C5QE*TI3);\n\t"
-                                                       "(*R2).y = TI4 + (-C5QB*TR5 + C5QA*TI5);\n\t"
-                                                       "(*R3).y = TI6 + (-C5QB*TR7 - C5QA*TI7);\n\t"
-                                                       "(*R4).y = TI8 + (-C5QD*TR9 - C5QE*TI9);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "(*R5).x = TR0 - TR1;\n\t"
-                                                       "(*R6).x = TR2 - ( C5QE*TR3 + C5QD*TI3);\n\t"
-                                                       "(*R7).x = TR4 - ( C5QA*TR5 + C5QB*TI5);\n\t"
-                                                       "(*R8).x = TR6 - (-C5QA*TR7 + C5QB*TI7);\n\t"
-                                                       "(*R9).x = TR8 - (-C5QE*TR9 + C5QD*TI9);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "(*R5).y = TI0 - TI1;\n\t"
-                                                       "(*R6).y = TI2 - (-C5QD*TR3 + C5QE*TI3);\n\t"
-                                                       "(*R7).y = TI4 - (-C5QB*TR5 + C5QA*TI5);\n\t"
-                                                       "(*R8).y = TI6 - (-C5QB*TR7 - C5QA*TI7);\n\t"
-                                                       "(*R9).y = TI8 - (-C5QD*TR9 - C5QE*TI9);\n\t";
-                                               }
-                                               else
-                                               {
-                                                       bflyStr +=
-                                                       "TR0 = *R0 + *R2 + *R4 + *R6 + *R8;\n\t"
-                                                       "TR2 = (*R0 - C5QC*(*R4 + *R6)) + C5QB*(*I2 - *I8) + C5QD*(*I4 - *I6) + C5QA*((*R2 - *R4) + (*R8 - *R6));\n\t"
-                                                       "TR8 = (*R0 - C5QC*(*R4 + *R6)) - C5QB*(*I2 - *I8) - C5QD*(*I4 - *I6) + C5QA*((*R2 - *R4) + (*R8 - *R6));\n\t"
-                                                       "TR4 = (*R0 - C5QC*(*R2 + *R8)) - C5QB*(*I4 - *I6) + C5QD*(*I2 - *I8) + C5QA*((*R4 - *R2) + (*R6 - *R8));\n\t"
-                                                       "TR6 = (*R0 - C5QC*(*R2 + *R8)) + C5QB*(*I4 - *I6) - C5QD*(*I2 - *I8) + C5QA*((*R4 - *R2) + (*R6 - *R8));\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TI0 = *I0 + *I2 + *I4 + *I6 + *I8;\n\t"
-                                                       "TI2 = (*I0 - C5QC*(*I4 + *I6)) - C5QB*(*R2 - *R8) - C5QD*(*R4 - *R6) + C5QA*((*I2 - *I4) + (*I8 - *I6));\n\t"
-                                                       "TI8 = (*I0 - C5QC*(*I4 + *I6)) + C5QB*(*R2 - *R8) + C5QD*(*R4 - *R6) + C5QA*((*I2 - *I4) + (*I8 - *I6));\n\t"
-                                                       "TI4 = (*I0 - C5QC*(*I2 + *I8)) + C5QB*(*R4 - *R6) - C5QD*(*R2 - *R8) + C5QA*((*I4 - *I2) + (*I6 - *I8));\n\t"
-                                                       "TI6 = (*I0 - C5QC*(*I2 + *I8)) - C5QB*(*R4 - *R6) + C5QD*(*R2 - *R8) + C5QA*((*I4 - *I2) + (*I6 - *I8));\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TR1 = *R1 + *R3 + *R5 + *R7 + *R9;\n\t"
-                                                       "TR3 = (*R1 - C5QC*(*R5 + *R7)) + C5QB*(*I3 - *I9) + C5QD*(*I5 - *I7) + C5QA*((*R3 - *R5) + (*R9 - *R7));\n\t"
-                                                       "TR9 = (*R1 - C5QC*(*R5 + *R7)) - C5QB*(*I3 - *I9) - C5QD*(*I5 - *I7) + C5QA*((*R3 - *R5) + (*R9 - *R7));\n\t"
-                                                       "TR5 = (*R1 - C5QC*(*R3 + *R9)) - C5QB*(*I5 - *I7) + C5QD*(*I3 - *I9) + C5QA*((*R5 - *R3) + (*R7 - *R9));\n\t"
-                                                       "TR7 = (*R1 - C5QC*(*R3 + *R9)) + C5QB*(*I5 - *I7) - C5QD*(*I3 - *I9) + C5QA*((*R5 - *R3) + (*R7 - *R9));\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TI1 = *I1 + *I3 + *I5 + *I7 + *I9;\n\t"
-                                                       "TI3 = (*I1 - C5QC*(*I5 + *I7)) - C5QB*(*R3 - *R9) - C5QD*(*R5 - *R7) + C5QA*((*I3 - *I5) + (*I9 - *I7));\n\t"
-                                                       "TI9 = (*I1 - C5QC*(*I5 + *I7)) + C5QB*(*R3 - *R9) + C5QD*(*R5 - *R7) + C5QA*((*I3 - *I5) + (*I9 - *I7));\n\t"
-                                                       "TI5 = (*I1 - C5QC*(*I3 + *I9)) + C5QB*(*R5 - *R7) - C5QD*(*R3 - *R9) + C5QA*((*I5 - *I3) + (*I7 - *I9));\n\t"
-                                                       "TI7 = (*I1 - C5QC*(*I3 + *I9)) - C5QB*(*R5 - *R7) + C5QD*(*R3 - *R9) + C5QA*((*I5 - *I3) + (*I7 - *I9));\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "(*R0) = TR0 + TR1;\n\t"
-                                                       "(*R1) = TR2 + ( C5QE*TR3 + C5QD*TI3);\n\t"
-                                                       "(*R2) = TR4 + ( C5QA*TR5 + C5QB*TI5);\n\t"
-                                                       "(*R3) = TR6 + (-C5QA*TR7 + C5QB*TI7);\n\t"
-                                                       "(*R4) = TR8 + (-C5QE*TR9 + C5QD*TI9);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "(*I0) = TI0 + TI1;\n\t"
-                                                       "(*I1) = TI2 + (-C5QD*TR3 + C5QE*TI3);\n\t"
-                                                       "(*I2) = TI4 + (-C5QB*TR5 + C5QA*TI5);\n\t"
-                                                       "(*I3) = TI6 + (-C5QB*TR7 - C5QA*TI7);\n\t"
-                                                       "(*I4) = TI8 + (-C5QD*TR9 - C5QE*TI9);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "(*R5) = TR0 - TR1;\n\t"
-                                                       "(*R6) = TR2 - ( C5QE*TR3 + C5QD*TI3);\n\t"
-                                                       "(*R7) = TR4 - ( C5QA*TR5 + C5QB*TI5);\n\t"
-                                                       "(*R8) = TR6 - (-C5QA*TR7 + C5QB*TI7);\n\t"
-                                                       "(*R9) = TR8 - (-C5QE*TR9 + C5QD*TI9);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "(*I5) = TI0 - TI1;\n\t"
-                                                       "(*I6) = TI2 - (-C5QD*TR3 + C5QE*TI3);\n\t"
-                                                       "(*I7) = TI4 - (-C5QB*TR5 + C5QA*TI5);\n\t"
-                                                       "(*I8) = TI6 - (-C5QB*TR7 - C5QA*TI7);\n\t"
-                                                       "(*I9) = TI8 - (-C5QD*TR9 - C5QE*TI9);\n\t";
-                                               }
-                                       }
-                                       else
-                                       {
-                                               if(cReg)
-                                               {
-                                                       bflyStr +=
-                                                       "TR0 = (*R0).x + (*R2).x + (*R4).x + (*R6).x + (*R8).x;\n\t"
-                                                       "TR2 = ((*R0).x - C5QC*((*R4).x + (*R6).x)) - C5QB*((*R2).y - (*R8).y) - C5QD*((*R4).y - (*R6).y) + C5QA*(((*R2).x - (*R4).x) + ((*R8).x - (*R6).x));\n\t"
-                                                       "TR8 = ((*R0).x - C5QC*((*R4).x + (*R6).x)) + C5QB*((*R2).y - (*R8).y) + C5QD*((*R4).y - (*R6).y) + C5QA*(((*R2).x - (*R4).x) + ((*R8).x - (*R6).x));\n\t"
-                                                       "TR4 = ((*R0).x - C5QC*((*R2).x + (*R8).x)) + C5QB*((*R4).y - (*R6).y) - C5QD*((*R2).y - (*R8).y) + C5QA*(((*R4).x - (*R2).x) + ((*R6).x - (*R8).x));\n\t"
-                                                       "TR6 = ((*R0).x - C5QC*((*R2).x + (*R8).x)) - C5QB*((*R4).y - (*R6).y) + C5QD*((*R2).y - (*R8).y) + C5QA*(((*R4).x - (*R2).x) + ((*R6).x - (*R8).x));\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TI0 = (*R0).y + (*R2).y + (*R4).y + (*R6).y + (*R8).y;\n\t"
-                                                       "TI2 = ((*R0).y - C5QC*((*R4).y + (*R6).y)) + C5QB*((*R2).x - (*R8).x) + C5QD*((*R4).x - (*R6).x) + C5QA*(((*R2).y - (*R4).y) + ((*R8).y - (*R6).y));\n\t"
-                                                       "TI8 = ((*R0).y - C5QC*((*R4).y + (*R6).y)) - C5QB*((*R2).x - (*R8).x) - C5QD*((*R4).x - (*R6).x) + C5QA*(((*R2).y - (*R4).y) + ((*R8).y - (*R6).y));\n\t"
-                                                       "TI4 = ((*R0).y - C5QC*((*R2).y + (*R8).y)) - C5QB*((*R4).x - (*R6).x) + C5QD*((*R2).x - (*R8).x) + C5QA*(((*R4).y - (*R2).y) + ((*R6).y - (*R8).y));\n\t"
-                                                       "TI6 = ((*R0).y - C5QC*((*R2).y + (*R8).y)) + C5QB*((*R4).x - (*R6).x) - C5QD*((*R2).x - (*R8).x) + C5QA*(((*R4).y - (*R2).y) + ((*R6).y - (*R8).y));\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TR1 = (*R1).x + (*R3).x + (*R5).x + (*R7).x + (*R9).x;\n\t"
-                                                       "TR3 = ((*R1).x - C5QC*((*R5).x + (*R7).x)) - C5QB*((*R3).y - (*R9).y) - C5QD*((*R5).y - (*R7).y) + C5QA*(((*R3).x - (*R5).x) + ((*R9).x - (*R7).x));\n\t"
-                                                       "TR9 = ((*R1).x - C5QC*((*R5).x + (*R7).x)) + C5QB*((*R3).y - (*R9).y) + C5QD*((*R5).y - (*R7).y) + C5QA*(((*R3).x - (*R5).x) + ((*R9).x - (*R7).x));\n\t"
-                                                       "TR5 = ((*R1).x - C5QC*((*R3).x + (*R9).x)) + C5QB*((*R5).y - (*R7).y) - C5QD*((*R3).y - (*R9).y) + C5QA*(((*R5).x - (*R3).x) + ((*R7).x - (*R9).x));\n\t"
-                                                       "TR7 = ((*R1).x - C5QC*((*R3).x + (*R9).x)) - C5QB*((*R5).y - (*R7).y) + C5QD*((*R3).y - (*R9).y) + C5QA*(((*R5).x - (*R3).x) + ((*R7).x - (*R9).x));\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TI1 = (*R1).y + (*R3).y + (*R5).y + (*R7).y + (*R9).y;\n\t"
-                                                       "TI3 = ((*R1).y - C5QC*((*R5).y + (*R7).y)) + C5QB*((*R3).x - (*R9).x) + C5QD*((*R5).x - (*R7).x) + C5QA*(((*R3).y - (*R5).y) + ((*R9).y - (*R7).y));\n\t"
-                                                       "TI9 = ((*R1).y - C5QC*((*R5).y + (*R7).y)) - C5QB*((*R3).x - (*R9).x) - C5QD*((*R5).x - (*R7).x) + C5QA*(((*R3).y - (*R5).y) + ((*R9).y - (*R7).y));\n\t"
-                                                       "TI5 = ((*R1).y - C5QC*((*R3).y + (*R9).y)) - C5QB*((*R5).x - (*R7).x) + C5QD*((*R3).x - (*R9).x) + C5QA*(((*R5).y - (*R3).y) + ((*R7).y - (*R9).y));\n\t"
-                                                       "TI7 = ((*R1).y - C5QC*((*R3).y + (*R9).y)) + C5QB*((*R5).x - (*R7).x) - C5QD*((*R3).x - (*R9).x) + C5QA*(((*R5).y - (*R3).y) + ((*R7).y - (*R9).y));\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "(*R0).x = TR0 + TR1;\n\t"
-                                                       "(*R1).x = TR2 + ( C5QE*TR3 - C5QD*TI3);\n\t"
-                                                       "(*R2).x = TR4 + ( C5QA*TR5 - C5QB*TI5);\n\t"
-                                                       "(*R3).x = TR6 + (-C5QA*TR7 - C5QB*TI7);\n\t"
-                                                       "(*R4).x = TR8 + (-C5QE*TR9 - C5QD*TI9);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "(*R0).y = TI0 + TI1;\n\t"
-                                                       "(*R1).y = TI2 + ( C5QD*TR3 + C5QE*TI3);\n\t"
-                                                       "(*R2).y = TI4 + ( C5QB*TR5 + C5QA*TI5);\n\t"
-                                                       "(*R3).y = TI6 + ( C5QB*TR7 - C5QA*TI7);\n\t"
-                                                       "(*R4).y = TI8 + ( C5QD*TR9 - C5QE*TI9);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "(*R5).x = TR0 - TR1;\n\t"
-                                                       "(*R6).x = TR2 - ( C5QE*TR3 - C5QD*TI3);\n\t"
-                                                       "(*R7).x = TR4 - ( C5QA*TR5 - C5QB*TI5);\n\t"
-                                                       "(*R8).x = TR6 - (-C5QA*TR7 - C5QB*TI7);\n\t"
-                                                       "(*R9).x = TR8 - (-C5QE*TR9 - C5QD*TI9);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "(*R5).y = TI0 - TI1;\n\t"
-                                                       "(*R6).y = TI2 - ( C5QD*TR3 + C5QE*TI3);\n\t"
-                                                       "(*R7).y = TI4 - ( C5QB*TR5 + C5QA*TI5);\n\t"
-                                                       "(*R8).y = TI6 - ( C5QB*TR7 - C5QA*TI7);\n\t"
-                                                       "(*R9).y = TI8 - ( C5QD*TR9 - C5QE*TI9);\n\t";
-                                               }
-                                               else
-                                               {
-                                                       bflyStr +=
-                                                       "TR0 = *R0 + *R2 + *R4 + *R6 + *R8;\n\t"
-                                                       "TR2 = (*R0 - C5QC*(*R4 + *R6)) - C5QB*(*I2 - *I8) - C5QD*(*I4 - *I6) + C5QA*((*R2 - *R4) + (*R8 - *R6));\n\t"
-                                                       "TR8 = (*R0 - C5QC*(*R4 + *R6)) + C5QB*(*I2 - *I8) + C5QD*(*I4 - *I6) + C5QA*((*R2 - *R4) + (*R8 - *R6));\n\t"
-                                                       "TR4 = (*R0 - C5QC*(*R2 + *R8)) + C5QB*(*I4 - *I6) - C5QD*(*I2 - *I8) + C5QA*((*R4 - *R2) + (*R6 - *R8));\n\t"
-                                                       "TR6 = (*R0 - C5QC*(*R2 + *R8)) - C5QB*(*I4 - *I6) + C5QD*(*I2 - *I8) + C5QA*((*R4 - *R2) + (*R6 - *R8));\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TI0 = *I0 + *I2 + *I4 + *I6 + *I8;\n\t"
-                                                       "TI2 = (*I0 - C5QC*(*I4 + *I6)) + C5QB*(*R2 - *R8) + C5QD*(*R4 - *R6) + C5QA*((*I2 - *I4) + (*I8 - *I6));\n\t"
-                                                       "TI8 = (*I0 - C5QC*(*I4 + *I6)) - C5QB*(*R2 - *R8) - C5QD*(*R4 - *R6) + C5QA*((*I2 - *I4) + (*I8 - *I6));\n\t"
-                                                       "TI4 = (*I0 - C5QC*(*I2 + *I8)) - C5QB*(*R4 - *R6) + C5QD*(*R2 - *R8) + C5QA*((*I4 - *I2) + (*I6 - *I8));\n\t"
-                                                       "TI6 = (*I0 - C5QC*(*I2 + *I8)) + C5QB*(*R4 - *R6) - C5QD*(*R2 - *R8) + C5QA*((*I4 - *I2) + (*I6 - *I8));\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TR1 = *R1 + *R3 + *R5 + *R7 + *R9;\n\t"
-                                                       "TR3 = (*R1 - C5QC*(*R5 + *R7)) - C5QB*(*I3 - *I9) - C5QD*(*I5 - *I7) + C5QA*((*R3 - *R5) + (*R9 - *R7));\n\t"
-                                                       "TR9 = (*R1 - C5QC*(*R5 + *R7)) + C5QB*(*I3 - *I9) + C5QD*(*I5 - *I7) + C5QA*((*R3 - *R5) + (*R9 - *R7));\n\t"
-                                                       "TR5 = (*R1 - C5QC*(*R3 + *R9)) + C5QB*(*I5 - *I7) - C5QD*(*I3 - *I9) + C5QA*((*R5 - *R3) + (*R7 - *R9));\n\t"
-                                                       "TR7 = (*R1 - C5QC*(*R3 + *R9)) - C5QB*(*I5 - *I7) + C5QD*(*I3 - *I9) + C5QA*((*R5 - *R3) + (*R7 - *R9));\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "TI1 = *I1 + *I3 + *I5 + *I7 + *I9;\n\t"
-                                                       "TI3 = (*I1 - C5QC*(*I5 + *I7)) + C5QB*(*R3 - *R9) + C5QD*(*R5 - *R7) + C5QA*((*I3 - *I5) + (*I9 - *I7));\n\t"
-                                                       "TI9 = (*I1 - C5QC*(*I5 + *I7)) - C5QB*(*R3 - *R9) - C5QD*(*R5 - *R7) + C5QA*((*I3 - *I5) + (*I9 - *I7));\n\t"
-                                                       "TI5 = (*I1 - C5QC*(*I3 + *I9)) - C5QB*(*R5 - *R7) + C5QD*(*R3 - *R9) + C5QA*((*I5 - *I3) + (*I7 - *I9));\n\t"
-                                                       "TI7 = (*I1 - C5QC*(*I3 + *I9)) + C5QB*(*R5 - *R7) - C5QD*(*R3 - *R9) + C5QA*((*I5 - *I3) + (*I7 - *I9));\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "(*R0) = TR0 + TR1;\n\t"
-                                                       "(*R1) = TR2 + ( C5QE*TR3 - C5QD*TI3);\n\t"
-                                                       "(*R2) = TR4 + ( C5QA*TR5 - C5QB*TI5);\n\t"
-                                                       "(*R3) = TR6 + (-C5QA*TR7 - C5QB*TI7);\n\t"
-                                                       "(*R4) = TR8 + (-C5QE*TR9 - C5QD*TI9);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "(*I0) = TI0 + TI1;\n\t"
-                                                       "(*I1) = TI2 + ( C5QD*TR3 + C5QE*TI3);\n\t"
-                                                       "(*I2) = TI4 + ( C5QB*TR5 + C5QA*TI5);\n\t"
-                                                       "(*I3) = TI6 + ( C5QB*TR7 - C5QA*TI7);\n\t"
-                                                       "(*I4) = TI8 + ( C5QD*TR9 - C5QE*TI9);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "(*R5) = TR0 - TR1;\n\t"
-                                                       "(*R6) = TR2 - ( C5QE*TR3 - C5QD*TI3);\n\t"
-                                                       "(*R7) = TR4 - ( C5QA*TR5 - C5QB*TI5);\n\t"
-                                                       "(*R8) = TR6 - (-C5QA*TR7 - C5QB*TI7);\n\t"
-                                                       "(*R9) = TR8 - (-C5QE*TR9 - C5QD*TI9);\n\t";
-
-                                                       bflyStr += "\n\t";
-
-                                                       bflyStr +=
-                                                       "(*I5) = TI0 - TI1;\n\t"
-                                                       "(*I6) = TI2 - ( C5QD*TR3 + C5QE*TI3);\n\t"
-                                                       "(*I7) = TI4 - ( C5QB*TR5 + C5QA*TI5);\n\t"
-                                                       "(*I8) = TI6 - ( C5QB*TR7 - C5QA*TI7);\n\t"
-                                                       "(*I9) = TI8 - ( C5QD*TR9 - C5QE*TI9);\n\t";
-                                               }
-                                       }
-                               } break;
-                       case 11:
-                               {
-                                       static const char *radix11str = " \
-                                               fptype p0, p1, p2, p3, p4, p5, p6, p7, p8, p9; \n\
-                                               p0 = ((*R1).x - (*R10).x)*dir; \n\
-                                               p1 = (*R1).x + (*R10).x; \n\
-                                               p2 = ((*R5).x - (*R6).x)*dir; \n\
-                                               p3 = (*R5).x + (*R6).x; \n\
-                                               p4 = ((*R2).x - (*R9).x)*dir; \n\
-                                               p5 = (*R2).x + (*R9).x; \n\
-                                               p6 = ((*R3).x - (*R8).x)*dir; \n\
-                                               p7 = (*R3).x + (*R8).x; \n\
-                                               p8 = (*R4).x + (*R7).x; \n\
-                                               p9 = ((*R4).x - (*R7).x)*dir; \n\
-                                               \n\
-                                               fptype r0, r1, r2, r3, r4, r5, r6, r7, r8, r9; \n\
-                                               r0 = p4 - p0 * b11_9; \n\
-                                               r1 = p0 + p2 * b11_9; \n\
-                                               r2 = p2 + p6 * b11_9; \n\
-                                               r3 = p6 + p9 * b11_9; \n\
-                                               r4 = p9 - p4 * b11_9; \n\
-                                               r5 = p7 - p1 * b11_8; \n\
-                                               r6 = p5 - p7 * b11_8; \n\
-                                               r7 = p1 - p8 * b11_8; \n\
-                                               r8 = p3 - p5 * b11_8; \n\
-                                               r9 = p8 - p3 * b11_8; \n\
-                                               \n\
-                                               fptype s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; \n\
-                                               s0 = p6 - r0 * b11_6; \n\
-                                               s1 = p9 + r1 * b11_6; \n\
-                                               s2 = p4 - r2 * b11_6; \n\
-                                               s3 = p0 + r3 * b11_6; \n\
-                                               s4 = p2 + r4 * b11_6; \n\
-                                               s5 = p3 - r5 * b11_7; \n\
-                                               s6 = p8 - r6 * b11_7; \n\
-                                               s7 = p5 - r7 * b11_7; \n\
-                                               s8 = p1 - r8 * b11_7; \n\
-                                               s9 = p7 - r9 * b11_7; \n\
-                                               \n\
-                                               fptype p10, p11, p12, p13, p14, p15, p16, p17, p18, p19; \n\
-                                               p10 = ((*R10).y - (*R1).y)*dir; \n\
-                                               p11 = (*R1).y + (*R10).y; \n\
-                                               p12 = ((*R9).y - (*R2).y)*dir; \n\
-                                               p13 = (*R2).y + (*R9).y; \n\
-                                               p14 = ((*R8).y - (*R3).y)*dir; \n\
-                                               p15 = (*R3).y + (*R8).y; \n\
-                                               p16 = ((*R7).y - (*R4).y)*dir; \n\
-                                               p17 = (*R4).y + (*R7).y; \n\
-                                               p18 = ((*R6).y - (*R5).y)*dir; \n\
-                                               p19 = (*R5).y + (*R6).y; \n\
-                                               \n\
-                                               fptype r10, r11, r12, r13, r14, r15, r16, r17, r18, r19; \n\
-                                               r10 = p12 - p10 * b11_9; \n\
-                                               r11 = p16 - p12 * b11_9; \n\
-                                               r12 = p18 + p14 * b11_9; \n\
-                                               r13 = p14 + p16 * b11_9; \n\
-                                               r14 = p10 + p18 * b11_9; \n\
-                                               r15 = p15 - p11 * b11_8; \n\
-                                               r16 = p19 - p13 * b11_8; \n\
-                                               r17 = p13 - p15 * b11_8; \n\
-                                               r18 = p11 - p17 * b11_8; \n\
-                                               r19 = p17 - p19 * b11_8; \n\
-                                               \n\
-                                               fptype s10, s11, s12, s13, s14, s15, s16, s17, s18, s19; \n\
-                                               s10 = p14 - r10 * b11_6; \n\
-                                               s11 = p18 + r11 * b11_6; \n\
-                                               s12 = p12 - r12 * b11_6; \n\
-                                               s13 = p10 + r13 * b11_6; \n\
-                                               s14 = p16 + r14 * b11_6; \n\
-                                               s15 = p19 - r15 * b11_7; \n\
-                                               s16 = p11 - r16 * b11_7; \n\
-                                               s17 = p17 - r17 * b11_7; \n\
-                                               s18 = p13 - r18 * b11_7; \n\
-                                               s19 = p15 - r19 * b11_7; \n\
-                                               \n\
-                                               fptype v0, v1, v2, v3, v4, v5, v6, v7, v8, v9; \n\
-                                               fptype v10, v11, v12, v13, v14, v15, v16, v17, v18, v19; \n\
-                                               v0 = p9 - s0 * b11_4; \n\
-                                               v1 = p4 + s1 * b11_4; \n\
-                                               v2 = p0 + s2 * b11_4; \n\
-                                               v3 = p2 - s3 * b11_4; \n\
-                                               v4 = p6 - s4 * b11_4; \n\
-                                               v5 = p8 - s5 * b11_5; \n\
-                                               v6 = p1 - s6 * b11_5; \n\
-                                               v7 = p3 - s7 * b11_5; \n\
-                                               v8 = p7 - s8 * b11_5; \n\
-                                               v9 = p5 - s9 * b11_5; \n\
-                                               v10 = p16 - s10 * b11_4; \n\
-                                               v11 = p14 - s11 * b11_4; \n\
-                                               v12 = p10 + s12 * b11_4; \n\
-                                               v13 = p18 - s13 * b11_4; \n\
-                                               v14 = p12 + s14 * b11_4; \n\
-                                               v15 = p17 - s15 * b11_5; \n\
-                                               v16 = p15 - s16 * b11_5; \n\
-                                               v17 = p11 - s17 * b11_5; \n\
-                                               v18 = p19 - s18 * b11_5; \n\
-                                               v19 = p13 - s19 * b11_5; \n\
-                                               \n\
-                                               fptype w0, w1, w2, w3, w4, w5, w6, w7, w8, w9; \n\
-                                               fptype w10, w11, w12, w13, w14, w15, w16, w17, w18, w19; \n\
-                                               w0 = p2 - v0 * b11_2; \n\
-                                               w1 = p6 + v1 * b11_2; \n\
-                                               w2 = p9 - v2 * b11_2; \n\
-                                               w3 = p4 + v3 * b11_2; \n\
-                                               w4 = p0 - v4 * b11_2; \n\
-                                               w5 = p5 - v5 * b11_3; \n\
-                                               w6 = p3 - v6 * b11_3; \n\
-                                               w7 = p7 - v7 * b11_3; \n\
-                                               w8 = p8 - v8 * b11_3; \n\
-                                               w9 = p1 - v9 * b11_3; \n\
-                                               w10 = p18 - v10 * b11_2; \n\
-                                               w11 = p10 - v11 * b11_2; \n\
-                                               w12 = p16 - v12 * b11_2; \n\
-                                               w13 = p12 + v13 * b11_2; \n\
-                                               w14 = p14 + v14 * b11_2; \n\
-                                               w15 = p13 - v15 * b11_3; \n\
-                                               w16 = p17 - v16 * b11_3; \n\
-                                               w17 = p19 - v17 * b11_3; \n\
-                                               w18 = p15 - v18 * b11_3; \n\
-                                               w19 = p11 - v19 * b11_3; \n\
-                                               \n\
-                                               fptype z0, z1, z2, z3, z4, z5, z6, z7, z8, z9; \n\
-                                               z0 = (*R0).x - w5 * b11_1; \n\
-                                               z1 = (*R0).x - w6 * b11_1; \n\
-                                               z2 = (*R0).x - w7 * b11_1; \n\
-                                               z3 = (*R0).x - w8 * b11_1; \n\
-                                               z4 = (*R0).x - w9 * b11_1; \n\
-                                               z5 = (*R0).y - w15 * b11_1; \n\
-                                               z6 = (*R0).y - w16 * b11_1; \n\
-                                               z7 = (*R0).y - w17 * b11_1; \n\
-                                               z8 = (*R0).y - w18 * b11_1; \n\
-                                               z9 = (*R0).y - w19 * b11_1; \n\
-                                               \n\
-                                               (*R0).x = (*R0).x + p1 + p3 + p5 + p7 + p8; \n\
-                                               (*R0).y = (*R0).y + p11 + p13 + p15 + p17 + p19; \n\
-                                               (*R1).x = z1 + w14* b11_0; \n\
-                                               (*R1).y = z7 + w1* b11_0; \n\
-                                               (*R2).x = z2 - w12* b11_0; \n\
-                                               (*R2).y = z8 - w2* b11_0; \n\
-                                               (*R3).x = z0 + w11* b11_0; \n\
-                                               (*R3).y = z5 + w4* b11_0; \n\
-                                               (*R4).x = z3 - w13* b11_0; \n\
-                                               (*R4).y = z6 - w3* b11_0; \n\
-                                               (*R5).x = z4 + w10* b11_0; \n\
-                                               (*R5).y = z9 + w0* b11_0; \n\
-                                               (*R6).x = z4 - w10* b11_0; \n\
-                                               (*R6).y = z9 - w0* b11_0; \n\
-                                               (*R7).x = z3 + w13* b11_0; \n\
-                                               (*R7).y = z6 + w3* b11_0; \n\
-                                               (*R8).x = z0 - w11* b11_0; \n\
-                                               (*R8).y = z5 - w4* b11_0; \n\
-                                               (*R9).x = z2 + w12* b11_0; \n\
-                                               (*R9).y = z8 + w2* b11_0; \n\
-                                               (*R10).x = z1 - w14* b11_0; \n\
-                                               (*R10).y = z7 - w1* b11_0; \n";
-
-                                       if (fwd)
-                                       {
-                                               bflyStr += "fptype dir = -1;\n\n";
-                                       }
-                                       else
-                                       {
-                                               bflyStr += "fptype dir = 1;\n\n";
-                                       }
-
-                                       bflyStr += radix11str;
-
-                               } break;
-                       case 13:
-                               {
-
-                                       static const char *radix13str = " \
-                                               fptype p0, p1, p2, p3, p4, p5, p6, p7, p8, p9;\n\
-                                               p0 = (*R7).x - (*R2).x;\n\
-                                               p1 = (*R7).x + (*R2).x;\n\
-                                               p2 = (*R8).x - (*R5).x;\n\
-                                               p3 = (*R8).x + (*R5).x;\n\
-                                               p4 = (*R9).x - (*R3).x;\n\
-                                               p5 = (*R3).x + (*R9).x;\n\
-                                               p6 = (*R10).x + (*R4).x;\n\
-                                               p7 = (*R10).x - (*R4).x;\n\
-                                               p8 = (*R11).x + (*R6).x;\n\
-                                               p9 = (*R11).x - (*R6).x;\n\
-                                               \n\
-                                               fptype p10, p11, p12, p13, p14, p15, p16, p17, p18, p19;\n\
-                                               p10 = (*R12).x + p6;\n\
-                                               p11 = (*R1).x + p5;\n\
-                                               p12 = p8 - p1;\n\
-                                               p13 = p8 + p1;\n\
-                                               p14 = p9 + p0;\n\
-                                               p15 = p9 - p0;\n\
-                                               p16 = p7 - p4;\n\
-                                               p17 = p4 + p7;\n\
-                                               p18 = p11 + p10;\n\
-                                               p19 = p11 - p10;\n\
-                                               \n\
-                                               fptype s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11;\n\
-                                               s0 = p3 + p13;\n\
-                                               s1 = p2 + p14;\n\
-                                               s2 = p16 - p15;\n\
-                                               s3 = p16 + p15;\n\
-                                               s4 = -(*R12).x + p6 * b13_17;\n\
-                                               s5 =   (*R1).x - p5 * b13_17;\n\
-                                               s6 = s5 - s4;\n\
-                                               s7 = s5 + s4;\n\
-                                               s8 = p18 + s0;\n\
-                                               s9 = p18 - s0;\n\
-                                               fptype c2 = p3 - p13 * b13_17;\n\
-                                               s10 = s6 - c2;\n\
-                                               s11 = s6 + c2;\n\
-                                               \n\
-                                               fptype r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11;\n\
-                                               r0 = (*R7).y + (*R2).y;\n\
-                                               r1 = (*R7).y - (*R2).y;\n\
-                                               r2 = (*R8).y + (*R5).y;\n\
-                                               r3 = (*R8).y - (*R5).y;\n\
-                                               r4 = (*R9).y - (*R3).y;\n\
-                                               r5 = (*R3).y + (*R9).y;\n\
-                                               r6 = (*R10).y + (*R4).y;\n\
-                                               r7 = (*R10).y - (*R4).y;\n\
-                                               r8 = (*R11).y - (*R6).y;\n\
-                                               r9 = (*R11).y + (*R6).y;\n\
-                                               r10 = (*R12).y + r6;\n\
-                                               r11 = (*R1).y + r5;\n\
-                                               \n\
-                                               fptype m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10;\n\
-                                               fptype m11, m12, m13, m14, m15, m16, m17, m18, m19, m20;\n\
-                                               m0 = r4 + r7;\n\
-                                               m1 = r7 - r4;\n\
-                                               m2 = r8 - r1;\n\
-                                               m3 = r8 + r1;\n\
-                                               m4 = r9 + r0;\n\
-                                               m5 = r9 - r0;\n\
-                                               m6 = r11 + r10;\n\
-                                               m7 = r11 - r10;\n\
-                                               m8 = m1 - m2;\n\
-                                               m9 = m1 + m2;\n\
-                                               m10 = r3 + m3;\n\
-                                               m11 = r2 + m4;\n\
-                                               m12 = m6 - m11;\n\
-                                               m13 = m6 + m11;\n\
-                                               \n\
-                                               m14 =  (*R1).y - r5 * b13_17;\n\
-                                               m15 = -(*R12).y + r6 * b13_17;\n\
-                                               m16 =  r2      - m4 * b13_17;\n\
-                                               \n\
-                                               m17 = m14 + m15;\n\
-                                               m18 = m14 - m15;\n\
-                                               m19 = m18 + m16;\n\
-                                               m20 = m18 - m16;\n\
-                                               \n\
-                                               fptype c0, c1, c3, c4, c5, c6, c7, c8, c9;\n\
-                                               fptype c10, c11, c12, c13, c14, c15, c16, c17, c18, c19;\n\
-                                               fptype c20, c21, c22, c23, c24;\n\
-                                               c0  =  s7 - p12 * b13_3;\n\
-                                               c1  =  s7 + p12 * b13_3;\n\
-                                               c3  =  p2 - p14 * b13_17;\n\
-                                               c4  =  s1 - p19 * b13_18;\n\
-                                               c5  = p19 + s1 * b13_18;\n\
-                                               c6  = s10 - s2 * b13_15;\n\
-                                               c7  = s11 - s3 * b13_22;\n\
-                                               c8  = (*R0).x - s8 * b13_23;\n\
-                                               c9  =  s2 + s10 * b13_7;\n\
-                                               c10 =  s3 + s11 * b13_19;\n\
-                                               c11 =  r3 - m3 * b13_17;\n\
-                                               c12 = m17 - m5 * b13_3;\n\
-                                               c13 = m17 + m5 * b13_3;\n\
-                                               c14 = m10 - m7 * b13_18;\n\
-                                               c15 = m20 - m8 * b13_15;\n\
-                                               c16 = m19 - m9 * b13_22;\n\
-                                               c17 =  m7 + m10 * b13_18;\n\
-                                               c18 = (*R0).y- m13 * b13_23;\n\
-                                               c19 =  m9 + m19 * b13_19;\n\
-                                               c20 =  m8 + m20 * b13_7;\n\
-                                               c21 =  c3 + p17 * b13_3;\n\
-                                               c22 =  c3 - p17 * b13_3;\n\
-                                               c23 = c11 + m0 * b13_3;\n\
-                                               c24 = c11 - m0 * b13_3;\n\
-                                               \n\
-                                               fptype d0, d1, d2, d3, d4, d5, d6, d7, d8, d9;\n\
-                                               fptype d10, d11, d12, d13, d14, d15, d16, d17, d18, d19;\n\
-                                               d0  = c22 +  c0 * b13_8;\n\
-                                               d1  =  c0 - c22 * b13_8;\n\
-                                               d2  = c21 +  c1 * b13_24;\n\
-                                               d3  =  c1 - c21 * b13_24;\n\
-                                               d4  =  s9 -  c6 * b13_4;\n\
-                                               d5  =  c6 +  s9 * b13_10;\n\
-                                               d6  =  c7 +  c9 * b13_6;\n\
-                                               d7  =  c7 -  c9 * b13_6;\n\
-                                               d8  =  c8 - c10 * b13_21;\n\
-                                               d9  =  c8 + c10 * b13_16;\n\
-                                               d10 = c24 + c12 * b13_8;\n\
-                                               d11 = c12 - c24 * b13_8;\n\
-                                               d12 = c23 + c13 * b13_24;\n\
-                                               d13 = c13 - c23 * b13_24;\n\
-                                               d14 = m12 - c15 * b13_4;\n\
-                                               d15 = c15 + m12 * b13_10;\n\
-                                               d16 = c18 + c19 * b13_16;\n\
-                                               d17 = c18 - c19 * b13_21;\n\
-                                               d18 = c16 - c20 * b13_6;\n\
-                                               d19 = c16 + c20 * b13_6;\n\
-                                               \n\
-                                               fptype e0, e1, e2, e3, e4, e5, e6, e7, e8, e9;\n\
-                                               fptype e10, e11, e12, e13, e14, e15;\n\
-                                               e0  = d2  +  d0 * b13_5;\n\
-                                               e1  = d2  -  d0 * b13_5;\n\
-                                               e2  = d3  -  d1 * b13_5;\n\
-                                               e3  = d3  +  d1 * b13_5;\n\
-                                               e4  = d8  -  d4 * b13_20;\n\
-                                               e5  = d8  +  d4 * b13_20;\n\
-                                               e6  = d9  +  d5 * b13_14;\n\
-                                               e7  = d9  -  d5 * b13_14;\n\
-                                               e8  = d12 + d10 * b13_5;\n\
-                                               e9  = d12 - d10 * b13_5;\n\
-                                               e10 = d13 - d11 * b13_5;\n\
-                                               e11 = d13 + d11 * b13_5;\n\
-                                               e12 = d16 + d15 * b13_14;\n\
-                                               e13 = d16 - d15 * b13_14;\n\
-                                               e14 = d17 + d14 * b13_20;\n\
-                                               e15 = d17 - d14 * b13_20;\n\
-                                               \n\
-                                               fptype f0, f1, f2, f3, f4, f5, f6, f7, f8, f9;\n\
-                                               fptype f10, f11, f12, f13, f14, f15, f16, f17, f18, f19;\n\
-                                               fptype f20, f21, f22, f23;\n\
-                                               f0  = c17 - e10 * b13_12;\n\
-                                               f1  = e10 + c17 * b13_1;\n\
-                                               f2  = e9  + c14 * b13_1;\n\
-                                               f3  = c14 -  e9 * b13_12;\n\
-                                               f4  = e11 + dir * d7 * b13_0;\n\
-                                               f5  = e11 - dir * d7 * b13_0;\n\
-                                               f6  = e5  + dir * f3 * b13_11;\n\
-                                               f7  = e5  - dir * f3 * b13_11;\n\
-                                               f8  = e4  + dir * e8 * b13_13;\n\
-                                               f9  = e4  - dir * e8 * b13_13;\n\
-                                               f10 = f0  - dir * d6 * b13_2;\n\
-                                               f11 = f0  + dir * d6 * b13_2;\n\
-                                               f12 = e1  +  c4 * b13_1;\n\
-                                               f13 = c4  -  e1 * b13_12;\n\
-                                               f14 = c5  -  e2 * b13_12;\n\
-                                               f15 = e2  +  c5 * b13_1;\n\
-                                               f16 = f14 + dir * d19 * b13_2;\n\
-                                               f17 = f14 - dir * d19 * b13_2;\n\
-                                               f18 = e15 - dir *  e0 * b13_13;\n\
-                                               f19 = e15 + dir *  e0 * b13_13;\n\
-                                               f20 = e14 - dir * f13 * b13_11;\n\
-                                               f21 = e14 + dir * f13 * b13_11;\n\
-                                               f22 = e3  - dir * d18 * b13_0;\n\
-                                               f23 = e3  + dir * d18 * b13_0;\n\
-                                               \n\
-                                               (*R0).x  = (*R0).x + s8;\n\
-                                               (*R0).y  = (*R0).y + m13;\n\
-                                               (*R1).x  =  e6 +  f2 * dir * b13_9 ;\n\
-                                               (*R1).y  = e12 - f12 * dir * b13_9 ;\n\
-                                               (*R2).x  =  f9 - f10 * dir * b13_11;\n\
-                                               (*R2).y  = f19 + f16 * dir * b13_11;\n\
-                                               (*R3).x  =  f6 -  f5 * dir * b13_13;\n\
-                                               (*R3).y  = f20 + f23 * dir * b13_13;\n\
-                                               (*R4).x  =  f7 -  f4 * dir * b13_13;\n\
-                                               (*R4).y  = f21 + f22 * dir * b13_13;\n\
-                                               (*R5).x  =  e7 -  f1 * dir * b13_9 ;\n\
-                                               (*R5).y  = e13 + f15 * dir * b13_9 ;\n\
-                                               (*R6).x  =  f8 - f11 * dir * b13_11;\n\
-                                               (*R6).y  = f18 + f17 * dir * b13_11;\n\
-                                               (*R7).x  =  f9 + f10 * dir * b13_11;\n\
-                                               (*R7).y  = f19 - f16 * dir * b13_11;\n\
-                                               (*R8).x  =  e7 +  f1 * dir * b13_9 ;\n\
-                                               (*R8).y  = e13 - f15 * dir * b13_9 ;\n\
-                                               (*R9).x  =  f6 +  f5 * dir * b13_13;\n\
-                                               (*R9).y  = f20 - f23 * dir * b13_13;\n\
-                                               (*R10).x =  f7 +  f4 * dir * b13_13;\n\
-                                               (*R10).y = f21 - f22 * dir * b13_13;\n\
-                                               (*R11).x =  f8 + f11 * dir * b13_11;\n\
-                                               (*R11).y = f18 - f17 * dir * b13_11;\n\
-                                               (*R12).x =  e6 -  f2 * dir * b13_9 ;\n\
-                                               (*R12).y = e12 + f12 * dir * b13_9 ;\n";
-
-                                               if (fwd)
-                                               {
-                                                       bflyStr += "fptype dir = -1;\n\n";
-                                               }
-                                               else
-                                               {
-                                                       bflyStr += "fptype dir = 1;\n\n";
-                                               }
-
-                                               bflyStr += radix13str;
-
-                               } break;
-
-                       default:
-                               assert(false);
-                       }
-
-                       bflyStr += "\n\t";
-
-                       // Assign results
-                       if( (radix & (radix-1)) || (!cReg) )
-                       {
-                               if( (radix != 10) && (radix != 6) )
-                               {
-                               for(size_t i=0; i<radix;i++)
-                               {
-                                       if(cReg)
-                                       {
-                                               if ( (radix != 7) && (radix != 11) && (radix != 13) )
-                                               {
-                                               bflyStr += "((*R"; bflyStr += SztToStr(i); bflyStr += ").x) = TR"; bflyStr += SztToStr(i); bflyStr += "; ";
-                                               bflyStr += "((*R"; bflyStr += SztToStr(i); bflyStr += ").y) = TI"; bflyStr += SztToStr(i); bflyStr += ";\n\t";
-                                               }
-                                       }
-                                       else
-                                       {
-                                               bflyStr += "(*R"; bflyStr += SztToStr(i); bflyStr += ") = TR"; bflyStr += SztToStr(i); bflyStr += "; ";
-                                               bflyStr += "(*I"; bflyStr += SztToStr(i); bflyStr += ") = TI"; bflyStr += SztToStr(i); bflyStr += ";\n\t";
-                                       }
-                               }
-                               }
-                       }
-                       else
-                       {
-                               for(size_t i=0; i<radix;i++)
-                               {
-                                       size_t j = BitReverse(i, radix);
-
-                                       if(i < j)
-                                       {
-                                               bflyStr += "T = (*R"; bflyStr += SztToStr(i); bflyStr += "); (*R";
-                                               bflyStr += SztToStr(i); bflyStr += ") = (*R"; bflyStr += SztToStr(j); bflyStr += "); (*R";
-                                               bflyStr += SztToStr(j); bflyStr += ") = T;\n\t";
-                                       }
-                               }
-                       }
-
-                       bflyStr += "\n}\n";
-               }
-
-       public:
-               Butterfly(size_t radixVal, size_t countVal, bool fwdVal, bool cRegVal) : radix(radixVal), count(countVal), fwd(fwdVal), cReg(cRegVal) {}
-
-               void GenerateButterfly(std::string &bflyStr) const
-               {
-                       assert(count <= 4);
-                       if(count > 0)
-                               GenerateButterflyStr(bflyStr);
-               }
-    };
-
-};
-
-#endif
-
diff --git a/src/include/gromacs/external/clFFT/src/library/generator.transpose.gcn.h b/src/include/gromacs/external/clFFT/src/library/generator.transpose.gcn.h
deleted file mode 100644 (file)
index 12ad701..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/* ************************************************************************
- * Copyright 2013 Advanced Micro Devices, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ************************************************************************/
-
-#pragma once
-#if !defined( AMD_CLFFT_generator_transpose_H )
-#define AMD_CLFFT_generator_transpose_H
-#include "private.h"
-#include "repo.h"
-#include "plan.h"
-
-#endif
-
diff --git a/src/include/gromacs/external/clFFT/src/library/generator.transpose.h b/src/include/gromacs/external/clFFT/src/library/generator.transpose.h
deleted file mode 100644 (file)
index d00b657..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/* ************************************************************************
-* Copyright 2016 Advanced Micro Devices, Inc.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-* ************************************************************************/
-
-#pragma once
-#if !defined( AMD_CLFFT_GENERATOR_TRANSPOSE_HEADER )
-#define AMD_CLFFT_GENERATOR_TRANSPOSE_HEADER
-#include <iomanip>
-#include "private.h"
-#include "repo.h"
-#include "plan.h"
-#include "generator.stockham.h"
-#include "action.h"
-
-#define AVAIL_MEM_SIZE 32768 
-
-inline std::stringstream& clKernWrite(std::stringstream& rhs, const size_t tabIndex)
-{
-       rhs << std::setw(tabIndex) << "";
-       return rhs;
-}
-
-namespace clfft_transpose_generator
-{
-//generate transepose kernel with sqaure 2d matrix of row major with arbitrary batch size
-/*
-Below is a matrix(row major) containing three sqaure sub matrix along column
-The transpose will be done within each sub matrix.
-[M0
-M1
-M2]
-*/
-clfftStatus genTransposeKernelBatched(const FFTGeneratedTransposeSquareAction::Signature & params, std::string& strKernel, const size_t& lwSize, const size_t reShapeFactor);
-
-//generate transpose kernel with square 2d matrix of row major with blocks along the leading dimension
-//aka leading dimension batched
-/*
-Below is a matrix(row major) contaning three square sub matrix along row
-[M0 M2 M2]
-*/
-clfftStatus genTransposeKernelLeadingDimensionBatched(const FFTGeneratedTransposeNonSquareAction::Signature & params, std::string& strKernel, const size_t& lwSize, const size_t reShapeFactor);
-
-//swap lines. This kind of kernels are using with combination of square transpose kernels to perform nonsqaure transpose 1:2 ratio
-clfftStatus genSwapKernel(const FFTGeneratedTransposeNonSquareAction::Signature & params, std::string& strKernel, std::string& KernelFuncName, const size_t& lwSize, const size_t reShapeFactor);
-
-clfftStatus genSwapKernelGeneral(const FFTGeneratedTransposeNonSquareAction::Signature & params, std::string& strKernel, std::string& KernelFuncName, const size_t& lwSize, const size_t reShapeFactor);
-
-void get_cycles(size_t *cycle_map, size_t num_reduced_row, size_t num_reduced_col);
-
-void permutation_calculation(size_t m, size_t n, std::vector<std::vector<size_t> > &permutationVec);
-}//end of namespace clfft_transpose_generator
-
-#endif
\ No newline at end of file
diff --git a/src/include/gromacs/external/clFFT/src/library/lock.h b/src/include/gromacs/external/clFFT/src/library/lock.h
deleted file mode 100644 (file)
index 49c95ac..0000000
+++ /dev/null
@@ -1,248 +0,0 @@
-/* ************************************************************************
- * Copyright 2013 Advanced Micro Devices, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ************************************************************************/
-
-
-#pragma once
-#if !defined( CLFFT_lock_H )
-#define CLFFT_lock_H
-
-#if defined( _WIN32 )
-       #include <windows.h>
-#else
-       #include <pthread.h>
-#endif
-
-#include "private.h"
-
-#if defined( _WIN32 )
-
-//     lockRAII provides an abstraction for the concept of a mutex; it wraps all  mutex functions in generic methods
-//     On windows, the mutex is implemented as a CRITICAL_SECTION, as this is the fastest intraprocess mutex
-//     available.
-//     The template argument 'debugPrint' activates debugging information, but if not active the compiler optimizes
-//     the print statements out
-template< bool debugPrint >
-class lockRAII
-{
-       CRITICAL_SECTION cs;
-       tstring                 csName;
-       tstringstream   tstream;
-
-       //      Does not make sense to create a copy of a lock object; private method
-       lockRAII( const lockRAII& rhs ): csName( rhs.csName )
-       {
-               tstream << std::hex << std::showbase;
-               ::InitializeCriticalSection( &cs );
-       }
-
-       public:
-               lockRAII( )
-               {
-                       tstream << std::hex << std::showbase;
-                       ::InitializeCriticalSection( &cs );
-               }
-
-               lockRAII( const tstring& name ): csName( name )
-               {
-                       tstream << std::hex << std::showbase;
-                       ::InitializeCriticalSection( &cs );
-               }
-
-               ~lockRAII( )
-               {
-                       ::DeleteCriticalSection( &cs );
-               }
-
-               tstring& getName( )
-               {
-                       return csName;
-               }
-
-               void setName( const tstring& name )
-               {
-                       csName  = name;
-               }
-
-               void enter( )
-               {
-                       if( debugPrint )
-                       {
-                               tstream.str( _T( "" ) );
-                               tstream << _T( "Attempting CRITICAL_SECTION( " ) << csName << _T( " )" ) << std::endl;
-                               tout << tstream.str( );
-                       }
-
-                       ::EnterCriticalSection( &cs );
-
-                       if( debugPrint )
-                       {
-                               tstream.str( _T( "" ) );
-                               tstream << _T( "Acquired CRITICAL_SECTION( " ) << csName << _T( " )" ) << std::endl;
-                               tstream << _T( "\tOwningThread( " ) << cs.OwningThread << _T( " )" ) << std::endl;
-                               tstream << _T( "\tLockcount( " ) << cs.LockCount << _T( " )" ) << std::endl;
-                               tstream << _T( "\tRecursionCount( " ) << cs.RecursionCount << _T( " )" ) << std::endl;
-                               tout << tstream.str( );
-                       }
-               }
-
-               void leave( )
-               {
-                       if( debugPrint )
-                       {
-                               tstream.str( _T( "" ) );
-                               tstream << _T( "Releasing CRITICAL_SECTION( " ) << csName << _T( " )" ) << std::endl;
-                               tstream << _T( "\tOwningThread( " ) << cs.OwningThread << _T( " )" ) << std::endl;
-                               tstream << _T( "\tLockcount( " ) << cs.LockCount << _T( " )" ) << std::endl;
-                               tstream << _T( "\tRecursionCount( " ) << cs.RecursionCount << _T( " )" ) << std::endl << std::endl;
-                               tout << tstream.str( );
-                       }
-
-                       ::LeaveCriticalSection( &cs );
-               }
-};
-
-#else
-//     lockRAII provides an abstraction for the concept of a mutex; it wraps all  mutex functions in generic methods
-//     Linux implementation not done yet
-//     The template argument 'debugPrint' activates debugging information, but if not active the compiler optimizes
-//     the print statements out
-template< bool debugPrint >
-class lockRAII
-{
-       pthread_mutex_t mutex;
-       pthread_mutexattr_t mAttr;
-       tstring                 mutexName;
-       tstringstream   tstream;
-
-       //      Does not make sense to create a copy of a lock object; private method
-       lockRAII( const lockRAII& rhs ): mutexName( rhs.mutexName )
-       {
-               tstream << std::hex << std::showbase;
-       }
-
-       public:
-               lockRAII( )
-               {
-                       tstream << std::hex << std::showbase;
-                       pthread_mutexattr_init( &mAttr );
-                       pthread_mutexattr_settype( &mAttr, PTHREAD_MUTEX_RECURSIVE );
-                       pthread_mutex_init( &mutex, &mAttr );
-               }
-
-               lockRAII( const tstring& name ): mutexName( name )
-               {
-                       tstream << std::hex << std::showbase;
-                       pthread_mutexattr_init( &mAttr );
-                       pthread_mutexattr_settype( &mAttr, PTHREAD_MUTEX_RECURSIVE );
-                       pthread_mutex_init( &mutex, &mAttr );
-               }
-
-               ~lockRAII( )
-               {
-                       pthread_mutex_destroy( &mutex );
-                       pthread_mutexattr_destroy( &mAttr );
-               }
-
-               tstring& getName( )
-               {
-                       return mutexName;
-               }
-
-               void setName( const tstring& name )
-               {
-                       mutexName       = name;
-               }
-
-               void enter( )
-               {
-                       if( debugPrint )
-                       {
-                               tstream.str( _T( "" ) );
-                               tstream << _T( "Attempting pthread_mutex_t( " ) << mutexName << _T( " )" ) << std::endl;
-                               tout << tstream.str( );
-                       }
-
-                       ::pthread_mutex_lock( &mutex );
-
-                       if( debugPrint )
-                       {
-                               tstream.str( _T( "" ) );
-                               tstream << _T( "Acquired pthread_mutex_t( " ) << mutexName << _T( " )" ) << std::endl;
-                               //tstream << _T( "\tOwningThread( " ) << mutex.OwningThread << _T( " )" ) << std::endl;
-                               //tstream << _T( "\tLockcount( " ) << mutex.LockCount << _T( " )" ) << std::endl;
-                               //tstream << _T( "\tRecursionCount( " ) << mutex.RecursionCount << _T( " )" ) << std::endl;
-                               tout << tstream.str( );
-                       }
-               }
-
-               void leave( )
-               {
-                       if( debugPrint )
-                       {
-                               tstream.str( _T( "" ) );
-                               tstream << _T( "Releasing pthread_mutex_t( " ) << mutexName << _T( " )" ) << std::endl;
-                               //tstream << _T( "\tOwningThread( " ) << mutex.OwningThread << _T( " )" ) << std::endl;
-                               //tstream << _T( "\tLockcount( " ) << mutex.LockCount << _T( " )" ) << std::endl;
-                               //tstream << _T( "\tRecursionCount( " ) << mutex.RecursionCount << _T( " )" ) << std::endl << std::endl;
-                               tout << tstream.str( );
-                       }
-
-                       ::pthread_mutex_unlock( &mutex );
-               }
-};
-#endif
-
-//     Class used to make sure that we enter and leave critical sections in pairs
-//     The template logic logs our CRITICAL_SECTION actions; if the template parameter is false,
-//     the branch is constant and the compiler will optimize the branch out
-template< bool debugPrint >
-class scopedLock
-{
-       lockRAII< debugPrint >* sLock;
-       tstring                 sLockName;
-       tstringstream   tstream;
-
-       public:
-               scopedLock( lockRAII< debugPrint >& lock, const tstring& name ): sLock( &lock ), sLockName( name )
-               {
-                       if( debugPrint )
-                       {
-                               tstream.str( _T( "" ) );
-                               tstream << _T( "Entering scopedLock( " ) << sLockName << _T( " )" ) << std::endl << std::endl;
-                               tout << tstream.str( );
-                       }
-
-                       sLock->enter( );
-               }
-
-               ~scopedLock( )
-               {
-                       sLock->leave( );
-
-                       if( debugPrint )
-                       {
-                               tstream.str( _T( "" ) );
-                               tstream << _T( "Left scopedLock( " ) << sLockName << _T( " )" ) << std::endl << std::endl;
-                               tout << tstream.str( );
-                       }
-               }
-};
-
-//     Convenience macro to enable/disable debugging print statements
-#define lockRAII lockRAII< false >
-#define scopedLock scopedLock< false >
-
-#endif // CLFFT_lock_H
diff --git a/src/include/gromacs/external/clFFT/src/library/mainpage.h b/src/include/gromacs/external/clFFT/src/library/mainpage.h
deleted file mode 100644 (file)
index d4aca71..0000000
+++ /dev/null
@@ -1,486 +0,0 @@
-/* ************************************************************************
- * Copyright 2013-2015 Advanced Micro Devices, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ************************************************************************/
-
-/*! @file mainpage.h
-
-This file contains all documentation, no code, in the form of comment text.  It provides
-chapter 1 of the documentation that is produced with doxygen. Chapter 1 includes the title page, installation instructions, and prose on the nature of FFT and their use in our library.
-
-@mainpage OpenCL Fast Fourier Transforms (FFTs)
-
-The clFFT library is an OpenCL library implementation of discrete Fast Fourier Transforms. The library:
-@li provides a fast and accurate platform for calculating discrete FFTs.
-@li works on CPU or GPU backends.
-@li supports in-place or out-of-place transforms.
-@li supports 1D, 2D, and 3D transforms with a batch size that can be greater than or equal to 1.
-@li supports planar (real and complex components are stored in separate arrays) and interleaved (real and complex components are stored as a pair in the same array) formats.
-@li supports lengths that are any combination of powers of 2, 3, 5, and 7.
-@li supports single and double precision floating point formats.
-
-
-@section IntroFFT Introduction to clFFT
-
-The FFT is an implementation of the Discrete Fourier Transform (DFT) that makes use of symmetries in the FFT definition to reduce the mathematical intensity required from O(\f$N^2\f$) to O(\f$ N \log N\f$) when the sequence length, *N*, is the product of small prime factors.  Currently, there is no standard API for FFT routines. Hardware vendors usually provide a set of high-performance FFTs optimized for their systems: no two vendors employ the same interfaces for their FFT routines. clFFT provides a set of FFT routines that are optimized for AMD graphics processors, and that are also functional across CPU and other compute devices.
-
-@subsection SupportRadix Supported radices
-clFFT supports transform sizes that are powers of 2, 3, 5, and 7. This means that the vector lengths can be  a combination of powers of two, three, five, and seven; examples include \f$2^7, 2^1*3^1, 3^2*5^4, 2^2*3^3*5^5\f$, up to the limit that the device can support.
-
-@subsection SizeLimit Transform size limits
-Currently, there is an upper bound on the transform size that the library can support for certain transforms. This limit is \f$2^{24}\f$ for real 1D single precision and \f$2^{22}\f$ for real 1D double precision.
-
-@subsection EnumDim Dimensionality
-clFFT currently supports FFTs of (up to) three dimensions, given by the enum @ref clfftDim. This enum
-is a required parameter of @ref clfftCreateDefaultPlan() to create an initial plan, where a plan is the collection of (almost) all the parameters needed to specify an FFT computation. For more information about clFFT plans, see the section \ref clFFTPlans.
-Depending on the dimensionality that the client requests, clFFT uses the following formulations to compute the DFT:
-
-@li For a 1D complex DFT
-\f[
-{\tilde{x}}_j = {{1}\over{scale}}\sum_{k=0}^{n-1}x_k\exp\left({\pm i}{{2\pi jk}\over{n}}\right)\hbox{ for } j=0,1,\ldots,n-1
-\f]
-where, \f$x_k\f$ are the complex data to be transformed, \f$\tilde{x}_j\f$ are the transformed data, and the sign \f$\pm\f$ determines the direction of the transform: \f$-\f$ for forward and \f$+\f$ for backward. Note that you must provide the scaling factor.  By default, the scale is set to 1 for forward transforms, and \f${{1}\over{N}}\f$ for backward transforms, where *N* is the size of transform.
-
-@li For a 2D complex DFT
-\f[
-{\tilde{x}}_{jk} = {{1}\over{scale}}\sum_{q=0}^{m-1}\sum_{r=0}^{n-1}x_{rq}\exp\left({\pm i} {{2\pi jr}\over{n}}\right)\exp\left({\pm i}{{2\pi kq}\over{m}}\right)
-\f]
-for \f$j=0,1,\ldots,n-1\hbox{ and } k=0,1,\ldots,m-1\f$, where, \f$x_{rq}\f$ are the complex data to be transformed, \f$\tilde{x}_{jk}\f$ are the transformed data, and the sign \f$\pm\f$ determines the direction of the transform.  By default, the scale is set to 1 for forwards transforms and \f${{1}\over{MN}}\f$ for backwards transforms, where *M* and *N* are the 2D size of the transform.
-
-@li For a 3D complex DFT
-\f[
-\tilde{x}_{jkl} = {{1}\over{scale}}\sum_{s=0}^{p-1}\sum_{q=0}^{m-1}\sum_{r=0}^{n-1}
-x_{rqs}\exp\left({\pm i} {{2\pi jr}\over{n}}\right)\exp\left({\pm i}{{2\pi kq}\over{m}}\right)\exp\left({\pm i}{{2\pi ls}\over{p}}\right)
-\f]
-for \f$j=0,1,\ldots,n-1\hbox{ and } k=0,1,\ldots,m-1\hbox{ and } l=0,1,\ldots,p-1\f$, where \f$x_{rqs}\f$ are the complex data to be transformed, \f$\tilde{x}_{jkl}\f$ are the transformed data, and the sign \f$\pm\f$ determines the direction of the transform. By default, the scale is set to 1 for forward transforms and \f${{1}\over{MNP}}\f$ for backward transforms, where *M*, *N*, and *P* are the 3D size of the transform.
-
-@subsection InitLibrary Setup and Teardown of clFFT
-clFFT is initialized by the API @ref clfftSetup(), which must be called before any other API of
-clFFT. This allows the library to create resources needed to manage the plans that you create and
-destroy. This API also takes a structure @ref clfftInitSetupData() that is initialized by the
-client to control the behavior of the library.
-
-After you use the library, the @ref clfftTeardown() method must be called. This function instructs clFFT to release all resources allocated internally, and resets acquired references to any OpenCL objects.
-
-@subsection ThreadSafety Thread safety
-The clFFT API is designed to be thread-safe. It is safe to create plans from multiple threads and to
-destroy those plans in separate threads. Multiple threads can call @ref clfftEnqueueTransform() to place work in a command queue at the same time. clFFT does not provide a single-threaded version of the library. The overhead of the synchronization mechanisms inside a clFFT thread-safe is expected to be minor.
-
-Currently, you must manage the multi-device operation. You can create OpenCL contexts that are
-associated with multiple devices, but clFFT only uses a single device from that context to transform
-the data. You can manage a multi-device operation by creating multiple contexts, in which each
-context contains a different device; you are responsible for scheduling and partitioning the work
-across multiple devices and contexts.
-
-@subsection MajorFormat Row major formats
-clFFT expects all multi-dimensional input passed to it to be in row-major format. This is compatible
-with C-based languages. However, clFFT is very flexible in the organization of the input and output data, and it accepts input data by letting you specify a stride for each dimension. This feature can be used to process data in column major arrays and other non-contiguous data formats. See @ref clfftSetPlanInStride() and 
-@ref clfftSetPlanOutStride().
-
-@subsection Object OpenCL object creation
-Your application must allocate and manage OpenCL objects, such as contexts,  *cl_mem* buffers and command queues. All the clFFT interfaces that interact with OpenCL objects take those objects as references through the API.
-Specifically, the plan creation function @ref clfftCreateDefaultPlan() takes an OpenCL context as a parameter reference, increments the reference count on that object, and keeps the object alive until the corresponding plan is destroyed by the call @ref clfftDestroyPlan().
-
-@subsection FlushQueue Flushing of command queues
-The clFFT API operates asynchronously; with the exception of thread safety locking with multiple 
-threads, all APIs return immediately. Specifically, the @ref clfftEnqueueTransform() API does not
-explicitly flush the command queues that are passed by reference to it. It pushes the transform work onto the command queues and returns the modified queues to the client. The client is free to issue its own blocking logic by using OpenCL synchronization mechanisms or push further work onto the queue to continue processing.
-
-@subsection EnvVariables Environment variables
-The clFFT library looks for definition of two environment variables: CLFFT_CACHE_PATH and CLFFT_REQUEST_LIB_NOMEMALLOC. 
-If the variable CLFFT_CACHE_PATH is defined, the library caches OpenCL binaries. This enables a subsequent run of the application with the same type of transforms to avoid the expensive compilation step. Instead, the stored binaries are loaded and executed. The CLFFT_CACHE_PATH must point to a folder location where the library can store binaries. 
-The other variable CLFFT_REQUEST_LIB_NOMEMALLOC when defined, requests the library to do all computations in-place and avoid allocating extra device memory whenever possible. This feature is experimental and currently works only for certain types of transforms  when the library decomposes the input into square matrices or rectangular matrices with dimensions in the ratio 1:2. Currently, it works for 1D complex transforms of size of powers of 2. 
-
-@section clFFTPlans clFFT plans
-A plan is the collection of (almost) all the parameters needed to specify an FFT computation.
-A clFFT plan includes the following parameters:
-<ul>
-<li> The OpenCL context that executes the transform
-<li> Dimension of the transform (1D, 2D or 3D)
-<li> Length or extent of data in each dimension
-<li> Number of datasets that are transformed
-<li> Precision of the data
-<li> Scaling factor to the transformed data
-<li> In-place or Out-of-place transform
-<li> Format of the input data - interleaved, planar or real
-<li> Format of the output data - interleaved, planar or real
-</ul>
-
-The clFFT plan does not include the following parameters:
-<ul>
-<li> The OpenCL handles to the input and output data buffers.
-<li> The OpenCL handle to a temporary scratch buffer (if needed).
-<li> Direction of execution of the transform (forward or reverse transform).
-</ul>
-These parameters are specified when the plan is executed.
-
-@subsection Default Default plan values
-
-When a new plan is created by calling @ref clfftCreateDefaultPlan(), its parameters are initialized as
-follows:
-
-<ul>
-<li> Dimensions: as provided by the caller
-<li> Lengths: as provided by the caller
-<li> Batch size: 1
-<li> Precision: *CLFFT_SINGLE*
-<li> Scaling factors:
-    <ol>
-    <li> for the forward transform, the default is 1.0, or no scale factor is applied
-    <li> for the reverse transform, the default is 1.0 / P, where P is the product of the FFT lengths
-    </ol>
-<li> Location: *CLFFT_INPLACE*
-<li> Input layout: *CLFFT_COMPLEX_INTERLEAVED*
-<li> Input strides: the strides of a multidimensional array of the lengths specified, where the data is
-compactly stored using the row-major convention
-<li> Output layout: *CLFFT_COMPLEX_INTERLEAVED*
-<li> Output strides: same as input strides
-</ul>
-
-Writing client programs that depend on these initial values is <b> not </b> recommended.
-
-@subsection EnumLayout Supported memory layouts
-There are two main types of Discrete Fourier Transform (DFT) in clFFT:
-<ol>
-<li> Transformation of complex data - clFFT supports the following two layouts to store complex numbers:
-<ul>
-  <li> Planar format - where the real and imaginary components are kept in separate arrays: \n
-          Buffer1: **RRRRR**  \n
-          Buffer2: **IIIII**
-  <li> Interleaved format - where the real and imaginary components are stored as contiguous pairs:  \n
-          Buffer1: **RIRIRIRIRIRI**
-</ul>
-<li> Transformation of real to complex data and vice versa - clFFT provides enums to define these formats.
-For transforms involving real data, there are two possibilities:
-<ul>
-<li> Real data being subject to forward FFT transform that results in complex data.
-<li> Complex data being subject to backward FFT transform that results in
-real data. See the section \ref RealFFT.
-</ul>
-</ol>
-
-@subsubsection DistanceStridesandPitches Strides and Distances
-For one-dimensional data, if clStrides[0] = strideX = 1, successive elements in the first dimension are stored contiguously in memory. If strideX is an integral value greater than 1, gaps in memory exist between each element of the vectors.
-For multi-dimensional data, if clStrides[1] = strideY = LenX for 2 dimensional data and clStrides[2] = strideZ = LenX*LenY for 3 dimensional data, no gaps exist in memory between each element, and all vectors are stored tightly packed in memory. Here, LenX, LenY, and LenZ denote the transform lengths clLengths[0], clLengths[1], and clLengths[2], respectively, which are used to set up the plan.
-
-By specifying non-default strides, it is possible to process either row-major or column-major arrays. Data can be extracted from arrays of structures. Almost any regular data storage pattern can be accommodated.
-
-Distance is the amount of memory that exists between corresponding elements in an FFT primitive in a batch. Distance is measured in units of the FFT primitive; complex data measures in complex units, and real data measures in real units. Stride between tightly packed elements is 1 in either case. Typically, one can measure the distance between any two elements in a batch primitive, be it 1D, 2D, or 3D data. For tightly packed data, the distance between FFT primitives is the size of the FFT primitive, such that dist=LenX for 1D data, dist=LenX*LenY for 2D data, and dist=LenX*LenY*LenZ for 3D data. It is possible to set the distance of a plan to be less than the size of the FFT vector; most often 1 for this case. When computing a batch of 1D FFT vectors, if distance == 1, and strideX == length(vector), a transposed output is produced for a batch of 1D vectors. You must verify that the distance and strides are valid (not intersecting); if not valid, undefined results may occur.
-A simple example would be to perform a 1D length 4096 on each row of an array of 1024 rows x 4096 columns of values stored in a column-major array, such as a FORTRAN program might provide. (This would be equivalent to a C or C++ program that has an array of 4096 rows x 1024 columns stored in a row-major manner, on which you want to perform a 1-D length 4096 transform on each column.) In this case, specify the strides as [1024, 1].
-
-A more complex example would be to compute a 2D FFT for each 64 x 64 subtile of the grid that has an input buffer with a raster grid of 1024 x 1024 monochrome pixel values. Specifying strides allows you to treat each horizontal band of 1024 x 64 pixels as an array of 16 64 x 64 matrixes, and process an entire band with a single call @ref clfftEnqueueTransform(). (Specifying strides is not quite flexible enough to transform the entire grid of this example with a single kernel execution.) It is possible to create a Plan to compute arrays of 64 x 64 2D FFTs, then specify three strides: [1, 1024, 64]. The first stride, 1, indicates that the rows of each matrix are stored consecutively; the second stride, 1024, gives the distance between rows, and the third stride, 64, defines the distance between two matrices. Then call @ref clfftEnqueueTransform() 16 times – once for each horizontal band of pixels.
-
-@subsection EnumPrecision Supported precisions in clFFT
-Both *CLFFT_SINGLE* and *CLFFT_DOUBLE* precisions are supported by the library for all supported radices. For both these enums the math functions of the host computer are used to produce the sine and cosine tables that are used by the OpenCL kernel.
-Both *CLFFT_SINGLE_FAST* and *CLFFT_DOUBLE_FAST* generate faster kernels with reduced accuracy, but are disabled in the current build.
-See @ref clfftPrecision, @ref clfftSetPlanPrecision(), and @ref clfftGetPlanPrecision().
-
-@subsection FftDirection clfftDirection
-For complex transforms, the direction of the transform is not baked into the plan; the same plan can be used to specify both forward and backward transforms. To specify the direction, @ref clfftDirection is passed as a parameter into @ref clfftEnqueueTransform(). 
-For real transforms, the  input and output layouts of the plan determine the direction.
-
-@subsection EnumResultLocation In-place and out-of-place transforms
-The clFFT API supports both in-place and out-of-place transforms. With in-place transforms, only the input buffers are provided to the @ref clfftEnqueueTransform() API, and the resulting data is written in the same buffer, overwriting the input data. With out-of-place transforms, distinct output buffers are provided to the @ref clfftEnqueueTransform() API, and the input data is preserved. 
-In-place transforms require that the *cl_mem* objects created by the client application, have both read and write permissions. This is given in the nature of the in-place algorithm. Out-of-place transforms require that the destination buffers have read and write permissions, but input buffers can still be created with read-only permissions. This is a clFFT requirement because internally the algorithms may go back and forth between the destination buffers and internally allocated temp buffers. For out-of-place transforms, clFFT never writes back to input buffers.
-
-@subsection clFFTEff Batches
-The efficiency of clFFT is improved by utilizing transforms in batches. Sending as much data as possible in a single transform call leverages the parallel compute capabilities of OpenCL devices (and GPU devices in particular), and minimizes the penalty of transfer overhead. It is best to think of an OpenCL device as a high-throughput, high-latency device. Using a networking analogy as an example, this approach is similar to having a massively high-bandwidth pipe with very high ping response times. If the client is ready to send data to the device for compute, it should be sent in as few API calls as possible and this can be done by batching. clFFT plans have a parameter @ref clfftSetPlanBatchSize() to describe the number of transforms being batched, and another parameter @ref clfftSetPlanDistance() to describe how those batches are laid out and spaced in memory. 1D, 2D, or 3D transforms can be batched.
-
-@section Outline  Using clFFT in a client application
-
-To perform FFT calculations using clFFT, the client program must perform the following tasks:
-<ul>
-       <li> Initialize the library by calling @ref clfftSetup(). </li>
-       <li> For each distinct type of FFT needed:
-       <ol>
-                <li> Create an FFT Plan object. 
-                               To create an FFT Plan object, do either of the following. 
-               <ul>
-                       <li>Call the factory function @ref clfftCreateDefaultPlan() and specify the value 
-                              of the most fundamental parameters, such as plHandle, context, dim, and 
-                              clLengths, while other parameters assume default values.  The 
-                              OpenCL context must be provided when the plan is created; it cannot be 
-                              changed. </li> <br /> Or
-                       <li>Call @ref clfftCopyPlan(). </li>
-               </ul>
-                               Note: In both the cases, the function returns an opaque handle to the plan 
-                       object.
-    <li> Complete the specification of all the Plan parameters by calling various parameter-setting 
-            functions that have the prefix *clfftSet*. </li>
-         <li> Optionally, "bake" or finalize the plan by calling @ref clfftBakePlan() function. This signals 
-                 the library the end of the specification phase, and causes it to generate and compile the 
-                         exact OpenCL kernels that perform the specified FFT on the provided OpenCL device.
-                 At this point, all performance-enhancing optimizations are applied, possibly including 
-                        executing benchmark kernels on the OpenCL device context to maximize the runtime 
-                        performance. <br /> <br />
-Although the previous step is optional, it is recommended to use it so that you can
-have control on when to do this work. Usually, this time consuming step is done when the application is initialized. If you do not call @ref clfftBakePlan(), this work is done during the first call of @ref clfftEnqueueTransform().
-               </li>
-       </ol>
-
-       <li> Execute the OpenCL FFT kernels as many times as needed. </li>
-       <ol>
-               <li>  Call @ref clfftEnqueueTransform(). At this point, specify whether you want to 
-                        execute a forward or reverse transform; also, provide the OpenCL *cl_mem* 
-                        handles for the input buffer(s), output buffer(s)--unless you want the transformed 
-                        data to overwrite the input buffers, and (optionally) scratch buffer.
-                        @ref clfftEnqueueTransform() performs one or more calls to the OpenCL function 
-                         clEnqueueNDRangeKernel. Like clEnqueueNDRangeKernel, @ref 
-                                       clfftEnqueueTransform() is a non-blocking call. The commands to execute the FFT 
-                                       compute kernel(s) are added to the OpenCL context queue to be executed 
-                         asynchronously.
-                        An OpenCL event handle is returned to the caller. If multiple NDRangeKernel 
-                        operations are queued, the final event handle is returned.
-               </li>
-               <li>  Add any application OpenCL tasks to the OpenCL context queue. For example, if the                         next step in the application process is to apply a filter to the transformed data, the 
-                       application calls clEnqueueNDRangeKernel, and specifies its output buffer(s) as the  
-                       input to the filter kernel, and provides the transform's event handle to ensure 
-                       proper synchronization. </li>
-               <li>  If the application accessed the transformed data directly, it calls one of the OpenCL 
-                       functions for synchronizing the host computer execution with the OpenCL device 
-                       (for example: clFinish()). </li>
-       </ol>
-       <li> Terminate the library by calling @ref clfftTeardown().
-</ul>
-
-@section RealFFT  FFTs of real data
-
-When real data is subject to DFT transformation, the resulting complex output data follows a special property. About half of the output is redundant because they are complex conjugates of the other half. This is called the Hermitian redundancy. So, for space and performance considerations, it is only necessary to store the non-redundant part of the data. Most FFT libraries use this property to offer specific storage layouts for FFTs involving real data. clFFT provides three enumerated types to deal with real data FFTs:
-<ul>
-       <li> *CLFFT_REAL*
-       <li> *CLFFT_HERMITIAN_INTERLEAVED*
-       <li> *CLFFT_HERMITIAN_PLANAR*
-</ul>
-
-The *CLFFT_REAL* enum specifies that the data is purely real. This can be used to feed real input or get back real output. The *CLFFT_HERMITIAN_INTERLEAVED* and *CLFFT_HERMITIAN_PLANAR* enums are similar to the corresponding full complex enums in the way they store real and imaginary components, but store only about half of the complex output. Client applications can do just a forward transform and analyze the output or they can process the output and do a backward transform to get back real data. This is illustrated in the following figure.
-
-@image html realfft_fwdinv.jpg "Forward and Backward Transform Processes"
-
-Let us consider a 1D real FFT of length N. The full output looks as shown in following figure.
-
-@image html realfft_1dlen.jpg "1D Real FFT of Length N"
-
-Here, C* denotes the complex conjugate. Since the values at indices greater than N/2 can be deduced from the first half of the array, clFFT stores data only up to the index N/2. This means that the output contains only 1 + N/2 complex elements, where the division N/2 is rounded down. Examples for even
-and odd lengths are given below.
-
-Example for N = 8 is shown in following figure.
-
-@image html realfft_ex_n8.jpg "Example for N = 8"
-
-Example for N = 7 is shown in following figure.
-
-@image html realfft_ex_n7.jpg "Example for N = 7"
-
-
-For length 8, only (1 + 8/2) = 5 of the output complex numbers are stored, with the index ranging from 0 through 4. Similarly for length 7, only (1 + 7/2) = 4 of the output complex numbers are stored, with the index ranging from 0 through 3.
-For 2D and 3D FFTs, the FFT length along the least dimension is used to compute the (1 + N/2) value. This is because the FFT along the least dimension is computed first and is logically a real-to-hermitian transform. The FFTs along other dimensions are computed afterwards; they are simply 'complex-to-complex' transforms. For example, assuming clLengths[2] is used to set up a 2D real FFT, let N1 = clLengths[1], and N0 = clLengths[0]. The output FFT has N1*(1 + N0/2) complex elements. Similarly, for a 3D FFT with clLengths[3] and N2 = clLengths[2], N1 = clLengths[1], and N0 = clLengths[0], the output has N2*N1*(1 + N0/2) complex elements.
-
-@subsection RealModes Supported Modes
-
-Out-of-place transforms:
-
-<ul>
-       <li> *CLFFT_REAL* to *CLFFT_HERMITIAN_INTERLEAVED*
-       <li> *CLFFT_REAL* to *CLFFT_HERMITIAN_PLANAR*
-       <li> *CLFFT_HERMITIAN_INTERLEAVED* to *CLFFT_REAL*
-       <li> *CLFFT_ CLFFT_HERMITIAN_PLANAR* to *CLFFT_REAL*
-</ul>
-
-In-place transforms:
-
-<ul>
-       <li> *CLFFT_REAL* to *CLFFT_HERMITIAN_INTERLEAVED*
-       <li> *CLFFT_HERMITIAN_INTERLEAVED* to *CLFFT_REAL*
-</ul>
-
-@subsection ExplicitStrides Setting strides
-
-The library currently <b> requires you to explicitly set input and output strides for real transforms.</b> See the following examples to understand what values to use for input and output strides under different scenarios. These examples show typical usages, but you can allocate the buffers and layout data according to your need.
-
-@subsection RealExamples Examples
-
-The following pages provide figures and examples to explain in detail the real FFT features of this library.
-
-@image html realfft_expl_01.jpg "1D FFT - Real to Hermitian"
-@image html realfft_expl_02.jpg "1D FFT - Real to Hermitian, Example 1"
-@image html realfft_expl_03.jpg "1D FFT - Real to Hermitian, Example 2"
-@image html realfft_expl_04.jpg "1D FFT - Real to Hermitian, Example 3"
-@image html realfft_expl_05.jpg "1D FFT - Hermitian to Real"
-@image html realfft_expl_06.jpg "1D FFT - Hermitian to Real, Example"
-@image html realfft_expl_07.jpg "2D FFT - Real to Hermitian In Place"
-@image html realfft_expl_08.jpg "2D FFT - Real to Hermitian, Example"
-
-@section Callbacks  clFFT Callbacks
-
-The callback feature of clFFT has the ability to invoke user provided OpenCL™ inline functions to pre-process or post-process data from within the FFT kernel. The inline OpenCL callback function is passed as a string to the library. It is then incorporated into the generated FFT kernel. This eliminates the need for an additional kernel launch to carry out the pre/post processing tasks, thus improving overall performance.
-There are 2 types of callback; Pre-callback and Post-callback. Pre-callback invokes user callback function to perform custom  pre-processing of the input data before FFT is executed. Post-callback invokes user callback function to perform custom post-processing of the output data after FFT is executed.
-
-@subsection CallbackWorkflow Callback Workflow
-
-The workflow of FFT execution using callback feature of clFFT is as follows:
-
-<ol>
-       <li> Create the clFFT Plan and initialize the standard clFFT parameters.
-       <li> Use @ref clfftSetPlanCallback() API to register the callback function with library
-               @code
-               clfftStatus clfftSetPlanCallback(clfftPlanHandle plHandle,
-                                                                                       const char* funcName,
-                                                                                       const char* funcString,
-                                                                                       int localMemSize,
-                                                                                       clfftCallbackType callbackType,
-                                                                                       void *userdata,
-                                                                                       int numUserdataBuffers)
-               @endcode
-               The library uses the arguments passed to this API, including callback function string, to stitch the callback code      into the generated FFT kernel. The arguments for clfftSetPlanCallback are
-               <ul>
-                       <li> clFFT plan handle
-                       <li> Name of the callback function
-                       <li> Callback function as character array; the character array can include custom datatype declaration if any custom type is used by callback function
-                       <li> Size of local memory requested by callback, if any, in bytes
-                       <li> Type of callback: ‘PRECALLBACK’ or ‘POSTCALLBACK’; this is an enumerator
-                       <li> Supplementary user data, if any, used by callback function
-                       <li> Number of user data buffers; the library currently supports only one user data buffer per callback registration
-               </ul>
-               Multiple callback registration calls to the same type of callback result in overwriting the previously registered callback function
-       <li> Invoke Bake Plan step
-       Library inserts the callback code into the main FFT kernel during bake plan and compiles it. If there are any compilation errors caused by syntax or incompatible callback function prototype, the library reports failure.
-       <li> Enqueue clFFT transform
-</ol>
-
-The caller is responsible to provide a callback function that matches the function prototype based on the type of
-callback(pre/post), type of transform(real/complex) and whether LDS is used. The bake plan step checks the function prototype.
-
-@subsection CallbackFunctionPrototype Callback Function Prototypes
-
-clFFT expects the callback function to be of a specific prototype depending on the type of callback(pre/post), type of transform(real/complex) and whether LDS is used. These are as follows:
-
-@subsubsection PrecallbackProtyotype Pre-callback Prototypes
-
- FFT Type                               | Function Prototype
-----------------------------------------| -------------
-C2C/C2R – Interleaved Single Precision  | Without LDS <br />float2  <precallback_func>  (  __global void *input, uint inoffset, __global void *userdata) <br /> With LDS <br />float2  <precallback_func>  (  __global void *input, uint inoffset, __global void *userdata, __local void *localmem)
-C2C/C2R – Interleaved Double Precision  | Without LDS <br />double2  <precallback_func>  (  __global void *input, uint inoffset, __global void *userdata) <br /> With LDS <br />double2  <precallback_func>  (  __global void *input, uint inoffset, __global void *userdata, __local void *localmem)
-C2C – Planar Single Precision                        | Without LDS <br />float2  <precallback_func>  (  __global void *inputRe, __global void *inputIm, uint inoffset, __global void *userdata)<br /> With LDS <br />float2  <precallback_func>  (  __global void *inputRe, __global void *inputIm, int inoffset, __global void *userdata, __local void *localmem)
-C2C – Planar Double Precision                        | Without LDS <br />double2  <precallback_func>  (  __global void *inputRe, __global void *inputIm, uint inoffset, __global void *userdata)<br /> With LDS <br />double2  <precallback_func>  (  __global void *inputRe, __global void *inputIm, uint inoffset, __global void *userdata, __local void *localmem)
-R2C Single Precision                                   | Without LDS <br />float  <precallback_func>   (  __global void *input, uint inoffset, __global void *userdata)<br /> With LDS <br />float  <precallback_func>   (  __global void *input, uint inoffset, __global void *userdata, __local void *localmem)
-R2C Double Precision                                   | Without LDS <br />double  <precallback_func>   (  __global void *input, uint inoffset, __global void *userdata)<br /> With LDS <br />double  <precallback_func>   (  __global void *input, uint inoffset, __global void *userdata, __local void *localmem)
-
-
-Parameters
-<ul>
-       <li> \c input : The base pointer of the input buffer for R2C and Interleaved C2C/C2R transforms
-       <li> \c inputRe : The base pointer of the “Real” input buffer for Planar C2C transforms
-       <li> \c inputIm : The base pointer of the “Imaginary” part input buffer for Planar C2C transforms
-       <li> \c inoffset : Index of the current element  of the input buffer from the start
-       <li> \c userdata : Buffer containing optional caller specified data. The userdata pointer is useful
-       for passing any supplementary data to the callback function. For example, buffer having convolution
-       filter data or any scalar value. The userdata can be of any custom data type/structure, in which case,
-       you have to declare the custom data type and include it along with the callback function string. </li>
-       <li> \c localmem : Pointer to local memory. This memory is allocated by library based on the size you specify
-       and is subjected to local memory availability. </li>
-</ul>
-
-For Planar C2C, the return type of callback is a vector (float2/double2) that contains the   Real
-and Imaginary elements as computed in the callback.
-
-@subsubsection PostcallbackProtyotype Post-callback Prototypes
-
- FFT Type                               | Function Prototype
-----------------------------------------| ------------------
-C2C/R2C – Interleaved Single Precision  | Without LDS <br />void  <postcallback_func> ( __global void *output, uint outoffset, __global void *userdata, float2 fftoutput) <br /> With LDS <br />void  <postcallback_func> ( __global void *output, uint outoffset, __global void *userdata, float2 fftoutput, __local void *localmem)
-C2C/R2C – Interleaved Double Precision  | Without LDS <br />void  <postcallback_func> ( __global void *output, uint outoffset, __global void *userdata, double2 fftoutput) <br /> With LDS <br />void  <postcallback_func> ( __global void *output, uint outoffset, __global void *userdata, double2 fftoutput, __local void *localmem)
-C2C/R2C – Planar Single Precision            | Without LDS <br />void  <postcallback_func> ( __global void *outputRe, __global void *outputIm, uint outoffset, __global void *userdata, float fftoutputRe, float fftoutputIm) <br /> With LDS <br />void  <postcallback_func> ( __global void *outputRe, __global void *outputIm, uint outoffset, __global void *userdata, float fftoutputRe, float fftoutputIm, __local void *localmem)
-C2C/R2C – Planar Double Precision            | Without LDS <br />void  <postcallback_func> ( __global void *outputRe, __global void *outputIm, uint outoffset, __global void *userdata, double fftoutputRe, double fftoutputIm) <br /> With LDS <br />void  <postcallback_func> ( __global void *outputRe, __global void *outputIm, uint outoffset, __global void *userdata, double fftoutputRe, double fftoutputIm, __local void *localmem)
-C2R Single Precision                                   | Without LDS <br />void  <postcallback_func> ( __global void *output, uint outoffset, __global void *userdata, float fftoutput) <br /> With LDS <br />void  <postcallback_func> ( __global void *output, uint outoffset, __global void *userdata, float fftoutput, __local void *localmem)
-C2R Double Precision                                   | Without LDS <br />void  <postcallback_func> ( __global void *output, uint outoffset, __global void *userdata, double fftoutput) <br /> With LDS <br />void  <postcallback_func> ( __global void *output, uint outoffset, __global void *userdata, double fftoutput, __local void *localmem)
-
-
-Parameters
-<ul>
-       <li> \c output  : The base pointer of the output buffer for C2R and Interleaved R2C/C2C transforms
-       <li> \c outputRe : The base pointer of the “Real” output buffer for Planar R2C/C2C transforms
-       <li> \c outputIm : The base pointer of the “Imaginary” part output buffer for Planar R2C/C2C transforms
-       <li> \c outoffset : Index of the current element  of the output buffer from the start
-       <li> \c userdata : Buffer containing optional caller specified data. The userdata pointer is useful
-       for passing any supplementary data to the callback function. For example, buffer having convolution
-       filter data or any scalar value. The userdata can be of any custom data type/structure, in which case,
-       you have to declare the custom data type and include it along with the callback function string. </li>
-       <li> \c fftoutput : The result computed by clFFT for the element corresponding to outoffset argument
-       <li> \c localmem : Pointer to local memory. This memory is allocated by library based on the size you specify
-       and is subject to local memory availability. </li>
-</ul>
-
-@subsection SampleCallbackCode Sample Callback Code
-
-@code
-//**************************************************************************
-//* Step 1 : Store the pre and post callback function in a string.
-//**************************************************************************
-const char* precallbackstr = "float2 pre_mulval(__global void* input, \n
-                                  uint inoffset,                      \n
-                                  __global void* userdata,            \n
-                                  __local void* localmem)             \n
-                               {                                                            \n
-                               float scalar = *((__global float*)userdata + inoffset);      \n
-                               float2 ret = *((__global float2*)input + inoffset) * scalar; \n
-                               return ret;                                                  \n
-                               }                                                            \n";
-
-const char* postcallbackstr = "void post_mulval(__global void* output, \n
-                                  uint outoffset,                      \n
-                                  __global void* userdata,             \n
-                                                                 float2 fftoutput,                    \n
-                                  __local void* localmem)              \n
-                               {                                                      \n
-                               float scalar = *((__global float*)userdata + outoffset);      \n
-                               *((__global float2*)output + outoffset) = fftoutput * scalar; \n
-                               }                                                             \n";
-                               
-//**************************************************************************
-//* Step 2 : Initialize arguments, if any, required by the callback.
-//**************************************************************************
-int h_preuserdata[N] = {  };
-cl_mem preuserdata = clCreateBuffer(context, CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR, sizeof(float) * N,  (void*)h_preuserdata, NULL);
-
-int h_postuserdata[N] = {  };
-cl_mem postuserdata = clCreateBuffer(context, CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR, sizeof(float) * N,  (void*)h_postuserdata, NULL);
-
-//**************************************************************************
-//* Step 3 : Register the callback.
-//**************************************************************************
-
-status = clfftSetPlanCallback(plan_handle, "pre_mulval", precallbackstr, 0, PRECALLBACK, &preuserdata, 1);
-
-status = clfftSetPlanCallback(plan_handle, "post_mulval", postcallbackstr, 0, POSTCALLBACK, &postuserdata, 1);
-
-//**************************************************************************
-//* Step 4 : Bake plan and enqueue transform.
-//**************************************************************************
-status = clfftBakePlan( plan_handle, 1, &queue, NULL, NULL );
-
-status = clfftEnqueueTransform( plan_handle, dir, 1, &queue, 0, NULL, &outEvent,
-                       &input_buffers[ 0 ], buffersOut, clMedBuffer );
-@endcode
-
-@subsection CallbackNotes Important Notes on Callback
-
-<ol>
-       <li> The caller is responsible to provide a callback function in string form that matches the function prototype based on the type of callback, type of transform(real/complex), and whether LDS is used.
-       <li> clFFT considers the value returned by the pre-callback function as the new value of the input at the index corresponding to the *inoffset* argument.
-       <li> Callback function can request for local memory for its own use. If the requested amount of local memory is available on the device, clFFT passes a pointer to the local memory when it invokes the callback function.
-       <li> clFFT may invoke the FFT kernels several times depending on the input parameters. However, the pre-callback function provided by the caller is invoked only once for each point in the input. Similarly, it calls the post-callback function only once for each point in the output.
-       <li> If clFFT is implementing a given FFT in multiple phases, it calls the pre-callback function only from the first phase kernel. Similarly, it calls the post-callback function only from the last phase kernel.
-</ol>
-
- */
diff --git a/src/include/gromacs/external/clFFT/src/library/md5sum.h b/src/include/gromacs/external/clFFT/src/library/md5sum.h
deleted file mode 100644 (file)
index 2b93d21..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * This is an OpenSSL-compatible implementation of the RSA Data Security, Inc.
- * MD5 Message-Digest Algorithm (RFC 1321).
- *
- * Homepage:
- * http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5
- *
- * Author:
- * Alexander Peslyak, better known as Solar Designer <solar at openwall.com>
- *
- * This software was written by Alexander Peslyak in 2001.  No copyright is
- * claimed, and the software is hereby placed in the public domain.
- * In case this attempt to disclaim copyright and place the software in the
- * public domain is deemed null and void, then the software is
- * Copyright (c) 2001 Alexander Peslyak and it is hereby released to the
- * general public under the following terms:
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted.
- *
- * There's ABSOLUTELY NO WARRANTY, express or implied.
- *
- * See md5.c for more information.
- */
-
-#ifndef _MD5_SUM_H
-#define _MD5_SUM_H
-
-#ifdef HAVE_OPENSSL
-#include <openssl/md5.h>
-#else
-
-/* Any 32-bit or wider unsigned integer data type will do */
-typedef unsigned int MD5_u32plus;
-
-typedef struct {
-       MD5_u32plus lo, hi;
-       MD5_u32plus a, b, c, d;
-       unsigned char buffer[64];
-       MD5_u32plus block[16];
-} MD5_CTX;
-
-extern void MD5_Init(MD5_CTX *ctx);
-extern void MD5_Update(MD5_CTX *ctx, const void *data, unsigned long size);
-extern void MD5_Final(unsigned char *result, MD5_CTX *ctx);
-
-#endif // HAVE_OPENSSL
-
-void md5sum (const void * data, unsigned long size, char * md5sum);
-
-#endif // _MD5_SUM_H
diff --git a/src/include/gromacs/external/clFFT/src/library/plan.h b/src/include/gromacs/external/clFFT/src/library/plan.h
deleted file mode 100644 (file)
index 8368e5f..0000000
+++ /dev/null
@@ -1,628 +0,0 @@
-/* ************************************************************************
- * Copyright 2013 Advanced Micro Devices, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ************************************************************************/
-
-
-#pragma once
-#if !defined( AMD_CLFFT_plan_H )
-#define AMD_CLFFT_plan_H
-#include <cstring>
-#include "private.h"
-#include "lock.h"
-#include "generator.h"
-
-std::string getKernelName(const clfftGenerators gen, const clfftPlanHandle plHandle, bool withPlHandle);
-
-namespace ARBITRARY {
-       // TODO:  These arbitrary parameters should be tuned for the type of GPU
-       //      being used.  These values are probably OK for Radeon 58xx and 68xx.
-       enum {
-               MAX_DIMS  = 3,
-                       //  The clEnqueuNDRangeKernel accepts a multi-dimensional domain array.
-                       //  The # of dimensions is arbitrary, but limited by the OpenCL implementation
-                       //  usually to 3 dimensions (CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS).
-                       //  The kernel generator also assumes a limit on the # of dimensions.
-
-               SIMD_WIDTH = 64,
-                       //  Workgroup size.  This is the # of work items that share
-                       //  local data storage (LDS).  This # is best for Evergreen gpus,
-                       //  but might change in the future.
-
-               LDS_BANK_BITS = 5,
-               LDS_BANK_SIZE = (1 << LDS_BANK_BITS),
-               LDS_PADDING   = false,//true,
-                       //  On AMD hardware, the low-order bits of the local_id enumerate
-                       //  the work items that access LDS in parallel.  Ideally, we will
-                       //  pad our LDS arrays so that these work items access different banks
-                       //  of the LDS.
-                       //  2 ** LDS_BANK_BITS is the number of LDS banks.
-                       //  If LDS_PADDING is non-zero, the kernel generator should pad the
-                       //  LDS arrays to reduce or eliminate bank conflicts.
-
-               LDS_FRACTION_IDEAL = 6,    // i.e., 1/6th
-               LDS_FRACTION_MAX   = 4,    // i.e., 1/4
-                       //  For best performance, each workgroup should use 1/IDEAL'th the amount of LDS
-                       //  revealed by clGetDeviceInfo (.. CL_DEVICE_LOCAL_MEM_SIZE, ...)
-                       //  However, we can use up to 1/MAX'th of LDS per workgroup when necessary to
-                       //  perform the FFT in a single pass instead of multiple passes.
-                       //  This tuning parameter is a good value for Evergreen gpus,
-                       //  but might change in the future.
-
-               LDS_COMPLEX = false,
-                       //  This is the default value for FFTKernelGenKeyParams::fft_LdsComplex.
-                       //  The generated kernels require so many bytes of LDS for each single precision
-                       //..complex number in the vector.
-                       //  If LDS_COMPLEX, then we declare an LDS array of complex numbers (8 bytes each)
-                       //  and swap data between workitems with a single barrier.
-                       //  If ! LDS_COMPLEX, then we declare an LDS array or scalar numbers (4 bytes each)
-                       //  and swap data between workitems in two phases, with extra barriers.
-                       //  The former approach uses fewer instructions and barriers;
-                       //  The latter uses half as much LDS space, so twice as many wavefronts can be run
-                       //  in parallel.
-
-               TWIDDLE_DEE = 8,
-                       //  number of bits per row of matrix.
-       };
-
-};
-
-
-enum BlockComputeType
-{
-       BCT_C2C,        // Column to column
-       BCT_C2R,        // Column to row
-       BCT_R2C,        // Row to column
-};
-
-
-//NonSquareKernelType
-enum NonSquareTransposeKernelType
-{
-    NON_SQUARE_TRANS_PARENT,
-    NON_SQUARE_TRANS_TRANSPOSE_BATCHED_LEADING,
-    NON_SQUARE_TRANS_TRANSPOSE_BATCHED,
-    NON_SQUARE_TRANS_SWAP
-};
-
-/*
-There are three ways of conducting inplace transpose with 1:2 (or 2:1) dimension ratio.
-A. first conduct line swapping kernels for the whole non square matrix
-then conduct batched square transpose along column dim (a 'real' batched transpose)
-B. first conduct batched square transpose along column dim (a 'real' batched transpose)
-then conduct line swapping kernels for the whole non square matrix (for 2:1 case)
-C. first conduct batched square transpose along leading dim (row dim)
-then conduct line swapping kernels for the whole non square matrix
-Note that the twiddle computation has to go at the begining of the first kernel or the end of the second kernel
-
-if leading dimension is bigger, it makes more sense (faster) to swap line first and then conduct batched square transpose
-if leading dimension is smaller, it makes more sense (faster) to conduct batched transpose and then swap lines.
-*/
-enum NON_SQUARE_KERNEL_ORDER
-{
-       NOT_A_TRANSPOSE,
-       SWAP_AND_TRANSPOSE, // A.
-       TRANSPOSE_AND_SWAP, // B.
-       TRANSPOSE_LEADING_AND_SWAP, // C.
-};
-
-#define CLFFT_CB_SIZE 32
-#define CLFFT_MAX_INTERNAL_DIM 16
-
-/*! @brief Data structure to store the callback function string and other metadata passed by client 
-*  @details Client sets the callback function and other required parameters through clfftSetPlanCallback() 
-*  in order to register the callback function. The library populates these values into this data structure
-*/ 
-typedef struct clfftCallbackParam_
-{
-       int localMemSize;                       /*!< optional local memory size if needed by callback */
-       const char* funcname;           /*!< callback function name */
-       const char* funcstring;         /*!< callback function in string form */
-}clfftCallbackParam;
-
-struct FFTKernelGenKeyParams {
-       /*
-        *      This structure distills a subset of the fftPlan data,
-        *      including all information that is used to generate the OpenCL kernel.
-        *      This structure can be used as a key to reusing kernels that have already
-        *      been compiled.
-        */
-       size_t                   fft_DataDim;       // Dimensionality of the data
-       size_t                   fft_N[CLFFT_MAX_INTERNAL_DIM];          // [0] is FFT size, e.g. 1024
-                                                   // This must be <= size of LDS!
-       size_t                   fft_inStride [CLFFT_MAX_INTERNAL_DIM];  // input strides
-       size_t                   fft_outStride[CLFFT_MAX_INTERNAL_DIM];  // output strides
-
-       clfftResultLocation   fft_placeness;
-       clfftLayout           fft_inputLayout;
-       clfftLayout           fft_outputLayout;
-       clfftPrecision        fft_precision;
-       double                   fft_fwdScale;
-       double                   fft_backScale;
-
-       size_t                   fft_SIMD;          // Assume this SIMD/workgroup size
-       size_t                   fft_LDSsize;       // Limit the use of LDS to this many bytes.
-       size_t                   fft_R;             // # of complex values to keep in working registers
-                                                   // SIMD size * R must be <= size of LDS!
-
-       size_t                                   fft_MaxWorkGroupSize; // Limit for work group size
-
-       bool                     fft_3StepTwiddle;  // This is one pass of the "3-step" algorithm;
-                                                   // so extra twiddles are applied on output.
-       bool                                     fft_twiddleFront;      // do twiddle scaling at the beginning pass
-
-       bool                                     fft_realSpecial;       // this is the flag to control the special case step (4th step)
-                                                   // in the 5-step real 1D large breakdown
-       size_t                                   fft_realSpecial_Nr;
-
-       bool                     fft_RCsimple; 
-
-       bool                                     transOutHorizontal;    // tiles traverse the output buffer in horizontal direction
-
-       bool                                     blockCompute;
-       BlockComputeType                 blockComputeType;
-       size_t                                   blockSIMD;
-       size_t                                   blockLDS;
-    
-       NonSquareTransposeKernelType      nonSquareKernelType;
-       // sometimes non square matrix are broken down into a number of
-       // square matrix during inplace transpose
-       // let's call this number transposeMiniBatchSize
-       // no user of the library should set its value
-       size_t transposeMiniBatchSize;
-       // transposeBatchSize is the number of batchs times transposeMiniBatchSzie
-       // no user of the library should set its value
-       size_t transposeBatchSize;
-       // no user of the library should set its value 
-       NON_SQUARE_KERNEL_ORDER nonSquareKernelOrder;
-
-       bool fft_hasPreCallback;
-       clfftCallbackParam fft_preCallback;
-
-       bool fft_hasPostCallback;
-       clfftCallbackParam fft_postCallback;
-
-       cl_ulong   limit_LocalMemSize;
-
-       // Default constructor
-       FFTKernelGenKeyParams()
-       {
-               fft_DataDim = 0;
-               for(int i=0; i<CLFFT_MAX_INTERNAL_DIM; i++)
-               {
-                       fft_N[i] = 0;
-                       fft_inStride[i] = 0;
-                       fft_outStride[i] = 0;
-               }
-
-               fft_placeness = CLFFT_OUTOFPLACE;
-               fft_inputLayout = CLFFT_COMPLEX_INTERLEAVED;
-               fft_outputLayout = CLFFT_COMPLEX_INTERLEAVED;
-               fft_precision = CLFFT_SINGLE;
-               fft_fwdScale = fft_backScale = 0.0;
-               fft_SIMD = 0;
-               fft_LDSsize = 0;
-               fft_R = 0;
-               fft_MaxWorkGroupSize = 0;
-               fft_3StepTwiddle = false;
-               fft_twiddleFront = false;
-
-               transOutHorizontal = false;
-
-               fft_realSpecial = false;
-               fft_realSpecial_Nr = 0;
-
-               fft_RCsimple = false;
-
-               blockCompute = false;
-               blockComputeType = BCT_C2C;
-               blockSIMD = 0;
-               blockLDS = 0;
-        nonSquareKernelType = NON_SQUARE_TRANS_PARENT;
-               transposeMiniBatchSize = 1;
-               transposeBatchSize = 1;
-               fft_hasPreCallback = false;
-               fft_hasPostCallback = false;
-               limit_LocalMemSize = 0;
-       }
-};
-
-
-//     Sorting operator for struct FFTKernelGenKeyParams, such that it can be used in a map
-bool operator<( const FFTKernelGenKeyParams& lhs, const FFTKernelGenKeyParams& rhs);
-
-class  FFTPlan;
-class   FFTRepo;
-
-// Action ID
-enum FFTActionImplID
-{
-    FFT_DEFAULT_STOCKHAM_ACTION,
-    FFT_DEFAULT_TRANSPOSE_ACTION,
-    FFT_DEFAULT_COPY_ACTION,
-    FFT_STATIC_STOCKHAM_ACTION
-};
-
-
-// 
-// FFTKernelSignatureHeader
-// 
-// This structure is a wrapper for the FFTKernelSignature.  
-// It stores the signature size and the action ID. This ensure that every 
-// FFTKernelSignature (even with an empty DATA) is unique
-// 
-// This class is used as the return type of FFTAction::getSignatureData()
-// 
-struct FFTKernelSignatureHeader
-{
-    int datasize;
-    FFTActionImplID id;
-
-    //clfftLayout           fft_inputLayout;
-    //clfftLayout           fft_outputLayout;
-
-    FFTKernelSignatureHeader(int size_, FFTActionImplID id_)
-    {
-        // Set to 0 the whole signature structure
-        ::memset(this, 0, size_);
-        datasize = size_;
-        id = id_;
-    }
-};
-
-// 
-// FFTKernelSignature
-// 
-// This struct represents the signature of an action. An action signature 
-// stores (by inheritage):
-//  - the action ID
-//  - its signature data size
-//  - a set of bytes caracterizes a FFT action
-// 
-// This template class FFTKernelSignature provides a simple mechanism to
-// build a proper signature (see also in src/library/repo.h) from any POD type.
-//  
-// It is used as a key in the different cache mecanisms (binary cache and
-// dynamic cache managed by FFTRepo)
-// 
-template <typename DATA, FFTActionImplID ID>
-struct FFTKernelSignature : public FFTKernelSignatureHeader, public DATA
-{
-    FFTKernelSignature()
-        : FFTKernelSignatureHeader(sizeof(FFTKernelSignature<DATA, ID>), ID)
-    {
-    }
-};
-
-
-
-// 
-// FFTAction is the base class for all actions used to implement FFT computes
-// 
-// An action basically implements some OpenCL related actions, for instance:
-//  - Generating a kernel source code from kernel characteristics
-//  - Computing the work-group local sizes according to a kernel
-//  - Enqueuing arguments to the kernel call
-// 
-// Kernels generated and compiled by an action are stored in the different
-// cache mechanism (see repo.h for the dynamic cache and fft_binary_lookup.h
-// for disk cache for more information). Each cache entry can be obtained from
-// the action signature which is set of byte characterizing the action itself.
-// 
-// At the moment, FFTAction only implements the enqueue method which is
-// inherited by every action subclasses. But it may change in the time. There
-// are no clear rules and the choices made until now are still subject to
-// change.
-// 
-class FFTAction
-{
-public:
-    FFTAction(FFTPlan * plan, clfftStatus & err);
-
-    virtual clfftStatus enqueue(clfftPlanHandle plHandle,
-                                clfftDirection dir,
-                                cl_uint numQueuesAndEvents,
-                                cl_command_queue* commQueues,
-                                cl_uint numWaitEvents,
-                                const cl_event* waitEvents,
-                                cl_event* outEvents,
-                                cl_mem* clInputBuffers,
-                                cl_mem* clOutputBuffers);
-
-protected:
-
-    virtual clfftGenerators                getGenerator() = 0;
-
-    clfftStatus                            compileKernels  ( const cl_command_queue commQueueFFT, const clfftPlanHandle plHandle, FFTPlan* fftPlan);
-    clfftStatus                            writeKernel     ( const clfftPlanHandle plHandle, const clfftGenerators gen, const FFTKernelSignatureHeader* data, const cl_context& context, const cl_device_id &device);
-
-    virtual clfftStatus                    generateKernel  ( FFTRepo & fftRepo, const cl_command_queue commQueueFFT) = 0;
-    virtual clfftStatus                    getWorkSizes    ( std::vector<size_t> & globalws, std::vector<size_t> & localws) = 0;
-
-    virtual const FFTKernelSignatureHeader * getSignatureData() = 0;
-
-    FFTPlan * plan;
-
-private:
-
-    clfftStatus selectBufferArguments(FFTPlan * plan,
-                                      cl_mem* clInputBuffers,
-                                      cl_mem* clOutputBuffers,
-                                      std::vector< cl_mem > &inputBuff,
-                                      std::vector< cl_mem > &outputBuff);
-
-    virtual bool buildForwardKernel() = 0;
-    virtual bool buildBackwardKernel() = 0;
-};
-
-
-//     The "envelope" is a set of limits imposed by the hardware
-//     This will depend on the GPU(s) in the OpenCL context.
-//     If there are multiple devices, this should be the least
-//     common denominators.
-//
-struct FFTEnvelope {
-       cl_ulong   limit_LocalMemSize;
-                  //  this is the minimum of CL_DEVICE_LOCAL_MEM_SIZE
-       size_t     limit_Dimensions;
-                  //  this is the minimum of CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS
-       size_t     limit_Size[8];
-                  //  these are the minimima of CL_DEVICE_MAX_WORK_ITEM_SIZES[0..n]
-       size_t     limit_WorkGroupSize;
-                  //  this is the minimum of CL_DEVICE_MAX_WORK_GROUP_SIZE
-
-       // ??  CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE
-
-       FFTEnvelope ()
-       :       limit_LocalMemSize (0)
-       ,       limit_Dimensions (0)
-       ,       limit_WorkGroupSize (0)
-       {
-               ::memset( &limit_Size, 0, sizeof( limit_Size ) );
-       }
-};
-
-
-//     This class contains objects that are specific to a particular FFT transform, and the data herein is useful
-//     for us to know ahead of transform time such that we can optimize for these settings
-class  FFTPlan
-{
-
-public:
-
-       bool baked;
-
-       //      Properties provided by the user.
-       clfftDim             dim;
-       clfftLayout          inputLayout;
-       clfftLayout          outputLayout;
-       clfftResultLocation  placeness;
-       clfftResultTransposed transposed;
-       clfftPrecision       precision;
-       cl_context              context;
-       double                  forwardScale, backwardScale;
-       size_t                  iDist, oDist;
-       size_t                  batchsize;
-
-       // Note the device passed to BakePlan, assuming we are baking for one device
-       // TODO, change this logic for handling multiple GPUs/devices
-       cl_device_id bakeDevice;
-
-       // Disabling devices member, plan has 1-on-1 mapping with single device as identified by bakeDevice
-       //      Devices that the user specified in the context passed to the create function
-       // std::vector< cl_device_id > devices;
-
-       //      Length of the FFT in each dimension
-       std::vector< size_t >   length;
-
-       //      Stride of the FFT in each dimension
-       std::vector< size_t >   inStride, outStride;
-
-       //      Hardware Limits
-       FFTEnvelope                 envelope;
-
-
-       // Reserved copy for large 1d, 2d, and 3d plan
-       size_t tmpBufSize;
-       cl_mem intBuffer;
-       bool libCreatedIntBuffer;
-
-       // for RC copies
-       size_t  tmpBufSizeRC;
-       cl_mem  intBufferRC;
-
-       // for C-to-R transforms that are OUTOFPLACE
-       // we need this because the user supplied output buffer is not big enough
-       // to hold intermediate results for any problem other than normal 1D
-       size_t  tmpBufSizeC2R;
-       cl_mem  intBufferC2R;
-
-
-       size_t  large1D;
-       bool    large2D;
-       bool    twiddleFront;
-
-       clfftPlanHandle planX;
-       clfftPlanHandle planY;
-       clfftPlanHandle planZ;
-
-       bool transflag;
-       bool transOutHorizontal;
-       clfftPlanHandle planTX;
-       clfftPlanHandle planTY;
-       clfftPlanHandle planTZ; //reserve for 3D transpose
-
-       clfftPlanHandle planRCcopy;
-       clfftPlanHandle planCopy;
-
-       // Plan resources
-       //
-       cl_mem const_buffer;
-
-       // Generator type
-       clfftGenerators gen;
-
-
-       // Real-Complex simple flag
-       // if this is set we do real to-and-from full complex using simple algorithm
-       // where imaginary of input is set to zero in forward and imaginary not written in backward
-       bool RCsimple;
-
-       // Real FFT special flag
-       // if this is set it means we are doing the 4th step in the 5-step real FFT breakdown algorithm
-       bool realSpecial;
-       
-       size_t realSpecial_Nr; // this value stores the logical column height (N0) of matrix in the 4th step
-                              // length[1] should be 1 + N0/2
-
-       // User created plan
-       bool userPlan;
-
-
-       // Allocate no extra memory
-       bool allOpsInplace;
-
-       // flag to indicate transpose placeness in 2D breakdown
-       bool transpose_in_2d_inplace;
-
-
-       // A flag to say that blocked FFTs are going to be performed
-       // It can only be one of these: column to row, row to column or column to column
-       // row to row is just the normal case where blocking is not needed
-       bool blockCompute;
-       BlockComputeType blockComputeType;
-
-       bool hasPreCallback;
-       bool hasPostCallback;
-
-       clfftCallbackParam preCallback;
-       clfftCallbackParam postCallbackParam;
-
-       cl_mem precallUserData;
-       cl_mem postcallUserData;
-
-    clfftPlanHandle plHandle;
-
-    // The action
-    FFTAction * action;
-
-    NonSquareTransposeKernelType nonSquareKernelType;
-       // sometimes non square matrix are broken down into a number of
-       // square matrix during inplace transpose
-       // let's call this number transposeMiniBatchSize
-       // no user of the library should set its value
-       size_t transposeMiniBatchSize;
-       NON_SQUARE_KERNEL_ORDER nonSquareKernelOrder;
-
-       FFTPlan ()
-       :       baked (false)
-       ,       dim (CLFFT_1D)
-       ,       inputLayout (CLFFT_COMPLEX_INTERLEAVED)
-       ,       outputLayout (CLFFT_COMPLEX_INTERLEAVED)
-       ,       placeness (CLFFT_INPLACE)
-       ,   transposed (CLFFT_NOTRANSPOSE)
-       ,       precision (CLFFT_SINGLE)
-       ,       context (NULL)
-       ,       forwardScale (1.0)
-       ,       backwardScale (1.0)
-       ,       iDist( 1 ), oDist( 1 )
-       ,       batchsize (1)
-       ,   tmpBufSize (0)
-       ,       intBuffer( NULL )
-       ,       libCreatedIntBuffer(false)
-       ,       tmpBufSizeRC (0)
-       ,       intBufferRC( NULL )
-       ,       tmpBufSizeC2R (0)
-       ,       intBufferC2R( NULL )
-       ,   large1D(0)
-       ,   large2D(false)
-       ,       twiddleFront(false)
-       ,   planX( 0 )
-       ,   planY( 0 )
-       ,   planZ( 0 )
-       ,   transflag(false)
-       ,       transOutHorizontal(false)
-       ,       RCsimple(false)
-       ,       realSpecial(false)
-       ,       realSpecial_Nr(0)
-       ,       userPlan(false)
-       ,       allOpsInplace(false)
-       ,       transpose_in_2d_inplace(false)
-       ,       blockCompute(false)
-       ,       blockComputeType(BCT_C2C)
-       ,   planTX( 0 )
-       ,   planTY( 0 )
-       ,   planTZ( 0 )
-       ,       planRCcopy(0)
-       ,       planCopy(0)
-       ,       const_buffer( NULL )
-       ,       gen(Stockham)
-    ,   action(0)
-    ,   nonSquareKernelType(NON_SQUARE_TRANS_PARENT)
-       ,   transposeMiniBatchSize(1)
-       ,   nonSquareKernelOrder(NOT_A_TRANSPOSE)
-    ,   plHandle(0)
-       ,   hasPreCallback(false)
-       ,   hasPostCallback(false)
-       {
-       };
-
-
-       size_t ElementSize() const;
-
-       clfftStatus AllocateBuffers ();
-       clfftStatus ReleaseBuffers ();
-
-       clfftStatus GetMax1DLength (size_t *longest ) const;
-
-       clfftStatus ConstructAndEnqueueConstantBuffers( cl_command_queue* commQueueFFT );
-
-       clfftStatus GetEnvelope (const FFTEnvelope **) const;
-       clfftStatus SetEnvelope ();
-
-       clfftStatus GetMax1DLengthStockham (size_t *longest ) const;
-
-       ~FFTPlan ()
-       {
-               ReleaseBuffers ();
-
-               if (action != NULL)
-               {
-                       delete action;
-                       action = 0;
-               }
-       }
-};
-
-static bool Is1DPossible(size_t length, size_t large1DThreshold)
-{
-       if (length > large1DThreshold)
-               return false;
-
-       if ( (length%7 == 0) && (length%5 == 0) && (length%3 == 0) )
-               return false;
-
-       // radix 11 & 2 is ok, anything else we cannot do in 1 kernel
-       if ( (length % 11 == 0) && ((length % 13 == 0) || (length % 7 == 0) || (length % 5 == 0) || (length % 3 == 0)) )
-               return false;
-       
-       // radix 13 & 2 is ok, anything else we cannot do in 1 kernel
-       if ( (length % 13 == 0) && ((length % 11 == 0) || (length % 7 == 0) || (length % 5 == 0) || (length % 3 == 0)) )
-               return false;
-
-       return true;
-}
-
-#endif // AMD_CLFFT_plan_H
-
diff --git a/src/include/gromacs/external/clFFT/src/library/private.h b/src/include/gromacs/external/clFFT/src/library/private.h
deleted file mode 100644 (file)
index 48f2fa5..0000000
+++ /dev/null
@@ -1,374 +0,0 @@
-/* ************************************************************************
- * Copyright 2013 Advanced Micro Devices, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ************************************************************************/
-
-
-#pragma once
-#if !defined( CLFFT_private_H )
-#define CLFFT_private_H
-
-#include <vector>
-#include <string>
-#include <locale>
-#include <iostream>
-#include <sstream>
-#include <stdexcept>
-#include <cassert>
-#include "../include/clFFT.h"
-#include "../include/unicode.compatibility.h"
-
-#if defined(_MSC_VER)
-       //      Microsoft Visual C++ compiler
-       //
-#define SPRINTF(_buffer, _count, _format,...)                        \
-       _snprintf_s (_buffer, _count, _TRUNCATE, _format, __VA_ARGS__)
-#elif defined( __GNUC__ )
-       //      Gnu G++
-       //
-#define SPRINTF(_buffer, _count, _format,...)                   \
-       {       size_t len = (_count)-1;                                \
-               snprintf (_buffer, len, _format,__VA_ARGS__);           \
-               _buffer[len] = 0;                                       \
-       }
-#else
-#error Unknown/unsupported C++ compiler.
-#endif
-
-//     Creating a portable defintion of countof
-//  This excludes mingw compilers; mingw32 does not have _countof
-#if defined( _MSC_VER )
-       #define countOf _countof
-#else
-       #define countOf( arr ) ( sizeof( arr ) / sizeof( arr[ 0 ] ) )
-#endif
-
-// This excludes mingw compilers; mingw32 does not have <intrin.h>
-#if defined( _MSC_VER )
-       #include <intrin.h>
-
-       #if defined( _WIN64 )
-               inline void BSF( unsigned long* index, size_t& mask )
-               {
-                       _BitScanForward64( index, mask );
-               }
-
-               inline size_t AtomicAdd( volatile size_t* value, size_t op )
-               {
-                       return _InterlockedExchangeAdd64( reinterpret_cast< volatile __int64* >( value ), op );
-               }
-       #else
-               inline void BSF( unsigned long* index, size_t& mask )
-               {
-                       _BitScanForward( index, mask );
-               }
-
-               inline size_t AtomicAdd( volatile size_t* value, size_t op )
-               {
-                       return _InterlockedExchangeAdd( reinterpret_cast< volatile long* >( value ), op );
-               }
-       #endif
-#elif defined( __GNUC__ )
-       inline void BSF( unsigned long * index, size_t & mask )
-       {
-               *index = __builtin_ctz( mask );
-       }
-
-       inline size_t AtomicAdd( volatile size_t* value, size_t op )
-       {
-               return __sync_fetch_and_add( value, op );
-       }
-#endif
-
-void clfftInitRequestLibNoMemAlloc();
-bool clfftGetRequestLibNoMemAlloc();
-
-void clfftInitBinaryCache();
-
-//     This header file is not visible to clients, and contains internal structures and functions for use
-//     by the FFT library.  Since this header is private to this implementation, there is no need to keep
-//     strict C compliance.
-
-//     Enum to help provide descriptive names to array indices, when indexing into our various vectors
-enum clfftDim_Index
-{
-       DimX,                           ///< 1 Dimension
-       DimY,                           ///< 2 Dimension
-       DimZ,                           ///< 3 Dimension
-       DimW,                           ///< 4th Dimension
-       ENDDIMINDEX                     ///< This value will always be last, and marks the length of clfftDim_Index
-};
-
-template< typename FileStreamType, typename StringType >
-class tofstreamRAII
-{
-       FileStreamType  outFile;
-       StringType              fileName;
-
-       public:
-               tofstreamRAII( const StringType& name ): fileName( name )
-               {
-                       outFile.open( fileName.c_str( ) );
-               }
-
-               ~tofstreamRAII( )
-               {
-                       outFile.close( );
-               }
-
-               StringType& getName( )
-               {
-                       return fileName;
-               }
-
-               void setName( const StringType& name )
-               {
-                       fileName = name;
-               }
-
-               FileStreamType& get( )
-               {
-                       return outFile;
-               }
-};
-
-//(currently) true if length is a power of 2,3,5,7,11,13
-inline bool IsASupportedLength( size_t length )
-{
-       while( length > 1 )
-       {
-               if( length % 2 == 0 )
-                       length /= 2;
-               else if( length % 3 == 0 )
-                       length /= 3;
-               else if( length % 5 == 0 )
-                       length /= 5;
-               else if( length % 7 == 0 )
-                       length /= 7;
-               else if (length % 11 == 0)
-                       length /= 11;
-               else if (length % 13 == 0)
-                       length /= 13;
-               else
-                       return false;
-       }
-       return true;
-}
-
-inline tstring clfftErrorStatusAsString( const cl_int& status )
-{
-       switch( status )
-       {
-               case CLFFT_INVALID_GLOBAL_WORK_SIZE:
-                       return _T( "CLFFT_INVALID_GLOBAL_WORK_SIZE" );
-               case CLFFT_INVALID_MIP_LEVEL:
-                       return _T( "CLFFT_INVALID_MIP_LEVEL" );
-               case CLFFT_INVALID_BUFFER_SIZE:
-                       return _T( "CLFFT_INVALID_BUFFER_SIZE" );
-               case CLFFT_INVALID_GL_OBJECT:
-                       return _T( "CLFFT_INVALID_GL_OBJECT" );
-               case CLFFT_INVALID_OPERATION:
-                       return _T( "CLFFT_INVALID_OPERATION" );
-               case CLFFT_INVALID_EVENT:
-                       return _T( "CLFFT_INVALID_EVENT" );
-               case CLFFT_INVALID_EVENT_WAIT_LIST:
-                       return _T( "CLFFT_INVALID_EVENT_WAIT_LIST" );
-               case CLFFT_INVALID_GLOBAL_OFFSET:
-                       return _T( "CLFFT_INVALID_GLOBAL_OFFSET" );
-               case CLFFT_INVALID_WORK_ITEM_SIZE:
-                       return _T( "CLFFT_INVALID_WORK_ITEM_SIZE" );
-               case CLFFT_INVALID_WORK_GROUP_SIZE:
-                       return _T( "CLFFT_INVALID_WORK_GROUP_SIZE" );
-               case CLFFT_INVALID_WORK_DIMENSION:
-                       return _T( "CLFFT_INVALID_WORK_DIMENSION" );
-               case CLFFT_INVALID_KERNEL_ARGS:
-                       return _T( "CLFFT_INVALID_KERNEL_ARGS" );
-               case CLFFT_INVALID_ARG_SIZE:
-                       return _T( "CLFFT_INVALID_ARG_SIZE" );
-               case CLFFT_INVALID_ARG_VALUE:
-                       return _T( "CLFFT_INVALID_ARG_VALUE" );
-               case CLFFT_INVALID_ARG_INDEX:
-                       return _T( "CLFFT_INVALID_ARG_INDEX" );
-               case CLFFT_INVALID_KERNEL:
-                       return _T( "CLFFT_INVALID_KERNEL" );
-               case CLFFT_INVALID_KERNEL_DEFINITION:
-                       return _T( "CLFFT_INVALID_KERNEL_DEFINITION" );
-               case CLFFT_INVALID_KERNEL_NAME:
-                       return _T( "CLFFT_INVALID_KERNEL_NAME" );
-               case CLFFT_INVALID_PROGRAM_EXECUTABLE:
-                       return _T( "CLFFT_INVALID_PROGRAM_EXECUTABLE" );
-               case CLFFT_INVALID_PROGRAM:
-                       return _T( "CLFFT_INVALID_PROGRAM" );
-               case CLFFT_INVALID_BUILD_OPTIONS:
-                       return _T( "CLFFT_INVALID_BUILD_OPTIONS" );
-               case CLFFT_INVALID_BINARY:
-                       return _T( "CLFFT_INVALID_BINARY" );
-               case CLFFT_INVALID_SAMPLER:
-                       return _T( "CLFFT_INVALID_SAMPLER" );
-               case CLFFT_INVALID_IMAGE_SIZE:
-                       return _T( "CLFFT_INVALID_IMAGE_SIZE" );
-               case CLFFT_INVALID_IMAGE_FORMAT_DESCRIPTOR:
-                       return _T( "CLFFT_INVALID_IMAGE_FORMAT_DESCRIPTOR" );
-               case CLFFT_INVALID_MEM_OBJECT:
-                       return _T( "CLFFT_INVALID_MEM_OBJECT" );
-               case CLFFT_INVALID_HOST_PTR:
-                       return _T( "CLFFT_INVALID_HOST_PTR" );
-               case CLFFT_INVALID_COMMAND_QUEUE:
-                       return _T( "CLFFT_INVALID_COMMAND_QUEUE" );
-               case CLFFT_INVALID_QUEUE_PROPERTIES:
-                       return _T( "CLFFT_INVALID_QUEUE_PROPERTIES" );
-               case CLFFT_INVALID_CONTEXT:
-                       return _T( "CLFFT_INVALID_CONTEXT" );
-               case CLFFT_INVALID_DEVICE:
-                       return _T( "CLFFT_INVALID_DEVICE" );
-               case CLFFT_INVALID_PLATFORM:
-                       return _T( "CLFFT_INVALID_PLATFORM" );
-               case CLFFT_INVALID_DEVICE_TYPE:
-                       return _T( "CLFFT_INVALID_DEVICE_TYPE" );
-               case CLFFT_INVALID_VALUE:
-                       return _T( "CLFFT_INVALID_VALUE" );
-               case CLFFT_MAP_FAILURE:
-                       return _T( "CLFFT_MAP_FAILURE" );
-               case CLFFT_BUILD_PROGRAM_FAILURE:
-                       return _T( "CLFFT_BUILD_PROGRAM_FAILURE" );
-               case CLFFT_IMAGE_FORMAT_NOT_SUPPORTED:
-                       return _T( "CLFFT_IMAGE_FORMAT_NOT_SUPPORTED" );
-               case CLFFT_IMAGE_FORMAT_MISMATCH:
-                       return _T( "CLFFT_IMAGE_FORMAT_MISMATCH" );
-               case CLFFT_MEM_COPY_OVERLAP:
-                       return _T( "CLFFT_MEM_COPY_OVERLAP" );
-               case CLFFT_PROFILING_INFO_NOT_AVAILABLE:
-                       return _T( "CLFFT_PROFILING_INFO_NOT_AVAILABLE" );
-               case CLFFT_OUT_OF_HOST_MEMORY:
-                       return _T( "CLFFT_OUT_OF_HOST_MEMORY" );
-               case CLFFT_OUT_OF_RESOURCES:
-                       return _T( "CLFFT_OUT_OF_RESOURCES" );
-               case CLFFT_MEM_OBJECT_ALLOCATION_FAILURE:
-                       return _T( "CLFFT_MEM_OBJECT_ALLOCATION_FAILURE" );
-               case CLFFT_COMPILER_NOT_AVAILABLE:
-                       return _T( "CLFFT_COMPILER_NOT_AVAILABLE" );
-               case CLFFT_DEVICE_NOT_AVAILABLE:
-                       return _T( "CLFFT_DEVICE_NOT_AVAILABLE" );
-               case CLFFT_DEVICE_NOT_FOUND:
-                       return _T( "CLFFT_DEVICE_NOT_FOUND" );
-               case CLFFT_SUCCESS:
-                       return _T( "CLFFT_SUCCESS" );
-               case CLFFT_NOTIMPLEMENTED:
-                       return _T( "CLFFT_NOTIMPLEMENTED" );
-               case CLFFT_FILE_NOT_FOUND:
-                       return _T( "CLFFT_FILE_NOT_FOUND" );
-               case CLFFT_FILE_CREATE_FAILURE:
-                       return _T( "CLFFT_FILE_CREATE_FAILURE" );
-               case CLFFT_VERSION_MISMATCH:
-                       return _T( "CLFFT_VERSION_MISMATCH" );
-               case CLFFT_INVALID_PLAN:
-                       return _T( "CLFFT_INVALID_PLAN" );
-               default:
-                       return _T( "Error code not defined" );
-               break;
-       }
-}
-
-//     This is used to either wrap an OpenCL function call, or to explicitly check a variable for an OpenCL error condition.
-//     If an error occurs, we issue a return statement to exit the calling function.
-#if defined( _DEBUG )
-
-#define OPENCL_V( fn, msg ) \
-{ \
-       clfftStatus vclStatus = static_cast< clfftStatus >( fn ); \
-       switch( vclStatus ) \
-       { \
-               case    CL_SUCCESS:             /**< No error */ \
-                       break; \
-               default: \
-               { \
-                       terr << _T( "OPENCL_V< " ); \
-                       terr << clfftErrorStatusAsString( vclStatus ); \
-                       terr << _T( " > (" )<< static_cast<unsigned>( __LINE__ ) << _T( "): " ); \
-                       terr << msg << std::endl; \
-                       return  vclStatus; \
-               } \
-       } \
-}
-
-#else
-
-#define OPENCL_V( fn, msg ) \
-{ \
-       clfftStatus vclStatus = static_cast< clfftStatus >( fn ); \
-       switch( vclStatus ) \
-       { \
-               case    CL_SUCCESS:             /**< No error */ \
-                       break; \
-               default: \
-               { \
-                       return  vclStatus; \
-               } \
-       } \
-}
-#endif
-
-static inline bool IsPo2 (size_t u) {
-       return (u != 0) &&  (0 == (u & (u-1)));
-}
-
-template<typename T>
-static inline T DivRoundingUp (T a, T b) {
-       return (a + (b-1)) / b;
-}
-
-static inline size_t BitScanF (size_t n) {
-       assert (n != 0);
-       unsigned long tmp = 0;
-       BSF (& tmp, n);
-       return (size_t) tmp;
-}
-
-#define ARG_CHECK(_proposition)        \
-{ bool btmp = (_proposition);  assert (btmp); if (! btmp)      return CLFFT_INVALID_ARG_VALUE; }
-
-#define BUG_CHECK(_proposition)        \
-       { bool btmp = (_proposition);   assert (btmp); if (! btmp)      return CLFFT_BUGCHECK; }
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-CLFFTAPI clfftStatus clfftLocalMemSize( const clfftPlanHandle plHandle, cl_ulong* local_mem_size );
-
-/*! @brief Save to disk a file containing the contents of a baked plan.
-*  @details A plan is a repository of state for calculating FFT's. Saves the details for a plan to allow the user
-*      to easily recreate a plan and execute it without having to first build the kernel.
-*  @param[in] plHandle Handle to the plan to be written to disk
-*  @param[in] filename The desired name of the output file for the stored plan
-*  @return Enum describing error condition; superset of OpenCL error codes
-*/
-CLFFTAPI clfftStatus   clfftWritePlanToDisk( clfftPlanHandle plHandle, const char* filename );
-
-/*! @brief Read from disk a file containing the contents of a baked plan.
-*  @details A plan is a repository of state for calculating FFT's. Reads the details for a plan from a file on disk and duplicates
-*      the plan in the provided plan handle.
-*  @param[out] plHandle Handle to the plan to be set to details from the file
-*  @param[in] filename The name of the file containing the stored plan
-*  @return Enum describing error condition; superset of OpenCL error codes
-*/
-CLFFTAPI clfftStatus   clfftReadPlanFromDisk( clfftPlanHandle plHandle, const char* filename );
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/src/include/gromacs/external/clFFT/src/library/repo.h b/src/include/gromacs/external/clFFT/src/library/repo.h
deleted file mode 100644 (file)
index bb81f11..0000000
+++ /dev/null
@@ -1,234 +0,0 @@
-/* ************************************************************************
- * Copyright 2013 Advanced Micro Devices, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ************************************************************************/
-
-
-#pragma once
-#if !defined( CLFFT_repo_H )
-#define CLFFT_repo_H
-#include <map>
-#include "private.h"
-#include "plan.h"
-#include "lock.h"
-
-#include "../statTimer/statisticalTimer.GPU.h"
-
-
-
-
-
-//     This class contains objects that we wish to retain between individual calls into the FFT interface.
-//     These objects will be shared across different individual FFT plans, and we wish to keep only one
-//     copy of these programs, objects and events.  When the client decides that they either want to reset
-//     the library or release all resources, this Repo will release all acquired resources and clean itself
-//     up as much as it can.  It is implemented as a Singleton object.
-class  FFTRepo
-{
-
-    struct FFTRepoKey
-    {
-        clfftGenerators gen;
-        const FFTKernelSignatureHeader * data;
-        cl_context context;
-               cl_device_id device;
-               bool dataIsPrivate;
-
-        FFTRepoKey(clfftGenerators gen_, const FFTKernelSignatureHeader * data_, cl_context context_, cl_device_id device_)
-            : gen(gen_), data(data_), context(context_), device(device_), dataIsPrivate(false)
-        {
-
-        }
-
-        void privatizeData()
-        {
-            char * tmp = new char[data->datasize];
-            ::memcpy(tmp, data, data->datasize);
-            this->data = (FFTKernelSignatureHeader*) tmp;
-                       dataIsPrivate = true;
-        }
-
-        void deleteData()
-        {
-            if ( dataIsPrivate && (this->data != NULL) )
-            {
-                               char *tmp = (char *)(this->data);
-                delete[] tmp;
-                               this->data = 0;
-            }            
-        }
-
-        bool operator<(const FFTRepoKey & b) const
-        {
-            const FFTRepoKey & a = *this;
-
-            if (a.gen != b.gen)
-            {
-                return a.gen < b.gen;
-            }
-            else if (a.data->datasize != b.data->datasize)
-            {
-                return a.data->datasize < b.data->datasize;
-            }
-            else if (a.context != b.context)
-            {
-                return a.context < b.context;
-            }
-                       else if (a.device != b.device)
-                       {
-                               return a.device < b.device;
-                       }
-            else
-            {
-                return ::memcmp(a.data, b.data, a.data->datasize) < 0;
-            }
-        }
-    };
-
-
-       //      Structure containing all the data we need to remember for a specific invokation of a kernel
-       //      generator
-       struct fftRepoValue {
-               std::string ProgramString;
-               std::string EntryPoint_fwd;
-               std::string EntryPoint_back;
-               cl_program  clProgram;
-
-               fftRepoValue ()
-               :       clProgram (NULL)
-               {}
-       };
-
-       //      Map structure to map parameters that a generator uses to a specific set of kernels that the generator
-       //      has created
-       //typedef std::pair< clfftGenerators, FFTKernelGenKeyParams > fftRepoKey;
-
-       typedef std::map< FFTRepoKey, fftRepoValue > fftRepoType;
-       typedef fftRepoType::iterator fftRepo_iterator;
-
-
-
-       fftRepoType     mapFFTs;
-
-       struct fftKernels {
-               cl_kernel kernel_fwd;
-               cl_kernel kernel_back;
-               lockRAII* kernel_fwd_lock;
-               lockRAII* kernel_back_lock;
-
-               fftKernels ()
-               :       kernel_fwd (NULL)
-               ,       kernel_back (NULL)
-               ,       kernel_fwd_lock(NULL)
-               ,       kernel_back_lock(NULL)
-               {}
-       };
-
-       typedef std::map< cl_program, fftKernels > mapKernelType;
-       typedef mapKernelType::iterator Kernel_iterator;
-       mapKernelType mapKernels;
-
-       //      All plans that the user creates over the course of using the library are stored here.
-       //      Plans can be arbitrarily created and destroyed at anytime by the user, in arbitrary order, so vector
-       //      does not seem appropriate, so a map was chosen because of the O(log N) search properties
-       //      A lock object is created for each plan, such that any getter/setter can lock the 'plan' object before
-       //      reading/writing its values.  The lock object is kept seperate from the plan object so that the lock
-       //      object can be held the entire time a plan is getting destroyed in clfftDestroyPlan.
-       typedef std::pair< FFTPlan*, lockRAII* > repoPlansValue;
-       typedef std::map< clfftPlanHandle, repoPlansValue > repoPlansType;
-       repoPlansType repoPlans;
-
-       //      Static count of how many plans we have generated; always incrementing during the life of the library
-       //      This is used as a unique identifier for plans
-       static size_t planCount;
-
-       // Private constructor to stop explicit instantiation
-       FFTRepo( )
-       {}
-
-       // Private copy constructor to stop implicit instantiation
-       FFTRepo( const FFTRepo& );
-
-       // Private operator= to assure only 1 copy of singleton
-       FFTRepo& operator=( const FFTRepo& );
-
-       ~FFTRepo( )
-       {
-               //      NOTE:  We can't release resources in our destructor because as a static object, the order of destruction of static objects
-               //      is not guaranteed, and openCL might already have cleaned itself up.  When clFFT tries to free its resources, an access
-               //      violation could occur.
-               //releaseResources( );
-
-               //      We should at least print out a warning message to the user if we are in our destructor and we still have resources
-               //      bound.  This should give the user a clue to remember to call clfftTeardown( )
-               if( (!mapKernels.empty( )) || (!mapFFTs.empty( )) )
-               {
-                       terr << _T( "Warning:  Program terminating, but clFFT resources not freed." ) << std::endl;
-                       terr << _T( "Please consider explicitly calling clfftTeardown( )." ) << std::endl;
-               }
-       };
-
-public:
-       //      Used to make the FFTRepo struct thread safe; STL is not thread safe by default
-       //      Optimally, we could use a lock object per STL struct, as two different STL structures
-       //      can be modified at the same time, but a single lock object is easier and performance should
-       //      still be good. This is implemented as a function returning a static local reference to
-       //      assert that the lock must be instantiated before the result can be used.
-       static lockRAII& lockRepo()
-       {
-               //      Static initialization of the repo lock variable
-               static lockRAII lock(_T("FFTRepo"));
-               return lock;
-       }
-
-       //      Our runtime library can instrument kernel timings with a GPU timer available in a shared module
-       //      Handle/Address of the dynamic module that contains timers
-       static void* timerHandle;
-
-       //      Pointer to the timer class queried from the timer shared library
-       static GpuStatTimer* pStatTimer;
-
-       //      Global debug flags that the FFT engine can check to control various debug logic
-       clfftSetupData setupData;
-
-       //      Everybody who wants to access the Repo calls this function to get a repo reference
-       static FFTRepo& getInstance( )
-       {
-               static FFTRepo fftRepo;
-               return  fftRepo;
-       };
-
-       clfftStatus releaseResources( );
-
-       clfftStatus setProgramCode( const clfftGenerators gen, const FFTKernelSignatureHeader * data, const std::string& kernel, const cl_device_id &device, const cl_context& planContext );
-       clfftStatus getProgramCode( const clfftGenerators gen, const FFTKernelSignatureHeader * data, std::string& kernel, const cl_device_id &device, const cl_context& planContext );
-
-       clfftStatus setProgramEntryPoints( const clfftGenerators gen, const FFTKernelSignatureHeader * data, const char * kernel_fwd, const char * kernel_back, const cl_device_id &device, const cl_context& planContext );
-       clfftStatus getProgramEntryPoint( const clfftGenerators gen, const FFTKernelSignatureHeader * data, clfftDirection dir, std::string& kernel , const cl_device_id &device, const cl_context& planContext );
-
-       clfftStatus setclProgram( const clfftGenerators gen, const FFTKernelSignatureHeader * data, const cl_program& prog, const cl_device_id &device, const cl_context& planContext );
-       clfftStatus getclProgram( const clfftGenerators gen, const FFTKernelSignatureHeader * data, cl_program& prog, const cl_device_id &device, const cl_context& planContext );
-
-       clfftStatus setclKernel ( cl_program prog, clfftDirection dir, const cl_kernel& kernel );
-       clfftStatus getclKernel ( cl_program prog, clfftDirection dir, cl_kernel& kernel, lockRAII*& kernelLock);
-
-       clfftStatus createPlan( clfftPlanHandle* plHandle, FFTPlan*& fftPlan );
-       clfftStatus getPlan( clfftPlanHandle plHandle, FFTPlan*& fftPlan, lockRAII*& planLock );
-       clfftStatus deletePlan( clfftPlanHandle* plHandle );
-  
-
-};
-
-#endif
-
diff --git a/src/include/gromacs/external/clFFT/src/statTimer/statisticalTimer.CPU.h b/src/include/gromacs/external/clFFT/src/statTimer/statisticalTimer.CPU.h
deleted file mode 100644 (file)
index 7601493..0000000
+++ /dev/null
@@ -1,173 +0,0 @@
-/* ************************************************************************
- * Copyright 2013 Advanced Micro Devices, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ************************************************************************/
-
-
-#pragma once
-#ifndef _STATISTICALTIMER_CPU_H_
-#define _STATISTICALTIMER_CPU_H_
-#include <iosfwd>
-#include <vector>
-#include <algorithm>
-#ifdef __FreeBSD__
-#include <sys/timespec.h>
-#endif
-#include "statisticalTimer.h"
-
-/**
- * \file clfft.StatisticalTimer.CPU.h
- * \brief A timer class that provides a cross platform timer for use
- * in timing code progress with a high degree of accuracy.
- *     This class is implemented entirely in the header, to facilitate inclusion into multiple
- *     projects without needing to compile an object file for each project.
- */
-
-class CpuStatTimer : public baseStatTimer
-{
-       //      Private typedefs
-       typedef std::vector< cl_ulong > clkVector;
-       typedef std::pair< std::string, cl_uint > labelPair;
-       typedef std::vector< labelPair > stringVector;
-
-       //      In order to calculate statistics <std. dev.>, we need to keep a history of our timings
-       stringVector    labelID;
-       clkVector       clkStart;
-       std::vector< clkVector >        clkTicks;
-
-       //      How many clockticks in a second
-       cl_ulong        clkFrequency;
-
-       //      For linux; the resolution of a high-precision timer
-       //  Mingw32 does not define timespec; can use windows timers
-#if !defined( _WIN32 )
-       timespec res;
-#endif
-
-       //      Saved sizes for our vectors, used in Reset() to reallocate vectors
-       clkVector::size_type    nEvents, nSamples;
-
-       //      This setting controls whether the Timer should convert samples into time by dividing by the
-       //      clock frequency
-       bool normalize;
-
-       /**
-        * \fn StatisticalTimer()
-        * \brief Constructor for StatisticalTimer that initializes the class
-        *      This is private so that user code cannot create their own instantiation.  Instead, you
-        *      must go through getInstance( ) to get a reference to the class.
-        */
-       CpuStatTimer( );
-
-       /**
-        * \fn ~StatisticalTimer()
-        * \brief Destructor for StatisticalTimer that cleans up the class
-        */
-       ~CpuStatTimer( );
-
-       /**
-        * \fn StatisticalTimer(const StatisticalTimer& )
-        * \brief Copy constructors do not make sense for a singleton, disallow copies
-        */
-       CpuStatTimer( const CpuStatTimer& );
-
-       /**
-        * \fn operator=( const StatisticalTimer& )
-        * \brief Assignment operator does not make sense for a singleton, disallow assignments
-        */
-       CpuStatTimer& operator=( const CpuStatTimer& );
-
-       friend std::ostream& operator<<( std::ostream& os, const CpuStatTimer& s );
-
-       /**
-        * \fn void AddSample( const size_t id, const cl_ulong n )
-        * \brief Explicitely add a timing sample into the class
-        */
-       void AddSample( const size_t id, const cl_ulong n );
-
-       //      Calculate the average/mean of data for a given event
-       cl_double       getMean( size_t id ) const;
-
-       //      Calculate the variance of data for a given event
-       //      Variance - average of the squared differences between data points and the mean
-       cl_double       getVariance( size_t id ) const;
-
-       //      Sqrt of variance, also in units of the original data
-       cl_double       getStdDev( size_t id ) const;
-
-       /**
-        * \fn double getAverageTime(size_t id) const
-        * \return Return the arithmetic mean of all the samples that have been saved
-        */
-       cl_double getAverageTime( size_t id ) const;
-
-       /**
-        * \fn double getMinimumTime(size_t id) const
-        * \return Return the arithmetic min of all the samples that have been saved
-        */
-       cl_double getMinimumTime( size_t id ) const;
-
-public:
-       /**
-        * \fn getInstance()
-        * \brief This returns a reference to the singleton timer.  Guarantees only 1 timer class is ever
-        *      instantiated within a compilable executable.
-        */
-       static CpuStatTimer& getInstance( );
-
-       /**
-        * \fn void Start( size_t id )
-        * \brief Start the timer
-        * \sa Stop(), Reset()
-        */
-       void Start( size_t id );
-
-       /**
-        * \fn void Stop( size_t id )
-        * \brief Stop the timer
-        * \sa Start(), Reset()
-        */
-       void Stop( size_t id );
-
-       /**
-        * \fn void Reset(void)
-        * \brief Reset the timer to 0
-        * \sa Start(), Stop()
-        */
-       void Clear( );
-
-       /**
-        * \fn void Reset(void)
-        * \brief Reset the timer to 0
-        * \sa Start(), Stop()
-        */
-       void Reset( );
-
-       void Reserve( size_t nEvents, size_t nSamples );
-
-       size_t getUniqueID( const std::string& label, cl_uint groupID );
-
-       //      Calculate the average/mean of data for a given event
-       void    setNormalize( bool norm );
-
-       void Print( );
-
-       //      Using the stdDev of the entire population (of an id), eliminate those samples that fall
-       //      outside some specified multiple of the stdDev.  This assumes that the population
-       //      form a gaussian curve.
-       size_t  pruneOutliers( cl_double multiple );
-       std::vector< size_t > pruneOutliers( size_t id , cl_double multiple );
-};
-
-#endif // _STATISTICALTIMER_CPU_H_
diff --git a/src/include/gromacs/external/clFFT/src/statTimer/statisticalTimer.GPU.h b/src/include/gromacs/external/clFFT/src/statTimer/statisticalTimer.GPU.h
deleted file mode 100644 (file)
index 5b65ffc..0000000
+++ /dev/null
@@ -1,256 +0,0 @@
-/* ************************************************************************
- * Copyright 2013 Advanced Micro Devices, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ************************************************************************/
-
-
-#pragma once
-#ifndef _STATISTICALTIMER_GPU_H_
-#define _STATISTICALTIMER_GPU_H_
-#include <iosfwd>
-#include <vector>
-#include <algorithm>
-#include <cmath>
-#include "statisticalTimer.h"
-#include "../library/plan.h"
-
-/**
- * \file clfft.StatisticalTimer.GPU.h
- * \brief A timer class that provides a cross platform timer for use
- * in timing code progress with a high degree of accuracy.
- *     This class is implemented entirely in the header, to facilitate inclusion into multiple
- *     projects without needing to compile an object file for each project.
- */
-
-struct StatData
-{
-       cl_kernel kernel;
-       cl_ulong deltaNanoSec;
-       double doubleNanoSec;
-       size_t batchSize;
-       clfftDim dim;
-       clfftPlanHandle plHandle;
-       clfftPlanHandle planX;
-       clfftPlanHandle planY;
-       clfftPlanHandle planZ;
-       clfftPlanHandle planTX;
-       clfftPlanHandle planTY;
-       clfftPlanHandle planTZ;
-
-       clfftPlanHandle planRCcopy;
-       clfftPlanHandle planCopy;
-
-       clfftGenerators gen;
-
-       std::vector< size_t > lengths;
-       std::vector< size_t > inStride;
-       std::vector< size_t > outStride;
-       size_t iDist;
-       size_t oDist;
-       clfftResultLocation placeness;
-       std::vector< size_t > enqueueLocalWorkSize;
-       std::vector< size_t > enqueueWorkSize;
-       std::vector< cl_event > outEvents;
-
-       StatData( ): deltaNanoSec( 0 )
-       {}
-
-       StatData( clfftPlanHandle id, FFTPlan* plan, cl_kernel kern, cl_uint nEv, cl_event* Ev,
-               const std::vector< size_t >& gWorkSize, const std::vector< size_t >& lWorkSize):
-               deltaNanoSec( 0 ), kernel( kern ), batchSize( plan->batchsize ), dim( plan->dim ),
-               plHandle( id ), planX( plan->planX ), planY( plan->planY ), planZ( plan->planZ ),
-               planTX( plan->planTX ), planTY( plan->planTY ), planTZ( plan->planTZ ),
-               planRCcopy( plan->planRCcopy ), planCopy( plan->planCopy ), gen(plan->gen),
-               inStride( plan->inStride ), outStride( plan->outStride ), iDist( plan->iDist ), oDist( plan->oDist ),
-               lengths( plan->length ), enqueueWorkSize( gWorkSize ), enqueueLocalWorkSize( lWorkSize ), placeness( plan->placeness )
-       {
-               for( cl_uint e = 0; e < nEv; ++e )
-               {
-                       outEvents.push_back( Ev[ e ] );
-               }
-       }
-
-       double calcFlops( )
-       {
-               size_t  fftLength = 0;
-               size_t  dimIndex = 0;
-
-               if( dim == CLFFT_1D )
-               {
-                       fftLength       = lengths.at( 0 );
-                       dimIndex        = 1;
-               }
-               else if( dim == CLFFT_2D )
-               {
-                       fftLength       = lengths.at( 0 ) * lengths.at( 1 );
-                       dimIndex        = 2;
-               }
-               else if( dim == CLFFT_3D )
-               {
-                       fftLength       = lengths.at( 0 ) * lengths.at( 1 ) * lengths.at( 2 );
-                       dimIndex        = 3;
-               }
-
-               size_t cumulativeBatch = 1;
-               for( ; dimIndex < lengths.size(); ++dimIndex )
-               {
-                       cumulativeBatch *= std::max< size_t >( 1, lengths[ dimIndex ] );
-               }
-               cumulativeBatch *= batchSize;
-
-               double flops    = cumulativeBatch * 5 * fftLength * ( log( static_cast< double >( fftLength ) ) / log( 2.0 ) );
-
-               return flops;
-       }
-
-};
-
-//     Sorting operator for struct StatData, such that it can be used in a map
-bool operator<( const StatData& lhs, const StatData& rhs);
-
-class GpuStatTimer : public baseStatTimer
-{
-       //      Typedefs to handle the data that we store
-       typedef std::vector< StatData > StatDataVec;
-       typedef std::vector< StatDataVec > PerEnqueueVec;
-
-       //      In order to calculate statistics <std. dev.>, we need to keep a history of our timings
-       std::vector< PerEnqueueVec > timerData;
-
-       //      Typedefs to handle the identifiers we use for our timers
-       typedef std::pair< std::string, cl_uint > idPair;
-       typedef std::vector< idPair > idVector;
-       idVector labelID;
-
-       //      Between each Start/Stop pair, we need to count how many AddSamples were made.
-       size_t currSample, currRecord;
-
-       //      Saved sizes for our vectors, used in Reset() to reallocate vectors
-       StatDataVec::size_type  nEvents, nSamples;
-       size_t currID;
-
-       /**
-        * \fn GpuStatTimer()
-        * \brief Constructor for StatisticalTimer that initializes the class
-        *      This is private so that user code cannot create their own instantiation.  Instead, you
-        *      must go through getInstance( ) to get a reference to the class.
-        */
-       GpuStatTimer( );
-
-       /**
-        * \fn ~GpuStatTimer()
-        * \brief Destructor for StatisticalTimer that cleans up the class
-        */
-       ~GpuStatTimer( );
-
-       /**
-        * \fn GpuStatTimer(const StatisticalTimer& )
-        * \brief Copy constructors do not make sense for a singleton, disallow copies
-        */
-       GpuStatTimer( const GpuStatTimer& );
-
-       /**
-        * \fn operator=( const StatisticalTimer& )
-        * \brief Assignment operator does not make sense for a singleton, disallow assignments
-        */
-       GpuStatTimer& operator=( const GpuStatTimer& );
-
-       friend std::ostream& operator<<( std::ostream& os, const GpuStatTimer& s );
-
-       //      Calculate the average/mean of data for a given event
-       std::vector< StatData > getMean( size_t id );
-
-       //      Calculate the variance of data for a given event
-       //      Variance - average of the squared differences between data points and the mean
-       std::vector< StatData > getVariance( size_t id );
-
-       //      Sqrt of variance, also in units of the original data
-       std::vector< StatData > getStdDev( size_t id );
-
-       /**
-        * \fn double getAverageTime(size_t id) const
-        * \return Return the arithmetic mean of all the samples that have been saved
-        */
-       std::vector< StatData > getAverageTime( size_t id );
-
-       /**
-        * \fn double getMinimumTime(size_t id) const
-        * \return Return the arithmetic min of all the samples that have been saved
-        */
-       std::vector< StatData > getMinimumTime( size_t id );
-
-       void queryOpenCL( size_t id );
-
-       void ReleaseEvents();
-
-public:
-       /**
-        * \fn getInstance()
-        * \brief This returns a reference to the singleton timer.  Guarantees only 1 timer class is ever
-        *      instantiated within a compilable executable.
-        */
-       static GpuStatTimer& getInstance( );
-
-       /**
-        * \fn void Start( size_t id )
-        * \brief Start the timer
-        * \sa Stop(), Reset()
-        */
-       void Start( size_t id );
-
-       /**
-        * \fn void Stop( size_t id )
-        * \brief Stop the timer
-        * \sa Start(), Reset()
-        */
-       void Stop( size_t id );
-
-       /**
-        * \fn void AddSample( const cl_event ev )
-        * \brief Explicitely add a timing sample into the class
-        */
-       virtual void AddSample( clfftPlanHandle plHandle, FFTPlan* plan, cl_kernel kern, cl_uint numQueuesAndEvents, cl_event* ev,
-               const std::vector< size_t >& gWorkSize, const std::vector< size_t >& lWorkSize );
-
-       /**
-        * \fn void Reset(void)
-        * \brief Reset the timer to 0
-        * \sa Start(), Stop()
-        */
-       void Clear( );
-
-       /**
-        * \fn void Reset(void)
-        * \brief Reset the timer to 0
-        * \sa Start(), Stop()
-        */
-       void Reset( );
-
-       void Reserve( size_t nEvents, size_t nSamples );
-
-       size_t getUniqueID( const std::string& label, cl_uint groupID );
-
-       //      Calculate the average/mean of data for a given event
-       void    setNormalize( bool norm );
-
-       void Print( );
-
-       //      Using the stdDev of the entire population (of an id), eliminate those samples that fall
-       //      outside some specified multiple of the stdDev.  This assumes that the population
-       //      form a gaussian curve.
-       size_t  pruneOutliers( cl_double multiple );
-       std::vector< size_t > pruneOutliers( size_t id , cl_double multiple );
-};
-
-#endif // _STATISTICALTIMER_GPU_H_
diff --git a/src/include/gromacs/external/clFFT/src/statTimer/statisticalTimer.extern.h b/src/include/gromacs/external/clFFT/src/statTimer/statisticalTimer.extern.h
deleted file mode 100644 (file)
index 84999d6..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/* ************************************************************************
- * Copyright 2013 Advanced Micro Devices, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ************************************************************************/
-
-
-#pragma once
-#ifndef _STATISTICALTIMER_EXTERN_H_
-#define _STATISTICALTIMER_EXTERN_H_
-#include "../include/clFFT.h"
-#include "statisticalTimer.h"
-
-/**
- * \file clfft.StatisticalTimer.extern.h
- * \brief A timer class that provides a cross platform timer for use
- * in timing code progress with a high degree of accuracy.
- *     This class is implemented entirely in the header, to facilitate inclusion into multiple
- *     projects without needing to compile an object file for each project.
- */
-
-// The following ifdef block is the standard way of creating macros which make exporting
-// from a DLL simpler. All files within this DLL are compiled with the STATTIMER_EXPORTS
-// symbol defined on the command line. this symbol should not be defined on any project
-// that uses this DLL. This way any other project whose source files include this file see
-// STATTIMER_API functions as being imported from a DLL, whereas this DLL sees symbols
-// defined with this macro as being exported.
-#if defined( _WIN32 )
-       #if !defined( __cplusplus )
-               #define inline __inline
-       #endif
-
-    #if defined( CLFFT_STATIC )
-        #define STATTIMER_API
-    #elif defined( STATTIMER_EXPORTS )
-        #define STATTIMER_API __declspec( dllexport )
-    #else
-        #define STATTIMER_API __declspec( dllimport )
-    #endif
-#else
-       #define STATTIMER_API
-#endif
-
-//     The type of timer to be returned from ::getStatTimer( )
-typedef enum clfftTimerType_
-{
-       CLFFT_GPU                       = 1,
-       CLFFT_CPU,
-} clfftTimerType;
-
-//     Table of typedef definitions for all exported functions from this shared module.
-//     Clients of this module can use these typedefs to help create function pointers
-//     that can be initialized to point to the functions exported from this module.
-typedef baseStatTimer* (*PFGETSTATTIMER)( const clfftTimerType type );
-
-       /**
-       * \fn getInstance()
-       * \brief This returns a reference to the singleton timer.  Guarantees only 1 timer class is ever
-       *       instantiated within a compilable executable.
-       */
-extern "C" STATTIMER_API baseStatTimer* getStatTimer( const clfftTimerType type );
-
-#endif // _STATISTICALTIMER_EXTERN_H_
diff --git a/src/include/gromacs/external/clFFT/src/statTimer/statisticalTimer.h b/src/include/gromacs/external/clFFT/src/statTimer/statisticalTimer.h
deleted file mode 100644 (file)
index 58c03b7..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-/* ************************************************************************
- * Copyright 2013 Advanced Micro Devices, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ************************************************************************/
-
-
-#pragma once
-#ifndef _STATISTICALTIMER_H_
-#define _STATISTICALTIMER_H_
-#include <vector>
-#include <functional>
-#include <string>
-
-#include "../include/clFFT.h"
-
-/**
- * \file clfft.StatisticalTimer.h
- * \brief A timer class that provides a cross platform timer for use
- * in timing code progress with a high degree of accuracy.
- *     This class is implemented entirely in the header, to facilitate inclusion into multiple
- *     projects without needing to compile an object file for each project.
- */
-
-//     Definition of a functor object that is passed by reference into the Print statement
-//     of the timing class.
-//     Functor object to help with accumulating values in vectors
-template< typename A, typename R >
-class flopsFunc: public std::unary_function< A, R >
-{
-public:
-       virtual typename std::unary_function<A, R>::result_type operator( )( ) = 0;
-};
-
-/**
- * \class StatisticalTimer
- * \brief Counter that provides a fairly accurate timing mechanism for both
- * windows and linux. This timer is used extensively in all the samples.
- */
-class baseStatTimer
-{
-protected:
-       /**
-        * \fn ~baseStatTimer()
-        * \brief Destructor for StatisticalTimer that cleans up the class
-        */
-       virtual ~baseStatTimer( ){ };
-
-//     friend std::ostream& operator<<( std::ostream& os, const baseStatTimer& s );
-
-public:
-       /**
-        * \fn void Start( sTimerID id )
-        * \brief Start the timer
-        * \sa Stop(), Reset()
-        */
-       virtual void Start( size_t id ) = 0;
-
-       /**
-        * \fn void Stop( size_t id )
-        * \brief Stop the timer
-        * \sa Start(), Reset()
-        */
-       virtual void Stop( size_t id ) = 0;
-
-       /**
-        * \fn void Reset(void)
-        * \brief Reset the timer to 0
-        * \sa Start(), Stop()
-        */
-       virtual void Clear( ) = 0;
-
-       /**
-        * \fn void Reset(void)
-        * \brief Reset the timer to 0
-        * \sa Start(), Stop()
-        */
-       virtual void Reset( ) = 0;
-
-       virtual void Reserve( size_t nEvents, size_t nSamples ) = 0;
-
-       virtual size_t getUniqueID( const std::string& label, cl_uint groupID ) = 0;
-
-       //      Calculate the average/mean of data for a given event
-       virtual void    setNormalize( bool norm ) = 0;
-
-       virtual void Print( ) = 0;
-
-       //      Using the stdDev of the entire population (of an id), eliminate those samples that fall
-       //      outside some specified multiple of the stdDev.  This assumes that the population
-       //      form a gaussian curve.
-       virtual size_t  pruneOutliers( cl_double multiple ) = 0;
-       virtual std::vector< size_t > pruneOutliers( size_t id , cl_double multiple ) = 0;
-};
-
-#endif // _STATISTICALTIMER_H_
diff --git a/src/include/gromacs/external/clFFT/src/statTimer/stdafx.h b/src/include/gromacs/external/clFFT/src/statTimer/stdafx.h
deleted file mode 100644 (file)
index 774fef7..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/* ************************************************************************
- * Copyright 2013 Advanced Micro Devices, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ************************************************************************/
-
-
-// stdafx.h : include file for standard system include files,
-// or project specific include files that are used frequently, but
-// are changed infrequently
-//
-
-#pragma once
-
-#define _CRT_SECURE_NO_WARNINGS
-
-//#include <iostream>
-//#include <sstream>
-//#include <fstream>
-//#include <iomanip>
-//#include <cstring>
-//#include <memory>
-#include <vector>
-//#include <cstring>
-//#include <stdarg.h>
-#include <assert.h>
-//#include <complex>
-
-//     _WIN32 is defined for both 32 & 64 bit environments
-#if defined( _WIN32 )
-//     #include <tchar.h>
-       #include "targetver.h"
-
-#if !defined( NOMINMAX )
-       #define NOMINMAX
-#endif
-
-       #define WIN32_LEAN_AND_MEAN                     // Exclude rarely-used stuff from Windows headers
-       // Windows Header Files:
-       #include <windows.h>
-#endif
diff --git a/src/include/gromacs/external/clFFT/src/statTimer/targetver.h b/src/include/gromacs/external/clFFT/src/statTimer/targetver.h
deleted file mode 100644 (file)
index dafe714..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/* ************************************************************************
- * Copyright 2013 Advanced Micro Devices, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ************************************************************************/
-
-#pragma once
-
-// Including SDKDDKVer.h defines the highest available Windows platform.
-
-// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
-// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
-
-#include <SDKDDKVer.h>
diff --git a/src/include/gromacs/external/fftpack/fftpack.h b/src/include/gromacs/external/fftpack/fftpack.h
deleted file mode 100644 (file)
index 92d024d..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-
- *                This source code is part of
- * 
- *                 G   R   O   M   A   C   S
- * 
- *          GROningen MAchine for Chemical Simulations
- * 
- * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2012, The GROMACS development team,
- * check out http://www.gromacs.org for more information.
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- * 
- * If you want to redistribute modifications, 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 www.gromacs.org.
- * 
- * To help us fund GROMACS development, we humbly ask that you cite
- * the papers on the package - you can find them in the top README file.
- * 
- * For more info, check our website at http://www.gromacs.org
- * 
- * And Hey:
- * Groningen Machine for Chemical Simulation
-
- ************************************************************/
-
-#ifndef _fftpack_h
-#define _fftpack_h
-
-#if GMX_DOUBLE
-#define Treal double
-#else
-#define Treal float
-#endif
-
-    void fftpack_cffti1(int n, Treal wa[], int ifac[]);
-    void fftpack_cfftf1(int n, Treal c[], Treal ch[], const Treal wa[], const int ifac[], int isign);
-    void fftpack_rffti1(int n, Treal wa[], int ifac[]);
-    void fftpack_rfftf1(int n, Treal c[], Treal ch[], const Treal wa[], const int ifac[]);
-    void fftpack_rfftb1(int n, Treal c[], Treal ch[], const Treal wa[], const int ifac[]);
-
-#endif
diff --git a/src/include/gromacs/external/googletest/googlemock/include/gmock/gmock-actions.h b/src/include/gromacs/external/googletest/googlemock/include/gmock/gmock-actions.h
deleted file mode 100644 (file)
index 0046aaf..0000000
+++ /dev/null
@@ -1,1685 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// The ACTION* family of macros can be used in a namespace scope to
-// define custom actions easily.  The syntax:
-//
-//   ACTION(name) { statements; }
-//
-// will define an action with the given name that executes the
-// statements.  The value returned by the statements will be used as
-// the return value of the action.  Inside the statements, you can
-// refer to the K-th (0-based) argument of the mock function by
-// 'argK', and refer to its type by 'argK_type'.  For example:
-//
-//   ACTION(IncrementArg1) {
-//     arg1_type temp = arg1;
-//     return ++(*temp);
-//   }
-//
-// allows you to write
-//
-//   ...WillOnce(IncrementArg1());
-//
-// You can also refer to the entire argument tuple and its type by
-// 'args' and 'args_type', and refer to the mock function type and its
-// return type by 'function_type' and 'return_type'.
-//
-// Note that you don't need to specify the types of the mock function
-// arguments.  However rest assured that your code is still type-safe:
-// you'll get a compiler error if *arg1 doesn't support the ++
-// operator, or if the type of ++(*arg1) isn't compatible with the
-// mock function's return type, for example.
-//
-// Sometimes you'll want to parameterize the action.   For that you can use
-// another macro:
-//
-//   ACTION_P(name, param_name) { statements; }
-//
-// For example:
-//
-//   ACTION_P(Add, n) { return arg0 + n; }
-//
-// will allow you to write:
-//
-//   ...WillOnce(Add(5));
-//
-// Note that you don't need to provide the type of the parameter
-// either.  If you need to reference the type of a parameter named
-// 'foo', you can write 'foo_type'.  For example, in the body of
-// ACTION_P(Add, n) above, you can write 'n_type' to refer to the type
-// of 'n'.
-//
-// We also provide ACTION_P2, ACTION_P3, ..., up to ACTION_P10 to support
-// multi-parameter actions.
-//
-// For the purpose of typing, you can view
-//
-//   ACTION_Pk(Foo, p1, ..., pk) { ... }
-//
-// as shorthand for
-//
-//   template <typename p1_type, ..., typename pk_type>
-//   FooActionPk<p1_type, ..., pk_type> Foo(p1_type p1, ..., pk_type pk) { ... }
-//
-// In particular, you can provide the template type arguments
-// explicitly when invoking Foo(), as in Foo<long, bool>(5, false);
-// although usually you can rely on the compiler to infer the types
-// for you automatically.  You can assign the result of expression
-// Foo(p1, ..., pk) to a variable of type FooActionPk<p1_type, ...,
-// pk_type>.  This can be useful when composing actions.
-//
-// You can also overload actions with different numbers of parameters:
-//
-//   ACTION_P(Plus, a) { ... }
-//   ACTION_P2(Plus, a, b) { ... }
-//
-// While it's tempting to always use the ACTION* macros when defining
-// a new action, you should also consider implementing ActionInterface
-// or using MakePolymorphicAction() instead, especially if you need to
-// use the action a lot.  While these approaches require more work,
-// they give you more control on the types of the mock function
-// arguments and the action parameters, which in general leads to
-// better compiler error messages that pay off in the long run.  They
-// also allow overloading actions based on parameter types (as opposed
-// to just based on the number of parameters).
-//
-// CAVEAT:
-//
-// ACTION*() can only be used in a namespace scope as templates cannot be
-// declared inside of a local class.
-// Users can, however, define any local functors (e.g. a lambda) that
-// can be used as actions.
-//
-// MORE INFORMATION:
-//
-// To learn more about using these macros, please search for 'ACTION' on
-// https://github.com/google/googletest/blob/master/docs/gmock_cook_book.md
-
-#ifndef GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_ACTIONS_H_
-#define GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_ACTIONS_H_
-
-#ifndef _WIN32_WCE
-# include <errno.h>
-#endif
-
-#include <algorithm>
-#include <functional>
-#include <memory>
-#include <string>
-#include <tuple>
-#include <type_traits>
-#include <utility>
-
-#include "gmock/internal/gmock-internal-utils.h"
-#include "gmock/internal/gmock-port.h"
-#include "gmock/internal/gmock-pp.h"
-
-#ifdef _MSC_VER
-# pragma warning(push)
-# pragma warning(disable:4100)
-#endif
-
-namespace testing {
-
-// To implement an action Foo, define:
-//   1. a class FooAction that implements the ActionInterface interface, and
-//   2. a factory function that creates an Action object from a
-//      const FooAction*.
-//
-// The two-level delegation design follows that of Matcher, providing
-// consistency for extension developers.  It also eases ownership
-// management as Action objects can now be copied like plain values.
-
-namespace internal {
-
-// BuiltInDefaultValueGetter<T, true>::Get() returns a
-// default-constructed T value.  BuiltInDefaultValueGetter<T,
-// false>::Get() crashes with an error.
-//
-// This primary template is used when kDefaultConstructible is true.
-template <typename T, bool kDefaultConstructible>
-struct BuiltInDefaultValueGetter {
-  static T Get() { return T(); }
-};
-template <typename T>
-struct BuiltInDefaultValueGetter<T, false> {
-  static T Get() {
-    Assert(false, __FILE__, __LINE__,
-           "Default action undefined for the function return type.");
-    return internal::Invalid<T>();
-    // The above statement will never be reached, but is required in
-    // order for this function to compile.
-  }
-};
-
-// BuiltInDefaultValue<T>::Get() returns the "built-in" default value
-// for type T, which is NULL when T is a raw pointer type, 0 when T is
-// a numeric type, false when T is bool, or "" when T is string or
-// std::string.  In addition, in C++11 and above, it turns a
-// default-constructed T value if T is default constructible.  For any
-// other type T, the built-in default T value is undefined, and the
-// function will abort the process.
-template <typename T>
-class BuiltInDefaultValue {
- public:
-  // This function returns true if and only if type T has a built-in default
-  // value.
-  static bool Exists() {
-    return ::std::is_default_constructible<T>::value;
-  }
-
-  static T Get() {
-    return BuiltInDefaultValueGetter<
-        T, ::std::is_default_constructible<T>::value>::Get();
-  }
-};
-
-// This partial specialization says that we use the same built-in
-// default value for T and const T.
-template <typename T>
-class BuiltInDefaultValue<const T> {
- public:
-  static bool Exists() { return BuiltInDefaultValue<T>::Exists(); }
-  static T Get() { return BuiltInDefaultValue<T>::Get(); }
-};
-
-// This partial specialization defines the default values for pointer
-// types.
-template <typename T>
-class BuiltInDefaultValue<T*> {
- public:
-  static bool Exists() { return true; }
-  static T* Get() { return nullptr; }
-};
-
-// The following specializations define the default values for
-// specific types we care about.
-#define GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(type, value) \
-  template <> \
-  class BuiltInDefaultValue<type> { \
-   public: \
-    static bool Exists() { return true; } \
-    static type Get() { return value; } \
-  }
-
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(void, );  // NOLINT
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(::std::string, "");
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(bool, false);
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned char, '\0');
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed char, '\0');
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(char, '\0');
-
-// There's no need for a default action for signed wchar_t, as that
-// type is the same as wchar_t for gcc, and invalid for MSVC.
-//
-// There's also no need for a default action for unsigned wchar_t, as
-// that type is the same as unsigned int for gcc, and invalid for
-// MSVC.
-#if GMOCK_WCHAR_T_IS_NATIVE_
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(wchar_t, 0U);  // NOLINT
-#endif
-
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned short, 0U);  // NOLINT
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed short, 0);     // NOLINT
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned int, 0U);
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed int, 0);
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned long, 0UL);  // NOLINT
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed long, 0L);     // NOLINT
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned long long, 0);  // NOLINT
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed long long, 0);  // NOLINT
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(float, 0);
-GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(double, 0);
-
-#undef GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_
-
-// Simple two-arg form of std::disjunction.
-template <typename P, typename Q>
-using disjunction = typename ::std::conditional<P::value, P, Q>::type;
-
-}  // namespace internal
-
-// When an unexpected function call is encountered, Google Mock will
-// let it return a default value if the user has specified one for its
-// return type, or if the return type has a built-in default value;
-// otherwise Google Mock won't know what value to return and will have
-// to abort the process.
-//
-// The DefaultValue<T> class allows a user to specify the
-// default value for a type T that is both copyable and publicly
-// destructible (i.e. anything that can be used as a function return
-// type).  The usage is:
-//
-//   // Sets the default value for type T to be foo.
-//   DefaultValue<T>::Set(foo);
-template <typename T>
-class DefaultValue {
- public:
-  // Sets the default value for type T; requires T to be
-  // copy-constructable and have a public destructor.
-  static void Set(T x) {
-    delete producer_;
-    producer_ = new FixedValueProducer(x);
-  }
-
-  // Provides a factory function to be called to generate the default value.
-  // This method can be used even if T is only move-constructible, but it is not
-  // limited to that case.
-  typedef T (*FactoryFunction)();
-  static void SetFactory(FactoryFunction factory) {
-    delete producer_;
-    producer_ = new FactoryValueProducer(factory);
-  }
-
-  // Unsets the default value for type T.
-  static void Clear() {
-    delete producer_;
-    producer_ = nullptr;
-  }
-
-  // Returns true if and only if the user has set the default value for type T.
-  static bool IsSet() { return producer_ != nullptr; }
-
-  // Returns true if T has a default return value set by the user or there
-  // exists a built-in default value.
-  static bool Exists() {
-    return IsSet() || internal::BuiltInDefaultValue<T>::Exists();
-  }
-
-  // Returns the default value for type T if the user has set one;
-  // otherwise returns the built-in default value. Requires that Exists()
-  // is true, which ensures that the return value is well-defined.
-  static T Get() {
-    return producer_ == nullptr ? internal::BuiltInDefaultValue<T>::Get()
-                                : producer_->Produce();
-  }
-
- private:
-  class ValueProducer {
-   public:
-    virtual ~ValueProducer() {}
-    virtual T Produce() = 0;
-  };
-
-  class FixedValueProducer : public ValueProducer {
-   public:
-    explicit FixedValueProducer(T value) : value_(value) {}
-    T Produce() override { return value_; }
-
-   private:
-    const T value_;
-    GTEST_DISALLOW_COPY_AND_ASSIGN_(FixedValueProducer);
-  };
-
-  class FactoryValueProducer : public ValueProducer {
-   public:
-    explicit FactoryValueProducer(FactoryFunction factory)
-        : factory_(factory) {}
-    T Produce() override { return factory_(); }
-
-   private:
-    const FactoryFunction factory_;
-    GTEST_DISALLOW_COPY_AND_ASSIGN_(FactoryValueProducer);
-  };
-
-  static ValueProducer* producer_;
-};
-
-// This partial specialization allows a user to set default values for
-// reference types.
-template <typename T>
-class DefaultValue<T&> {
- public:
-  // Sets the default value for type T&.
-  static void Set(T& x) {  // NOLINT
-    address_ = &x;
-  }
-
-  // Unsets the default value for type T&.
-  static void Clear() { address_ = nullptr; }
-
-  // Returns true if and only if the user has set the default value for type T&.
-  static bool IsSet() { return address_ != nullptr; }
-
-  // Returns true if T has a default return value set by the user or there
-  // exists a built-in default value.
-  static bool Exists() {
-    return IsSet() || internal::BuiltInDefaultValue<T&>::Exists();
-  }
-
-  // Returns the default value for type T& if the user has set one;
-  // otherwise returns the built-in default value if there is one;
-  // otherwise aborts the process.
-  static T& Get() {
-    return address_ == nullptr ? internal::BuiltInDefaultValue<T&>::Get()
-                               : *address_;
-  }
-
- private:
-  static T* address_;
-};
-
-// This specialization allows DefaultValue<void>::Get() to
-// compile.
-template <>
-class DefaultValue<void> {
- public:
-  static bool Exists() { return true; }
-  static void Get() {}
-};
-
-// Points to the user-set default value for type T.
-template <typename T>
-typename DefaultValue<T>::ValueProducer* DefaultValue<T>::producer_ = nullptr;
-
-// Points to the user-set default value for type T&.
-template <typename T>
-T* DefaultValue<T&>::address_ = nullptr;
-
-// Implement this interface to define an action for function type F.
-template <typename F>
-class ActionInterface {
- public:
-  typedef typename internal::Function<F>::Result Result;
-  typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-
-  ActionInterface() {}
-  virtual ~ActionInterface() {}
-
-  // Performs the action.  This method is not const, as in general an
-  // action can have side effects and be stateful.  For example, a
-  // get-the-next-element-from-the-collection action will need to
-  // remember the current element.
-  virtual Result Perform(const ArgumentTuple& args) = 0;
-
- private:
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(ActionInterface);
-};
-
-// An Action<F> is a copyable and IMMUTABLE (except by assignment)
-// object that represents an action to be taken when a mock function
-// of type F is called.  The implementation of Action<T> is just a
-// std::shared_ptr to const ActionInterface<T>. Don't inherit from Action!
-// You can view an object implementing ActionInterface<F> as a
-// concrete action (including its current state), and an Action<F>
-// object as a handle to it.
-template <typename F>
-class Action {
-  // Adapter class to allow constructing Action from a legacy ActionInterface.
-  // New code should create Actions from functors instead.
-  struct ActionAdapter {
-    // Adapter must be copyable to satisfy std::function requirements.
-    ::std::shared_ptr<ActionInterface<F>> impl_;
-
-    template <typename... Args>
-    typename internal::Function<F>::Result operator()(Args&&... args) {
-      return impl_->Perform(
-          ::std::forward_as_tuple(::std::forward<Args>(args)...));
-    }
-  };
-
-  template <typename G>
-  using IsCompatibleFunctor = std::is_constructible<std::function<F>, G>;
-
- public:
-  typedef typename internal::Function<F>::Result Result;
-  typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-
-  // Constructs a null Action.  Needed for storing Action objects in
-  // STL containers.
-  Action() {}
-
-  // Construct an Action from a specified callable.
-  // This cannot take std::function directly, because then Action would not be
-  // directly constructible from lambda (it would require two conversions).
-  template <
-      typename G,
-      typename = typename std::enable_if<internal::disjunction<
-          IsCompatibleFunctor<G>, std::is_constructible<std::function<Result()>,
-                                                        G>>::value>::type>
-  Action(G&& fun) {  // NOLINT
-    Init(::std::forward<G>(fun), IsCompatibleFunctor<G>());
-  }
-
-  // Constructs an Action from its implementation.
-  explicit Action(ActionInterface<F>* impl)
-      : fun_(ActionAdapter{::std::shared_ptr<ActionInterface<F>>(impl)}) {}
-
-  // This constructor allows us to turn an Action<Func> object into an
-  // Action<F>, as long as F's arguments can be implicitly converted
-  // to Func's and Func's return type can be implicitly converted to F's.
-  template <typename Func>
-  explicit Action(const Action<Func>& action) : fun_(action.fun_) {}
-
-  // Returns true if and only if this is the DoDefault() action.
-  bool IsDoDefault() const { return fun_ == nullptr; }
-
-  // Performs the action.  Note that this method is const even though
-  // the corresponding method in ActionInterface is not.  The reason
-  // is that a const Action<F> means that it cannot be re-bound to
-  // another concrete action, not that the concrete action it binds to
-  // cannot change state.  (Think of the difference between a const
-  // pointer and a pointer to const.)
-  Result Perform(ArgumentTuple args) const {
-    if (IsDoDefault()) {
-      internal::IllegalDoDefault(__FILE__, __LINE__);
-    }
-    return internal::Apply(fun_, ::std::move(args));
-  }
-
- private:
-  template <typename G>
-  friend class Action;
-
-  template <typename G>
-  void Init(G&& g, ::std::true_type) {
-    fun_ = ::std::forward<G>(g);
-  }
-
-  template <typename G>
-  void Init(G&& g, ::std::false_type) {
-    fun_ = IgnoreArgs<typename ::std::decay<G>::type>{::std::forward<G>(g)};
-  }
-
-  template <typename FunctionImpl>
-  struct IgnoreArgs {
-    template <typename... Args>
-    Result operator()(const Args&...) const {
-      return function_impl();
-    }
-
-    FunctionImpl function_impl;
-  };
-
-  // fun_ is an empty function if and only if this is the DoDefault() action.
-  ::std::function<F> fun_;
-};
-
-// The PolymorphicAction class template makes it easy to implement a
-// polymorphic action (i.e. an action that can be used in mock
-// functions of than one type, e.g. Return()).
-//
-// To define a polymorphic action, a user first provides a COPYABLE
-// implementation class that has a Perform() method template:
-//
-//   class FooAction {
-//    public:
-//     template <typename Result, typename ArgumentTuple>
-//     Result Perform(const ArgumentTuple& args) const {
-//       // Processes the arguments and returns a result, using
-//       // std::get<N>(args) to get the N-th (0-based) argument in the tuple.
-//     }
-//     ...
-//   };
-//
-// Then the user creates the polymorphic action using
-// MakePolymorphicAction(object) where object has type FooAction.  See
-// the definition of Return(void) and SetArgumentPointee<N>(value) for
-// complete examples.
-template <typename Impl>
-class PolymorphicAction {
- public:
-  explicit PolymorphicAction(const Impl& impl) : impl_(impl) {}
-
-  template <typename F>
-  operator Action<F>() const {
-    return Action<F>(new MonomorphicImpl<F>(impl_));
-  }
-
- private:
-  template <typename F>
-  class MonomorphicImpl : public ActionInterface<F> {
-   public:
-    typedef typename internal::Function<F>::Result Result;
-    typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-
-    explicit MonomorphicImpl(const Impl& impl) : impl_(impl) {}
-
-    Result Perform(const ArgumentTuple& args) override {
-      return impl_.template Perform<Result>(args);
-    }
-
-   private:
-    Impl impl_;
-  };
-
-  Impl impl_;
-};
-
-// Creates an Action from its implementation and returns it.  The
-// created Action object owns the implementation.
-template <typename F>
-Action<F> MakeAction(ActionInterface<F>* impl) {
-  return Action<F>(impl);
-}
-
-// Creates a polymorphic action from its implementation.  This is
-// easier to use than the PolymorphicAction<Impl> constructor as it
-// doesn't require you to explicitly write the template argument, e.g.
-//
-//   MakePolymorphicAction(foo);
-// vs
-//   PolymorphicAction<TypeOfFoo>(foo);
-template <typename Impl>
-inline PolymorphicAction<Impl> MakePolymorphicAction(const Impl& impl) {
-  return PolymorphicAction<Impl>(impl);
-}
-
-namespace internal {
-
-// Helper struct to specialize ReturnAction to execute a move instead of a copy
-// on return. Useful for move-only types, but could be used on any type.
-template <typename T>
-struct ByMoveWrapper {
-  explicit ByMoveWrapper(T value) : payload(std::move(value)) {}
-  T payload;
-};
-
-// Implements the polymorphic Return(x) action, which can be used in
-// any function that returns the type of x, regardless of the argument
-// types.
-//
-// Note: The value passed into Return must be converted into
-// Function<F>::Result when this action is cast to Action<F> rather than
-// when that action is performed. This is important in scenarios like
-//
-// MOCK_METHOD1(Method, T(U));
-// ...
-// {
-//   Foo foo;
-//   X x(&foo);
-//   EXPECT_CALL(mock, Method(_)).WillOnce(Return(x));
-// }
-//
-// In the example above the variable x holds reference to foo which leaves
-// scope and gets destroyed.  If copying X just copies a reference to foo,
-// that copy will be left with a hanging reference.  If conversion to T
-// makes a copy of foo, the above code is safe. To support that scenario, we
-// need to make sure that the type conversion happens inside the EXPECT_CALL
-// statement, and conversion of the result of Return to Action<T(U)> is a
-// good place for that.
-//
-// The real life example of the above scenario happens when an invocation
-// of gtl::Container() is passed into Return.
-//
-template <typename R>
-class ReturnAction {
- public:
-  // Constructs a ReturnAction object from the value to be returned.
-  // 'value' is passed by value instead of by const reference in order
-  // to allow Return("string literal") to compile.
-  explicit ReturnAction(R value) : value_(new R(std::move(value))) {}
-
-  // This template type conversion operator allows Return(x) to be
-  // used in ANY function that returns x's type.
-  template <typename F>
-  operator Action<F>() const {  // NOLINT
-    // Assert statement belongs here because this is the best place to verify
-    // conditions on F. It produces the clearest error messages
-    // in most compilers.
-    // Impl really belongs in this scope as a local class but can't
-    // because MSVC produces duplicate symbols in different translation units
-    // in this case. Until MS fixes that bug we put Impl into the class scope
-    // and put the typedef both here (for use in assert statement) and
-    // in the Impl class. But both definitions must be the same.
-    typedef typename Function<F>::Result Result;
-    GTEST_COMPILE_ASSERT_(
-        !std::is_reference<Result>::value,
-        use_ReturnRef_instead_of_Return_to_return_a_reference);
-    static_assert(!std::is_void<Result>::value,
-                  "Can't use Return() on an action expected to return `void`.");
-    return Action<F>(new Impl<R, F>(value_));
-  }
-
- private:
-  // Implements the Return(x) action for a particular function type F.
-  template <typename R_, typename F>
-  class Impl : public ActionInterface<F> {
-   public:
-    typedef typename Function<F>::Result Result;
-    typedef typename Function<F>::ArgumentTuple ArgumentTuple;
-
-    // The implicit cast is necessary when Result has more than one
-    // single-argument constructor (e.g. Result is std::vector<int>) and R
-    // has a type conversion operator template.  In that case, value_(value)
-    // won't compile as the compiler doesn't known which constructor of
-    // Result to call.  ImplicitCast_ forces the compiler to convert R to
-    // Result without considering explicit constructors, thus resolving the
-    // ambiguity. value_ is then initialized using its copy constructor.
-    explicit Impl(const std::shared_ptr<R>& value)
-        : value_before_cast_(*value),
-          value_(ImplicitCast_<Result>(value_before_cast_)) {}
-
-    Result Perform(const ArgumentTuple&) override { return value_; }
-
-   private:
-    GTEST_COMPILE_ASSERT_(!std::is_reference<Result>::value,
-                          Result_cannot_be_a_reference_type);
-    // We save the value before casting just in case it is being cast to a
-    // wrapper type.
-    R value_before_cast_;
-    Result value_;
-
-    GTEST_DISALLOW_COPY_AND_ASSIGN_(Impl);
-  };
-
-  // Partially specialize for ByMoveWrapper. This version of ReturnAction will
-  // move its contents instead.
-  template <typename R_, typename F>
-  class Impl<ByMoveWrapper<R_>, F> : public ActionInterface<F> {
-   public:
-    typedef typename Function<F>::Result Result;
-    typedef typename Function<F>::ArgumentTuple ArgumentTuple;
-
-    explicit Impl(const std::shared_ptr<R>& wrapper)
-        : performed_(false), wrapper_(wrapper) {}
-
-    Result Perform(const ArgumentTuple&) override {
-      GTEST_CHECK_(!performed_)
-          << "A ByMove() action should only be performed once.";
-      performed_ = true;
-      return std::move(wrapper_->payload);
-    }
-
-   private:
-    bool performed_;
-    const std::shared_ptr<R> wrapper_;
-  };
-
-  const std::shared_ptr<R> value_;
-};
-
-// Implements the ReturnNull() action.
-class ReturnNullAction {
- public:
-  // Allows ReturnNull() to be used in any pointer-returning function. In C++11
-  // this is enforced by returning nullptr, and in non-C++11 by asserting a
-  // pointer type on compile time.
-  template <typename Result, typename ArgumentTuple>
-  static Result Perform(const ArgumentTuple&) {
-    return nullptr;
-  }
-};
-
-// Implements the Return() action.
-class ReturnVoidAction {
- public:
-  // Allows Return() to be used in any void-returning function.
-  template <typename Result, typename ArgumentTuple>
-  static void Perform(const ArgumentTuple&) {
-    static_assert(std::is_void<Result>::value, "Result should be void.");
-  }
-};
-
-// Implements the polymorphic ReturnRef(x) action, which can be used
-// in any function that returns a reference to the type of x,
-// regardless of the argument types.
-template <typename T>
-class ReturnRefAction {
- public:
-  // Constructs a ReturnRefAction object from the reference to be returned.
-  explicit ReturnRefAction(T& ref) : ref_(ref) {}  // NOLINT
-
-  // This template type conversion operator allows ReturnRef(x) to be
-  // used in ANY function that returns a reference to x's type.
-  template <typename F>
-  operator Action<F>() const {
-    typedef typename Function<F>::Result Result;
-    // Asserts that the function return type is a reference.  This
-    // catches the user error of using ReturnRef(x) when Return(x)
-    // should be used, and generates some helpful error message.
-    GTEST_COMPILE_ASSERT_(std::is_reference<Result>::value,
-                          use_Return_instead_of_ReturnRef_to_return_a_value);
-    return Action<F>(new Impl<F>(ref_));
-  }
-
- private:
-  // Implements the ReturnRef(x) action for a particular function type F.
-  template <typename F>
-  class Impl : public ActionInterface<F> {
-   public:
-    typedef typename Function<F>::Result Result;
-    typedef typename Function<F>::ArgumentTuple ArgumentTuple;
-
-    explicit Impl(T& ref) : ref_(ref) {}  // NOLINT
-
-    Result Perform(const ArgumentTuple&) override { return ref_; }
-
-   private:
-    T& ref_;
-  };
-
-  T& ref_;
-};
-
-// Implements the polymorphic ReturnRefOfCopy(x) action, which can be
-// used in any function that returns a reference to the type of x,
-// regardless of the argument types.
-template <typename T>
-class ReturnRefOfCopyAction {
- public:
-  // Constructs a ReturnRefOfCopyAction object from the reference to
-  // be returned.
-  explicit ReturnRefOfCopyAction(const T& value) : value_(value) {}  // NOLINT
-
-  // This template type conversion operator allows ReturnRefOfCopy(x) to be
-  // used in ANY function that returns a reference to x's type.
-  template <typename F>
-  operator Action<F>() const {
-    typedef typename Function<F>::Result Result;
-    // Asserts that the function return type is a reference.  This
-    // catches the user error of using ReturnRefOfCopy(x) when Return(x)
-    // should be used, and generates some helpful error message.
-    GTEST_COMPILE_ASSERT_(
-        std::is_reference<Result>::value,
-        use_Return_instead_of_ReturnRefOfCopy_to_return_a_value);
-    return Action<F>(new Impl<F>(value_));
-  }
-
- private:
-  // Implements the ReturnRefOfCopy(x) action for a particular function type F.
-  template <typename F>
-  class Impl : public ActionInterface<F> {
-   public:
-    typedef typename Function<F>::Result Result;
-    typedef typename Function<F>::ArgumentTuple ArgumentTuple;
-
-    explicit Impl(const T& value) : value_(value) {}  // NOLINT
-
-    Result Perform(const ArgumentTuple&) override { return value_; }
-
-   private:
-    T value_;
-  };
-
-  const T value_;
-};
-
-// Implements the polymorphic ReturnRoundRobin(v) action, which can be
-// used in any function that returns the element_type of v.
-template <typename T>
-class ReturnRoundRobinAction {
- public:
-  explicit ReturnRoundRobinAction(std::vector<T> values) {
-    GTEST_CHECK_(!values.empty())
-        << "ReturnRoundRobin requires at least one element.";
-    state_->values = std::move(values);
-  }
-
-  template <typename... Args>
-  T operator()(Args&&...) const {
-     return state_->Next();
-  }
-
- private:
-  struct State {
-    T Next() {
-      T ret_val = values[i++];
-      if (i == values.size()) i = 0;
-      return ret_val;
-    }
-
-    std::vector<T> values;
-    size_t i = 0;
-  };
-  std::shared_ptr<State> state_ = std::make_shared<State>();
-};
-
-// Implements the polymorphic DoDefault() action.
-class DoDefaultAction {
- public:
-  // This template type conversion operator allows DoDefault() to be
-  // used in any function.
-  template <typename F>
-  operator Action<F>() const { return Action<F>(); }  // NOLINT
-};
-
-// Implements the Assign action to set a given pointer referent to a
-// particular value.
-template <typename T1, typename T2>
-class AssignAction {
- public:
-  AssignAction(T1* ptr, T2 value) : ptr_(ptr), value_(value) {}
-
-  template <typename Result, typename ArgumentTuple>
-  void Perform(const ArgumentTuple& /* args */) const {
-    *ptr_ = value_;
-  }
-
- private:
-  T1* const ptr_;
-  const T2 value_;
-};
-
-#if !GTEST_OS_WINDOWS_MOBILE
-
-// Implements the SetErrnoAndReturn action to simulate return from
-// various system calls and libc functions.
-template <typename T>
-class SetErrnoAndReturnAction {
- public:
-  SetErrnoAndReturnAction(int errno_value, T result)
-      : errno_(errno_value),
-        result_(result) {}
-  template <typename Result, typename ArgumentTuple>
-  Result Perform(const ArgumentTuple& /* args */) const {
-    errno = errno_;
-    return result_;
-  }
-
- private:
-  const int errno_;
-  const T result_;
-};
-
-#endif  // !GTEST_OS_WINDOWS_MOBILE
-
-// Implements the SetArgumentPointee<N>(x) action for any function
-// whose N-th argument (0-based) is a pointer to x's type.
-template <size_t N, typename A, typename = void>
-struct SetArgumentPointeeAction {
-  A value;
-
-  template <typename... Args>
-  void operator()(const Args&... args) const {
-    *::std::get<N>(std::tie(args...)) = value;
-  }
-};
-
-// Implements the Invoke(object_ptr, &Class::Method) action.
-template <class Class, typename MethodPtr>
-struct InvokeMethodAction {
-  Class* const obj_ptr;
-  const MethodPtr method_ptr;
-
-  template <typename... Args>
-  auto operator()(Args&&... args) const
-      -> decltype((obj_ptr->*method_ptr)(std::forward<Args>(args)...)) {
-    return (obj_ptr->*method_ptr)(std::forward<Args>(args)...);
-  }
-};
-
-// Implements the InvokeWithoutArgs(f) action.  The template argument
-// FunctionImpl is the implementation type of f, which can be either a
-// function pointer or a functor.  InvokeWithoutArgs(f) can be used as an
-// Action<F> as long as f's type is compatible with F.
-template <typename FunctionImpl>
-struct InvokeWithoutArgsAction {
-  FunctionImpl function_impl;
-
-  // Allows InvokeWithoutArgs(f) to be used as any action whose type is
-  // compatible with f.
-  template <typename... Args>
-  auto operator()(const Args&...) -> decltype(function_impl()) {
-    return function_impl();
-  }
-};
-
-// Implements the InvokeWithoutArgs(object_ptr, &Class::Method) action.
-template <class Class, typename MethodPtr>
-struct InvokeMethodWithoutArgsAction {
-  Class* const obj_ptr;
-  const MethodPtr method_ptr;
-
-  using ReturnType =
-      decltype((std::declval<Class*>()->*std::declval<MethodPtr>())());
-
-  template <typename... Args>
-  ReturnType operator()(const Args&...) const {
-    return (obj_ptr->*method_ptr)();
-  }
-};
-
-// Implements the IgnoreResult(action) action.
-template <typename A>
-class IgnoreResultAction {
- public:
-  explicit IgnoreResultAction(const A& action) : action_(action) {}
-
-  template <typename F>
-  operator Action<F>() const {
-    // Assert statement belongs here because this is the best place to verify
-    // conditions on F. It produces the clearest error messages
-    // in most compilers.
-    // Impl really belongs in this scope as a local class but can't
-    // because MSVC produces duplicate symbols in different translation units
-    // in this case. Until MS fixes that bug we put Impl into the class scope
-    // and put the typedef both here (for use in assert statement) and
-    // in the Impl class. But both definitions must be the same.
-    typedef typename internal::Function<F>::Result Result;
-
-    // Asserts at compile time that F returns void.
-    static_assert(std::is_void<Result>::value, "Result type should be void.");
-
-    return Action<F>(new Impl<F>(action_));
-  }
-
- private:
-  template <typename F>
-  class Impl : public ActionInterface<F> {
-   public:
-    typedef typename internal::Function<F>::Result Result;
-    typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-
-    explicit Impl(const A& action) : action_(action) {}
-
-    void Perform(const ArgumentTuple& args) override {
-      // Performs the action and ignores its result.
-      action_.Perform(args);
-    }
-
-   private:
-    // Type OriginalFunction is the same as F except that its return
-    // type is IgnoredValue.
-    typedef typename internal::Function<F>::MakeResultIgnoredValue
-        OriginalFunction;
-
-    const Action<OriginalFunction> action_;
-  };
-
-  const A action_;
-};
-
-template <typename InnerAction, size_t... I>
-struct WithArgsAction {
-  InnerAction action;
-
-  // The inner action could be anything convertible to Action<X>.
-  // We use the conversion operator to detect the signature of the inner Action.
-  template <typename R, typename... Args>
-  operator Action<R(Args...)>() const {  // NOLINT
-    using TupleType = std::tuple<Args...>;
-    Action<R(typename std::tuple_element<I, TupleType>::type...)>
-        converted(action);
-
-    return [converted](Args... args) -> R {
-      return converted.Perform(std::forward_as_tuple(
-        std::get<I>(std::forward_as_tuple(std::forward<Args>(args)...))...));
-    };
-  }
-};
-
-template <typename... Actions>
-struct DoAllAction {
- private:
-  template <typename T>
-  using NonFinalType =
-      typename std::conditional<std::is_scalar<T>::value, T, const T&>::type;
-
-  template <typename ActionT, size_t... I>
-  std::vector<ActionT> Convert(IndexSequence<I...>) const {
-    return {ActionT(std::get<I>(actions))...};
-  }
-
- public:
-  std::tuple<Actions...> actions;
-
-  template <typename R, typename... Args>
-  operator Action<R(Args...)>() const {  // NOLINT
-    struct Op {
-      std::vector<Action<void(NonFinalType<Args>...)>> converted;
-      Action<R(Args...)> last;
-      R operator()(Args... args) const {
-        auto tuple_args = std::forward_as_tuple(std::forward<Args>(args)...);
-        for (auto& a : converted) {
-          a.Perform(tuple_args);
-        }
-        return last.Perform(std::move(tuple_args));
-      }
-    };
-    return Op{Convert<Action<void(NonFinalType<Args>...)>>(
-                  MakeIndexSequence<sizeof...(Actions) - 1>()),
-              std::get<sizeof...(Actions) - 1>(actions)};
-  }
-};
-
-template <typename T, typename... Params>
-struct ReturnNewAction {
-  T* operator()() const {
-    return internal::Apply(
-        [](const Params&... unpacked_params) {
-          return new T(unpacked_params...);
-        },
-        params);
-  }
-  std::tuple<Params...> params;
-};
-
-template <size_t k>
-struct ReturnArgAction {
-  template <typename... Args>
-  auto operator()(const Args&... args) const ->
-      typename std::tuple_element<k, std::tuple<Args...>>::type {
-    return std::get<k>(std::tie(args...));
-  }
-};
-
-template <size_t k, typename Ptr>
-struct SaveArgAction {
-  Ptr pointer;
-
-  template <typename... Args>
-  void operator()(const Args&... args) const {
-    *pointer = std::get<k>(std::tie(args...));
-  }
-};
-
-template <size_t k, typename Ptr>
-struct SaveArgPointeeAction {
-  Ptr pointer;
-
-  template <typename... Args>
-  void operator()(const Args&... args) const {
-    *pointer = *std::get<k>(std::tie(args...));
-  }
-};
-
-template <size_t k, typename T>
-struct SetArgRefereeAction {
-  T value;
-
-  template <typename... Args>
-  void operator()(Args&&... args) const {
-    using argk_type =
-        typename ::std::tuple_element<k, std::tuple<Args...>>::type;
-    static_assert(std::is_lvalue_reference<argk_type>::value,
-                  "Argument must be a reference type.");
-    std::get<k>(std::tie(args...)) = value;
-  }
-};
-
-template <size_t k, typename I1, typename I2>
-struct SetArrayArgumentAction {
-  I1 first;
-  I2 last;
-
-  template <typename... Args>
-  void operator()(const Args&... args) const {
-    auto value = std::get<k>(std::tie(args...));
-    for (auto it = first; it != last; ++it, (void)++value) {
-      *value = *it;
-    }
-  }
-};
-
-template <size_t k>
-struct DeleteArgAction {
-  template <typename... Args>
-  void operator()(const Args&... args) const {
-    delete std::get<k>(std::tie(args...));
-  }
-};
-
-template <typename Ptr>
-struct ReturnPointeeAction {
-  Ptr pointer;
-  template <typename... Args>
-  auto operator()(const Args&...) const -> decltype(*pointer) {
-    return *pointer;
-  }
-};
-
-#if GTEST_HAS_EXCEPTIONS
-template <typename T>
-struct ThrowAction {
-  T exception;
-  // We use a conversion operator to adapt to any return type.
-  template <typename R, typename... Args>
-  operator Action<R(Args...)>() const {  // NOLINT
-    T copy = exception;
-    return [copy](Args...) -> R { throw copy; };
-  }
-};
-#endif  // GTEST_HAS_EXCEPTIONS
-
-}  // namespace internal
-
-// An Unused object can be implicitly constructed from ANY value.
-// This is handy when defining actions that ignore some or all of the
-// mock function arguments.  For example, given
-//
-//   MOCK_METHOD3(Foo, double(const string& label, double x, double y));
-//   MOCK_METHOD3(Bar, double(int index, double x, double y));
-//
-// instead of
-//
-//   double DistanceToOriginWithLabel(const string& label, double x, double y) {
-//     return sqrt(x*x + y*y);
-//   }
-//   double DistanceToOriginWithIndex(int index, double x, double y) {
-//     return sqrt(x*x + y*y);
-//   }
-//   ...
-//   EXPECT_CALL(mock, Foo("abc", _, _))
-//       .WillOnce(Invoke(DistanceToOriginWithLabel));
-//   EXPECT_CALL(mock, Bar(5, _, _))
-//       .WillOnce(Invoke(DistanceToOriginWithIndex));
-//
-// you could write
-//
-//   // We can declare any uninteresting argument as Unused.
-//   double DistanceToOrigin(Unused, double x, double y) {
-//     return sqrt(x*x + y*y);
-//   }
-//   ...
-//   EXPECT_CALL(mock, Foo("abc", _, _)).WillOnce(Invoke(DistanceToOrigin));
-//   EXPECT_CALL(mock, Bar(5, _, _)).WillOnce(Invoke(DistanceToOrigin));
-typedef internal::IgnoredValue Unused;
-
-// Creates an action that does actions a1, a2, ..., sequentially in
-// each invocation. All but the last action will have a readonly view of the
-// arguments.
-template <typename... Action>
-internal::DoAllAction<typename std::decay<Action>::type...> DoAll(
-    Action&&... action) {
-  return {std::forward_as_tuple(std::forward<Action>(action)...)};
-}
-
-// WithArg<k>(an_action) creates an action that passes the k-th
-// (0-based) argument of the mock function to an_action and performs
-// it.  It adapts an action accepting one argument to one that accepts
-// multiple arguments.  For convenience, we also provide
-// WithArgs<k>(an_action) (defined below) as a synonym.
-template <size_t k, typename InnerAction>
-internal::WithArgsAction<typename std::decay<InnerAction>::type, k>
-WithArg(InnerAction&& action) {
-  return {std::forward<InnerAction>(action)};
-}
-
-// WithArgs<N1, N2, ..., Nk>(an_action) creates an action that passes
-// the selected arguments of the mock function to an_action and
-// performs it.  It serves as an adaptor between actions with
-// different argument lists.
-template <size_t k, size_t... ks, typename InnerAction>
-internal::WithArgsAction<typename std::decay<InnerAction>::type, k, ks...>
-WithArgs(InnerAction&& action) {
-  return {std::forward<InnerAction>(action)};
-}
-
-// WithoutArgs(inner_action) can be used in a mock function with a
-// non-empty argument list to perform inner_action, which takes no
-// argument.  In other words, it adapts an action accepting no
-// argument to one that accepts (and ignores) arguments.
-template <typename InnerAction>
-internal::WithArgsAction<typename std::decay<InnerAction>::type>
-WithoutArgs(InnerAction&& action) {
-  return {std::forward<InnerAction>(action)};
-}
-
-// Creates an action that returns 'value'.  'value' is passed by value
-// instead of const reference - otherwise Return("string literal")
-// will trigger a compiler error about using array as initializer.
-template <typename R>
-internal::ReturnAction<R> Return(R value) {
-  return internal::ReturnAction<R>(std::move(value));
-}
-
-// Creates an action that returns NULL.
-inline PolymorphicAction<internal::ReturnNullAction> ReturnNull() {
-  return MakePolymorphicAction(internal::ReturnNullAction());
-}
-
-// Creates an action that returns from a void function.
-inline PolymorphicAction<internal::ReturnVoidAction> Return() {
-  return MakePolymorphicAction(internal::ReturnVoidAction());
-}
-
-// Creates an action that returns the reference to a variable.
-template <typename R>
-inline internal::ReturnRefAction<R> ReturnRef(R& x) {  // NOLINT
-  return internal::ReturnRefAction<R>(x);
-}
-
-// Prevent using ReturnRef on reference to temporary.
-template <typename R, R* = nullptr>
-internal::ReturnRefAction<R> ReturnRef(R&&) = delete;
-
-// Creates an action that returns the reference to a copy of the
-// argument.  The copy is created when the action is constructed and
-// lives as long as the action.
-template <typename R>
-inline internal::ReturnRefOfCopyAction<R> ReturnRefOfCopy(const R& x) {
-  return internal::ReturnRefOfCopyAction<R>(x);
-}
-
-// Modifies the parent action (a Return() action) to perform a move of the
-// argument instead of a copy.
-// Return(ByMove()) actions can only be executed once and will assert this
-// invariant.
-template <typename R>
-internal::ByMoveWrapper<R> ByMove(R x) {
-  return internal::ByMoveWrapper<R>(std::move(x));
-}
-
-// Creates an action that returns an element of `vals`. Calling this action will
-// repeatedly return the next value from `vals` until it reaches the end and
-// will restart from the beginning.
-template <typename T>
-internal::ReturnRoundRobinAction<T> ReturnRoundRobin(std::vector<T> vals) {
-  return internal::ReturnRoundRobinAction<T>(std::move(vals));
-}
-
-// Creates an action that returns an element of `vals`. Calling this action will
-// repeatedly return the next value from `vals` until it reaches the end and
-// will restart from the beginning.
-template <typename T>
-internal::ReturnRoundRobinAction<T> ReturnRoundRobin(
-    std::initializer_list<T> vals) {
-  return internal::ReturnRoundRobinAction<T>(std::vector<T>(vals));
-}
-
-// Creates an action that does the default action for the give mock function.
-inline internal::DoDefaultAction DoDefault() {
-  return internal::DoDefaultAction();
-}
-
-// Creates an action that sets the variable pointed by the N-th
-// (0-based) function argument to 'value'.
-template <size_t N, typename T>
-internal::SetArgumentPointeeAction<N, T> SetArgPointee(T value) {
-  return {std::move(value)};
-}
-
-// The following version is DEPRECATED.
-template <size_t N, typename T>
-internal::SetArgumentPointeeAction<N, T> SetArgumentPointee(T value) {
-  return {std::move(value)};
-}
-
-// Creates an action that sets a pointer referent to a given value.
-template <typename T1, typename T2>
-PolymorphicAction<internal::AssignAction<T1, T2> > Assign(T1* ptr, T2 val) {
-  return MakePolymorphicAction(internal::AssignAction<T1, T2>(ptr, val));
-}
-
-#if !GTEST_OS_WINDOWS_MOBILE
-
-// Creates an action that sets errno and returns the appropriate error.
-template <typename T>
-PolymorphicAction<internal::SetErrnoAndReturnAction<T> >
-SetErrnoAndReturn(int errval, T result) {
-  return MakePolymorphicAction(
-      internal::SetErrnoAndReturnAction<T>(errval, result));
-}
-
-#endif  // !GTEST_OS_WINDOWS_MOBILE
-
-// Various overloads for Invoke().
-
-// Legacy function.
-// Actions can now be implicitly constructed from callables. No need to create
-// wrapper objects.
-// This function exists for backwards compatibility.
-template <typename FunctionImpl>
-typename std::decay<FunctionImpl>::type Invoke(FunctionImpl&& function_impl) {
-  return std::forward<FunctionImpl>(function_impl);
-}
-
-// Creates an action that invokes the given method on the given object
-// with the mock function's arguments.
-template <class Class, typename MethodPtr>
-internal::InvokeMethodAction<Class, MethodPtr> Invoke(Class* obj_ptr,
-                                                      MethodPtr method_ptr) {
-  return {obj_ptr, method_ptr};
-}
-
-// Creates an action that invokes 'function_impl' with no argument.
-template <typename FunctionImpl>
-internal::InvokeWithoutArgsAction<typename std::decay<FunctionImpl>::type>
-InvokeWithoutArgs(FunctionImpl function_impl) {
-  return {std::move(function_impl)};
-}
-
-// Creates an action that invokes the given method on the given object
-// with no argument.
-template <class Class, typename MethodPtr>
-internal::InvokeMethodWithoutArgsAction<Class, MethodPtr> InvokeWithoutArgs(
-    Class* obj_ptr, MethodPtr method_ptr) {
-  return {obj_ptr, method_ptr};
-}
-
-// Creates an action that performs an_action and throws away its
-// result.  In other words, it changes the return type of an_action to
-// void.  an_action MUST NOT return void, or the code won't compile.
-template <typename A>
-inline internal::IgnoreResultAction<A> IgnoreResult(const A& an_action) {
-  return internal::IgnoreResultAction<A>(an_action);
-}
-
-// Creates a reference wrapper for the given L-value.  If necessary,
-// you can explicitly specify the type of the reference.  For example,
-// suppose 'derived' is an object of type Derived, ByRef(derived)
-// would wrap a Derived&.  If you want to wrap a const Base& instead,
-// where Base is a base class of Derived, just write:
-//
-//   ByRef<const Base>(derived)
-//
-// N.B. ByRef is redundant with std::ref, std::cref and std::reference_wrapper.
-// However, it may still be used for consistency with ByMove().
-template <typename T>
-inline ::std::reference_wrapper<T> ByRef(T& l_value) {  // NOLINT
-  return ::std::reference_wrapper<T>(l_value);
-}
-
-// The ReturnNew<T>(a1, a2, ..., a_k) action returns a pointer to a new
-// instance of type T, constructed on the heap with constructor arguments
-// a1, a2, ..., and a_k. The caller assumes ownership of the returned value.
-template <typename T, typename... Params>
-internal::ReturnNewAction<T, typename std::decay<Params>::type...> ReturnNew(
-    Params&&... params) {
-  return {std::forward_as_tuple(std::forward<Params>(params)...)};
-}
-
-// Action ReturnArg<k>() returns the k-th argument of the mock function.
-template <size_t k>
-internal::ReturnArgAction<k> ReturnArg() {
-  return {};
-}
-
-// Action SaveArg<k>(pointer) saves the k-th (0-based) argument of the
-// mock function to *pointer.
-template <size_t k, typename Ptr>
-internal::SaveArgAction<k, Ptr> SaveArg(Ptr pointer) {
-  return {pointer};
-}
-
-// Action SaveArgPointee<k>(pointer) saves the value pointed to
-// by the k-th (0-based) argument of the mock function to *pointer.
-template <size_t k, typename Ptr>
-internal::SaveArgPointeeAction<k, Ptr> SaveArgPointee(Ptr pointer) {
-  return {pointer};
-}
-
-// Action SetArgReferee<k>(value) assigns 'value' to the variable
-// referenced by the k-th (0-based) argument of the mock function.
-template <size_t k, typename T>
-internal::SetArgRefereeAction<k, typename std::decay<T>::type> SetArgReferee(
-    T&& value) {
-  return {std::forward<T>(value)};
-}
-
-// Action SetArrayArgument<k>(first, last) copies the elements in
-// source range [first, last) to the array pointed to by the k-th
-// (0-based) argument, which can be either a pointer or an
-// iterator. The action does not take ownership of the elements in the
-// source range.
-template <size_t k, typename I1, typename I2>
-internal::SetArrayArgumentAction<k, I1, I2> SetArrayArgument(I1 first,
-                                                             I2 last) {
-  return {first, last};
-}
-
-// Action DeleteArg<k>() deletes the k-th (0-based) argument of the mock
-// function.
-template <size_t k>
-internal::DeleteArgAction<k> DeleteArg() {
-  return {};
-}
-
-// This action returns the value pointed to by 'pointer'.
-template <typename Ptr>
-internal::ReturnPointeeAction<Ptr> ReturnPointee(Ptr pointer) {
-  return {pointer};
-}
-
-// Action Throw(exception) can be used in a mock function of any type
-// to throw the given exception.  Any copyable value can be thrown.
-#if GTEST_HAS_EXCEPTIONS
-template <typename T>
-internal::ThrowAction<typename std::decay<T>::type> Throw(T&& exception) {
-  return {std::forward<T>(exception)};
-}
-#endif  // GTEST_HAS_EXCEPTIONS
-
-namespace internal {
-
-// A macro from the ACTION* family (defined later in gmock-generated-actions.h)
-// defines an action that can be used in a mock function.  Typically,
-// these actions only care about a subset of the arguments of the mock
-// function.  For example, if such an action only uses the second
-// argument, it can be used in any mock function that takes >= 2
-// arguments where the type of the second argument is compatible.
-//
-// Therefore, the action implementation must be prepared to take more
-// arguments than it needs.  The ExcessiveArg type is used to
-// represent those excessive arguments.  In order to keep the compiler
-// error messages tractable, we define it in the testing namespace
-// instead of testing::internal.  However, this is an INTERNAL TYPE
-// and subject to change without notice, so a user MUST NOT USE THIS
-// TYPE DIRECTLY.
-struct ExcessiveArg {};
-
-// Builds an implementation of an Action<> for some particular signature, using
-// a class defined by an ACTION* macro.
-template <typename F, typename Impl> struct ActionImpl;
-
-template <typename Impl>
-struct ImplBase {
-  struct Holder {
-    // Allows each copy of the Action<> to get to the Impl.
-    explicit operator const Impl&() const { return *ptr; }
-    std::shared_ptr<Impl> ptr;
-  };
-  using type = typename std::conditional<std::is_constructible<Impl>::value,
-                                         Impl, Holder>::type;
-};
-
-template <typename R, typename... Args, typename Impl>
-struct ActionImpl<R(Args...), Impl> : ImplBase<Impl>::type {
-  using Base = typename ImplBase<Impl>::type;
-  using function_type = R(Args...);
-  using args_type = std::tuple<Args...>;
-
-  ActionImpl() = default;  // Only defined if appropriate for Base.
-  explicit ActionImpl(std::shared_ptr<Impl> impl) : Base{std::move(impl)} { }
-
-  R operator()(Args&&... arg) const {
-    static constexpr size_t kMaxArgs =
-        sizeof...(Args) <= 10 ? sizeof...(Args) : 10;
-    return Apply(MakeIndexSequence<kMaxArgs>{},
-                 MakeIndexSequence<10 - kMaxArgs>{},
-                 args_type{std::forward<Args>(arg)...});
-  }
-
-  template <std::size_t... arg_id, std::size_t... excess_id>
-  R Apply(IndexSequence<arg_id...>, IndexSequence<excess_id...>,
-          const args_type& args) const {
-    // Impl need not be specific to the signature of action being implemented;
-    // only the implementing function body needs to have all of the specific
-    // types instantiated.  Up to 10 of the args that are provided by the
-    // args_type get passed, followed by a dummy of unspecified type for the
-    // remainder up to 10 explicit args.
-    static constexpr ExcessiveArg kExcessArg{};
-    return static_cast<const Impl&>(*this).template gmock_PerformImpl<
-        /*function_type=*/function_type, /*return_type=*/R,
-        /*args_type=*/args_type,
-        /*argN_type=*/typename std::tuple_element<arg_id, args_type>::type...>(
-        /*args=*/args, std::get<arg_id>(args)...,
-        ((void)excess_id, kExcessArg)...);
-  }
-};
-
-// Stores a default-constructed Impl as part of the Action<>'s
-// std::function<>. The Impl should be trivial to copy.
-template <typename F, typename Impl>
-::testing::Action<F> MakeAction() {
-  return ::testing::Action<F>(ActionImpl<F, Impl>());
-}
-
-// Stores just the one given instance of Impl.
-template <typename F, typename Impl>
-::testing::Action<F> MakeAction(std::shared_ptr<Impl> impl) {
-  return ::testing::Action<F>(ActionImpl<F, Impl>(std::move(impl)));
-}
-
-#define GMOCK_INTERNAL_ARG_UNUSED(i, data, el) \
-  , const arg##i##_type& arg##i GTEST_ATTRIBUTE_UNUSED_
-#define GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_           \
-  const args_type& args GTEST_ATTRIBUTE_UNUSED_ GMOCK_PP_REPEAT( \
-      GMOCK_INTERNAL_ARG_UNUSED, , 10)
-
-#define GMOCK_INTERNAL_ARG(i, data, el) , const arg##i##_type& arg##i
-#define GMOCK_ACTION_ARG_TYPES_AND_NAMES_ \
-  const args_type& args GMOCK_PP_REPEAT(GMOCK_INTERNAL_ARG, , 10)
-
-#define GMOCK_INTERNAL_TEMPLATE_ARG(i, data, el) , typename arg##i##_type
-#define GMOCK_ACTION_TEMPLATE_ARGS_NAMES_ \
-  GMOCK_PP_TAIL(GMOCK_PP_REPEAT(GMOCK_INTERNAL_TEMPLATE_ARG, , 10))
-
-#define GMOCK_INTERNAL_TYPENAME_PARAM(i, data, param) , typename param##_type
-#define GMOCK_ACTION_TYPENAME_PARAMS_(params) \
-  GMOCK_PP_TAIL(GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_TYPENAME_PARAM, , params))
-
-#define GMOCK_INTERNAL_TYPE_PARAM(i, data, param) , param##_type
-#define GMOCK_ACTION_TYPE_PARAMS_(params) \
-  GMOCK_PP_TAIL(GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_TYPE_PARAM, , params))
-
-#define GMOCK_INTERNAL_TYPE_GVALUE_PARAM(i, data, param) \
-  , param##_type gmock_p##i
-#define GMOCK_ACTION_TYPE_GVALUE_PARAMS_(params) \
-  GMOCK_PP_TAIL(GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_TYPE_GVALUE_PARAM, , params))
-
-#define GMOCK_INTERNAL_GVALUE_PARAM(i, data, param) \
-  , std::forward<param##_type>(gmock_p##i)
-#define GMOCK_ACTION_GVALUE_PARAMS_(params) \
-  GMOCK_PP_TAIL(GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_GVALUE_PARAM, , params))
-
-#define GMOCK_INTERNAL_INIT_PARAM(i, data, param) \
-  , param(::std::forward<param##_type>(gmock_p##i))
-#define GMOCK_ACTION_INIT_PARAMS_(params) \
-  GMOCK_PP_TAIL(GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_INIT_PARAM, , params))
-
-#define GMOCK_INTERNAL_FIELD_PARAM(i, data, param) param##_type param;
-#define GMOCK_ACTION_FIELD_PARAMS_(params) \
-  GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_FIELD_PARAM, , params)
-
-#define GMOCK_INTERNAL_ACTION(name, full_name, params)                        \
-  template <GMOCK_ACTION_TYPENAME_PARAMS_(params)>                            \
-  class full_name {                                                           \
-   public:                                                                    \
-    explicit full_name(GMOCK_ACTION_TYPE_GVALUE_PARAMS_(params))              \
-        : impl_(std::make_shared<gmock_Impl>(                                 \
-                GMOCK_ACTION_GVALUE_PARAMS_(params))) { }                     \
-    full_name(const full_name&) = default;                                    \
-    full_name(full_name&&) noexcept = default;                                \
-    template <typename F>                                                     \
-    operator ::testing::Action<F>() const {                                   \
-      return ::testing::internal::MakeAction<F>(impl_);                       \
-    }                                                                         \
-   private:                                                                   \
-    class gmock_Impl {                                                        \
-     public:                                                                  \
-      explicit gmock_Impl(GMOCK_ACTION_TYPE_GVALUE_PARAMS_(params))           \
-          : GMOCK_ACTION_INIT_PARAMS_(params) {}                              \
-      template <typename function_type, typename return_type,                 \
-                typename args_type, GMOCK_ACTION_TEMPLATE_ARGS_NAMES_>        \
-      return_type gmock_PerformImpl(GMOCK_ACTION_ARG_TYPES_AND_NAMES_) const; \
-      GMOCK_ACTION_FIELD_PARAMS_(params)                                      \
-    };                                                                        \
-    std::shared_ptr<const gmock_Impl> impl_;                                  \
-  };                                                                          \
-  template <GMOCK_ACTION_TYPENAME_PARAMS_(params)>                            \
-  inline full_name<GMOCK_ACTION_TYPE_PARAMS_(params)> name(                   \
-      GMOCK_ACTION_TYPE_GVALUE_PARAMS_(params)) {                             \
-    return full_name<GMOCK_ACTION_TYPE_PARAMS_(params)>(                      \
-        GMOCK_ACTION_GVALUE_PARAMS_(params));                                 \
-  }                                                                           \
-  template <GMOCK_ACTION_TYPENAME_PARAMS_(params)>                            \
-  template <typename function_type, typename return_type, typename args_type, \
-            GMOCK_ACTION_TEMPLATE_ARGS_NAMES_>                                \
-  return_type full_name<GMOCK_ACTION_TYPE_PARAMS_(params)>::gmock_Impl::      \
-  gmock_PerformImpl(GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
-
-}  // namespace internal
-
-// Similar to GMOCK_INTERNAL_ACTION, but no bound parameters are stored.
-#define ACTION(name)                                                          \
-  class name##Action {                                                        \
-   public:                                                                    \
-   explicit name##Action() noexcept {}                                        \
-   name##Action(const name##Action&) noexcept {}                              \
-    template <typename F>                                                     \
-    operator ::testing::Action<F>() const {                                   \
-      return ::testing::internal::MakeAction<F, gmock_Impl>();                \
-    }                                                                         \
-   private:                                                                   \
-    class gmock_Impl {                                                        \
-     public:                                                                  \
-      template <typename function_type, typename return_type,                 \
-                typename args_type, GMOCK_ACTION_TEMPLATE_ARGS_NAMES_>        \
-      return_type gmock_PerformImpl(GMOCK_ACTION_ARG_TYPES_AND_NAMES_) const; \
-    };                                                                        \
-  };                                                                          \
-  inline name##Action name() GTEST_MUST_USE_RESULT_;                          \
-  inline name##Action name() { return name##Action(); }                       \
-  template <typename function_type, typename return_type, typename args_type, \
-            GMOCK_ACTION_TEMPLATE_ARGS_NAMES_>                                \
-  return_type name##Action::gmock_Impl::gmock_PerformImpl(                    \
-      GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
-
-#define ACTION_P(name, ...) \
-  GMOCK_INTERNAL_ACTION(name, name##ActionP, (__VA_ARGS__))
-
-#define ACTION_P2(name, ...) \
-  GMOCK_INTERNAL_ACTION(name, name##ActionP2, (__VA_ARGS__))
-
-#define ACTION_P3(name, ...) \
-  GMOCK_INTERNAL_ACTION(name, name##ActionP3, (__VA_ARGS__))
-
-#define ACTION_P4(name, ...) \
-  GMOCK_INTERNAL_ACTION(name, name##ActionP4, (__VA_ARGS__))
-
-#define ACTION_P5(name, ...) \
-  GMOCK_INTERNAL_ACTION(name, name##ActionP5, (__VA_ARGS__))
-
-#define ACTION_P6(name, ...) \
-  GMOCK_INTERNAL_ACTION(name, name##ActionP6, (__VA_ARGS__))
-
-#define ACTION_P7(name, ...) \
-  GMOCK_INTERNAL_ACTION(name, name##ActionP7, (__VA_ARGS__))
-
-#define ACTION_P8(name, ...) \
-  GMOCK_INTERNAL_ACTION(name, name##ActionP8, (__VA_ARGS__))
-
-#define ACTION_P9(name, ...) \
-  GMOCK_INTERNAL_ACTION(name, name##ActionP9, (__VA_ARGS__))
-
-#define ACTION_P10(name, ...) \
-  GMOCK_INTERNAL_ACTION(name, name##ActionP10, (__VA_ARGS__))
-
-}  // namespace testing
-
-#ifdef _MSC_VER
-# pragma warning(pop)
-#endif
-
-#endif  // GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_ACTIONS_H_
diff --git a/src/include/gromacs/external/googletest/googlemock/include/gmock/gmock-cardinalities.h b/src/include/gromacs/external/googletest/googlemock/include/gmock/gmock-cardinalities.h
deleted file mode 100644 (file)
index c45fd64..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file implements some commonly used cardinalities.  More
-// cardinalities can be defined by the user implementing the
-// CardinalityInterface interface if necessary.
-
-#ifndef GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_CARDINALITIES_H_
-#define GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_CARDINALITIES_H_
-
-#include <limits.h>
-#include <memory>
-#include <ostream>  // NOLINT
-#include "gmock/internal/gmock-port.h"
-#include "gtest/gtest.h"
-
-GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \
-/* class A needs to have dll-interface to be used by clients of class B */)
-
-namespace testing {
-
-// To implement a cardinality Foo, define:
-//   1. a class FooCardinality that implements the
-//      CardinalityInterface interface, and
-//   2. a factory function that creates a Cardinality object from a
-//      const FooCardinality*.
-//
-// The two-level delegation design follows that of Matcher, providing
-// consistency for extension developers.  It also eases ownership
-// management as Cardinality objects can now be copied like plain values.
-
-// The implementation of a cardinality.
-class CardinalityInterface {
- public:
-  virtual ~CardinalityInterface() {}
-
-  // Conservative estimate on the lower/upper bound of the number of
-  // calls allowed.
-  virtual int ConservativeLowerBound() const { return 0; }
-  virtual int ConservativeUpperBound() const { return INT_MAX; }
-
-  // Returns true if and only if call_count calls will satisfy this
-  // cardinality.
-  virtual bool IsSatisfiedByCallCount(int call_count) const = 0;
-
-  // Returns true if and only if call_count calls will saturate this
-  // cardinality.
-  virtual bool IsSaturatedByCallCount(int call_count) const = 0;
-
-  // Describes self to an ostream.
-  virtual void DescribeTo(::std::ostream* os) const = 0;
-};
-
-// A Cardinality is a copyable and IMMUTABLE (except by assignment)
-// object that specifies how many times a mock function is expected to
-// be called.  The implementation of Cardinality is just a std::shared_ptr
-// to const CardinalityInterface. Don't inherit from Cardinality!
-class GTEST_API_ Cardinality {
- public:
-  // Constructs a null cardinality.  Needed for storing Cardinality
-  // objects in STL containers.
-  Cardinality() {}
-
-  // Constructs a Cardinality from its implementation.
-  explicit Cardinality(const CardinalityInterface* impl) : impl_(impl) {}
-
-  // Conservative estimate on the lower/upper bound of the number of
-  // calls allowed.
-  int ConservativeLowerBound() const { return impl_->ConservativeLowerBound(); }
-  int ConservativeUpperBound() const { return impl_->ConservativeUpperBound(); }
-
-  // Returns true if and only if call_count calls will satisfy this
-  // cardinality.
-  bool IsSatisfiedByCallCount(int call_count) const {
-    return impl_->IsSatisfiedByCallCount(call_count);
-  }
-
-  // Returns true if and only if call_count calls will saturate this
-  // cardinality.
-  bool IsSaturatedByCallCount(int call_count) const {
-    return impl_->IsSaturatedByCallCount(call_count);
-  }
-
-  // Returns true if and only if call_count calls will over-saturate this
-  // cardinality, i.e. exceed the maximum number of allowed calls.
-  bool IsOverSaturatedByCallCount(int call_count) const {
-    return impl_->IsSaturatedByCallCount(call_count) &&
-        !impl_->IsSatisfiedByCallCount(call_count);
-  }
-
-  // Describes self to an ostream
-  void DescribeTo(::std::ostream* os) const { impl_->DescribeTo(os); }
-
-  // Describes the given actual call count to an ostream.
-  static void DescribeActualCallCountTo(int actual_call_count,
-                                        ::std::ostream* os);
-
- private:
-  std::shared_ptr<const CardinalityInterface> impl_;
-};
-
-// Creates a cardinality that allows at least n calls.
-GTEST_API_ Cardinality AtLeast(int n);
-
-// Creates a cardinality that allows at most n calls.
-GTEST_API_ Cardinality AtMost(int n);
-
-// Creates a cardinality that allows any number of calls.
-GTEST_API_ Cardinality AnyNumber();
-
-// Creates a cardinality that allows between min and max calls.
-GTEST_API_ Cardinality Between(int min, int max);
-
-// Creates a cardinality that allows exactly n calls.
-GTEST_API_ Cardinality Exactly(int n);
-
-// Creates a cardinality from its implementation.
-inline Cardinality MakeCardinality(const CardinalityInterface* c) {
-  return Cardinality(c);
-}
-
-}  // namespace testing
-
-GTEST_DISABLE_MSC_WARNINGS_POP_()  //  4251
-
-#endif  // GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_CARDINALITIES_H_
diff --git a/src/include/gromacs/external/googletest/googlemock/include/gmock/gmock-function-mocker.h b/src/include/gromacs/external/googletest/googlemock/include/gmock/gmock-function-mocker.h
deleted file mode 100644 (file)
index 36bab78..0000000
+++ /dev/null
@@ -1,477 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file implements MOCK_METHOD.
-
-#ifndef GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_FUNCTION_MOCKER_H_  // NOLINT
-#define GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_FUNCTION_MOCKER_H_  // NOLINT
-
-#include <type_traits>  // IWYU pragma: keep
-#include <utility>      // IWYU pragma: keep
-
-#include "gmock/gmock-spec-builders.h"
-#include "gmock/internal/gmock-internal-utils.h"
-#include "gmock/internal/gmock-pp.h"
-
-namespace testing {
-namespace internal {
-template <typename T>
-using identity_t = T;
-
-template <typename Pattern>
-struct ThisRefAdjuster {
-  template <typename T>
-  using AdjustT = typename std::conditional<
-      std::is_const<typename std::remove_reference<Pattern>::type>::value,
-      typename std::conditional<std::is_lvalue_reference<Pattern>::value,
-                                const T&, const T&&>::type,
-      typename std::conditional<std::is_lvalue_reference<Pattern>::value, T&,
-                                T&&>::type>::type;
-
-  template <typename MockType>
-  static AdjustT<MockType> Adjust(const MockType& mock) {
-    return static_cast<AdjustT<MockType>>(const_cast<MockType&>(mock));
-  }
-};
-
-}  // namespace internal
-
-// The style guide prohibits "using" statements in a namespace scope
-// inside a header file.  However, the FunctionMocker class template
-// is meant to be defined in the ::testing namespace.  The following
-// line is just a trick for working around a bug in MSVC 8.0, which
-// cannot handle it if we define FunctionMocker in ::testing.
-using internal::FunctionMocker;
-}  // namespace testing
-
-#define MOCK_METHOD(...) \
-  GMOCK_PP_VARIADIC_CALL(GMOCK_INTERNAL_MOCK_METHOD_ARG_, __VA_ARGS__)
-
-#define GMOCK_INTERNAL_MOCK_METHOD_ARG_1(...) \
-  GMOCK_INTERNAL_WRONG_ARITY(__VA_ARGS__)
-
-#define GMOCK_INTERNAL_MOCK_METHOD_ARG_2(...) \
-  GMOCK_INTERNAL_WRONG_ARITY(__VA_ARGS__)
-
-#define GMOCK_INTERNAL_MOCK_METHOD_ARG_3(_Ret, _MethodName, _Args) \
-  GMOCK_INTERNAL_MOCK_METHOD_ARG_4(_Ret, _MethodName, _Args, ())
-
-#define GMOCK_INTERNAL_MOCK_METHOD_ARG_4(_Ret, _MethodName, _Args, _Spec)     \
-  GMOCK_INTERNAL_ASSERT_PARENTHESIS(_Args);                                   \
-  GMOCK_INTERNAL_ASSERT_PARENTHESIS(_Spec);                                   \
-  GMOCK_INTERNAL_ASSERT_VALID_SIGNATURE(                                      \
-      GMOCK_PP_NARG0 _Args, GMOCK_INTERNAL_SIGNATURE(_Ret, _Args));           \
-  GMOCK_INTERNAL_ASSERT_VALID_SPEC(_Spec)                                     \
-  GMOCK_INTERNAL_MOCK_METHOD_IMPL(                                            \
-      GMOCK_PP_NARG0 _Args, _MethodName, GMOCK_INTERNAL_HAS_CONST(_Spec),     \
-      GMOCK_INTERNAL_HAS_OVERRIDE(_Spec), GMOCK_INTERNAL_HAS_FINAL(_Spec),    \
-      GMOCK_INTERNAL_GET_NOEXCEPT_SPEC(_Spec),                                \
-      GMOCK_INTERNAL_GET_CALLTYPE(_Spec), GMOCK_INTERNAL_GET_REF_SPEC(_Spec), \
-      (GMOCK_INTERNAL_SIGNATURE(_Ret, _Args)))
-
-#define GMOCK_INTERNAL_MOCK_METHOD_ARG_5(...) \
-  GMOCK_INTERNAL_WRONG_ARITY(__VA_ARGS__)
-
-#define GMOCK_INTERNAL_MOCK_METHOD_ARG_6(...) \
-  GMOCK_INTERNAL_WRONG_ARITY(__VA_ARGS__)
-
-#define GMOCK_INTERNAL_MOCK_METHOD_ARG_7(...) \
-  GMOCK_INTERNAL_WRONG_ARITY(__VA_ARGS__)
-
-#define GMOCK_INTERNAL_WRONG_ARITY(...)                                      \
-  static_assert(                                                             \
-      false,                                                                 \
-      "MOCK_METHOD must be called with 3 or 4 arguments. _Ret, "             \
-      "_MethodName, _Args and optionally _Spec. _Args and _Spec must be "    \
-      "enclosed in parentheses. If _Ret is a type with unprotected commas, " \
-      "it must also be enclosed in parentheses.")
-
-#define GMOCK_INTERNAL_ASSERT_PARENTHESIS(_Tuple) \
-  static_assert(                                  \
-      GMOCK_PP_IS_ENCLOSED_PARENS(_Tuple),        \
-      GMOCK_PP_STRINGIZE(_Tuple) " should be enclosed in parentheses.")
-
-#define GMOCK_INTERNAL_ASSERT_VALID_SIGNATURE(_N, ...)                 \
-  static_assert(                                                       \
-      std::is_function<__VA_ARGS__>::value,                            \
-      "Signature must be a function type, maybe return type contains " \
-      "unprotected comma.");                                           \
-  static_assert(                                                       \
-      ::testing::tuple_size<typename ::testing::internal::Function<    \
-              __VA_ARGS__>::ArgumentTuple>::value == _N,               \
-      "This method does not take " GMOCK_PP_STRINGIZE(                 \
-          _N) " arguments. Parenthesize all types with unprotected commas.")
-
-#define GMOCK_INTERNAL_ASSERT_VALID_SPEC(_Spec) \
-  GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_ASSERT_VALID_SPEC_ELEMENT, ~, _Spec)
-
-#define GMOCK_INTERNAL_MOCK_METHOD_IMPL(_N, _MethodName, _Constness,           \
-                                        _Override, _Final, _NoexceptSpec,      \
-                                        _CallType, _RefSpec, _Signature)       \
-  typename ::testing::internal::Function<GMOCK_PP_REMOVE_PARENS(               \
-      _Signature)>::Result                                                     \
-  GMOCK_INTERNAL_EXPAND(_CallType)                                             \
-      _MethodName(GMOCK_PP_REPEAT(GMOCK_INTERNAL_PARAMETER, _Signature, _N))   \
-          GMOCK_PP_IF(_Constness, const, ) _RefSpec _NoexceptSpec              \
-          GMOCK_PP_IF(_Override, override, ) GMOCK_PP_IF(_Final, final, ) {    \
-    GMOCK_MOCKER_(_N, _Constness, _MethodName)                                 \
-        .SetOwnerAndName(this, #_MethodName);                                  \
-    return GMOCK_MOCKER_(_N, _Constness, _MethodName)                          \
-        .Invoke(GMOCK_PP_REPEAT(GMOCK_INTERNAL_FORWARD_ARG, _Signature, _N));  \
-  }                                                                            \
-  ::testing::MockSpec<GMOCK_PP_REMOVE_PARENS(_Signature)> gmock_##_MethodName( \
-      GMOCK_PP_REPEAT(GMOCK_INTERNAL_MATCHER_PARAMETER, _Signature, _N))       \
-      GMOCK_PP_IF(_Constness, const, ) _RefSpec {                              \
-    GMOCK_MOCKER_(_N, _Constness, _MethodName).RegisterOwner(this);            \
-    return GMOCK_MOCKER_(_N, _Constness, _MethodName)                          \
-        .With(GMOCK_PP_REPEAT(GMOCK_INTERNAL_MATCHER_ARGUMENT, , _N));         \
-  }                                                                            \
-  ::testing::MockSpec<GMOCK_PP_REMOVE_PARENS(_Signature)> gmock_##_MethodName( \
-      const ::testing::internal::WithoutMatchers&,                             \
-      GMOCK_PP_IF(_Constness, const, )::testing::internal::Function<           \
-          GMOCK_PP_REMOVE_PARENS(_Signature)>*) const _RefSpec _NoexceptSpec { \
-    return ::testing::internal::ThisRefAdjuster<GMOCK_PP_IF(                   \
-        _Constness, const, ) int _RefSpec>::Adjust(*this)                      \
-        .gmock_##_MethodName(GMOCK_PP_REPEAT(                                  \
-            GMOCK_INTERNAL_A_MATCHER_ARGUMENT, _Signature, _N));               \
-  }                                                                            \
-  mutable ::testing::FunctionMocker<GMOCK_PP_REMOVE_PARENS(_Signature)>        \
-      GMOCK_MOCKER_(_N, _Constness, _MethodName)
-
-#define GMOCK_INTERNAL_EXPAND(...) __VA_ARGS__
-
-// Five Valid modifiers.
-#define GMOCK_INTERNAL_HAS_CONST(_Tuple) \
-  GMOCK_PP_HAS_COMMA(GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_DETECT_CONST, ~, _Tuple))
-
-#define GMOCK_INTERNAL_HAS_OVERRIDE(_Tuple) \
-  GMOCK_PP_HAS_COMMA(                       \
-      GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_DETECT_OVERRIDE, ~, _Tuple))
-
-#define GMOCK_INTERNAL_HAS_FINAL(_Tuple) \
-  GMOCK_PP_HAS_COMMA(GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_DETECT_FINAL, ~, _Tuple))
-
-#define GMOCK_INTERNAL_GET_NOEXCEPT_SPEC(_Tuple) \
-  GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_NOEXCEPT_SPEC_IF_NOEXCEPT, ~, _Tuple)
-
-#define GMOCK_INTERNAL_NOEXCEPT_SPEC_IF_NOEXCEPT(_i, _, _elem)          \
-  GMOCK_PP_IF(                                                          \
-      GMOCK_PP_HAS_COMMA(GMOCK_INTERNAL_DETECT_NOEXCEPT(_i, _, _elem)), \
-      _elem, )
-
-#define GMOCK_INTERNAL_GET_REF_SPEC(_Tuple) \
-  GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_REF_SPEC_IF_REF, ~, _Tuple)
-
-#define GMOCK_INTERNAL_REF_SPEC_IF_REF(_i, _, _elem)                       \
-  GMOCK_PP_IF(GMOCK_PP_HAS_COMMA(GMOCK_INTERNAL_DETECT_REF(_i, _, _elem)), \
-              GMOCK_PP_CAT(GMOCK_INTERNAL_UNPACK_, _elem), )
-
-#define GMOCK_INTERNAL_GET_CALLTYPE(_Tuple) \
-  GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_GET_CALLTYPE_IMPL, ~, _Tuple)
-
-#define GMOCK_INTERNAL_ASSERT_VALID_SPEC_ELEMENT(_i, _, _elem)            \
-  static_assert(                                                          \
-      (GMOCK_PP_HAS_COMMA(GMOCK_INTERNAL_DETECT_CONST(_i, _, _elem)) +    \
-       GMOCK_PP_HAS_COMMA(GMOCK_INTERNAL_DETECT_OVERRIDE(_i, _, _elem)) + \
-       GMOCK_PP_HAS_COMMA(GMOCK_INTERNAL_DETECT_FINAL(_i, _, _elem)) +    \
-       GMOCK_PP_HAS_COMMA(GMOCK_INTERNAL_DETECT_NOEXCEPT(_i, _, _elem)) + \
-       GMOCK_PP_HAS_COMMA(GMOCK_INTERNAL_DETECT_REF(_i, _, _elem)) +      \
-       GMOCK_INTERNAL_IS_CALLTYPE(_elem)) == 1,                           \
-      GMOCK_PP_STRINGIZE(                                                 \
-          _elem) " cannot be recognized as a valid specification modifier.");
-
-// Modifiers implementation.
-#define GMOCK_INTERNAL_DETECT_CONST(_i, _, _elem) \
-  GMOCK_PP_CAT(GMOCK_INTERNAL_DETECT_CONST_I_, _elem)
-
-#define GMOCK_INTERNAL_DETECT_CONST_I_const ,
-
-#define GMOCK_INTERNAL_DETECT_OVERRIDE(_i, _, _elem) \
-  GMOCK_PP_CAT(GMOCK_INTERNAL_DETECT_OVERRIDE_I_, _elem)
-
-#define GMOCK_INTERNAL_DETECT_OVERRIDE_I_override ,
-
-#define GMOCK_INTERNAL_DETECT_FINAL(_i, _, _elem) \
-  GMOCK_PP_CAT(GMOCK_INTERNAL_DETECT_FINAL_I_, _elem)
-
-#define GMOCK_INTERNAL_DETECT_FINAL_I_final ,
-
-#define GMOCK_INTERNAL_DETECT_NOEXCEPT(_i, _, _elem) \
-  GMOCK_PP_CAT(GMOCK_INTERNAL_DETECT_NOEXCEPT_I_, _elem)
-
-#define GMOCK_INTERNAL_DETECT_NOEXCEPT_I_noexcept ,
-
-#define GMOCK_INTERNAL_DETECT_REF(_i, _, _elem) \
-  GMOCK_PP_CAT(GMOCK_INTERNAL_DETECT_REF_I_, _elem)
-
-#define GMOCK_INTERNAL_DETECT_REF_I_ref ,
-
-#define GMOCK_INTERNAL_UNPACK_ref(x) x
-
-#define GMOCK_INTERNAL_GET_CALLTYPE_IMPL(_i, _, _elem)           \
-  GMOCK_PP_IF(GMOCK_INTERNAL_IS_CALLTYPE(_elem),                 \
-              GMOCK_INTERNAL_GET_VALUE_CALLTYPE, GMOCK_PP_EMPTY) \
-  (_elem)
-
-// TODO(iserna): GMOCK_INTERNAL_IS_CALLTYPE and
-// GMOCK_INTERNAL_GET_VALUE_CALLTYPE needed more expansions to work on windows
-// maybe they can be simplified somehow.
-#define GMOCK_INTERNAL_IS_CALLTYPE(_arg) \
-  GMOCK_INTERNAL_IS_CALLTYPE_I(          \
-      GMOCK_PP_CAT(GMOCK_INTERNAL_IS_CALLTYPE_HELPER_, _arg))
-#define GMOCK_INTERNAL_IS_CALLTYPE_I(_arg) GMOCK_PP_IS_ENCLOSED_PARENS(_arg)
-
-#define GMOCK_INTERNAL_GET_VALUE_CALLTYPE(_arg) \
-  GMOCK_INTERNAL_GET_VALUE_CALLTYPE_I(          \
-      GMOCK_PP_CAT(GMOCK_INTERNAL_IS_CALLTYPE_HELPER_, _arg))
-#define GMOCK_INTERNAL_GET_VALUE_CALLTYPE_I(_arg) \
-  GMOCK_PP_IDENTITY _arg
-
-#define GMOCK_INTERNAL_IS_CALLTYPE_HELPER_Calltype
-
-// Note: The use of `identity_t` here allows _Ret to represent return types that
-// would normally need to be specified in a different way. For example, a method
-// returning a function pointer must be written as
-//
-// fn_ptr_return_t (*method(method_args_t...))(fn_ptr_args_t...)
-//
-// But we only support placing the return type at the beginning. To handle this,
-// we wrap all calls in identity_t, so that a declaration will be expanded to
-//
-// identity_t<fn_ptr_return_t (*)(fn_ptr_args_t...)> method(method_args_t...)
-//
-// This allows us to work around the syntactic oddities of function/method
-// types.
-#define GMOCK_INTERNAL_SIGNATURE(_Ret, _Args)                                 \
-  ::testing::internal::identity_t<GMOCK_PP_IF(GMOCK_PP_IS_BEGIN_PARENS(_Ret), \
-                                              GMOCK_PP_REMOVE_PARENS,         \
-                                              GMOCK_PP_IDENTITY)(_Ret)>(      \
-      GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_GET_TYPE, _, _Args))
-
-#define GMOCK_INTERNAL_GET_TYPE(_i, _, _elem)                          \
-  GMOCK_PP_COMMA_IF(_i)                                                \
-  GMOCK_PP_IF(GMOCK_PP_IS_BEGIN_PARENS(_elem), GMOCK_PP_REMOVE_PARENS, \
-              GMOCK_PP_IDENTITY)                                       \
-  (_elem)
-
-#define GMOCK_INTERNAL_PARAMETER(_i, _Signature, _)            \
-  GMOCK_PP_COMMA_IF(_i)                                        \
-  GMOCK_INTERNAL_ARG_O(_i, GMOCK_PP_REMOVE_PARENS(_Signature)) \
-  gmock_a##_i
-
-#define GMOCK_INTERNAL_FORWARD_ARG(_i, _Signature, _) \
-  GMOCK_PP_COMMA_IF(_i)                               \
-  ::std::forward<GMOCK_INTERNAL_ARG_O(                \
-      _i, GMOCK_PP_REMOVE_PARENS(_Signature))>(gmock_a##_i)
-
-#define GMOCK_INTERNAL_MATCHER_PARAMETER(_i, _Signature, _)        \
-  GMOCK_PP_COMMA_IF(_i)                                            \
-  GMOCK_INTERNAL_MATCHER_O(_i, GMOCK_PP_REMOVE_PARENS(_Signature)) \
-  gmock_a##_i
-
-#define GMOCK_INTERNAL_MATCHER_ARGUMENT(_i, _1, _2) \
-  GMOCK_PP_COMMA_IF(_i)                             \
-  gmock_a##_i
-
-#define GMOCK_INTERNAL_A_MATCHER_ARGUMENT(_i, _Signature, _) \
-  GMOCK_PP_COMMA_IF(_i)                                      \
-  ::testing::A<GMOCK_INTERNAL_ARG_O(_i, GMOCK_PP_REMOVE_PARENS(_Signature))>()
-
-#define GMOCK_INTERNAL_ARG_O(_i, ...) \
-  typename ::testing::internal::Function<__VA_ARGS__>::template Arg<_i>::type
-
-#define GMOCK_INTERNAL_MATCHER_O(_i, ...)                          \
-  const ::testing::Matcher<typename ::testing::internal::Function< \
-      __VA_ARGS__>::template Arg<_i>::type>&
-
-#define MOCK_METHOD0(m, ...) GMOCK_INTERNAL_MOCK_METHODN(, , m, 0, __VA_ARGS__)
-#define MOCK_METHOD1(m, ...) GMOCK_INTERNAL_MOCK_METHODN(, , m, 1, __VA_ARGS__)
-#define MOCK_METHOD2(m, ...) GMOCK_INTERNAL_MOCK_METHODN(, , m, 2, __VA_ARGS__)
-#define MOCK_METHOD3(m, ...) GMOCK_INTERNAL_MOCK_METHODN(, , m, 3, __VA_ARGS__)
-#define MOCK_METHOD4(m, ...) GMOCK_INTERNAL_MOCK_METHODN(, , m, 4, __VA_ARGS__)
-#define MOCK_METHOD5(m, ...) GMOCK_INTERNAL_MOCK_METHODN(, , m, 5, __VA_ARGS__)
-#define MOCK_METHOD6(m, ...) GMOCK_INTERNAL_MOCK_METHODN(, , m, 6, __VA_ARGS__)
-#define MOCK_METHOD7(m, ...) GMOCK_INTERNAL_MOCK_METHODN(, , m, 7, __VA_ARGS__)
-#define MOCK_METHOD8(m, ...) GMOCK_INTERNAL_MOCK_METHODN(, , m, 8, __VA_ARGS__)
-#define MOCK_METHOD9(m, ...) GMOCK_INTERNAL_MOCK_METHODN(, , m, 9, __VA_ARGS__)
-#define MOCK_METHOD10(m, ...) \
-  GMOCK_INTERNAL_MOCK_METHODN(, , m, 10, __VA_ARGS__)
-
-#define MOCK_CONST_METHOD0(m, ...) \
-  GMOCK_INTERNAL_MOCK_METHODN(const, , m, 0, __VA_ARGS__)
-#define MOCK_CONST_METHOD1(m, ...) \
-  GMOCK_INTERNAL_MOCK_METHODN(const, , m, 1, __VA_ARGS__)
-#define MOCK_CONST_METHOD2(m, ...) \
-  GMOCK_INTERNAL_MOCK_METHODN(const, , m, 2, __VA_ARGS__)
-#define MOCK_CONST_METHOD3(m, ...) \
-  GMOCK_INTERNAL_MOCK_METHODN(const, , m, 3, __VA_ARGS__)
-#define MOCK_CONST_METHOD4(m, ...) \
-  GMOCK_INTERNAL_MOCK_METHODN(const, , m, 4, __VA_ARGS__)
-#define MOCK_CONST_METHOD5(m, ...) \
-  GMOCK_INTERNAL_MOCK_METHODN(const, , m, 5, __VA_ARGS__)
-#define MOCK_CONST_METHOD6(m, ...) \
-  GMOCK_INTERNAL_MOCK_METHODN(const, , m, 6, __VA_ARGS__)
-#define MOCK_CONST_METHOD7(m, ...) \
-  GMOCK_INTERNAL_MOCK_METHODN(const, , m, 7, __VA_ARGS__)
-#define MOCK_CONST_METHOD8(m, ...) \
-  GMOCK_INTERNAL_MOCK_METHODN(const, , m, 8, __VA_ARGS__)
-#define MOCK_CONST_METHOD9(m, ...) \
-  GMOCK_INTERNAL_MOCK_METHODN(const, , m, 9, __VA_ARGS__)
-#define MOCK_CONST_METHOD10(m, ...) \
-  GMOCK_INTERNAL_MOCK_METHODN(const, , m, 10, __VA_ARGS__)
-
-#define MOCK_METHOD0_T(m, ...) MOCK_METHOD0(m, __VA_ARGS__)
-#define MOCK_METHOD1_T(m, ...) MOCK_METHOD1(m, __VA_ARGS__)
-#define MOCK_METHOD2_T(m, ...) MOCK_METHOD2(m, __VA_ARGS__)
-#define MOCK_METHOD3_T(m, ...) MOCK_METHOD3(m, __VA_ARGS__)
-#define MOCK_METHOD4_T(m, ...) MOCK_METHOD4(m, __VA_ARGS__)
-#define MOCK_METHOD5_T(m, ...) MOCK_METHOD5(m, __VA_ARGS__)
-#define MOCK_METHOD6_T(m, ...) MOCK_METHOD6(m, __VA_ARGS__)
-#define MOCK_METHOD7_T(m, ...) MOCK_METHOD7(m, __VA_ARGS__)
-#define MOCK_METHOD8_T(m, ...) MOCK_METHOD8(m, __VA_ARGS__)
-#define MOCK_METHOD9_T(m, ...) MOCK_METHOD9(m, __VA_ARGS__)
-#define MOCK_METHOD10_T(m, ...) MOCK_METHOD10(m, __VA_ARGS__)
-
-#define MOCK_CONST_METHOD0_T(m, ...) MOCK_CONST_METHOD0(m, __VA_ARGS__)
-#define MOCK_CONST_METHOD1_T(m, ...) MOCK_CONST_METHOD1(m, __VA_ARGS__)
-#define MOCK_CONST_METHOD2_T(m, ...) MOCK_CONST_METHOD2(m, __VA_ARGS__)
-#define MOCK_CONST_METHOD3_T(m, ...) MOCK_CONST_METHOD3(m, __VA_ARGS__)
-#define MOCK_CONST_METHOD4_T(m, ...) MOCK_CONST_METHOD4(m, __VA_ARGS__)
-#define MOCK_CONST_METHOD5_T(m, ...) MOCK_CONST_METHOD5(m, __VA_ARGS__)
-#define MOCK_CONST_METHOD6_T(m, ...) MOCK_CONST_METHOD6(m, __VA_ARGS__)
-#define MOCK_CONST_METHOD7_T(m, ...) MOCK_CONST_METHOD7(m, __VA_ARGS__)
-#define MOCK_CONST_METHOD8_T(m, ...) MOCK_CONST_METHOD8(m, __VA_ARGS__)
-#define MOCK_CONST_METHOD9_T(m, ...) MOCK_CONST_METHOD9(m, __VA_ARGS__)
-#define MOCK_CONST_METHOD10_T(m, ...) MOCK_CONST_METHOD10(m, __VA_ARGS__)
-
-#define MOCK_METHOD0_WITH_CALLTYPE(ct, m, ...) \
-  GMOCK_INTERNAL_MOCK_METHODN(, ct, m, 0, __VA_ARGS__)
-#define MOCK_METHOD1_WITH_CALLTYPE(ct, m, ...) \
-  GMOCK_INTERNAL_MOCK_METHODN(, ct, m, 1, __VA_ARGS__)
-#define MOCK_METHOD2_WITH_CALLTYPE(ct, m, ...) \
-  GMOCK_INTERNAL_MOCK_METHODN(, ct, m, 2, __VA_ARGS__)
-#define MOCK_METHOD3_WITH_CALLTYPE(ct, m, ...) \
-  GMOCK_INTERNAL_MOCK_METHODN(, ct, m, 3, __VA_ARGS__)
-#define MOCK_METHOD4_WITH_CALLTYPE(ct, m, ...) \
-  GMOCK_INTERNAL_MOCK_METHODN(, ct, m, 4, __VA_ARGS__)
-#define MOCK_METHOD5_WITH_CALLTYPE(ct, m, ...) \
-  GMOCK_INTERNAL_MOCK_METHODN(, ct, m, 5, __VA_ARGS__)
-#define MOCK_METHOD6_WITH_CALLTYPE(ct, m, ...) \
-  GMOCK_INTERNAL_MOCK_METHODN(, ct, m, 6, __VA_ARGS__)
-#define MOCK_METHOD7_WITH_CALLTYPE(ct, m, ...) \
-  GMOCK_INTERNAL_MOCK_METHODN(, ct, m, 7, __VA_ARGS__)
-#define MOCK_METHOD8_WITH_CALLTYPE(ct, m, ...) \
-  GMOCK_INTERNAL_MOCK_METHODN(, ct, m, 8, __VA_ARGS__)
-#define MOCK_METHOD9_WITH_CALLTYPE(ct, m, ...) \
-  GMOCK_INTERNAL_MOCK_METHODN(, ct, m, 9, __VA_ARGS__)
-#define MOCK_METHOD10_WITH_CALLTYPE(ct, m, ...) \
-  GMOCK_INTERNAL_MOCK_METHODN(, ct, m, 10, __VA_ARGS__)
-
-#define MOCK_CONST_METHOD0_WITH_CALLTYPE(ct, m, ...) \
-  GMOCK_INTERNAL_MOCK_METHODN(const, ct, m, 0, __VA_ARGS__)
-#define MOCK_CONST_METHOD1_WITH_CALLTYPE(ct, m, ...) \
-  GMOCK_INTERNAL_MOCK_METHODN(const, ct, m, 1, __VA_ARGS__)
-#define MOCK_CONST_METHOD2_WITH_CALLTYPE(ct, m, ...) \
-  GMOCK_INTERNAL_MOCK_METHODN(const, ct, m, 2, __VA_ARGS__)
-#define MOCK_CONST_METHOD3_WITH_CALLTYPE(ct, m, ...) \
-  GMOCK_INTERNAL_MOCK_METHODN(const, ct, m, 3, __VA_ARGS__)
-#define MOCK_CONST_METHOD4_WITH_CALLTYPE(ct, m, ...) \
-  GMOCK_INTERNAL_MOCK_METHODN(const, ct, m, 4, __VA_ARGS__)
-#define MOCK_CONST_METHOD5_WITH_CALLTYPE(ct, m, ...) \
-  GMOCK_INTERNAL_MOCK_METHODN(const, ct, m, 5, __VA_ARGS__)
-#define MOCK_CONST_METHOD6_WITH_CALLTYPE(ct, m, ...) \
-  GMOCK_INTERNAL_MOCK_METHODN(const, ct, m, 6, __VA_ARGS__)
-#define MOCK_CONST_METHOD7_WITH_CALLTYPE(ct, m, ...) \
-  GMOCK_INTERNAL_MOCK_METHODN(const, ct, m, 7, __VA_ARGS__)
-#define MOCK_CONST_METHOD8_WITH_CALLTYPE(ct, m, ...) \
-  GMOCK_INTERNAL_MOCK_METHODN(const, ct, m, 8, __VA_ARGS__)
-#define MOCK_CONST_METHOD9_WITH_CALLTYPE(ct, m, ...) \
-  GMOCK_INTERNAL_MOCK_METHODN(const, ct, m, 9, __VA_ARGS__)
-#define MOCK_CONST_METHOD10_WITH_CALLTYPE(ct, m, ...) \
-  GMOCK_INTERNAL_MOCK_METHODN(const, ct, m, 10, __VA_ARGS__)
-
-#define MOCK_METHOD0_T_WITH_CALLTYPE(ct, m, ...) \
-  MOCK_METHOD0_WITH_CALLTYPE(ct, m, __VA_ARGS__)
-#define MOCK_METHOD1_T_WITH_CALLTYPE(ct, m, ...) \
-  MOCK_METHOD1_WITH_CALLTYPE(ct, m, __VA_ARGS__)
-#define MOCK_METHOD2_T_WITH_CALLTYPE(ct, m, ...) \
-  MOCK_METHOD2_WITH_CALLTYPE(ct, m, __VA_ARGS__)
-#define MOCK_METHOD3_T_WITH_CALLTYPE(ct, m, ...) \
-  MOCK_METHOD3_WITH_CALLTYPE(ct, m, __VA_ARGS__)
-#define MOCK_METHOD4_T_WITH_CALLTYPE(ct, m, ...) \
-  MOCK_METHOD4_WITH_CALLTYPE(ct, m, __VA_ARGS__)
-#define MOCK_METHOD5_T_WITH_CALLTYPE(ct, m, ...) \
-  MOCK_METHOD5_WITH_CALLTYPE(ct, m, __VA_ARGS__)
-#define MOCK_METHOD6_T_WITH_CALLTYPE(ct, m, ...) \
-  MOCK_METHOD6_WITH_CALLTYPE(ct, m, __VA_ARGS__)
-#define MOCK_METHOD7_T_WITH_CALLTYPE(ct, m, ...) \
-  MOCK_METHOD7_WITH_CALLTYPE(ct, m, __VA_ARGS__)
-#define MOCK_METHOD8_T_WITH_CALLTYPE(ct, m, ...) \
-  MOCK_METHOD8_WITH_CALLTYPE(ct, m, __VA_ARGS__)
-#define MOCK_METHOD9_T_WITH_CALLTYPE(ct, m, ...) \
-  MOCK_METHOD9_WITH_CALLTYPE(ct, m, __VA_ARGS__)
-#define MOCK_METHOD10_T_WITH_CALLTYPE(ct, m, ...) \
-  MOCK_METHOD10_WITH_CALLTYPE(ct, m, __VA_ARGS__)
-
-#define MOCK_CONST_METHOD0_T_WITH_CALLTYPE(ct, m, ...) \
-  MOCK_CONST_METHOD0_WITH_CALLTYPE(ct, m, __VA_ARGS__)
-#define MOCK_CONST_METHOD1_T_WITH_CALLTYPE(ct, m, ...) \
-  MOCK_CONST_METHOD1_WITH_CALLTYPE(ct, m, __VA_ARGS__)
-#define MOCK_CONST_METHOD2_T_WITH_CALLTYPE(ct, m, ...) \
-  MOCK_CONST_METHOD2_WITH_CALLTYPE(ct, m, __VA_ARGS__)
-#define MOCK_CONST_METHOD3_T_WITH_CALLTYPE(ct, m, ...) \
-  MOCK_CONST_METHOD3_WITH_CALLTYPE(ct, m, __VA_ARGS__)
-#define MOCK_CONST_METHOD4_T_WITH_CALLTYPE(ct, m, ...) \
-  MOCK_CONST_METHOD4_WITH_CALLTYPE(ct, m, __VA_ARGS__)
-#define MOCK_CONST_METHOD5_T_WITH_CALLTYPE(ct, m, ...) \
-  MOCK_CONST_METHOD5_WITH_CALLTYPE(ct, m, __VA_ARGS__)
-#define MOCK_CONST_METHOD6_T_WITH_CALLTYPE(ct, m, ...) \
-  MOCK_CONST_METHOD6_WITH_CALLTYPE(ct, m, __VA_ARGS__)
-#define MOCK_CONST_METHOD7_T_WITH_CALLTYPE(ct, m, ...) \
-  MOCK_CONST_METHOD7_WITH_CALLTYPE(ct, m, __VA_ARGS__)
-#define MOCK_CONST_METHOD8_T_WITH_CALLTYPE(ct, m, ...) \
-  MOCK_CONST_METHOD8_WITH_CALLTYPE(ct, m, __VA_ARGS__)
-#define MOCK_CONST_METHOD9_T_WITH_CALLTYPE(ct, m, ...) \
-  MOCK_CONST_METHOD9_WITH_CALLTYPE(ct, m, __VA_ARGS__)
-#define MOCK_CONST_METHOD10_T_WITH_CALLTYPE(ct, m, ...) \
-  MOCK_CONST_METHOD10_WITH_CALLTYPE(ct, m, __VA_ARGS__)
-
-#define GMOCK_INTERNAL_MOCK_METHODN(constness, ct, Method, args_num, ...) \
-  GMOCK_INTERNAL_ASSERT_VALID_SIGNATURE(                                  \
-      args_num, ::testing::internal::identity_t<__VA_ARGS__>);            \
-  GMOCK_INTERNAL_MOCK_METHOD_IMPL(                                        \
-      args_num, Method, GMOCK_PP_NARG0(constness), 0, 0, , ct, ,          \
-      (::testing::internal::identity_t<__VA_ARGS__>))
-
-#define GMOCK_MOCKER_(arity, constness, Method) \
-  GTEST_CONCAT_TOKEN_(gmock##constness##arity##_##Method##_, __LINE__)
-
-#endif  // GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_FUNCTION_MOCKER_H_
diff --git a/src/include/gromacs/external/googletest/googlemock/include/gmock/gmock-matchers.h b/src/include/gromacs/external/googletest/googlemock/include/gmock/gmock-matchers.h
deleted file mode 100644 (file)
index dc213a0..0000000
+++ /dev/null
@@ -1,5547 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// The MATCHER* family of macros can be used in a namespace scope to
-// define custom matchers easily.
-//
-// Basic Usage
-// ===========
-//
-// The syntax
-//
-//   MATCHER(name, description_string) { statements; }
-//
-// defines a matcher with the given name that executes the statements,
-// which must return a bool to indicate if the match succeeds.  Inside
-// the statements, you can refer to the value being matched by 'arg',
-// and refer to its type by 'arg_type'.
-//
-// The description string documents what the matcher does, and is used
-// to generate the failure message when the match fails.  Since a
-// MATCHER() is usually defined in a header file shared by multiple
-// C++ source files, we require the description to be a C-string
-// literal to avoid possible side effects.  It can be empty, in which
-// case we'll use the sequence of words in the matcher name as the
-// description.
-//
-// For example:
-//
-//   MATCHER(IsEven, "") { return (arg % 2) == 0; }
-//
-// allows you to write
-//
-//   // Expects mock_foo.Bar(n) to be called where n is even.
-//   EXPECT_CALL(mock_foo, Bar(IsEven()));
-//
-// or,
-//
-//   // Verifies that the value of some_expression is even.
-//   EXPECT_THAT(some_expression, IsEven());
-//
-// If the above assertion fails, it will print something like:
-//
-//   Value of: some_expression
-//   Expected: is even
-//     Actual: 7
-//
-// where the description "is even" is automatically calculated from the
-// matcher name IsEven.
-//
-// Argument Type
-// =============
-//
-// Note that the type of the value being matched (arg_type) is
-// determined by the context in which you use the matcher and is
-// supplied to you by the compiler, so you don't need to worry about
-// declaring it (nor can you).  This allows the matcher to be
-// polymorphic.  For example, IsEven() can be used to match any type
-// where the value of "(arg % 2) == 0" can be implicitly converted to
-// a bool.  In the "Bar(IsEven())" example above, if method Bar()
-// takes an int, 'arg_type' will be int; if it takes an unsigned long,
-// 'arg_type' will be unsigned long; and so on.
-//
-// Parameterizing Matchers
-// =======================
-//
-// Sometimes you'll want to parameterize the matcher.  For that you
-// can use another macro:
-//
-//   MATCHER_P(name, param_name, description_string) { statements; }
-//
-// For example:
-//
-//   MATCHER_P(HasAbsoluteValue, value, "") { return abs(arg) == value; }
-//
-// will allow you to write:
-//
-//   EXPECT_THAT(Blah("a"), HasAbsoluteValue(n));
-//
-// which may lead to this message (assuming n is 10):
-//
-//   Value of: Blah("a")
-//   Expected: has absolute value 10
-//     Actual: -9
-//
-// Note that both the matcher description and its parameter are
-// printed, making the message human-friendly.
-//
-// In the matcher definition body, you can write 'foo_type' to
-// reference the type of a parameter named 'foo'.  For example, in the
-// body of MATCHER_P(HasAbsoluteValue, value) above, you can write
-// 'value_type' to refer to the type of 'value'.
-//
-// We also provide MATCHER_P2, MATCHER_P3, ..., up to MATCHER_P$n to
-// support multi-parameter matchers.
-//
-// Describing Parameterized Matchers
-// =================================
-//
-// The last argument to MATCHER*() is a string-typed expression.  The
-// expression can reference all of the matcher's parameters and a
-// special bool-typed variable named 'negation'.  When 'negation' is
-// false, the expression should evaluate to the matcher's description;
-// otherwise it should evaluate to the description of the negation of
-// the matcher.  For example,
-//
-//   using testing::PrintToString;
-//
-//   MATCHER_P2(InClosedRange, low, hi,
-//       std::string(negation ? "is not" : "is") + " in range [" +
-//       PrintToString(low) + ", " + PrintToString(hi) + "]") {
-//     return low <= arg && arg <= hi;
-//   }
-//   ...
-//   EXPECT_THAT(3, InClosedRange(4, 6));
-//   EXPECT_THAT(3, Not(InClosedRange(2, 4)));
-//
-// would generate two failures that contain the text:
-//
-//   Expected: is in range [4, 6]
-//   ...
-//   Expected: is not in range [2, 4]
-//
-// If you specify "" as the description, the failure message will
-// contain the sequence of words in the matcher name followed by the
-// parameter values printed as a tuple.  For example,
-//
-//   MATCHER_P2(InClosedRange, low, hi, "") { ... }
-//   ...
-//   EXPECT_THAT(3, InClosedRange(4, 6));
-//   EXPECT_THAT(3, Not(InClosedRange(2, 4)));
-//
-// would generate two failures that contain the text:
-//
-//   Expected: in closed range (4, 6)
-//   ...
-//   Expected: not (in closed range (2, 4))
-//
-// Types of Matcher Parameters
-// ===========================
-//
-// For the purpose of typing, you can view
-//
-//   MATCHER_Pk(Foo, p1, ..., pk, description_string) { ... }
-//
-// as shorthand for
-//
-//   template <typename p1_type, ..., typename pk_type>
-//   FooMatcherPk<p1_type, ..., pk_type>
-//   Foo(p1_type p1, ..., pk_type pk) { ... }
-//
-// When you write Foo(v1, ..., vk), the compiler infers the types of
-// the parameters v1, ..., and vk for you.  If you are not happy with
-// the result of the type inference, you can specify the types by
-// explicitly instantiating the template, as in Foo<long, bool>(5,
-// false).  As said earlier, you don't get to (or need to) specify
-// 'arg_type' as that's determined by the context in which the matcher
-// is used.  You can assign the result of expression Foo(p1, ..., pk)
-// to a variable of type FooMatcherPk<p1_type, ..., pk_type>.  This
-// can be useful when composing matchers.
-//
-// While you can instantiate a matcher template with reference types,
-// passing the parameters by pointer usually makes your code more
-// readable.  If, however, you still want to pass a parameter by
-// reference, be aware that in the failure message generated by the
-// matcher you will see the value of the referenced object but not its
-// address.
-//
-// Explaining Match Results
-// ========================
-//
-// Sometimes the matcher description alone isn't enough to explain why
-// the match has failed or succeeded.  For example, when expecting a
-// long string, it can be very helpful to also print the diff between
-// the expected string and the actual one.  To achieve that, you can
-// optionally stream additional information to a special variable
-// named result_listener, whose type is a pointer to class
-// MatchResultListener:
-//
-//   MATCHER_P(EqualsLongString, str, "") {
-//     if (arg == str) return true;
-//
-//     *result_listener << "the difference: "
-///                     << DiffStrings(str, arg);
-//     return false;
-//   }
-//
-// Overloading Matchers
-// ====================
-//
-// You can overload matchers with different numbers of parameters:
-//
-//   MATCHER_P(Blah, a, description_string1) { ... }
-//   MATCHER_P2(Blah, a, b, description_string2) { ... }
-//
-// Caveats
-// =======
-//
-// When defining a new matcher, you should also consider implementing
-// MatcherInterface or using MakePolymorphicMatcher().  These
-// approaches require more work than the MATCHER* macros, but also
-// give you more control on the types of the value being matched and
-// the matcher parameters, which may leads to better compiler error
-// messages when the matcher is used wrong.  They also allow
-// overloading matchers based on parameter types (as opposed to just
-// based on the number of parameters).
-//
-// MATCHER*() can only be used in a namespace scope as templates cannot be
-// declared inside of a local class.
-//
-// More Information
-// ================
-//
-// To learn more about using these macros, please search for 'MATCHER'
-// on
-// https://github.com/google/googletest/blob/master/docs/gmock_cook_book.md
-//
-// This file also implements some commonly used argument matchers.  More
-// matchers can be defined by the user implementing the
-// MatcherInterface<T> interface if necessary.
-//
-// See googletest/include/gtest/gtest-matchers.h for the definition of class
-// Matcher, class MatcherInterface, and others.
-
-#ifndef GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_MATCHERS_H_
-#define GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_MATCHERS_H_
-
-#include <algorithm>
-#include <cmath>
-#include <initializer_list>
-#include <iterator>
-#include <limits>
-#include <memory>
-#include <ostream>  // NOLINT
-#include <sstream>
-#include <string>
-#include <type_traits>
-#include <utility>
-#include <vector>
-
-#include "gmock/internal/gmock-internal-utils.h"
-#include "gmock/internal/gmock-port.h"
-#include "gmock/internal/gmock-pp.h"
-#include "gtest/gtest.h"
-
-// MSVC warning C5046 is new as of VS2017 version 15.8.
-#if defined(_MSC_VER) && _MSC_VER >= 1915
-#define GMOCK_MAYBE_5046_ 5046
-#else
-#define GMOCK_MAYBE_5046_
-#endif
-
-GTEST_DISABLE_MSC_WARNINGS_PUSH_(
-    4251 GMOCK_MAYBE_5046_ /* class A needs to have dll-interface to be used by
-                              clients of class B */
-    /* Symbol involving type with internal linkage not defined */)
-
-namespace testing {
-
-// To implement a matcher Foo for type T, define:
-//   1. a class FooMatcherImpl that implements the
-//      MatcherInterface<T> interface, and
-//   2. a factory function that creates a Matcher<T> object from a
-//      FooMatcherImpl*.
-//
-// The two-level delegation design makes it possible to allow a user
-// to write "v" instead of "Eq(v)" where a Matcher is expected, which
-// is impossible if we pass matchers by pointers.  It also eases
-// ownership management as Matcher objects can now be copied like
-// plain values.
-
-// A match result listener that stores the explanation in a string.
-class StringMatchResultListener : public MatchResultListener {
- public:
-  StringMatchResultListener() : MatchResultListener(&ss_) {}
-
-  // Returns the explanation accumulated so far.
-  std::string str() const { return ss_.str(); }
-
-  // Clears the explanation accumulated so far.
-  void Clear() { ss_.str(""); }
-
- private:
-  ::std::stringstream ss_;
-
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(StringMatchResultListener);
-};
-
-// Anything inside the 'internal' namespace IS INTERNAL IMPLEMENTATION
-// and MUST NOT BE USED IN USER CODE!!!
-namespace internal {
-
-// The MatcherCastImpl class template is a helper for implementing
-// MatcherCast().  We need this helper in order to partially
-// specialize the implementation of MatcherCast() (C++ allows
-// class/struct templates to be partially specialized, but not
-// function templates.).
-
-// This general version is used when MatcherCast()'s argument is a
-// polymorphic matcher (i.e. something that can be converted to a
-// Matcher but is not one yet; for example, Eq(value)) or a value (for
-// example, "hello").
-template <typename T, typename M>
-class MatcherCastImpl {
- public:
-  static Matcher<T> Cast(const M& polymorphic_matcher_or_value) {
-    // M can be a polymorphic matcher, in which case we want to use
-    // its conversion operator to create Matcher<T>.  Or it can be a value
-    // that should be passed to the Matcher<T>'s constructor.
-    //
-    // We can't call Matcher<T>(polymorphic_matcher_or_value) when M is a
-    // polymorphic matcher because it'll be ambiguous if T has an implicit
-    // constructor from M (this usually happens when T has an implicit
-    // constructor from any type).
-    //
-    // It won't work to unconditionally implicit_cast
-    // polymorphic_matcher_or_value to Matcher<T> because it won't trigger
-    // a user-defined conversion from M to T if one exists (assuming M is
-    // a value).
-    return CastImpl(polymorphic_matcher_or_value,
-                    std::is_convertible<M, Matcher<T>>{},
-                    std::is_convertible<M, T>{});
-  }
-
- private:
-  template <bool Ignore>
-  static Matcher<T> CastImpl(const M& polymorphic_matcher_or_value,
-                             std::true_type /* convertible_to_matcher */,
-                             std::integral_constant<bool, Ignore>) {
-    // M is implicitly convertible to Matcher<T>, which means that either
-    // M is a polymorphic matcher or Matcher<T> has an implicit constructor
-    // from M.  In both cases using the implicit conversion will produce a
-    // matcher.
-    //
-    // Even if T has an implicit constructor from M, it won't be called because
-    // creating Matcher<T> would require a chain of two user-defined conversions
-    // (first to create T from M and then to create Matcher<T> from T).
-    return polymorphic_matcher_or_value;
-  }
-
-  // M can't be implicitly converted to Matcher<T>, so M isn't a polymorphic
-  // matcher. It's a value of a type implicitly convertible to T. Use direct
-  // initialization to create a matcher.
-  static Matcher<T> CastImpl(const M& value,
-                             std::false_type /* convertible_to_matcher */,
-                             std::true_type /* convertible_to_T */) {
-    return Matcher<T>(ImplicitCast_<T>(value));
-  }
-
-  // M can't be implicitly converted to either Matcher<T> or T. Attempt to use
-  // polymorphic matcher Eq(value) in this case.
-  //
-  // Note that we first attempt to perform an implicit cast on the value and
-  // only fall back to the polymorphic Eq() matcher afterwards because the
-  // latter calls bool operator==(const Lhs& lhs, const Rhs& rhs) in the end
-  // which might be undefined even when Rhs is implicitly convertible to Lhs
-  // (e.g. std::pair<const int, int> vs. std::pair<int, int>).
-  //
-  // We don't define this method inline as we need the declaration of Eq().
-  static Matcher<T> CastImpl(const M& value,
-                             std::false_type /* convertible_to_matcher */,
-                             std::false_type /* convertible_to_T */);
-};
-
-// This more specialized version is used when MatcherCast()'s argument
-// is already a Matcher.  This only compiles when type T can be
-// statically converted to type U.
-template <typename T, typename U>
-class MatcherCastImpl<T, Matcher<U> > {
- public:
-  static Matcher<T> Cast(const Matcher<U>& source_matcher) {
-    return Matcher<T>(new Impl(source_matcher));
-  }
-
- private:
-  class Impl : public MatcherInterface<T> {
-   public:
-    explicit Impl(const Matcher<U>& source_matcher)
-        : source_matcher_(source_matcher) {}
-
-    // We delegate the matching logic to the source matcher.
-    bool MatchAndExplain(T x, MatchResultListener* listener) const override {
-      using FromType = typename std::remove_cv<typename std::remove_pointer<
-          typename std::remove_reference<T>::type>::type>::type;
-      using ToType = typename std::remove_cv<typename std::remove_pointer<
-          typename std::remove_reference<U>::type>::type>::type;
-      // Do not allow implicitly converting base*/& to derived*/&.
-      static_assert(
-          // Do not trigger if only one of them is a pointer. That implies a
-          // regular conversion and not a down_cast.
-          (std::is_pointer<typename std::remove_reference<T>::type>::value !=
-           std::is_pointer<typename std::remove_reference<U>::type>::value) ||
-              std::is_same<FromType, ToType>::value ||
-              !std::is_base_of<FromType, ToType>::value,
-          "Can't implicitly convert from <base> to <derived>");
-
-      // Do the cast to `U` explicitly if necessary.
-      // Otherwise, let implicit conversions do the trick.
-      using CastType =
-          typename std::conditional<std::is_convertible<T&, const U&>::value,
-                                    T&, U>::type;
-
-      return source_matcher_.MatchAndExplain(static_cast<CastType>(x),
-                                             listener);
-    }
-
-    void DescribeTo(::std::ostream* os) const override {
-      source_matcher_.DescribeTo(os);
-    }
-
-    void DescribeNegationTo(::std::ostream* os) const override {
-      source_matcher_.DescribeNegationTo(os);
-    }
-
-   private:
-    const Matcher<U> source_matcher_;
-  };
-};
-
-// This even more specialized version is used for efficiently casting
-// a matcher to its own type.
-template <typename T>
-class MatcherCastImpl<T, Matcher<T> > {
- public:
-  static Matcher<T> Cast(const Matcher<T>& matcher) { return matcher; }
-};
-
-// Template specialization for parameterless Matcher.
-template <typename Derived>
-class MatcherBaseImpl {
- public:
-  MatcherBaseImpl() = default;
-
-  template <typename T>
-  operator ::testing::Matcher<T>() const {  // NOLINT(runtime/explicit)
-    return ::testing::Matcher<T>(new
-                                 typename Derived::template gmock_Impl<T>());
-  }
-};
-
-// Template specialization for Matcher with parameters.
-template <template <typename...> class Derived, typename... Ts>
-class MatcherBaseImpl<Derived<Ts...>> {
- public:
-  // Mark the constructor explicit for single argument T to avoid implicit
-  // conversions.
-  template <typename E = std::enable_if<sizeof...(Ts) == 1>,
-            typename E::type* = nullptr>
-  explicit MatcherBaseImpl(Ts... params)
-      : params_(std::forward<Ts>(params)...) {}
-  template <typename E = std::enable_if<sizeof...(Ts) != 1>,
-            typename = typename E::type>
-  MatcherBaseImpl(Ts... params)  // NOLINT
-      : params_(std::forward<Ts>(params)...) {}
-
-  template <typename F>
-  operator ::testing::Matcher<F>() const {  // NOLINT(runtime/explicit)
-    return Apply<F>(MakeIndexSequence<sizeof...(Ts)>{});
-  }
-
- private:
-  template <typename F, std::size_t... tuple_ids>
-  ::testing::Matcher<F> Apply(IndexSequence<tuple_ids...>) const {
-    return ::testing::Matcher<F>(
-        new typename Derived<Ts...>::template gmock_Impl<F>(
-            std::get<tuple_ids>(params_)...));
-  }
-
-  const std::tuple<Ts...> params_;
-};
-
-}  // namespace internal
-
-// In order to be safe and clear, casting between different matcher
-// types is done explicitly via MatcherCast<T>(m), which takes a
-// matcher m and returns a Matcher<T>.  It compiles only when T can be
-// statically converted to the argument type of m.
-template <typename T, typename M>
-inline Matcher<T> MatcherCast(const M& matcher) {
-  return internal::MatcherCastImpl<T, M>::Cast(matcher);
-}
-
-// This overload handles polymorphic matchers and values only since
-// monomorphic matchers are handled by the next one.
-template <typename T, typename M>
-inline Matcher<T> SafeMatcherCast(const M& polymorphic_matcher_or_value) {
-  return MatcherCast<T>(polymorphic_matcher_or_value);
-}
-
-// This overload handles monomorphic matchers.
-//
-// In general, if type T can be implicitly converted to type U, we can
-// safely convert a Matcher<U> to a Matcher<T> (i.e. Matcher is
-// contravariant): just keep a copy of the original Matcher<U>, convert the
-// argument from type T to U, and then pass it to the underlying Matcher<U>.
-// The only exception is when U is a reference and T is not, as the
-// underlying Matcher<U> may be interested in the argument's address, which
-// is not preserved in the conversion from T to U.
-template <typename T, typename U>
-inline Matcher<T> SafeMatcherCast(const Matcher<U>& matcher) {
-  // Enforce that T can be implicitly converted to U.
-  static_assert(std::is_convertible<const T&, const U&>::value,
-                "T must be implicitly convertible to U");
-  // Enforce that we are not converting a non-reference type T to a reference
-  // type U.
-  GTEST_COMPILE_ASSERT_(
-      std::is_reference<T>::value || !std::is_reference<U>::value,
-      cannot_convert_non_reference_arg_to_reference);
-  // In case both T and U are arithmetic types, enforce that the
-  // conversion is not lossy.
-  typedef GTEST_REMOVE_REFERENCE_AND_CONST_(T) RawT;
-  typedef GTEST_REMOVE_REFERENCE_AND_CONST_(U) RawU;
-  constexpr bool kTIsOther = GMOCK_KIND_OF_(RawT) == internal::kOther;
-  constexpr bool kUIsOther = GMOCK_KIND_OF_(RawU) == internal::kOther;
-  GTEST_COMPILE_ASSERT_(
-      kTIsOther || kUIsOther ||
-      (internal::LosslessArithmeticConvertible<RawT, RawU>::value),
-      conversion_of_arithmetic_types_must_be_lossless);
-  return MatcherCast<T>(matcher);
-}
-
-// A<T>() returns a matcher that matches any value of type T.
-template <typename T>
-Matcher<T> A();
-
-// Anything inside the 'internal' namespace IS INTERNAL IMPLEMENTATION
-// and MUST NOT BE USED IN USER CODE!!!
-namespace internal {
-
-// If the explanation is not empty, prints it to the ostream.
-inline void PrintIfNotEmpty(const std::string& explanation,
-                            ::std::ostream* os) {
-  if (explanation != "" && os != nullptr) {
-    *os << ", " << explanation;
-  }
-}
-
-// Returns true if the given type name is easy to read by a human.
-// This is used to decide whether printing the type of a value might
-// be helpful.
-inline bool IsReadableTypeName(const std::string& type_name) {
-  // We consider a type name readable if it's short or doesn't contain
-  // a template or function type.
-  return (type_name.length() <= 20 ||
-          type_name.find_first_of("<(") == std::string::npos);
-}
-
-// Matches the value against the given matcher, prints the value and explains
-// the match result to the listener. Returns the match result.
-// 'listener' must not be NULL.
-// Value cannot be passed by const reference, because some matchers take a
-// non-const argument.
-template <typename Value, typename T>
-bool MatchPrintAndExplain(Value& value, const Matcher<T>& matcher,
-                          MatchResultListener* listener) {
-  if (!listener->IsInterested()) {
-    // If the listener is not interested, we do not need to construct the
-    // inner explanation.
-    return matcher.Matches(value);
-  }
-
-  StringMatchResultListener inner_listener;
-  const bool match = matcher.MatchAndExplain(value, &inner_listener);
-
-  UniversalPrint(value, listener->stream());
-#if GTEST_HAS_RTTI
-  const std::string& type_name = GetTypeName<Value>();
-  if (IsReadableTypeName(type_name))
-    *listener->stream() << " (of type " << type_name << ")";
-#endif
-  PrintIfNotEmpty(inner_listener.str(), listener->stream());
-
-  return match;
-}
-
-// An internal helper class for doing compile-time loop on a tuple's
-// fields.
-template <size_t N>
-class TuplePrefix {
- public:
-  // TuplePrefix<N>::Matches(matcher_tuple, value_tuple) returns true
-  // if and only if the first N fields of matcher_tuple matches
-  // the first N fields of value_tuple, respectively.
-  template <typename MatcherTuple, typename ValueTuple>
-  static bool Matches(const MatcherTuple& matcher_tuple,
-                      const ValueTuple& value_tuple) {
-    return TuplePrefix<N - 1>::Matches(matcher_tuple, value_tuple) &&
-           std::get<N - 1>(matcher_tuple).Matches(std::get<N - 1>(value_tuple));
-  }
-
-  // TuplePrefix<N>::ExplainMatchFailuresTo(matchers, values, os)
-  // describes failures in matching the first N fields of matchers
-  // against the first N fields of values.  If there is no failure,
-  // nothing will be streamed to os.
-  template <typename MatcherTuple, typename ValueTuple>
-  static void ExplainMatchFailuresTo(const MatcherTuple& matchers,
-                                     const ValueTuple& values,
-                                     ::std::ostream* os) {
-    // First, describes failures in the first N - 1 fields.
-    TuplePrefix<N - 1>::ExplainMatchFailuresTo(matchers, values, os);
-
-    // Then describes the failure (if any) in the (N - 1)-th (0-based)
-    // field.
-    typename std::tuple_element<N - 1, MatcherTuple>::type matcher =
-        std::get<N - 1>(matchers);
-    typedef typename std::tuple_element<N - 1, ValueTuple>::type Value;
-    const Value& value = std::get<N - 1>(values);
-    StringMatchResultListener listener;
-    if (!matcher.MatchAndExplain(value, &listener)) {
-      *os << "  Expected arg #" << N - 1 << ": ";
-      std::get<N - 1>(matchers).DescribeTo(os);
-      *os << "\n           Actual: ";
-      // We remove the reference in type Value to prevent the
-      // universal printer from printing the address of value, which
-      // isn't interesting to the user most of the time.  The
-      // matcher's MatchAndExplain() method handles the case when
-      // the address is interesting.
-      internal::UniversalPrint(value, os);
-      PrintIfNotEmpty(listener.str(), os);
-      *os << "\n";
-    }
-  }
-};
-
-// The base case.
-template <>
-class TuplePrefix<0> {
- public:
-  template <typename MatcherTuple, typename ValueTuple>
-  static bool Matches(const MatcherTuple& /* matcher_tuple */,
-                      const ValueTuple& /* value_tuple */) {
-    return true;
-  }
-
-  template <typename MatcherTuple, typename ValueTuple>
-  static void ExplainMatchFailuresTo(const MatcherTuple& /* matchers */,
-                                     const ValueTuple& /* values */,
-                                     ::std::ostream* /* os */) {}
-};
-
-// TupleMatches(matcher_tuple, value_tuple) returns true if and only if
-// all matchers in matcher_tuple match the corresponding fields in
-// value_tuple.  It is a compiler error if matcher_tuple and
-// value_tuple have different number of fields or incompatible field
-// types.
-template <typename MatcherTuple, typename ValueTuple>
-bool TupleMatches(const MatcherTuple& matcher_tuple,
-                  const ValueTuple& value_tuple) {
-  // Makes sure that matcher_tuple and value_tuple have the same
-  // number of fields.
-  GTEST_COMPILE_ASSERT_(std::tuple_size<MatcherTuple>::value ==
-                            std::tuple_size<ValueTuple>::value,
-                        matcher_and_value_have_different_numbers_of_fields);
-  return TuplePrefix<std::tuple_size<ValueTuple>::value>::Matches(matcher_tuple,
-                                                                  value_tuple);
-}
-
-// Describes failures in matching matchers against values.  If there
-// is no failure, nothing will be streamed to os.
-template <typename MatcherTuple, typename ValueTuple>
-void ExplainMatchFailureTupleTo(const MatcherTuple& matchers,
-                                const ValueTuple& values,
-                                ::std::ostream* os) {
-  TuplePrefix<std::tuple_size<MatcherTuple>::value>::ExplainMatchFailuresTo(
-      matchers, values, os);
-}
-
-// TransformTupleValues and its helper.
-//
-// TransformTupleValuesHelper hides the internal machinery that
-// TransformTupleValues uses to implement a tuple traversal.
-template <typename Tuple, typename Func, typename OutIter>
-class TransformTupleValuesHelper {
- private:
-  typedef ::std::tuple_size<Tuple> TupleSize;
-
- public:
-  // For each member of tuple 't', taken in order, evaluates '*out++ = f(t)'.
-  // Returns the final value of 'out' in case the caller needs it.
-  static OutIter Run(Func f, const Tuple& t, OutIter out) {
-    return IterateOverTuple<Tuple, TupleSize::value>()(f, t, out);
-  }
-
- private:
-  template <typename Tup, size_t kRemainingSize>
-  struct IterateOverTuple {
-    OutIter operator() (Func f, const Tup& t, OutIter out) const {
-      *out++ = f(::std::get<TupleSize::value - kRemainingSize>(t));
-      return IterateOverTuple<Tup, kRemainingSize - 1>()(f, t, out);
-    }
-  };
-  template <typename Tup>
-  struct IterateOverTuple<Tup, 0> {
-    OutIter operator() (Func /* f */, const Tup& /* t */, OutIter out) const {
-      return out;
-    }
-  };
-};
-
-// Successively invokes 'f(element)' on each element of the tuple 't',
-// appending each result to the 'out' iterator. Returns the final value
-// of 'out'.
-template <typename Tuple, typename Func, typename OutIter>
-OutIter TransformTupleValues(Func f, const Tuple& t, OutIter out) {
-  return TransformTupleValuesHelper<Tuple, Func, OutIter>::Run(f, t, out);
-}
-
-// Implements _, a matcher that matches any value of any
-// type.  This is a polymorphic matcher, so we need a template type
-// conversion operator to make it appearing as a Matcher<T> for any
-// type T.
-class AnythingMatcher {
- public:
-  using is_gtest_matcher = void;
-
-  template <typename T>
-  bool MatchAndExplain(const T& /* x */, std::ostream* /* listener */) const {
-    return true;
-  }
-  void DescribeTo(std::ostream* os) const { *os << "is anything"; }
-  void DescribeNegationTo(::std::ostream* os) const {
-    // This is mostly for completeness' sake, as it's not very useful
-    // to write Not(A<bool>()).  However we cannot completely rule out
-    // such a possibility, and it doesn't hurt to be prepared.
-    *os << "never matches";
-  }
-};
-
-// Implements the polymorphic IsNull() matcher, which matches any raw or smart
-// pointer that is NULL.
-class IsNullMatcher {
- public:
-  template <typename Pointer>
-  bool MatchAndExplain(const Pointer& p,
-                       MatchResultListener* /* listener */) const {
-    return p == nullptr;
-  }
-
-  void DescribeTo(::std::ostream* os) const { *os << "is NULL"; }
-  void DescribeNegationTo(::std::ostream* os) const {
-    *os << "isn't NULL";
-  }
-};
-
-// Implements the polymorphic NotNull() matcher, which matches any raw or smart
-// pointer that is not NULL.
-class NotNullMatcher {
- public:
-  template <typename Pointer>
-  bool MatchAndExplain(const Pointer& p,
-                       MatchResultListener* /* listener */) const {
-    return p != nullptr;
-  }
-
-  void DescribeTo(::std::ostream* os) const { *os << "isn't NULL"; }
-  void DescribeNegationTo(::std::ostream* os) const {
-    *os << "is NULL";
-  }
-};
-
-// Ref(variable) matches any argument that is a reference to
-// 'variable'.  This matcher is polymorphic as it can match any
-// super type of the type of 'variable'.
-//
-// The RefMatcher template class implements Ref(variable).  It can
-// only be instantiated with a reference type.  This prevents a user
-// from mistakenly using Ref(x) to match a non-reference function
-// argument.  For example, the following will righteously cause a
-// compiler error:
-//
-//   int n;
-//   Matcher<int> m1 = Ref(n);   // This won't compile.
-//   Matcher<int&> m2 = Ref(n);  // This will compile.
-template <typename T>
-class RefMatcher;
-
-template <typename T>
-class RefMatcher<T&> {
-  // Google Mock is a generic framework and thus needs to support
-  // mocking any function types, including those that take non-const
-  // reference arguments.  Therefore the template parameter T (and
-  // Super below) can be instantiated to either a const type or a
-  // non-const type.
- public:
-  // RefMatcher() takes a T& instead of const T&, as we want the
-  // compiler to catch using Ref(const_value) as a matcher for a
-  // non-const reference.
-  explicit RefMatcher(T& x) : object_(x) {}  // NOLINT
-
-  template <typename Super>
-  operator Matcher<Super&>() const {
-    // By passing object_ (type T&) to Impl(), which expects a Super&,
-    // we make sure that Super is a super type of T.  In particular,
-    // this catches using Ref(const_value) as a matcher for a
-    // non-const reference, as you cannot implicitly convert a const
-    // reference to a non-const reference.
-    return MakeMatcher(new Impl<Super>(object_));
-  }
-
- private:
-  template <typename Super>
-  class Impl : public MatcherInterface<Super&> {
-   public:
-    explicit Impl(Super& x) : object_(x) {}  // NOLINT
-
-    // MatchAndExplain() takes a Super& (as opposed to const Super&)
-    // in order to match the interface MatcherInterface<Super&>.
-    bool MatchAndExplain(Super& x,
-                         MatchResultListener* listener) const override {
-      *listener << "which is located @" << static_cast<const void*>(&x);
-      return &x == &object_;
-    }
-
-    void DescribeTo(::std::ostream* os) const override {
-      *os << "references the variable ";
-      UniversalPrinter<Super&>::Print(object_, os);
-    }
-
-    void DescribeNegationTo(::std::ostream* os) const override {
-      *os << "does not reference the variable ";
-      UniversalPrinter<Super&>::Print(object_, os);
-    }
-
-   private:
-    const Super& object_;
-  };
-
-  T& object_;
-};
-
-// Polymorphic helper functions for narrow and wide string matchers.
-inline bool CaseInsensitiveCStringEquals(const char* lhs, const char* rhs) {
-  return String::CaseInsensitiveCStringEquals(lhs, rhs);
-}
-
-inline bool CaseInsensitiveCStringEquals(const wchar_t* lhs,
-                                         const wchar_t* rhs) {
-  return String::CaseInsensitiveWideCStringEquals(lhs, rhs);
-}
-
-// String comparison for narrow or wide strings that can have embedded NUL
-// characters.
-template <typename StringType>
-bool CaseInsensitiveStringEquals(const StringType& s1,
-                                 const StringType& s2) {
-  // Are the heads equal?
-  if (!CaseInsensitiveCStringEquals(s1.c_str(), s2.c_str())) {
-    return false;
-  }
-
-  // Skip the equal heads.
-  const typename StringType::value_type nul = 0;
-  const size_t i1 = s1.find(nul), i2 = s2.find(nul);
-
-  // Are we at the end of either s1 or s2?
-  if (i1 == StringType::npos || i2 == StringType::npos) {
-    return i1 == i2;
-  }
-
-  // Are the tails equal?
-  return CaseInsensitiveStringEquals(s1.substr(i1 + 1), s2.substr(i2 + 1));
-}
-
-// String matchers.
-
-// Implements equality-based string matchers like StrEq, StrCaseNe, and etc.
-template <typename StringType>
-class StrEqualityMatcher {
- public:
-  StrEqualityMatcher(StringType str, bool expect_eq, bool case_sensitive)
-      : string_(std::move(str)),
-        expect_eq_(expect_eq),
-        case_sensitive_(case_sensitive) {}
-
-#if GTEST_INTERNAL_HAS_STRING_VIEW
-  bool MatchAndExplain(const internal::StringView& s,
-                       MatchResultListener* listener) const {
-    // This should fail to compile if StringView is used with wide
-    // strings.
-    const StringType& str = std::string(s);
-    return MatchAndExplain(str, listener);
-  }
-#endif  // GTEST_INTERNAL_HAS_STRING_VIEW
-
-  // Accepts pointer types, particularly:
-  //   const char*
-  //   char*
-  //   const wchar_t*
-  //   wchar_t*
-  template <typename CharType>
-  bool MatchAndExplain(CharType* s, MatchResultListener* listener) const {
-    if (s == nullptr) {
-      return !expect_eq_;
-    }
-    return MatchAndExplain(StringType(s), listener);
-  }
-
-  // Matches anything that can convert to StringType.
-  //
-  // This is a template, not just a plain function with const StringType&,
-  // because StringView has some interfering non-explicit constructors.
-  template <typename MatcheeStringType>
-  bool MatchAndExplain(const MatcheeStringType& s,
-                       MatchResultListener* /* listener */) const {
-    const StringType s2(s);
-    const bool eq = case_sensitive_ ? s2 == string_ :
-        CaseInsensitiveStringEquals(s2, string_);
-    return expect_eq_ == eq;
-  }
-
-  void DescribeTo(::std::ostream* os) const {
-    DescribeToHelper(expect_eq_, os);
-  }
-
-  void DescribeNegationTo(::std::ostream* os) const {
-    DescribeToHelper(!expect_eq_, os);
-  }
-
- private:
-  void DescribeToHelper(bool expect_eq, ::std::ostream* os) const {
-    *os << (expect_eq ? "is " : "isn't ");
-    *os << "equal to ";
-    if (!case_sensitive_) {
-      *os << "(ignoring case) ";
-    }
-    UniversalPrint(string_, os);
-  }
-
-  const StringType string_;
-  const bool expect_eq_;
-  const bool case_sensitive_;
-};
-
-// Implements the polymorphic HasSubstr(substring) matcher, which
-// can be used as a Matcher<T> as long as T can be converted to a
-// string.
-template <typename StringType>
-class HasSubstrMatcher {
- public:
-  explicit HasSubstrMatcher(const StringType& substring)
-      : substring_(substring) {}
-
-#if GTEST_INTERNAL_HAS_STRING_VIEW
-  bool MatchAndExplain(const internal::StringView& s,
-                       MatchResultListener* listener) const {
-    // This should fail to compile if StringView is used with wide
-    // strings.
-    const StringType& str = std::string(s);
-    return MatchAndExplain(str, listener);
-  }
-#endif  // GTEST_INTERNAL_HAS_STRING_VIEW
-
-  // Accepts pointer types, particularly:
-  //   const char*
-  //   char*
-  //   const wchar_t*
-  //   wchar_t*
-  template <typename CharType>
-  bool MatchAndExplain(CharType* s, MatchResultListener* listener) const {
-    return s != nullptr && MatchAndExplain(StringType(s), listener);
-  }
-
-  // Matches anything that can convert to StringType.
-  //
-  // This is a template, not just a plain function with const StringType&,
-  // because StringView has some interfering non-explicit constructors.
-  template <typename MatcheeStringType>
-  bool MatchAndExplain(const MatcheeStringType& s,
-                       MatchResultListener* /* listener */) const {
-    return StringType(s).find(substring_) != StringType::npos;
-  }
-
-  // Describes what this matcher matches.
-  void DescribeTo(::std::ostream* os) const {
-    *os << "has substring ";
-    UniversalPrint(substring_, os);
-  }
-
-  void DescribeNegationTo(::std::ostream* os) const {
-    *os << "has no substring ";
-    UniversalPrint(substring_, os);
-  }
-
- private:
-  const StringType substring_;
-};
-
-// Implements the polymorphic StartsWith(substring) matcher, which
-// can be used as a Matcher<T> as long as T can be converted to a
-// string.
-template <typename StringType>
-class StartsWithMatcher {
- public:
-  explicit StartsWithMatcher(const StringType& prefix) : prefix_(prefix) {
-  }
-
-#if GTEST_INTERNAL_HAS_STRING_VIEW
-  bool MatchAndExplain(const internal::StringView& s,
-                       MatchResultListener* listener) const {
-    // This should fail to compile if StringView is used with wide
-    // strings.
-    const StringType& str = std::string(s);
-    return MatchAndExplain(str, listener);
-  }
-#endif  // GTEST_INTERNAL_HAS_STRING_VIEW
-
-  // Accepts pointer types, particularly:
-  //   const char*
-  //   char*
-  //   const wchar_t*
-  //   wchar_t*
-  template <typename CharType>
-  bool MatchAndExplain(CharType* s, MatchResultListener* listener) const {
-    return s != nullptr && MatchAndExplain(StringType(s), listener);
-  }
-
-  // Matches anything that can convert to StringType.
-  //
-  // This is a template, not just a plain function with const StringType&,
-  // because StringView has some interfering non-explicit constructors.
-  template <typename MatcheeStringType>
-  bool MatchAndExplain(const MatcheeStringType& s,
-                       MatchResultListener* /* listener */) const {
-    const StringType& s2(s);
-    return s2.length() >= prefix_.length() &&
-        s2.substr(0, prefix_.length()) == prefix_;
-  }
-
-  void DescribeTo(::std::ostream* os) const {
-    *os << "starts with ";
-    UniversalPrint(prefix_, os);
-  }
-
-  void DescribeNegationTo(::std::ostream* os) const {
-    *os << "doesn't start with ";
-    UniversalPrint(prefix_, os);
-  }
-
- private:
-  const StringType prefix_;
-};
-
-// Implements the polymorphic EndsWith(substring) matcher, which
-// can be used as a Matcher<T> as long as T can be converted to a
-// string.
-template <typename StringType>
-class EndsWithMatcher {
- public:
-  explicit EndsWithMatcher(const StringType& suffix) : suffix_(suffix) {}
-
-#if GTEST_INTERNAL_HAS_STRING_VIEW
-  bool MatchAndExplain(const internal::StringView& s,
-                       MatchResultListener* listener) const {
-    // This should fail to compile if StringView is used with wide
-    // strings.
-    const StringType& str = std::string(s);
-    return MatchAndExplain(str, listener);
-  }
-#endif  // GTEST_INTERNAL_HAS_STRING_VIEW
-
-  // Accepts pointer types, particularly:
-  //   const char*
-  //   char*
-  //   const wchar_t*
-  //   wchar_t*
-  template <typename CharType>
-  bool MatchAndExplain(CharType* s, MatchResultListener* listener) const {
-    return s != nullptr && MatchAndExplain(StringType(s), listener);
-  }
-
-  // Matches anything that can convert to StringType.
-  //
-  // This is a template, not just a plain function with const StringType&,
-  // because StringView has some interfering non-explicit constructors.
-  template <typename MatcheeStringType>
-  bool MatchAndExplain(const MatcheeStringType& s,
-                       MatchResultListener* /* listener */) const {
-    const StringType& s2(s);
-    return s2.length() >= suffix_.length() &&
-        s2.substr(s2.length() - suffix_.length()) == suffix_;
-  }
-
-  void DescribeTo(::std::ostream* os) const {
-    *os << "ends with ";
-    UniversalPrint(suffix_, os);
-  }
-
-  void DescribeNegationTo(::std::ostream* os) const {
-    *os << "doesn't end with ";
-    UniversalPrint(suffix_, os);
-  }
-
- private:
-  const StringType suffix_;
-};
-
-// Implements a matcher that compares the two fields of a 2-tuple
-// using one of the ==, <=, <, etc, operators.  The two fields being
-// compared don't have to have the same type.
-//
-// The matcher defined here is polymorphic (for example, Eq() can be
-// used to match a std::tuple<int, short>, a std::tuple<const long&, double>,
-// etc).  Therefore we use a template type conversion operator in the
-// implementation.
-template <typename D, typename Op>
-class PairMatchBase {
- public:
-  template <typename T1, typename T2>
-  operator Matcher<::std::tuple<T1, T2>>() const {
-    return Matcher<::std::tuple<T1, T2>>(new Impl<const ::std::tuple<T1, T2>&>);
-  }
-  template <typename T1, typename T2>
-  operator Matcher<const ::std::tuple<T1, T2>&>() const {
-    return MakeMatcher(new Impl<const ::std::tuple<T1, T2>&>);
-  }
-
- private:
-  static ::std::ostream& GetDesc(::std::ostream& os) {  // NOLINT
-    return os << D::Desc();
-  }
-
-  template <typename Tuple>
-  class Impl : public MatcherInterface<Tuple> {
-   public:
-    bool MatchAndExplain(Tuple args,
-                         MatchResultListener* /* listener */) const override {
-      return Op()(::std::get<0>(args), ::std::get<1>(args));
-    }
-    void DescribeTo(::std::ostream* os) const override {
-      *os << "are " << GetDesc;
-    }
-    void DescribeNegationTo(::std::ostream* os) const override {
-      *os << "aren't " << GetDesc;
-    }
-  };
-};
-
-class Eq2Matcher : public PairMatchBase<Eq2Matcher, AnyEq> {
- public:
-  static const char* Desc() { return "an equal pair"; }
-};
-class Ne2Matcher : public PairMatchBase<Ne2Matcher, AnyNe> {
- public:
-  static const char* Desc() { return "an unequal pair"; }
-};
-class Lt2Matcher : public PairMatchBase<Lt2Matcher, AnyLt> {
- public:
-  static const char* Desc() { return "a pair where the first < the second"; }
-};
-class Gt2Matcher : public PairMatchBase<Gt2Matcher, AnyGt> {
- public:
-  static const char* Desc() { return "a pair where the first > the second"; }
-};
-class Le2Matcher : public PairMatchBase<Le2Matcher, AnyLe> {
- public:
-  static const char* Desc() { return "a pair where the first <= the second"; }
-};
-class Ge2Matcher : public PairMatchBase<Ge2Matcher, AnyGe> {
- public:
-  static const char* Desc() { return "a pair where the first >= the second"; }
-};
-
-// Implements the Not(...) matcher for a particular argument type T.
-// We do not nest it inside the NotMatcher class template, as that
-// will prevent different instantiations of NotMatcher from sharing
-// the same NotMatcherImpl<T> class.
-template <typename T>
-class NotMatcherImpl : public MatcherInterface<const T&> {
- public:
-  explicit NotMatcherImpl(const Matcher<T>& matcher)
-      : matcher_(matcher) {}
-
-  bool MatchAndExplain(const T& x,
-                       MatchResultListener* listener) const override {
-    return !matcher_.MatchAndExplain(x, listener);
-  }
-
-  void DescribeTo(::std::ostream* os) const override {
-    matcher_.DescribeNegationTo(os);
-  }
-
-  void DescribeNegationTo(::std::ostream* os) const override {
-    matcher_.DescribeTo(os);
-  }
-
- private:
-  const Matcher<T> matcher_;
-};
-
-// Implements the Not(m) matcher, which matches a value that doesn't
-// match matcher m.
-template <typename InnerMatcher>
-class NotMatcher {
- public:
-  explicit NotMatcher(InnerMatcher matcher) : matcher_(matcher) {}
-
-  // This template type conversion operator allows Not(m) to be used
-  // to match any type m can match.
-  template <typename T>
-  operator Matcher<T>() const {
-    return Matcher<T>(new NotMatcherImpl<T>(SafeMatcherCast<T>(matcher_)));
-  }
-
- private:
-  InnerMatcher matcher_;
-};
-
-// Implements the AllOf(m1, m2) matcher for a particular argument type
-// T. We do not nest it inside the BothOfMatcher class template, as
-// that will prevent different instantiations of BothOfMatcher from
-// sharing the same BothOfMatcherImpl<T> class.
-template <typename T>
-class AllOfMatcherImpl : public MatcherInterface<const T&> {
- public:
-  explicit AllOfMatcherImpl(std::vector<Matcher<T> > matchers)
-      : matchers_(std::move(matchers)) {}
-
-  void DescribeTo(::std::ostream* os) const override {
-    *os << "(";
-    for (size_t i = 0; i < matchers_.size(); ++i) {
-      if (i != 0) *os << ") and (";
-      matchers_[i].DescribeTo(os);
-    }
-    *os << ")";
-  }
-
-  void DescribeNegationTo(::std::ostream* os) const override {
-    *os << "(";
-    for (size_t i = 0; i < matchers_.size(); ++i) {
-      if (i != 0) *os << ") or (";
-      matchers_[i].DescribeNegationTo(os);
-    }
-    *os << ")";
-  }
-
-  bool MatchAndExplain(const T& x,
-                       MatchResultListener* listener) const override {
-    // If either matcher1_ or matcher2_ doesn't match x, we only need
-    // to explain why one of them fails.
-    std::string all_match_result;
-
-    for (size_t i = 0; i < matchers_.size(); ++i) {
-      StringMatchResultListener slistener;
-      if (matchers_[i].MatchAndExplain(x, &slistener)) {
-        if (all_match_result.empty()) {
-          all_match_result = slistener.str();
-        } else {
-          std::string result = slistener.str();
-          if (!result.empty()) {
-            all_match_result += ", and ";
-            all_match_result += result;
-          }
-        }
-      } else {
-        *listener << slistener.str();
-        return false;
-      }
-    }
-
-    // Otherwise we need to explain why *both* of them match.
-    *listener << all_match_result;
-    return true;
-  }
-
- private:
-  const std::vector<Matcher<T> > matchers_;
-};
-
-// VariadicMatcher is used for the variadic implementation of
-// AllOf(m_1, m_2, ...) and AnyOf(m_1, m_2, ...).
-// CombiningMatcher<T> is used to recursively combine the provided matchers
-// (of type Args...).
-template <template <typename T> class CombiningMatcher, typename... Args>
-class VariadicMatcher {
- public:
-  VariadicMatcher(const Args&... matchers)  // NOLINT
-      : matchers_(matchers...) {
-    static_assert(sizeof...(Args) > 0, "Must have at least one matcher.");
-  }
-
-  VariadicMatcher(const VariadicMatcher&) = default;
-  VariadicMatcher& operator=(const VariadicMatcher&) = delete;
-
-  // This template type conversion operator allows an
-  // VariadicMatcher<Matcher1, Matcher2...> object to match any type that
-  // all of the provided matchers (Matcher1, Matcher2, ...) can match.
-  template <typename T>
-  operator Matcher<T>() const {
-    std::vector<Matcher<T> > values;
-    CreateVariadicMatcher<T>(&values, std::integral_constant<size_t, 0>());
-    return Matcher<T>(new CombiningMatcher<T>(std::move(values)));
-  }
-
- private:
-  template <typename T, size_t I>
-  void CreateVariadicMatcher(std::vector<Matcher<T> >* values,
-                             std::integral_constant<size_t, I>) const {
-    values->push_back(SafeMatcherCast<T>(std::get<I>(matchers_)));
-    CreateVariadicMatcher<T>(values, std::integral_constant<size_t, I + 1>());
-  }
-
-  template <typename T>
-  void CreateVariadicMatcher(
-      std::vector<Matcher<T> >*,
-      std::integral_constant<size_t, sizeof...(Args)>) const {}
-
-  std::tuple<Args...> matchers_;
-};
-
-template <typename... Args>
-using AllOfMatcher = VariadicMatcher<AllOfMatcherImpl, Args...>;
-
-// Implements the AnyOf(m1, m2) matcher for a particular argument type
-// T.  We do not nest it inside the AnyOfMatcher class template, as
-// that will prevent different instantiations of AnyOfMatcher from
-// sharing the same EitherOfMatcherImpl<T> class.
-template <typename T>
-class AnyOfMatcherImpl : public MatcherInterface<const T&> {
- public:
-  explicit AnyOfMatcherImpl(std::vector<Matcher<T> > matchers)
-      : matchers_(std::move(matchers)) {}
-
-  void DescribeTo(::std::ostream* os) const override {
-    *os << "(";
-    for (size_t i = 0; i < matchers_.size(); ++i) {
-      if (i != 0) *os << ") or (";
-      matchers_[i].DescribeTo(os);
-    }
-    *os << ")";
-  }
-
-  void DescribeNegationTo(::std::ostream* os) const override {
-    *os << "(";
-    for (size_t i = 0; i < matchers_.size(); ++i) {
-      if (i != 0) *os << ") and (";
-      matchers_[i].DescribeNegationTo(os);
-    }
-    *os << ")";
-  }
-
-  bool MatchAndExplain(const T& x,
-                       MatchResultListener* listener) const override {
-    std::string no_match_result;
-
-    // If either matcher1_ or matcher2_ matches x, we just need to
-    // explain why *one* of them matches.
-    for (size_t i = 0; i < matchers_.size(); ++i) {
-      StringMatchResultListener slistener;
-      if (matchers_[i].MatchAndExplain(x, &slistener)) {
-        *listener << slistener.str();
-        return true;
-      } else {
-        if (no_match_result.empty()) {
-          no_match_result = slistener.str();
-        } else {
-          std::string result = slistener.str();
-          if (!result.empty()) {
-            no_match_result += ", and ";
-            no_match_result += result;
-          }
-        }
-      }
-    }
-
-    // Otherwise we need to explain why *both* of them fail.
-    *listener << no_match_result;
-    return false;
-  }
-
- private:
-  const std::vector<Matcher<T> > matchers_;
-};
-
-// AnyOfMatcher is used for the variadic implementation of AnyOf(m_1, m_2, ...).
-template <typename... Args>
-using AnyOfMatcher = VariadicMatcher<AnyOfMatcherImpl, Args...>;
-
-// ConditionalMatcher is the implementation of Conditional(cond, m1, m2)
-template <typename MatcherTrue, typename MatcherFalse>
-class ConditionalMatcher {
- public:
-  ConditionalMatcher(bool condition, MatcherTrue matcher_true,
-                     MatcherFalse matcher_false)
-      : condition_(condition),
-        matcher_true_(std::move(matcher_true)),
-        matcher_false_(std::move(matcher_false)) {}
-
-  template <typename T>
-  operator Matcher<T>() const {  // NOLINT(runtime/explicit)
-    return condition_ ? SafeMatcherCast<T>(matcher_true_)
-                      : SafeMatcherCast<T>(matcher_false_);
-  }
-
- private:
-  bool condition_;
-  MatcherTrue matcher_true_;
-  MatcherFalse matcher_false_;
-
-  GTEST_DISALLOW_ASSIGN_(ConditionalMatcher);
-};
-
-// Wrapper for implementation of Any/AllOfArray().
-template <template <class> class MatcherImpl, typename T>
-class SomeOfArrayMatcher {
- public:
-  // Constructs the matcher from a sequence of element values or
-  // element matchers.
-  template <typename Iter>
-  SomeOfArrayMatcher(Iter first, Iter last) : matchers_(first, last) {}
-
-  template <typename U>
-  operator Matcher<U>() const {  // NOLINT
-    using RawU = typename std::decay<U>::type;
-    std::vector<Matcher<RawU>> matchers;
-    for (const auto& matcher : matchers_) {
-      matchers.push_back(MatcherCast<RawU>(matcher));
-    }
-    return Matcher<U>(new MatcherImpl<RawU>(std::move(matchers)));
-  }
-
- private:
-  const ::std::vector<T> matchers_;
-};
-
-template <typename T>
-using AllOfArrayMatcher = SomeOfArrayMatcher<AllOfMatcherImpl, T>;
-
-template <typename T>
-using AnyOfArrayMatcher = SomeOfArrayMatcher<AnyOfMatcherImpl, T>;
-
-// Used for implementing Truly(pred), which turns a predicate into a
-// matcher.
-template <typename Predicate>
-class TrulyMatcher {
- public:
-  explicit TrulyMatcher(Predicate pred) : predicate_(pred) {}
-
-  // This method template allows Truly(pred) to be used as a matcher
-  // for type T where T is the argument type of predicate 'pred'.  The
-  // argument is passed by reference as the predicate may be
-  // interested in the address of the argument.
-  template <typename T>
-  bool MatchAndExplain(T& x,  // NOLINT
-                       MatchResultListener* listener) const {
-    // Without the if-statement, MSVC sometimes warns about converting
-    // a value to bool (warning 4800).
-    //
-    // We cannot write 'return !!predicate_(x);' as that doesn't work
-    // when predicate_(x) returns a class convertible to bool but
-    // having no operator!().
-    if (predicate_(x))
-      return true;
-    *listener << "didn't satisfy the given predicate";
-    return false;
-  }
-
-  void DescribeTo(::std::ostream* os) const {
-    *os << "satisfies the given predicate";
-  }
-
-  void DescribeNegationTo(::std::ostream* os) const {
-    *os << "doesn't satisfy the given predicate";
-  }
-
- private:
-  Predicate predicate_;
-};
-
-// Used for implementing Matches(matcher), which turns a matcher into
-// a predicate.
-template <typename M>
-class MatcherAsPredicate {
- public:
-  explicit MatcherAsPredicate(M matcher) : matcher_(matcher) {}
-
-  // This template operator() allows Matches(m) to be used as a
-  // predicate on type T where m is a matcher on type T.
-  //
-  // The argument x is passed by reference instead of by value, as
-  // some matcher may be interested in its address (e.g. as in
-  // Matches(Ref(n))(x)).
-  template <typename T>
-  bool operator()(const T& x) const {
-    // We let matcher_ commit to a particular type here instead of
-    // when the MatcherAsPredicate object was constructed.  This
-    // allows us to write Matches(m) where m is a polymorphic matcher
-    // (e.g. Eq(5)).
-    //
-    // If we write Matcher<T>(matcher_).Matches(x) here, it won't
-    // compile when matcher_ has type Matcher<const T&>; if we write
-    // Matcher<const T&>(matcher_).Matches(x) here, it won't compile
-    // when matcher_ has type Matcher<T>; if we just write
-    // matcher_.Matches(x), it won't compile when matcher_ is
-    // polymorphic, e.g. Eq(5).
-    //
-    // MatcherCast<const T&>() is necessary for making the code work
-    // in all of the above situations.
-    return MatcherCast<const T&>(matcher_).Matches(x);
-  }
-
- private:
-  M matcher_;
-};
-
-// For implementing ASSERT_THAT() and EXPECT_THAT().  The template
-// argument M must be a type that can be converted to a matcher.
-template <typename M>
-class PredicateFormatterFromMatcher {
- public:
-  explicit PredicateFormatterFromMatcher(M m) : matcher_(std::move(m)) {}
-
-  // This template () operator allows a PredicateFormatterFromMatcher
-  // object to act as a predicate-formatter suitable for using with
-  // Google Test's EXPECT_PRED_FORMAT1() macro.
-  template <typename T>
-  AssertionResult operator()(const char* value_text, const T& x) const {
-#ifndef __clang_analyzer__
-    // We convert matcher_ to a Matcher<const T&> *now* instead of
-    // when the PredicateFormatterFromMatcher object was constructed,
-    // as matcher_ may be polymorphic (e.g. NotNull()) and we won't
-    // know which type to instantiate it to until we actually see the
-    // type of x here.
-    //
-    // We write SafeMatcherCast<const T&>(matcher_) instead of
-    // Matcher<const T&>(matcher_), as the latter won't compile when
-    // matcher_ has type Matcher<T> (e.g. An<int>()).
-    // We don't write MatcherCast<const T&> either, as that allows
-    // potentially unsafe downcasting of the matcher argument.
-    const Matcher<const T&> matcher = SafeMatcherCast<const T&>(matcher_);
-
-    // The expected path here is that the matcher should match (i.e. that most
-    // tests pass) so optimize for this case.
-    if (matcher.Matches(x)) {
-      return AssertionSuccess();
-    }
-
-    ::std::stringstream ss;
-    ss << "Value of: " << value_text << "\n"
-       << "Expected: ";
-    matcher.DescribeTo(&ss);
-
-    // Rerun the matcher to "PrintAndExplain" the failure.
-    StringMatchResultListener listener;
-    if (MatchPrintAndExplain(x, matcher, &listener)) {
-      ss << "\n  The matcher failed on the initial attempt; but passed when "
-            "rerun to generate the explanation.";
-    }
-    ss << "\n  Actual: " << listener.str();
-    return AssertionFailure() << ss.str();
-#else
-    return AssertionSuccess();
-#endif
-  }
-
- private:
-  const M matcher_;
-};
-
-// A helper function for converting a matcher to a predicate-formatter
-// without the user needing to explicitly write the type.  This is
-// used for implementing ASSERT_THAT() and EXPECT_THAT().
-// Implementation detail: 'matcher' is received by-value to force decaying.
-template <typename M>
-inline PredicateFormatterFromMatcher<M>
-MakePredicateFormatterFromMatcher(M matcher) {
-  return PredicateFormatterFromMatcher<M>(std::move(matcher));
-}
-
-// Implements the polymorphic IsNan() matcher, which matches any floating type
-// value that is Nan.
-class IsNanMatcher {
- public:
-  template <typename FloatType>
-  bool MatchAndExplain(const FloatType& f,
-                       MatchResultListener* /* listener */) const {
-    return (::std::isnan)(f);
-  }
-
-  void DescribeTo(::std::ostream* os) const { *os << "is NaN"; }
-  void DescribeNegationTo(::std::ostream* os) const {
-    *os << "isn't NaN";
-  }
-};
-
-// Implements the polymorphic floating point equality matcher, which matches
-// two float values using ULP-based approximation or, optionally, a
-// user-specified epsilon.  The template is meant to be instantiated with
-// FloatType being either float or double.
-template <typename FloatType>
-class FloatingEqMatcher {
- public:
-  // Constructor for FloatingEqMatcher.
-  // The matcher's input will be compared with expected.  The matcher treats two
-  // NANs as equal if nan_eq_nan is true.  Otherwise, under IEEE standards,
-  // equality comparisons between NANs will always return false.  We specify a
-  // negative max_abs_error_ term to indicate that ULP-based approximation will
-  // be used for comparison.
-  FloatingEqMatcher(FloatType expected, bool nan_eq_nan) :
-    expected_(expected), nan_eq_nan_(nan_eq_nan), max_abs_error_(-1) {
-  }
-
-  // Constructor that supports a user-specified max_abs_error that will be used
-  // for comparison instead of ULP-based approximation.  The max absolute
-  // should be non-negative.
-  FloatingEqMatcher(FloatType expected, bool nan_eq_nan,
-                    FloatType max_abs_error)
-      : expected_(expected),
-        nan_eq_nan_(nan_eq_nan),
-        max_abs_error_(max_abs_error) {
-    GTEST_CHECK_(max_abs_error >= 0)
-        << ", where max_abs_error is" << max_abs_error;
-  }
-
-  // Implements floating point equality matcher as a Matcher<T>.
-  template <typename T>
-  class Impl : public MatcherInterface<T> {
-   public:
-    Impl(FloatType expected, bool nan_eq_nan, FloatType max_abs_error)
-        : expected_(expected),
-          nan_eq_nan_(nan_eq_nan),
-          max_abs_error_(max_abs_error) {}
-
-    bool MatchAndExplain(T value,
-                         MatchResultListener* listener) const override {
-      const FloatingPoint<FloatType> actual(value), expected(expected_);
-
-      // Compares NaNs first, if nan_eq_nan_ is true.
-      if (actual.is_nan() || expected.is_nan()) {
-        if (actual.is_nan() && expected.is_nan()) {
-          return nan_eq_nan_;
-        }
-        // One is nan; the other is not nan.
-        return false;
-      }
-      if (HasMaxAbsError()) {
-        // We perform an equality check so that inf will match inf, regardless
-        // of error bounds.  If the result of value - expected_ would result in
-        // overflow or if either value is inf, the default result is infinity,
-        // which should only match if max_abs_error_ is also infinity.
-        if (value == expected_) {
-          return true;
-        }
-
-        const FloatType diff = value - expected_;
-        if (::std::fabs(diff) <= max_abs_error_) {
-          return true;
-        }
-
-        if (listener->IsInterested()) {
-          *listener << "which is " << diff << " from " << expected_;
-        }
-        return false;
-      } else {
-        return actual.AlmostEquals(expected);
-      }
-    }
-
-    void DescribeTo(::std::ostream* os) const override {
-      // os->precision() returns the previously set precision, which we
-      // store to restore the ostream to its original configuration
-      // after outputting.
-      const ::std::streamsize old_precision = os->precision(
-          ::std::numeric_limits<FloatType>::digits10 + 2);
-      if (FloatingPoint<FloatType>(expected_).is_nan()) {
-        if (nan_eq_nan_) {
-          *os << "is NaN";
-        } else {
-          *os << "never matches";
-        }
-      } else {
-        *os << "is approximately " << expected_;
-        if (HasMaxAbsError()) {
-          *os << " (absolute error <= " << max_abs_error_ << ")";
-        }
-      }
-      os->precision(old_precision);
-    }
-
-    void DescribeNegationTo(::std::ostream* os) const override {
-      // As before, get original precision.
-      const ::std::streamsize old_precision = os->precision(
-          ::std::numeric_limits<FloatType>::digits10 + 2);
-      if (FloatingPoint<FloatType>(expected_).is_nan()) {
-        if (nan_eq_nan_) {
-          *os << "isn't NaN";
-        } else {
-          *os << "is anything";
-        }
-      } else {
-        *os << "isn't approximately " << expected_;
-        if (HasMaxAbsError()) {
-          *os << " (absolute error > " << max_abs_error_ << ")";
-        }
-      }
-      // Restore original precision.
-      os->precision(old_precision);
-    }
-
-   private:
-    bool HasMaxAbsError() const {
-      return max_abs_error_ >= 0;
-    }
-
-    const FloatType expected_;
-    const bool nan_eq_nan_;
-    // max_abs_error will be used for value comparison when >= 0.
-    const FloatType max_abs_error_;
-  };
-
-  // The following 3 type conversion operators allow FloatEq(expected) and
-  // NanSensitiveFloatEq(expected) to be used as a Matcher<float>, a
-  // Matcher<const float&>, or a Matcher<float&>, but nothing else.
-  operator Matcher<FloatType>() const {
-    return MakeMatcher(
-        new Impl<FloatType>(expected_, nan_eq_nan_, max_abs_error_));
-  }
-
-  operator Matcher<const FloatType&>() const {
-    return MakeMatcher(
-        new Impl<const FloatType&>(expected_, nan_eq_nan_, max_abs_error_));
-  }
-
-  operator Matcher<FloatType&>() const {
-    return MakeMatcher(
-        new Impl<FloatType&>(expected_, nan_eq_nan_, max_abs_error_));
-  }
-
- private:
-  const FloatType expected_;
-  const bool nan_eq_nan_;
-  // max_abs_error will be used for value comparison when >= 0.
-  const FloatType max_abs_error_;
-};
-
-// A 2-tuple ("binary") wrapper around FloatingEqMatcher:
-// FloatingEq2Matcher() matches (x, y) by matching FloatingEqMatcher(x, false)
-// against y, and FloatingEq2Matcher(e) matches FloatingEqMatcher(x, false, e)
-// against y. The former implements "Eq", the latter "Near". At present, there
-// is no version that compares NaNs as equal.
-template <typename FloatType>
-class FloatingEq2Matcher {
- public:
-  FloatingEq2Matcher() { Init(-1, false); }
-
-  explicit FloatingEq2Matcher(bool nan_eq_nan) { Init(-1, nan_eq_nan); }
-
-  explicit FloatingEq2Matcher(FloatType max_abs_error) {
-    Init(max_abs_error, false);
-  }
-
-  FloatingEq2Matcher(FloatType max_abs_error, bool nan_eq_nan) {
-    Init(max_abs_error, nan_eq_nan);
-  }
-
-  template <typename T1, typename T2>
-  operator Matcher<::std::tuple<T1, T2>>() const {
-    return MakeMatcher(
-        new Impl<::std::tuple<T1, T2>>(max_abs_error_, nan_eq_nan_));
-  }
-  template <typename T1, typename T2>
-  operator Matcher<const ::std::tuple<T1, T2>&>() const {
-    return MakeMatcher(
-        new Impl<const ::std::tuple<T1, T2>&>(max_abs_error_, nan_eq_nan_));
-  }
-
- private:
-  static ::std::ostream& GetDesc(::std::ostream& os) {  // NOLINT
-    return os << "an almost-equal pair";
-  }
-
-  template <typename Tuple>
-  class Impl : public MatcherInterface<Tuple> {
-   public:
-    Impl(FloatType max_abs_error, bool nan_eq_nan) :
-        max_abs_error_(max_abs_error),
-        nan_eq_nan_(nan_eq_nan) {}
-
-    bool MatchAndExplain(Tuple args,
-                         MatchResultListener* listener) const override {
-      if (max_abs_error_ == -1) {
-        FloatingEqMatcher<FloatType> fm(::std::get<0>(args), nan_eq_nan_);
-        return static_cast<Matcher<FloatType>>(fm).MatchAndExplain(
-            ::std::get<1>(args), listener);
-      } else {
-        FloatingEqMatcher<FloatType> fm(::std::get<0>(args), nan_eq_nan_,
-                                        max_abs_error_);
-        return static_cast<Matcher<FloatType>>(fm).MatchAndExplain(
-            ::std::get<1>(args), listener);
-      }
-    }
-    void DescribeTo(::std::ostream* os) const override {
-      *os << "are " << GetDesc;
-    }
-    void DescribeNegationTo(::std::ostream* os) const override {
-      *os << "aren't " << GetDesc;
-    }
-
-   private:
-    FloatType max_abs_error_;
-    const bool nan_eq_nan_;
-  };
-
-  void Init(FloatType max_abs_error_val, bool nan_eq_nan_val) {
-    max_abs_error_ = max_abs_error_val;
-    nan_eq_nan_ = nan_eq_nan_val;
-  }
-  FloatType max_abs_error_;
-  bool nan_eq_nan_;
-};
-
-// Implements the Pointee(m) matcher for matching a pointer whose
-// pointee matches matcher m.  The pointer can be either raw or smart.
-template <typename InnerMatcher>
-class PointeeMatcher {
- public:
-  explicit PointeeMatcher(const InnerMatcher& matcher) : matcher_(matcher) {}
-
-  // This type conversion operator template allows Pointee(m) to be
-  // used as a matcher for any pointer type whose pointee type is
-  // compatible with the inner matcher, where type Pointer can be
-  // either a raw pointer or a smart pointer.
-  //
-  // The reason we do this instead of relying on
-  // MakePolymorphicMatcher() is that the latter is not flexible
-  // enough for implementing the DescribeTo() method of Pointee().
-  template <typename Pointer>
-  operator Matcher<Pointer>() const {
-    return Matcher<Pointer>(new Impl<const Pointer&>(matcher_));
-  }
-
- private:
-  // The monomorphic implementation that works for a particular pointer type.
-  template <typename Pointer>
-  class Impl : public MatcherInterface<Pointer> {
-   public:
-    using Pointee =
-        typename std::pointer_traits<GTEST_REMOVE_REFERENCE_AND_CONST_(
-            Pointer)>::element_type;
-
-    explicit Impl(const InnerMatcher& matcher)
-        : matcher_(MatcherCast<const Pointee&>(matcher)) {}
-
-    void DescribeTo(::std::ostream* os) const override {
-      *os << "points to a value that ";
-      matcher_.DescribeTo(os);
-    }
-
-    void DescribeNegationTo(::std::ostream* os) const override {
-      *os << "does not point to a value that ";
-      matcher_.DescribeTo(os);
-    }
-
-    bool MatchAndExplain(Pointer pointer,
-                         MatchResultListener* listener) const override {
-      if (GetRawPointer(pointer) == nullptr) return false;
-
-      *listener << "which points to ";
-      return MatchPrintAndExplain(*pointer, matcher_, listener);
-    }
-
-   private:
-    const Matcher<const Pointee&> matcher_;
-  };
-
-  const InnerMatcher matcher_;
-};
-
-// Implements the Pointer(m) matcher
-// Implements the Pointer(m) matcher for matching a pointer that matches matcher
-// m.  The pointer can be either raw or smart, and will match `m` against the
-// raw pointer.
-template <typename InnerMatcher>
-class PointerMatcher {
- public:
-  explicit PointerMatcher(const InnerMatcher& matcher) : matcher_(matcher) {}
-
-  // This type conversion operator template allows Pointer(m) to be
-  // used as a matcher for any pointer type whose pointer type is
-  // compatible with the inner matcher, where type PointerType can be
-  // either a raw pointer or a smart pointer.
-  //
-  // The reason we do this instead of relying on
-  // MakePolymorphicMatcher() is that the latter is not flexible
-  // enough for implementing the DescribeTo() method of Pointer().
-  template <typename PointerType>
-  operator Matcher<PointerType>() const {  // NOLINT
-    return Matcher<PointerType>(new Impl<const PointerType&>(matcher_));
-  }
-
- private:
-  // The monomorphic implementation that works for a particular pointer type.
-  template <typename PointerType>
-  class Impl : public MatcherInterface<PointerType> {
-   public:
-    using Pointer =
-        const typename std::pointer_traits<GTEST_REMOVE_REFERENCE_AND_CONST_(
-            PointerType)>::element_type*;
-
-    explicit Impl(const InnerMatcher& matcher)
-        : matcher_(MatcherCast<Pointer>(matcher)) {}
-
-    void DescribeTo(::std::ostream* os) const override {
-      *os << "is a pointer that ";
-      matcher_.DescribeTo(os);
-    }
-
-    void DescribeNegationTo(::std::ostream* os) const override {
-      *os << "is not a pointer that ";
-      matcher_.DescribeTo(os);
-    }
-
-    bool MatchAndExplain(PointerType pointer,
-                         MatchResultListener* listener) const override {
-      *listener << "which is a pointer that ";
-      Pointer p = GetRawPointer(pointer);
-      return MatchPrintAndExplain(p, matcher_, listener);
-    }
-
-   private:
-    Matcher<Pointer> matcher_;
-  };
-
-  const InnerMatcher matcher_;
-};
-
-#if GTEST_HAS_RTTI
-// Implements the WhenDynamicCastTo<T>(m) matcher that matches a pointer or
-// reference that matches inner_matcher when dynamic_cast<T> is applied.
-// The result of dynamic_cast<To> is forwarded to the inner matcher.
-// If To is a pointer and the cast fails, the inner matcher will receive NULL.
-// If To is a reference and the cast fails, this matcher returns false
-// immediately.
-template <typename To>
-class WhenDynamicCastToMatcherBase {
- public:
-  explicit WhenDynamicCastToMatcherBase(const Matcher<To>& matcher)
-      : matcher_(matcher) {}
-
-  void DescribeTo(::std::ostream* os) const {
-    GetCastTypeDescription(os);
-    matcher_.DescribeTo(os);
-  }
-
-  void DescribeNegationTo(::std::ostream* os) const {
-    GetCastTypeDescription(os);
-    matcher_.DescribeNegationTo(os);
-  }
-
- protected:
-  const Matcher<To> matcher_;
-
-  static std::string GetToName() {
-    return GetTypeName<To>();
-  }
-
- private:
-  static void GetCastTypeDescription(::std::ostream* os) {
-    *os << "when dynamic_cast to " << GetToName() << ", ";
-  }
-};
-
-// Primary template.
-// To is a pointer. Cast and forward the result.
-template <typename To>
-class WhenDynamicCastToMatcher : public WhenDynamicCastToMatcherBase<To> {
- public:
-  explicit WhenDynamicCastToMatcher(const Matcher<To>& matcher)
-      : WhenDynamicCastToMatcherBase<To>(matcher) {}
-
-  template <typename From>
-  bool MatchAndExplain(From from, MatchResultListener* listener) const {
-    To to = dynamic_cast<To>(from);
-    return MatchPrintAndExplain(to, this->matcher_, listener);
-  }
-};
-
-// Specialize for references.
-// In this case we return false if the dynamic_cast fails.
-template <typename To>
-class WhenDynamicCastToMatcher<To&> : public WhenDynamicCastToMatcherBase<To&> {
- public:
-  explicit WhenDynamicCastToMatcher(const Matcher<To&>& matcher)
-      : WhenDynamicCastToMatcherBase<To&>(matcher) {}
-
-  template <typename From>
-  bool MatchAndExplain(From& from, MatchResultListener* listener) const {
-    // We don't want an std::bad_cast here, so do the cast with pointers.
-    To* to = dynamic_cast<To*>(&from);
-    if (to == nullptr) {
-      *listener << "which cannot be dynamic_cast to " << this->GetToName();
-      return false;
-    }
-    return MatchPrintAndExplain(*to, this->matcher_, listener);
-  }
-};
-#endif  // GTEST_HAS_RTTI
-
-// Implements the Field() matcher for matching a field (i.e. member
-// variable) of an object.
-template <typename Class, typename FieldType>
-class FieldMatcher {
- public:
-  FieldMatcher(FieldType Class::*field,
-               const Matcher<const FieldType&>& matcher)
-      : field_(field), matcher_(matcher), whose_field_("whose given field ") {}
-
-  FieldMatcher(const std::string& field_name, FieldType Class::*field,
-               const Matcher<const FieldType&>& matcher)
-      : field_(field),
-        matcher_(matcher),
-        whose_field_("whose field `" + field_name + "` ") {}
-
-  void DescribeTo(::std::ostream* os) const {
-    *os << "is an object " << whose_field_;
-    matcher_.DescribeTo(os);
-  }
-
-  void DescribeNegationTo(::std::ostream* os) const {
-    *os << "is an object " << whose_field_;
-    matcher_.DescribeNegationTo(os);
-  }
-
-  template <typename T>
-  bool MatchAndExplain(const T& value, MatchResultListener* listener) const {
-    // FIXME: The dispatch on std::is_pointer was introduced as a workaround for
-    // a compiler bug, and can now be removed.
-    return MatchAndExplainImpl(
-        typename std::is_pointer<typename std::remove_const<T>::type>::type(),
-        value, listener);
-  }
-
- private:
-  bool MatchAndExplainImpl(std::false_type /* is_not_pointer */,
-                           const Class& obj,
-                           MatchResultListener* listener) const {
-    *listener << whose_field_ << "is ";
-    return MatchPrintAndExplain(obj.*field_, matcher_, listener);
-  }
-
-  bool MatchAndExplainImpl(std::true_type /* is_pointer */, const Class* p,
-                           MatchResultListener* listener) const {
-    if (p == nullptr) return false;
-
-    *listener << "which points to an object ";
-    // Since *p has a field, it must be a class/struct/union type and
-    // thus cannot be a pointer.  Therefore we pass false_type() as
-    // the first argument.
-    return MatchAndExplainImpl(std::false_type(), *p, listener);
-  }
-
-  const FieldType Class::*field_;
-  const Matcher<const FieldType&> matcher_;
-
-  // Contains either "whose given field " if the name of the field is unknown
-  // or "whose field `name_of_field` " if the name is known.
-  const std::string whose_field_;
-};
-
-// Implements the Property() matcher for matching a property
-// (i.e. return value of a getter method) of an object.
-//
-// Property is a const-qualified member function of Class returning
-// PropertyType.
-template <typename Class, typename PropertyType, typename Property>
-class PropertyMatcher {
- public:
-  typedef const PropertyType& RefToConstProperty;
-
-  PropertyMatcher(Property property, const Matcher<RefToConstProperty>& matcher)
-      : property_(property),
-        matcher_(matcher),
-        whose_property_("whose given property ") {}
-
-  PropertyMatcher(const std::string& property_name, Property property,
-                  const Matcher<RefToConstProperty>& matcher)
-      : property_(property),
-        matcher_(matcher),
-        whose_property_("whose property `" + property_name + "` ") {}
-
-  void DescribeTo(::std::ostream* os) const {
-    *os << "is an object " << whose_property_;
-    matcher_.DescribeTo(os);
-  }
-
-  void DescribeNegationTo(::std::ostream* os) const {
-    *os << "is an object " << whose_property_;
-    matcher_.DescribeNegationTo(os);
-  }
-
-  template <typename T>
-  bool MatchAndExplain(const T&value, MatchResultListener* listener) const {
-    return MatchAndExplainImpl(
-        typename std::is_pointer<typename std::remove_const<T>::type>::type(),
-        value, listener);
-  }
-
- private:
-  bool MatchAndExplainImpl(std::false_type /* is_not_pointer */,
-                           const Class& obj,
-                           MatchResultListener* listener) const {
-    *listener << whose_property_ << "is ";
-    // Cannot pass the return value (for example, int) to MatchPrintAndExplain,
-    // which takes a non-const reference as argument.
-    RefToConstProperty result = (obj.*property_)();
-    return MatchPrintAndExplain(result, matcher_, listener);
-  }
-
-  bool MatchAndExplainImpl(std::true_type /* is_pointer */, const Class* p,
-                           MatchResultListener* listener) const {
-    if (p == nullptr) return false;
-
-    *listener << "which points to an object ";
-    // Since *p has a property method, it must be a class/struct/union
-    // type and thus cannot be a pointer.  Therefore we pass
-    // false_type() as the first argument.
-    return MatchAndExplainImpl(std::false_type(), *p, listener);
-  }
-
-  Property property_;
-  const Matcher<RefToConstProperty> matcher_;
-
-  // Contains either "whose given property " if the name of the property is
-  // unknown or "whose property `name_of_property` " if the name is known.
-  const std::string whose_property_;
-};
-
-// Type traits specifying various features of different functors for ResultOf.
-// The default template specifies features for functor objects.
-template <typename Functor>
-struct CallableTraits {
-  typedef Functor StorageType;
-
-  static void CheckIsValid(Functor /* functor */) {}
-
-  template <typename T>
-  static auto Invoke(Functor f, const T& arg) -> decltype(f(arg)) {
-    return f(arg);
-  }
-};
-
-// Specialization for function pointers.
-template <typename ArgType, typename ResType>
-struct CallableTraits<ResType(*)(ArgType)> {
-  typedef ResType ResultType;
-  typedef ResType(*StorageType)(ArgType);
-
-  static void CheckIsValid(ResType(*f)(ArgType)) {
-    GTEST_CHECK_(f != nullptr)
-        << "NULL function pointer is passed into ResultOf().";
-  }
-  template <typename T>
-  static ResType Invoke(ResType(*f)(ArgType), T arg) {
-    return (*f)(arg);
-  }
-};
-
-// Implements the ResultOf() matcher for matching a return value of a
-// unary function of an object.
-template <typename Callable, typename InnerMatcher>
-class ResultOfMatcher {
- public:
-  ResultOfMatcher(Callable callable, InnerMatcher matcher)
-      : callable_(std::move(callable)), matcher_(std::move(matcher)) {
-    CallableTraits<Callable>::CheckIsValid(callable_);
-  }
-
-  template <typename T>
-  operator Matcher<T>() const {
-    return Matcher<T>(new Impl<const T&>(callable_, matcher_));
-  }
-
- private:
-  typedef typename CallableTraits<Callable>::StorageType CallableStorageType;
-
-  template <typename T>
-  class Impl : public MatcherInterface<T> {
-    using ResultType = decltype(CallableTraits<Callable>::template Invoke<T>(
-        std::declval<CallableStorageType>(), std::declval<T>()));
-
-   public:
-    template <typename M>
-    Impl(const CallableStorageType& callable, const M& matcher)
-        : callable_(callable), matcher_(MatcherCast<ResultType>(matcher)) {}
-
-    void DescribeTo(::std::ostream* os) const override {
-      *os << "is mapped by the given callable to a value that ";
-      matcher_.DescribeTo(os);
-    }
-
-    void DescribeNegationTo(::std::ostream* os) const override {
-      *os << "is mapped by the given callable to a value that ";
-      matcher_.DescribeNegationTo(os);
-    }
-
-    bool MatchAndExplain(T obj, MatchResultListener* listener) const override {
-      *listener << "which is mapped by the given callable to ";
-      // Cannot pass the return value directly to MatchPrintAndExplain, which
-      // takes a non-const reference as argument.
-      // Also, specifying template argument explicitly is needed because T could
-      // be a non-const reference (e.g. Matcher<Uncopyable&>).
-      ResultType result =
-          CallableTraits<Callable>::template Invoke<T>(callable_, obj);
-      return MatchPrintAndExplain(result, matcher_, listener);
-    }
-
-   private:
-    // Functors often define operator() as non-const method even though
-    // they are actually stateless. But we need to use them even when
-    // 'this' is a const pointer. It's the user's responsibility not to
-    // use stateful callables with ResultOf(), which doesn't guarantee
-    // how many times the callable will be invoked.
-    mutable CallableStorageType callable_;
-    const Matcher<ResultType> matcher_;
-  };  // class Impl
-
-  const CallableStorageType callable_;
-  const InnerMatcher matcher_;
-};
-
-// Implements a matcher that checks the size of an STL-style container.
-template <typename SizeMatcher>
-class SizeIsMatcher {
- public:
-  explicit SizeIsMatcher(const SizeMatcher& size_matcher)
-       : size_matcher_(size_matcher) {
-  }
-
-  template <typename Container>
-  operator Matcher<Container>() const {
-    return Matcher<Container>(new Impl<const Container&>(size_matcher_));
-  }
-
-  template <typename Container>
-  class Impl : public MatcherInterface<Container> {
-   public:
-    using SizeType = decltype(std::declval<Container>().size());
-    explicit Impl(const SizeMatcher& size_matcher)
-        : size_matcher_(MatcherCast<SizeType>(size_matcher)) {}
-
-    void DescribeTo(::std::ostream* os) const override {
-      *os << "size ";
-      size_matcher_.DescribeTo(os);
-    }
-    void DescribeNegationTo(::std::ostream* os) const override {
-      *os << "size ";
-      size_matcher_.DescribeNegationTo(os);
-    }
-
-    bool MatchAndExplain(Container container,
-                         MatchResultListener* listener) const override {
-      SizeType size = container.size();
-      StringMatchResultListener size_listener;
-      const bool result = size_matcher_.MatchAndExplain(size, &size_listener);
-      *listener
-          << "whose size " << size << (result ? " matches" : " doesn't match");
-      PrintIfNotEmpty(size_listener.str(), listener->stream());
-      return result;
-    }
-
-   private:
-    const Matcher<SizeType> size_matcher_;
-  };
-
- private:
-  const SizeMatcher size_matcher_;
-};
-
-// Implements a matcher that checks the begin()..end() distance of an STL-style
-// container.
-template <typename DistanceMatcher>
-class BeginEndDistanceIsMatcher {
- public:
-  explicit BeginEndDistanceIsMatcher(const DistanceMatcher& distance_matcher)
-      : distance_matcher_(distance_matcher) {}
-
-  template <typename Container>
-  operator Matcher<Container>() const {
-    return Matcher<Container>(new Impl<const Container&>(distance_matcher_));
-  }
-
-  template <typename Container>
-  class Impl : public MatcherInterface<Container> {
-   public:
-    typedef internal::StlContainerView<
-        GTEST_REMOVE_REFERENCE_AND_CONST_(Container)> ContainerView;
-    typedef typename std::iterator_traits<
-        typename ContainerView::type::const_iterator>::difference_type
-        DistanceType;
-    explicit Impl(const DistanceMatcher& distance_matcher)
-        : distance_matcher_(MatcherCast<DistanceType>(distance_matcher)) {}
-
-    void DescribeTo(::std::ostream* os) const override {
-      *os << "distance between begin() and end() ";
-      distance_matcher_.DescribeTo(os);
-    }
-    void DescribeNegationTo(::std::ostream* os) const override {
-      *os << "distance between begin() and end() ";
-      distance_matcher_.DescribeNegationTo(os);
-    }
-
-    bool MatchAndExplain(Container container,
-                         MatchResultListener* listener) const override {
-      using std::begin;
-      using std::end;
-      DistanceType distance = std::distance(begin(container), end(container));
-      StringMatchResultListener distance_listener;
-      const bool result =
-          distance_matcher_.MatchAndExplain(distance, &distance_listener);
-      *listener << "whose distance between begin() and end() " << distance
-                << (result ? " matches" : " doesn't match");
-      PrintIfNotEmpty(distance_listener.str(), listener->stream());
-      return result;
-    }
-
-   private:
-    const Matcher<DistanceType> distance_matcher_;
-  };
-
- private:
-  const DistanceMatcher distance_matcher_;
-};
-
-// Implements an equality matcher for any STL-style container whose elements
-// support ==. This matcher is like Eq(), but its failure explanations provide
-// more detailed information that is useful when the container is used as a set.
-// The failure message reports elements that are in one of the operands but not
-// the other. The failure messages do not report duplicate or out-of-order
-// elements in the containers (which don't properly matter to sets, but can
-// occur if the containers are vectors or lists, for example).
-//
-// Uses the container's const_iterator, value_type, operator ==,
-// begin(), and end().
-template <typename Container>
-class ContainerEqMatcher {
- public:
-  typedef internal::StlContainerView<Container> View;
-  typedef typename View::type StlContainer;
-  typedef typename View::const_reference StlContainerReference;
-
-  static_assert(!std::is_const<Container>::value,
-                "Container type must not be const");
-  static_assert(!std::is_reference<Container>::value,
-                "Container type must not be a reference");
-
-  // We make a copy of expected in case the elements in it are modified
-  // after this matcher is created.
-  explicit ContainerEqMatcher(const Container& expected)
-      : expected_(View::Copy(expected)) {}
-
-  void DescribeTo(::std::ostream* os) const {
-    *os << "equals ";
-    UniversalPrint(expected_, os);
-  }
-  void DescribeNegationTo(::std::ostream* os) const {
-    *os << "does not equal ";
-    UniversalPrint(expected_, os);
-  }
-
-  template <typename LhsContainer>
-  bool MatchAndExplain(const LhsContainer& lhs,
-                       MatchResultListener* listener) const {
-    typedef internal::StlContainerView<
-        typename std::remove_const<LhsContainer>::type>
-        LhsView;
-    typedef typename LhsView::type LhsStlContainer;
-    StlContainerReference lhs_stl_container = LhsView::ConstReference(lhs);
-    if (lhs_stl_container == expected_)
-      return true;
-
-    ::std::ostream* const os = listener->stream();
-    if (os != nullptr) {
-      // Something is different. Check for extra values first.
-      bool printed_header = false;
-      for (typename LhsStlContainer::const_iterator it =
-               lhs_stl_container.begin();
-           it != lhs_stl_container.end(); ++it) {
-        if (internal::ArrayAwareFind(expected_.begin(), expected_.end(), *it) ==
-            expected_.end()) {
-          if (printed_header) {
-            *os << ", ";
-          } else {
-            *os << "which has these unexpected elements: ";
-            printed_header = true;
-          }
-          UniversalPrint(*it, os);
-        }
-      }
-
-      // Now check for missing values.
-      bool printed_header2 = false;
-      for (typename StlContainer::const_iterator it = expected_.begin();
-           it != expected_.end(); ++it) {
-        if (internal::ArrayAwareFind(
-                lhs_stl_container.begin(), lhs_stl_container.end(), *it) ==
-            lhs_stl_container.end()) {
-          if (printed_header2) {
-            *os << ", ";
-          } else {
-            *os << (printed_header ? ",\nand" : "which")
-                << " doesn't have these expected elements: ";
-            printed_header2 = true;
-          }
-          UniversalPrint(*it, os);
-        }
-      }
-    }
-
-    return false;
-  }
-
- private:
-  const StlContainer expected_;
-};
-
-// A comparator functor that uses the < operator to compare two values.
-struct LessComparator {
-  template <typename T, typename U>
-  bool operator()(const T& lhs, const U& rhs) const { return lhs < rhs; }
-};
-
-// Implements WhenSortedBy(comparator, container_matcher).
-template <typename Comparator, typename ContainerMatcher>
-class WhenSortedByMatcher {
- public:
-  WhenSortedByMatcher(const Comparator& comparator,
-                      const ContainerMatcher& matcher)
-      : comparator_(comparator), matcher_(matcher) {}
-
-  template <typename LhsContainer>
-  operator Matcher<LhsContainer>() const {
-    return MakeMatcher(new Impl<LhsContainer>(comparator_, matcher_));
-  }
-
-  template <typename LhsContainer>
-  class Impl : public MatcherInterface<LhsContainer> {
-   public:
-    typedef internal::StlContainerView<
-         GTEST_REMOVE_REFERENCE_AND_CONST_(LhsContainer)> LhsView;
-    typedef typename LhsView::type LhsStlContainer;
-    typedef typename LhsView::const_reference LhsStlContainerReference;
-    // Transforms std::pair<const Key, Value> into std::pair<Key, Value>
-    // so that we can match associative containers.
-    typedef typename RemoveConstFromKey<
-        typename LhsStlContainer::value_type>::type LhsValue;
-
-    Impl(const Comparator& comparator, const ContainerMatcher& matcher)
-        : comparator_(comparator), matcher_(matcher) {}
-
-    void DescribeTo(::std::ostream* os) const override {
-      *os << "(when sorted) ";
-      matcher_.DescribeTo(os);
-    }
-
-    void DescribeNegationTo(::std::ostream* os) const override {
-      *os << "(when sorted) ";
-      matcher_.DescribeNegationTo(os);
-    }
-
-    bool MatchAndExplain(LhsContainer lhs,
-                         MatchResultListener* listener) const override {
-      LhsStlContainerReference lhs_stl_container = LhsView::ConstReference(lhs);
-      ::std::vector<LhsValue> sorted_container(lhs_stl_container.begin(),
-                                               lhs_stl_container.end());
-      ::std::sort(
-           sorted_container.begin(), sorted_container.end(), comparator_);
-
-      if (!listener->IsInterested()) {
-        // If the listener is not interested, we do not need to
-        // construct the inner explanation.
-        return matcher_.Matches(sorted_container);
-      }
-
-      *listener << "which is ";
-      UniversalPrint(sorted_container, listener->stream());
-      *listener << " when sorted";
-
-      StringMatchResultListener inner_listener;
-      const bool match = matcher_.MatchAndExplain(sorted_container,
-                                                  &inner_listener);
-      PrintIfNotEmpty(inner_listener.str(), listener->stream());
-      return match;
-    }
-
-   private:
-    const Comparator comparator_;
-    const Matcher<const ::std::vector<LhsValue>&> matcher_;
-
-    GTEST_DISALLOW_COPY_AND_ASSIGN_(Impl);
-  };
-
- private:
-  const Comparator comparator_;
-  const ContainerMatcher matcher_;
-};
-
-// Implements Pointwise(tuple_matcher, rhs_container).  tuple_matcher
-// must be able to be safely cast to Matcher<std::tuple<const T1&, const
-// T2&> >, where T1 and T2 are the types of elements in the LHS
-// container and the RHS container respectively.
-template <typename TupleMatcher, typename RhsContainer>
-class PointwiseMatcher {
-  GTEST_COMPILE_ASSERT_(
-      !IsHashTable<GTEST_REMOVE_REFERENCE_AND_CONST_(RhsContainer)>::value,
-      use_UnorderedPointwise_with_hash_tables);
-
- public:
-  typedef internal::StlContainerView<RhsContainer> RhsView;
-  typedef typename RhsView::type RhsStlContainer;
-  typedef typename RhsStlContainer::value_type RhsValue;
-
-  static_assert(!std::is_const<RhsContainer>::value,
-                "RhsContainer type must not be const");
-  static_assert(!std::is_reference<RhsContainer>::value,
-                "RhsContainer type must not be a reference");
-
-  // Like ContainerEq, we make a copy of rhs in case the elements in
-  // it are modified after this matcher is created.
-  PointwiseMatcher(const TupleMatcher& tuple_matcher, const RhsContainer& rhs)
-      : tuple_matcher_(tuple_matcher), rhs_(RhsView::Copy(rhs)) {}
-
-  template <typename LhsContainer>
-  operator Matcher<LhsContainer>() const {
-    GTEST_COMPILE_ASSERT_(
-        !IsHashTable<GTEST_REMOVE_REFERENCE_AND_CONST_(LhsContainer)>::value,
-        use_UnorderedPointwise_with_hash_tables);
-
-    return Matcher<LhsContainer>(
-        new Impl<const LhsContainer&>(tuple_matcher_, rhs_));
-  }
-
-  template <typename LhsContainer>
-  class Impl : public MatcherInterface<LhsContainer> {
-   public:
-    typedef internal::StlContainerView<
-         GTEST_REMOVE_REFERENCE_AND_CONST_(LhsContainer)> LhsView;
-    typedef typename LhsView::type LhsStlContainer;
-    typedef typename LhsView::const_reference LhsStlContainerReference;
-    typedef typename LhsStlContainer::value_type LhsValue;
-    // We pass the LHS value and the RHS value to the inner matcher by
-    // reference, as they may be expensive to copy.  We must use tuple
-    // instead of pair here, as a pair cannot hold references (C++ 98,
-    // 20.2.2 [lib.pairs]).
-    typedef ::std::tuple<const LhsValue&, const RhsValue&> InnerMatcherArg;
-
-    Impl(const TupleMatcher& tuple_matcher, const RhsStlContainer& rhs)
-        // mono_tuple_matcher_ holds a monomorphic version of the tuple matcher.
-        : mono_tuple_matcher_(SafeMatcherCast<InnerMatcherArg>(tuple_matcher)),
-          rhs_(rhs) {}
-
-    void DescribeTo(::std::ostream* os) const override {
-      *os << "contains " << rhs_.size()
-          << " values, where each value and its corresponding value in ";
-      UniversalPrinter<RhsStlContainer>::Print(rhs_, os);
-      *os << " ";
-      mono_tuple_matcher_.DescribeTo(os);
-    }
-    void DescribeNegationTo(::std::ostream* os) const override {
-      *os << "doesn't contain exactly " << rhs_.size()
-          << " values, or contains a value x at some index i"
-          << " where x and the i-th value of ";
-      UniversalPrint(rhs_, os);
-      *os << " ";
-      mono_tuple_matcher_.DescribeNegationTo(os);
-    }
-
-    bool MatchAndExplain(LhsContainer lhs,
-                         MatchResultListener* listener) const override {
-      LhsStlContainerReference lhs_stl_container = LhsView::ConstReference(lhs);
-      const size_t actual_size = lhs_stl_container.size();
-      if (actual_size != rhs_.size()) {
-        *listener << "which contains " << actual_size << " values";
-        return false;
-      }
-
-      typename LhsStlContainer::const_iterator left = lhs_stl_container.begin();
-      typename RhsStlContainer::const_iterator right = rhs_.begin();
-      for (size_t i = 0; i != actual_size; ++i, ++left, ++right) {
-        if (listener->IsInterested()) {
-          StringMatchResultListener inner_listener;
-          // Create InnerMatcherArg as a temporarily object to avoid it outlives
-          // *left and *right. Dereference or the conversion to `const T&` may
-          // return temp objects, e.g. for vector<bool>.
-          if (!mono_tuple_matcher_.MatchAndExplain(
-                  InnerMatcherArg(ImplicitCast_<const LhsValue&>(*left),
-                                  ImplicitCast_<const RhsValue&>(*right)),
-                  &inner_listener)) {
-            *listener << "where the value pair (";
-            UniversalPrint(*left, listener->stream());
-            *listener << ", ";
-            UniversalPrint(*right, listener->stream());
-            *listener << ") at index #" << i << " don't match";
-            PrintIfNotEmpty(inner_listener.str(), listener->stream());
-            return false;
-          }
-        } else {
-          if (!mono_tuple_matcher_.Matches(
-                  InnerMatcherArg(ImplicitCast_<const LhsValue&>(*left),
-                                  ImplicitCast_<const RhsValue&>(*right))))
-            return false;
-        }
-      }
-
-      return true;
-    }
-
-   private:
-    const Matcher<InnerMatcherArg> mono_tuple_matcher_;
-    const RhsStlContainer rhs_;
-  };
-
- private:
-  const TupleMatcher tuple_matcher_;
-  const RhsStlContainer rhs_;
-};
-
-// Holds the logic common to ContainsMatcherImpl and EachMatcherImpl.
-template <typename Container>
-class QuantifierMatcherImpl : public MatcherInterface<Container> {
- public:
-  typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
-  typedef StlContainerView<RawContainer> View;
-  typedef typename View::type StlContainer;
-  typedef typename View::const_reference StlContainerReference;
-  typedef typename StlContainer::value_type Element;
-
-  template <typename InnerMatcher>
-  explicit QuantifierMatcherImpl(InnerMatcher inner_matcher)
-      : inner_matcher_(
-           testing::SafeMatcherCast<const Element&>(inner_matcher)) {}
-
-  // Checks whether:
-  // * All elements in the container match, if all_elements_should_match.
-  // * Any element in the container matches, if !all_elements_should_match.
-  bool MatchAndExplainImpl(bool all_elements_should_match,
-                           Container container,
-                           MatchResultListener* listener) const {
-    StlContainerReference stl_container = View::ConstReference(container);
-    size_t i = 0;
-    for (typename StlContainer::const_iterator it = stl_container.begin();
-         it != stl_container.end(); ++it, ++i) {
-      StringMatchResultListener inner_listener;
-      const bool matches = inner_matcher_.MatchAndExplain(*it, &inner_listener);
-
-      if (matches != all_elements_should_match) {
-        *listener << "whose element #" << i
-                  << (matches ? " matches" : " doesn't match");
-        PrintIfNotEmpty(inner_listener.str(), listener->stream());
-        return !all_elements_should_match;
-      }
-    }
-    return all_elements_should_match;
-  }
-
-  bool MatchAndExplainImpl(const Matcher<size_t>& count_matcher,
-                           Container container,
-                           MatchResultListener* listener) const {
-    StlContainerReference stl_container = View::ConstReference(container);
-    size_t i = 0;
-    std::vector<size_t> match_elements;
-    for (auto it = stl_container.begin(); it != stl_container.end();
-         ++it, ++i) {
-      StringMatchResultListener inner_listener;
-      const bool matches = inner_matcher_.MatchAndExplain(*it, &inner_listener);
-      if (matches) {
-        match_elements.push_back(i);
-      }
-    }
-    if (listener->IsInterested()) {
-      if (match_elements.empty()) {
-        *listener << "has no element that matches";
-      } else if (match_elements.size() == 1) {
-        *listener << "whose element #" << match_elements[0] << " matches";
-      } else {
-        *listener << "whose elements (";
-        std::string sep = "";
-        for (size_t e : match_elements) {
-          *listener << sep << e;
-          sep = ", ";
-        }
-        *listener << ") match";
-      }
-    }
-    StringMatchResultListener count_listener;
-    if (count_matcher.MatchAndExplain(match_elements.size(), &count_listener)) {
-      *listener << " and whose match quantity of " << match_elements.size()
-                << " matches";
-      PrintIfNotEmpty(count_listener.str(), listener->stream());
-      return true;
-    } else {
-      if (match_elements.empty()) {
-        *listener << " and";
-      } else {
-        *listener << " but";
-      }
-      *listener << " whose match quantity of " << match_elements.size()
-                << " does not match";
-      PrintIfNotEmpty(count_listener.str(), listener->stream());
-      return false;
-    }
-  }
-
- protected:
-  const Matcher<const Element&> inner_matcher_;
-};
-
-// Implements Contains(element_matcher) for the given argument type Container.
-// Symmetric to EachMatcherImpl.
-template <typename Container>
-class ContainsMatcherImpl : public QuantifierMatcherImpl<Container> {
- public:
-  template <typename InnerMatcher>
-  explicit ContainsMatcherImpl(InnerMatcher inner_matcher)
-      : QuantifierMatcherImpl<Container>(inner_matcher) {}
-
-  // Describes what this matcher does.
-  void DescribeTo(::std::ostream* os) const override {
-    *os << "contains at least one element that ";
-    this->inner_matcher_.DescribeTo(os);
-  }
-
-  void DescribeNegationTo(::std::ostream* os) const override {
-    *os << "doesn't contain any element that ";
-    this->inner_matcher_.DescribeTo(os);
-  }
-
-  bool MatchAndExplain(Container container,
-                       MatchResultListener* listener) const override {
-    return this->MatchAndExplainImpl(false, container, listener);
-  }
-};
-
-// Implements Each(element_matcher) for the given argument type Container.
-// Symmetric to ContainsMatcherImpl.
-template <typename Container>
-class EachMatcherImpl : public QuantifierMatcherImpl<Container> {
- public:
-  template <typename InnerMatcher>
-  explicit EachMatcherImpl(InnerMatcher inner_matcher)
-      : QuantifierMatcherImpl<Container>(inner_matcher) {}
-
-  // Describes what this matcher does.
-  void DescribeTo(::std::ostream* os) const override {
-    *os << "only contains elements that ";
-    this->inner_matcher_.DescribeTo(os);
-  }
-
-  void DescribeNegationTo(::std::ostream* os) const override {
-    *os << "contains some element that ";
-    this->inner_matcher_.DescribeNegationTo(os);
-  }
-
-  bool MatchAndExplain(Container container,
-                       MatchResultListener* listener) const override {
-    return this->MatchAndExplainImpl(true, container, listener);
-  }
-};
-
-// Implements Contains(element_matcher).Times(n) for the given argument type
-// Container.
-template <typename Container>
-class ContainsTimesMatcherImpl : public QuantifierMatcherImpl<Container> {
- public:
-  template <typename InnerMatcher>
-  explicit ContainsTimesMatcherImpl(InnerMatcher inner_matcher,
-                                    Matcher<size_t> count_matcher)
-      : QuantifierMatcherImpl<Container>(inner_matcher),
-        count_matcher_(std::move(count_matcher)) {}
-
-  void DescribeTo(::std::ostream* os) const override {
-    *os << "quantity of elements that match ";
-    this->inner_matcher_.DescribeTo(os);
-    *os << " ";
-    count_matcher_.DescribeTo(os);
-  }
-
-  void DescribeNegationTo(::std::ostream* os) const override {
-    *os << "quantity of elements that match ";
-    this->inner_matcher_.DescribeTo(os);
-    *os << " ";
-    count_matcher_.DescribeNegationTo(os);
-  }
-
-  bool MatchAndExplain(Container container,
-                       MatchResultListener* listener) const override {
-    return this->MatchAndExplainImpl(count_matcher_, container, listener);
-  }
-
- private:
-  const Matcher<size_t> count_matcher_;
-};
-
-// Implements polymorphic Contains(element_matcher).Times(n).
-template <typename M>
-class ContainsTimesMatcher {
- public:
-  explicit ContainsTimesMatcher(M m, Matcher<size_t> count_matcher)
-      : inner_matcher_(m), count_matcher_(std::move(count_matcher)) {}
-
-  template <typename Container>
-  operator Matcher<Container>() const {  // NOLINT
-    return Matcher<Container>(new ContainsTimesMatcherImpl<const Container&>(
-        inner_matcher_, count_matcher_));
-  }
-
- private:
-  const M inner_matcher_;
-  const Matcher<size_t> count_matcher_;
-};
-
-// Implements polymorphic Contains(element_matcher).
-template <typename M>
-class ContainsMatcher {
- public:
-  explicit ContainsMatcher(M m) : inner_matcher_(m) {}
-
-  template <typename Container>
-  operator Matcher<Container>() const {  // NOLINT
-    return Matcher<Container>(
-        new ContainsMatcherImpl<const Container&>(inner_matcher_));
-  }
-
-  ContainsTimesMatcher<M> Times(Matcher<size_t> count_matcher) const {
-    return ContainsTimesMatcher<M>(inner_matcher_, std::move(count_matcher));
-  }
-
- private:
-  const M inner_matcher_;
-};
-
-// Implements polymorphic Each(element_matcher).
-template <typename M>
-class EachMatcher {
- public:
-  explicit EachMatcher(M m) : inner_matcher_(m) {}
-
-  template <typename Container>
-  operator Matcher<Container>() const {  // NOLINT
-    return Matcher<Container>(
-        new EachMatcherImpl<const Container&>(inner_matcher_));
-  }
-
- private:
-  const M inner_matcher_;
-};
-
-struct Rank1 {};
-struct Rank0 : Rank1 {};
-
-namespace pair_getters {
-using std::get;
-template <typename T>
-auto First(T& x, Rank1) -> decltype(get<0>(x)) {  // NOLINT
-  return get<0>(x);
-}
-template <typename T>
-auto First(T& x, Rank0) -> decltype((x.first)) {  // NOLINT
-  return x.first;
-}
-
-template <typename T>
-auto Second(T& x, Rank1) -> decltype(get<1>(x)) {  // NOLINT
-  return get<1>(x);
-}
-template <typename T>
-auto Second(T& x, Rank0) -> decltype((x.second)) {  // NOLINT
-  return x.second;
-}
-}  // namespace pair_getters
-
-// Implements Key(inner_matcher) for the given argument pair type.
-// Key(inner_matcher) matches an std::pair whose 'first' field matches
-// inner_matcher.  For example, Contains(Key(Ge(5))) can be used to match an
-// std::map that contains at least one element whose key is >= 5.
-template <typename PairType>
-class KeyMatcherImpl : public MatcherInterface<PairType> {
- public:
-  typedef GTEST_REMOVE_REFERENCE_AND_CONST_(PairType) RawPairType;
-  typedef typename RawPairType::first_type KeyType;
-
-  template <typename InnerMatcher>
-  explicit KeyMatcherImpl(InnerMatcher inner_matcher)
-      : inner_matcher_(
-          testing::SafeMatcherCast<const KeyType&>(inner_matcher)) {
-  }
-
-  // Returns true if and only if 'key_value.first' (the key) matches the inner
-  // matcher.
-  bool MatchAndExplain(PairType key_value,
-                       MatchResultListener* listener) const override {
-    StringMatchResultListener inner_listener;
-    const bool match = inner_matcher_.MatchAndExplain(
-        pair_getters::First(key_value, Rank0()), &inner_listener);
-    const std::string explanation = inner_listener.str();
-    if (explanation != "") {
-      *listener << "whose first field is a value " << explanation;
-    }
-    return match;
-  }
-
-  // Describes what this matcher does.
-  void DescribeTo(::std::ostream* os) const override {
-    *os << "has a key that ";
-    inner_matcher_.DescribeTo(os);
-  }
-
-  // Describes what the negation of this matcher does.
-  void DescribeNegationTo(::std::ostream* os) const override {
-    *os << "doesn't have a key that ";
-    inner_matcher_.DescribeTo(os);
-  }
-
- private:
-  const Matcher<const KeyType&> inner_matcher_;
-};
-
-// Implements polymorphic Key(matcher_for_key).
-template <typename M>
-class KeyMatcher {
- public:
-  explicit KeyMatcher(M m) : matcher_for_key_(m) {}
-
-  template <typename PairType>
-  operator Matcher<PairType>() const {
-    return Matcher<PairType>(
-        new KeyMatcherImpl<const PairType&>(matcher_for_key_));
-  }
-
- private:
-  const M matcher_for_key_;
-};
-
-// Implements polymorphic Address(matcher_for_address).
-template <typename InnerMatcher>
-class AddressMatcher {
- public:
-  explicit AddressMatcher(InnerMatcher m) : matcher_(m) {}
-
-  template <typename Type>
-  operator Matcher<Type>() const {  // NOLINT
-    return Matcher<Type>(new Impl<const Type&>(matcher_));
-  }
-
- private:
-  // The monomorphic implementation that works for a particular object type.
-  template <typename Type>
-  class Impl : public MatcherInterface<Type> {
-   public:
-    using Address = const GTEST_REMOVE_REFERENCE_AND_CONST_(Type) *;
-    explicit Impl(const InnerMatcher& matcher)
-        : matcher_(MatcherCast<Address>(matcher)) {}
-
-    void DescribeTo(::std::ostream* os) const override {
-      *os << "has address that ";
-      matcher_.DescribeTo(os);
-    }
-
-    void DescribeNegationTo(::std::ostream* os) const override {
-      *os << "does not have address that ";
-      matcher_.DescribeTo(os);
-    }
-
-    bool MatchAndExplain(Type object,
-                         MatchResultListener* listener) const override {
-      *listener << "which has address ";
-      Address address = std::addressof(object);
-      return MatchPrintAndExplain(address, matcher_, listener);
-    }
-
-   private:
-    const Matcher<Address> matcher_;
-  };
-  const InnerMatcher matcher_;
-};
-
-// Implements Pair(first_matcher, second_matcher) for the given argument pair
-// type with its two matchers. See Pair() function below.
-template <typename PairType>
-class PairMatcherImpl : public MatcherInterface<PairType> {
- public:
-  typedef GTEST_REMOVE_REFERENCE_AND_CONST_(PairType) RawPairType;
-  typedef typename RawPairType::first_type FirstType;
-  typedef typename RawPairType::second_type SecondType;
-
-  template <typename FirstMatcher, typename SecondMatcher>
-  PairMatcherImpl(FirstMatcher first_matcher, SecondMatcher second_matcher)
-      : first_matcher_(
-            testing::SafeMatcherCast<const FirstType&>(first_matcher)),
-        second_matcher_(
-            testing::SafeMatcherCast<const SecondType&>(second_matcher)) {
-  }
-
-  // Describes what this matcher does.
-  void DescribeTo(::std::ostream* os) const override {
-    *os << "has a first field that ";
-    first_matcher_.DescribeTo(os);
-    *os << ", and has a second field that ";
-    second_matcher_.DescribeTo(os);
-  }
-
-  // Describes what the negation of this matcher does.
-  void DescribeNegationTo(::std::ostream* os) const override {
-    *os << "has a first field that ";
-    first_matcher_.DescribeNegationTo(os);
-    *os << ", or has a second field that ";
-    second_matcher_.DescribeNegationTo(os);
-  }
-
-  // Returns true if and only if 'a_pair.first' matches first_matcher and
-  // 'a_pair.second' matches second_matcher.
-  bool MatchAndExplain(PairType a_pair,
-                       MatchResultListener* listener) const override {
-    if (!listener->IsInterested()) {
-      // If the listener is not interested, we don't need to construct the
-      // explanation.
-      return first_matcher_.Matches(pair_getters::First(a_pair, Rank0())) &&
-             second_matcher_.Matches(pair_getters::Second(a_pair, Rank0()));
-    }
-    StringMatchResultListener first_inner_listener;
-    if (!first_matcher_.MatchAndExplain(pair_getters::First(a_pair, Rank0()),
-                                        &first_inner_listener)) {
-      *listener << "whose first field does not match";
-      PrintIfNotEmpty(first_inner_listener.str(), listener->stream());
-      return false;
-    }
-    StringMatchResultListener second_inner_listener;
-    if (!second_matcher_.MatchAndExplain(pair_getters::Second(a_pair, Rank0()),
-                                         &second_inner_listener)) {
-      *listener << "whose second field does not match";
-      PrintIfNotEmpty(second_inner_listener.str(), listener->stream());
-      return false;
-    }
-    ExplainSuccess(first_inner_listener.str(), second_inner_listener.str(),
-                   listener);
-    return true;
-  }
-
- private:
-  void ExplainSuccess(const std::string& first_explanation,
-                      const std::string& second_explanation,
-                      MatchResultListener* listener) const {
-    *listener << "whose both fields match";
-    if (first_explanation != "") {
-      *listener << ", where the first field is a value " << first_explanation;
-    }
-    if (second_explanation != "") {
-      *listener << ", ";
-      if (first_explanation != "") {
-        *listener << "and ";
-      } else {
-        *listener << "where ";
-      }
-      *listener << "the second field is a value " << second_explanation;
-    }
-  }
-
-  const Matcher<const FirstType&> first_matcher_;
-  const Matcher<const SecondType&> second_matcher_;
-};
-
-// Implements polymorphic Pair(first_matcher, second_matcher).
-template <typename FirstMatcher, typename SecondMatcher>
-class PairMatcher {
- public:
-  PairMatcher(FirstMatcher first_matcher, SecondMatcher second_matcher)
-      : first_matcher_(first_matcher), second_matcher_(second_matcher) {}
-
-  template <typename PairType>
-  operator Matcher<PairType> () const {
-    return Matcher<PairType>(
-        new PairMatcherImpl<const PairType&>(first_matcher_, second_matcher_));
-  }
-
- private:
-  const FirstMatcher first_matcher_;
-  const SecondMatcher second_matcher_;
-};
-
-template <typename T, size_t... I>
-auto UnpackStructImpl(const T& t, IndexSequence<I...>, int)
-    -> decltype(std::tie(get<I>(t)...)) {
-  static_assert(std::tuple_size<T>::value == sizeof...(I),
-                "Number of arguments doesn't match the number of fields.");
-  return std::tie(get<I>(t)...);
-}
-
-#if defined(__cpp_structured_bindings) && __cpp_structured_bindings >= 201606
-template <typename T>
-auto UnpackStructImpl(const T& t, MakeIndexSequence<1>, char) {
-  const auto& [a] = t;
-  return std::tie(a);
-}
-template <typename T>
-auto UnpackStructImpl(const T& t, MakeIndexSequence<2>, char) {
-  const auto& [a, b] = t;
-  return std::tie(a, b);
-}
-template <typename T>
-auto UnpackStructImpl(const T& t, MakeIndexSequence<3>, char) {
-  const auto& [a, b, c] = t;
-  return std::tie(a, b, c);
-}
-template <typename T>
-auto UnpackStructImpl(const T& t, MakeIndexSequence<4>, char) {
-  const auto& [a, b, c, d] = t;
-  return std::tie(a, b, c, d);
-}
-template <typename T>
-auto UnpackStructImpl(const T& t, MakeIndexSequence<5>, char) {
-  const auto& [a, b, c, d, e] = t;
-  return std::tie(a, b, c, d, e);
-}
-template <typename T>
-auto UnpackStructImpl(const T& t, MakeIndexSequence<6>, char) {
-  const auto& [a, b, c, d, e, f] = t;
-  return std::tie(a, b, c, d, e, f);
-}
-template <typename T>
-auto UnpackStructImpl(const T& t, MakeIndexSequence<7>, char) {
-  const auto& [a, b, c, d, e, f, g] = t;
-  return std::tie(a, b, c, d, e, f, g);
-}
-template <typename T>
-auto UnpackStructImpl(const T& t, MakeIndexSequence<8>, char) {
-  const auto& [a, b, c, d, e, f, g, h] = t;
-  return std::tie(a, b, c, d, e, f, g, h);
-}
-template <typename T>
-auto UnpackStructImpl(const T& t, MakeIndexSequence<9>, char) {
-  const auto& [a, b, c, d, e, f, g, h, i] = t;
-  return std::tie(a, b, c, d, e, f, g, h, i);
-}
-template <typename T>
-auto UnpackStructImpl(const T& t, MakeIndexSequence<10>, char) {
-  const auto& [a, b, c, d, e, f, g, h, i, j] = t;
-  return std::tie(a, b, c, d, e, f, g, h, i, j);
-}
-template <typename T>
-auto UnpackStructImpl(const T& t, MakeIndexSequence<11>, char) {
-  const auto& [a, b, c, d, e, f, g, h, i, j, k] = t;
-  return std::tie(a, b, c, d, e, f, g, h, i, j, k);
-}
-template <typename T>
-auto UnpackStructImpl(const T& t, MakeIndexSequence<12>, char) {
-  const auto& [a, b, c, d, e, f, g, h, i, j, k, l] = t;
-  return std::tie(a, b, c, d, e, f, g, h, i, j, k, l);
-}
-template <typename T>
-auto UnpackStructImpl(const T& t, MakeIndexSequence<13>, char) {
-  const auto& [a, b, c, d, e, f, g, h, i, j, k, l, m] = t;
-  return std::tie(a, b, c, d, e, f, g, h, i, j, k, l, m);
-}
-template <typename T>
-auto UnpackStructImpl(const T& t, MakeIndexSequence<14>, char) {
-  const auto& [a, b, c, d, e, f, g, h, i, j, k, l, m, n] = t;
-  return std::tie(a, b, c, d, e, f, g, h, i, j, k, l, m, n);
-}
-template <typename T>
-auto UnpackStructImpl(const T& t, MakeIndexSequence<15>, char) {
-  const auto& [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o] = t;
-  return std::tie(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o);
-}
-template <typename T>
-auto UnpackStructImpl(const T& t, MakeIndexSequence<16>, char) {
-  const auto& [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p] = t;
-  return std::tie(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p);
-}
-#endif  // defined(__cpp_structured_bindings)
-
-template <size_t I, typename T>
-auto UnpackStruct(const T& t)
-    -> decltype((UnpackStructImpl)(t, MakeIndexSequence<I>{}, 0)) {
-  return (UnpackStructImpl)(t, MakeIndexSequence<I>{}, 0);
-}
-
-// Helper function to do comma folding in C++11.
-// The array ensures left-to-right order of evaluation.
-// Usage: VariadicExpand({expr...});
-template <typename T, size_t N>
-void VariadicExpand(const T (&)[N]) {}
-
-template <typename Struct, typename StructSize>
-class FieldsAreMatcherImpl;
-
-template <typename Struct, size_t... I>
-class FieldsAreMatcherImpl<Struct, IndexSequence<I...>>
-    : public MatcherInterface<Struct> {
-  using UnpackedType =
-      decltype(UnpackStruct<sizeof...(I)>(std::declval<const Struct&>()));
-  using MatchersType = std::tuple<
-      Matcher<const typename std::tuple_element<I, UnpackedType>::type&>...>;
-
- public:
-  template <typename Inner>
-  explicit FieldsAreMatcherImpl(const Inner& matchers)
-      : matchers_(testing::SafeMatcherCast<
-                  const typename std::tuple_element<I, UnpackedType>::type&>(
-            std::get<I>(matchers))...) {}
-
-  void DescribeTo(::std::ostream* os) const override {
-    const char* separator = "";
-    VariadicExpand(
-        {(*os << separator << "has field #" << I << " that ",
-          std::get<I>(matchers_).DescribeTo(os), separator = ", and ")...});
-  }
-
-  void DescribeNegationTo(::std::ostream* os) const override {
-    const char* separator = "";
-    VariadicExpand({(*os << separator << "has field #" << I << " that ",
-                     std::get<I>(matchers_).DescribeNegationTo(os),
-                     separator = ", or ")...});
-  }
-
-  bool MatchAndExplain(Struct t, MatchResultListener* listener) const override {
-    return MatchInternal((UnpackStruct<sizeof...(I)>)(t), listener);
-  }
-
- private:
-  bool MatchInternal(UnpackedType tuple, MatchResultListener* listener) const {
-    if (!listener->IsInterested()) {
-      // If the listener is not interested, we don't need to construct the
-      // explanation.
-      bool good = true;
-      VariadicExpand({good = good && std::get<I>(matchers_).Matches(
-                                         std::get<I>(tuple))...});
-      return good;
-    }
-
-    size_t failed_pos = ~size_t{};
-
-    std::vector<StringMatchResultListener> inner_listener(sizeof...(I));
-
-    VariadicExpand(
-        {failed_pos == ~size_t{} && !std::get<I>(matchers_).MatchAndExplain(
-                                        std::get<I>(tuple), &inner_listener[I])
-             ? failed_pos = I
-             : 0 ...});
-    if (failed_pos != ~size_t{}) {
-      *listener << "whose field #" << failed_pos << " does not match";
-      PrintIfNotEmpty(inner_listener[failed_pos].str(), listener->stream());
-      return false;
-    }
-
-    *listener << "whose all elements match";
-    const char* separator = ", where";
-    for (size_t index = 0; index < sizeof...(I); ++index) {
-      const std::string str = inner_listener[index].str();
-      if (!str.empty()) {
-        *listener << separator << " field #" << index << " is a value " << str;
-        separator = ", and";
-      }
-    }
-
-    return true;
-  }
-
-  MatchersType matchers_;
-};
-
-template <typename... Inner>
-class FieldsAreMatcher {
- public:
-  explicit FieldsAreMatcher(Inner... inner) : matchers_(std::move(inner)...) {}
-
-  template <typename Struct>
-  operator Matcher<Struct>() const {  // NOLINT
-    return Matcher<Struct>(
-        new FieldsAreMatcherImpl<const Struct&, IndexSequenceFor<Inner...>>(
-            matchers_));
-  }
-
- private:
-  std::tuple<Inner...> matchers_;
-};
-
-// Implements ElementsAre() and ElementsAreArray().
-template <typename Container>
-class ElementsAreMatcherImpl : public MatcherInterface<Container> {
- public:
-  typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
-  typedef internal::StlContainerView<RawContainer> View;
-  typedef typename View::type StlContainer;
-  typedef typename View::const_reference StlContainerReference;
-  typedef typename StlContainer::value_type Element;
-
-  // Constructs the matcher from a sequence of element values or
-  // element matchers.
-  template <typename InputIter>
-  ElementsAreMatcherImpl(InputIter first, InputIter last) {
-    while (first != last) {
-      matchers_.push_back(MatcherCast<const Element&>(*first++));
-    }
-  }
-
-  // Describes what this matcher does.
-  void DescribeTo(::std::ostream* os) const override {
-    if (count() == 0) {
-      *os << "is empty";
-    } else if (count() == 1) {
-      *os << "has 1 element that ";
-      matchers_[0].DescribeTo(os);
-    } else {
-      *os << "has " << Elements(count()) << " where\n";
-      for (size_t i = 0; i != count(); ++i) {
-        *os << "element #" << i << " ";
-        matchers_[i].DescribeTo(os);
-        if (i + 1 < count()) {
-          *os << ",\n";
-        }
-      }
-    }
-  }
-
-  // Describes what the negation of this matcher does.
-  void DescribeNegationTo(::std::ostream* os) const override {
-    if (count() == 0) {
-      *os << "isn't empty";
-      return;
-    }
-
-    *os << "doesn't have " << Elements(count()) << ", or\n";
-    for (size_t i = 0; i != count(); ++i) {
-      *os << "element #" << i << " ";
-      matchers_[i].DescribeNegationTo(os);
-      if (i + 1 < count()) {
-        *os << ", or\n";
-      }
-    }
-  }
-
-  bool MatchAndExplain(Container container,
-                       MatchResultListener* listener) const override {
-    // To work with stream-like "containers", we must only walk
-    // through the elements in one pass.
-
-    const bool listener_interested = listener->IsInterested();
-
-    // explanations[i] is the explanation of the element at index i.
-    ::std::vector<std::string> explanations(count());
-    StlContainerReference stl_container = View::ConstReference(container);
-    typename StlContainer::const_iterator it = stl_container.begin();
-    size_t exam_pos = 0;
-    bool mismatch_found = false;  // Have we found a mismatched element yet?
-
-    // Go through the elements and matchers in pairs, until we reach
-    // the end of either the elements or the matchers, or until we find a
-    // mismatch.
-    for (; it != stl_container.end() && exam_pos != count(); ++it, ++exam_pos) {
-      bool match;  // Does the current element match the current matcher?
-      if (listener_interested) {
-        StringMatchResultListener s;
-        match = matchers_[exam_pos].MatchAndExplain(*it, &s);
-        explanations[exam_pos] = s.str();
-      } else {
-        match = matchers_[exam_pos].Matches(*it);
-      }
-
-      if (!match) {
-        mismatch_found = true;
-        break;
-      }
-    }
-    // If mismatch_found is true, 'exam_pos' is the index of the mismatch.
-
-    // Find how many elements the actual container has.  We avoid
-    // calling size() s.t. this code works for stream-like "containers"
-    // that don't define size().
-    size_t actual_count = exam_pos;
-    for (; it != stl_container.end(); ++it) {
-      ++actual_count;
-    }
-
-    if (actual_count != count()) {
-      // The element count doesn't match.  If the container is empty,
-      // there's no need to explain anything as Google Mock already
-      // prints the empty container.  Otherwise we just need to show
-      // how many elements there actually are.
-      if (listener_interested && (actual_count != 0)) {
-        *listener << "which has " << Elements(actual_count);
-      }
-      return false;
-    }
-
-    if (mismatch_found) {
-      // The element count matches, but the exam_pos-th element doesn't match.
-      if (listener_interested) {
-        *listener << "whose element #" << exam_pos << " doesn't match";
-        PrintIfNotEmpty(explanations[exam_pos], listener->stream());
-      }
-      return false;
-    }
-
-    // Every element matches its expectation.  We need to explain why
-    // (the obvious ones can be skipped).
-    if (listener_interested) {
-      bool reason_printed = false;
-      for (size_t i = 0; i != count(); ++i) {
-        const std::string& s = explanations[i];
-        if (!s.empty()) {
-          if (reason_printed) {
-            *listener << ",\nand ";
-          }
-          *listener << "whose element #" << i << " matches, " << s;
-          reason_printed = true;
-        }
-      }
-    }
-    return true;
-  }
-
- private:
-  static Message Elements(size_t count) {
-    return Message() << count << (count == 1 ? " element" : " elements");
-  }
-
-  size_t count() const { return matchers_.size(); }
-
-  ::std::vector<Matcher<const Element&> > matchers_;
-};
-
-// Connectivity matrix of (elements X matchers), in element-major order.
-// Initially, there are no edges.
-// Use NextGraph() to iterate over all possible edge configurations.
-// Use Randomize() to generate a random edge configuration.
-class GTEST_API_ MatchMatrix {
- public:
-  MatchMatrix(size_t num_elements, size_t num_matchers)
-      : num_elements_(num_elements),
-        num_matchers_(num_matchers),
-        matched_(num_elements_* num_matchers_, 0) {
-  }
-
-  size_t LhsSize() const { return num_elements_; }
-  size_t RhsSize() const { return num_matchers_; }
-  bool HasEdge(size_t ilhs, size_t irhs) const {
-    return matched_[SpaceIndex(ilhs, irhs)] == 1;
-  }
-  void SetEdge(size_t ilhs, size_t irhs, bool b) {
-    matched_[SpaceIndex(ilhs, irhs)] = b ? 1 : 0;
-  }
-
-  // Treating the connectivity matrix as a (LhsSize()*RhsSize())-bit number,
-  // adds 1 to that number; returns false if incrementing the graph left it
-  // empty.
-  bool NextGraph();
-
-  void Randomize();
-
-  std::string DebugString() const;
-
- private:
-  size_t SpaceIndex(size_t ilhs, size_t irhs) const {
-    return ilhs * num_matchers_ + irhs;
-  }
-
-  size_t num_elements_;
-  size_t num_matchers_;
-
-  // Each element is a char interpreted as bool. They are stored as a
-  // flattened array in lhs-major order, use 'SpaceIndex()' to translate
-  // a (ilhs, irhs) matrix coordinate into an offset.
-  ::std::vector<char> matched_;
-};
-
-typedef ::std::pair<size_t, size_t> ElementMatcherPair;
-typedef ::std::vector<ElementMatcherPair> ElementMatcherPairs;
-
-// Returns a maximum bipartite matching for the specified graph 'g'.
-// The matching is represented as a vector of {element, matcher} pairs.
-GTEST_API_ ElementMatcherPairs
-FindMaxBipartiteMatching(const MatchMatrix& g);
-
-struct UnorderedMatcherRequire {
-  enum Flags {
-    Superset = 1 << 0,
-    Subset = 1 << 1,
-    ExactMatch = Superset | Subset,
-  };
-};
-
-// Untyped base class for implementing UnorderedElementsAre.  By
-// putting logic that's not specific to the element type here, we
-// reduce binary bloat and increase compilation speed.
-class GTEST_API_ UnorderedElementsAreMatcherImplBase {
- protected:
-  explicit UnorderedElementsAreMatcherImplBase(
-      UnorderedMatcherRequire::Flags matcher_flags)
-      : match_flags_(matcher_flags) {}
-
-  // A vector of matcher describers, one for each element matcher.
-  // Does not own the describers (and thus can be used only when the
-  // element matchers are alive).
-  typedef ::std::vector<const MatcherDescriberInterface*> MatcherDescriberVec;
-
-  // Describes this UnorderedElementsAre matcher.
-  void DescribeToImpl(::std::ostream* os) const;
-
-  // Describes the negation of this UnorderedElementsAre matcher.
-  void DescribeNegationToImpl(::std::ostream* os) const;
-
-  bool VerifyMatchMatrix(const ::std::vector<std::string>& element_printouts,
-                         const MatchMatrix& matrix,
-                         MatchResultListener* listener) const;
-
-  bool FindPairing(const MatchMatrix& matrix,
-                   MatchResultListener* listener) const;
-
-  MatcherDescriberVec& matcher_describers() {
-    return matcher_describers_;
-  }
-
-  static Message Elements(size_t n) {
-    return Message() << n << " element" << (n == 1 ? "" : "s");
-  }
-
-  UnorderedMatcherRequire::Flags match_flags() const { return match_flags_; }
-
- private:
-  UnorderedMatcherRequire::Flags match_flags_;
-  MatcherDescriberVec matcher_describers_;
-};
-
-// Implements UnorderedElementsAre, UnorderedElementsAreArray, IsSubsetOf, and
-// IsSupersetOf.
-template <typename Container>
-class UnorderedElementsAreMatcherImpl
-    : public MatcherInterface<Container>,
-      public UnorderedElementsAreMatcherImplBase {
- public:
-  typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
-  typedef internal::StlContainerView<RawContainer> View;
-  typedef typename View::type StlContainer;
-  typedef typename View::const_reference StlContainerReference;
-  typedef typename StlContainer::const_iterator StlContainerConstIterator;
-  typedef typename StlContainer::value_type Element;
-
-  template <typename InputIter>
-  UnorderedElementsAreMatcherImpl(UnorderedMatcherRequire::Flags matcher_flags,
-                                  InputIter first, InputIter last)
-      : UnorderedElementsAreMatcherImplBase(matcher_flags) {
-    for (; first != last; ++first) {
-      matchers_.push_back(MatcherCast<const Element&>(*first));
-    }
-    for (const auto& m : matchers_) {
-      matcher_describers().push_back(m.GetDescriber());
-    }
-  }
-
-  // Describes what this matcher does.
-  void DescribeTo(::std::ostream* os) const override {
-    return UnorderedElementsAreMatcherImplBase::DescribeToImpl(os);
-  }
-
-  // Describes what the negation of this matcher does.
-  void DescribeNegationTo(::std::ostream* os) const override {
-    return UnorderedElementsAreMatcherImplBase::DescribeNegationToImpl(os);
-  }
-
-  bool MatchAndExplain(Container container,
-                       MatchResultListener* listener) const override {
-    StlContainerReference stl_container = View::ConstReference(container);
-    ::std::vector<std::string> element_printouts;
-    MatchMatrix matrix =
-        AnalyzeElements(stl_container.begin(), stl_container.end(),
-                        &element_printouts, listener);
-
-    if (matrix.LhsSize() == 0 && matrix.RhsSize() == 0) {
-      return true;
-    }
-
-    if (match_flags() == UnorderedMatcherRequire::ExactMatch) {
-      if (matrix.LhsSize() != matrix.RhsSize()) {
-        // The element count doesn't match.  If the container is empty,
-        // there's no need to explain anything as Google Mock already
-        // prints the empty container. Otherwise we just need to show
-        // how many elements there actually are.
-        if (matrix.LhsSize() != 0 && listener->IsInterested()) {
-          *listener << "which has " << Elements(matrix.LhsSize());
-        }
-        return false;
-      }
-    }
-
-    return VerifyMatchMatrix(element_printouts, matrix, listener) &&
-           FindPairing(matrix, listener);
-  }
-
- private:
-  template <typename ElementIter>
-  MatchMatrix AnalyzeElements(ElementIter elem_first, ElementIter elem_last,
-                              ::std::vector<std::string>* element_printouts,
-                              MatchResultListener* listener) const {
-    element_printouts->clear();
-    ::std::vector<char> did_match;
-    size_t num_elements = 0;
-    DummyMatchResultListener dummy;
-    for (; elem_first != elem_last; ++num_elements, ++elem_first) {
-      if (listener->IsInterested()) {
-        element_printouts->push_back(PrintToString(*elem_first));
-      }
-      for (size_t irhs = 0; irhs != matchers_.size(); ++irhs) {
-        did_match.push_back(
-            matchers_[irhs].MatchAndExplain(*elem_first, &dummy));
-      }
-    }
-
-    MatchMatrix matrix(num_elements, matchers_.size());
-    ::std::vector<char>::const_iterator did_match_iter = did_match.begin();
-    for (size_t ilhs = 0; ilhs != num_elements; ++ilhs) {
-      for (size_t irhs = 0; irhs != matchers_.size(); ++irhs) {
-        matrix.SetEdge(ilhs, irhs, *did_match_iter++ != 0);
-      }
-    }
-    return matrix;
-  }
-
-  ::std::vector<Matcher<const Element&> > matchers_;
-};
-
-// Functor for use in TransformTuple.
-// Performs MatcherCast<Target> on an input argument of any type.
-template <typename Target>
-struct CastAndAppendTransform {
-  template <typename Arg>
-  Matcher<Target> operator()(const Arg& a) const {
-    return MatcherCast<Target>(a);
-  }
-};
-
-// Implements UnorderedElementsAre.
-template <typename MatcherTuple>
-class UnorderedElementsAreMatcher {
- public:
-  explicit UnorderedElementsAreMatcher(const MatcherTuple& args)
-      : matchers_(args) {}
-
-  template <typename Container>
-  operator Matcher<Container>() const {
-    typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
-    typedef typename internal::StlContainerView<RawContainer>::type View;
-    typedef typename View::value_type Element;
-    typedef ::std::vector<Matcher<const Element&> > MatcherVec;
-    MatcherVec matchers;
-    matchers.reserve(::std::tuple_size<MatcherTuple>::value);
-    TransformTupleValues(CastAndAppendTransform<const Element&>(), matchers_,
-                         ::std::back_inserter(matchers));
-    return Matcher<Container>(
-        new UnorderedElementsAreMatcherImpl<const Container&>(
-            UnorderedMatcherRequire::ExactMatch, matchers.begin(),
-            matchers.end()));
-  }
-
- private:
-  const MatcherTuple matchers_;
-};
-
-// Implements ElementsAre.
-template <typename MatcherTuple>
-class ElementsAreMatcher {
- public:
-  explicit ElementsAreMatcher(const MatcherTuple& args) : matchers_(args) {}
-
-  template <typename Container>
-  operator Matcher<Container>() const {
-    GTEST_COMPILE_ASSERT_(
-        !IsHashTable<GTEST_REMOVE_REFERENCE_AND_CONST_(Container)>::value ||
-            ::std::tuple_size<MatcherTuple>::value < 2,
-        use_UnorderedElementsAre_with_hash_tables);
-
-    typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
-    typedef typename internal::StlContainerView<RawContainer>::type View;
-    typedef typename View::value_type Element;
-    typedef ::std::vector<Matcher<const Element&> > MatcherVec;
-    MatcherVec matchers;
-    matchers.reserve(::std::tuple_size<MatcherTuple>::value);
-    TransformTupleValues(CastAndAppendTransform<const Element&>(), matchers_,
-                         ::std::back_inserter(matchers));
-    return Matcher<Container>(new ElementsAreMatcherImpl<const Container&>(
-        matchers.begin(), matchers.end()));
-  }
-
- private:
-  const MatcherTuple matchers_;
-};
-
-// Implements UnorderedElementsAreArray(), IsSubsetOf(), and IsSupersetOf().
-template <typename T>
-class UnorderedElementsAreArrayMatcher {
- public:
-  template <typename Iter>
-  UnorderedElementsAreArrayMatcher(UnorderedMatcherRequire::Flags match_flags,
-                                   Iter first, Iter last)
-      : match_flags_(match_flags), matchers_(first, last) {}
-
-  template <typename Container>
-  operator Matcher<Container>() const {
-    return Matcher<Container>(
-        new UnorderedElementsAreMatcherImpl<const Container&>(
-            match_flags_, matchers_.begin(), matchers_.end()));
-  }
-
- private:
-  UnorderedMatcherRequire::Flags match_flags_;
-  ::std::vector<T> matchers_;
-};
-
-// Implements ElementsAreArray().
-template <typename T>
-class ElementsAreArrayMatcher {
- public:
-  template <typename Iter>
-  ElementsAreArrayMatcher(Iter first, Iter last) : matchers_(first, last) {}
-
-  template <typename Container>
-  operator Matcher<Container>() const {
-    GTEST_COMPILE_ASSERT_(
-        !IsHashTable<GTEST_REMOVE_REFERENCE_AND_CONST_(Container)>::value,
-        use_UnorderedElementsAreArray_with_hash_tables);
-
-    return Matcher<Container>(new ElementsAreMatcherImpl<const Container&>(
-        matchers_.begin(), matchers_.end()));
-  }
-
- private:
-  const ::std::vector<T> matchers_;
-};
-
-// Given a 2-tuple matcher tm of type Tuple2Matcher and a value second
-// of type Second, BoundSecondMatcher<Tuple2Matcher, Second>(tm,
-// second) is a polymorphic matcher that matches a value x if and only if
-// tm matches tuple (x, second).  Useful for implementing
-// UnorderedPointwise() in terms of UnorderedElementsAreArray().
-//
-// BoundSecondMatcher is copyable and assignable, as we need to put
-// instances of this class in a vector when implementing
-// UnorderedPointwise().
-template <typename Tuple2Matcher, typename Second>
-class BoundSecondMatcher {
- public:
-  BoundSecondMatcher(const Tuple2Matcher& tm, const Second& second)
-      : tuple2_matcher_(tm), second_value_(second) {}
-
-  BoundSecondMatcher(const BoundSecondMatcher& other) = default;
-
-  template <typename T>
-  operator Matcher<T>() const {
-    return MakeMatcher(new Impl<T>(tuple2_matcher_, second_value_));
-  }
-
-  // We have to define this for UnorderedPointwise() to compile in
-  // C++98 mode, as it puts BoundSecondMatcher instances in a vector,
-  // which requires the elements to be assignable in C++98.  The
-  // compiler cannot generate the operator= for us, as Tuple2Matcher
-  // and Second may not be assignable.
-  //
-  // However, this should never be called, so the implementation just
-  // need to assert.
-  void operator=(const BoundSecondMatcher& /*rhs*/) {
-    GTEST_LOG_(FATAL) << "BoundSecondMatcher should never be assigned.";
-  }
-
- private:
-  template <typename T>
-  class Impl : public MatcherInterface<T> {
-   public:
-    typedef ::std::tuple<T, Second> ArgTuple;
-
-    Impl(const Tuple2Matcher& tm, const Second& second)
-        : mono_tuple2_matcher_(SafeMatcherCast<const ArgTuple&>(tm)),
-          second_value_(second) {}
-
-    void DescribeTo(::std::ostream* os) const override {
-      *os << "and ";
-      UniversalPrint(second_value_, os);
-      *os << " ";
-      mono_tuple2_matcher_.DescribeTo(os);
-    }
-
-    bool MatchAndExplain(T x, MatchResultListener* listener) const override {
-      return mono_tuple2_matcher_.MatchAndExplain(ArgTuple(x, second_value_),
-                                                  listener);
-    }
-
-   private:
-    const Matcher<const ArgTuple&> mono_tuple2_matcher_;
-    const Second second_value_;
-  };
-
-  const Tuple2Matcher tuple2_matcher_;
-  const Second second_value_;
-};
-
-// Given a 2-tuple matcher tm and a value second,
-// MatcherBindSecond(tm, second) returns a matcher that matches a
-// value x if and only if tm matches tuple (x, second).  Useful for
-// implementing UnorderedPointwise() in terms of UnorderedElementsAreArray().
-template <typename Tuple2Matcher, typename Second>
-BoundSecondMatcher<Tuple2Matcher, Second> MatcherBindSecond(
-    const Tuple2Matcher& tm, const Second& second) {
-  return BoundSecondMatcher<Tuple2Matcher, Second>(tm, second);
-}
-
-// Returns the description for a matcher defined using the MATCHER*()
-// macro where the user-supplied description string is "", if
-// 'negation' is false; otherwise returns the description of the
-// negation of the matcher.  'param_values' contains a list of strings
-// that are the print-out of the matcher's parameters.
-GTEST_API_ std::string FormatMatcherDescription(bool negation,
-                                                const char* matcher_name,
-                                                const Strings& param_values);
-
-// Implements a matcher that checks the value of a optional<> type variable.
-template <typename ValueMatcher>
-class OptionalMatcher {
- public:
-  explicit OptionalMatcher(const ValueMatcher& value_matcher)
-      : value_matcher_(value_matcher) {}
-
-  template <typename Optional>
-  operator Matcher<Optional>() const {
-    return Matcher<Optional>(new Impl<const Optional&>(value_matcher_));
-  }
-
-  template <typename Optional>
-  class Impl : public MatcherInterface<Optional> {
-   public:
-    typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Optional) OptionalView;
-    typedef typename OptionalView::value_type ValueType;
-    explicit Impl(const ValueMatcher& value_matcher)
-        : value_matcher_(MatcherCast<ValueType>(value_matcher)) {}
-
-    void DescribeTo(::std::ostream* os) const override {
-      *os << "value ";
-      value_matcher_.DescribeTo(os);
-    }
-
-    void DescribeNegationTo(::std::ostream* os) const override {
-      *os << "value ";
-      value_matcher_.DescribeNegationTo(os);
-    }
-
-    bool MatchAndExplain(Optional optional,
-                         MatchResultListener* listener) const override {
-      if (!optional) {
-        *listener << "which is not engaged";
-        return false;
-      }
-      const ValueType& value = *optional;
-      StringMatchResultListener value_listener;
-      const bool match = value_matcher_.MatchAndExplain(value, &value_listener);
-      *listener << "whose value " << PrintToString(value)
-                << (match ? " matches" : " doesn't match");
-      PrintIfNotEmpty(value_listener.str(), listener->stream());
-      return match;
-    }
-
-   private:
-    const Matcher<ValueType> value_matcher_;
-  };
-
- private:
-  const ValueMatcher value_matcher_;
-};
-
-namespace variant_matcher {
-// Overloads to allow VariantMatcher to do proper ADL lookup.
-template <typename T>
-void holds_alternative() {}
-template <typename T>
-void get() {}
-
-// Implements a matcher that checks the value of a variant<> type variable.
-template <typename T>
-class VariantMatcher {
- public:
-  explicit VariantMatcher(::testing::Matcher<const T&> matcher)
-      : matcher_(std::move(matcher)) {}
-
-  template <typename Variant>
-  bool MatchAndExplain(const Variant& value,
-                       ::testing::MatchResultListener* listener) const {
-    using std::get;
-    if (!listener->IsInterested()) {
-      return holds_alternative<T>(value) && matcher_.Matches(get<T>(value));
-    }
-
-    if (!holds_alternative<T>(value)) {
-      *listener << "whose value is not of type '" << GetTypeName() << "'";
-      return false;
-    }
-
-    const T& elem = get<T>(value);
-    StringMatchResultListener elem_listener;
-    const bool match = matcher_.MatchAndExplain(elem, &elem_listener);
-    *listener << "whose value " << PrintToString(elem)
-              << (match ? " matches" : " doesn't match");
-    PrintIfNotEmpty(elem_listener.str(), listener->stream());
-    return match;
-  }
-
-  void DescribeTo(std::ostream* os) const {
-    *os << "is a variant<> with value of type '" << GetTypeName()
-        << "' and the value ";
-    matcher_.DescribeTo(os);
-  }
-
-  void DescribeNegationTo(std::ostream* os) const {
-    *os << "is a variant<> with value of type other than '" << GetTypeName()
-        << "' or the value ";
-    matcher_.DescribeNegationTo(os);
-  }
-
- private:
-  static std::string GetTypeName() {
-#if GTEST_HAS_RTTI
-    GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(
-        return internal::GetTypeName<T>());
-#endif
-    return "the element type";
-  }
-
-  const ::testing::Matcher<const T&> matcher_;
-};
-
-}  // namespace variant_matcher
-
-namespace any_cast_matcher {
-
-// Overloads to allow AnyCastMatcher to do proper ADL lookup.
-template <typename T>
-void any_cast() {}
-
-// Implements a matcher that any_casts the value.
-template <typename T>
-class AnyCastMatcher {
- public:
-  explicit AnyCastMatcher(const ::testing::Matcher<const T&>& matcher)
-      : matcher_(matcher) {}
-
-  template <typename AnyType>
-  bool MatchAndExplain(const AnyType& value,
-                       ::testing::MatchResultListener* listener) const {
-    if (!listener->IsInterested()) {
-      const T* ptr = any_cast<T>(&value);
-      return ptr != nullptr && matcher_.Matches(*ptr);
-    }
-
-    const T* elem = any_cast<T>(&value);
-    if (elem == nullptr) {
-      *listener << "whose value is not of type '" << GetTypeName() << "'";
-      return false;
-    }
-
-    StringMatchResultListener elem_listener;
-    const bool match = matcher_.MatchAndExplain(*elem, &elem_listener);
-    *listener << "whose value " << PrintToString(*elem)
-              << (match ? " matches" : " doesn't match");
-    PrintIfNotEmpty(elem_listener.str(), listener->stream());
-    return match;
-  }
-
-  void DescribeTo(std::ostream* os) const {
-    *os << "is an 'any' type with value of type '" << GetTypeName()
-        << "' and the value ";
-    matcher_.DescribeTo(os);
-  }
-
-  void DescribeNegationTo(std::ostream* os) const {
-    *os << "is an 'any' type with value of type other than '" << GetTypeName()
-        << "' or the value ";
-    matcher_.DescribeNegationTo(os);
-  }
-
- private:
-  static std::string GetTypeName() {
-#if GTEST_HAS_RTTI
-    GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(
-        return internal::GetTypeName<T>());
-#endif
-    return "the element type";
-  }
-
-  const ::testing::Matcher<const T&> matcher_;
-};
-
-}  // namespace any_cast_matcher
-
-// Implements the Args() matcher.
-template <class ArgsTuple, size_t... k>
-class ArgsMatcherImpl : public MatcherInterface<ArgsTuple> {
- public:
-  using RawArgsTuple = typename std::decay<ArgsTuple>::type;
-  using SelectedArgs =
-      std::tuple<typename std::tuple_element<k, RawArgsTuple>::type...>;
-  using MonomorphicInnerMatcher = Matcher<const SelectedArgs&>;
-
-  template <typename InnerMatcher>
-  explicit ArgsMatcherImpl(const InnerMatcher& inner_matcher)
-      : inner_matcher_(SafeMatcherCast<const SelectedArgs&>(inner_matcher)) {}
-
-  bool MatchAndExplain(ArgsTuple args,
-                       MatchResultListener* listener) const override {
-    // Workaround spurious C4100 on MSVC<=15.7 when k is empty.
-    (void)args;
-    const SelectedArgs& selected_args =
-        std::forward_as_tuple(std::get<k>(args)...);
-    if (!listener->IsInterested()) return inner_matcher_.Matches(selected_args);
-
-    PrintIndices(listener->stream());
-    *listener << "are " << PrintToString(selected_args);
-
-    StringMatchResultListener inner_listener;
-    const bool match =
-        inner_matcher_.MatchAndExplain(selected_args, &inner_listener);
-    PrintIfNotEmpty(inner_listener.str(), listener->stream());
-    return match;
-  }
-
-  void DescribeTo(::std::ostream* os) const override {
-    *os << "are a tuple ";
-    PrintIndices(os);
-    inner_matcher_.DescribeTo(os);
-  }
-
-  void DescribeNegationTo(::std::ostream* os) const override {
-    *os << "are a tuple ";
-    PrintIndices(os);
-    inner_matcher_.DescribeNegationTo(os);
-  }
-
- private:
-  // Prints the indices of the selected fields.
-  static void PrintIndices(::std::ostream* os) {
-    *os << "whose fields (";
-    const char* sep = "";
-    // Workaround spurious C4189 on MSVC<=15.7 when k is empty.
-    (void)sep;
-    const char* dummy[] = {"", (*os << sep << "#" << k, sep = ", ")...};
-    (void)dummy;
-    *os << ") ";
-  }
-
-  MonomorphicInnerMatcher inner_matcher_;
-};
-
-template <class InnerMatcher, size_t... k>
-class ArgsMatcher {
- public:
-  explicit ArgsMatcher(InnerMatcher inner_matcher)
-      : inner_matcher_(std::move(inner_matcher)) {}
-
-  template <typename ArgsTuple>
-  operator Matcher<ArgsTuple>() const {  // NOLINT
-    return MakeMatcher(new ArgsMatcherImpl<ArgsTuple, k...>(inner_matcher_));
-  }
-
- private:
-  InnerMatcher inner_matcher_;
-};
-
-}  // namespace internal
-
-// ElementsAreArray(iterator_first, iterator_last)
-// ElementsAreArray(pointer, count)
-// ElementsAreArray(array)
-// ElementsAreArray(container)
-// ElementsAreArray({ e1, e2, ..., en })
-//
-// The ElementsAreArray() functions are like ElementsAre(...), except
-// that they are given a homogeneous sequence rather than taking each
-// element as a function argument. The sequence can be specified as an
-// array, a pointer and count, a vector, an initializer list, or an
-// STL iterator range. In each of these cases, the underlying sequence
-// can be either a sequence of values or a sequence of matchers.
-//
-// All forms of ElementsAreArray() make a copy of the input matcher sequence.
-
-template <typename Iter>
-inline internal::ElementsAreArrayMatcher<
-    typename ::std::iterator_traits<Iter>::value_type>
-ElementsAreArray(Iter first, Iter last) {
-  typedef typename ::std::iterator_traits<Iter>::value_type T;
-  return internal::ElementsAreArrayMatcher<T>(first, last);
-}
-
-template <typename T>
-inline auto ElementsAreArray(const T* pointer, size_t count)
-    -> decltype(ElementsAreArray(pointer, pointer + count)) {
-  return ElementsAreArray(pointer, pointer + count);
-}
-
-template <typename T, size_t N>
-inline auto ElementsAreArray(const T (&array)[N])
-    -> decltype(ElementsAreArray(array, N)) {
-  return ElementsAreArray(array, N);
-}
-
-template <typename Container>
-inline auto ElementsAreArray(const Container& container)
-    -> decltype(ElementsAreArray(container.begin(), container.end())) {
-  return ElementsAreArray(container.begin(), container.end());
-}
-
-template <typename T>
-inline auto ElementsAreArray(::std::initializer_list<T> xs)
-    -> decltype(ElementsAreArray(xs.begin(), xs.end())) {
-  return ElementsAreArray(xs.begin(), xs.end());
-}
-
-// UnorderedElementsAreArray(iterator_first, iterator_last)
-// UnorderedElementsAreArray(pointer, count)
-// UnorderedElementsAreArray(array)
-// UnorderedElementsAreArray(container)
-// UnorderedElementsAreArray({ e1, e2, ..., en })
-//
-// UnorderedElementsAreArray() verifies that a bijective mapping onto a
-// collection of matchers exists.
-//
-// The matchers can be specified as an array, a pointer and count, a container,
-// an initializer list, or an STL iterator range. In each of these cases, the
-// underlying matchers can be either values or matchers.
-
-template <typename Iter>
-inline internal::UnorderedElementsAreArrayMatcher<
-    typename ::std::iterator_traits<Iter>::value_type>
-UnorderedElementsAreArray(Iter first, Iter last) {
-  typedef typename ::std::iterator_traits<Iter>::value_type T;
-  return internal::UnorderedElementsAreArrayMatcher<T>(
-      internal::UnorderedMatcherRequire::ExactMatch, first, last);
-}
-
-template <typename T>
-inline internal::UnorderedElementsAreArrayMatcher<T>
-UnorderedElementsAreArray(const T* pointer, size_t count) {
-  return UnorderedElementsAreArray(pointer, pointer + count);
-}
-
-template <typename T, size_t N>
-inline internal::UnorderedElementsAreArrayMatcher<T>
-UnorderedElementsAreArray(const T (&array)[N]) {
-  return UnorderedElementsAreArray(array, N);
-}
-
-template <typename Container>
-inline internal::UnorderedElementsAreArrayMatcher<
-    typename Container::value_type>
-UnorderedElementsAreArray(const Container& container) {
-  return UnorderedElementsAreArray(container.begin(), container.end());
-}
-
-template <typename T>
-inline internal::UnorderedElementsAreArrayMatcher<T>
-UnorderedElementsAreArray(::std::initializer_list<T> xs) {
-  return UnorderedElementsAreArray(xs.begin(), xs.end());
-}
-
-// _ is a matcher that matches anything of any type.
-//
-// This definition is fine as:
-//
-//   1. The C++ standard permits using the name _ in a namespace that
-//      is not the global namespace or ::std.
-//   2. The AnythingMatcher class has no data member or constructor,
-//      so it's OK to create global variables of this type.
-//   3. c-style has approved of using _ in this case.
-const internal::AnythingMatcher _ = {};
-// Creates a matcher that matches any value of the given type T.
-template <typename T>
-inline Matcher<T> A() {
-  return _;
-}
-
-// Creates a matcher that matches any value of the given type T.
-template <typename T>
-inline Matcher<T> An() {
-  return _;
-}
-
-template <typename T, typename M>
-Matcher<T> internal::MatcherCastImpl<T, M>::CastImpl(
-    const M& value, std::false_type /* convertible_to_matcher */,
-    std::false_type /* convertible_to_T */) {
-  return Eq(value);
-}
-
-// Creates a polymorphic matcher that matches any NULL pointer.
-inline PolymorphicMatcher<internal::IsNullMatcher > IsNull() {
-  return MakePolymorphicMatcher(internal::IsNullMatcher());
-}
-
-// Creates a polymorphic matcher that matches any non-NULL pointer.
-// This is convenient as Not(NULL) doesn't compile (the compiler
-// thinks that that expression is comparing a pointer with an integer).
-inline PolymorphicMatcher<internal::NotNullMatcher > NotNull() {
-  return MakePolymorphicMatcher(internal::NotNullMatcher());
-}
-
-// Creates a polymorphic matcher that matches any argument that
-// references variable x.
-template <typename T>
-inline internal::RefMatcher<T&> Ref(T& x) {  // NOLINT
-  return internal::RefMatcher<T&>(x);
-}
-
-// Creates a polymorphic matcher that matches any NaN floating point.
-inline PolymorphicMatcher<internal::IsNanMatcher> IsNan() {
-  return MakePolymorphicMatcher(internal::IsNanMatcher());
-}
-
-// Creates a matcher that matches any double argument approximately
-// equal to rhs, where two NANs are considered unequal.
-inline internal::FloatingEqMatcher<double> DoubleEq(double rhs) {
-  return internal::FloatingEqMatcher<double>(rhs, false);
-}
-
-// Creates a matcher that matches any double argument approximately
-// equal to rhs, including NaN values when rhs is NaN.
-inline internal::FloatingEqMatcher<double> NanSensitiveDoubleEq(double rhs) {
-  return internal::FloatingEqMatcher<double>(rhs, true);
-}
-
-// Creates a matcher that matches any double argument approximately equal to
-// rhs, up to the specified max absolute error bound, where two NANs are
-// considered unequal.  The max absolute error bound must be non-negative.
-inline internal::FloatingEqMatcher<double> DoubleNear(
-    double rhs, double max_abs_error) {
-  return internal::FloatingEqMatcher<double>(rhs, false, max_abs_error);
-}
-
-// Creates a matcher that matches any double argument approximately equal to
-// rhs, up to the specified max absolute error bound, including NaN values when
-// rhs is NaN.  The max absolute error bound must be non-negative.
-inline internal::FloatingEqMatcher<double> NanSensitiveDoubleNear(
-    double rhs, double max_abs_error) {
-  return internal::FloatingEqMatcher<double>(rhs, true, max_abs_error);
-}
-
-// Creates a matcher that matches any float argument approximately
-// equal to rhs, where two NANs are considered unequal.
-inline internal::FloatingEqMatcher<float> FloatEq(float rhs) {
-  return internal::FloatingEqMatcher<float>(rhs, false);
-}
-
-// Creates a matcher that matches any float argument approximately
-// equal to rhs, including NaN values when rhs is NaN.
-inline internal::FloatingEqMatcher<float> NanSensitiveFloatEq(float rhs) {
-  return internal::FloatingEqMatcher<float>(rhs, true);
-}
-
-// Creates a matcher that matches any float argument approximately equal to
-// rhs, up to the specified max absolute error bound, where two NANs are
-// considered unequal.  The max absolute error bound must be non-negative.
-inline internal::FloatingEqMatcher<float> FloatNear(
-    float rhs, float max_abs_error) {
-  return internal::FloatingEqMatcher<float>(rhs, false, max_abs_error);
-}
-
-// Creates a matcher that matches any float argument approximately equal to
-// rhs, up to the specified max absolute error bound, including NaN values when
-// rhs is NaN.  The max absolute error bound must be non-negative.
-inline internal::FloatingEqMatcher<float> NanSensitiveFloatNear(
-    float rhs, float max_abs_error) {
-  return internal::FloatingEqMatcher<float>(rhs, true, max_abs_error);
-}
-
-// Creates a matcher that matches a pointer (raw or smart) that points
-// to a value that matches inner_matcher.
-template <typename InnerMatcher>
-inline internal::PointeeMatcher<InnerMatcher> Pointee(
-    const InnerMatcher& inner_matcher) {
-  return internal::PointeeMatcher<InnerMatcher>(inner_matcher);
-}
-
-#if GTEST_HAS_RTTI
-// Creates a matcher that matches a pointer or reference that matches
-// inner_matcher when dynamic_cast<To> is applied.
-// The result of dynamic_cast<To> is forwarded to the inner matcher.
-// If To is a pointer and the cast fails, the inner matcher will receive NULL.
-// If To is a reference and the cast fails, this matcher returns false
-// immediately.
-template <typename To>
-inline PolymorphicMatcher<internal::WhenDynamicCastToMatcher<To> >
-WhenDynamicCastTo(const Matcher<To>& inner_matcher) {
-  return MakePolymorphicMatcher(
-      internal::WhenDynamicCastToMatcher<To>(inner_matcher));
-}
-#endif  // GTEST_HAS_RTTI
-
-// Creates a matcher that matches an object whose given field matches
-// 'matcher'.  For example,
-//   Field(&Foo::number, Ge(5))
-// matches a Foo object x if and only if x.number >= 5.
-template <typename Class, typename FieldType, typename FieldMatcher>
-inline PolymorphicMatcher<
-  internal::FieldMatcher<Class, FieldType> > Field(
-    FieldType Class::*field, const FieldMatcher& matcher) {
-  return MakePolymorphicMatcher(
-      internal::FieldMatcher<Class, FieldType>(
-          field, MatcherCast<const FieldType&>(matcher)));
-  // The call to MatcherCast() is required for supporting inner
-  // matchers of compatible types.  For example, it allows
-  //   Field(&Foo::bar, m)
-  // to compile where bar is an int32 and m is a matcher for int64.
-}
-
-// Same as Field() but also takes the name of the field to provide better error
-// messages.
-template <typename Class, typename FieldType, typename FieldMatcher>
-inline PolymorphicMatcher<internal::FieldMatcher<Class, FieldType> > Field(
-    const std::string& field_name, FieldType Class::*field,
-    const FieldMatcher& matcher) {
-  return MakePolymorphicMatcher(internal::FieldMatcher<Class, FieldType>(
-      field_name, field, MatcherCast<const FieldType&>(matcher)));
-}
-
-// Creates a matcher that matches an object whose given property
-// matches 'matcher'.  For example,
-//   Property(&Foo::str, StartsWith("hi"))
-// matches a Foo object x if and only if x.str() starts with "hi".
-template <typename Class, typename PropertyType, typename PropertyMatcher>
-inline PolymorphicMatcher<internal::PropertyMatcher<
-    Class, PropertyType, PropertyType (Class::*)() const> >
-Property(PropertyType (Class::*property)() const,
-         const PropertyMatcher& matcher) {
-  return MakePolymorphicMatcher(
-      internal::PropertyMatcher<Class, PropertyType,
-                                PropertyType (Class::*)() const>(
-          property, MatcherCast<const PropertyType&>(matcher)));
-  // The call to MatcherCast() is required for supporting inner
-  // matchers of compatible types.  For example, it allows
-  //   Property(&Foo::bar, m)
-  // to compile where bar() returns an int32 and m is a matcher for int64.
-}
-
-// Same as Property() above, but also takes the name of the property to provide
-// better error messages.
-template <typename Class, typename PropertyType, typename PropertyMatcher>
-inline PolymorphicMatcher<internal::PropertyMatcher<
-    Class, PropertyType, PropertyType (Class::*)() const> >
-Property(const std::string& property_name,
-         PropertyType (Class::*property)() const,
-         const PropertyMatcher& matcher) {
-  return MakePolymorphicMatcher(
-      internal::PropertyMatcher<Class, PropertyType,
-                                PropertyType (Class::*)() const>(
-          property_name, property, MatcherCast<const PropertyType&>(matcher)));
-}
-
-// The same as above but for reference-qualified member functions.
-template <typename Class, typename PropertyType, typename PropertyMatcher>
-inline PolymorphicMatcher<internal::PropertyMatcher<
-    Class, PropertyType, PropertyType (Class::*)() const &> >
-Property(PropertyType (Class::*property)() const &,
-         const PropertyMatcher& matcher) {
-  return MakePolymorphicMatcher(
-      internal::PropertyMatcher<Class, PropertyType,
-                                PropertyType (Class::*)() const&>(
-          property, MatcherCast<const PropertyType&>(matcher)));
-}
-
-// Three-argument form for reference-qualified member functions.
-template <typename Class, typename PropertyType, typename PropertyMatcher>
-inline PolymorphicMatcher<internal::PropertyMatcher<
-    Class, PropertyType, PropertyType (Class::*)() const &> >
-Property(const std::string& property_name,
-         PropertyType (Class::*property)() const &,
-         const PropertyMatcher& matcher) {
-  return MakePolymorphicMatcher(
-      internal::PropertyMatcher<Class, PropertyType,
-                                PropertyType (Class::*)() const&>(
-          property_name, property, MatcherCast<const PropertyType&>(matcher)));
-}
-
-// Creates a matcher that matches an object if and only if the result of
-// applying a callable to x matches 'matcher'. For example,
-//   ResultOf(f, StartsWith("hi"))
-// matches a Foo object x if and only if f(x) starts with "hi".
-// `callable` parameter can be a function, function pointer, or a functor. It is
-// required to keep no state affecting the results of the calls on it and make
-// no assumptions about how many calls will be made. Any state it keeps must be
-// protected from the concurrent access.
-template <typename Callable, typename InnerMatcher>
-internal::ResultOfMatcher<Callable, InnerMatcher> ResultOf(
-    Callable callable, InnerMatcher matcher) {
-  return internal::ResultOfMatcher<Callable, InnerMatcher>(
-      std::move(callable), std::move(matcher));
-}
-
-// String matchers.
-
-// Matches a string equal to str.
-template <typename T = std::string>
-PolymorphicMatcher<internal::StrEqualityMatcher<std::string> > StrEq(
-    const internal::StringLike<T>& str) {
-  return MakePolymorphicMatcher(
-      internal::StrEqualityMatcher<std::string>(std::string(str), true, true));
-}
-
-// Matches a string not equal to str.
-template <typename T = std::string>
-PolymorphicMatcher<internal::StrEqualityMatcher<std::string> > StrNe(
-    const internal::StringLike<T>& str) {
-  return MakePolymorphicMatcher(
-      internal::StrEqualityMatcher<std::string>(std::string(str), false, true));
-}
-
-// Matches a string equal to str, ignoring case.
-template <typename T = std::string>
-PolymorphicMatcher<internal::StrEqualityMatcher<std::string> > StrCaseEq(
-    const internal::StringLike<T>& str) {
-  return MakePolymorphicMatcher(
-      internal::StrEqualityMatcher<std::string>(std::string(str), true, false));
-}
-
-// Matches a string not equal to str, ignoring case.
-template <typename T = std::string>
-PolymorphicMatcher<internal::StrEqualityMatcher<std::string> > StrCaseNe(
-    const internal::StringLike<T>& str) {
-  return MakePolymorphicMatcher(internal::StrEqualityMatcher<std::string>(
-      std::string(str), false, false));
-}
-
-// Creates a matcher that matches any string, std::string, or C string
-// that contains the given substring.
-template <typename T = std::string>
-PolymorphicMatcher<internal::HasSubstrMatcher<std::string> > HasSubstr(
-    const internal::StringLike<T>& substring) {
-  return MakePolymorphicMatcher(
-      internal::HasSubstrMatcher<std::string>(std::string(substring)));
-}
-
-// Matches a string that starts with 'prefix' (case-sensitive).
-template <typename T = std::string>
-PolymorphicMatcher<internal::StartsWithMatcher<std::string> > StartsWith(
-    const internal::StringLike<T>& prefix) {
-  return MakePolymorphicMatcher(
-      internal::StartsWithMatcher<std::string>(std::string(prefix)));
-}
-
-// Matches a string that ends with 'suffix' (case-sensitive).
-template <typename T = std::string>
-PolymorphicMatcher<internal::EndsWithMatcher<std::string> > EndsWith(
-    const internal::StringLike<T>& suffix) {
-  return MakePolymorphicMatcher(
-      internal::EndsWithMatcher<std::string>(std::string(suffix)));
-}
-
-#if GTEST_HAS_STD_WSTRING
-// Wide string matchers.
-
-// Matches a string equal to str.
-inline PolymorphicMatcher<internal::StrEqualityMatcher<std::wstring> > StrEq(
-    const std::wstring& str) {
-  return MakePolymorphicMatcher(
-      internal::StrEqualityMatcher<std::wstring>(str, true, true));
-}
-
-// Matches a string not equal to str.
-inline PolymorphicMatcher<internal::StrEqualityMatcher<std::wstring> > StrNe(
-    const std::wstring& str) {
-  return MakePolymorphicMatcher(
-      internal::StrEqualityMatcher<std::wstring>(str, false, true));
-}
-
-// Matches a string equal to str, ignoring case.
-inline PolymorphicMatcher<internal::StrEqualityMatcher<std::wstring> >
-StrCaseEq(const std::wstring& str) {
-  return MakePolymorphicMatcher(
-      internal::StrEqualityMatcher<std::wstring>(str, true, false));
-}
-
-// Matches a string not equal to str, ignoring case.
-inline PolymorphicMatcher<internal::StrEqualityMatcher<std::wstring> >
-StrCaseNe(const std::wstring& str) {
-  return MakePolymorphicMatcher(
-      internal::StrEqualityMatcher<std::wstring>(str, false, false));
-}
-
-// Creates a matcher that matches any ::wstring, std::wstring, or C wide string
-// that contains the given substring.
-inline PolymorphicMatcher<internal::HasSubstrMatcher<std::wstring> > HasSubstr(
-    const std::wstring& substring) {
-  return MakePolymorphicMatcher(
-      internal::HasSubstrMatcher<std::wstring>(substring));
-}
-
-// Matches a string that starts with 'prefix' (case-sensitive).
-inline PolymorphicMatcher<internal::StartsWithMatcher<std::wstring> >
-StartsWith(const std::wstring& prefix) {
-  return MakePolymorphicMatcher(
-      internal::StartsWithMatcher<std::wstring>(prefix));
-}
-
-// Matches a string that ends with 'suffix' (case-sensitive).
-inline PolymorphicMatcher<internal::EndsWithMatcher<std::wstring> > EndsWith(
-    const std::wstring& suffix) {
-  return MakePolymorphicMatcher(
-      internal::EndsWithMatcher<std::wstring>(suffix));
-}
-
-#endif  // GTEST_HAS_STD_WSTRING
-
-// Creates a polymorphic matcher that matches a 2-tuple where the
-// first field == the second field.
-inline internal::Eq2Matcher Eq() { return internal::Eq2Matcher(); }
-
-// Creates a polymorphic matcher that matches a 2-tuple where the
-// first field >= the second field.
-inline internal::Ge2Matcher Ge() { return internal::Ge2Matcher(); }
-
-// Creates a polymorphic matcher that matches a 2-tuple where the
-// first field > the second field.
-inline internal::Gt2Matcher Gt() { return internal::Gt2Matcher(); }
-
-// Creates a polymorphic matcher that matches a 2-tuple where the
-// first field <= the second field.
-inline internal::Le2Matcher Le() { return internal::Le2Matcher(); }
-
-// Creates a polymorphic matcher that matches a 2-tuple where the
-// first field < the second field.
-inline internal::Lt2Matcher Lt() { return internal::Lt2Matcher(); }
-
-// Creates a polymorphic matcher that matches a 2-tuple where the
-// first field != the second field.
-inline internal::Ne2Matcher Ne() { return internal::Ne2Matcher(); }
-
-// Creates a polymorphic matcher that matches a 2-tuple where
-// FloatEq(first field) matches the second field.
-inline internal::FloatingEq2Matcher<float> FloatEq() {
-  return internal::FloatingEq2Matcher<float>();
-}
-
-// Creates a polymorphic matcher that matches a 2-tuple where
-// DoubleEq(first field) matches the second field.
-inline internal::FloatingEq2Matcher<double> DoubleEq() {
-  return internal::FloatingEq2Matcher<double>();
-}
-
-// Creates a polymorphic matcher that matches a 2-tuple where
-// FloatEq(first field) matches the second field with NaN equality.
-inline internal::FloatingEq2Matcher<float> NanSensitiveFloatEq() {
-  return internal::FloatingEq2Matcher<float>(true);
-}
-
-// Creates a polymorphic matcher that matches a 2-tuple where
-// DoubleEq(first field) matches the second field with NaN equality.
-inline internal::FloatingEq2Matcher<double> NanSensitiveDoubleEq() {
-  return internal::FloatingEq2Matcher<double>(true);
-}
-
-// Creates a polymorphic matcher that matches a 2-tuple where
-// FloatNear(first field, max_abs_error) matches the second field.
-inline internal::FloatingEq2Matcher<float> FloatNear(float max_abs_error) {
-  return internal::FloatingEq2Matcher<float>(max_abs_error);
-}
-
-// Creates a polymorphic matcher that matches a 2-tuple where
-// DoubleNear(first field, max_abs_error) matches the second field.
-inline internal::FloatingEq2Matcher<double> DoubleNear(double max_abs_error) {
-  return internal::FloatingEq2Matcher<double>(max_abs_error);
-}
-
-// Creates a polymorphic matcher that matches a 2-tuple where
-// FloatNear(first field, max_abs_error) matches the second field with NaN
-// equality.
-inline internal::FloatingEq2Matcher<float> NanSensitiveFloatNear(
-    float max_abs_error) {
-  return internal::FloatingEq2Matcher<float>(max_abs_error, true);
-}
-
-// Creates a polymorphic matcher that matches a 2-tuple where
-// DoubleNear(first field, max_abs_error) matches the second field with NaN
-// equality.
-inline internal::FloatingEq2Matcher<double> NanSensitiveDoubleNear(
-    double max_abs_error) {
-  return internal::FloatingEq2Matcher<double>(max_abs_error, true);
-}
-
-// Creates a matcher that matches any value of type T that m doesn't
-// match.
-template <typename InnerMatcher>
-inline internal::NotMatcher<InnerMatcher> Not(InnerMatcher m) {
-  return internal::NotMatcher<InnerMatcher>(m);
-}
-
-// Returns a matcher that matches anything that satisfies the given
-// predicate.  The predicate can be any unary function or functor
-// whose return type can be implicitly converted to bool.
-template <typename Predicate>
-inline PolymorphicMatcher<internal::TrulyMatcher<Predicate> >
-Truly(Predicate pred) {
-  return MakePolymorphicMatcher(internal::TrulyMatcher<Predicate>(pred));
-}
-
-// Returns a matcher that matches the container size. The container must
-// support both size() and size_type which all STL-like containers provide.
-// Note that the parameter 'size' can be a value of type size_type as well as
-// matcher. For instance:
-//   EXPECT_THAT(container, SizeIs(2));     // Checks container has 2 elements.
-//   EXPECT_THAT(container, SizeIs(Le(2));  // Checks container has at most 2.
-template <typename SizeMatcher>
-inline internal::SizeIsMatcher<SizeMatcher>
-SizeIs(const SizeMatcher& size_matcher) {
-  return internal::SizeIsMatcher<SizeMatcher>(size_matcher);
-}
-
-// Returns a matcher that matches the distance between the container's begin()
-// iterator and its end() iterator, i.e. the size of the container. This matcher
-// can be used instead of SizeIs with containers such as std::forward_list which
-// do not implement size(). The container must provide const_iterator (with
-// valid iterator_traits), begin() and end().
-template <typename DistanceMatcher>
-inline internal::BeginEndDistanceIsMatcher<DistanceMatcher>
-BeginEndDistanceIs(const DistanceMatcher& distance_matcher) {
-  return internal::BeginEndDistanceIsMatcher<DistanceMatcher>(distance_matcher);
-}
-
-// Returns a matcher that matches an equal container.
-// This matcher behaves like Eq(), but in the event of mismatch lists the
-// values that are included in one container but not the other. (Duplicate
-// values and order differences are not explained.)
-template <typename Container>
-inline PolymorphicMatcher<internal::ContainerEqMatcher<
-    typename std::remove_const<Container>::type>>
-ContainerEq(const Container& rhs) {
-  return MakePolymorphicMatcher(internal::ContainerEqMatcher<Container>(rhs));
-}
-
-// Returns a matcher that matches a container that, when sorted using
-// the given comparator, matches container_matcher.
-template <typename Comparator, typename ContainerMatcher>
-inline internal::WhenSortedByMatcher<Comparator, ContainerMatcher>
-WhenSortedBy(const Comparator& comparator,
-             const ContainerMatcher& container_matcher) {
-  return internal::WhenSortedByMatcher<Comparator, ContainerMatcher>(
-      comparator, container_matcher);
-}
-
-// Returns a matcher that matches a container that, when sorted using
-// the < operator, matches container_matcher.
-template <typename ContainerMatcher>
-inline internal::WhenSortedByMatcher<internal::LessComparator, ContainerMatcher>
-WhenSorted(const ContainerMatcher& container_matcher) {
-  return
-      internal::WhenSortedByMatcher<internal::LessComparator, ContainerMatcher>(
-          internal::LessComparator(), container_matcher);
-}
-
-// Matches an STL-style container or a native array that contains the
-// same number of elements as in rhs, where its i-th element and rhs's
-// i-th element (as a pair) satisfy the given pair matcher, for all i.
-// TupleMatcher must be able to be safely cast to Matcher<std::tuple<const
-// T1&, const T2&> >, where T1 and T2 are the types of elements in the
-// LHS container and the RHS container respectively.
-template <typename TupleMatcher, typename Container>
-inline internal::PointwiseMatcher<TupleMatcher,
-                                  typename std::remove_const<Container>::type>
-Pointwise(const TupleMatcher& tuple_matcher, const Container& rhs) {
-  return internal::PointwiseMatcher<TupleMatcher, Container>(tuple_matcher,
-                                                             rhs);
-}
-
-
-// Supports the Pointwise(m, {a, b, c}) syntax.
-template <typename TupleMatcher, typename T>
-inline internal::PointwiseMatcher<TupleMatcher, std::vector<T> > Pointwise(
-    const TupleMatcher& tuple_matcher, std::initializer_list<T> rhs) {
-  return Pointwise(tuple_matcher, std::vector<T>(rhs));
-}
-
-
-// UnorderedPointwise(pair_matcher, rhs) matches an STL-style
-// container or a native array that contains the same number of
-// elements as in rhs, where in some permutation of the container, its
-// i-th element and rhs's i-th element (as a pair) satisfy the given
-// pair matcher, for all i.  Tuple2Matcher must be able to be safely
-// cast to Matcher<std::tuple<const T1&, const T2&> >, where T1 and T2 are
-// the types of elements in the LHS container and the RHS container
-// respectively.
-//
-// This is like Pointwise(pair_matcher, rhs), except that the element
-// order doesn't matter.
-template <typename Tuple2Matcher, typename RhsContainer>
-inline internal::UnorderedElementsAreArrayMatcher<
-    typename internal::BoundSecondMatcher<
-        Tuple2Matcher,
-        typename internal::StlContainerView<
-            typename std::remove_const<RhsContainer>::type>::type::value_type>>
-UnorderedPointwise(const Tuple2Matcher& tuple2_matcher,
-                   const RhsContainer& rhs_container) {
-  // RhsView allows the same code to handle RhsContainer being a
-  // STL-style container and it being a native C-style array.
-  typedef typename internal::StlContainerView<RhsContainer> RhsView;
-  typedef typename RhsView::type RhsStlContainer;
-  typedef typename RhsStlContainer::value_type Second;
-  const RhsStlContainer& rhs_stl_container =
-      RhsView::ConstReference(rhs_container);
-
-  // Create a matcher for each element in rhs_container.
-  ::std::vector<internal::BoundSecondMatcher<Tuple2Matcher, Second> > matchers;
-  for (typename RhsStlContainer::const_iterator it = rhs_stl_container.begin();
-       it != rhs_stl_container.end(); ++it) {
-    matchers.push_back(
-        internal::MatcherBindSecond(tuple2_matcher, *it));
-  }
-
-  // Delegate the work to UnorderedElementsAreArray().
-  return UnorderedElementsAreArray(matchers);
-}
-
-
-// Supports the UnorderedPointwise(m, {a, b, c}) syntax.
-template <typename Tuple2Matcher, typename T>
-inline internal::UnorderedElementsAreArrayMatcher<
-    typename internal::BoundSecondMatcher<Tuple2Matcher, T> >
-UnorderedPointwise(const Tuple2Matcher& tuple2_matcher,
-                   std::initializer_list<T> rhs) {
-  return UnorderedPointwise(tuple2_matcher, std::vector<T>(rhs));
-}
-
-// Matches an STL-style container or a native array that contains at
-// least one element matching the given value or matcher.
-//
-// Examples:
-//   ::std::set<int> page_ids;
-//   page_ids.insert(3);
-//   page_ids.insert(1);
-//   EXPECT_THAT(page_ids, Contains(1));
-//   EXPECT_THAT(page_ids, Contains(Gt(2)));
-//   EXPECT_THAT(page_ids, Not(Contains(4)));  // See below for Times(0)
-//
-//   ::std::map<int, size_t> page_lengths;
-//   page_lengths[1] = 100;
-//   EXPECT_THAT(page_lengths,
-//               Contains(::std::pair<const int, size_t>(1, 100)));
-//
-//   const char* user_ids[] = { "joe", "mike", "tom" };
-//   EXPECT_THAT(user_ids, Contains(Eq(::std::string("tom"))));
-//
-// The matcher supports a modifier `Times` that allows to check for arbitrary
-// occurrences including testing for absence with Times(0).
-//
-// Examples:
-//   ::std::vector<int> ids;
-//   ids.insert(1);
-//   ids.insert(1);
-//   ids.insert(3);
-//   EXPECT_THAT(ids, Contains(1).Times(2));      // 1 occurs 2 times
-//   EXPECT_THAT(ids, Contains(2).Times(0));      // 2 is not present
-//   EXPECT_THAT(ids, Contains(3).Times(Ge(1)));  // 3 occurs at least once
-
-template <typename M>
-inline internal::ContainsMatcher<M> Contains(M matcher) {
-  return internal::ContainsMatcher<M>(matcher);
-}
-
-// IsSupersetOf(iterator_first, iterator_last)
-// IsSupersetOf(pointer, count)
-// IsSupersetOf(array)
-// IsSupersetOf(container)
-// IsSupersetOf({e1, e2, ..., en})
-//
-// IsSupersetOf() verifies that a surjective partial mapping onto a collection
-// of matchers exists. In other words, a container matches
-// IsSupersetOf({e1, ..., en}) if and only if there is a permutation
-// {y1, ..., yn} of some of the container's elements where y1 matches e1,
-// ..., and yn matches en. Obviously, the size of the container must be >= n
-// in order to have a match. Examples:
-//
-// - {1, 2, 3} matches IsSupersetOf({Ge(3), Ne(0)}), as 3 matches Ge(3) and
-//   1 matches Ne(0).
-// - {1, 2} doesn't match IsSupersetOf({Eq(1), Lt(2)}), even though 1 matches
-//   both Eq(1) and Lt(2). The reason is that different matchers must be used
-//   for elements in different slots of the container.
-// - {1, 1, 2} matches IsSupersetOf({Eq(1), Lt(2)}), as (the first) 1 matches
-//   Eq(1) and (the second) 1 matches Lt(2).
-// - {1, 2, 3} matches IsSupersetOf(Gt(1), Gt(1)), as 2 matches (the first)
-//   Gt(1) and 3 matches (the second) Gt(1).
-//
-// The matchers can be specified as an array, a pointer and count, a container,
-// an initializer list, or an STL iterator range. In each of these cases, the
-// underlying matchers can be either values or matchers.
-
-template <typename Iter>
-inline internal::UnorderedElementsAreArrayMatcher<
-    typename ::std::iterator_traits<Iter>::value_type>
-IsSupersetOf(Iter first, Iter last) {
-  typedef typename ::std::iterator_traits<Iter>::value_type T;
-  return internal::UnorderedElementsAreArrayMatcher<T>(
-      internal::UnorderedMatcherRequire::Superset, first, last);
-}
-
-template <typename T>
-inline internal::UnorderedElementsAreArrayMatcher<T> IsSupersetOf(
-    const T* pointer, size_t count) {
-  return IsSupersetOf(pointer, pointer + count);
-}
-
-template <typename T, size_t N>
-inline internal::UnorderedElementsAreArrayMatcher<T> IsSupersetOf(
-    const T (&array)[N]) {
-  return IsSupersetOf(array, N);
-}
-
-template <typename Container>
-inline internal::UnorderedElementsAreArrayMatcher<
-    typename Container::value_type>
-IsSupersetOf(const Container& container) {
-  return IsSupersetOf(container.begin(), container.end());
-}
-
-template <typename T>
-inline internal::UnorderedElementsAreArrayMatcher<T> IsSupersetOf(
-    ::std::initializer_list<T> xs) {
-  return IsSupersetOf(xs.begin(), xs.end());
-}
-
-// IsSubsetOf(iterator_first, iterator_last)
-// IsSubsetOf(pointer, count)
-// IsSubsetOf(array)
-// IsSubsetOf(container)
-// IsSubsetOf({e1, e2, ..., en})
-//
-// IsSubsetOf() verifies that an injective mapping onto a collection of matchers
-// exists.  In other words, a container matches IsSubsetOf({e1, ..., en}) if and
-// only if there is a subset of matchers {m1, ..., mk} which would match the
-// container using UnorderedElementsAre.  Obviously, the size of the container
-// must be <= n in order to have a match. Examples:
-//
-// - {1} matches IsSubsetOf({Gt(0), Lt(0)}), as 1 matches Gt(0).
-// - {1, -1} matches IsSubsetOf({Lt(0), Gt(0)}), as 1 matches Gt(0) and -1
-//   matches Lt(0).
-// - {1, 2} doesn't matches IsSubsetOf({Gt(0), Lt(0)}), even though 1 and 2 both
-//   match Gt(0). The reason is that different matchers must be used for
-//   elements in different slots of the container.
-//
-// The matchers can be specified as an array, a pointer and count, a container,
-// an initializer list, or an STL iterator range. In each of these cases, the
-// underlying matchers can be either values or matchers.
-
-template <typename Iter>
-inline internal::UnorderedElementsAreArrayMatcher<
-    typename ::std::iterator_traits<Iter>::value_type>
-IsSubsetOf(Iter first, Iter last) {
-  typedef typename ::std::iterator_traits<Iter>::value_type T;
-  return internal::UnorderedElementsAreArrayMatcher<T>(
-      internal::UnorderedMatcherRequire::Subset, first, last);
-}
-
-template <typename T>
-inline internal::UnorderedElementsAreArrayMatcher<T> IsSubsetOf(
-    const T* pointer, size_t count) {
-  return IsSubsetOf(pointer, pointer + count);
-}
-
-template <typename T, size_t N>
-inline internal::UnorderedElementsAreArrayMatcher<T> IsSubsetOf(
-    const T (&array)[N]) {
-  return IsSubsetOf(array, N);
-}
-
-template <typename Container>
-inline internal::UnorderedElementsAreArrayMatcher<
-    typename Container::value_type>
-IsSubsetOf(const Container& container) {
-  return IsSubsetOf(container.begin(), container.end());
-}
-
-template <typename T>
-inline internal::UnorderedElementsAreArrayMatcher<T> IsSubsetOf(
-    ::std::initializer_list<T> xs) {
-  return IsSubsetOf(xs.begin(), xs.end());
-}
-
-// Matches an STL-style container or a native array that contains only
-// elements matching the given value or matcher.
-//
-// Each(m) is semantically equivalent to `Not(Contains(Not(m)))`. Only
-// the messages are different.
-//
-// Examples:
-//   ::std::set<int> page_ids;
-//   // Each(m) matches an empty container, regardless of what m is.
-//   EXPECT_THAT(page_ids, Each(Eq(1)));
-//   EXPECT_THAT(page_ids, Each(Eq(77)));
-//
-//   page_ids.insert(3);
-//   EXPECT_THAT(page_ids, Each(Gt(0)));
-//   EXPECT_THAT(page_ids, Not(Each(Gt(4))));
-//   page_ids.insert(1);
-//   EXPECT_THAT(page_ids, Not(Each(Lt(2))));
-//
-//   ::std::map<int, size_t> page_lengths;
-//   page_lengths[1] = 100;
-//   page_lengths[2] = 200;
-//   page_lengths[3] = 300;
-//   EXPECT_THAT(page_lengths, Not(Each(Pair(1, 100))));
-//   EXPECT_THAT(page_lengths, Each(Key(Le(3))));
-//
-//   const char* user_ids[] = { "joe", "mike", "tom" };
-//   EXPECT_THAT(user_ids, Not(Each(Eq(::std::string("tom")))));
-template <typename M>
-inline internal::EachMatcher<M> Each(M matcher) {
-  return internal::EachMatcher<M>(matcher);
-}
-
-// Key(inner_matcher) matches an std::pair whose 'first' field matches
-// inner_matcher.  For example, Contains(Key(Ge(5))) can be used to match an
-// std::map that contains at least one element whose key is >= 5.
-template <typename M>
-inline internal::KeyMatcher<M> Key(M inner_matcher) {
-  return internal::KeyMatcher<M>(inner_matcher);
-}
-
-// Pair(first_matcher, second_matcher) matches a std::pair whose 'first' field
-// matches first_matcher and whose 'second' field matches second_matcher.  For
-// example, EXPECT_THAT(map_type, ElementsAre(Pair(Ge(5), "foo"))) can be used
-// to match a std::map<int, string> that contains exactly one element whose key
-// is >= 5 and whose value equals "foo".
-template <typename FirstMatcher, typename SecondMatcher>
-inline internal::PairMatcher<FirstMatcher, SecondMatcher>
-Pair(FirstMatcher first_matcher, SecondMatcher second_matcher) {
-  return internal::PairMatcher<FirstMatcher, SecondMatcher>(
-      first_matcher, second_matcher);
-}
-
-namespace no_adl {
-// Conditional() creates a matcher that conditionally uses either the first or
-// second matcher provided. For example, we could create an `equal if, and only
-// if' matcher using the Conditonal wrapper as follows:
-//
-//   EXPECT_THAT(result, Conditional(condition, Eq(expected), Ne(expected)));
-template <typename MatcherTrue, typename MatcherFalse>
-internal::ConditionalMatcher<MatcherTrue, MatcherFalse> Conditional(
-    bool condition, MatcherTrue matcher_true, MatcherFalse matcher_false) {
-  return internal::ConditionalMatcher<MatcherTrue, MatcherFalse>(
-      condition, std::move(matcher_true), std::move(matcher_false));
-}
-
-// FieldsAre(matchers...) matches piecewise the fields of compatible structs.
-// These include those that support `get<I>(obj)`, and when structured bindings
-// are enabled any class that supports them.
-// In particular, `std::tuple`, `std::pair`, `std::array` and aggregate types.
-template <typename... M>
-internal::FieldsAreMatcher<typename std::decay<M>::type...> FieldsAre(
-    M&&... matchers) {
-  return internal::FieldsAreMatcher<typename std::decay<M>::type...>(
-      std::forward<M>(matchers)...);
-}
-
-// Creates a matcher that matches a pointer (raw or smart) that matches
-// inner_matcher.
-template <typename InnerMatcher>
-inline internal::PointerMatcher<InnerMatcher> Pointer(
-    const InnerMatcher& inner_matcher) {
-  return internal::PointerMatcher<InnerMatcher>(inner_matcher);
-}
-
-// Creates a matcher that matches an object that has an address that matches
-// inner_matcher.
-template <typename InnerMatcher>
-inline internal::AddressMatcher<InnerMatcher> Address(
-    const InnerMatcher& inner_matcher) {
-  return internal::AddressMatcher<InnerMatcher>(inner_matcher);
-}
-}  // namespace no_adl
-
-// Returns a predicate that is satisfied by anything that matches the
-// given matcher.
-template <typename M>
-inline internal::MatcherAsPredicate<M> Matches(M matcher) {
-  return internal::MatcherAsPredicate<M>(matcher);
-}
-
-// Returns true if and only if the value matches the matcher.
-template <typename T, typename M>
-inline bool Value(const T& value, M matcher) {
-  return testing::Matches(matcher)(value);
-}
-
-// Matches the value against the given matcher and explains the match
-// result to listener.
-template <typename T, typename M>
-inline bool ExplainMatchResult(
-    M matcher, const T& value, MatchResultListener* listener) {
-  return SafeMatcherCast<const T&>(matcher).MatchAndExplain(value, listener);
-}
-
-// Returns a string representation of the given matcher.  Useful for description
-// strings of matchers defined using MATCHER_P* macros that accept matchers as
-// their arguments.  For example:
-//
-// MATCHER_P(XAndYThat, matcher,
-//           "X that " + DescribeMatcher<int>(matcher, negation) +
-//               " and Y that " + DescribeMatcher<double>(matcher, negation)) {
-//   return ExplainMatchResult(matcher, arg.x(), result_listener) &&
-//          ExplainMatchResult(matcher, arg.y(), result_listener);
-// }
-template <typename T, typename M>
-std::string DescribeMatcher(const M& matcher, bool negation = false) {
-  ::std::stringstream ss;
-  Matcher<T> monomorphic_matcher = SafeMatcherCast<T>(matcher);
-  if (negation) {
-    monomorphic_matcher.DescribeNegationTo(&ss);
-  } else {
-    monomorphic_matcher.DescribeTo(&ss);
-  }
-  return ss.str();
-}
-
-template <typename... Args>
-internal::ElementsAreMatcher<
-    std::tuple<typename std::decay<const Args&>::type...>>
-ElementsAre(const Args&... matchers) {
-  return internal::ElementsAreMatcher<
-      std::tuple<typename std::decay<const Args&>::type...>>(
-      std::make_tuple(matchers...));
-}
-
-template <typename... Args>
-internal::UnorderedElementsAreMatcher<
-    std::tuple<typename std::decay<const Args&>::type...>>
-UnorderedElementsAre(const Args&... matchers) {
-  return internal::UnorderedElementsAreMatcher<
-      std::tuple<typename std::decay<const Args&>::type...>>(
-      std::make_tuple(matchers...));
-}
-
-// Define variadic matcher versions.
-template <typename... Args>
-internal::AllOfMatcher<typename std::decay<const Args&>::type...> AllOf(
-    const Args&... matchers) {
-  return internal::AllOfMatcher<typename std::decay<const Args&>::type...>(
-      matchers...);
-}
-
-template <typename... Args>
-internal::AnyOfMatcher<typename std::decay<const Args&>::type...> AnyOf(
-    const Args&... matchers) {
-  return internal::AnyOfMatcher<typename std::decay<const Args&>::type...>(
-      matchers...);
-}
-
-// AnyOfArray(array)
-// AnyOfArray(pointer, count)
-// AnyOfArray(container)
-// AnyOfArray({ e1, e2, ..., en })
-// AnyOfArray(iterator_first, iterator_last)
-//
-// AnyOfArray() verifies whether a given value matches any member of a
-// collection of matchers.
-//
-// AllOfArray(array)
-// AllOfArray(pointer, count)
-// AllOfArray(container)
-// AllOfArray({ e1, e2, ..., en })
-// AllOfArray(iterator_first, iterator_last)
-//
-// AllOfArray() verifies whether a given value matches all members of a
-// collection of matchers.
-//
-// The matchers can be specified as an array, a pointer and count, a container,
-// an initializer list, or an STL iterator range. In each of these cases, the
-// underlying matchers can be either values or matchers.
-
-template <typename Iter>
-inline internal::AnyOfArrayMatcher<
-    typename ::std::iterator_traits<Iter>::value_type>
-AnyOfArray(Iter first, Iter last) {
-  return internal::AnyOfArrayMatcher<
-      typename ::std::iterator_traits<Iter>::value_type>(first, last);
-}
-
-template <typename Iter>
-inline internal::AllOfArrayMatcher<
-    typename ::std::iterator_traits<Iter>::value_type>
-AllOfArray(Iter first, Iter last) {
-  return internal::AllOfArrayMatcher<
-      typename ::std::iterator_traits<Iter>::value_type>(first, last);
-}
-
-template <typename T>
-inline internal::AnyOfArrayMatcher<T> AnyOfArray(const T* ptr, size_t count) {
-  return AnyOfArray(ptr, ptr + count);
-}
-
-template <typename T>
-inline internal::AllOfArrayMatcher<T> AllOfArray(const T* ptr, size_t count) {
-  return AllOfArray(ptr, ptr + count);
-}
-
-template <typename T, size_t N>
-inline internal::AnyOfArrayMatcher<T> AnyOfArray(const T (&array)[N]) {
-  return AnyOfArray(array, N);
-}
-
-template <typename T, size_t N>
-inline internal::AllOfArrayMatcher<T> AllOfArray(const T (&array)[N]) {
-  return AllOfArray(array, N);
-}
-
-template <typename Container>
-inline internal::AnyOfArrayMatcher<typename Container::value_type> AnyOfArray(
-    const Container& container) {
-  return AnyOfArray(container.begin(), container.end());
-}
-
-template <typename Container>
-inline internal::AllOfArrayMatcher<typename Container::value_type> AllOfArray(
-    const Container& container) {
-  return AllOfArray(container.begin(), container.end());
-}
-
-template <typename T>
-inline internal::AnyOfArrayMatcher<T> AnyOfArray(
-    ::std::initializer_list<T> xs) {
-  return AnyOfArray(xs.begin(), xs.end());
-}
-
-template <typename T>
-inline internal::AllOfArrayMatcher<T> AllOfArray(
-    ::std::initializer_list<T> xs) {
-  return AllOfArray(xs.begin(), xs.end());
-}
-
-// Args<N1, N2, ..., Nk>(a_matcher) matches a tuple if the selected
-// fields of it matches a_matcher.  C++ doesn't support default
-// arguments for function templates, so we have to overload it.
-template <size_t... k, typename InnerMatcher>
-internal::ArgsMatcher<typename std::decay<InnerMatcher>::type, k...> Args(
-    InnerMatcher&& matcher) {
-  return internal::ArgsMatcher<typename std::decay<InnerMatcher>::type, k...>(
-      std::forward<InnerMatcher>(matcher));
-}
-
-// AllArgs(m) is a synonym of m.  This is useful in
-//
-//   EXPECT_CALL(foo, Bar(_, _)).With(AllArgs(Eq()));
-//
-// which is easier to read than
-//
-//   EXPECT_CALL(foo, Bar(_, _)).With(Eq());
-template <typename InnerMatcher>
-inline InnerMatcher AllArgs(const InnerMatcher& matcher) { return matcher; }
-
-// Returns a matcher that matches the value of an optional<> type variable.
-// The matcher implementation only uses '!arg' and requires that the optional<>
-// type has a 'value_type' member type and that '*arg' is of type 'value_type'
-// and is printable using 'PrintToString'. It is compatible with
-// std::optional/std::experimental::optional.
-// Note that to compare an optional type variable against nullopt you should
-// use Eq(nullopt) and not Eq(Optional(nullopt)). The latter implies that the
-// optional value contains an optional itself.
-template <typename ValueMatcher>
-inline internal::OptionalMatcher<ValueMatcher> Optional(
-    const ValueMatcher& value_matcher) {
-  return internal::OptionalMatcher<ValueMatcher>(value_matcher);
-}
-
-// Returns a matcher that matches the value of a absl::any type variable.
-template <typename T>
-PolymorphicMatcher<internal::any_cast_matcher::AnyCastMatcher<T> > AnyWith(
-    const Matcher<const T&>& matcher) {
-  return MakePolymorphicMatcher(
-      internal::any_cast_matcher::AnyCastMatcher<T>(matcher));
-}
-
-// Returns a matcher that matches the value of a variant<> type variable.
-// The matcher implementation uses ADL to find the holds_alternative and get
-// functions.
-// It is compatible with std::variant.
-template <typename T>
-PolymorphicMatcher<internal::variant_matcher::VariantMatcher<T> > VariantWith(
-    const Matcher<const T&>& matcher) {
-  return MakePolymorphicMatcher(
-      internal::variant_matcher::VariantMatcher<T>(matcher));
-}
-
-#if GTEST_HAS_EXCEPTIONS
-
-// Anything inside the `internal` namespace is internal to the implementation
-// and must not be used in user code!
-namespace internal {
-
-class WithWhatMatcherImpl {
- public:
-  WithWhatMatcherImpl(Matcher<std::string> matcher)
-      : matcher_(std::move(matcher)) {}
-
-  void DescribeTo(std::ostream* os) const {
-    *os << "contains .what() that ";
-    matcher_.DescribeTo(os);
-  }
-
-  void DescribeNegationTo(std::ostream* os) const {
-    *os << "contains .what() that does not ";
-    matcher_.DescribeTo(os);
-  }
-
-  template <typename Err>
-  bool MatchAndExplain(const Err& err, MatchResultListener* listener) const {
-    *listener << "which contains .what() that ";
-    return matcher_.MatchAndExplain(err.what(), listener);
-  }
-
- private:
-  const Matcher<std::string> matcher_;
-};
-
-inline PolymorphicMatcher<WithWhatMatcherImpl> WithWhat(
-    Matcher<std::string> m) {
-  return MakePolymorphicMatcher(WithWhatMatcherImpl(std::move(m)));
-}
-
-template <typename Err>
-class ExceptionMatcherImpl {
-  class NeverThrown {
-   public:
-    const char* what() const noexcept {
-      return "this exception should never be thrown";
-    }
-  };
-
-  // If the matchee raises an exception of a wrong type, we'd like to
-  // catch it and print its message and type. To do that, we add an additional
-  // catch clause:
-  //
-  //     try { ... }
-  //     catch (const Err&) { /* an expected exception */ }
-  //     catch (const std::exception&) { /* exception of a wrong type */ }
-  //
-  // However, if the `Err` itself is `std::exception`, we'd end up with two
-  // identical `catch` clauses:
-  //
-  //     try { ... }
-  //     catch (const std::exception&) { /* an expected exception */ }
-  //     catch (const std::exception&) { /* exception of a wrong type */ }
-  //
-  // This can cause a warning or an error in some compilers. To resolve
-  // the issue, we use a fake error type whenever `Err` is `std::exception`:
-  //
-  //     try { ... }
-  //     catch (const std::exception&) { /* an expected exception */ }
-  //     catch (const NeverThrown&) { /* exception of a wrong type */ }
-  using DefaultExceptionType = typename std::conditional<
-      std::is_same<typename std::remove_cv<
-                       typename std::remove_reference<Err>::type>::type,
-                   std::exception>::value,
-      const NeverThrown&, const std::exception&>::type;
-
- public:
-  ExceptionMatcherImpl(Matcher<const Err&> matcher)
-      : matcher_(std::move(matcher)) {}
-
-  void DescribeTo(std::ostream* os) const {
-    *os << "throws an exception which is a " << GetTypeName<Err>();
-    *os << " which ";
-    matcher_.DescribeTo(os);
-  }
-
-  void DescribeNegationTo(std::ostream* os) const {
-    *os << "throws an exception which is not a " << GetTypeName<Err>();
-    *os << " which ";
-    matcher_.DescribeNegationTo(os);
-  }
-
-  template <typename T>
-  bool MatchAndExplain(T&& x, MatchResultListener* listener) const {
-    try {
-      (void)(std::forward<T>(x)());
-    } catch (const Err& err) {
-      *listener << "throws an exception which is a " << GetTypeName<Err>();
-      *listener << " ";
-      return matcher_.MatchAndExplain(err, listener);
-    } catch (DefaultExceptionType err) {
-#if GTEST_HAS_RTTI
-      *listener << "throws an exception of type " << GetTypeName(typeid(err));
-      *listener << " ";
-#else
-      *listener << "throws an std::exception-derived type ";
-#endif
-      *listener << "with description \"" << err.what() << "\"";
-      return false;
-    } catch (...) {
-      *listener << "throws an exception of an unknown type";
-      return false;
-    }
-
-    *listener << "does not throw any exception";
-    return false;
-  }
-
- private:
-  const Matcher<const Err&> matcher_;
-};
-
-}  // namespace internal
-
-// Throws()
-// Throws(exceptionMatcher)
-// ThrowsMessage(messageMatcher)
-//
-// This matcher accepts a callable and verifies that when invoked, it throws
-// an exception with the given type and properties.
-//
-// Examples:
-//
-//   EXPECT_THAT(
-//       []() { throw std::runtime_error("message"); },
-//       Throws<std::runtime_error>());
-//
-//   EXPECT_THAT(
-//       []() { throw std::runtime_error("message"); },
-//       ThrowsMessage<std::runtime_error>(HasSubstr("message")));
-//
-//   EXPECT_THAT(
-//       []() { throw std::runtime_error("message"); },
-//       Throws<std::runtime_error>(
-//           Property(&std::runtime_error::what, HasSubstr("message"))));
-
-template <typename Err>
-PolymorphicMatcher<internal::ExceptionMatcherImpl<Err>> Throws() {
-  return MakePolymorphicMatcher(
-      internal::ExceptionMatcherImpl<Err>(A<const Err&>()));
-}
-
-template <typename Err, typename ExceptionMatcher>
-PolymorphicMatcher<internal::ExceptionMatcherImpl<Err>> Throws(
-    const ExceptionMatcher& exception_matcher) {
-  // Using matcher cast allows users to pass a matcher of a more broad type.
-  // For example user may want to pass Matcher<std::exception>
-  // to Throws<std::runtime_error>, or Matcher<int64> to Throws<int32>.
-  return MakePolymorphicMatcher(internal::ExceptionMatcherImpl<Err>(
-      SafeMatcherCast<const Err&>(exception_matcher)));
-}
-
-template <typename Err, typename MessageMatcher>
-PolymorphicMatcher<internal::ExceptionMatcherImpl<Err>> ThrowsMessage(
-    MessageMatcher&& message_matcher) {
-  static_assert(std::is_base_of<std::exception, Err>::value,
-                "expected an std::exception-derived type");
-  return Throws<Err>(internal::WithWhat(
-      MatcherCast<std::string>(std::forward<MessageMatcher>(message_matcher))));
-}
-
-#endif  // GTEST_HAS_EXCEPTIONS
-
-// These macros allow using matchers to check values in Google Test
-// tests.  ASSERT_THAT(value, matcher) and EXPECT_THAT(value, matcher)
-// succeed if and only if the value matches the matcher.  If the assertion
-// fails, the value and the description of the matcher will be printed.
-#define ASSERT_THAT(value, matcher) ASSERT_PRED_FORMAT1(\
-    ::testing::internal::MakePredicateFormatterFromMatcher(matcher), value)
-#define EXPECT_THAT(value, matcher) EXPECT_PRED_FORMAT1(\
-    ::testing::internal::MakePredicateFormatterFromMatcher(matcher), value)
-
-// MATCHER* macroses itself are listed below.
-#define MATCHER(name, description)                                             \
-  class name##Matcher                                                          \
-      : public ::testing::internal::MatcherBaseImpl<name##Matcher> {           \
-   public:                                                                     \
-    template <typename arg_type>                                               \
-    class gmock_Impl : public ::testing::MatcherInterface<const arg_type&> {   \
-     public:                                                                   \
-      gmock_Impl() {}                                                          \
-      bool MatchAndExplain(                                                    \
-          const arg_type& arg,                                                 \
-          ::testing::MatchResultListener* result_listener) const override;     \
-      void DescribeTo(::std::ostream* gmock_os) const override {               \
-        *gmock_os << FormatDescription(false);                                 \
-      }                                                                        \
-      void DescribeNegationTo(::std::ostream* gmock_os) const override {       \
-        *gmock_os << FormatDescription(true);                                  \
-      }                                                                        \
-                                                                               \
-     private:                                                                  \
-      ::std::string FormatDescription(bool negation) const {                   \
-        /* NOLINTNEXTLINE readability-redundant-string-init */                 \
-        ::std::string gmock_description = (description);                       \
-        if (!gmock_description.empty()) {                                      \
-          return gmock_description;                                            \
-        }                                                                      \
-        return ::testing::internal::FormatMatcherDescription(negation, #name,  \
-                                                             {});              \
-      }                                                                        \
-    };                                                                         \
-  };                                                                           \
-  GTEST_ATTRIBUTE_UNUSED_ inline name##Matcher name() { return {}; }           \
-  template <typename arg_type>                                                 \
-  bool name##Matcher::gmock_Impl<arg_type>::MatchAndExplain(                   \
-      const arg_type& arg,                                                     \
-      ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_) \
-      const
-
-#define MATCHER_P(name, p0, description) \
-  GMOCK_INTERNAL_MATCHER(name, name##MatcherP, description, (p0))
-#define MATCHER_P2(name, p0, p1, description) \
-  GMOCK_INTERNAL_MATCHER(name, name##MatcherP2, description, (p0, p1))
-#define MATCHER_P3(name, p0, p1, p2, description) \
-  GMOCK_INTERNAL_MATCHER(name, name##MatcherP3, description, (p0, p1, p2))
-#define MATCHER_P4(name, p0, p1, p2, p3, description) \
-  GMOCK_INTERNAL_MATCHER(name, name##MatcherP4, description, (p0, p1, p2, p3))
-#define MATCHER_P5(name, p0, p1, p2, p3, p4, description)    \
-  GMOCK_INTERNAL_MATCHER(name, name##MatcherP5, description, \
-                         (p0, p1, p2, p3, p4))
-#define MATCHER_P6(name, p0, p1, p2, p3, p4, p5, description) \
-  GMOCK_INTERNAL_MATCHER(name, name##MatcherP6, description,  \
-                         (p0, p1, p2, p3, p4, p5))
-#define MATCHER_P7(name, p0, p1, p2, p3, p4, p5, p6, description) \
-  GMOCK_INTERNAL_MATCHER(name, name##MatcherP7, description,      \
-                         (p0, p1, p2, p3, p4, p5, p6))
-#define MATCHER_P8(name, p0, p1, p2, p3, p4, p5, p6, p7, description) \
-  GMOCK_INTERNAL_MATCHER(name, name##MatcherP8, description,          \
-                         (p0, p1, p2, p3, p4, p5, p6, p7))
-#define MATCHER_P9(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, description) \
-  GMOCK_INTERNAL_MATCHER(name, name##MatcherP9, description,              \
-                         (p0, p1, p2, p3, p4, p5, p6, p7, p8))
-#define MATCHER_P10(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, description) \
-  GMOCK_INTERNAL_MATCHER(name, name##MatcherP10, description,                  \
-                         (p0, p1, p2, p3, p4, p5, p6, p7, p8, p9))
-
-#define GMOCK_INTERNAL_MATCHER(name, full_name, description, args)             \
-  template <GMOCK_INTERNAL_MATCHER_TEMPLATE_PARAMS(args)>                      \
-  class full_name : public ::testing::internal::MatcherBaseImpl<               \
-                        full_name<GMOCK_INTERNAL_MATCHER_TYPE_PARAMS(args)>> { \
-   public:                                                                     \
-    using full_name::MatcherBaseImpl::MatcherBaseImpl;                         \
-    template <typename arg_type>                                               \
-    class gmock_Impl : public ::testing::MatcherInterface<const arg_type&> {   \
-     public:                                                                   \
-      explicit gmock_Impl(GMOCK_INTERNAL_MATCHER_FUNCTION_ARGS(args))          \
-          : GMOCK_INTERNAL_MATCHER_FORWARD_ARGS(args) {}                       \
-      bool MatchAndExplain(                                                    \
-          const arg_type& arg,                                                 \
-          ::testing::MatchResultListener* result_listener) const override;     \
-      void DescribeTo(::std::ostream* gmock_os) const override {               \
-        *gmock_os << FormatDescription(false);                                 \
-      }                                                                        \
-      void DescribeNegationTo(::std::ostream* gmock_os) const override {       \
-        *gmock_os << FormatDescription(true);                                  \
-      }                                                                        \
-      GMOCK_INTERNAL_MATCHER_MEMBERS(args)                                     \
-                                                                               \
-     private:                                                                  \
-      ::std::string FormatDescription(bool negation) const {                   \
-        ::std::string gmock_description = (description);                       \
-        if (!gmock_description.empty()) {                                      \
-          return gmock_description;                                            \
-        }                                                                      \
-        return ::testing::internal::FormatMatcherDescription(                  \
-            negation, #name,                                                   \
-            ::testing::internal::UniversalTersePrintTupleFieldsToStrings(      \
-                ::std::tuple<GMOCK_INTERNAL_MATCHER_TYPE_PARAMS(args)>(        \
-                    GMOCK_INTERNAL_MATCHER_MEMBERS_USAGE(args))));             \
-      }                                                                        \
-    };                                                                         \
-  };                                                                           \
-  template <GMOCK_INTERNAL_MATCHER_TEMPLATE_PARAMS(args)>                      \
-  inline full_name<GMOCK_INTERNAL_MATCHER_TYPE_PARAMS(args)> name(             \
-      GMOCK_INTERNAL_MATCHER_FUNCTION_ARGS(args)) {                            \
-    return full_name<GMOCK_INTERNAL_MATCHER_TYPE_PARAMS(args)>(                \
-        GMOCK_INTERNAL_MATCHER_ARGS_USAGE(args));                              \
-  }                                                                            \
-  template <GMOCK_INTERNAL_MATCHER_TEMPLATE_PARAMS(args)>                      \
-  template <typename arg_type>                                                 \
-  bool full_name<GMOCK_INTERNAL_MATCHER_TYPE_PARAMS(args)>::gmock_Impl<        \
-      arg_type>::MatchAndExplain(const arg_type& arg,                          \
-                                 ::testing::MatchResultListener*               \
-                                     result_listener GTEST_ATTRIBUTE_UNUSED_)  \
-      const
-
-#define GMOCK_INTERNAL_MATCHER_TEMPLATE_PARAMS(args) \
-  GMOCK_PP_TAIL(                                     \
-      GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_MATCHER_TEMPLATE_PARAM, , args))
-#define GMOCK_INTERNAL_MATCHER_TEMPLATE_PARAM(i_unused, data_unused, arg) \
-  , typename arg##_type
-
-#define GMOCK_INTERNAL_MATCHER_TYPE_PARAMS(args) \
-  GMOCK_PP_TAIL(GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_MATCHER_TYPE_PARAM, , args))
-#define GMOCK_INTERNAL_MATCHER_TYPE_PARAM(i_unused, data_unused, arg) \
-  , arg##_type
-
-#define GMOCK_INTERNAL_MATCHER_FUNCTION_ARGS(args) \
-  GMOCK_PP_TAIL(dummy_first GMOCK_PP_FOR_EACH(     \
-      GMOCK_INTERNAL_MATCHER_FUNCTION_ARG, , args))
-#define GMOCK_INTERNAL_MATCHER_FUNCTION_ARG(i, data_unused, arg) \
-  , arg##_type gmock_p##i
-
-#define GMOCK_INTERNAL_MATCHER_FORWARD_ARGS(args) \
-  GMOCK_PP_TAIL(GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_MATCHER_FORWARD_ARG, , args))
-#define GMOCK_INTERNAL_MATCHER_FORWARD_ARG(i, data_unused, arg) \
-  , arg(::std::forward<arg##_type>(gmock_p##i))
-
-#define GMOCK_INTERNAL_MATCHER_MEMBERS(args) \
-  GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_MATCHER_MEMBER, , args)
-#define GMOCK_INTERNAL_MATCHER_MEMBER(i_unused, data_unused, arg) \
-  const arg##_type arg;
-
-#define GMOCK_INTERNAL_MATCHER_MEMBERS_USAGE(args) \
-  GMOCK_PP_TAIL(GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_MATCHER_MEMBER_USAGE, , args))
-#define GMOCK_INTERNAL_MATCHER_MEMBER_USAGE(i_unused, data_unused, arg) , arg
-
-#define GMOCK_INTERNAL_MATCHER_ARGS_USAGE(args) \
-  GMOCK_PP_TAIL(GMOCK_PP_FOR_EACH(GMOCK_INTERNAL_MATCHER_ARG_USAGE, , args))
-#define GMOCK_INTERNAL_MATCHER_ARG_USAGE(i, data_unused, arg_unused) \
-  , gmock_p##i
-
-// To prevent ADL on certain functions we put them on a separate namespace.
-using namespace no_adl;  // NOLINT
-
-}  // namespace testing
-
-GTEST_DISABLE_MSC_WARNINGS_POP_()  //  4251 5046
-
-// Include any custom callback matchers added by the local installation.
-// We must include this header at the end to make sure it can use the
-// declarations from this file.
-#include "gmock/internal/custom/gmock-matchers.h"
-
-#endif  // GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_MATCHERS_H_
diff --git a/src/include/gromacs/external/googletest/googlemock/include/gmock/gmock-more-actions.h b/src/include/gromacs/external/googletest/googlemock/include/gmock/gmock-more-actions.h
deleted file mode 100644 (file)
index ffbe43c..0000000
+++ /dev/null
@@ -1,571 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file implements some commonly used variadic actions.
-
-#ifndef GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_MORE_ACTIONS_H_
-#define GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_MORE_ACTIONS_H_
-
-#include <memory>
-#include <utility>
-
-#include "gmock/gmock-actions.h"
-#include "gmock/internal/gmock-port.h"
-
-// Include any custom callback actions added by the local installation.
-#include "gmock/internal/custom/gmock-generated-actions.h"
-
-// Sometimes you want to give an action explicit template parameters
-// that cannot be inferred from its value parameters.  ACTION() and
-// ACTION_P*() don't support that.  ACTION_TEMPLATE() remedies that
-// and can be viewed as an extension to ACTION() and ACTION_P*().
-//
-// The syntax:
-//
-//   ACTION_TEMPLATE(ActionName,
-//                   HAS_m_TEMPLATE_PARAMS(kind1, name1, ..., kind_m, name_m),
-//                   AND_n_VALUE_PARAMS(p1, ..., p_n)) { statements; }
-//
-// defines an action template that takes m explicit template
-// parameters and n value parameters.  name_i is the name of the i-th
-// template parameter, and kind_i specifies whether it's a typename,
-// an integral constant, or a template.  p_i is the name of the i-th
-// value parameter.
-//
-// Example:
-//
-//   // DuplicateArg<k, T>(output) converts the k-th argument of the mock
-//   // function to type T and copies it to *output.
-//   ACTION_TEMPLATE(DuplicateArg,
-//                   HAS_2_TEMPLATE_PARAMS(int, k, typename, T),
-//                   AND_1_VALUE_PARAMS(output)) {
-//     *output = T(::std::get<k>(args));
-//   }
-//   ...
-//     int n;
-//     EXPECT_CALL(mock, Foo(_, _))
-//         .WillOnce(DuplicateArg<1, unsigned char>(&n));
-//
-// To create an instance of an action template, write:
-//
-//   ActionName<t1, ..., t_m>(v1, ..., v_n)
-//
-// where the ts are the template arguments and the vs are the value
-// arguments.  The value argument types are inferred by the compiler.
-// If you want to explicitly specify the value argument types, you can
-// provide additional template arguments:
-//
-//   ActionName<t1, ..., t_m, u1, ..., u_k>(v1, ..., v_n)
-//
-// where u_i is the desired type of v_i.
-//
-// ACTION_TEMPLATE and ACTION/ACTION_P* can be overloaded on the
-// number of value parameters, but not on the number of template
-// parameters.  Without the restriction, the meaning of the following
-// is unclear:
-//
-//   OverloadedAction<int, bool>(x);
-//
-// Are we using a single-template-parameter action where 'bool' refers
-// to the type of x, or are we using a two-template-parameter action
-// where the compiler is asked to infer the type of x?
-//
-// Implementation notes:
-//
-// GMOCK_INTERNAL_*_HAS_m_TEMPLATE_PARAMS and
-// GMOCK_INTERNAL_*_AND_n_VALUE_PARAMS are internal macros for
-// implementing ACTION_TEMPLATE.  The main trick we use is to create
-// new macro invocations when expanding a macro.  For example, we have
-//
-//   #define ACTION_TEMPLATE(name, template_params, value_params)
-//       ... GMOCK_INTERNAL_DECL_##template_params ...
-//
-// which causes ACTION_TEMPLATE(..., HAS_1_TEMPLATE_PARAMS(typename, T), ...)
-// to expand to
-//
-//       ... GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS(typename, T) ...
-//
-// Since GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS is a macro, the
-// preprocessor will continue to expand it to
-//
-//       ... typename T ...
-//
-// This technique conforms to the C++ standard and is portable.  It
-// allows us to implement action templates using O(N) code, where N is
-// the maximum number of template/value parameters supported.  Without
-// using it, we'd have to devote O(N^2) amount of code to implement all
-// combinations of m and n.
-
-// Declares the template parameters.
-#define GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS(kind0, name0) kind0 name0
-#define GMOCK_INTERNAL_DECL_HAS_2_TEMPLATE_PARAMS(kind0, name0, kind1, \
-    name1) kind0 name0, kind1 name1
-#define GMOCK_INTERNAL_DECL_HAS_3_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
-    kind2, name2) kind0 name0, kind1 name1, kind2 name2
-#define GMOCK_INTERNAL_DECL_HAS_4_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
-    kind2, name2, kind3, name3) kind0 name0, kind1 name1, kind2 name2, \
-    kind3 name3
-#define GMOCK_INTERNAL_DECL_HAS_5_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
-    kind2, name2, kind3, name3, kind4, name4) kind0 name0, kind1 name1, \
-    kind2 name2, kind3 name3, kind4 name4
-#define GMOCK_INTERNAL_DECL_HAS_6_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
-    kind2, name2, kind3, name3, kind4, name4, kind5, name5) kind0 name0, \
-    kind1 name1, kind2 name2, kind3 name3, kind4 name4, kind5 name5
-#define GMOCK_INTERNAL_DECL_HAS_7_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
-    kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \
-    name6) kind0 name0, kind1 name1, kind2 name2, kind3 name3, kind4 name4, \
-    kind5 name5, kind6 name6
-#define GMOCK_INTERNAL_DECL_HAS_8_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
-    kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \
-    kind7, name7) kind0 name0, kind1 name1, kind2 name2, kind3 name3, \
-    kind4 name4, kind5 name5, kind6 name6, kind7 name7
-#define GMOCK_INTERNAL_DECL_HAS_9_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
-    kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \
-    kind7, name7, kind8, name8) kind0 name0, kind1 name1, kind2 name2, \
-    kind3 name3, kind4 name4, kind5 name5, kind6 name6, kind7 name7, \
-    kind8 name8
-#define GMOCK_INTERNAL_DECL_HAS_10_TEMPLATE_PARAMS(kind0, name0, kind1, \
-    name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \
-    name6, kind7, name7, kind8, name8, kind9, name9) kind0 name0, \
-    kind1 name1, kind2 name2, kind3 name3, kind4 name4, kind5 name5, \
-    kind6 name6, kind7 name7, kind8 name8, kind9 name9
-
-// Lists the template parameters.
-#define GMOCK_INTERNAL_LIST_HAS_1_TEMPLATE_PARAMS(kind0, name0) name0
-#define GMOCK_INTERNAL_LIST_HAS_2_TEMPLATE_PARAMS(kind0, name0, kind1, \
-    name1) name0, name1
-#define GMOCK_INTERNAL_LIST_HAS_3_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
-    kind2, name2) name0, name1, name2
-#define GMOCK_INTERNAL_LIST_HAS_4_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
-    kind2, name2, kind3, name3) name0, name1, name2, name3
-#define GMOCK_INTERNAL_LIST_HAS_5_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
-    kind2, name2, kind3, name3, kind4, name4) name0, name1, name2, name3, \
-    name4
-#define GMOCK_INTERNAL_LIST_HAS_6_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
-    kind2, name2, kind3, name3, kind4, name4, kind5, name5) name0, name1, \
-    name2, name3, name4, name5
-#define GMOCK_INTERNAL_LIST_HAS_7_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
-    kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \
-    name6) name0, name1, name2, name3, name4, name5, name6
-#define GMOCK_INTERNAL_LIST_HAS_8_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
-    kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \
-    kind7, name7) name0, name1, name2, name3, name4, name5, name6, name7
-#define GMOCK_INTERNAL_LIST_HAS_9_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \
-    kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \
-    kind7, name7, kind8, name8) name0, name1, name2, name3, name4, name5, \
-    name6, name7, name8
-#define GMOCK_INTERNAL_LIST_HAS_10_TEMPLATE_PARAMS(kind0, name0, kind1, \
-    name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \
-    name6, kind7, name7, kind8, name8, kind9, name9) name0, name1, name2, \
-    name3, name4, name5, name6, name7, name8, name9
-
-// Declares the types of value parameters.
-#define GMOCK_INTERNAL_DECL_TYPE_AND_0_VALUE_PARAMS()
-#define GMOCK_INTERNAL_DECL_TYPE_AND_1_VALUE_PARAMS(p0) , typename p0##_type
-#define GMOCK_INTERNAL_DECL_TYPE_AND_2_VALUE_PARAMS(p0, p1) , \
-    typename p0##_type, typename p1##_type
-#define GMOCK_INTERNAL_DECL_TYPE_AND_3_VALUE_PARAMS(p0, p1, p2) , \
-    typename p0##_type, typename p1##_type, typename p2##_type
-#define GMOCK_INTERNAL_DECL_TYPE_AND_4_VALUE_PARAMS(p0, p1, p2, p3) , \
-    typename p0##_type, typename p1##_type, typename p2##_type, \
-    typename p3##_type
-#define GMOCK_INTERNAL_DECL_TYPE_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) , \
-    typename p0##_type, typename p1##_type, typename p2##_type, \
-    typename p3##_type, typename p4##_type
-#define GMOCK_INTERNAL_DECL_TYPE_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) , \
-    typename p0##_type, typename p1##_type, typename p2##_type, \
-    typename p3##_type, typename p4##_type, typename p5##_type
-#define GMOCK_INTERNAL_DECL_TYPE_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
-    p6) , typename p0##_type, typename p1##_type, typename p2##_type, \
-    typename p3##_type, typename p4##_type, typename p5##_type, \
-    typename p6##_type
-#define GMOCK_INTERNAL_DECL_TYPE_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
-    p6, p7) , typename p0##_type, typename p1##_type, typename p2##_type, \
-    typename p3##_type, typename p4##_type, typename p5##_type, \
-    typename p6##_type, typename p7##_type
-#define GMOCK_INTERNAL_DECL_TYPE_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
-    p6, p7, p8) , typename p0##_type, typename p1##_type, typename p2##_type, \
-    typename p3##_type, typename p4##_type, typename p5##_type, \
-    typename p6##_type, typename p7##_type, typename p8##_type
-#define GMOCK_INTERNAL_DECL_TYPE_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
-    p6, p7, p8, p9) , typename p0##_type, typename p1##_type, \
-    typename p2##_type, typename p3##_type, typename p4##_type, \
-    typename p5##_type, typename p6##_type, typename p7##_type, \
-    typename p8##_type, typename p9##_type
-
-// Initializes the value parameters.
-#define GMOCK_INTERNAL_INIT_AND_0_VALUE_PARAMS()\
-    ()
-#define GMOCK_INTERNAL_INIT_AND_1_VALUE_PARAMS(p0)\
-    (p0##_type gmock_p0) : p0(::std::move(gmock_p0))
-#define GMOCK_INTERNAL_INIT_AND_2_VALUE_PARAMS(p0, p1)\
-    (p0##_type gmock_p0, p1##_type gmock_p1) : p0(::std::move(gmock_p0)), \
-        p1(::std::move(gmock_p1))
-#define GMOCK_INTERNAL_INIT_AND_3_VALUE_PARAMS(p0, p1, p2)\
-    (p0##_type gmock_p0, p1##_type gmock_p1, \
-        p2##_type gmock_p2) : p0(::std::move(gmock_p0)), \
-        p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2))
-#define GMOCK_INTERNAL_INIT_AND_4_VALUE_PARAMS(p0, p1, p2, p3)\
-    (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
-        p3##_type gmock_p3) : p0(::std::move(gmock_p0)), \
-        p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \
-        p3(::std::move(gmock_p3))
-#define GMOCK_INTERNAL_INIT_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)\
-    (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
-        p3##_type gmock_p3, p4##_type gmock_p4) : p0(::std::move(gmock_p0)), \
-        p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \
-        p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4))
-#define GMOCK_INTERNAL_INIT_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)\
-    (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
-        p3##_type gmock_p3, p4##_type gmock_p4, \
-        p5##_type gmock_p5) : p0(::std::move(gmock_p0)), \
-        p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \
-        p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4)), \
-        p5(::std::move(gmock_p5))
-#define GMOCK_INTERNAL_INIT_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)\
-    (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
-        p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
-        p6##_type gmock_p6) : p0(::std::move(gmock_p0)), \
-        p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \
-        p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4)), \
-        p5(::std::move(gmock_p5)), p6(::std::move(gmock_p6))
-#define GMOCK_INTERNAL_INIT_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)\
-    (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
-        p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
-        p6##_type gmock_p6, p7##_type gmock_p7) : p0(::std::move(gmock_p0)), \
-        p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \
-        p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4)), \
-        p5(::std::move(gmock_p5)), p6(::std::move(gmock_p6)), \
-        p7(::std::move(gmock_p7))
-#define GMOCK_INTERNAL_INIT_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
-    p7, p8)\
-    (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
-        p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
-        p6##_type gmock_p6, p7##_type gmock_p7, \
-        p8##_type gmock_p8) : p0(::std::move(gmock_p0)), \
-        p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \
-        p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4)), \
-        p5(::std::move(gmock_p5)), p6(::std::move(gmock_p6)), \
-        p7(::std::move(gmock_p7)), p8(::std::move(gmock_p8))
-#define GMOCK_INTERNAL_INIT_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
-    p7, p8, p9)\
-    (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
-        p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
-        p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8, \
-        p9##_type gmock_p9) : p0(::std::move(gmock_p0)), \
-        p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \
-        p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4)), \
-        p5(::std::move(gmock_p5)), p6(::std::move(gmock_p6)), \
-        p7(::std::move(gmock_p7)), p8(::std::move(gmock_p8)), \
-        p9(::std::move(gmock_p9))
-
-// Defines the copy constructor
-#define GMOCK_INTERNAL_DEFN_COPY_AND_0_VALUE_PARAMS() \
-    {}  // Avoid https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82134
-#define GMOCK_INTERNAL_DEFN_COPY_AND_1_VALUE_PARAMS(...) = default;
-#define GMOCK_INTERNAL_DEFN_COPY_AND_2_VALUE_PARAMS(...) = default;
-#define GMOCK_INTERNAL_DEFN_COPY_AND_3_VALUE_PARAMS(...) = default;
-#define GMOCK_INTERNAL_DEFN_COPY_AND_4_VALUE_PARAMS(...) = default;
-#define GMOCK_INTERNAL_DEFN_COPY_AND_5_VALUE_PARAMS(...) = default;
-#define GMOCK_INTERNAL_DEFN_COPY_AND_6_VALUE_PARAMS(...) = default;
-#define GMOCK_INTERNAL_DEFN_COPY_AND_7_VALUE_PARAMS(...) = default;
-#define GMOCK_INTERNAL_DEFN_COPY_AND_8_VALUE_PARAMS(...) = default;
-#define GMOCK_INTERNAL_DEFN_COPY_AND_9_VALUE_PARAMS(...) = default;
-#define GMOCK_INTERNAL_DEFN_COPY_AND_10_VALUE_PARAMS(...) = default;
-
-// Declares the fields for storing the value parameters.
-#define GMOCK_INTERNAL_DEFN_AND_0_VALUE_PARAMS()
-#define GMOCK_INTERNAL_DEFN_AND_1_VALUE_PARAMS(p0) p0##_type p0;
-#define GMOCK_INTERNAL_DEFN_AND_2_VALUE_PARAMS(p0, p1) p0##_type p0; \
-    p1##_type p1;
-#define GMOCK_INTERNAL_DEFN_AND_3_VALUE_PARAMS(p0, p1, p2) p0##_type p0; \
-    p1##_type p1; p2##_type p2;
-#define GMOCK_INTERNAL_DEFN_AND_4_VALUE_PARAMS(p0, p1, p2, p3) p0##_type p0; \
-    p1##_type p1; p2##_type p2; p3##_type p3;
-#define GMOCK_INTERNAL_DEFN_AND_5_VALUE_PARAMS(p0, p1, p2, p3, \
-    p4) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4;
-#define GMOCK_INTERNAL_DEFN_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, \
-    p5) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; \
-    p5##_type p5;
-#define GMOCK_INTERNAL_DEFN_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
-    p6) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; \
-    p5##_type p5; p6##_type p6;
-#define GMOCK_INTERNAL_DEFN_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
-    p7) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; \
-    p5##_type p5; p6##_type p6; p7##_type p7;
-#define GMOCK_INTERNAL_DEFN_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
-    p7, p8) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; \
-    p4##_type p4; p5##_type p5; p6##_type p6; p7##_type p7; p8##_type p8;
-#define GMOCK_INTERNAL_DEFN_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
-    p7, p8, p9) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; \
-    p4##_type p4; p5##_type p5; p6##_type p6; p7##_type p7; p8##_type p8; \
-    p9##_type p9;
-
-// Lists the value parameters.
-#define GMOCK_INTERNAL_LIST_AND_0_VALUE_PARAMS()
-#define GMOCK_INTERNAL_LIST_AND_1_VALUE_PARAMS(p0) p0
-#define GMOCK_INTERNAL_LIST_AND_2_VALUE_PARAMS(p0, p1) p0, p1
-#define GMOCK_INTERNAL_LIST_AND_3_VALUE_PARAMS(p0, p1, p2) p0, p1, p2
-#define GMOCK_INTERNAL_LIST_AND_4_VALUE_PARAMS(p0, p1, p2, p3) p0, p1, p2, p3
-#define GMOCK_INTERNAL_LIST_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) p0, p1, \
-    p2, p3, p4
-#define GMOCK_INTERNAL_LIST_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) p0, \
-    p1, p2, p3, p4, p5
-#define GMOCK_INTERNAL_LIST_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
-    p6) p0, p1, p2, p3, p4, p5, p6
-#define GMOCK_INTERNAL_LIST_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
-    p7) p0, p1, p2, p3, p4, p5, p6, p7
-#define GMOCK_INTERNAL_LIST_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
-    p7, p8) p0, p1, p2, p3, p4, p5, p6, p7, p8
-#define GMOCK_INTERNAL_LIST_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
-    p7, p8, p9) p0, p1, p2, p3, p4, p5, p6, p7, p8, p9
-
-// Lists the value parameter types.
-#define GMOCK_INTERNAL_LIST_TYPE_AND_0_VALUE_PARAMS()
-#define GMOCK_INTERNAL_LIST_TYPE_AND_1_VALUE_PARAMS(p0) , p0##_type
-#define GMOCK_INTERNAL_LIST_TYPE_AND_2_VALUE_PARAMS(p0, p1) , p0##_type, \
-    p1##_type
-#define GMOCK_INTERNAL_LIST_TYPE_AND_3_VALUE_PARAMS(p0, p1, p2) , p0##_type, \
-    p1##_type, p2##_type
-#define GMOCK_INTERNAL_LIST_TYPE_AND_4_VALUE_PARAMS(p0, p1, p2, p3) , \
-    p0##_type, p1##_type, p2##_type, p3##_type
-#define GMOCK_INTERNAL_LIST_TYPE_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) , \
-    p0##_type, p1##_type, p2##_type, p3##_type, p4##_type
-#define GMOCK_INTERNAL_LIST_TYPE_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) , \
-    p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, p5##_type
-#define GMOCK_INTERNAL_LIST_TYPE_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
-    p6) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, p5##_type, \
-    p6##_type
-#define GMOCK_INTERNAL_LIST_TYPE_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
-    p6, p7) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
-    p5##_type, p6##_type, p7##_type
-#define GMOCK_INTERNAL_LIST_TYPE_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
-    p6, p7, p8) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
-    p5##_type, p6##_type, p7##_type, p8##_type
-#define GMOCK_INTERNAL_LIST_TYPE_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
-    p6, p7, p8, p9) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
-    p5##_type, p6##_type, p7##_type, p8##_type, p9##_type
-
-// Declares the value parameters.
-#define GMOCK_INTERNAL_DECL_AND_0_VALUE_PARAMS()
-#define GMOCK_INTERNAL_DECL_AND_1_VALUE_PARAMS(p0) p0##_type p0
-#define GMOCK_INTERNAL_DECL_AND_2_VALUE_PARAMS(p0, p1) p0##_type p0, \
-    p1##_type p1
-#define GMOCK_INTERNAL_DECL_AND_3_VALUE_PARAMS(p0, p1, p2) p0##_type p0, \
-    p1##_type p1, p2##_type p2
-#define GMOCK_INTERNAL_DECL_AND_4_VALUE_PARAMS(p0, p1, p2, p3) p0##_type p0, \
-    p1##_type p1, p2##_type p2, p3##_type p3
-#define GMOCK_INTERNAL_DECL_AND_5_VALUE_PARAMS(p0, p1, p2, p3, \
-    p4) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4
-#define GMOCK_INTERNAL_DECL_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, \
-    p5) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \
-    p5##_type p5
-#define GMOCK_INTERNAL_DECL_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \
-    p6) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \
-    p5##_type p5, p6##_type p6
-#define GMOCK_INTERNAL_DECL_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
-    p7) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \
-    p5##_type p5, p6##_type p6, p7##_type p7
-#define GMOCK_INTERNAL_DECL_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
-    p7, p8) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
-    p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8
-#define GMOCK_INTERNAL_DECL_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
-    p7, p8, p9) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
-    p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8, \
-    p9##_type p9
-
-// The suffix of the class template implementing the action template.
-#define GMOCK_INTERNAL_COUNT_AND_0_VALUE_PARAMS()
-#define GMOCK_INTERNAL_COUNT_AND_1_VALUE_PARAMS(p0) P
-#define GMOCK_INTERNAL_COUNT_AND_2_VALUE_PARAMS(p0, p1) P2
-#define GMOCK_INTERNAL_COUNT_AND_3_VALUE_PARAMS(p0, p1, p2) P3
-#define GMOCK_INTERNAL_COUNT_AND_4_VALUE_PARAMS(p0, p1, p2, p3) P4
-#define GMOCK_INTERNAL_COUNT_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) P5
-#define GMOCK_INTERNAL_COUNT_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) P6
-#define GMOCK_INTERNAL_COUNT_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6) P7
-#define GMOCK_INTERNAL_COUNT_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
-    p7) P8
-#define GMOCK_INTERNAL_COUNT_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
-    p7, p8) P9
-#define GMOCK_INTERNAL_COUNT_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \
-    p7, p8, p9) P10
-
-// The name of the class template implementing the action template.
-#define GMOCK_ACTION_CLASS_(name, value_params)\
-    GTEST_CONCAT_TOKEN_(name##Action, GMOCK_INTERNAL_COUNT_##value_params)
-
-#define ACTION_TEMPLATE(name, template_params, value_params)                   \
-  template <GMOCK_INTERNAL_DECL_##template_params                              \
-            GMOCK_INTERNAL_DECL_TYPE_##value_params>                           \
-  class GMOCK_ACTION_CLASS_(name, value_params) {                              \
-   public:                                                                     \
-    explicit GMOCK_ACTION_CLASS_(name, value_params)(                          \
-        GMOCK_INTERNAL_DECL_##value_params)                                    \
-        GMOCK_PP_IF(GMOCK_PP_IS_EMPTY(GMOCK_INTERNAL_COUNT_##value_params),    \
-                    = default; ,                                               \
-                    : impl_(std::make_shared<gmock_Impl>(                      \
-                                GMOCK_INTERNAL_LIST_##value_params)) { })      \
-    GMOCK_ACTION_CLASS_(name, value_params)(                                   \
-        const GMOCK_ACTION_CLASS_(name, value_params)&) noexcept               \
-        GMOCK_INTERNAL_DEFN_COPY_##value_params                                \
-    GMOCK_ACTION_CLASS_(name, value_params)(                                   \
-        GMOCK_ACTION_CLASS_(name, value_params)&&) noexcept                    \
-        GMOCK_INTERNAL_DEFN_COPY_##value_params                                \
-    template <typename F>                                                      \
-    operator ::testing::Action<F>() const {                                    \
-      return GMOCK_PP_IF(                                                      \
-          GMOCK_PP_IS_EMPTY(GMOCK_INTERNAL_COUNT_##value_params),              \
-                      (::testing::internal::MakeAction<F, gmock_Impl>()),      \
-                      (::testing::internal::MakeAction<F>(impl_)));            \
-    }                                                                          \
-   private:                                                                    \
-    class gmock_Impl {                                                         \
-     public:                                                                   \
-      explicit gmock_Impl GMOCK_INTERNAL_INIT_##value_params {}                \
-      template <typename function_type, typename return_type,                  \
-                typename args_type, GMOCK_ACTION_TEMPLATE_ARGS_NAMES_>         \
-      return_type gmock_PerformImpl(GMOCK_ACTION_ARG_TYPES_AND_NAMES_) const;  \
-      GMOCK_INTERNAL_DEFN_##value_params                                       \
-    };                                                                         \
-    GMOCK_PP_IF(GMOCK_PP_IS_EMPTY(GMOCK_INTERNAL_COUNT_##value_params),        \
-                , std::shared_ptr<const gmock_Impl> impl_;)                    \
-  };                                                                           \
-  template <GMOCK_INTERNAL_DECL_##template_params                              \
-            GMOCK_INTERNAL_DECL_TYPE_##value_params>                           \
-  GMOCK_ACTION_CLASS_(name, value_params)<                                     \
-      GMOCK_INTERNAL_LIST_##template_params                                    \
-      GMOCK_INTERNAL_LIST_TYPE_##value_params> name(                           \
-          GMOCK_INTERNAL_DECL_##value_params) GTEST_MUST_USE_RESULT_;          \
-  template <GMOCK_INTERNAL_DECL_##template_params                              \
-            GMOCK_INTERNAL_DECL_TYPE_##value_params>                           \
-  inline GMOCK_ACTION_CLASS_(name, value_params)<                              \
-      GMOCK_INTERNAL_LIST_##template_params                                    \
-      GMOCK_INTERNAL_LIST_TYPE_##value_params> name(                           \
-          GMOCK_INTERNAL_DECL_##value_params) {                                \
-    return GMOCK_ACTION_CLASS_(name, value_params)<                            \
-        GMOCK_INTERNAL_LIST_##template_params                                  \
-        GMOCK_INTERNAL_LIST_TYPE_##value_params>(                              \
-            GMOCK_INTERNAL_LIST_##value_params);                               \
-  }                                                                            \
-  template <GMOCK_INTERNAL_DECL_##template_params                              \
-            GMOCK_INTERNAL_DECL_TYPE_##value_params>                           \
-  template <typename function_type, typename return_type, typename args_type,  \
-            GMOCK_ACTION_TEMPLATE_ARGS_NAMES_>                                 \
-  return_type GMOCK_ACTION_CLASS_(name, value_params)<                         \
-      GMOCK_INTERNAL_LIST_##template_params                                    \
-      GMOCK_INTERNAL_LIST_TYPE_##value_params>::gmock_Impl::gmock_PerformImpl( \
-          GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const
-
-namespace testing {
-
-// The ACTION*() macros trigger warning C4100 (unreferenced formal
-// parameter) in MSVC with -W4.  Unfortunately they cannot be fixed in
-// the macro definition, as the warnings are generated when the macro
-// is expanded and macro expansion cannot contain #pragma.  Therefore
-// we suppress them here.
-#ifdef _MSC_VER
-# pragma warning(push)
-# pragma warning(disable:4100)
-#endif
-
-namespace internal {
-
-// internal::InvokeArgument - a helper for InvokeArgument action.
-// The basic overloads are provided here for generic functors.
-// Overloads for other custom-callables are provided in the
-// internal/custom/gmock-generated-actions.h header.
-template <typename F, typename... Args>
-auto InvokeArgument(F f, Args... args) -> decltype(f(args...)) {
-  return f(args...);
-}
-
-template <std::size_t index, typename... Params>
-struct InvokeArgumentAction {
-  template <typename... Args>
-  auto operator()(Args&&... args) const -> decltype(internal::InvokeArgument(
-      std::get<index>(std::forward_as_tuple(std::forward<Args>(args)...)),
-      std::declval<const Params&>()...)) {
-    internal::FlatTuple<Args&&...> args_tuple(FlatTupleConstructTag{},
-                                              std::forward<Args>(args)...);
-    return params.Apply([&](const Params&... unpacked_params) {
-      auto&& callable = args_tuple.template Get<index>();
-      return internal::InvokeArgument(
-          std::forward<decltype(callable)>(callable), unpacked_params...);
-    });
-  }
-
-  internal::FlatTuple<Params...> params;
-};
-
-}  // namespace internal
-
-// The InvokeArgument<N>(a1, a2, ..., a_k) action invokes the N-th
-// (0-based) argument, which must be a k-ary callable, of the mock
-// function, with arguments a1, a2, ..., a_k.
-//
-// Notes:
-//
-//   1. The arguments are passed by value by default.  If you need to
-//   pass an argument by reference, wrap it inside std::ref().  For
-//   example,
-//
-//     InvokeArgument<1>(5, string("Hello"), std::ref(foo))
-//
-//   passes 5 and string("Hello") by value, and passes foo by
-//   reference.
-//
-//   2. If the callable takes an argument by reference but std::ref() is
-//   not used, it will receive the reference to a copy of the value,
-//   instead of the original value.  For example, when the 0-th
-//   argument of the mock function takes a const string&, the action
-//
-//     InvokeArgument<0>(string("Hello"))
-//
-//   makes a copy of the temporary string("Hello") object and passes a
-//   reference of the copy, instead of the original temporary object,
-//   to the callable.  This makes it easy for a user to define an
-//   InvokeArgument action from temporary values and have it performed
-//   later.
-template <std::size_t index, typename... Params>
-internal::InvokeArgumentAction<index, typename std::decay<Params>::type...>
-InvokeArgument(Params&&... params) {
-  return {internal::FlatTuple<typename std::decay<Params>::type...>(
-      internal::FlatTupleConstructTag{}, std::forward<Params>(params)...)};
-}
-
-#ifdef _MSC_VER
-# pragma warning(pop)
-#endif
-
-}  // namespace testing
-
-#endif  // GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_MORE_ACTIONS_H_
diff --git a/src/include/gromacs/external/googletest/googlemock/include/gmock/gmock-more-matchers.h b/src/include/gromacs/external/googletest/googlemock/include/gmock/gmock-more-matchers.h
deleted file mode 100644 (file)
index 5affa4f..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright 2013, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file implements some matchers that depend on gmock-matchers.h.
-//
-// Note that tests are implemented in gmock-matchers_test.cc rather than
-// gmock-more-matchers-test.cc.
-
-#ifndef GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_MORE_MATCHERS_H_
-#define GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_MORE_MATCHERS_H_
-
-#include "gmock/gmock-matchers.h"
-
-namespace testing {
-
-// Silence C4100 (unreferenced formal
-// parameter) for MSVC
-#ifdef _MSC_VER
-# pragma warning(push)
-# pragma warning(disable:4100)
-#if (_MSC_VER == 1900)
-// and silence C4800 (C4800: 'int *const ': forcing value
-// to bool 'true' or 'false') for MSVC 14
-# pragma warning(disable:4800)
-  #endif
-#endif
-
-// Defines a matcher that matches an empty container. The container must
-// support both size() and empty(), which all STL-like containers provide.
-MATCHER(IsEmpty, negation ? "isn't empty" : "is empty") {
-  if (arg.empty()) {
-    return true;
-  }
-  *result_listener << "whose size is " << arg.size();
-  return false;
-}
-
-// Define a matcher that matches a value that evaluates in boolean
-// context to true.  Useful for types that define "explicit operator
-// bool" operators and so can't be compared for equality with true
-// and false.
-MATCHER(IsTrue, negation ? "is false" : "is true") {
-  return static_cast<bool>(arg);
-}
-
-// Define a matcher that matches a value that evaluates in boolean
-// context to false.  Useful for types that define "explicit operator
-// bool" operators and so can't be compared for equality with true
-// and false.
-MATCHER(IsFalse, negation ? "is true" : "is false") {
-  return !static_cast<bool>(arg);
-}
-
-#ifdef _MSC_VER
-# pragma warning(pop)
-#endif
-
-
-}  // namespace testing
-
-#endif  // GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_MORE_MATCHERS_H_
diff --git a/src/include/gromacs/external/googletest/googlemock/include/gmock/gmock-nice-strict.h b/src/include/gromacs/external/googletest/googlemock/include/gmock/gmock-nice-strict.h
deleted file mode 100644 (file)
index 101e0d7..0000000
+++ /dev/null
@@ -1,259 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-// Implements class templates NiceMock, NaggyMock, and StrictMock.
-//
-// Given a mock class MockFoo that is created using Google Mock,
-// NiceMock<MockFoo> is a subclass of MockFoo that allows
-// uninteresting calls (i.e. calls to mock methods that have no
-// EXPECT_CALL specs), NaggyMock<MockFoo> is a subclass of MockFoo
-// that prints a warning when an uninteresting call occurs, and
-// StrictMock<MockFoo> is a subclass of MockFoo that treats all
-// uninteresting calls as errors.
-//
-// Currently a mock is naggy by default, so MockFoo and
-// NaggyMock<MockFoo> behave like the same.  However, we will soon
-// switch the default behavior of mocks to be nice, as that in general
-// leads to more maintainable tests.  When that happens, MockFoo will
-// stop behaving like NaggyMock<MockFoo> and start behaving like
-// NiceMock<MockFoo>.
-//
-// NiceMock, NaggyMock, and StrictMock "inherit" the constructors of
-// their respective base class.  Therefore you can write
-// NiceMock<MockFoo>(5, "a") to construct a nice mock where MockFoo
-// has a constructor that accepts (int, const char*), for example.
-//
-// A known limitation is that NiceMock<MockFoo>, NaggyMock<MockFoo>,
-// and StrictMock<MockFoo> only works for mock methods defined using
-// the MOCK_METHOD* family of macros DIRECTLY in the MockFoo class.
-// If a mock method is defined in a base class of MockFoo, the "nice"
-// or "strict" modifier may not affect it, depending on the compiler.
-// In particular, nesting NiceMock, NaggyMock, and StrictMock is NOT
-// supported.
-
-#ifndef GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_NICE_STRICT_H_
-#define GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_NICE_STRICT_H_
-
-#include <type_traits>
-
-#include "gmock/gmock-spec-builders.h"
-#include "gmock/internal/gmock-port.h"
-
-namespace testing {
-template <class MockClass>
-class NiceMock;
-template <class MockClass>
-class NaggyMock;
-template <class MockClass>
-class StrictMock;
-
-namespace internal {
-template <typename T>
-std::true_type StrictnessModifierProbe(const NiceMock<T>&);
-template <typename T>
-std::true_type StrictnessModifierProbe(const NaggyMock<T>&);
-template <typename T>
-std::true_type StrictnessModifierProbe(const StrictMock<T>&);
-std::false_type StrictnessModifierProbe(...);
-
-template <typename T>
-constexpr bool HasStrictnessModifier() {
-  return decltype(StrictnessModifierProbe(std::declval<const T&>()))::value;
-}
-
-// Base classes that register and deregister with testing::Mock to alter the
-// default behavior around uninteresting calls. Inheriting from one of these
-// classes first and then MockClass ensures the MockClass constructor is run
-// after registration, and that the MockClass destructor runs before
-// deregistration. This guarantees that MockClass's constructor and destructor
-// run with the same level of strictness as its instance methods.
-
-#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MINGW && \
-    (defined(_MSC_VER) || defined(__clang__))
-// We need to mark these classes with this declspec to ensure that
-// the empty base class optimization is performed.
-#define GTEST_INTERNAL_EMPTY_BASE_CLASS __declspec(empty_bases)
-#else
-#define GTEST_INTERNAL_EMPTY_BASE_CLASS
-#endif
-
-template <typename Base>
-class NiceMockImpl {
- public:
-  NiceMockImpl() { ::testing::Mock::AllowUninterestingCalls(this); }
-
-  ~NiceMockImpl() { ::testing::Mock::UnregisterCallReaction(this); }
-};
-
-template <typename Base>
-class NaggyMockImpl {
- public:
-  NaggyMockImpl() { ::testing::Mock::WarnUninterestingCalls(this); }
-
-  ~NaggyMockImpl() { ::testing::Mock::UnregisterCallReaction(this); }
-};
-
-template <typename Base>
-class StrictMockImpl {
- public:
-  StrictMockImpl() { ::testing::Mock::FailUninterestingCalls(this); }
-
-  ~StrictMockImpl() { ::testing::Mock::UnregisterCallReaction(this); }
-};
-
-}  // namespace internal
-
-template <class MockClass>
-class GTEST_INTERNAL_EMPTY_BASE_CLASS NiceMock
-    : private internal::NiceMockImpl<MockClass>,
-      public MockClass {
- public:
-  static_assert(!internal::HasStrictnessModifier<MockClass>(),
-                "Can't apply NiceMock to a class hierarchy that already has a "
-                "strictness modifier. See "
-                "https://google.github.io/googletest/"
-                "gmock_cook_book.html#NiceStrictNaggy");
-  NiceMock() : MockClass() {
-    static_assert(sizeof(*this) == sizeof(MockClass),
-                  "The impl subclass shouldn't introduce any padding");
-  }
-
-  // Ideally, we would inherit base class's constructors through a using
-  // declaration, which would preserve their visibility. However, many existing
-  // tests rely on the fact that current implementation reexports protected
-  // constructors as public. These tests would need to be cleaned up first.
-
-  // Single argument constructor is special-cased so that it can be
-  // made explicit.
-  template <typename A>
-  explicit NiceMock(A&& arg) : MockClass(std::forward<A>(arg)) {
-    static_assert(sizeof(*this) == sizeof(MockClass),
-                  "The impl subclass shouldn't introduce any padding");
-  }
-
-  template <typename TArg1, typename TArg2, typename... An>
-  NiceMock(TArg1&& arg1, TArg2&& arg2, An&&... args)
-      : MockClass(std::forward<TArg1>(arg1), std::forward<TArg2>(arg2),
-                  std::forward<An>(args)...) {
-    static_assert(sizeof(*this) == sizeof(MockClass),
-                  "The impl subclass shouldn't introduce any padding");
-  }
-
- private:
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(NiceMock);
-};
-
-template <class MockClass>
-class GTEST_INTERNAL_EMPTY_BASE_CLASS NaggyMock
-    : private internal::NaggyMockImpl<MockClass>,
-      public MockClass {
-  static_assert(!internal::HasStrictnessModifier<MockClass>(),
-                "Can't apply NaggyMock to a class hierarchy that already has a "
-                "strictness modifier. See "
-                "https://google.github.io/googletest/"
-                "gmock_cook_book.html#NiceStrictNaggy");
-
- public:
-  NaggyMock() : MockClass() {
-    static_assert(sizeof(*this) == sizeof(MockClass),
-                  "The impl subclass shouldn't introduce any padding");
-  }
-
-  // Ideally, we would inherit base class's constructors through a using
-  // declaration, which would preserve their visibility. However, many existing
-  // tests rely on the fact that current implementation reexports protected
-  // constructors as public. These tests would need to be cleaned up first.
-
-  // Single argument constructor is special-cased so that it can be
-  // made explicit.
-  template <typename A>
-  explicit NaggyMock(A&& arg) : MockClass(std::forward<A>(arg)) {
-    static_assert(sizeof(*this) == sizeof(MockClass),
-                  "The impl subclass shouldn't introduce any padding");
-  }
-
-  template <typename TArg1, typename TArg2, typename... An>
-  NaggyMock(TArg1&& arg1, TArg2&& arg2, An&&... args)
-      : MockClass(std::forward<TArg1>(arg1), std::forward<TArg2>(arg2),
-                  std::forward<An>(args)...) {
-    static_assert(sizeof(*this) == sizeof(MockClass),
-                  "The impl subclass shouldn't introduce any padding");
-  }
-
- private:
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(NaggyMock);
-};
-
-template <class MockClass>
-class GTEST_INTERNAL_EMPTY_BASE_CLASS StrictMock
-    : private internal::StrictMockImpl<MockClass>,
-      public MockClass {
- public:
-  static_assert(
-      !internal::HasStrictnessModifier<MockClass>(),
-      "Can't apply StrictMock to a class hierarchy that already has a "
-      "strictness modifier. See "
-      "https://google.github.io/googletest/"
-      "gmock_cook_book.html#NiceStrictNaggy");
-  StrictMock() : MockClass() {
-    static_assert(sizeof(*this) == sizeof(MockClass),
-                  "The impl subclass shouldn't introduce any padding");
-  }
-
-  // Ideally, we would inherit base class's constructors through a using
-  // declaration, which would preserve their visibility. However, many existing
-  // tests rely on the fact that current implementation reexports protected
-  // constructors as public. These tests would need to be cleaned up first.
-
-  // Single argument constructor is special-cased so that it can be
-  // made explicit.
-  template <typename A>
-  explicit StrictMock(A&& arg) : MockClass(std::forward<A>(arg)) {
-    static_assert(sizeof(*this) == sizeof(MockClass),
-                  "The impl subclass shouldn't introduce any padding");
-  }
-
-  template <typename TArg1, typename TArg2, typename... An>
-  StrictMock(TArg1&& arg1, TArg2&& arg2, An&&... args)
-      : MockClass(std::forward<TArg1>(arg1), std::forward<TArg2>(arg2),
-                  std::forward<An>(args)...) {
-    static_assert(sizeof(*this) == sizeof(MockClass),
-                  "The impl subclass shouldn't introduce any padding");
-  }
-
- private:
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(StrictMock);
-};
-
-#undef GTEST_INTERNAL_EMPTY_BASE_CLASS
-
-}  // namespace testing
-
-#endif  // GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_NICE_STRICT_H_
diff --git a/src/include/gromacs/external/googletest/googlemock/include/gmock/gmock-spec-builders.h b/src/include/gromacs/external/googletest/googlemock/include/gmock/gmock-spec-builders.h
deleted file mode 100644 (file)
index b46cebe..0000000
+++ /dev/null
@@ -1,2036 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file implements the ON_CALL() and EXPECT_CALL() macros.
-//
-// A user can use the ON_CALL() macro to specify the default action of
-// a mock method.  The syntax is:
-//
-//   ON_CALL(mock_object, Method(argument-matchers))
-//       .With(multi-argument-matcher)
-//       .WillByDefault(action);
-//
-//  where the .With() clause is optional.
-//
-// A user can use the EXPECT_CALL() macro to specify an expectation on
-// a mock method.  The syntax is:
-//
-//   EXPECT_CALL(mock_object, Method(argument-matchers))
-//       .With(multi-argument-matchers)
-//       .Times(cardinality)
-//       .InSequence(sequences)
-//       .After(expectations)
-//       .WillOnce(action)
-//       .WillRepeatedly(action)
-//       .RetiresOnSaturation();
-//
-// where all clauses are optional, and .InSequence()/.After()/
-// .WillOnce() can appear any number of times.
-
-#ifndef GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_SPEC_BUILDERS_H_
-#define GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_SPEC_BUILDERS_H_
-
-#include <functional>
-#include <map>
-#include <memory>
-#include <set>
-#include <sstream>
-#include <string>
-#include <type_traits>
-#include <utility>
-#include <vector>
-#include "gmock/gmock-actions.h"
-#include "gmock/gmock-cardinalities.h"
-#include "gmock/gmock-matchers.h"
-#include "gmock/internal/gmock-internal-utils.h"
-#include "gmock/internal/gmock-port.h"
-#include "gtest/gtest.h"
-
-#if GTEST_HAS_EXCEPTIONS
-# include <stdexcept>  // NOLINT
-#endif
-
-GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \
-/* class A needs to have dll-interface to be used by clients of class B */)
-
-namespace testing {
-
-// An abstract handle of an expectation.
-class Expectation;
-
-// A set of expectation handles.
-class ExpectationSet;
-
-// Anything inside the 'internal' namespace IS INTERNAL IMPLEMENTATION
-// and MUST NOT BE USED IN USER CODE!!!
-namespace internal {
-
-// Implements a mock function.
-template <typename F> class FunctionMocker;
-
-// Base class for expectations.
-class ExpectationBase;
-
-// Implements an expectation.
-template <typename F> class TypedExpectation;
-
-// Helper class for testing the Expectation class template.
-class ExpectationTester;
-
-// Helper classes for implementing NiceMock, StrictMock, and NaggyMock.
-template <typename MockClass>
-class NiceMockImpl;
-template <typename MockClass>
-class StrictMockImpl;
-template <typename MockClass>
-class NaggyMockImpl;
-
-// Protects the mock object registry (in class Mock), all function
-// mockers, and all expectations.
-//
-// The reason we don't use more fine-grained protection is: when a
-// mock function Foo() is called, it needs to consult its expectations
-// to see which one should be picked.  If another thread is allowed to
-// call a mock function (either Foo() or a different one) at the same
-// time, it could affect the "retired" attributes of Foo()'s
-// expectations when InSequence() is used, and thus affect which
-// expectation gets picked.  Therefore, we sequence all mock function
-// calls to ensure the integrity of the mock objects' states.
-GTEST_API_ GTEST_DECLARE_STATIC_MUTEX_(g_gmock_mutex);
-
-// Untyped base class for ActionResultHolder<R>.
-class UntypedActionResultHolderBase;
-
-// Abstract base class of FunctionMocker.  This is the
-// type-agnostic part of the function mocker interface.  Its pure
-// virtual methods are implemented by FunctionMocker.
-class GTEST_API_ UntypedFunctionMockerBase {
- public:
-  UntypedFunctionMockerBase();
-  virtual ~UntypedFunctionMockerBase();
-
-  // Verifies that all expectations on this mock function have been
-  // satisfied.  Reports one or more Google Test non-fatal failures
-  // and returns false if not.
-  bool VerifyAndClearExpectationsLocked()
-      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex);
-
-  // Clears the ON_CALL()s set on this mock function.
-  virtual void ClearDefaultActionsLocked()
-      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) = 0;
-
-  // In all of the following Untyped* functions, it's the caller's
-  // responsibility to guarantee the correctness of the arguments'
-  // types.
-
-  // Performs the default action with the given arguments and returns
-  // the action's result.  The call description string will be used in
-  // the error message to describe the call in the case the default
-  // action fails.
-  // L = *
-  virtual UntypedActionResultHolderBase* UntypedPerformDefaultAction(
-      void* untyped_args, const std::string& call_description) const = 0;
-
-  // Performs the given action with the given arguments and returns
-  // the action's result.
-  // L = *
-  virtual UntypedActionResultHolderBase* UntypedPerformAction(
-      const void* untyped_action, void* untyped_args) const = 0;
-
-  // Writes a message that the call is uninteresting (i.e. neither
-  // explicitly expected nor explicitly unexpected) to the given
-  // ostream.
-  virtual void UntypedDescribeUninterestingCall(
-      const void* untyped_args,
-      ::std::ostream* os) const
-          GTEST_LOCK_EXCLUDED_(g_gmock_mutex) = 0;
-
-  // Returns the expectation that matches the given function arguments
-  // (or NULL is there's no match); when a match is found,
-  // untyped_action is set to point to the action that should be
-  // performed (or NULL if the action is "do default"), and
-  // is_excessive is modified to indicate whether the call exceeds the
-  // expected number.
-  virtual const ExpectationBase* UntypedFindMatchingExpectation(
-      const void* untyped_args,
-      const void** untyped_action, bool* is_excessive,
-      ::std::ostream* what, ::std::ostream* why)
-          GTEST_LOCK_EXCLUDED_(g_gmock_mutex) = 0;
-
-  // Prints the given function arguments to the ostream.
-  virtual void UntypedPrintArgs(const void* untyped_args,
-                                ::std::ostream* os) const = 0;
-
-  // Sets the mock object this mock method belongs to, and registers
-  // this information in the global mock registry.  Will be called
-  // whenever an EXPECT_CALL() or ON_CALL() is executed on this mock
-  // method.
-  void RegisterOwner(const void* mock_obj)
-      GTEST_LOCK_EXCLUDED_(g_gmock_mutex);
-
-  // Sets the mock object this mock method belongs to, and sets the
-  // name of the mock function.  Will be called upon each invocation
-  // of this mock function.
-  void SetOwnerAndName(const void* mock_obj, const char* name)
-      GTEST_LOCK_EXCLUDED_(g_gmock_mutex);
-
-  // Returns the mock object this mock method belongs to.  Must be
-  // called after RegisterOwner() or SetOwnerAndName() has been
-  // called.
-  const void* MockObject() const
-      GTEST_LOCK_EXCLUDED_(g_gmock_mutex);
-
-  // Returns the name of this mock method.  Must be called after
-  // SetOwnerAndName() has been called.
-  const char* Name() const
-      GTEST_LOCK_EXCLUDED_(g_gmock_mutex);
-
-  // Returns the result of invoking this mock function with the given
-  // arguments.  This function can be safely called from multiple
-  // threads concurrently.  The caller is responsible for deleting the
-  // result.
-  UntypedActionResultHolderBase* UntypedInvokeWith(void* untyped_args)
-      GTEST_LOCK_EXCLUDED_(g_gmock_mutex);
-
- protected:
-  typedef std::vector<const void*> UntypedOnCallSpecs;
-
-  using UntypedExpectations = std::vector<std::shared_ptr<ExpectationBase>>;
-
-  // Returns an Expectation object that references and co-owns exp,
-  // which must be an expectation on this mock function.
-  Expectation GetHandleOf(ExpectationBase* exp);
-
-  // Address of the mock object this mock method belongs to.  Only
-  // valid after this mock method has been called or
-  // ON_CALL/EXPECT_CALL has been invoked on it.
-  const void* mock_obj_;  // Protected by g_gmock_mutex.
-
-  // Name of the function being mocked.  Only valid after this mock
-  // method has been called.
-  const char* name_;  // Protected by g_gmock_mutex.
-
-  // All default action specs for this function mocker.
-  UntypedOnCallSpecs untyped_on_call_specs_;
-
-  // All expectations for this function mocker.
-  //
-  // It's undefined behavior to interleave expectations (EXPECT_CALLs
-  // or ON_CALLs) and mock function calls.  Also, the order of
-  // expectations is important.  Therefore it's a logic race condition
-  // to read/write untyped_expectations_ concurrently.  In order for
-  // tools like tsan to catch concurrent read/write accesses to
-  // untyped_expectations, we deliberately leave accesses to it
-  // unprotected.
-  UntypedExpectations untyped_expectations_;
-};  // class UntypedFunctionMockerBase
-
-// Untyped base class for OnCallSpec<F>.
-class UntypedOnCallSpecBase {
- public:
-  // The arguments are the location of the ON_CALL() statement.
-  UntypedOnCallSpecBase(const char* a_file, int a_line)
-      : file_(a_file), line_(a_line), last_clause_(kNone) {}
-
-  // Where in the source file was the default action spec defined?
-  const char* file() const { return file_; }
-  int line() const { return line_; }
-
- protected:
-  // Gives each clause in the ON_CALL() statement a name.
-  enum Clause {
-    // Do not change the order of the enum members!  The run-time
-    // syntax checking relies on it.
-    kNone,
-    kWith,
-    kWillByDefault
-  };
-
-  // Asserts that the ON_CALL() statement has a certain property.
-  void AssertSpecProperty(bool property,
-                          const std::string& failure_message) const {
-    Assert(property, file_, line_, failure_message);
-  }
-
-  // Expects that the ON_CALL() statement has a certain property.
-  void ExpectSpecProperty(bool property,
-                          const std::string& failure_message) const {
-    Expect(property, file_, line_, failure_message);
-  }
-
-  const char* file_;
-  int line_;
-
-  // The last clause in the ON_CALL() statement as seen so far.
-  // Initially kNone and changes as the statement is parsed.
-  Clause last_clause_;
-};  // class UntypedOnCallSpecBase
-
-// This template class implements an ON_CALL spec.
-template <typename F>
-class OnCallSpec : public UntypedOnCallSpecBase {
- public:
-  typedef typename Function<F>::ArgumentTuple ArgumentTuple;
-  typedef typename Function<F>::ArgumentMatcherTuple ArgumentMatcherTuple;
-
-  // Constructs an OnCallSpec object from the information inside
-  // the parenthesis of an ON_CALL() statement.
-  OnCallSpec(const char* a_file, int a_line,
-             const ArgumentMatcherTuple& matchers)
-      : UntypedOnCallSpecBase(a_file, a_line),
-        matchers_(matchers),
-        // By default, extra_matcher_ should match anything.  However,
-        // we cannot initialize it with _ as that causes ambiguity between
-        // Matcher's copy and move constructor for some argument types.
-        extra_matcher_(A<const ArgumentTuple&>()) {}
-
-  // Implements the .With() clause.
-  OnCallSpec& With(const Matcher<const ArgumentTuple&>& m) {
-    // Makes sure this is called at most once.
-    ExpectSpecProperty(last_clause_ < kWith,
-                       ".With() cannot appear "
-                       "more than once in an ON_CALL().");
-    last_clause_ = kWith;
-
-    extra_matcher_ = m;
-    return *this;
-  }
-
-  // Implements the .WillByDefault() clause.
-  OnCallSpec& WillByDefault(const Action<F>& action) {
-    ExpectSpecProperty(last_clause_ < kWillByDefault,
-                       ".WillByDefault() must appear "
-                       "exactly once in an ON_CALL().");
-    last_clause_ = kWillByDefault;
-
-    ExpectSpecProperty(!action.IsDoDefault(),
-                       "DoDefault() cannot be used in ON_CALL().");
-    action_ = action;
-    return *this;
-  }
-
-  // Returns true if and only if the given arguments match the matchers.
-  bool Matches(const ArgumentTuple& args) const {
-    return TupleMatches(matchers_, args) && extra_matcher_.Matches(args);
-  }
-
-  // Returns the action specified by the user.
-  const Action<F>& GetAction() const {
-    AssertSpecProperty(last_clause_ == kWillByDefault,
-                       ".WillByDefault() must appear exactly "
-                       "once in an ON_CALL().");
-    return action_;
-  }
-
- private:
-  // The information in statement
-  //
-  //   ON_CALL(mock_object, Method(matchers))
-  //       .With(multi-argument-matcher)
-  //       .WillByDefault(action);
-  //
-  // is recorded in the data members like this:
-  //
-  //   source file that contains the statement => file_
-  //   line number of the statement            => line_
-  //   matchers                                => matchers_
-  //   multi-argument-matcher                  => extra_matcher_
-  //   action                                  => action_
-  ArgumentMatcherTuple matchers_;
-  Matcher<const ArgumentTuple&> extra_matcher_;
-  Action<F> action_;
-};  // class OnCallSpec
-
-// Possible reactions on uninteresting calls.
-enum CallReaction {
-  kAllow,
-  kWarn,
-  kFail,
-};
-
-}  // namespace internal
-
-// Utilities for manipulating mock objects.
-class GTEST_API_ Mock {
- public:
-  // The following public methods can be called concurrently.
-
-  // Tells Google Mock to ignore mock_obj when checking for leaked
-  // mock objects.
-  static void AllowLeak(const void* mock_obj)
-      GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex);
-
-  // Verifies and clears all expectations on the given mock object.
-  // If the expectations aren't satisfied, generates one or more
-  // Google Test non-fatal failures and returns false.
-  static bool VerifyAndClearExpectations(void* mock_obj)
-      GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex);
-
-  // Verifies all expectations on the given mock object and clears its
-  // default actions and expectations.  Returns true if and only if the
-  // verification was successful.
-  static bool VerifyAndClear(void* mock_obj)
-      GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex);
-
-  // Returns whether the mock was created as a naggy mock (default)
-  static bool IsNaggy(void* mock_obj)
-      GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex);
-  // Returns whether the mock was created as a nice mock
-  static bool IsNice(void* mock_obj)
-      GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex);
-  // Returns whether the mock was created as a strict mock
-  static bool IsStrict(void* mock_obj)
-      GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex);
-
- private:
-  friend class internal::UntypedFunctionMockerBase;
-
-  // Needed for a function mocker to register itself (so that we know
-  // how to clear a mock object).
-  template <typename F>
-  friend class internal::FunctionMocker;
-
-  template <typename MockClass>
-  friend class internal::NiceMockImpl;
-  template <typename MockClass>
-  friend class internal::NaggyMockImpl;
-  template <typename MockClass>
-  friend class internal::StrictMockImpl;
-
-  // Tells Google Mock to allow uninteresting calls on the given mock
-  // object.
-  static void AllowUninterestingCalls(const void* mock_obj)
-      GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex);
-
-  // Tells Google Mock to warn the user about uninteresting calls on
-  // the given mock object.
-  static void WarnUninterestingCalls(const void* mock_obj)
-      GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex);
-
-  // Tells Google Mock to fail uninteresting calls on the given mock
-  // object.
-  static void FailUninterestingCalls(const void* mock_obj)
-      GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex);
-
-  // Tells Google Mock the given mock object is being destroyed and
-  // its entry in the call-reaction table should be removed.
-  static void UnregisterCallReaction(const void* mock_obj)
-      GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex);
-
-  // Returns the reaction Google Mock will have on uninteresting calls
-  // made on the given mock object.
-  static internal::CallReaction GetReactionOnUninterestingCalls(
-      const void* mock_obj)
-          GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex);
-
-  // Verifies that all expectations on the given mock object have been
-  // satisfied.  Reports one or more Google Test non-fatal failures
-  // and returns false if not.
-  static bool VerifyAndClearExpectationsLocked(void* mock_obj)
-      GTEST_EXCLUSIVE_LOCK_REQUIRED_(internal::g_gmock_mutex);
-
-  // Clears all ON_CALL()s set on the given mock object.
-  static void ClearDefaultActionsLocked(void* mock_obj)
-      GTEST_EXCLUSIVE_LOCK_REQUIRED_(internal::g_gmock_mutex);
-
-  // Registers a mock object and a mock method it owns.
-  static void Register(
-      const void* mock_obj,
-      internal::UntypedFunctionMockerBase* mocker)
-          GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex);
-
-  // Tells Google Mock where in the source code mock_obj is used in an
-  // ON_CALL or EXPECT_CALL.  In case mock_obj is leaked, this
-  // information helps the user identify which object it is.
-  static void RegisterUseByOnCallOrExpectCall(
-      const void* mock_obj, const char* file, int line)
-          GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex);
-
-  // Unregisters a mock method; removes the owning mock object from
-  // the registry when the last mock method associated with it has
-  // been unregistered.  This is called only in the destructor of
-  // FunctionMocker.
-  static void UnregisterLocked(internal::UntypedFunctionMockerBase* mocker)
-      GTEST_EXCLUSIVE_LOCK_REQUIRED_(internal::g_gmock_mutex);
-};  // class Mock
-
-// An abstract handle of an expectation.  Useful in the .After()
-// clause of EXPECT_CALL() for setting the (partial) order of
-// expectations.  The syntax:
-//
-//   Expectation e1 = EXPECT_CALL(...)...;
-//   EXPECT_CALL(...).After(e1)...;
-//
-// sets two expectations where the latter can only be matched after
-// the former has been satisfied.
-//
-// Notes:
-//   - This class is copyable and has value semantics.
-//   - Constness is shallow: a const Expectation object itself cannot
-//     be modified, but the mutable methods of the ExpectationBase
-//     object it references can be called via expectation_base().
-
-class GTEST_API_ Expectation {
- public:
-  // Constructs a null object that doesn't reference any expectation.
-  Expectation();
-  Expectation(Expectation&&) = default;
-  Expectation(const Expectation&) = default;
-  Expectation& operator=(Expectation&&) = default;
-  Expectation& operator=(const Expectation&) = default;
-  ~Expectation();
-
-  // This single-argument ctor must not be explicit, in order to support the
-  //   Expectation e = EXPECT_CALL(...);
-  // syntax.
-  //
-  // A TypedExpectation object stores its pre-requisites as
-  // Expectation objects, and needs to call the non-const Retire()
-  // method on the ExpectationBase objects they reference.  Therefore
-  // Expectation must receive a *non-const* reference to the
-  // ExpectationBase object.
-  Expectation(internal::ExpectationBase& exp);  // NOLINT
-
-  // The compiler-generated copy ctor and operator= work exactly as
-  // intended, so we don't need to define our own.
-
-  // Returns true if and only if rhs references the same expectation as this
-  // object does.
-  bool operator==(const Expectation& rhs) const {
-    return expectation_base_ == rhs.expectation_base_;
-  }
-
-  bool operator!=(const Expectation& rhs) const { return !(*this == rhs); }
-
- private:
-  friend class ExpectationSet;
-  friend class Sequence;
-  friend class ::testing::internal::ExpectationBase;
-  friend class ::testing::internal::UntypedFunctionMockerBase;
-
-  template <typename F>
-  friend class ::testing::internal::FunctionMocker;
-
-  template <typename F>
-  friend class ::testing::internal::TypedExpectation;
-
-  // This comparator is needed for putting Expectation objects into a set.
-  class Less {
-   public:
-    bool operator()(const Expectation& lhs, const Expectation& rhs) const {
-      return lhs.expectation_base_.get() < rhs.expectation_base_.get();
-    }
-  };
-
-  typedef ::std::set<Expectation, Less> Set;
-
-  Expectation(
-      const std::shared_ptr<internal::ExpectationBase>& expectation_base);
-
-  // Returns the expectation this object references.
-  const std::shared_ptr<internal::ExpectationBase>& expectation_base() const {
-    return expectation_base_;
-  }
-
-  // A shared_ptr that co-owns the expectation this handle references.
-  std::shared_ptr<internal::ExpectationBase> expectation_base_;
-};
-
-// A set of expectation handles.  Useful in the .After() clause of
-// EXPECT_CALL() for setting the (partial) order of expectations.  The
-// syntax:
-//
-//   ExpectationSet es;
-//   es += EXPECT_CALL(...)...;
-//   es += EXPECT_CALL(...)...;
-//   EXPECT_CALL(...).After(es)...;
-//
-// sets three expectations where the last one can only be matched
-// after the first two have both been satisfied.
-//
-// This class is copyable and has value semantics.
-class ExpectationSet {
- public:
-  // A bidirectional iterator that can read a const element in the set.
-  typedef Expectation::Set::const_iterator const_iterator;
-
-  // An object stored in the set.  This is an alias of Expectation.
-  typedef Expectation::Set::value_type value_type;
-
-  // Constructs an empty set.
-  ExpectationSet() {}
-
-  // This single-argument ctor must not be explicit, in order to support the
-  //   ExpectationSet es = EXPECT_CALL(...);
-  // syntax.
-  ExpectationSet(internal::ExpectationBase& exp) {  // NOLINT
-    *this += Expectation(exp);
-  }
-
-  // This single-argument ctor implements implicit conversion from
-  // Expectation and thus must not be explicit.  This allows either an
-  // Expectation or an ExpectationSet to be used in .After().
-  ExpectationSet(const Expectation& e) {  // NOLINT
-    *this += e;
-  }
-
-  // The compiler-generator ctor and operator= works exactly as
-  // intended, so we don't need to define our own.
-
-  // Returns true if and only if rhs contains the same set of Expectation
-  // objects as this does.
-  bool operator==(const ExpectationSet& rhs) const {
-    return expectations_ == rhs.expectations_;
-  }
-
-  bool operator!=(const ExpectationSet& rhs) const { return !(*this == rhs); }
-
-  // Implements the syntax
-  //   expectation_set += EXPECT_CALL(...);
-  ExpectationSet& operator+=(const Expectation& e) {
-    expectations_.insert(e);
-    return *this;
-  }
-
-  int size() const { return static_cast<int>(expectations_.size()); }
-
-  const_iterator begin() const { return expectations_.begin(); }
-  const_iterator end() const { return expectations_.end(); }
-
- private:
-  Expectation::Set expectations_;
-};
-
-
-// Sequence objects are used by a user to specify the relative order
-// in which the expectations should match.  They are copyable (we rely
-// on the compiler-defined copy constructor and assignment operator).
-class GTEST_API_ Sequence {
- public:
-  // Constructs an empty sequence.
-  Sequence() : last_expectation_(new Expectation) {}
-
-  // Adds an expectation to this sequence.  The caller must ensure
-  // that no other thread is accessing this Sequence object.
-  void AddExpectation(const Expectation& expectation) const;
-
- private:
-  // The last expectation in this sequence.
-  std::shared_ptr<Expectation> last_expectation_;
-};  // class Sequence
-
-// An object of this type causes all EXPECT_CALL() statements
-// encountered in its scope to be put in an anonymous sequence.  The
-// work is done in the constructor and destructor.  You should only
-// create an InSequence object on the stack.
-//
-// The sole purpose for this class is to support easy definition of
-// sequential expectations, e.g.
-//
-//   {
-//     InSequence dummy;  // The name of the object doesn't matter.
-//
-//     // The following expectations must match in the order they appear.
-//     EXPECT_CALL(a, Bar())...;
-//     EXPECT_CALL(a, Baz())...;
-//     ...
-//     EXPECT_CALL(b, Xyz())...;
-//   }
-//
-// You can create InSequence objects in multiple threads, as long as
-// they are used to affect different mock objects.  The idea is that
-// each thread can create and set up its own mocks as if it's the only
-// thread.  However, for clarity of your tests we recommend you to set
-// up mocks in the main thread unless you have a good reason not to do
-// so.
-class GTEST_API_ InSequence {
- public:
-  InSequence();
-  ~InSequence();
- private:
-  bool sequence_created_;
-
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(InSequence);  // NOLINT
-} GTEST_ATTRIBUTE_UNUSED_;
-
-namespace internal {
-
-// Points to the implicit sequence introduced by a living InSequence
-// object (if any) in the current thread or NULL.
-GTEST_API_ extern ThreadLocal<Sequence*> g_gmock_implicit_sequence;
-
-// Base class for implementing expectations.
-//
-// There are two reasons for having a type-agnostic base class for
-// Expectation:
-//
-//   1. We need to store collections of expectations of different
-//   types (e.g. all pre-requisites of a particular expectation, all
-//   expectations in a sequence).  Therefore these expectation objects
-//   must share a common base class.
-//
-//   2. We can avoid binary code bloat by moving methods not depending
-//   on the template argument of Expectation to the base class.
-//
-// This class is internal and mustn't be used by user code directly.
-class GTEST_API_ ExpectationBase {
- public:
-  // source_text is the EXPECT_CALL(...) source that created this Expectation.
-  ExpectationBase(const char* file, int line, const std::string& source_text);
-
-  virtual ~ExpectationBase();
-
-  // Where in the source file was the expectation spec defined?
-  const char* file() const { return file_; }
-  int line() const { return line_; }
-  const char* source_text() const { return source_text_.c_str(); }
-  // Returns the cardinality specified in the expectation spec.
-  const Cardinality& cardinality() const { return cardinality_; }
-
-  // Describes the source file location of this expectation.
-  void DescribeLocationTo(::std::ostream* os) const {
-    *os << FormatFileLocation(file(), line()) << " ";
-  }
-
-  // Describes how many times a function call matching this
-  // expectation has occurred.
-  void DescribeCallCountTo(::std::ostream* os) const
-      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex);
-
-  // If this mock method has an extra matcher (i.e. .With(matcher)),
-  // describes it to the ostream.
-  virtual void MaybeDescribeExtraMatcherTo(::std::ostream* os) = 0;
-
- protected:
-  friend class ::testing::Expectation;
-  friend class UntypedFunctionMockerBase;
-
-  enum Clause {
-    // Don't change the order of the enum members!
-    kNone,
-    kWith,
-    kTimes,
-    kInSequence,
-    kAfter,
-    kWillOnce,
-    kWillRepeatedly,
-    kRetiresOnSaturation
-  };
-
-  typedef std::vector<const void*> UntypedActions;
-
-  // Returns an Expectation object that references and co-owns this
-  // expectation.
-  virtual Expectation GetHandle() = 0;
-
-  // Asserts that the EXPECT_CALL() statement has the given property.
-  void AssertSpecProperty(bool property,
-                          const std::string& failure_message) const {
-    Assert(property, file_, line_, failure_message);
-  }
-
-  // Expects that the EXPECT_CALL() statement has the given property.
-  void ExpectSpecProperty(bool property,
-                          const std::string& failure_message) const {
-    Expect(property, file_, line_, failure_message);
-  }
-
-  // Explicitly specifies the cardinality of this expectation.  Used
-  // by the subclasses to implement the .Times() clause.
-  void SpecifyCardinality(const Cardinality& cardinality);
-
-  // Returns true if and only if the user specified the cardinality
-  // explicitly using a .Times().
-  bool cardinality_specified() const { return cardinality_specified_; }
-
-  // Sets the cardinality of this expectation spec.
-  void set_cardinality(const Cardinality& a_cardinality) {
-    cardinality_ = a_cardinality;
-  }
-
-  // The following group of methods should only be called after the
-  // EXPECT_CALL() statement, and only when g_gmock_mutex is held by
-  // the current thread.
-
-  // Retires all pre-requisites of this expectation.
-  void RetireAllPreRequisites()
-      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex);
-
-  // Returns true if and only if this expectation is retired.
-  bool is_retired() const
-      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {
-    g_gmock_mutex.AssertHeld();
-    return retired_;
-  }
-
-  // Retires this expectation.
-  void Retire()
-      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {
-    g_gmock_mutex.AssertHeld();
-    retired_ = true;
-  }
-
-  // Returns true if and only if this expectation is satisfied.
-  bool IsSatisfied() const
-      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {
-    g_gmock_mutex.AssertHeld();
-    return cardinality().IsSatisfiedByCallCount(call_count_);
-  }
-
-  // Returns true if and only if this expectation is saturated.
-  bool IsSaturated() const
-      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {
-    g_gmock_mutex.AssertHeld();
-    return cardinality().IsSaturatedByCallCount(call_count_);
-  }
-
-  // Returns true if and only if this expectation is over-saturated.
-  bool IsOverSaturated() const
-      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {
-    g_gmock_mutex.AssertHeld();
-    return cardinality().IsOverSaturatedByCallCount(call_count_);
-  }
-
-  // Returns true if and only if all pre-requisites of this expectation are
-  // satisfied.
-  bool AllPrerequisitesAreSatisfied() const
-      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex);
-
-  // Adds unsatisfied pre-requisites of this expectation to 'result'.
-  void FindUnsatisfiedPrerequisites(ExpectationSet* result) const
-      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex);
-
-  // Returns the number this expectation has been invoked.
-  int call_count() const
-      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {
-    g_gmock_mutex.AssertHeld();
-    return call_count_;
-  }
-
-  // Increments the number this expectation has been invoked.
-  void IncrementCallCount()
-      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {
-    g_gmock_mutex.AssertHeld();
-    call_count_++;
-  }
-
-  // Checks the action count (i.e. the number of WillOnce() and
-  // WillRepeatedly() clauses) against the cardinality if this hasn't
-  // been done before.  Prints a warning if there are too many or too
-  // few actions.
-  void CheckActionCountIfNotDone() const
-      GTEST_LOCK_EXCLUDED_(mutex_);
-
-  friend class ::testing::Sequence;
-  friend class ::testing::internal::ExpectationTester;
-
-  template <typename Function>
-  friend class TypedExpectation;
-
-  // Implements the .Times() clause.
-  void UntypedTimes(const Cardinality& a_cardinality);
-
-  // This group of fields are part of the spec and won't change after
-  // an EXPECT_CALL() statement finishes.
-  const char* file_;          // The file that contains the expectation.
-  int line_;                  // The line number of the expectation.
-  const std::string source_text_;  // The EXPECT_CALL(...) source text.
-  // True if and only if the cardinality is specified explicitly.
-  bool cardinality_specified_;
-  Cardinality cardinality_;            // The cardinality of the expectation.
-  // The immediate pre-requisites (i.e. expectations that must be
-  // satisfied before this expectation can be matched) of this
-  // expectation.  We use std::shared_ptr in the set because we want an
-  // Expectation object to be co-owned by its FunctionMocker and its
-  // successors.  This allows multiple mock objects to be deleted at
-  // different times.
-  ExpectationSet immediate_prerequisites_;
-
-  // This group of fields are the current state of the expectation,
-  // and can change as the mock function is called.
-  int call_count_;  // How many times this expectation has been invoked.
-  bool retired_;    // True if and only if this expectation has retired.
-  UntypedActions untyped_actions_;
-  bool extra_matcher_specified_;
-  bool repeated_action_specified_;  // True if a WillRepeatedly() was specified.
-  bool retires_on_saturation_;
-  Clause last_clause_;
-  mutable bool action_count_checked_;  // Under mutex_.
-  mutable Mutex mutex_;  // Protects action_count_checked_.
-};  // class ExpectationBase
-
-// Impements an expectation for the given function type.
-template <typename F>
-class TypedExpectation : public ExpectationBase {
- public:
-  typedef typename Function<F>::ArgumentTuple ArgumentTuple;
-  typedef typename Function<F>::ArgumentMatcherTuple ArgumentMatcherTuple;
-  typedef typename Function<F>::Result Result;
-
-  TypedExpectation(FunctionMocker<F>* owner, const char* a_file, int a_line,
-                   const std::string& a_source_text,
-                   const ArgumentMatcherTuple& m)
-      : ExpectationBase(a_file, a_line, a_source_text),
-        owner_(owner),
-        matchers_(m),
-        // By default, extra_matcher_ should match anything.  However,
-        // we cannot initialize it with _ as that causes ambiguity between
-        // Matcher's copy and move constructor for some argument types.
-        extra_matcher_(A<const ArgumentTuple&>()),
-        repeated_action_(DoDefault()) {}
-
-  ~TypedExpectation() override {
-    // Check the validity of the action count if it hasn't been done
-    // yet (for example, if the expectation was never used).
-    CheckActionCountIfNotDone();
-    for (UntypedActions::const_iterator it = untyped_actions_.begin();
-         it != untyped_actions_.end(); ++it) {
-      delete static_cast<const Action<F>*>(*it);
-    }
-  }
-
-  // Implements the .With() clause.
-  TypedExpectation& With(const Matcher<const ArgumentTuple&>& m) {
-    if (last_clause_ == kWith) {
-      ExpectSpecProperty(false,
-                         ".With() cannot appear "
-                         "more than once in an EXPECT_CALL().");
-    } else {
-      ExpectSpecProperty(last_clause_ < kWith,
-                         ".With() must be the first "
-                         "clause in an EXPECT_CALL().");
-    }
-    last_clause_ = kWith;
-
-    extra_matcher_ = m;
-    extra_matcher_specified_ = true;
-    return *this;
-  }
-
-  // Implements the .Times() clause.
-  TypedExpectation& Times(const Cardinality& a_cardinality) {
-    ExpectationBase::UntypedTimes(a_cardinality);
-    return *this;
-  }
-
-  // Implements the .Times() clause.
-  TypedExpectation& Times(int n) {
-    return Times(Exactly(n));
-  }
-
-  // Implements the .InSequence() clause.
-  TypedExpectation& InSequence(const Sequence& s) {
-    ExpectSpecProperty(last_clause_ <= kInSequence,
-                       ".InSequence() cannot appear after .After(),"
-                       " .WillOnce(), .WillRepeatedly(), or "
-                       ".RetiresOnSaturation().");
-    last_clause_ = kInSequence;
-
-    s.AddExpectation(GetHandle());
-    return *this;
-  }
-  TypedExpectation& InSequence(const Sequence& s1, const Sequence& s2) {
-    return InSequence(s1).InSequence(s2);
-  }
-  TypedExpectation& InSequence(const Sequence& s1, const Sequence& s2,
-                               const Sequence& s3) {
-    return InSequence(s1, s2).InSequence(s3);
-  }
-  TypedExpectation& InSequence(const Sequence& s1, const Sequence& s2,
-                               const Sequence& s3, const Sequence& s4) {
-    return InSequence(s1, s2, s3).InSequence(s4);
-  }
-  TypedExpectation& InSequence(const Sequence& s1, const Sequence& s2,
-                               const Sequence& s3, const Sequence& s4,
-                               const Sequence& s5) {
-    return InSequence(s1, s2, s3, s4).InSequence(s5);
-  }
-
-  // Implements that .After() clause.
-  TypedExpectation& After(const ExpectationSet& s) {
-    ExpectSpecProperty(last_clause_ <= kAfter,
-                       ".After() cannot appear after .WillOnce(),"
-                       " .WillRepeatedly(), or "
-                       ".RetiresOnSaturation().");
-    last_clause_ = kAfter;
-
-    for (ExpectationSet::const_iterator it = s.begin(); it != s.end(); ++it) {
-      immediate_prerequisites_ += *it;
-    }
-    return *this;
-  }
-  TypedExpectation& After(const ExpectationSet& s1, const ExpectationSet& s2) {
-    return After(s1).After(s2);
-  }
-  TypedExpectation& After(const ExpectationSet& s1, const ExpectationSet& s2,
-                          const ExpectationSet& s3) {
-    return After(s1, s2).After(s3);
-  }
-  TypedExpectation& After(const ExpectationSet& s1, const ExpectationSet& s2,
-                          const ExpectationSet& s3, const ExpectationSet& s4) {
-    return After(s1, s2, s3).After(s4);
-  }
-  TypedExpectation& After(const ExpectationSet& s1, const ExpectationSet& s2,
-                          const ExpectationSet& s3, const ExpectationSet& s4,
-                          const ExpectationSet& s5) {
-    return After(s1, s2, s3, s4).After(s5);
-  }
-
-  // Implements the .WillOnce() clause.
-  TypedExpectation& WillOnce(const Action<F>& action) {
-    ExpectSpecProperty(last_clause_ <= kWillOnce,
-                       ".WillOnce() cannot appear after "
-                       ".WillRepeatedly() or .RetiresOnSaturation().");
-    last_clause_ = kWillOnce;
-
-    untyped_actions_.push_back(new Action<F>(action));
-    if (!cardinality_specified()) {
-      set_cardinality(Exactly(static_cast<int>(untyped_actions_.size())));
-    }
-    return *this;
-  }
-
-  // Implements the .WillRepeatedly() clause.
-  TypedExpectation& WillRepeatedly(const Action<F>& action) {
-    if (last_clause_ == kWillRepeatedly) {
-      ExpectSpecProperty(false,
-                         ".WillRepeatedly() cannot appear "
-                         "more than once in an EXPECT_CALL().");
-    } else {
-      ExpectSpecProperty(last_clause_ < kWillRepeatedly,
-                         ".WillRepeatedly() cannot appear "
-                         "after .RetiresOnSaturation().");
-    }
-    last_clause_ = kWillRepeatedly;
-    repeated_action_specified_ = true;
-
-    repeated_action_ = action;
-    if (!cardinality_specified()) {
-      set_cardinality(AtLeast(static_cast<int>(untyped_actions_.size())));
-    }
-
-    // Now that no more action clauses can be specified, we check
-    // whether their count makes sense.
-    CheckActionCountIfNotDone();
-    return *this;
-  }
-
-  // Implements the .RetiresOnSaturation() clause.
-  TypedExpectation& RetiresOnSaturation() {
-    ExpectSpecProperty(last_clause_ < kRetiresOnSaturation,
-                       ".RetiresOnSaturation() cannot appear "
-                       "more than once.");
-    last_clause_ = kRetiresOnSaturation;
-    retires_on_saturation_ = true;
-
-    // Now that no more action clauses can be specified, we check
-    // whether their count makes sense.
-    CheckActionCountIfNotDone();
-    return *this;
-  }
-
-  // Returns the matchers for the arguments as specified inside the
-  // EXPECT_CALL() macro.
-  const ArgumentMatcherTuple& matchers() const {
-    return matchers_;
-  }
-
-  // Returns the matcher specified by the .With() clause.
-  const Matcher<const ArgumentTuple&>& extra_matcher() const {
-    return extra_matcher_;
-  }
-
-  // Returns the action specified by the .WillRepeatedly() clause.
-  const Action<F>& repeated_action() const { return repeated_action_; }
-
-  // If this mock method has an extra matcher (i.e. .With(matcher)),
-  // describes it to the ostream.
-  void MaybeDescribeExtraMatcherTo(::std::ostream* os) override {
-    if (extra_matcher_specified_) {
-      *os << "    Expected args: ";
-      extra_matcher_.DescribeTo(os);
-      *os << "\n";
-    }
-  }
-
- private:
-  template <typename Function>
-  friend class FunctionMocker;
-
-  // Returns an Expectation object that references and co-owns this
-  // expectation.
-  Expectation GetHandle() override { return owner_->GetHandleOf(this); }
-
-  // The following methods will be called only after the EXPECT_CALL()
-  // statement finishes and when the current thread holds
-  // g_gmock_mutex.
-
-  // Returns true if and only if this expectation matches the given arguments.
-  bool Matches(const ArgumentTuple& args) const
-      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {
-    g_gmock_mutex.AssertHeld();
-    return TupleMatches(matchers_, args) && extra_matcher_.Matches(args);
-  }
-
-  // Returns true if and only if this expectation should handle the given
-  // arguments.
-  bool ShouldHandleArguments(const ArgumentTuple& args) const
-      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {
-    g_gmock_mutex.AssertHeld();
-
-    // In case the action count wasn't checked when the expectation
-    // was defined (e.g. if this expectation has no WillRepeatedly()
-    // or RetiresOnSaturation() clause), we check it when the
-    // expectation is used for the first time.
-    CheckActionCountIfNotDone();
-    return !is_retired() && AllPrerequisitesAreSatisfied() && Matches(args);
-  }
-
-  // Describes the result of matching the arguments against this
-  // expectation to the given ostream.
-  void ExplainMatchResultTo(
-      const ArgumentTuple& args,
-      ::std::ostream* os) const
-          GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {
-    g_gmock_mutex.AssertHeld();
-
-    if (is_retired()) {
-      *os << "         Expected: the expectation is active\n"
-          << "           Actual: it is retired\n";
-    } else if (!Matches(args)) {
-      if (!TupleMatches(matchers_, args)) {
-        ExplainMatchFailureTupleTo(matchers_, args, os);
-      }
-      StringMatchResultListener listener;
-      if (!extra_matcher_.MatchAndExplain(args, &listener)) {
-        *os << "    Expected args: ";
-        extra_matcher_.DescribeTo(os);
-        *os << "\n           Actual: don't match";
-
-        internal::PrintIfNotEmpty(listener.str(), os);
-        *os << "\n";
-      }
-    } else if (!AllPrerequisitesAreSatisfied()) {
-      *os << "         Expected: all pre-requisites are satisfied\n"
-          << "           Actual: the following immediate pre-requisites "
-          << "are not satisfied:\n";
-      ExpectationSet unsatisfied_prereqs;
-      FindUnsatisfiedPrerequisites(&unsatisfied_prereqs);
-      int i = 0;
-      for (ExpectationSet::const_iterator it = unsatisfied_prereqs.begin();
-           it != unsatisfied_prereqs.end(); ++it) {
-        it->expectation_base()->DescribeLocationTo(os);
-        *os << "pre-requisite #" << i++ << "\n";
-      }
-      *os << "                   (end of pre-requisites)\n";
-    } else {
-      // This line is here just for completeness' sake.  It will never
-      // be executed as currently the ExplainMatchResultTo() function
-      // is called only when the mock function call does NOT match the
-      // expectation.
-      *os << "The call matches the expectation.\n";
-    }
-  }
-
-  // Returns the action that should be taken for the current invocation.
-  const Action<F>& GetCurrentAction(const FunctionMocker<F>* mocker,
-                                    const ArgumentTuple& args) const
-      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {
-    g_gmock_mutex.AssertHeld();
-    const int count = call_count();
-    Assert(count >= 1, __FILE__, __LINE__,
-           "call_count() is <= 0 when GetCurrentAction() is "
-           "called - this should never happen.");
-
-    const int action_count = static_cast<int>(untyped_actions_.size());
-    if (action_count > 0 && !repeated_action_specified_ &&
-        count > action_count) {
-      // If there is at least one WillOnce() and no WillRepeatedly(),
-      // we warn the user when the WillOnce() clauses ran out.
-      ::std::stringstream ss;
-      DescribeLocationTo(&ss);
-      ss << "Actions ran out in " << source_text() << "...\n"
-         << "Called " << count << " times, but only "
-         << action_count << " WillOnce()"
-         << (action_count == 1 ? " is" : "s are") << " specified - ";
-      mocker->DescribeDefaultActionTo(args, &ss);
-      Log(kWarning, ss.str(), 1);
-    }
-
-    return count <= action_count
-               ? *static_cast<const Action<F>*>(
-                     untyped_actions_[static_cast<size_t>(count - 1)])
-               : repeated_action();
-  }
-
-  // Given the arguments of a mock function call, if the call will
-  // over-saturate this expectation, returns the default action;
-  // otherwise, returns the next action in this expectation.  Also
-  // describes *what* happened to 'what', and explains *why* Google
-  // Mock does it to 'why'.  This method is not const as it calls
-  // IncrementCallCount().  A return value of NULL means the default
-  // action.
-  const Action<F>* GetActionForArguments(const FunctionMocker<F>* mocker,
-                                         const ArgumentTuple& args,
-                                         ::std::ostream* what,
-                                         ::std::ostream* why)
-      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {
-    g_gmock_mutex.AssertHeld();
-    if (IsSaturated()) {
-      // We have an excessive call.
-      IncrementCallCount();
-      *what << "Mock function called more times than expected - ";
-      mocker->DescribeDefaultActionTo(args, what);
-      DescribeCallCountTo(why);
-
-      return nullptr;
-    }
-
-    IncrementCallCount();
-    RetireAllPreRequisites();
-
-    if (retires_on_saturation_ && IsSaturated()) {
-      Retire();
-    }
-
-    // Must be done after IncrementCount()!
-    *what << "Mock function call matches " << source_text() <<"...\n";
-    return &(GetCurrentAction(mocker, args));
-  }
-
-  // All the fields below won't change once the EXPECT_CALL()
-  // statement finishes.
-  FunctionMocker<F>* const owner_;
-  ArgumentMatcherTuple matchers_;
-  Matcher<const ArgumentTuple&> extra_matcher_;
-  Action<F> repeated_action_;
-
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(TypedExpectation);
-};  // class TypedExpectation
-
-// A MockSpec object is used by ON_CALL() or EXPECT_CALL() for
-// specifying the default behavior of, or expectation on, a mock
-// function.
-
-// Note: class MockSpec really belongs to the ::testing namespace.
-// However if we define it in ::testing, MSVC will complain when
-// classes in ::testing::internal declare it as a friend class
-// template.  To workaround this compiler bug, we define MockSpec in
-// ::testing::internal and import it into ::testing.
-
-// Logs a message including file and line number information.
-GTEST_API_ void LogWithLocation(testing::internal::LogSeverity severity,
-                                const char* file, int line,
-                                const std::string& message);
-
-template <typename F>
-class MockSpec {
- public:
-  typedef typename internal::Function<F>::ArgumentTuple ArgumentTuple;
-  typedef typename internal::Function<F>::ArgumentMatcherTuple
-      ArgumentMatcherTuple;
-
-  // Constructs a MockSpec object, given the function mocker object
-  // that the spec is associated with.
-  MockSpec(internal::FunctionMocker<F>* function_mocker,
-           const ArgumentMatcherTuple& matchers)
-      : function_mocker_(function_mocker), matchers_(matchers) {}
-
-  // Adds a new default action spec to the function mocker and returns
-  // the newly created spec.
-  internal::OnCallSpec<F>& InternalDefaultActionSetAt(
-      const char* file, int line, const char* obj, const char* call) {
-    LogWithLocation(internal::kInfo, file, line,
-                    std::string("ON_CALL(") + obj + ", " + call + ") invoked");
-    return function_mocker_->AddNewOnCallSpec(file, line, matchers_);
-  }
-
-  // Adds a new expectation spec to the function mocker and returns
-  // the newly created spec.
-  internal::TypedExpectation<F>& InternalExpectedAt(
-      const char* file, int line, const char* obj, const char* call) {
-    const std::string source_text(std::string("EXPECT_CALL(") + obj + ", " +
-                                  call + ")");
-    LogWithLocation(internal::kInfo, file, line, source_text + " invoked");
-    return function_mocker_->AddNewExpectation(
-        file, line, source_text, matchers_);
-  }
-
-  // This operator overload is used to swallow the superfluous parameter list
-  // introduced by the ON/EXPECT_CALL macros. See the macro comments for more
-  // explanation.
-  MockSpec<F>& operator()(const internal::WithoutMatchers&, void* const) {
-    return *this;
-  }
-
- private:
-  template <typename Function>
-  friend class internal::FunctionMocker;
-
-  // The function mocker that owns this spec.
-  internal::FunctionMocker<F>* const function_mocker_;
-  // The argument matchers specified in the spec.
-  ArgumentMatcherTuple matchers_;
-};  // class MockSpec
-
-// Wrapper type for generically holding an ordinary value or lvalue reference.
-// If T is not a reference type, it must be copyable or movable.
-// ReferenceOrValueWrapper<T> is movable, and will also be copyable unless
-// T is a move-only value type (which means that it will always be copyable
-// if the current platform does not support move semantics).
-//
-// The primary template defines handling for values, but function header
-// comments describe the contract for the whole template (including
-// specializations).
-template <typename T>
-class ReferenceOrValueWrapper {
- public:
-  // Constructs a wrapper from the given value/reference.
-  explicit ReferenceOrValueWrapper(T value)
-      : value_(std::move(value)) {
-  }
-
-  // Unwraps and returns the underlying value/reference, exactly as
-  // originally passed. The behavior of calling this more than once on
-  // the same object is unspecified.
-  T Unwrap() { return std::move(value_); }
-
-  // Provides nondestructive access to the underlying value/reference.
-  // Always returns a const reference (more precisely,
-  // const std::add_lvalue_reference<T>::type). The behavior of calling this
-  // after calling Unwrap on the same object is unspecified.
-  const T& Peek() const {
-    return value_;
-  }
-
- private:
-  T value_;
-};
-
-// Specialization for lvalue reference types. See primary template
-// for documentation.
-template <typename T>
-class ReferenceOrValueWrapper<T&> {
- public:
-  // Workaround for debatable pass-by-reference lint warning (c-library-team
-  // policy precludes NOLINT in this context)
-  typedef T& reference;
-  explicit ReferenceOrValueWrapper(reference ref)
-      : value_ptr_(&ref) {}
-  T& Unwrap() { return *value_ptr_; }
-  const T& Peek() const { return *value_ptr_; }
-
- private:
-  T* value_ptr_;
-};
-
-// C++ treats the void type specially.  For example, you cannot define
-// a void-typed variable or pass a void value to a function.
-// ActionResultHolder<T> holds a value of type T, where T must be a
-// copyable type or void (T doesn't need to be default-constructable).
-// It hides the syntactic difference between void and other types, and
-// is used to unify the code for invoking both void-returning and
-// non-void-returning mock functions.
-
-// Untyped base class for ActionResultHolder<T>.
-class UntypedActionResultHolderBase {
- public:
-  virtual ~UntypedActionResultHolderBase() {}
-
-  // Prints the held value as an action's result to os.
-  virtual void PrintAsActionResult(::std::ostream* os) const = 0;
-};
-
-// This generic definition is used when T is not void.
-template <typename T>
-class ActionResultHolder : public UntypedActionResultHolderBase {
- public:
-  // Returns the held value. Must not be called more than once.
-  T Unwrap() {
-    return result_.Unwrap();
-  }
-
-  // Prints the held value as an action's result to os.
-  void PrintAsActionResult(::std::ostream* os) const override {
-    *os << "\n          Returns: ";
-    // T may be a reference type, so we don't use UniversalPrint().
-    UniversalPrinter<T>::Print(result_.Peek(), os);
-  }
-
-  // Performs the given mock function's default action and returns the
-  // result in a new-ed ActionResultHolder.
-  template <typename F>
-  static ActionResultHolder* PerformDefaultAction(
-      const FunctionMocker<F>* func_mocker,
-      typename Function<F>::ArgumentTuple&& args,
-      const std::string& call_description) {
-    return new ActionResultHolder(Wrapper(func_mocker->PerformDefaultAction(
-        std::move(args), call_description)));
-  }
-
-  // Performs the given action and returns the result in a new-ed
-  // ActionResultHolder.
-  template <typename F>
-  static ActionResultHolder* PerformAction(
-      const Action<F>& action, typename Function<F>::ArgumentTuple&& args) {
-    return new ActionResultHolder(
-        Wrapper(action.Perform(std::move(args))));
-  }
-
- private:
-  typedef ReferenceOrValueWrapper<T> Wrapper;
-
-  explicit ActionResultHolder(Wrapper result)
-      : result_(std::move(result)) {
-  }
-
-  Wrapper result_;
-
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(ActionResultHolder);
-};
-
-// Specialization for T = void.
-template <>
-class ActionResultHolder<void> : public UntypedActionResultHolderBase {
- public:
-  void Unwrap() { }
-
-  void PrintAsActionResult(::std::ostream* /* os */) const override {}
-
-  // Performs the given mock function's default action and returns ownership
-  // of an empty ActionResultHolder*.
-  template <typename F>
-  static ActionResultHolder* PerformDefaultAction(
-      const FunctionMocker<F>* func_mocker,
-      typename Function<F>::ArgumentTuple&& args,
-      const std::string& call_description) {
-    func_mocker->PerformDefaultAction(std::move(args), call_description);
-    return new ActionResultHolder;
-  }
-
-  // Performs the given action and returns ownership of an empty
-  // ActionResultHolder*.
-  template <typename F>
-  static ActionResultHolder* PerformAction(
-      const Action<F>& action, typename Function<F>::ArgumentTuple&& args) {
-    action.Perform(std::move(args));
-    return new ActionResultHolder;
-  }
-
- private:
-  ActionResultHolder() {}
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(ActionResultHolder);
-};
-
-template <typename F>
-class FunctionMocker;
-
-template <typename R, typename... Args>
-class FunctionMocker<R(Args...)> final : public UntypedFunctionMockerBase {
-  using F = R(Args...);
-
- public:
-  using Result = R;
-  using ArgumentTuple = std::tuple<Args...>;
-  using ArgumentMatcherTuple = std::tuple<Matcher<Args>...>;
-
-  FunctionMocker() {}
-
-  // There is no generally useful and implementable semantics of
-  // copying a mock object, so copying a mock is usually a user error.
-  // Thus we disallow copying function mockers.  If the user really
-  // wants to copy a mock object, they should implement their own copy
-  // operation, for example:
-  //
-  //   class MockFoo : public Foo {
-  //    public:
-  //     // Defines a copy constructor explicitly.
-  //     MockFoo(const MockFoo& src) {}
-  //     ...
-  //   };
-  FunctionMocker(const FunctionMocker&) = delete;
-  FunctionMocker& operator=(const FunctionMocker&) = delete;
-
-  // The destructor verifies that all expectations on this mock
-  // function have been satisfied.  If not, it will report Google Test
-  // non-fatal failures for the violations.
-  ~FunctionMocker() override GTEST_LOCK_EXCLUDED_(g_gmock_mutex) {
-    MutexLock l(&g_gmock_mutex);
-    VerifyAndClearExpectationsLocked();
-    Mock::UnregisterLocked(this);
-    ClearDefaultActionsLocked();
-  }
-
-  // Returns the ON_CALL spec that matches this mock function with the
-  // given arguments; returns NULL if no matching ON_CALL is found.
-  // L = *
-  const OnCallSpec<F>* FindOnCallSpec(
-      const ArgumentTuple& args) const {
-    for (UntypedOnCallSpecs::const_reverse_iterator it
-             = untyped_on_call_specs_.rbegin();
-         it != untyped_on_call_specs_.rend(); ++it) {
-      const OnCallSpec<F>* spec = static_cast<const OnCallSpec<F>*>(*it);
-      if (spec->Matches(args))
-        return spec;
-    }
-
-    return nullptr;
-  }
-
-  // Performs the default action of this mock function on the given
-  // arguments and returns the result. Asserts (or throws if
-  // exceptions are enabled) with a helpful call descrption if there
-  // is no valid return value. This method doesn't depend on the
-  // mutable state of this object, and thus can be called concurrently
-  // without locking.
-  // L = *
-  Result PerformDefaultAction(ArgumentTuple&& args,
-                              const std::string& call_description) const {
-    const OnCallSpec<F>* const spec =
-        this->FindOnCallSpec(args);
-    if (spec != nullptr) {
-      return spec->GetAction().Perform(std::move(args));
-    }
-    const std::string message =
-        call_description +
-        "\n    The mock function has no default action "
-        "set, and its return type has no default value set.";
-#if GTEST_HAS_EXCEPTIONS
-    if (!DefaultValue<Result>::Exists()) {
-      throw std::runtime_error(message);
-    }
-#else
-    Assert(DefaultValue<Result>::Exists(), "", -1, message);
-#endif
-    return DefaultValue<Result>::Get();
-  }
-
-  // Performs the default action with the given arguments and returns
-  // the action's result.  The call description string will be used in
-  // the error message to describe the call in the case the default
-  // action fails.  The caller is responsible for deleting the result.
-  // L = *
-  UntypedActionResultHolderBase* UntypedPerformDefaultAction(
-      void* untyped_args,  // must point to an ArgumentTuple
-      const std::string& call_description) const override {
-    ArgumentTuple* args = static_cast<ArgumentTuple*>(untyped_args);
-    return ResultHolder::PerformDefaultAction(this, std::move(*args),
-                                              call_description);
-  }
-
-  // Performs the given action with the given arguments and returns
-  // the action's result.  The caller is responsible for deleting the
-  // result.
-  // L = *
-  UntypedActionResultHolderBase* UntypedPerformAction(
-      const void* untyped_action, void* untyped_args) const override {
-    // Make a copy of the action before performing it, in case the
-    // action deletes the mock object (and thus deletes itself).
-    const Action<F> action = *static_cast<const Action<F>*>(untyped_action);
-    ArgumentTuple* args = static_cast<ArgumentTuple*>(untyped_args);
-    return ResultHolder::PerformAction(action, std::move(*args));
-  }
-
-  // Implements UntypedFunctionMockerBase::ClearDefaultActionsLocked():
-  // clears the ON_CALL()s set on this mock function.
-  void ClearDefaultActionsLocked() override
-      GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {
-    g_gmock_mutex.AssertHeld();
-
-    // Deleting our default actions may trigger other mock objects to be
-    // deleted, for example if an action contains a reference counted smart
-    // pointer to that mock object, and that is the last reference. So if we
-    // delete our actions within the context of the global mutex we may deadlock
-    // when this method is called again. Instead, make a copy of the set of
-    // actions to delete, clear our set within the mutex, and then delete the
-    // actions outside of the mutex.
-    UntypedOnCallSpecs specs_to_delete;
-    untyped_on_call_specs_.swap(specs_to_delete);
-
-    g_gmock_mutex.Unlock();
-    for (UntypedOnCallSpecs::const_iterator it =
-             specs_to_delete.begin();
-         it != specs_to_delete.end(); ++it) {
-      delete static_cast<const OnCallSpec<F>*>(*it);
-    }
-
-    // Lock the mutex again, since the caller expects it to be locked when we
-    // return.
-    g_gmock_mutex.Lock();
-  }
-
-  // Returns the result of invoking this mock function with the given
-  // arguments.  This function can be safely called from multiple
-  // threads concurrently.
-  Result Invoke(Args... args) GTEST_LOCK_EXCLUDED_(g_gmock_mutex) {
-    ArgumentTuple tuple(std::forward<Args>(args)...);
-    std::unique_ptr<ResultHolder> holder(DownCast_<ResultHolder*>(
-        this->UntypedInvokeWith(static_cast<void*>(&tuple))));
-    return holder->Unwrap();
-  }
-
-  MockSpec<F> With(Matcher<Args>... m) {
-    return MockSpec<F>(this, ::std::make_tuple(std::move(m)...));
-  }
-
- protected:
-  template <typename Function>
-  friend class MockSpec;
-
-  typedef ActionResultHolder<Result> ResultHolder;
-
-  // Adds and returns a default action spec for this mock function.
-  OnCallSpec<F>& AddNewOnCallSpec(
-      const char* file, int line,
-      const ArgumentMatcherTuple& m)
-          GTEST_LOCK_EXCLUDED_(g_gmock_mutex) {
-    Mock::RegisterUseByOnCallOrExpectCall(MockObject(), file, line);
-    OnCallSpec<F>* const on_call_spec = new OnCallSpec<F>(file, line, m);
-    untyped_on_call_specs_.push_back(on_call_spec);
-    return *on_call_spec;
-  }
-
-  // Adds and returns an expectation spec for this mock function.
-  TypedExpectation<F>& AddNewExpectation(const char* file, int line,
-                                         const std::string& source_text,
-                                         const ArgumentMatcherTuple& m)
-      GTEST_LOCK_EXCLUDED_(g_gmock_mutex) {
-    Mock::RegisterUseByOnCallOrExpectCall(MockObject(), file, line);
-    TypedExpectation<F>* const expectation =
-        new TypedExpectation<F>(this, file, line, source_text, m);
-    const std::shared_ptr<ExpectationBase> untyped_expectation(expectation);
-    // See the definition of untyped_expectations_ for why access to
-    // it is unprotected here.
-    untyped_expectations_.push_back(untyped_expectation);
-
-    // Adds this expectation into the implicit sequence if there is one.
-    Sequence* const implicit_sequence = g_gmock_implicit_sequence.get();
-    if (implicit_sequence != nullptr) {
-      implicit_sequence->AddExpectation(Expectation(untyped_expectation));
-    }
-
-    return *expectation;
-  }
-
- private:
-  template <typename Func> friend class TypedExpectation;
-
-  // Some utilities needed for implementing UntypedInvokeWith().
-
-  // Describes what default action will be performed for the given
-  // arguments.
-  // L = *
-  void DescribeDefaultActionTo(const ArgumentTuple& args,
-                               ::std::ostream* os) const {
-    const OnCallSpec<F>* const spec = FindOnCallSpec(args);
-
-    if (spec == nullptr) {
-      *os << (std::is_void<Result>::value ? "returning directly.\n"
-                                          : "returning default value.\n");
-    } else {
-      *os << "taking default action specified at:\n"
-          << FormatFileLocation(spec->file(), spec->line()) << "\n";
-    }
-  }
-
-  // Writes a message that the call is uninteresting (i.e. neither
-  // explicitly expected nor explicitly unexpected) to the given
-  // ostream.
-  void UntypedDescribeUninterestingCall(const void* untyped_args,
-                                        ::std::ostream* os) const override
-      GTEST_LOCK_EXCLUDED_(g_gmock_mutex) {
-    const ArgumentTuple& args =
-        *static_cast<const ArgumentTuple*>(untyped_args);
-    *os << "Uninteresting mock function call - ";
-    DescribeDefaultActionTo(args, os);
-    *os << "    Function call: " << Name();
-    UniversalPrint(args, os);
-  }
-
-  // Returns the expectation that matches the given function arguments
-  // (or NULL is there's no match); when a match is found,
-  // untyped_action is set to point to the action that should be
-  // performed (or NULL if the action is "do default"), and
-  // is_excessive is modified to indicate whether the call exceeds the
-  // expected number.
-  //
-  // Critical section: We must find the matching expectation and the
-  // corresponding action that needs to be taken in an ATOMIC
-  // transaction.  Otherwise another thread may call this mock
-  // method in the middle and mess up the state.
-  //
-  // However, performing the action has to be left out of the critical
-  // section.  The reason is that we have no control on what the
-  // action does (it can invoke an arbitrary user function or even a
-  // mock function) and excessive locking could cause a dead lock.
-  const ExpectationBase* UntypedFindMatchingExpectation(
-      const void* untyped_args, const void** untyped_action, bool* is_excessive,
-      ::std::ostream* what, ::std::ostream* why) override
-      GTEST_LOCK_EXCLUDED_(g_gmock_mutex) {
-    const ArgumentTuple& args =
-        *static_cast<const ArgumentTuple*>(untyped_args);
-    MutexLock l(&g_gmock_mutex);
-    TypedExpectation<F>* exp = this->FindMatchingExpectationLocked(args);
-    if (exp == nullptr) {  // A match wasn't found.
-      this->FormatUnexpectedCallMessageLocked(args, what, why);
-      return nullptr;
-    }
-
-    // This line must be done before calling GetActionForArguments(),
-    // which will increment the call count for *exp and thus affect
-    // its saturation status.
-    *is_excessive = exp->IsSaturated();
-    const Action<F>* action = exp->GetActionForArguments(this, args, what, why);
-    if (action != nullptr && action->IsDoDefault())
-      action = nullptr;  // Normalize "do default" to NULL.
-    *untyped_action = action;
-    return exp;
-  }
-
-  // Prints the given function arguments to the ostream.
-  void UntypedPrintArgs(const void* untyped_args,
-                        ::std::ostream* os) const override {
-    const ArgumentTuple& args =
-        *static_cast<const ArgumentTuple*>(untyped_args);
-    UniversalPrint(args, os);
-  }
-
-  // Returns the expectation that matches the arguments, or NULL if no
-  // expectation matches them.
-  TypedExpectation<F>* FindMatchingExpectationLocked(
-      const ArgumentTuple& args) const
-          GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {
-    g_gmock_mutex.AssertHeld();
-    // See the definition of untyped_expectations_ for why access to
-    // it is unprotected here.
-    for (typename UntypedExpectations::const_reverse_iterator it =
-             untyped_expectations_.rbegin();
-         it != untyped_expectations_.rend(); ++it) {
-      TypedExpectation<F>* const exp =
-          static_cast<TypedExpectation<F>*>(it->get());
-      if (exp->ShouldHandleArguments(args)) {
-        return exp;
-      }
-    }
-    return nullptr;
-  }
-
-  // Returns a message that the arguments don't match any expectation.
-  void FormatUnexpectedCallMessageLocked(
-      const ArgumentTuple& args,
-      ::std::ostream* os,
-      ::std::ostream* why) const
-          GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {
-    g_gmock_mutex.AssertHeld();
-    *os << "\nUnexpected mock function call - ";
-    DescribeDefaultActionTo(args, os);
-    PrintTriedExpectationsLocked(args, why);
-  }
-
-  // Prints a list of expectations that have been tried against the
-  // current mock function call.
-  void PrintTriedExpectationsLocked(
-      const ArgumentTuple& args,
-      ::std::ostream* why) const
-          GTEST_EXCLUSIVE_LOCK_REQUIRED_(g_gmock_mutex) {
-    g_gmock_mutex.AssertHeld();
-    const size_t count = untyped_expectations_.size();
-    *why << "Google Mock tried the following " << count << " "
-         << (count == 1 ? "expectation, but it didn't match" :
-             "expectations, but none matched")
-         << ":\n";
-    for (size_t i = 0; i < count; i++) {
-      TypedExpectation<F>* const expectation =
-          static_cast<TypedExpectation<F>*>(untyped_expectations_[i].get());
-      *why << "\n";
-      expectation->DescribeLocationTo(why);
-      if (count > 1) {
-        *why << "tried expectation #" << i << ": ";
-      }
-      *why << expectation->source_text() << "...\n";
-      expectation->ExplainMatchResultTo(args, why);
-      expectation->DescribeCallCountTo(why);
-    }
-  }
-};  // class FunctionMocker
-
-// Reports an uninteresting call (whose description is in msg) in the
-// manner specified by 'reaction'.
-void ReportUninterestingCall(CallReaction reaction, const std::string& msg);
-
-}  // namespace internal
-
-namespace internal {
-
-template <typename F>
-class MockFunction;
-
-template <typename R, typename... Args>
-class MockFunction<R(Args...)> {
- public:
-  MockFunction(const MockFunction&) = delete;
-  MockFunction& operator=(const MockFunction&) = delete;
-
-  std::function<R(Args...)> AsStdFunction() {
-    return [this](Args... args) -> R {
-      return this->Call(std::forward<Args>(args)...);
-    };
-  }
-
-  // Implementation detail: the expansion of the MOCK_METHOD macro.
-  R Call(Args... args) {
-    mock_.SetOwnerAndName(this, "Call");
-    return mock_.Invoke(std::forward<Args>(args)...);
-  }
-
-  MockSpec<R(Args...)> gmock_Call(Matcher<Args>... m) {
-    mock_.RegisterOwner(this);
-    return mock_.With(std::move(m)...);
-  }
-
-  MockSpec<R(Args...)> gmock_Call(const WithoutMatchers&, R (*)(Args...)) {
-    return this->gmock_Call(::testing::A<Args>()...);
-  }
-
- protected:
-  MockFunction() = default;
-  ~MockFunction() = default;
-
- private:
-  FunctionMocker<R(Args...)> mock_;
-};
-
-/*
-The SignatureOf<F> struct is a meta-function returning function signature
-corresponding to the provided F argument.
-
-It makes use of MockFunction easier by allowing it to accept more F arguments
-than just function signatures.
-
-Specializations provided here cover a signature type itself and any template
-that can be parameterized with a signature, including std::function and
-boost::function.
-*/
-
-template <typename F, typename = void>
-struct SignatureOf;
-
-template <typename R, typename... Args>
-struct SignatureOf<R(Args...)> {
-  using type = R(Args...);
-};
-
-template <template <typename> class C, typename F>
-struct SignatureOf<C<F>,
-                   typename std::enable_if<std::is_function<F>::value>::type>
-    : SignatureOf<F> {};
-
-template <typename F>
-using SignatureOfT = typename SignatureOf<F>::type;
-
-}  // namespace internal
-
-// A MockFunction<F> type has one mock method whose type is
-// internal::SignatureOfT<F>.  It is useful when you just want your
-// test code to emit some messages and have Google Mock verify the
-// right messages are sent (and perhaps at the right times).  For
-// example, if you are exercising code:
-//
-//   Foo(1);
-//   Foo(2);
-//   Foo(3);
-//
-// and want to verify that Foo(1) and Foo(3) both invoke
-// mock.Bar("a"), but Foo(2) doesn't invoke anything, you can write:
-//
-// TEST(FooTest, InvokesBarCorrectly) {
-//   MyMock mock;
-//   MockFunction<void(string check_point_name)> check;
-//   {
-//     InSequence s;
-//
-//     EXPECT_CALL(mock, Bar("a"));
-//     EXPECT_CALL(check, Call("1"));
-//     EXPECT_CALL(check, Call("2"));
-//     EXPECT_CALL(mock, Bar("a"));
-//   }
-//   Foo(1);
-//   check.Call("1");
-//   Foo(2);
-//   check.Call("2");
-//   Foo(3);
-// }
-//
-// The expectation spec says that the first Bar("a") must happen
-// before check point "1", the second Bar("a") must happen after check
-// point "2", and nothing should happen between the two check
-// points. The explicit check points make it easy to tell which
-// Bar("a") is called by which call to Foo().
-//
-// MockFunction<F> can also be used to exercise code that accepts
-// std::function<internal::SignatureOfT<F>> callbacks. To do so, use
-// AsStdFunction() method to create std::function proxy forwarding to
-// original object's Call. Example:
-//
-// TEST(FooTest, RunsCallbackWithBarArgument) {
-//   MockFunction<int(string)> callback;
-//   EXPECT_CALL(callback, Call("bar")).WillOnce(Return(1));
-//   Foo(callback.AsStdFunction());
-// }
-//
-// The internal::SignatureOfT<F> indirection allows to use other types
-// than just function signature type. This is typically useful when
-// providing a mock for a predefined std::function type. Example:
-//
-// using FilterPredicate = std::function<bool(string)>;
-// void MyFilterAlgorithm(FilterPredicate predicate);
-//
-// TEST(FooTest, FilterPredicateAlwaysAccepts) {
-//   MockFunction<FilterPredicate> predicateMock;
-//   EXPECT_CALL(predicateMock, Call(_)).WillRepeatedly(Return(true));
-//   MyFilterAlgorithm(predicateMock.AsStdFunction());
-// }
-template <typename F>
-class MockFunction : public internal::MockFunction<internal::SignatureOfT<F>> {
-  using Base = internal::MockFunction<internal::SignatureOfT<F>>;
-
- public:
-  using Base::Base;
-};
-
-// The style guide prohibits "using" statements in a namespace scope
-// inside a header file.  However, the MockSpec class template is
-// meant to be defined in the ::testing namespace.  The following line
-// is just a trick for working around a bug in MSVC 8.0, which cannot
-// handle it if we define MockSpec in ::testing.
-using internal::MockSpec;
-
-// Const(x) is a convenient function for obtaining a const reference
-// to x.  This is useful for setting expectations on an overloaded
-// const mock method, e.g.
-//
-//   class MockFoo : public FooInterface {
-//    public:
-//     MOCK_METHOD0(Bar, int());
-//     MOCK_CONST_METHOD0(Bar, int&());
-//   };
-//
-//   MockFoo foo;
-//   // Expects a call to non-const MockFoo::Bar().
-//   EXPECT_CALL(foo, Bar());
-//   // Expects a call to const MockFoo::Bar().
-//   EXPECT_CALL(Const(foo), Bar());
-template <typename T>
-inline const T& Const(const T& x) { return x; }
-
-// Constructs an Expectation object that references and co-owns exp.
-inline Expectation::Expectation(internal::ExpectationBase& exp)  // NOLINT
-    : expectation_base_(exp.GetHandle().expectation_base()) {}
-
-}  // namespace testing
-
-GTEST_DISABLE_MSC_WARNINGS_POP_()  //  4251
-
-// Implementation for ON_CALL and EXPECT_CALL macros. A separate macro is
-// required to avoid compile errors when the name of the method used in call is
-// a result of macro expansion. See CompilesWithMethodNameExpandedFromMacro
-// tests in internal/gmock-spec-builders_test.cc for more details.
-//
-// This macro supports statements both with and without parameter matchers. If
-// the parameter list is omitted, gMock will accept any parameters, which allows
-// tests to be written that don't need to encode the number of method
-// parameter. This technique may only be used for non-overloaded methods.
-//
-//   // These are the same:
-//   ON_CALL(mock, NoArgsMethod()).WillByDefault(...);
-//   ON_CALL(mock, NoArgsMethod).WillByDefault(...);
-//
-//   // As are these:
-//   ON_CALL(mock, TwoArgsMethod(_, _)).WillByDefault(...);
-//   ON_CALL(mock, TwoArgsMethod).WillByDefault(...);
-//
-//   // Can also specify args if you want, of course:
-//   ON_CALL(mock, TwoArgsMethod(_, 45)).WillByDefault(...);
-//
-//   // Overloads work as long as you specify parameters:
-//   ON_CALL(mock, OverloadedMethod(_)).WillByDefault(...);
-//   ON_CALL(mock, OverloadedMethod(_, _)).WillByDefault(...);
-//
-//   // Oops! Which overload did you want?
-//   ON_CALL(mock, OverloadedMethod).WillByDefault(...);
-//     => ERROR: call to member function 'gmock_OverloadedMethod' is ambiguous
-//
-// How this works: The mock class uses two overloads of the gmock_Method
-// expectation setter method plus an operator() overload on the MockSpec object.
-// In the matcher list form, the macro expands to:
-//
-//   // This statement:
-//   ON_CALL(mock, TwoArgsMethod(_, 45))...
-//
-//   // ...expands to:
-//   mock.gmock_TwoArgsMethod(_, 45)(WithoutMatchers(), nullptr)...
-//   |-------------v---------------||------------v-------------|
-//       invokes first overload        swallowed by operator()
-//
-//   // ...which is essentially:
-//   mock.gmock_TwoArgsMethod(_, 45)...
-//
-// Whereas the form without a matcher list:
-//
-//   // This statement:
-//   ON_CALL(mock, TwoArgsMethod)...
-//
-//   // ...expands to:
-//   mock.gmock_TwoArgsMethod(WithoutMatchers(), nullptr)...
-//   |-----------------------v--------------------------|
-//                 invokes second overload
-//
-//   // ...which is essentially:
-//   mock.gmock_TwoArgsMethod(_, _)...
-//
-// The WithoutMatchers() argument is used to disambiguate overloads and to
-// block the caller from accidentally invoking the second overload directly. The
-// second argument is an internal type derived from the method signature. The
-// failure to disambiguate two overloads of this method in the ON_CALL statement
-// is how we block callers from setting expectations on overloaded methods.
-#define GMOCK_ON_CALL_IMPL_(mock_expr, Setter, call)                    \
-  ((mock_expr).gmock_##call)(::testing::internal::GetWithoutMatchers(), \
-                             nullptr)                                   \
-      .Setter(__FILE__, __LINE__, #mock_expr, #call)
-
-#define ON_CALL(obj, call) \
-  GMOCK_ON_CALL_IMPL_(obj, InternalDefaultActionSetAt, call)
-
-#define EXPECT_CALL(obj, call) \
-  GMOCK_ON_CALL_IMPL_(obj, InternalExpectedAt, call)
-
-#endif  // GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_SPEC_BUILDERS_H_
diff --git a/src/include/gromacs/external/googletest/googlemock/include/gmock/gmock.h b/src/include/gromacs/external/googletest/googlemock/include/gmock/gmock.h
deleted file mode 100644 (file)
index 13e435f..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This is the main header file a user should include.
-
-#ifndef GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_H_
-#define GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_H_
-
-// This file implements the following syntax:
-//
-//   ON_CALL(mock_object, Method(...))
-//     .With(...) ?
-//     .WillByDefault(...);
-//
-// where With() is optional and WillByDefault() must appear exactly
-// once.
-//
-//   EXPECT_CALL(mock_object, Method(...))
-//     .With(...) ?
-//     .Times(...) ?
-//     .InSequence(...) *
-//     .WillOnce(...) *
-//     .WillRepeatedly(...) ?
-//     .RetiresOnSaturation() ? ;
-//
-// where all clauses are optional and WillOnce() can be repeated.
-
-#include "gmock/gmock-actions.h"
-#include "gmock/gmock-cardinalities.h"
-#include "gmock/gmock-function-mocker.h"
-#include "gmock/gmock-matchers.h"
-#include "gmock/gmock-more-actions.h"
-#include "gmock/gmock-more-matchers.h"
-#include "gmock/gmock-nice-strict.h"
-#include "gmock/internal/gmock-internal-utils.h"
-
-namespace testing {
-
-// Declares Google Mock flags that we want a user to use programmatically.
-GMOCK_DECLARE_bool_(catch_leaked_mocks);
-GMOCK_DECLARE_string_(verbose);
-GMOCK_DECLARE_int32_(default_mock_behavior);
-
-// Initializes Google Mock.  This must be called before running the
-// tests.  In particular, it parses the command line for the flags
-// that Google Mock recognizes.  Whenever a Google Mock flag is seen,
-// it is removed from argv, and *argc is decremented.
-//
-// No value is returned.  Instead, the Google Mock flag variables are
-// updated.
-//
-// Since Google Test is needed for Google Mock to work, this function
-// also initializes Google Test and parses its flags, if that hasn't
-// been done.
-GTEST_API_ void InitGoogleMock(int* argc, char** argv);
-
-// This overloaded version can be used in Windows programs compiled in
-// UNICODE mode.
-GTEST_API_ void InitGoogleMock(int* argc, wchar_t** argv);
-
-// This overloaded version can be used on Arduino/embedded platforms where
-// there is no argc/argv.
-GTEST_API_ void InitGoogleMock();
-
-}  // namespace testing
-
-#endif  // GOOGLEMOCK_INCLUDE_GMOCK_GMOCK_H_
diff --git a/src/include/gromacs/external/googletest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h b/src/include/gromacs/external/googletest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h
deleted file mode 100644 (file)
index 39ddeac..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#ifndef GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_GENERATED_ACTIONS_H_
-#define GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_GENERATED_ACTIONS_H_
-
-#endif  // GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_GENERATED_ACTIONS_H_
diff --git a/src/include/gromacs/external/googletest/googlemock/include/gmock/internal/custom/gmock-matchers.h b/src/include/gromacs/external/googletest/googlemock/include/gmock/internal/custom/gmock-matchers.h
deleted file mode 100644 (file)
index f826117..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2015, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Injection point for custom user configurations. See README for details
-
-#ifndef GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_MATCHERS_H_
-#define GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_MATCHERS_H_
-#endif  // GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_MATCHERS_H_
diff --git a/src/include/gromacs/external/googletest/googlemock/include/gmock/internal/custom/gmock-port.h b/src/include/gromacs/external/googletest/googlemock/include/gmock/internal/custom/gmock-port.h
deleted file mode 100644 (file)
index db03ed2..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2015, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Injection point for custom user configurations. See README for details
-//
-// ** Custom implementation starts here **
-
-#ifndef GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_PORT_H_
-#define GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_PORT_H_
-
-#endif  // GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_PORT_H_
diff --git a/src/include/gromacs/external/googletest/googlemock/include/gmock/internal/gmock-internal-utils.h b/src/include/gromacs/external/googletest/googlemock/include/gmock/internal/gmock-internal-utils.h
deleted file mode 100644 (file)
index 99a2340..0000000
+++ /dev/null
@@ -1,457 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file defines some utilities useful for implementing Google
-// Mock.  They are subject to change without notice, so please DO NOT
-// USE THEM IN USER CODE.
-
-#ifndef GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_INTERNAL_UTILS_H_
-#define GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_INTERNAL_UTILS_H_
-
-#include <stdio.h>
-#include <ostream>  // NOLINT
-#include <string>
-#include <type_traits>
-#include "gmock/internal/gmock-port.h"
-#include "gtest/gtest.h"
-
-namespace testing {
-
-template <typename>
-class Matcher;
-
-namespace internal {
-
-// Silence MSVC C4100 (unreferenced formal parameter) and
-// C4805('==': unsafe mix of type 'const int' and type 'const bool')
-#ifdef _MSC_VER
-# pragma warning(push)
-# pragma warning(disable:4100)
-# pragma warning(disable:4805)
-#endif
-
-// Joins a vector of strings as if they are fields of a tuple; returns
-// the joined string.
-GTEST_API_ std::string JoinAsTuple(const Strings& fields);
-
-// Converts an identifier name to a space-separated list of lower-case
-// words.  Each maximum substring of the form [A-Za-z][a-z]*|\d+ is
-// treated as one word.  For example, both "FooBar123" and
-// "foo_bar_123" are converted to "foo bar 123".
-GTEST_API_ std::string ConvertIdentifierNameToWords(const char* id_name);
-
-// GetRawPointer(p) returns the raw pointer underlying p when p is a
-// smart pointer, or returns p itself when p is already a raw pointer.
-// The following default implementation is for the smart pointer case.
-template <typename Pointer>
-inline const typename Pointer::element_type* GetRawPointer(const Pointer& p) {
-  return p.get();
-}
-// This overloaded version is for the raw pointer case.
-template <typename Element>
-inline Element* GetRawPointer(Element* p) { return p; }
-
-// MSVC treats wchar_t as a native type usually, but treats it as the
-// same as unsigned short when the compiler option /Zc:wchar_t- is
-// specified.  It defines _NATIVE_WCHAR_T_DEFINED symbol when wchar_t
-// is a native type.
-#if defined(_MSC_VER) && !defined(_NATIVE_WCHAR_T_DEFINED)
-// wchar_t is a typedef.
-#else
-# define GMOCK_WCHAR_T_IS_NATIVE_ 1
-#endif
-
-// In what follows, we use the term "kind" to indicate whether a type
-// is bool, an integer type (excluding bool), a floating-point type,
-// or none of them.  This categorization is useful for determining
-// when a matcher argument type can be safely converted to another
-// type in the implementation of SafeMatcherCast.
-enum TypeKind {
-  kBool, kInteger, kFloatingPoint, kOther
-};
-
-// KindOf<T>::value is the kind of type T.
-template <typename T> struct KindOf {
-  enum { value = kOther };  // The default kind.
-};
-
-// This macro declares that the kind of 'type' is 'kind'.
-#define GMOCK_DECLARE_KIND_(type, kind) \
-  template <> struct KindOf<type> { enum { value = kind }; }
-
-GMOCK_DECLARE_KIND_(bool, kBool);
-
-// All standard integer types.
-GMOCK_DECLARE_KIND_(char, kInteger);
-GMOCK_DECLARE_KIND_(signed char, kInteger);
-GMOCK_DECLARE_KIND_(unsigned char, kInteger);
-GMOCK_DECLARE_KIND_(short, kInteger);  // NOLINT
-GMOCK_DECLARE_KIND_(unsigned short, kInteger);  // NOLINT
-GMOCK_DECLARE_KIND_(int, kInteger);
-GMOCK_DECLARE_KIND_(unsigned int, kInteger);
-GMOCK_DECLARE_KIND_(long, kInteger);  // NOLINT
-GMOCK_DECLARE_KIND_(unsigned long, kInteger);  // NOLINT
-GMOCK_DECLARE_KIND_(long long, kInteger);  // NOLINT
-GMOCK_DECLARE_KIND_(unsigned long long, kInteger);  // NOLINT
-
-#if GMOCK_WCHAR_T_IS_NATIVE_
-GMOCK_DECLARE_KIND_(wchar_t, kInteger);
-#endif
-
-// All standard floating-point types.
-GMOCK_DECLARE_KIND_(float, kFloatingPoint);
-GMOCK_DECLARE_KIND_(double, kFloatingPoint);
-GMOCK_DECLARE_KIND_(long double, kFloatingPoint);
-
-#undef GMOCK_DECLARE_KIND_
-
-// Evaluates to the kind of 'type'.
-#define GMOCK_KIND_OF_(type) \
-  static_cast< ::testing::internal::TypeKind>( \
-      ::testing::internal::KindOf<type>::value)
-
-// LosslessArithmeticConvertibleImpl<kFromKind, From, kToKind, To>::value
-// is true if and only if arithmetic type From can be losslessly converted to
-// arithmetic type To.
-//
-// It's the user's responsibility to ensure that both From and To are
-// raw (i.e. has no CV modifier, is not a pointer, and is not a
-// reference) built-in arithmetic types, kFromKind is the kind of
-// From, and kToKind is the kind of To; the value is
-// implementation-defined when the above pre-condition is violated.
-template <TypeKind kFromKind, typename From, TypeKind kToKind, typename To>
-using LosslessArithmeticConvertibleImpl = std::integral_constant<
-    bool,
-    // clang-format off
-      // Converting from bool is always lossless
-      (kFromKind == kBool) ? true
-      // Converting between any other type kinds will be lossy if the type
-      // kinds are not the same.
-    : (kFromKind != kToKind) ? false
-    : (kFromKind == kInteger &&
-       // Converting between integers of different widths is allowed so long
-       // as the conversion does not go from signed to unsigned.
-      (((sizeof(From) < sizeof(To)) &&
-        !(std::is_signed<From>::value && !std::is_signed<To>::value)) ||
-       // Converting between integers of the same width only requires the
-       // two types to have the same signedness.
-       ((sizeof(From) == sizeof(To)) &&
-        (std::is_signed<From>::value == std::is_signed<To>::value)))
-       ) ? true
-      // Floating point conversions are lossless if and only if `To` is at least
-      // as wide as `From`.
-    : (kFromKind == kFloatingPoint && (sizeof(From) <= sizeof(To))) ? true
-    : false
-    // clang-format on
-    >;
-
-// LosslessArithmeticConvertible<From, To>::value is true if and only if
-// arithmetic type From can be losslessly converted to arithmetic type To.
-//
-// It's the user's responsibility to ensure that both From and To are
-// raw (i.e. has no CV modifier, is not a pointer, and is not a
-// reference) built-in arithmetic types; the value is
-// implementation-defined when the above pre-condition is violated.
-template <typename From, typename To>
-using LosslessArithmeticConvertible =
-    LosslessArithmeticConvertibleImpl<GMOCK_KIND_OF_(From), From,
-                                      GMOCK_KIND_OF_(To), To>;
-
-// This interface knows how to report a Google Mock failure (either
-// non-fatal or fatal).
-class FailureReporterInterface {
- public:
-  // The type of a failure (either non-fatal or fatal).
-  enum FailureType {
-    kNonfatal, kFatal
-  };
-
-  virtual ~FailureReporterInterface() {}
-
-  // Reports a failure that occurred at the given source file location.
-  virtual void ReportFailure(FailureType type, const char* file, int line,
-                             const std::string& message) = 0;
-};
-
-// Returns the failure reporter used by Google Mock.
-GTEST_API_ FailureReporterInterface* GetFailureReporter();
-
-// Asserts that condition is true; aborts the process with the given
-// message if condition is false.  We cannot use LOG(FATAL) or CHECK()
-// as Google Mock might be used to mock the log sink itself.  We
-// inline this function to prevent it from showing up in the stack
-// trace.
-inline void Assert(bool condition, const char* file, int line,
-                   const std::string& msg) {
-  if (!condition) {
-    GetFailureReporter()->ReportFailure(FailureReporterInterface::kFatal,
-                                        file, line, msg);
-  }
-}
-inline void Assert(bool condition, const char* file, int line) {
-  Assert(condition, file, line, "Assertion failed.");
-}
-
-// Verifies that condition is true; generates a non-fatal failure if
-// condition is false.
-inline void Expect(bool condition, const char* file, int line,
-                   const std::string& msg) {
-  if (!condition) {
-    GetFailureReporter()->ReportFailure(FailureReporterInterface::kNonfatal,
-                                        file, line, msg);
-  }
-}
-inline void Expect(bool condition, const char* file, int line) {
-  Expect(condition, file, line, "Expectation failed.");
-}
-
-// Severity level of a log.
-enum LogSeverity {
-  kInfo = 0,
-  kWarning = 1
-};
-
-// Valid values for the --gmock_verbose flag.
-
-// All logs (informational and warnings) are printed.
-const char kInfoVerbosity[] = "info";
-// Only warnings are printed.
-const char kWarningVerbosity[] = "warning";
-// No logs are printed.
-const char kErrorVerbosity[] = "error";
-
-// Returns true if and only if a log with the given severity is visible
-// according to the --gmock_verbose flag.
-GTEST_API_ bool LogIsVisible(LogSeverity severity);
-
-// Prints the given message to stdout if and only if 'severity' >= the level
-// specified by the --gmock_verbose flag.  If stack_frames_to_skip >=
-// 0, also prints the stack trace excluding the top
-// stack_frames_to_skip frames.  In opt mode, any positive
-// stack_frames_to_skip is treated as 0, since we don't know which
-// function calls will be inlined by the compiler and need to be
-// conservative.
-GTEST_API_ void Log(LogSeverity severity, const std::string& message,
-                    int stack_frames_to_skip);
-
-// A marker class that is used to resolve parameterless expectations to the
-// correct overload. This must not be instantiable, to prevent client code from
-// accidentally resolving to the overload; for example:
-//
-//    ON_CALL(mock, Method({}, nullptr))...
-//
-class WithoutMatchers {
- private:
-  WithoutMatchers() {}
-  friend GTEST_API_ WithoutMatchers GetWithoutMatchers();
-};
-
-// Internal use only: access the singleton instance of WithoutMatchers.
-GTEST_API_ WithoutMatchers GetWithoutMatchers();
-
-// Disable MSVC warnings for infinite recursion, since in this case the
-// the recursion is unreachable.
-#ifdef _MSC_VER
-# pragma warning(push)
-# pragma warning(disable:4717)
-#endif
-
-// Invalid<T>() is usable as an expression of type T, but will terminate
-// the program with an assertion failure if actually run.  This is useful
-// when a value of type T is needed for compilation, but the statement
-// will not really be executed (or we don't care if the statement
-// crashes).
-template <typename T>
-inline T Invalid() {
-  Assert(false, "", -1, "Internal error: attempt to return invalid value");
-  // This statement is unreachable, and would never terminate even if it
-  // could be reached. It is provided only to placate compiler warnings
-  // about missing return statements.
-  return Invalid<T>();
-}
-
-#ifdef _MSC_VER
-# pragma warning(pop)
-#endif
-
-// Given a raw type (i.e. having no top-level reference or const
-// modifier) RawContainer that's either an STL-style container or a
-// native array, class StlContainerView<RawContainer> has the
-// following members:
-//
-//   - type is a type that provides an STL-style container view to
-//     (i.e. implements the STL container concept for) RawContainer;
-//   - const_reference is a type that provides a reference to a const
-//     RawContainer;
-//   - ConstReference(raw_container) returns a const reference to an STL-style
-//     container view to raw_container, which is a RawContainer.
-//   - Copy(raw_container) returns an STL-style container view of a
-//     copy of raw_container, which is a RawContainer.
-//
-// This generic version is used when RawContainer itself is already an
-// STL-style container.
-template <class RawContainer>
-class StlContainerView {
- public:
-  typedef RawContainer type;
-  typedef const type& const_reference;
-
-  static const_reference ConstReference(const RawContainer& container) {
-    static_assert(!std::is_const<RawContainer>::value,
-                  "RawContainer type must not be const");
-    return container;
-  }
-  static type Copy(const RawContainer& container) { return container; }
-};
-
-// This specialization is used when RawContainer is a native array type.
-template <typename Element, size_t N>
-class StlContainerView<Element[N]> {
- public:
-  typedef typename std::remove_const<Element>::type RawElement;
-  typedef internal::NativeArray<RawElement> type;
-  // NativeArray<T> can represent a native array either by value or by
-  // reference (selected by a constructor argument), so 'const type'
-  // can be used to reference a const native array.  We cannot
-  // 'typedef const type& const_reference' here, as that would mean
-  // ConstReference() has to return a reference to a local variable.
-  typedef const type const_reference;
-
-  static const_reference ConstReference(const Element (&array)[N]) {
-    static_assert(std::is_same<Element, RawElement>::value,
-                  "Element type must not be const");
-    return type(array, N, RelationToSourceReference());
-  }
-  static type Copy(const Element (&array)[N]) {
-    return type(array, N, RelationToSourceCopy());
-  }
-};
-
-// This specialization is used when RawContainer is a native array
-// represented as a (pointer, size) tuple.
-template <typename ElementPointer, typename Size>
-class StlContainerView< ::std::tuple<ElementPointer, Size> > {
- public:
-  typedef typename std::remove_const<
-      typename std::pointer_traits<ElementPointer>::element_type>::type
-      RawElement;
-  typedef internal::NativeArray<RawElement> type;
-  typedef const type const_reference;
-
-  static const_reference ConstReference(
-      const ::std::tuple<ElementPointer, Size>& array) {
-    return type(std::get<0>(array), std::get<1>(array),
-                RelationToSourceReference());
-  }
-  static type Copy(const ::std::tuple<ElementPointer, Size>& array) {
-    return type(std::get<0>(array), std::get<1>(array), RelationToSourceCopy());
-  }
-};
-
-// The following specialization prevents the user from instantiating
-// StlContainer with a reference type.
-template <typename T> class StlContainerView<T&>;
-
-// A type transform to remove constness from the first part of a pair.
-// Pairs like that are used as the value_type of associative containers,
-// and this transform produces a similar but assignable pair.
-template <typename T>
-struct RemoveConstFromKey {
-  typedef T type;
-};
-
-// Partially specialized to remove constness from std::pair<const K, V>.
-template <typename K, typename V>
-struct RemoveConstFromKey<std::pair<const K, V> > {
-  typedef std::pair<K, V> type;
-};
-
-// Emit an assertion failure due to incorrect DoDefault() usage. Out-of-lined to
-// reduce code size.
-GTEST_API_ void IllegalDoDefault(const char* file, int line);
-
-template <typename F, typename Tuple, size_t... Idx>
-auto ApplyImpl(F&& f, Tuple&& args, IndexSequence<Idx...>) -> decltype(
-    std::forward<F>(f)(std::get<Idx>(std::forward<Tuple>(args))...)) {
-  return std::forward<F>(f)(std::get<Idx>(std::forward<Tuple>(args))...);
-}
-
-// Apply the function to a tuple of arguments.
-template <typename F, typename Tuple>
-auto Apply(F&& f, Tuple&& args) -> decltype(
-    ApplyImpl(std::forward<F>(f), std::forward<Tuple>(args),
-              MakeIndexSequence<std::tuple_size<
-                  typename std::remove_reference<Tuple>::type>::value>())) {
-  return ApplyImpl(std::forward<F>(f), std::forward<Tuple>(args),
-                   MakeIndexSequence<std::tuple_size<
-                       typename std::remove_reference<Tuple>::type>::value>());
-}
-
-// Template struct Function<F>, where F must be a function type, contains
-// the following typedefs:
-//
-//   Result:               the function's return type.
-//   Arg<N>:               the type of the N-th argument, where N starts with 0.
-//   ArgumentTuple:        the tuple type consisting of all parameters of F.
-//   ArgumentMatcherTuple: the tuple type consisting of Matchers for all
-//                         parameters of F.
-//   MakeResultVoid:       the function type obtained by substituting void
-//                         for the return type of F.
-//   MakeResultIgnoredValue:
-//                         the function type obtained by substituting Something
-//                         for the return type of F.
-template <typename T>
-struct Function;
-
-template <typename R, typename... Args>
-struct Function<R(Args...)> {
-  using Result = R;
-  static constexpr size_t ArgumentCount = sizeof...(Args);
-  template <size_t I>
-  using Arg = ElemFromList<I, Args...>;
-  using ArgumentTuple = std::tuple<Args...>;
-  using ArgumentMatcherTuple = std::tuple<Matcher<Args>...>;
-  using MakeResultVoid = void(Args...);
-  using MakeResultIgnoredValue = IgnoredValue(Args...);
-};
-
-template <typename R, typename... Args>
-constexpr size_t Function<R(Args...)>::ArgumentCount;
-
-#ifdef _MSC_VER
-# pragma warning(pop)
-#endif
-
-}  // namespace internal
-}  // namespace testing
-
-#endif  // GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_INTERNAL_UTILS_H_
diff --git a/src/include/gromacs/external/googletest/googlemock/include/gmock/internal/gmock-port.h b/src/include/gromacs/external/googletest/googlemock/include/gmock/internal/gmock-port.h
deleted file mode 100644 (file)
index d2d1b74..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-//
-// Low-level types and utilities for porting Google Mock to various
-// platforms.  All macros ending with _ and symbols defined in an
-// internal namespace are subject to change without notice.  Code
-// outside Google Mock MUST NOT USE THEM DIRECTLY.  Macros that don't
-// end with _ are part of Google Mock's public API and can be used by
-// code outside Google Mock.
-
-#ifndef GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_PORT_H_
-#define GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_PORT_H_
-
-#include <assert.h>
-#include <stdlib.h>
-#include <cstdint>
-#include <iostream>
-
-// Most of the utilities needed for porting Google Mock are also
-// required for Google Test and are defined in gtest-port.h.
-//
-// Note to maintainers: to reduce code duplication, prefer adding
-// portability utilities to Google Test's gtest-port.h instead of
-// here, as Google Mock depends on Google Test.  Only add a utility
-// here if it's truly specific to Google Mock.
-
-#include "gtest/internal/gtest-port.h"
-#include "gmock/internal/custom/gmock-port.h"
-
-// For MS Visual C++, check the compiler version. At least VS 2015 is
-// required to compile Google Mock.
-#if defined(_MSC_VER) && _MSC_VER < 1900
-# error "At least Visual C++ 2015 (14.0) is required to compile Google Mock."
-#endif
-
-// Macro for referencing flags.  This is public as we want the user to
-// use this syntax to reference Google Mock flags.
-#define GMOCK_FLAG(name) FLAGS_gmock_##name
-
-#if !defined(GMOCK_DECLARE_bool_)
-
-// Macros for declaring flags.
-# define GMOCK_DECLARE_bool_(name) extern GTEST_API_ bool GMOCK_FLAG(name)
-# define GMOCK_DECLARE_int32_(name) extern GTEST_API_ int32_t GMOCK_FLAG(name)
-# define GMOCK_DECLARE_string_(name) \
-    extern GTEST_API_ ::std::string GMOCK_FLAG(name)
-
-// Macros for defining flags.
-# define GMOCK_DEFINE_bool_(name, default_val, doc) \
-    GTEST_API_ bool GMOCK_FLAG(name) = (default_val)
-# define GMOCK_DEFINE_int32_(name, default_val, doc) \
-    GTEST_API_ int32_t GMOCK_FLAG(name) = (default_val)
-# define GMOCK_DEFINE_string_(name, default_val, doc) \
-    GTEST_API_ ::std::string GMOCK_FLAG(name) = (default_val)
-
-#endif  // !defined(GMOCK_DECLARE_bool_)
-
-#endif  // GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_PORT_H_
diff --git a/src/include/gromacs/external/googletest/googlemock/include/gmock/internal/gmock-pp.h b/src/include/gromacs/external/googletest/googlemock/include/gmock/internal/gmock-pp.h
deleted file mode 100644 (file)
index 94d61c0..0000000
+++ /dev/null
@@ -1,279 +0,0 @@
-#ifndef GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_PP_H_
-#define GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_PP_H_
-
-// Expands and concatenates the arguments. Constructed macros reevaluate.
-#define GMOCK_PP_CAT(_1, _2) GMOCK_PP_INTERNAL_CAT(_1, _2)
-
-// Expands and stringifies the only argument.
-#define GMOCK_PP_STRINGIZE(...) GMOCK_PP_INTERNAL_STRINGIZE(__VA_ARGS__)
-
-// Returns empty. Given a variadic number of arguments.
-#define GMOCK_PP_EMPTY(...)
-
-// Returns a comma. Given a variadic number of arguments.
-#define GMOCK_PP_COMMA(...) ,
-
-// Returns the only argument.
-#define GMOCK_PP_IDENTITY(_1) _1
-
-// Evaluates to the number of arguments after expansion.
-//
-//   #define PAIR x, y
-//
-//   GMOCK_PP_NARG() => 1
-//   GMOCK_PP_NARG(x) => 1
-//   GMOCK_PP_NARG(x, y) => 2
-//   GMOCK_PP_NARG(PAIR) => 2
-//
-// Requires: the number of arguments after expansion is at most 15.
-#define GMOCK_PP_NARG(...) \
-  GMOCK_PP_INTERNAL_16TH(  \
-      (__VA_ARGS__, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0))
-
-// Returns 1 if the expansion of arguments has an unprotected comma. Otherwise
-// returns 0. Requires no more than 15 unprotected commas.
-#define GMOCK_PP_HAS_COMMA(...) \
-  GMOCK_PP_INTERNAL_16TH(       \
-      (__VA_ARGS__, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0))
-
-// Returns the first argument.
-#define GMOCK_PP_HEAD(...) GMOCK_PP_INTERNAL_HEAD((__VA_ARGS__, unusedArg))
-
-// Returns the tail. A variadic list of all arguments minus the first. Requires
-// at least one argument.
-#define GMOCK_PP_TAIL(...) GMOCK_PP_INTERNAL_TAIL((__VA_ARGS__))
-
-// Calls CAT(_Macro, NARG(__VA_ARGS__))(__VA_ARGS__)
-#define GMOCK_PP_VARIADIC_CALL(_Macro, ...) \
-  GMOCK_PP_IDENTITY(                        \
-      GMOCK_PP_CAT(_Macro, GMOCK_PP_NARG(__VA_ARGS__))(__VA_ARGS__))
-
-// If the arguments after expansion have no tokens, evaluates to `1`. Otherwise
-// evaluates to `0`.
-//
-// Requires: * the number of arguments after expansion is at most 15.
-//           * If the argument is a macro, it must be able to be called with one
-//             argument.
-//
-// Implementation details:
-//
-// There is one case when it generates a compile error: if the argument is macro
-// that cannot be called with one argument.
-//
-//   #define M(a, b)  // it doesn't matter what it expands to
-//
-//   // Expected: expands to `0`.
-//   // Actual: compile error.
-//   GMOCK_PP_IS_EMPTY(M)
-//
-// There are 4 cases tested:
-//
-// * __VA_ARGS__ possible expansion has no unparen'd commas. Expected 0.
-// * __VA_ARGS__ possible expansion is not enclosed in parenthesis. Expected 0.
-// * __VA_ARGS__ possible expansion is not a macro that ()-evaluates to a comma.
-//   Expected 0
-// * __VA_ARGS__ is empty, or has unparen'd commas, or is enclosed in
-//   parenthesis, or is a macro that ()-evaluates to comma. Expected 1.
-//
-// We trigger detection on '0001', i.e. on empty.
-#define GMOCK_PP_IS_EMPTY(...)                                               \
-  GMOCK_PP_INTERNAL_IS_EMPTY(GMOCK_PP_HAS_COMMA(__VA_ARGS__),                \
-                             GMOCK_PP_HAS_COMMA(GMOCK_PP_COMMA __VA_ARGS__), \
-                             GMOCK_PP_HAS_COMMA(__VA_ARGS__()),              \
-                             GMOCK_PP_HAS_COMMA(GMOCK_PP_COMMA __VA_ARGS__()))
-
-// Evaluates to _Then if _Cond is 1 and _Else if _Cond is 0.
-#define GMOCK_PP_IF(_Cond, _Then, _Else) \
-  GMOCK_PP_CAT(GMOCK_PP_INTERNAL_IF_, _Cond)(_Then, _Else)
-
-// Similar to GMOCK_PP_IF but takes _Then and _Else in parentheses.
-//
-// GMOCK_PP_GENERIC_IF(1, (a, b, c), (d, e, f)) => a, b, c
-// GMOCK_PP_GENERIC_IF(0, (a, b, c), (d, e, f)) => d, e, f
-//
-#define GMOCK_PP_GENERIC_IF(_Cond, _Then, _Else) \
-  GMOCK_PP_REMOVE_PARENS(GMOCK_PP_IF(_Cond, _Then, _Else))
-
-// Evaluates to the number of arguments after expansion. Identifies 'empty' as
-// 0.
-//
-//   #define PAIR x, y
-//
-//   GMOCK_PP_NARG0() => 0
-//   GMOCK_PP_NARG0(x) => 1
-//   GMOCK_PP_NARG0(x, y) => 2
-//   GMOCK_PP_NARG0(PAIR) => 2
-//
-// Requires: * the number of arguments after expansion is at most 15.
-//           * If the argument is a macro, it must be able to be called with one
-//             argument.
-#define GMOCK_PP_NARG0(...) \
-  GMOCK_PP_IF(GMOCK_PP_IS_EMPTY(__VA_ARGS__), 0, GMOCK_PP_NARG(__VA_ARGS__))
-
-// Expands to 1 if the first argument starts with something in parentheses,
-// otherwise to 0.
-#define GMOCK_PP_IS_BEGIN_PARENS(...)                              \
-  GMOCK_PP_HEAD(GMOCK_PP_CAT(GMOCK_PP_INTERNAL_IBP_IS_VARIADIC_R_, \
-                             GMOCK_PP_INTERNAL_IBP_IS_VARIADIC_C __VA_ARGS__))
-
-// Expands to 1 is there is only one argument and it is enclosed in parentheses.
-#define GMOCK_PP_IS_ENCLOSED_PARENS(...)             \
-  GMOCK_PP_IF(GMOCK_PP_IS_BEGIN_PARENS(__VA_ARGS__), \
-              GMOCK_PP_IS_EMPTY(GMOCK_PP_EMPTY __VA_ARGS__), 0)
-
-// Remove the parens, requires GMOCK_PP_IS_ENCLOSED_PARENS(args) => 1.
-#define GMOCK_PP_REMOVE_PARENS(...) GMOCK_PP_INTERNAL_REMOVE_PARENS __VA_ARGS__
-
-// Expands to _Macro(0, _Data, e1) _Macro(1, _Data, e2) ... _Macro(K -1, _Data,
-// eK) as many of GMOCK_INTERNAL_NARG0 _Tuple.
-// Requires: * |_Macro| can be called with 3 arguments.
-//           * |_Tuple| expansion has no more than 15 elements.
-#define GMOCK_PP_FOR_EACH(_Macro, _Data, _Tuple)                        \
-  GMOCK_PP_CAT(GMOCK_PP_INTERNAL_FOR_EACH_IMPL_, GMOCK_PP_NARG0 _Tuple) \
-  (0, _Macro, _Data, _Tuple)
-
-// Expands to _Macro(0, _Data, ) _Macro(1, _Data, ) ... _Macro(K - 1, _Data, )
-// Empty if _K = 0.
-// Requires: * |_Macro| can be called with 3 arguments.
-//           * |_K| literal between 0 and 15
-#define GMOCK_PP_REPEAT(_Macro, _Data, _N)           \
-  GMOCK_PP_CAT(GMOCK_PP_INTERNAL_FOR_EACH_IMPL_, _N) \
-  (0, _Macro, _Data, GMOCK_PP_INTENRAL_EMPTY_TUPLE)
-
-// Increments the argument, requires the argument to be between 0 and 15.
-#define GMOCK_PP_INC(_i) GMOCK_PP_CAT(GMOCK_PP_INTERNAL_INC_, _i)
-
-// Returns comma if _i != 0. Requires _i to be between 0 and 15.
-#define GMOCK_PP_COMMA_IF(_i) GMOCK_PP_CAT(GMOCK_PP_INTERNAL_COMMA_IF_, _i)
-
-// Internal details follow. Do not use any of these symbols outside of this
-// file or we will break your code.
-#define GMOCK_PP_INTENRAL_EMPTY_TUPLE (, , , , , , , , , , , , , , , )
-#define GMOCK_PP_INTERNAL_CAT(_1, _2) _1##_2
-#define GMOCK_PP_INTERNAL_STRINGIZE(...) #__VA_ARGS__
-#define GMOCK_PP_INTERNAL_CAT_5(_1, _2, _3, _4, _5) _1##_2##_3##_4##_5
-#define GMOCK_PP_INTERNAL_IS_EMPTY(_1, _2, _3, _4)                             \
-  GMOCK_PP_HAS_COMMA(GMOCK_PP_INTERNAL_CAT_5(GMOCK_PP_INTERNAL_IS_EMPTY_CASE_, \
-                                             _1, _2, _3, _4))
-#define GMOCK_PP_INTERNAL_IS_EMPTY_CASE_0001 ,
-#define GMOCK_PP_INTERNAL_IF_1(_Then, _Else) _Then
-#define GMOCK_PP_INTERNAL_IF_0(_Then, _Else) _Else
-
-// Because of MSVC treating a token with a comma in it as a single token when
-// passed to another macro, we need to force it to evaluate it as multiple
-// tokens. We do that by using a "IDENTITY(MACRO PARENTHESIZED_ARGS)" macro. We
-// define one per possible macro that relies on this behavior. Note "_Args" must
-// be parenthesized.
-#define GMOCK_PP_INTERNAL_INTERNAL_16TH(_1, _2, _3, _4, _5, _6, _7, _8, _9, \
-                                        _10, _11, _12, _13, _14, _15, _16,  \
-                                        ...)                                \
-  _16
-#define GMOCK_PP_INTERNAL_16TH(_Args) \
-  GMOCK_PP_IDENTITY(GMOCK_PP_INTERNAL_INTERNAL_16TH _Args)
-#define GMOCK_PP_INTERNAL_INTERNAL_HEAD(_1, ...) _1
-#define GMOCK_PP_INTERNAL_HEAD(_Args) \
-  GMOCK_PP_IDENTITY(GMOCK_PP_INTERNAL_INTERNAL_HEAD _Args)
-#define GMOCK_PP_INTERNAL_INTERNAL_TAIL(_1, ...) __VA_ARGS__
-#define GMOCK_PP_INTERNAL_TAIL(_Args) \
-  GMOCK_PP_IDENTITY(GMOCK_PP_INTERNAL_INTERNAL_TAIL _Args)
-
-#define GMOCK_PP_INTERNAL_IBP_IS_VARIADIC_C(...) 1 _
-#define GMOCK_PP_INTERNAL_IBP_IS_VARIADIC_R_1 1,
-#define GMOCK_PP_INTERNAL_IBP_IS_VARIADIC_R_GMOCK_PP_INTERNAL_IBP_IS_VARIADIC_C \
-  0,
-#define GMOCK_PP_INTERNAL_REMOVE_PARENS(...) __VA_ARGS__
-#define GMOCK_PP_INTERNAL_INC_0 1
-#define GMOCK_PP_INTERNAL_INC_1 2
-#define GMOCK_PP_INTERNAL_INC_2 3
-#define GMOCK_PP_INTERNAL_INC_3 4
-#define GMOCK_PP_INTERNAL_INC_4 5
-#define GMOCK_PP_INTERNAL_INC_5 6
-#define GMOCK_PP_INTERNAL_INC_6 7
-#define GMOCK_PP_INTERNAL_INC_7 8
-#define GMOCK_PP_INTERNAL_INC_8 9
-#define GMOCK_PP_INTERNAL_INC_9 10
-#define GMOCK_PP_INTERNAL_INC_10 11
-#define GMOCK_PP_INTERNAL_INC_11 12
-#define GMOCK_PP_INTERNAL_INC_12 13
-#define GMOCK_PP_INTERNAL_INC_13 14
-#define GMOCK_PP_INTERNAL_INC_14 15
-#define GMOCK_PP_INTERNAL_INC_15 16
-#define GMOCK_PP_INTERNAL_COMMA_IF_0
-#define GMOCK_PP_INTERNAL_COMMA_IF_1 ,
-#define GMOCK_PP_INTERNAL_COMMA_IF_2 ,
-#define GMOCK_PP_INTERNAL_COMMA_IF_3 ,
-#define GMOCK_PP_INTERNAL_COMMA_IF_4 ,
-#define GMOCK_PP_INTERNAL_COMMA_IF_5 ,
-#define GMOCK_PP_INTERNAL_COMMA_IF_6 ,
-#define GMOCK_PP_INTERNAL_COMMA_IF_7 ,
-#define GMOCK_PP_INTERNAL_COMMA_IF_8 ,
-#define GMOCK_PP_INTERNAL_COMMA_IF_9 ,
-#define GMOCK_PP_INTERNAL_COMMA_IF_10 ,
-#define GMOCK_PP_INTERNAL_COMMA_IF_11 ,
-#define GMOCK_PP_INTERNAL_COMMA_IF_12 ,
-#define GMOCK_PP_INTERNAL_COMMA_IF_13 ,
-#define GMOCK_PP_INTERNAL_COMMA_IF_14 ,
-#define GMOCK_PP_INTERNAL_COMMA_IF_15 ,
-#define GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, _element) \
-  _Macro(_i, _Data, _element)
-#define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_0(_i, _Macro, _Data, _Tuple)
-#define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_1(_i, _Macro, _Data, _Tuple) \
-  GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple)
-#define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_2(_i, _Macro, _Data, _Tuple)    \
-  GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \
-  GMOCK_PP_INTERNAL_FOR_EACH_IMPL_1(GMOCK_PP_INC(_i), _Macro, _Data,    \
-                                    (GMOCK_PP_TAIL _Tuple))
-#define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_3(_i, _Macro, _Data, _Tuple)    \
-  GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \
-  GMOCK_PP_INTERNAL_FOR_EACH_IMPL_2(GMOCK_PP_INC(_i), _Macro, _Data,    \
-                                    (GMOCK_PP_TAIL _Tuple))
-#define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_4(_i, _Macro, _Data, _Tuple)    \
-  GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \
-  GMOCK_PP_INTERNAL_FOR_EACH_IMPL_3(GMOCK_PP_INC(_i), _Macro, _Data,    \
-                                    (GMOCK_PP_TAIL _Tuple))
-#define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_5(_i, _Macro, _Data, _Tuple)    \
-  GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \
-  GMOCK_PP_INTERNAL_FOR_EACH_IMPL_4(GMOCK_PP_INC(_i), _Macro, _Data,    \
-                                    (GMOCK_PP_TAIL _Tuple))
-#define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_6(_i, _Macro, _Data, _Tuple)    \
-  GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \
-  GMOCK_PP_INTERNAL_FOR_EACH_IMPL_5(GMOCK_PP_INC(_i), _Macro, _Data,    \
-                                    (GMOCK_PP_TAIL _Tuple))
-#define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_7(_i, _Macro, _Data, _Tuple)    \
-  GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \
-  GMOCK_PP_INTERNAL_FOR_EACH_IMPL_6(GMOCK_PP_INC(_i), _Macro, _Data,    \
-                                    (GMOCK_PP_TAIL _Tuple))
-#define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_8(_i, _Macro, _Data, _Tuple)    \
-  GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \
-  GMOCK_PP_INTERNAL_FOR_EACH_IMPL_7(GMOCK_PP_INC(_i), _Macro, _Data,    \
-                                    (GMOCK_PP_TAIL _Tuple))
-#define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_9(_i, _Macro, _Data, _Tuple)    \
-  GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \
-  GMOCK_PP_INTERNAL_FOR_EACH_IMPL_8(GMOCK_PP_INC(_i), _Macro, _Data,    \
-                                    (GMOCK_PP_TAIL _Tuple))
-#define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_10(_i, _Macro, _Data, _Tuple)   \
-  GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \
-  GMOCK_PP_INTERNAL_FOR_EACH_IMPL_9(GMOCK_PP_INC(_i), _Macro, _Data,    \
-                                    (GMOCK_PP_TAIL _Tuple))
-#define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_11(_i, _Macro, _Data, _Tuple)   \
-  GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \
-  GMOCK_PP_INTERNAL_FOR_EACH_IMPL_10(GMOCK_PP_INC(_i), _Macro, _Data,   \
-                                     (GMOCK_PP_TAIL _Tuple))
-#define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_12(_i, _Macro, _Data, _Tuple)   \
-  GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \
-  GMOCK_PP_INTERNAL_FOR_EACH_IMPL_11(GMOCK_PP_INC(_i), _Macro, _Data,   \
-                                     (GMOCK_PP_TAIL _Tuple))
-#define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_13(_i, _Macro, _Data, _Tuple)   \
-  GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \
-  GMOCK_PP_INTERNAL_FOR_EACH_IMPL_12(GMOCK_PP_INC(_i), _Macro, _Data,   \
-                                     (GMOCK_PP_TAIL _Tuple))
-#define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_14(_i, _Macro, _Data, _Tuple)   \
-  GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \
-  GMOCK_PP_INTERNAL_FOR_EACH_IMPL_13(GMOCK_PP_INC(_i), _Macro, _Data,   \
-                                     (GMOCK_PP_TAIL _Tuple))
-#define GMOCK_PP_INTERNAL_FOR_EACH_IMPL_15(_i, _Macro, _Data, _Tuple)   \
-  GMOCK_PP_INTERNAL_CALL_MACRO(_Macro, _i, _Data, GMOCK_PP_HEAD _Tuple) \
-  GMOCK_PP_INTERNAL_FOR_EACH_IMPL_14(GMOCK_PP_INC(_i), _Macro, _Data,   \
-                                     (GMOCK_PP_TAIL _Tuple))
-
-#endif  // GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_PP_H_
diff --git a/src/include/gromacs/external/googletest/googlemock/test/gmock_link_test.h b/src/include/gromacs/external/googletest/googlemock/test/gmock_link_test.h
deleted file mode 100644 (file)
index 5734b2e..0000000
+++ /dev/null
@@ -1,690 +0,0 @@
-// Copyright 2009, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file tests that:
-// a. A header file defining a mock class can be included in multiple
-//    translation units without causing a link error.
-// b. Actions and matchers can be instantiated with identical template
-//    arguments in different translation units without causing link
-//    errors.
-//    The following constructs are currently tested:
-//    Actions:
-//      Return()
-//      Return(value)
-//      ReturnNull
-//      ReturnRef
-//      Assign
-//      SetArgPointee
-//      SetArrayArgument
-//      SetErrnoAndReturn
-//      Invoke(function)
-//      Invoke(object, method)
-//      InvokeWithoutArgs(function)
-//      InvokeWithoutArgs(object, method)
-//      InvokeArgument
-//      WithArg
-//      WithArgs
-//      WithoutArgs
-//      DoAll
-//      DoDefault
-//      IgnoreResult
-//      Throw
-//      ACTION()-generated
-//      ACTION_P()-generated
-//      ACTION_P2()-generated
-//    Matchers:
-//      _
-//      A
-//      An
-//      Eq
-//      Gt, Lt, Ge, Le, Ne
-//      NotNull
-//      Ref
-//      TypedEq
-//      DoubleEq
-//      FloatEq
-//      NanSensitiveDoubleEq
-//      NanSensitiveFloatEq
-//      ContainsRegex
-//      MatchesRegex
-//      EndsWith
-//      HasSubstr
-//      StartsWith
-//      StrCaseEq
-//      StrCaseNe
-//      StrEq
-//      StrNe
-//      ElementsAre
-//      ElementsAreArray
-//      ContainerEq
-//      Field
-//      Property
-//      ResultOf(function)
-//      ResultOf(callback)
-//      Pointee
-//      Truly(predicate)
-//      AddressSatisfies
-//      AllOf
-//      AnyOf
-//      Not
-//      MatcherCast<T>
-//
-//  Please note: this test does not verify the functioning of these
-//  constructs, only that the programs using them will link successfully.
-//
-// Implementation note:
-// This test requires identical definitions of Interface and Mock to be
-// included in different translation units.  We achieve this by writing
-// them in this header and #including it in gmock_link_test.cc and
-// gmock_link2_test.cc.  Because the symbols generated by the compiler for
-// those constructs must be identical in both translation units,
-// definitions of Interface and Mock tests MUST be kept in the SAME
-// NON-ANONYMOUS namespace in this file.  The test fixture class LinkTest
-// is defined as LinkTest1 in gmock_link_test.cc and as LinkTest2 in
-// gmock_link2_test.cc to avoid producing linker errors.
-
-#ifndef GOOGLEMOCK_TEST_GMOCK_LINK_TEST_H_
-#define GOOGLEMOCK_TEST_GMOCK_LINK_TEST_H_
-
-#include "gmock/gmock.h"
-
-#if !GTEST_OS_WINDOWS_MOBILE
-# include <errno.h>
-#endif
-
-#include <iostream>
-#include <vector>
-
-#include "gtest/gtest.h"
-#include "gtest/internal/gtest-port.h"
-
-using testing::_;
-using testing::A;
-using testing::Action;
-using testing::AllOf;
-using testing::AnyOf;
-using testing::Assign;
-using testing::ContainerEq;
-using testing::DoAll;
-using testing::DoDefault;
-using testing::DoubleEq;
-using testing::ElementsAre;
-using testing::ElementsAreArray;
-using testing::EndsWith;
-using testing::Eq;
-using testing::Field;
-using testing::FloatEq;
-using testing::Ge;
-using testing::Gt;
-using testing::HasSubstr;
-using testing::IgnoreResult;
-using testing::Invoke;
-using testing::InvokeArgument;
-using testing::InvokeWithoutArgs;
-using testing::IsNull;
-using testing::IsSubsetOf;
-using testing::IsSupersetOf;
-using testing::Le;
-using testing::Lt;
-using testing::Matcher;
-using testing::MatcherCast;
-using testing::NanSensitiveDoubleEq;
-using testing::NanSensitiveFloatEq;
-using testing::Ne;
-using testing::Not;
-using testing::NotNull;
-using testing::Pointee;
-using testing::Property;
-using testing::Ref;
-using testing::ResultOf;
-using testing::Return;
-using testing::ReturnNull;
-using testing::ReturnRef;
-using testing::SetArgPointee;
-using testing::SetArrayArgument;
-using testing::StartsWith;
-using testing::StrCaseEq;
-using testing::StrCaseNe;
-using testing::StrEq;
-using testing::StrNe;
-using testing::Truly;
-using testing::TypedEq;
-using testing::WithArg;
-using testing::WithArgs;
-using testing::WithoutArgs;
-
-#if !GTEST_OS_WINDOWS_MOBILE
-using testing::SetErrnoAndReturn;
-#endif
-
-#if GTEST_HAS_EXCEPTIONS
-using testing::Throw;
-#endif
-
-using testing::ContainsRegex;
-using testing::MatchesRegex;
-
-class Interface {
- public:
-  virtual ~Interface() {}
-  virtual void VoidFromString(char* str) = 0;
-  virtual char* StringFromString(char* str) = 0;
-  virtual int IntFromString(char* str) = 0;
-  virtual int& IntRefFromString(char* str) = 0;
-  virtual void VoidFromFunc(void(*func)(char* str)) = 0;
-  virtual void VoidFromIntRef(int& n) = 0;  // NOLINT
-  virtual void VoidFromFloat(float n) = 0;
-  virtual void VoidFromDouble(double n) = 0;
-  virtual void VoidFromVector(const std::vector<int>& v) = 0;
-};
-
-class Mock: public Interface {
- public:
-  Mock() {}
-
-  MOCK_METHOD1(VoidFromString, void(char* str));
-  MOCK_METHOD1(StringFromString, char*(char* str));
-  MOCK_METHOD1(IntFromString, int(char* str));
-  MOCK_METHOD1(IntRefFromString, int&(char* str));
-  MOCK_METHOD1(VoidFromFunc, void(void(*func)(char* str)));
-  MOCK_METHOD1(VoidFromIntRef, void(int& n));  // NOLINT
-  MOCK_METHOD1(VoidFromFloat, void(float n));
-  MOCK_METHOD1(VoidFromDouble, void(double n));
-  MOCK_METHOD1(VoidFromVector, void(const std::vector<int>& v));
-
- private:
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(Mock);
-};
-
-class InvokeHelper {
- public:
-  static void StaticVoidFromVoid() {}
-  void VoidFromVoid() {}
-  static void StaticVoidFromString(char* /* str */) {}
-  void VoidFromString(char* /* str */) {}
-  static int StaticIntFromString(char* /* str */) { return 1; }
-  static bool StaticBoolFromString(const char* /* str */) { return true; }
-};
-
-class FieldHelper {
- public:
-  explicit FieldHelper(int a_field) : field_(a_field) {}
-  int field() const { return field_; }
-  int field_;  // NOLINT -- need external access to field_ to test
-               //           the Field matcher.
-};
-
-// Tests the linkage of the ReturnVoid action.
-TEST(LinkTest, TestReturnVoid) {
-  Mock mock;
-
-  EXPECT_CALL(mock, VoidFromString(_)).WillOnce(Return());
-  mock.VoidFromString(nullptr);
-}
-
-// Tests the linkage of the Return action.
-TEST(LinkTest, TestReturn) {
-  Mock mock;
-  char ch = 'x';
-
-  EXPECT_CALL(mock, StringFromString(_)).WillOnce(Return(&ch));
-  mock.StringFromString(nullptr);
-}
-
-// Tests the linkage of the ReturnNull action.
-TEST(LinkTest, TestReturnNull) {
-  Mock mock;
-
-  EXPECT_CALL(mock, VoidFromString(_)).WillOnce(Return());
-  mock.VoidFromString(nullptr);
-}
-
-// Tests the linkage of the ReturnRef action.
-TEST(LinkTest, TestReturnRef) {
-  Mock mock;
-  int n = 42;
-
-  EXPECT_CALL(mock, IntRefFromString(_)).WillOnce(ReturnRef(n));
-  mock.IntRefFromString(nullptr);
-}
-
-// Tests the linkage of the Assign action.
-TEST(LinkTest, TestAssign) {
-  Mock mock;
-  char ch = 'x';
-
-  EXPECT_CALL(mock, VoidFromString(_)).WillOnce(Assign(&ch, 'y'));
-  mock.VoidFromString(nullptr);
-}
-
-// Tests the linkage of the SetArgPointee action.
-TEST(LinkTest, TestSetArgPointee) {
-  Mock mock;
-  char ch = 'x';
-
-  EXPECT_CALL(mock, VoidFromString(_)).WillOnce(SetArgPointee<0>('y'));
-  mock.VoidFromString(&ch);
-}
-
-// Tests the linkage of the SetArrayArgument action.
-TEST(LinkTest, TestSetArrayArgument) {
-  Mock mock;
-  char ch = 'x';
-  char ch2 = 'y';
-
-  EXPECT_CALL(mock, VoidFromString(_)).WillOnce(SetArrayArgument<0>(&ch2,
-                                                                    &ch2 + 1));
-  mock.VoidFromString(&ch);
-}
-
-#if !GTEST_OS_WINDOWS_MOBILE
-
-// Tests the linkage of the SetErrnoAndReturn action.
-TEST(LinkTest, TestSetErrnoAndReturn) {
-  Mock mock;
-
-  int saved_errno = errno;
-  EXPECT_CALL(mock, IntFromString(_)).WillOnce(SetErrnoAndReturn(1, -1));
-  mock.IntFromString(nullptr);
-  errno = saved_errno;
-}
-
-#endif  // !GTEST_OS_WINDOWS_MOBILE
-
-// Tests the linkage of the Invoke(function) and Invoke(object, method) actions.
-TEST(LinkTest, TestInvoke) {
-  Mock mock;
-  InvokeHelper test_invoke_helper;
-
-  EXPECT_CALL(mock, VoidFromString(_))
-      .WillOnce(Invoke(&InvokeHelper::StaticVoidFromString))
-      .WillOnce(Invoke(&test_invoke_helper, &InvokeHelper::VoidFromString));
-  mock.VoidFromString(nullptr);
-  mock.VoidFromString(nullptr);
-}
-
-// Tests the linkage of the InvokeWithoutArgs action.
-TEST(LinkTest, TestInvokeWithoutArgs) {
-  Mock mock;
-  InvokeHelper test_invoke_helper;
-
-  EXPECT_CALL(mock, VoidFromString(_))
-      .WillOnce(InvokeWithoutArgs(&InvokeHelper::StaticVoidFromVoid))
-      .WillOnce(InvokeWithoutArgs(&test_invoke_helper,
-                                  &InvokeHelper::VoidFromVoid));
-  mock.VoidFromString(nullptr);
-  mock.VoidFromString(nullptr);
-}
-
-// Tests the linkage of the InvokeArgument action.
-TEST(LinkTest, TestInvokeArgument) {
-  Mock mock;
-  char ch = 'x';
-
-  EXPECT_CALL(mock, VoidFromFunc(_)).WillOnce(InvokeArgument<0>(&ch));
-  mock.VoidFromFunc(InvokeHelper::StaticVoidFromString);
-}
-
-// Tests the linkage of the WithArg action.
-TEST(LinkTest, TestWithArg) {
-  Mock mock;
-
-  EXPECT_CALL(mock, VoidFromString(_))
-      .WillOnce(WithArg<0>(Invoke(&InvokeHelper::StaticVoidFromString)));
-  mock.VoidFromString(nullptr);
-}
-
-// Tests the linkage of the WithArgs action.
-TEST(LinkTest, TestWithArgs) {
-  Mock mock;
-
-  EXPECT_CALL(mock, VoidFromString(_))
-      .WillOnce(WithArgs<0>(Invoke(&InvokeHelper::StaticVoidFromString)));
-  mock.VoidFromString(nullptr);
-}
-
-// Tests the linkage of the WithoutArgs action.
-TEST(LinkTest, TestWithoutArgs) {
-  Mock mock;
-
-  EXPECT_CALL(mock, VoidFromString(_)).WillOnce(WithoutArgs(Return()));
-  mock.VoidFromString(nullptr);
-}
-
-// Tests the linkage of the DoAll action.
-TEST(LinkTest, TestDoAll) {
-  Mock mock;
-  char ch = 'x';
-
-  EXPECT_CALL(mock, VoidFromString(_))
-      .WillOnce(DoAll(SetArgPointee<0>('y'), Return()));
-  mock.VoidFromString(&ch);
-}
-
-// Tests the linkage of the DoDefault action.
-TEST(LinkTest, TestDoDefault) {
-  Mock mock;
-  char ch = 'x';
-
-  ON_CALL(mock, VoidFromString(_)).WillByDefault(Return());
-  EXPECT_CALL(mock, VoidFromString(_)).WillOnce(DoDefault());
-  mock.VoidFromString(&ch);
-}
-
-// Tests the linkage of the IgnoreResult action.
-TEST(LinkTest, TestIgnoreResult) {
-  Mock mock;
-
-  EXPECT_CALL(mock, VoidFromString(_)).WillOnce(IgnoreResult(Return(42)));
-  mock.VoidFromString(nullptr);
-}
-
-#if GTEST_HAS_EXCEPTIONS
-// Tests the linkage of the Throw action.
-TEST(LinkTest, TestThrow) {
-  Mock mock;
-
-  EXPECT_CALL(mock, VoidFromString(_)).WillOnce(Throw(42));
-  EXPECT_THROW(mock.VoidFromString(nullptr), int);
-}
-#endif  // GTEST_HAS_EXCEPTIONS
-
-// The ACTION*() macros trigger warning C4100 (unreferenced formal
-// parameter) in MSVC with -W4.  Unfortunately they cannot be fixed in
-// the macro definition, as the warnings are generated when the macro
-// is expanded and macro expansion cannot contain #pragma.  Therefore
-// we suppress them here.
-#ifdef _MSC_VER
-# pragma warning(push)
-# pragma warning(disable:4100)
-#endif
-
-// Tests the linkage of actions created using ACTION macro.
-namespace {
-ACTION(Return1) { return 1; }
-}
-
-TEST(LinkTest, TestActionMacro) {
-  Mock mock;
-
-  EXPECT_CALL(mock, IntFromString(_)).WillOnce(Return1());
-  mock.IntFromString(nullptr);
-}
-
-// Tests the linkage of actions created using ACTION_P macro.
-namespace {
-ACTION_P(ReturnArgument, ret_value) { return ret_value; }
-}
-
-TEST(LinkTest, TestActionPMacro) {
-  Mock mock;
-
-  EXPECT_CALL(mock, IntFromString(_)).WillOnce(ReturnArgument(42));
-  mock.IntFromString(nullptr);
-}
-
-// Tests the linkage of actions created using ACTION_P2 macro.
-namespace {
-ACTION_P2(ReturnEqualsEitherOf, first, second) {
-  return arg0 == first || arg0 == second;
-}
-}
-
-#ifdef _MSC_VER
-# pragma warning(pop)
-#endif
-
-TEST(LinkTest, TestActionP2Macro) {
-  Mock mock;
-  char ch = 'x';
-
-  EXPECT_CALL(mock, IntFromString(_))
-      .WillOnce(ReturnEqualsEitherOf("one", "two"));
-  mock.IntFromString(&ch);
-}
-
-// Tests the linkage of the "_" matcher.
-TEST(LinkTest, TestMatcherAnything) {
-  Mock mock;
-
-  ON_CALL(mock, VoidFromString(_)).WillByDefault(Return());
-}
-
-// Tests the linkage of the A matcher.
-TEST(LinkTest, TestMatcherA) {
-  Mock mock;
-
-  ON_CALL(mock, VoidFromString(A<char*>())).WillByDefault(Return());
-}
-
-// Tests the linkage of the Eq and the "bare value" matcher.
-TEST(LinkTest, TestMatchersEq) {
-  Mock mock;
-  const char* p = "x";
-
-  ON_CALL(mock, VoidFromString(Eq(p))).WillByDefault(Return());
-  ON_CALL(mock, VoidFromString(const_cast<char*>("y")))
-      .WillByDefault(Return());
-}
-
-// Tests the linkage of the Lt, Gt, Le, Ge, and Ne matchers.
-TEST(LinkTest, TestMatchersRelations) {
-  Mock mock;
-
-  ON_CALL(mock, VoidFromFloat(Lt(1.0f))).WillByDefault(Return());
-  ON_CALL(mock, VoidFromFloat(Gt(1.0f))).WillByDefault(Return());
-  ON_CALL(mock, VoidFromFloat(Le(1.0f))).WillByDefault(Return());
-  ON_CALL(mock, VoidFromFloat(Ge(1.0f))).WillByDefault(Return());
-  ON_CALL(mock, VoidFromFloat(Ne(1.0f))).WillByDefault(Return());
-}
-
-// Tests the linkage of the NotNull matcher.
-TEST(LinkTest, TestMatcherNotNull) {
-  Mock mock;
-
-  ON_CALL(mock, VoidFromString(NotNull())).WillByDefault(Return());
-}
-
-// Tests the linkage of the IsNull matcher.
-TEST(LinkTest, TestMatcherIsNull) {
-  Mock mock;
-
-  ON_CALL(mock, VoidFromString(IsNull())).WillByDefault(Return());
-}
-
-// Tests the linkage of the Ref matcher.
-TEST(LinkTest, TestMatcherRef) {
-  Mock mock;
-  int a = 0;
-
-  ON_CALL(mock, VoidFromIntRef(Ref(a))).WillByDefault(Return());
-}
-
-// Tests the linkage of the TypedEq matcher.
-TEST(LinkTest, TestMatcherTypedEq) {
-  Mock mock;
-  long a = 0;
-
-  ON_CALL(mock, VoidFromIntRef(TypedEq<int&>(a))).WillByDefault(Return());
-}
-
-// Tests the linkage of the FloatEq, DoubleEq, NanSensitiveFloatEq and
-// NanSensitiveDoubleEq matchers.
-TEST(LinkTest, TestMatchersFloatingPoint) {
-  Mock mock;
-  float a = 0;
-
-  ON_CALL(mock, VoidFromFloat(FloatEq(a))).WillByDefault(Return());
-  ON_CALL(mock, VoidFromDouble(DoubleEq(a))).WillByDefault(Return());
-  ON_CALL(mock, VoidFromFloat(NanSensitiveFloatEq(a))).WillByDefault(Return());
-  ON_CALL(mock, VoidFromDouble(NanSensitiveDoubleEq(a)))
-      .WillByDefault(Return());
-}
-
-// Tests the linkage of the ContainsRegex matcher.
-TEST(LinkTest, TestMatcherContainsRegex) {
-  Mock mock;
-
-  ON_CALL(mock, VoidFromString(ContainsRegex(".*"))).WillByDefault(Return());
-}
-
-// Tests the linkage of the MatchesRegex matcher.
-TEST(LinkTest, TestMatcherMatchesRegex) {
-  Mock mock;
-
-  ON_CALL(mock, VoidFromString(MatchesRegex(".*"))).WillByDefault(Return());
-}
-
-// Tests the linkage of the StartsWith, EndsWith, and HasSubstr matchers.
-TEST(LinkTest, TestMatchersSubstrings) {
-  Mock mock;
-
-  ON_CALL(mock, VoidFromString(StartsWith("a"))).WillByDefault(Return());
-  ON_CALL(mock, VoidFromString(EndsWith("c"))).WillByDefault(Return());
-  ON_CALL(mock, VoidFromString(HasSubstr("b"))).WillByDefault(Return());
-}
-
-// Tests the linkage of the StrEq, StrNe, StrCaseEq, and StrCaseNe matchers.
-TEST(LinkTest, TestMatchersStringEquality) {
-  Mock mock;
-  ON_CALL(mock, VoidFromString(StrEq("a"))).WillByDefault(Return());
-  ON_CALL(mock, VoidFromString(StrNe("a"))).WillByDefault(Return());
-  ON_CALL(mock, VoidFromString(StrCaseEq("a"))).WillByDefault(Return());
-  ON_CALL(mock, VoidFromString(StrCaseNe("a"))).WillByDefault(Return());
-}
-
-// Tests the linkage of the ElementsAre matcher.
-TEST(LinkTest, TestMatcherElementsAre) {
-  Mock mock;
-
-  ON_CALL(mock, VoidFromVector(ElementsAre('a', _))).WillByDefault(Return());
-}
-
-// Tests the linkage of the ElementsAreArray matcher.
-TEST(LinkTest, TestMatcherElementsAreArray) {
-  Mock mock;
-  char arr[] = { 'a', 'b' };
-
-  ON_CALL(mock, VoidFromVector(ElementsAreArray(arr))).WillByDefault(Return());
-}
-
-// Tests the linkage of the IsSubsetOf matcher.
-TEST(LinkTest, TestMatcherIsSubsetOf) {
-  Mock mock;
-  char arr[] = {'a', 'b'};
-
-  ON_CALL(mock, VoidFromVector(IsSubsetOf(arr))).WillByDefault(Return());
-}
-
-// Tests the linkage of the IsSupersetOf matcher.
-TEST(LinkTest, TestMatcherIsSupersetOf) {
-  Mock mock;
-  char arr[] = {'a', 'b'};
-
-  ON_CALL(mock, VoidFromVector(IsSupersetOf(arr))).WillByDefault(Return());
-}
-
-// Tests the linkage of the ContainerEq matcher.
-TEST(LinkTest, TestMatcherContainerEq) {
-  Mock mock;
-  std::vector<int> v;
-
-  ON_CALL(mock, VoidFromVector(ContainerEq(v))).WillByDefault(Return());
-}
-
-// Tests the linkage of the Field matcher.
-TEST(LinkTest, TestMatcherField) {
-  FieldHelper helper(0);
-
-  Matcher<const FieldHelper&> m = Field(&FieldHelper::field_, Eq(0));
-  EXPECT_TRUE(m.Matches(helper));
-
-  Matcher<const FieldHelper*> m2 = Field(&FieldHelper::field_, Eq(0));
-  EXPECT_TRUE(m2.Matches(&helper));
-}
-
-// Tests the linkage of the Property matcher.
-TEST(LinkTest, TestMatcherProperty) {
-  FieldHelper helper(0);
-
-  Matcher<const FieldHelper&> m = Property(&FieldHelper::field, Eq(0));
-  EXPECT_TRUE(m.Matches(helper));
-
-  Matcher<const FieldHelper*> m2 = Property(&FieldHelper::field, Eq(0));
-  EXPECT_TRUE(m2.Matches(&helper));
-}
-
-// Tests the linkage of the ResultOf matcher.
-TEST(LinkTest, TestMatcherResultOf) {
-  Matcher<char*> m = ResultOf(&InvokeHelper::StaticIntFromString, Eq(1));
-  EXPECT_TRUE(m.Matches(nullptr));
-}
-
-// Tests the linkage of the ResultOf matcher.
-TEST(LinkTest, TestMatcherPointee) {
-  int n = 1;
-
-  Matcher<int*> m = Pointee(Eq(1));
-  EXPECT_TRUE(m.Matches(&n));
-}
-
-// Tests the linkage of the Truly matcher.
-TEST(LinkTest, TestMatcherTruly) {
-  Matcher<const char*> m = Truly(&InvokeHelper::StaticBoolFromString);
-  EXPECT_TRUE(m.Matches(nullptr));
-}
-
-// Tests the linkage of the AllOf matcher.
-TEST(LinkTest, TestMatcherAllOf) {
-  Matcher<int> m = AllOf(_, Eq(1));
-  EXPECT_TRUE(m.Matches(1));
-}
-
-// Tests the linkage of the AnyOf matcher.
-TEST(LinkTest, TestMatcherAnyOf) {
-  Matcher<int> m = AnyOf(_, Eq(1));
-  EXPECT_TRUE(m.Matches(1));
-}
-
-// Tests the linkage of the Not matcher.
-TEST(LinkTest, TestMatcherNot) {
-  Matcher<int> m = Not(_);
-  EXPECT_FALSE(m.Matches(1));
-}
-
-// Tests the linkage of the MatcherCast<T>() function.
-TEST(LinkTest, TestMatcherCast) {
-  Matcher<const char*> m = MatcherCast<const char*>(_);
-  EXPECT_TRUE(m.Matches(nullptr));
-}
-
-#endif  // GOOGLEMOCK_TEST_GMOCK_LINK_TEST_H_
diff --git a/src/include/gromacs/external/googletest/googletest/include/gtest/gtest-death-test.h b/src/include/gromacs/external/googletest/googletest/include/gtest/gtest-death-test.h
deleted file mode 100644 (file)
index 33effe1..0000000
+++ /dev/null
@@ -1,343 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-//
-// The Google C++ Testing and Mocking Framework (Google Test)
-//
-// This header file defines the public API for death tests.  It is
-// #included by gtest.h so a user doesn't need to include this
-// directly.
-
-#ifndef GOOGLETEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_
-#define GOOGLETEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_
-
-#include "gtest/internal/gtest-death-test-internal.h"
-
-// This flag controls the style of death tests.  Valid values are "threadsafe",
-// meaning that the death test child process will re-execute the test binary
-// from the start, running only a single death test, or "fast",
-// meaning that the child process will execute the test logic immediately
-// after forking.
-GTEST_DECLARE_string_(death_test_style);
-
-namespace testing {
-
-#if GTEST_HAS_DEATH_TEST
-
-namespace internal {
-
-// Returns a Boolean value indicating whether the caller is currently
-// executing in the context of the death test child process.  Tools such as
-// Valgrind heap checkers may need this to modify their behavior in death
-// tests.  IMPORTANT: This is an internal utility.  Using it may break the
-// implementation of death tests.  User code MUST NOT use it.
-GTEST_API_ bool InDeathTestChild();
-
-}  // namespace internal
-
-// The following macros are useful for writing death tests.
-
-// Here's what happens when an ASSERT_DEATH* or EXPECT_DEATH* is
-// executed:
-//
-//   1. It generates a warning if there is more than one active
-//   thread.  This is because it's safe to fork() or clone() only
-//   when there is a single thread.
-//
-//   2. The parent process clone()s a sub-process and runs the death
-//   test in it; the sub-process exits with code 0 at the end of the
-//   death test, if it hasn't exited already.
-//
-//   3. The parent process waits for the sub-process to terminate.
-//
-//   4. The parent process checks the exit code and error message of
-//   the sub-process.
-//
-// Examples:
-//
-//   ASSERT_DEATH(server.SendMessage(56, "Hello"), "Invalid port number");
-//   for (int i = 0; i < 5; i++) {
-//     EXPECT_DEATH(server.ProcessRequest(i),
-//                  "Invalid request .* in ProcessRequest()")
-//                  << "Failed to die on request " << i;
-//   }
-//
-//   ASSERT_EXIT(server.ExitNow(), ::testing::ExitedWithCode(0), "Exiting");
-//
-//   bool KilledBySIGHUP(int exit_code) {
-//     return WIFSIGNALED(exit_code) && WTERMSIG(exit_code) == SIGHUP;
-//   }
-//
-//   ASSERT_EXIT(client.HangUpServer(), KilledBySIGHUP, "Hanging up!");
-//
-// The final parameter to each of these macros is a matcher applied to any data
-// the sub-process wrote to stderr.  For compatibility with existing tests, a
-// bare string is interpreted as a regular expression matcher.
-//
-// On the regular expressions used in death tests:
-//
-//   On POSIX-compliant systems (*nix), we use the <regex.h> library,
-//   which uses the POSIX extended regex syntax.
-//
-//   On other platforms (e.g. Windows or Mac), we only support a simple regex
-//   syntax implemented as part of Google Test.  This limited
-//   implementation should be enough most of the time when writing
-//   death tests; though it lacks many features you can find in PCRE
-//   or POSIX extended regex syntax.  For example, we don't support
-//   union ("x|y"), grouping ("(xy)"), brackets ("[xy]"), and
-//   repetition count ("x{5,7}"), among others.
-//
-//   Below is the syntax that we do support.  We chose it to be a
-//   subset of both PCRE and POSIX extended regex, so it's easy to
-//   learn wherever you come from.  In the following: 'A' denotes a
-//   literal character, period (.), or a single \\ escape sequence;
-//   'x' and 'y' denote regular expressions; 'm' and 'n' are for
-//   natural numbers.
-//
-//     c     matches any literal character c
-//     \\d   matches any decimal digit
-//     \\D   matches any character that's not a decimal digit
-//     \\f   matches \f
-//     \\n   matches \n
-//     \\r   matches \r
-//     \\s   matches any ASCII whitespace, including \n
-//     \\S   matches any character that's not a whitespace
-//     \\t   matches \t
-//     \\v   matches \v
-//     \\w   matches any letter, _, or decimal digit
-//     \\W   matches any character that \\w doesn't match
-//     \\c   matches any literal character c, which must be a punctuation
-//     .     matches any single character except \n
-//     A?    matches 0 or 1 occurrences of A
-//     A*    matches 0 or many occurrences of A
-//     A+    matches 1 or many occurrences of A
-//     ^     matches the beginning of a string (not that of each line)
-//     $     matches the end of a string (not that of each line)
-//     xy    matches x followed by y
-//
-//   If you accidentally use PCRE or POSIX extended regex features
-//   not implemented by us, you will get a run-time failure.  In that
-//   case, please try to rewrite your regular expression within the
-//   above syntax.
-//
-//   This implementation is *not* meant to be as highly tuned or robust
-//   as a compiled regex library, but should perform well enough for a
-//   death test, which already incurs significant overhead by launching
-//   a child process.
-//
-// Known caveats:
-//
-//   A "threadsafe" style death test obtains the path to the test
-//   program from argv[0] and re-executes it in the sub-process.  For
-//   simplicity, the current implementation doesn't search the PATH
-//   when launching the sub-process.  This means that the user must
-//   invoke the test program via a path that contains at least one
-//   path separator (e.g. path/to/foo_test and
-//   /absolute/path/to/bar_test are fine, but foo_test is not).  This
-//   is rarely a problem as people usually don't put the test binary
-//   directory in PATH.
-//
-
-// Asserts that a given `statement` causes the program to exit, with an
-// integer exit status that satisfies `predicate`, and emitting error output
-// that matches `matcher`.
-# define ASSERT_EXIT(statement, predicate, matcher) \
-    GTEST_DEATH_TEST_(statement, predicate, matcher, GTEST_FATAL_FAILURE_)
-
-// Like `ASSERT_EXIT`, but continues on to successive tests in the
-// test suite, if any:
-# define EXPECT_EXIT(statement, predicate, matcher) \
-    GTEST_DEATH_TEST_(statement, predicate, matcher, GTEST_NONFATAL_FAILURE_)
-
-// Asserts that a given `statement` causes the program to exit, either by
-// explicitly exiting with a nonzero exit code or being killed by a
-// signal, and emitting error output that matches `matcher`.
-# define ASSERT_DEATH(statement, matcher) \
-    ASSERT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, matcher)
-
-// Like `ASSERT_DEATH`, but continues on to successive tests in the
-// test suite, if any:
-# define EXPECT_DEATH(statement, matcher) \
-    EXPECT_EXIT(statement, ::testing::internal::ExitedUnsuccessfully, matcher)
-
-// Two predicate classes that can be used in {ASSERT,EXPECT}_EXIT*:
-
-// Tests that an exit code describes a normal exit with a given exit code.
-class GTEST_API_ ExitedWithCode {
- public:
-  explicit ExitedWithCode(int exit_code);
-  ExitedWithCode(const ExitedWithCode&) = default;
-  void operator=(const ExitedWithCode& other) = delete;
-  bool operator()(int exit_status) const;
- private:
-  const int exit_code_;
-};
-
-# if !GTEST_OS_WINDOWS && !GTEST_OS_FUCHSIA
-// Tests that an exit code describes an exit due to termination by a
-// given signal.
-class GTEST_API_ KilledBySignal {
- public:
-  explicit KilledBySignal(int signum);
-  bool operator()(int exit_status) const;
- private:
-  const int signum_;
-};
-# endif  // !GTEST_OS_WINDOWS
-
-// EXPECT_DEBUG_DEATH asserts that the given statements die in debug mode.
-// The death testing framework causes this to have interesting semantics,
-// since the sideeffects of the call are only visible in opt mode, and not
-// in debug mode.
-//
-// In practice, this can be used to test functions that utilize the
-// LOG(DFATAL) macro using the following style:
-//
-// int DieInDebugOr12(int* sideeffect) {
-//   if (sideeffect) {
-//     *sideeffect = 12;
-//   }
-//   LOG(DFATAL) << "death";
-//   return 12;
-// }
-//
-// TEST(TestSuite, TestDieOr12WorksInDgbAndOpt) {
-//   int sideeffect = 0;
-//   // Only asserts in dbg.
-//   EXPECT_DEBUG_DEATH(DieInDebugOr12(&sideeffect), "death");
-//
-// #ifdef NDEBUG
-//   // opt-mode has sideeffect visible.
-//   EXPECT_EQ(12, sideeffect);
-// #else
-//   // dbg-mode no visible sideeffect.
-//   EXPECT_EQ(0, sideeffect);
-// #endif
-// }
-//
-// This will assert that DieInDebugReturn12InOpt() crashes in debug
-// mode, usually due to a DCHECK or LOG(DFATAL), but returns the
-// appropriate fallback value (12 in this case) in opt mode. If you
-// need to test that a function has appropriate side-effects in opt
-// mode, include assertions against the side-effects.  A general
-// pattern for this is:
-//
-// EXPECT_DEBUG_DEATH({
-//   // Side-effects here will have an effect after this statement in
-//   // opt mode, but none in debug mode.
-//   EXPECT_EQ(12, DieInDebugOr12(&sideeffect));
-// }, "death");
-//
-# ifdef NDEBUG
-
-#  define EXPECT_DEBUG_DEATH(statement, regex) \
-  GTEST_EXECUTE_STATEMENT_(statement, regex)
-
-#  define ASSERT_DEBUG_DEATH(statement, regex) \
-  GTEST_EXECUTE_STATEMENT_(statement, regex)
-
-# else
-
-#  define EXPECT_DEBUG_DEATH(statement, regex) \
-  EXPECT_DEATH(statement, regex)
-
-#  define ASSERT_DEBUG_DEATH(statement, regex) \
-  ASSERT_DEATH(statement, regex)
-
-# endif  // NDEBUG for EXPECT_DEBUG_DEATH
-#endif  // GTEST_HAS_DEATH_TEST
-
-// This macro is used for implementing macros such as
-// EXPECT_DEATH_IF_SUPPORTED and ASSERT_DEATH_IF_SUPPORTED on systems where
-// death tests are not supported. Those macros must compile on such systems
-// if and only if EXPECT_DEATH and ASSERT_DEATH compile with the same parameters
-// on systems that support death tests. This allows one to write such a macro on
-// a system that does not support death tests and be sure that it will compile
-// on a death-test supporting system. It is exposed publicly so that systems
-// that have death-tests with stricter requirements than GTEST_HAS_DEATH_TEST
-// can write their own equivalent of EXPECT_DEATH_IF_SUPPORTED and
-// ASSERT_DEATH_IF_SUPPORTED.
-//
-// Parameters:
-//   statement -  A statement that a macro such as EXPECT_DEATH would test
-//                for program termination. This macro has to make sure this
-//                statement is compiled but not executed, to ensure that
-//                EXPECT_DEATH_IF_SUPPORTED compiles with a certain
-//                parameter if and only if EXPECT_DEATH compiles with it.
-//   regex     -  A regex that a macro such as EXPECT_DEATH would use to test
-//                the output of statement.  This parameter has to be
-//                compiled but not evaluated by this macro, to ensure that
-//                this macro only accepts expressions that a macro such as
-//                EXPECT_DEATH would accept.
-//   terminator - Must be an empty statement for EXPECT_DEATH_IF_SUPPORTED
-//                and a return statement for ASSERT_DEATH_IF_SUPPORTED.
-//                This ensures that ASSERT_DEATH_IF_SUPPORTED will not
-//                compile inside functions where ASSERT_DEATH doesn't
-//                compile.
-//
-//  The branch that has an always false condition is used to ensure that
-//  statement and regex are compiled (and thus syntactically correct) but
-//  never executed. The unreachable code macro protects the terminator
-//  statement from generating an 'unreachable code' warning in case
-//  statement unconditionally returns or throws. The Message constructor at
-//  the end allows the syntax of streaming additional messages into the
-//  macro, for compilational compatibility with EXPECT_DEATH/ASSERT_DEATH.
-# define GTEST_UNSUPPORTED_DEATH_TEST(statement, regex, terminator) \
-    GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
-    if (::testing::internal::AlwaysTrue()) { \
-      GTEST_LOG_(WARNING) \
-          << "Death tests are not supported on this platform.\n" \
-          << "Statement '" #statement "' cannot be verified."; \
-    } else if (::testing::internal::AlwaysFalse()) { \
-      ::testing::internal::RE::PartialMatch(".*", (regex)); \
-      GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
-      terminator; \
-    } else \
-      ::testing::Message()
-
-// EXPECT_DEATH_IF_SUPPORTED(statement, regex) and
-// ASSERT_DEATH_IF_SUPPORTED(statement, regex) expand to real death tests if
-// death tests are supported; otherwise they just issue a warning.  This is
-// useful when you are combining death test assertions with normal test
-// assertions in one test.
-#if GTEST_HAS_DEATH_TEST
-# define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \
-    EXPECT_DEATH(statement, regex)
-# define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \
-    ASSERT_DEATH(statement, regex)
-#else
-# define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \
-    GTEST_UNSUPPORTED_DEATH_TEST(statement, regex, )
-# define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \
-    GTEST_UNSUPPORTED_DEATH_TEST(statement, regex, return)
-#endif
-
-}  // namespace testing
-
-#endif  // GOOGLETEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_
diff --git a/src/include/gromacs/external/googletest/googletest/include/gtest/gtest-matchers.h b/src/include/gromacs/external/googletest/googletest/include/gtest/gtest-matchers.h
deleted file mode 100644 (file)
index 575d136..0000000
+++ /dev/null
@@ -1,934 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The Google C++ Testing and Mocking Framework (Google Test)
-//
-// This file implements just enough of the matcher interface to allow
-// EXPECT_DEATH and friends to accept a matcher argument.
-
-#ifndef GOOGLETEST_INCLUDE_GTEST_GTEST_MATCHERS_H_
-#define GOOGLETEST_INCLUDE_GTEST_GTEST_MATCHERS_H_
-
-#include <atomic>
-#include <memory>
-#include <ostream>
-#include <string>
-#include <type_traits>
-
-#include "gtest/gtest-printers.h"
-#include "gtest/internal/gtest-internal.h"
-#include "gtest/internal/gtest-port.h"
-
-// MSVC warning C5046 is new as of VS2017 version 15.8.
-#if defined(_MSC_VER) && _MSC_VER >= 1915
-#define GTEST_MAYBE_5046_ 5046
-#else
-#define GTEST_MAYBE_5046_
-#endif
-
-GTEST_DISABLE_MSC_WARNINGS_PUSH_(
-    4251 GTEST_MAYBE_5046_ /* class A needs to have dll-interface to be used by
-                              clients of class B */
-    /* Symbol involving type with internal linkage not defined */)
-
-namespace testing {
-
-// To implement a matcher Foo for type T, define:
-//   1. a class FooMatcherMatcher that implements the matcher interface:
-//     using is_gtest_matcher = void;
-//     bool MatchAndExplain(const T&, std::ostream*);
-//       (MatchResultListener* can also be used instead of std::ostream*)
-//     void DescribeTo(std::ostream*);
-//     void DescribeNegationTo(std::ostream*);
-//
-//   2. a factory function that creates a Matcher<T> object from a
-//      FooMatcherMatcher.
-
-class MatchResultListener {
- public:
-  // Creates a listener object with the given underlying ostream.  The
-  // listener does not own the ostream, and does not dereference it
-  // in the constructor or destructor.
-  explicit MatchResultListener(::std::ostream* os) : stream_(os) {}
-  virtual ~MatchResultListener() = 0;  // Makes this class abstract.
-
-  // Streams x to the underlying ostream; does nothing if the ostream
-  // is NULL.
-  template <typename T>
-  MatchResultListener& operator<<(const T& x) {
-    if (stream_ != nullptr) *stream_ << x;
-    return *this;
-  }
-
-  // Returns the underlying ostream.
-  ::std::ostream* stream() { return stream_; }
-
-  // Returns true if and only if the listener is interested in an explanation
-  // of the match result.  A matcher's MatchAndExplain() method can use
-  // this information to avoid generating the explanation when no one
-  // intends to hear it.
-  bool IsInterested() const { return stream_ != nullptr; }
-
- private:
-  ::std::ostream* const stream_;
-
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(MatchResultListener);
-};
-
-inline MatchResultListener::~MatchResultListener() {
-}
-
-// An instance of a subclass of this knows how to describe itself as a
-// matcher.
-class GTEST_API_ MatcherDescriberInterface {
- public:
-  virtual ~MatcherDescriberInterface() {}
-
-  // Describes this matcher to an ostream.  The function should print
-  // a verb phrase that describes the property a value matching this
-  // matcher should have.  The subject of the verb phrase is the value
-  // being matched.  For example, the DescribeTo() method of the Gt(7)
-  // matcher prints "is greater than 7".
-  virtual void DescribeTo(::std::ostream* os) const = 0;
-
-  // Describes the negation of this matcher to an ostream.  For
-  // example, if the description of this matcher is "is greater than
-  // 7", the negated description could be "is not greater than 7".
-  // You are not required to override this when implementing
-  // MatcherInterface, but it is highly advised so that your matcher
-  // can produce good error messages.
-  virtual void DescribeNegationTo(::std::ostream* os) const {
-    *os << "not (";
-    DescribeTo(os);
-    *os << ")";
-  }
-};
-
-// The implementation of a matcher.
-template <typename T>
-class MatcherInterface : public MatcherDescriberInterface {
- public:
-  // Returns true if and only if the matcher matches x; also explains the
-  // match result to 'listener' if necessary (see the next paragraph), in
-  // the form of a non-restrictive relative clause ("which ...",
-  // "whose ...", etc) that describes x.  For example, the
-  // MatchAndExplain() method of the Pointee(...) matcher should
-  // generate an explanation like "which points to ...".
-  //
-  // Implementations of MatchAndExplain() should add an explanation of
-  // the match result *if and only if* they can provide additional
-  // information that's not already present (or not obvious) in the
-  // print-out of x and the matcher's description.  Whether the match
-  // succeeds is not a factor in deciding whether an explanation is
-  // needed, as sometimes the caller needs to print a failure message
-  // when the match succeeds (e.g. when the matcher is used inside
-  // Not()).
-  //
-  // For example, a "has at least 10 elements" matcher should explain
-  // what the actual element count is, regardless of the match result,
-  // as it is useful information to the reader; on the other hand, an
-  // "is empty" matcher probably only needs to explain what the actual
-  // size is when the match fails, as it's redundant to say that the
-  // size is 0 when the value is already known to be empty.
-  //
-  // You should override this method when defining a new matcher.
-  //
-  // It's the responsibility of the caller (Google Test) to guarantee
-  // that 'listener' is not NULL.  This helps to simplify a matcher's
-  // implementation when it doesn't care about the performance, as it
-  // can talk to 'listener' without checking its validity first.
-  // However, in order to implement dummy listeners efficiently,
-  // listener->stream() may be NULL.
-  virtual bool MatchAndExplain(T x, MatchResultListener* listener) const = 0;
-
-  // Inherits these methods from MatcherDescriberInterface:
-  //   virtual void DescribeTo(::std::ostream* os) const = 0;
-  //   virtual void DescribeNegationTo(::std::ostream* os) const;
-};
-
-namespace internal {
-
-struct AnyEq {
-  template <typename A, typename B>
-  bool operator()(const A& a, const B& b) const { return a == b; }
-};
-struct AnyNe {
-  template <typename A, typename B>
-  bool operator()(const A& a, const B& b) const { return a != b; }
-};
-struct AnyLt {
-  template <typename A, typename B>
-  bool operator()(const A& a, const B& b) const { return a < b; }
-};
-struct AnyGt {
-  template <typename A, typename B>
-  bool operator()(const A& a, const B& b) const { return a > b; }
-};
-struct AnyLe {
-  template <typename A, typename B>
-  bool operator()(const A& a, const B& b) const { return a <= b; }
-};
-struct AnyGe {
-  template <typename A, typename B>
-  bool operator()(const A& a, const B& b) const { return a >= b; }
-};
-
-// A match result listener that ignores the explanation.
-class DummyMatchResultListener : public MatchResultListener {
- public:
-  DummyMatchResultListener() : MatchResultListener(nullptr) {}
-
- private:
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(DummyMatchResultListener);
-};
-
-// A match result listener that forwards the explanation to a given
-// ostream.  The difference between this and MatchResultListener is
-// that the former is concrete.
-class StreamMatchResultListener : public MatchResultListener {
- public:
-  explicit StreamMatchResultListener(::std::ostream* os)
-      : MatchResultListener(os) {}
-
- private:
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(StreamMatchResultListener);
-};
-
-struct SharedPayloadBase {
-  std::atomic<int> ref{1};
-  void Ref() { ref.fetch_add(1, std::memory_order_relaxed); }
-  bool Unref() { return ref.fetch_sub(1, std::memory_order_acq_rel) == 1; }
-};
-
-template <typename T>
-struct SharedPayload : SharedPayloadBase {
-  explicit SharedPayload(const T& v) : value(v) {}
-  explicit SharedPayload(T&& v) : value(std::move(v)) {}
-
-  static void Destroy(SharedPayloadBase* shared) {
-    delete static_cast<SharedPayload*>(shared);
-  }
-
-  T value;
-};
-
-// An internal class for implementing Matcher<T>, which will derive
-// from it.  We put functionalities common to all Matcher<T>
-// specializations here to avoid code duplication.
-template <typename T>
-class MatcherBase : private MatcherDescriberInterface {
- public:
-  // Returns true if and only if the matcher matches x; also explains the
-  // match result to 'listener'.
-  bool MatchAndExplain(const T& x, MatchResultListener* listener) const {
-    GTEST_CHECK_(vtable_ != nullptr);
-    return vtable_->match_and_explain(*this, x, listener);
-  }
-
-  // Returns true if and only if this matcher matches x.
-  bool Matches(const T& x) const {
-    DummyMatchResultListener dummy;
-    return MatchAndExplain(x, &dummy);
-  }
-
-  // Describes this matcher to an ostream.
-  void DescribeTo(::std::ostream* os) const final {
-    GTEST_CHECK_(vtable_ != nullptr);
-    vtable_->describe(*this, os, false);
-  }
-
-  // Describes the negation of this matcher to an ostream.
-  void DescribeNegationTo(::std::ostream* os) const final {
-    GTEST_CHECK_(vtable_ != nullptr);
-    vtable_->describe(*this, os, true);
-  }
-
-  // Explains why x matches, or doesn't match, the matcher.
-  void ExplainMatchResultTo(const T& x, ::std::ostream* os) const {
-    StreamMatchResultListener listener(os);
-    MatchAndExplain(x, &listener);
-  }
-
-  // Returns the describer for this matcher object; retains ownership
-  // of the describer, which is only guaranteed to be alive when
-  // this matcher object is alive.
-  const MatcherDescriberInterface* GetDescriber() const {
-    if (vtable_ == nullptr) return nullptr;
-    return vtable_->get_describer(*this);
-  }
-
- protected:
-  MatcherBase() : vtable_(nullptr) {}
-
-  // Constructs a matcher from its implementation.
-  template <typename U>
-  explicit MatcherBase(const MatcherInterface<U>* impl) {
-    Init(impl);
-  }
-
-  template <typename M, typename = typename std::remove_reference<
-                            M>::type::is_gtest_matcher>
-  MatcherBase(M&& m) {  // NOLINT
-    Init(std::forward<M>(m));
-  }
-
-  MatcherBase(const MatcherBase& other)
-      : vtable_(other.vtable_), buffer_(other.buffer_) {
-#ifndef __clang_analyzer__
-    if (IsShared()) buffer_.shared->Ref();
-#endif
-  }
-
-  MatcherBase& operator=(const MatcherBase& other) {
-    if (this == &other) return *this;
-    Destroy();
-    vtable_ = other.vtable_;
-    buffer_ = other.buffer_;
-    if (IsShared()) buffer_.shared->Ref();
-    return *this;
-  }
-
-  MatcherBase(MatcherBase&& other)
-      : vtable_(other.vtable_), buffer_(other.buffer_) {
-    other.vtable_ = nullptr;
-  }
-
-  MatcherBase& operator=(MatcherBase&& other) {
-    if (this == &other) return *this;
-    Destroy();
-    vtable_ = other.vtable_;
-    buffer_ = other.buffer_;
-    other.vtable_ = nullptr;
-    return *this;
-  }
-
-  ~MatcherBase() override { Destroy(); }
-
- private:
-  struct VTable {
-    bool (*match_and_explain)(const MatcherBase&, const T&,
-                              MatchResultListener*);
-    void (*describe)(const MatcherBase&, std::ostream*, bool negation);
-    // Returns the captured object if it implements the interface, otherwise
-    // returns the MatcherBase itself.
-    const MatcherDescriberInterface* (*get_describer)(const MatcherBase&);
-    // Called on shared instances when the reference count reaches 0.
-    void (*shared_destroy)(SharedPayloadBase*);
-  };
-
-  bool IsShared() const {
-    return vtable_ != nullptr && vtable_->shared_destroy != nullptr;
-  }
-
-  // If the implementation uses a listener, call that.
-  template <typename P>
-  static auto MatchAndExplainImpl(const MatcherBase& m, const T& value,
-                                  MatchResultListener* listener)
-      -> decltype(P::Get(m).MatchAndExplain(value, listener->stream())) {
-    return P::Get(m).MatchAndExplain(value, listener->stream());
-  }
-
-  template <typename P>
-  static auto MatchAndExplainImpl(const MatcherBase& m, const T& value,
-                                  MatchResultListener* listener)
-      -> decltype(P::Get(m).MatchAndExplain(value, listener)) {
-    return P::Get(m).MatchAndExplain(value, listener);
-  }
-
-  template <typename P>
-  static void DescribeImpl(const MatcherBase& m, std::ostream* os,
-                           bool negation) {
-    if (negation) {
-      P::Get(m).DescribeNegationTo(os);
-    } else {
-      P::Get(m).DescribeTo(os);
-    }
-  }
-
-  template <typename P>
-  static const MatcherDescriberInterface* GetDescriberImpl(
-      const MatcherBase& m) {
-    // If the impl is a MatcherDescriberInterface, then return it.
-    // Otherwise use MatcherBase itself.
-    // This allows us to implement the GetDescriber() function without support
-    // from the impl, but some users really want to get their impl back when
-    // they call GetDescriber().
-    // We use std::get on a tuple as a workaround of not having `if constexpr`.
-    return std::get<(
-        std::is_convertible<decltype(&P::Get(m)),
-                            const MatcherDescriberInterface*>::value
-            ? 1
-            : 0)>(std::make_tuple(&m, &P::Get(m)));
-  }
-
-  template <typename P>
-  const VTable* GetVTable() {
-    static constexpr VTable kVTable = {&MatchAndExplainImpl<P>,
-                                       &DescribeImpl<P>, &GetDescriberImpl<P>,
-                                       P::shared_destroy};
-    return &kVTable;
-  }
-
-  union Buffer {
-    // Add some types to give Buffer some common alignment/size use cases.
-    void* ptr;
-    double d;
-    int64_t i;
-    // And add one for the out-of-line cases.
-    SharedPayloadBase* shared;
-  };
-
-  void Destroy() {
-#ifndef __clang_analyzer__
-      if (IsShared() && buffer_.shared->Unref()) {
-      vtable_->shared_destroy(buffer_.shared);
-    }
-#endif
-  }
-
-  template <typename M>
-  static constexpr bool IsInlined() {
-    return sizeof(M) <= sizeof(Buffer) && alignof(M) <= alignof(Buffer) &&
-           std::is_trivially_copy_constructible<M>::value &&
-           std::is_trivially_destructible<M>::value;
-  }
-
-  template <typename M, bool = MatcherBase::IsInlined<M>()>
-  struct ValuePolicy {
-    static const M& Get(const MatcherBase& m) {
-      // When inlined along with Init, need to be explicit to avoid violating
-      // strict aliasing rules.
-      const M *ptr = static_cast<const M*>(
-          static_cast<const void*>(&m.buffer_));
-      return *ptr;
-    }
-    static void Init(MatcherBase& m, M impl) {
-      ::new (static_cast<void*>(&m.buffer_)) M(impl);
-    }
-    static constexpr auto shared_destroy = nullptr;
-  };
-
-  template <typename M>
-  struct ValuePolicy<M, false> {
-    using Shared = SharedPayload<M>;
-    static const M& Get(const MatcherBase& m) {
-      return static_cast<Shared*>(m.buffer_.shared)->value;
-    }
-    template <typename Arg>
-    static void Init(MatcherBase& m, Arg&& arg) {
-      m.buffer_.shared = new Shared(std::forward<Arg>(arg));
-    }
-    static constexpr auto shared_destroy = &Shared::Destroy;
-  };
-
-  template <typename U, bool B>
-  struct ValuePolicy<const MatcherInterface<U>*, B> {
-    using M = const MatcherInterface<U>;
-    using Shared = SharedPayload<std::unique_ptr<M>>;
-    static const M& Get(const MatcherBase& m) {
-      return *static_cast<Shared*>(m.buffer_.shared)->value;
-    }
-    static void Init(MatcherBase& m, M* impl) {
-      m.buffer_.shared = new Shared(std::unique_ptr<M>(impl));
-    }
-
-    static constexpr auto shared_destroy = &Shared::Destroy;
-  };
-
-  template <typename M>
-  void Init(M&& m) {
-    using MM = typename std::decay<M>::type;
-    using Policy = ValuePolicy<MM>;
-    vtable_ = GetVTable<Policy>();
-    Policy::Init(*this, std::forward<M>(m));
-  }
-
-  const VTable* vtable_;
-  Buffer buffer_;
-};
-
-}  // namespace internal
-
-// A Matcher<T> is a copyable and IMMUTABLE (except by assignment)
-// object that can check whether a value of type T matches.  The
-// implementation of Matcher<T> is just a std::shared_ptr to const
-// MatcherInterface<T>.  Don't inherit from Matcher!
-template <typename T>
-class Matcher : public internal::MatcherBase<T> {
- public:
-  // Constructs a null matcher.  Needed for storing Matcher objects in STL
-  // containers.  A default-constructed matcher is not yet initialized.  You
-  // cannot use it until a valid value has been assigned to it.
-  explicit Matcher() {}  // NOLINT
-
-  // Constructs a matcher from its implementation.
-  explicit Matcher(const MatcherInterface<const T&>* impl)
-      : internal::MatcherBase<T>(impl) {}
-
-  template <typename U>
-  explicit Matcher(
-      const MatcherInterface<U>* impl,
-      typename std::enable_if<!std::is_same<U, const U&>::value>::type* =
-          nullptr)
-      : internal::MatcherBase<T>(impl) {}
-
-  template <typename M, typename = typename std::remove_reference<
-                            M>::type::is_gtest_matcher>
-  Matcher(M&& m) : internal::MatcherBase<T>(std::forward<M>(m)) {}  // NOLINT
-
-  // Implicit constructor here allows people to write
-  // EXPECT_CALL(foo, Bar(5)) instead of EXPECT_CALL(foo, Bar(Eq(5))) sometimes
-  Matcher(T value);  // NOLINT
-};
-
-// The following two specializations allow the user to write str
-// instead of Eq(str) and "foo" instead of Eq("foo") when a std::string
-// matcher is expected.
-template <>
-class GTEST_API_ Matcher<const std::string&>
-    : public internal::MatcherBase<const std::string&> {
- public:
-  Matcher() {}
-
-  explicit Matcher(const MatcherInterface<const std::string&>* impl)
-      : internal::MatcherBase<const std::string&>(impl) {}
-
-  template <typename M, typename = typename std::remove_reference<
-                            M>::type::is_gtest_matcher>
-  Matcher(M&& m)  // NOLINT
-      : internal::MatcherBase<const std::string&>(std::forward<M>(m)) {}
-
-  // Allows the user to write str instead of Eq(str) sometimes, where
-  // str is a std::string object.
-  Matcher(const std::string& s);  // NOLINT
-
-  // Allows the user to write "foo" instead of Eq("foo") sometimes.
-  Matcher(const char* s);  // NOLINT
-};
-
-template <>
-class GTEST_API_ Matcher<std::string>
-    : public internal::MatcherBase<std::string> {
- public:
-  Matcher() {}
-
-  explicit Matcher(const MatcherInterface<const std::string&>* impl)
-      : internal::MatcherBase<std::string>(impl) {}
-  explicit Matcher(const MatcherInterface<std::string>* impl)
-      : internal::MatcherBase<std::string>(impl) {}
-
-  template <typename M, typename = typename std::remove_reference<
-                            M>::type::is_gtest_matcher>
-  Matcher(M&& m)  // NOLINT
-      : internal::MatcherBase<std::string>(std::forward<M>(m)) {}
-
-  // Allows the user to write str instead of Eq(str) sometimes, where
-  // str is a string object.
-  Matcher(const std::string& s);  // NOLINT
-
-  // Allows the user to write "foo" instead of Eq("foo") sometimes.
-  Matcher(const char* s);  // NOLINT
-};
-
-#if GTEST_INTERNAL_HAS_STRING_VIEW
-// The following two specializations allow the user to write str
-// instead of Eq(str) and "foo" instead of Eq("foo") when a absl::string_view
-// matcher is expected.
-template <>
-class GTEST_API_ Matcher<const internal::StringView&>
-    : public internal::MatcherBase<const internal::StringView&> {
- public:
-  Matcher() {}
-
-  explicit Matcher(const MatcherInterface<const internal::StringView&>* impl)
-      : internal::MatcherBase<const internal::StringView&>(impl) {}
-
-  template <typename M, typename = typename std::remove_reference<
-                            M>::type::is_gtest_matcher>
-  Matcher(M&& m)  // NOLINT
-      : internal::MatcherBase<const internal::StringView&>(std::forward<M>(m)) {
-  }
-
-  // Allows the user to write str instead of Eq(str) sometimes, where
-  // str is a std::string object.
-  Matcher(const std::string& s);  // NOLINT
-
-  // Allows the user to write "foo" instead of Eq("foo") sometimes.
-  Matcher(const char* s);  // NOLINT
-
-  // Allows the user to pass absl::string_views or std::string_views directly.
-  Matcher(internal::StringView s);  // NOLINT
-};
-
-template <>
-class GTEST_API_ Matcher<internal::StringView>
-    : public internal::MatcherBase<internal::StringView> {
- public:
-  Matcher() {}
-
-  explicit Matcher(const MatcherInterface<const internal::StringView&>* impl)
-      : internal::MatcherBase<internal::StringView>(impl) {}
-  explicit Matcher(const MatcherInterface<internal::StringView>* impl)
-      : internal::MatcherBase<internal::StringView>(impl) {}
-
-  template <typename M, typename = typename std::remove_reference<
-                            M>::type::is_gtest_matcher>
-  Matcher(M&& m)  // NOLINT
-      : internal::MatcherBase<internal::StringView>(std::forward<M>(m)) {}
-
-  // Allows the user to write str instead of Eq(str) sometimes, where
-  // str is a std::string object.
-  Matcher(const std::string& s);  // NOLINT
-
-  // Allows the user to write "foo" instead of Eq("foo") sometimes.
-  Matcher(const char* s);  // NOLINT
-
-  // Allows the user to pass absl::string_views or std::string_views directly.
-  Matcher(internal::StringView s);  // NOLINT
-};
-#endif  // GTEST_INTERNAL_HAS_STRING_VIEW
-
-// Prints a matcher in a human-readable format.
-template <typename T>
-std::ostream& operator<<(std::ostream& os, const Matcher<T>& matcher) {
-  matcher.DescribeTo(&os);
-  return os;
-}
-
-// The PolymorphicMatcher class template makes it easy to implement a
-// polymorphic matcher (i.e. a matcher that can match values of more
-// than one type, e.g. Eq(n) and NotNull()).
-//
-// To define a polymorphic matcher, a user should provide an Impl
-// class that has a DescribeTo() method and a DescribeNegationTo()
-// method, and define a member function (or member function template)
-//
-//   bool MatchAndExplain(const Value& value,
-//                        MatchResultListener* listener) const;
-//
-// See the definition of NotNull() for a complete example.
-template <class Impl>
-class PolymorphicMatcher {
- public:
-  explicit PolymorphicMatcher(const Impl& an_impl) : impl_(an_impl) {}
-
-  // Returns a mutable reference to the underlying matcher
-  // implementation object.
-  Impl& mutable_impl() { return impl_; }
-
-  // Returns an immutable reference to the underlying matcher
-  // implementation object.
-  const Impl& impl() const { return impl_; }
-
-  template <typename T>
-  operator Matcher<T>() const {
-    return Matcher<T>(new MonomorphicImpl<const T&>(impl_));
-  }
-
- private:
-  template <typename T>
-  class MonomorphicImpl : public MatcherInterface<T> {
-   public:
-    explicit MonomorphicImpl(const Impl& impl) : impl_(impl) {}
-
-    void DescribeTo(::std::ostream* os) const override { impl_.DescribeTo(os); }
-
-    void DescribeNegationTo(::std::ostream* os) const override {
-      impl_.DescribeNegationTo(os);
-    }
-
-    bool MatchAndExplain(T x, MatchResultListener* listener) const override {
-      return impl_.MatchAndExplain(x, listener);
-    }
-
-   private:
-    const Impl impl_;
-  };
-
-  Impl impl_;
-};
-
-// Creates a matcher from its implementation.
-// DEPRECATED: Especially in the generic code, prefer:
-//   Matcher<T>(new MyMatcherImpl<const T&>(...));
-//
-// MakeMatcher may create a Matcher that accepts its argument by value, which
-// leads to unnecessary copies & lack of support for non-copyable types.
-template <typename T>
-inline Matcher<T> MakeMatcher(const MatcherInterface<T>* impl) {
-  return Matcher<T>(impl);
-}
-
-// Creates a polymorphic matcher from its implementation.  This is
-// easier to use than the PolymorphicMatcher<Impl> constructor as it
-// doesn't require you to explicitly write the template argument, e.g.
-//
-//   MakePolymorphicMatcher(foo);
-// vs
-//   PolymorphicMatcher<TypeOfFoo>(foo);
-template <class Impl>
-inline PolymorphicMatcher<Impl> MakePolymorphicMatcher(const Impl& impl) {
-  return PolymorphicMatcher<Impl>(impl);
-}
-
-namespace internal {
-// Implements a matcher that compares a given value with a
-// pre-supplied value using one of the ==, <=, <, etc, operators.  The
-// two values being compared don't have to have the same type.
-//
-// The matcher defined here is polymorphic (for example, Eq(5) can be
-// used to match an int, a short, a double, etc).  Therefore we use
-// a template type conversion operator in the implementation.
-//
-// The following template definition assumes that the Rhs parameter is
-// a "bare" type (i.e. neither 'const T' nor 'T&').
-template <typename D, typename Rhs, typename Op>
-class ComparisonBase {
- public:
-  explicit ComparisonBase(const Rhs& rhs) : rhs_(rhs) {}
-
-  using is_gtest_matcher = void;
-
-  template <typename Lhs>
-  bool MatchAndExplain(const Lhs& lhs, std::ostream*) const {
-    return Op()(lhs, Unwrap(rhs_));
-  }
-  void DescribeTo(std::ostream* os) const {
-    *os << D::Desc() << " ";
-    UniversalPrint(Unwrap(rhs_), os);
-  }
-  void DescribeNegationTo(std::ostream* os) const {
-    *os << D::NegatedDesc() << " ";
-    UniversalPrint(Unwrap(rhs_), os);
-  }
-
- private:
-  template <typename T>
-  static const T& Unwrap(const T& v) {
-    return v;
-  }
-  template <typename T>
-  static const T& Unwrap(std::reference_wrapper<T> v) {
-    return v;
-  }
-
-  Rhs rhs_;
-};
-
-template <typename Rhs>
-class EqMatcher : public ComparisonBase<EqMatcher<Rhs>, Rhs, AnyEq> {
- public:
-  explicit EqMatcher(const Rhs& rhs)
-      : ComparisonBase<EqMatcher<Rhs>, Rhs, AnyEq>(rhs) { }
-  static const char* Desc() { return "is equal to"; }
-  static const char* NegatedDesc() { return "isn't equal to"; }
-};
-template <typename Rhs>
-class NeMatcher : public ComparisonBase<NeMatcher<Rhs>, Rhs, AnyNe> {
- public:
-  explicit NeMatcher(const Rhs& rhs)
-      : ComparisonBase<NeMatcher<Rhs>, Rhs, AnyNe>(rhs) { }
-  static const char* Desc() { return "isn't equal to"; }
-  static const char* NegatedDesc() { return "is equal to"; }
-};
-template <typename Rhs>
-class LtMatcher : public ComparisonBase<LtMatcher<Rhs>, Rhs, AnyLt> {
- public:
-  explicit LtMatcher(const Rhs& rhs)
-      : ComparisonBase<LtMatcher<Rhs>, Rhs, AnyLt>(rhs) { }
-  static const char* Desc() { return "is <"; }
-  static const char* NegatedDesc() { return "isn't <"; }
-};
-template <typename Rhs>
-class GtMatcher : public ComparisonBase<GtMatcher<Rhs>, Rhs, AnyGt> {
- public:
-  explicit GtMatcher(const Rhs& rhs)
-      : ComparisonBase<GtMatcher<Rhs>, Rhs, AnyGt>(rhs) { }
-  static const char* Desc() { return "is >"; }
-  static const char* NegatedDesc() { return "isn't >"; }
-};
-template <typename Rhs>
-class LeMatcher : public ComparisonBase<LeMatcher<Rhs>, Rhs, AnyLe> {
- public:
-  explicit LeMatcher(const Rhs& rhs)
-      : ComparisonBase<LeMatcher<Rhs>, Rhs, AnyLe>(rhs) { }
-  static const char* Desc() { return "is <="; }
-  static const char* NegatedDesc() { return "isn't <="; }
-};
-template <typename Rhs>
-class GeMatcher : public ComparisonBase<GeMatcher<Rhs>, Rhs, AnyGe> {
- public:
-  explicit GeMatcher(const Rhs& rhs)
-      : ComparisonBase<GeMatcher<Rhs>, Rhs, AnyGe>(rhs) { }
-  static const char* Desc() { return "is >="; }
-  static const char* NegatedDesc() { return "isn't >="; }
-};
-
-template <typename T, typename = typename std::enable_if<
-                          std::is_constructible<std::string, T>::value>::type>
-using StringLike = T;
-
-// Implements polymorphic matchers MatchesRegex(regex) and
-// ContainsRegex(regex), which can be used as a Matcher<T> as long as
-// T can be converted to a string.
-class MatchesRegexMatcher {
- public:
-  MatchesRegexMatcher(const RE* regex, bool full_match)
-      : regex_(regex), full_match_(full_match) {}
-
-#if GTEST_INTERNAL_HAS_STRING_VIEW
-  bool MatchAndExplain(const internal::StringView& s,
-                       MatchResultListener* listener) const {
-    return MatchAndExplain(std::string(s), listener);
-  }
-#endif  // GTEST_INTERNAL_HAS_STRING_VIEW
-
-  // Accepts pointer types, particularly:
-  //   const char*
-  //   char*
-  //   const wchar_t*
-  //   wchar_t*
-  template <typename CharType>
-  bool MatchAndExplain(CharType* s, MatchResultListener* listener) const {
-    return s != nullptr && MatchAndExplain(std::string(s), listener);
-  }
-
-  // Matches anything that can convert to std::string.
-  //
-  // This is a template, not just a plain function with const std::string&,
-  // because absl::string_view has some interfering non-explicit constructors.
-  template <class MatcheeStringType>
-  bool MatchAndExplain(const MatcheeStringType& s,
-                       MatchResultListener* /* listener */) const {
-    const std::string& s2(s);
-    return full_match_ ? RE::FullMatch(s2, *regex_)
-                       : RE::PartialMatch(s2, *regex_);
-  }
-
-  void DescribeTo(::std::ostream* os) const {
-    *os << (full_match_ ? "matches" : "contains") << " regular expression ";
-    UniversalPrinter<std::string>::Print(regex_->pattern(), os);
-  }
-
-  void DescribeNegationTo(::std::ostream* os) const {
-    *os << "doesn't " << (full_match_ ? "match" : "contain")
-        << " regular expression ";
-    UniversalPrinter<std::string>::Print(regex_->pattern(), os);
-  }
-
- private:
-  const std::shared_ptr<const RE> regex_;
-  const bool full_match_;
-};
-}  // namespace internal
-
-// Matches a string that fully matches regular expression 'regex'.
-// The matcher takes ownership of 'regex'.
-inline PolymorphicMatcher<internal::MatchesRegexMatcher> MatchesRegex(
-    const internal::RE* regex) {
-  return MakePolymorphicMatcher(internal::MatchesRegexMatcher(regex, true));
-}
-template <typename T = std::string>
-PolymorphicMatcher<internal::MatchesRegexMatcher> MatchesRegex(
-    const internal::StringLike<T>& regex) {
-  return MatchesRegex(new internal::RE(std::string(regex)));
-}
-
-// Matches a string that contains regular expression 'regex'.
-// The matcher takes ownership of 'regex'.
-inline PolymorphicMatcher<internal::MatchesRegexMatcher> ContainsRegex(
-    const internal::RE* regex) {
-  return MakePolymorphicMatcher(internal::MatchesRegexMatcher(regex, false));
-}
-template <typename T = std::string>
-PolymorphicMatcher<internal::MatchesRegexMatcher> ContainsRegex(
-    const internal::StringLike<T>& regex) {
-  return ContainsRegex(new internal::RE(std::string(regex)));
-}
-
-// Creates a polymorphic matcher that matches anything equal to x.
-// Note: if the parameter of Eq() were declared as const T&, Eq("foo")
-// wouldn't compile.
-template <typename T>
-inline internal::EqMatcher<T> Eq(T x) { return internal::EqMatcher<T>(x); }
-
-// Constructs a Matcher<T> from a 'value' of type T.  The constructed
-// matcher matches any value that's equal to 'value'.
-template <typename T>
-Matcher<T>::Matcher(T value) { *this = Eq(value); }
-
-// Creates a monomorphic matcher that matches anything with type Lhs
-// and equal to rhs.  A user may need to use this instead of Eq(...)
-// in order to resolve an overloading ambiguity.
-//
-// TypedEq<T>(x) is just a convenient short-hand for Matcher<T>(Eq(x))
-// or Matcher<T>(x), but more readable than the latter.
-//
-// We could define similar monomorphic matchers for other comparison
-// operations (e.g. TypedLt, TypedGe, and etc), but decided not to do
-// it yet as those are used much less than Eq() in practice.  A user
-// can always write Matcher<T>(Lt(5)) to be explicit about the type,
-// for example.
-template <typename Lhs, typename Rhs>
-inline Matcher<Lhs> TypedEq(const Rhs& rhs) { return Eq(rhs); }
-
-// Creates a polymorphic matcher that matches anything >= x.
-template <typename Rhs>
-inline internal::GeMatcher<Rhs> Ge(Rhs x) {
-  return internal::GeMatcher<Rhs>(x);
-}
-
-// Creates a polymorphic matcher that matches anything > x.
-template <typename Rhs>
-inline internal::GtMatcher<Rhs> Gt(Rhs x) {
-  return internal::GtMatcher<Rhs>(x);
-}
-
-// Creates a polymorphic matcher that matches anything <= x.
-template <typename Rhs>
-inline internal::LeMatcher<Rhs> Le(Rhs x) {
-  return internal::LeMatcher<Rhs>(x);
-}
-
-// Creates a polymorphic matcher that matches anything < x.
-template <typename Rhs>
-inline internal::LtMatcher<Rhs> Lt(Rhs x) {
-  return internal::LtMatcher<Rhs>(x);
-}
-
-// Creates a polymorphic matcher that matches anything != x.
-template <typename Rhs>
-inline internal::NeMatcher<Rhs> Ne(Rhs x) {
-  return internal::NeMatcher<Rhs>(x);
-}
-}  // namespace testing
-
-GTEST_DISABLE_MSC_WARNINGS_POP_()  //  4251 5046
-
-#endif  // GOOGLETEST_INCLUDE_GTEST_GTEST_MATCHERS_H_
diff --git a/src/include/gromacs/external/googletest/googletest/include/gtest/gtest-message.h b/src/include/gromacs/external/googletest/googletest/include/gtest/gtest-message.h
deleted file mode 100644 (file)
index bad5161..0000000
+++ /dev/null
@@ -1,217 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-//
-// The Google C++ Testing and Mocking Framework (Google Test)
-//
-// This header file defines the Message class.
-//
-// IMPORTANT NOTE: Due to limitation of the C++ language, we have to
-// leave some internal implementation details in this header file.
-// They are clearly marked by comments like this:
-//
-//   // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-//
-// Such code is NOT meant to be used by a user directly, and is subject
-// to CHANGE WITHOUT NOTICE.  Therefore DO NOT DEPEND ON IT in a user
-// program!
-
-#ifndef GOOGLETEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
-#define GOOGLETEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
-
-#include <limits>
-#include <memory>
-#include <sstream>
-
-#include "gtest/internal/gtest-port.h"
-
-GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \
-/* class A needs to have dll-interface to be used by clients of class B */)
-
-// Ensures that there is at least one operator<< in the global namespace.
-// See Message& operator<<(...) below for why.
-void operator<<(const testing::internal::Secret&, int);
-
-namespace testing {
-
-// The Message class works like an ostream repeater.
-//
-// Typical usage:
-//
-//   1. You stream a bunch of values to a Message object.
-//      It will remember the text in a stringstream.
-//   2. Then you stream the Message object to an ostream.
-//      This causes the text in the Message to be streamed
-//      to the ostream.
-//
-// For example;
-//
-//   testing::Message foo;
-//   foo << 1 << " != " << 2;
-//   std::cout << foo;
-//
-// will print "1 != 2".
-//
-// Message is not intended to be inherited from.  In particular, its
-// destructor is not virtual.
-//
-// Note that stringstream behaves differently in gcc and in MSVC.  You
-// can stream a NULL char pointer to it in the former, but not in the
-// latter (it causes an access violation if you do).  The Message
-// class hides this difference by treating a NULL char pointer as
-// "(null)".
-class GTEST_API_ Message {
- private:
-  // The type of basic IO manipulators (endl, ends, and flush) for
-  // narrow streams.
-  typedef std::ostream& (*BasicNarrowIoManip)(std::ostream&);
-
- public:
-  // Constructs an empty Message.
-  Message();
-
-  // Copy constructor.
-  Message(const Message& msg) : ss_(new ::std::stringstream) {  // NOLINT
-    *ss_ << msg.GetString();
-  }
-
-  // Constructs a Message from a C-string.
-  explicit Message(const char* str) : ss_(new ::std::stringstream) {
-    *ss_ << str;
-  }
-
-  // Streams a non-pointer value to this object.
-  template <typename T>
-  inline Message& operator <<(const T& val) {
-    // Some libraries overload << for STL containers.  These
-    // overloads are defined in the global namespace instead of ::std.
-    //
-    // C++'s symbol lookup rule (i.e. Koenig lookup) says that these
-    // overloads are visible in either the std namespace or the global
-    // namespace, but not other namespaces, including the testing
-    // namespace which Google Test's Message class is in.
-    //
-    // To allow STL containers (and other types that has a << operator
-    // defined in the global namespace) to be used in Google Test
-    // assertions, testing::Message must access the custom << operator
-    // from the global namespace.  With this using declaration,
-    // overloads of << defined in the global namespace and those
-    // visible via Koenig lookup are both exposed in this function.
-    using ::operator <<;
-    *ss_ << val;
-    return *this;
-  }
-
-  // Streams a pointer value to this object.
-  //
-  // This function is an overload of the previous one.  When you
-  // stream a pointer to a Message, this definition will be used as it
-  // is more specialized.  (The C++ Standard, section
-  // [temp.func.order].)  If you stream a non-pointer, then the
-  // previous definition will be used.
-  //
-  // The reason for this overload is that streaming a NULL pointer to
-  // ostream is undefined behavior.  Depending on the compiler, you
-  // may get "0", "(nil)", "(null)", or an access violation.  To
-  // ensure consistent result across compilers, we always treat NULL
-  // as "(null)".
-  template <typename T>
-  inline Message& operator <<(T* const& pointer) {  // NOLINT
-    if (pointer == nullptr) {
-      *ss_ << "(null)";
-    } else {
-      *ss_ << pointer;
-    }
-    return *this;
-  }
-
-  // Since the basic IO manipulators are overloaded for both narrow
-  // and wide streams, we have to provide this specialized definition
-  // of operator <<, even though its body is the same as the
-  // templatized version above.  Without this definition, streaming
-  // endl or other basic IO manipulators to Message will confuse the
-  // compiler.
-  Message& operator <<(BasicNarrowIoManip val) {
-    *ss_ << val;
-    return *this;
-  }
-
-  // Instead of 1/0, we want to see true/false for bool values.
-  Message& operator <<(bool b) {
-    return *this << (b ? "true" : "false");
-  }
-
-  // These two overloads allow streaming a wide C string to a Message
-  // using the UTF-8 encoding.
-  Message& operator <<(const wchar_t* wide_c_str);
-  Message& operator <<(wchar_t* wide_c_str);
-
-#if GTEST_HAS_STD_WSTRING
-  // Converts the given wide string to a narrow string using the UTF-8
-  // encoding, and streams the result to this Message object.
-  Message& operator <<(const ::std::wstring& wstr);
-#endif  // GTEST_HAS_STD_WSTRING
-
-  // Gets the text streamed to this object so far as an std::string.
-  // Each '\0' character in the buffer is replaced with "\\0".
-  //
-  // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-  std::string GetString() const;
-
- private:
-  // We'll hold the text streamed to this object here.
-  const std::unique_ptr< ::std::stringstream> ss_;
-
-  // We declare (but don't implement) this to prevent the compiler
-  // from implementing the assignment operator.
-  void operator=(const Message&);
-};
-
-// Streams a Message to an ostream.
-inline std::ostream& operator <<(std::ostream& os, const Message& sb) {
-  return os << sb.GetString();
-}
-
-namespace internal {
-
-// Converts a streamable value to an std::string.  A NULL pointer is
-// converted to "(null)".  When the input value is a ::string,
-// ::std::string, ::wstring, or ::std::wstring object, each NUL
-// character in it is replaced with "\\0".
-template <typename T>
-std::string StreamableToString(const T& streamable) {
-  return (Message() << streamable).GetString();
-}
-
-}  // namespace internal
-}  // namespace testing
-
-GTEST_DISABLE_MSC_WARNINGS_POP_()  //  4251
-
-#endif  // GOOGLETEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
diff --git a/src/include/gromacs/external/googletest/googletest/include/gtest/gtest-param-test.h b/src/include/gromacs/external/googletest/googletest/include/gtest/gtest-param-test.h
deleted file mode 100644 (file)
index 5558117..0000000
+++ /dev/null
@@ -1,505 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Macros and functions for implementing parameterized tests
-// in Google C++ Testing and Mocking Framework (Google Test)
-#ifndef GOOGLETEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
-#define GOOGLETEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
-
-// Value-parameterized tests allow you to test your code with different
-// parameters without writing multiple copies of the same test.
-//
-// Here is how you use value-parameterized tests:
-
-#if 0
-
-// To write value-parameterized tests, first you should define a fixture
-// class. It is usually derived from testing::TestWithParam<T> (see below for
-// another inheritance scheme that's sometimes useful in more complicated
-// class hierarchies), where the type of your parameter values.
-// TestWithParam<T> is itself derived from testing::Test. T can be any
-// copyable type. If it's a raw pointer, you are responsible for managing the
-// lifespan of the pointed values.
-
-class FooTest : public ::testing::TestWithParam<const char*> {
-  // You can implement all the usual class fixture members here.
-};
-
-// Then, use the TEST_P macro to define as many parameterized tests
-// for this fixture as you want. The _P suffix is for "parameterized"
-// or "pattern", whichever you prefer to think.
-
-TEST_P(FooTest, DoesBlah) {
-  // Inside a test, access the test parameter with the GetParam() method
-  // of the TestWithParam<T> class:
-  EXPECT_TRUE(foo.Blah(GetParam()));
-  ...
-}
-
-TEST_P(FooTest, HasBlahBlah) {
-  ...
-}
-
-// Finally, you can use INSTANTIATE_TEST_SUITE_P to instantiate the test
-// case with any set of parameters you want. Google Test defines a number
-// of functions for generating test parameters. They return what we call
-// (surprise!) parameter generators. Here is a summary of them, which
-// are all in the testing namespace:
-//
-//
-//  Range(begin, end [, step]) - Yields values {begin, begin+step,
-//                               begin+step+step, ...}. The values do not
-//                               include end. step defaults to 1.
-//  Values(v1, v2, ..., vN)    - Yields values {v1, v2, ..., vN}.
-//  ValuesIn(container)        - Yields values from a C-style array, an STL
-//  ValuesIn(begin,end)          container, or an iterator range [begin, end).
-//  Bool()                     - Yields sequence {false, true}.
-//  Combine(g1, g2, ..., gN)   - Yields all combinations (the Cartesian product
-//                               for the math savvy) of the values generated
-//                               by the N generators.
-//
-// For more details, see comments at the definitions of these functions below
-// in this file.
-//
-// The following statement will instantiate tests from the FooTest test suite
-// each with parameter values "meeny", "miny", and "moe".
-
-INSTANTIATE_TEST_SUITE_P(InstantiationName,
-                         FooTest,
-                         Values("meeny", "miny", "moe"));
-
-// To distinguish different instances of the pattern, (yes, you
-// can instantiate it more than once) the first argument to the
-// INSTANTIATE_TEST_SUITE_P macro is a prefix that will be added to the
-// actual test suite name. Remember to pick unique prefixes for different
-// instantiations. The tests from the instantiation above will have
-// these names:
-//
-//    * InstantiationName/FooTest.DoesBlah/0 for "meeny"
-//    * InstantiationName/FooTest.DoesBlah/1 for "miny"
-//    * InstantiationName/FooTest.DoesBlah/2 for "moe"
-//    * InstantiationName/FooTest.HasBlahBlah/0 for "meeny"
-//    * InstantiationName/FooTest.HasBlahBlah/1 for "miny"
-//    * InstantiationName/FooTest.HasBlahBlah/2 for "moe"
-//
-// You can use these names in --gtest_filter.
-//
-// This statement will instantiate all tests from FooTest again, each
-// with parameter values "cat" and "dog":
-
-const char* pets[] = {"cat", "dog"};
-INSTANTIATE_TEST_SUITE_P(AnotherInstantiationName, FooTest, ValuesIn(pets));
-
-// The tests from the instantiation above will have these names:
-//
-//    * AnotherInstantiationName/FooTest.DoesBlah/0 for "cat"
-//    * AnotherInstantiationName/FooTest.DoesBlah/1 for "dog"
-//    * AnotherInstantiationName/FooTest.HasBlahBlah/0 for "cat"
-//    * AnotherInstantiationName/FooTest.HasBlahBlah/1 for "dog"
-//
-// Please note that INSTANTIATE_TEST_SUITE_P will instantiate all tests
-// in the given test suite, whether their definitions come before or
-// AFTER the INSTANTIATE_TEST_SUITE_P statement.
-//
-// Please also note that generator expressions (including parameters to the
-// generators) are evaluated in InitGoogleTest(), after main() has started.
-// This allows the user on one hand, to adjust generator parameters in order
-// to dynamically determine a set of tests to run and on the other hand,
-// give the user a chance to inspect the generated tests with Google Test
-// reflection API before RUN_ALL_TESTS() is executed.
-//
-// You can see samples/sample7_unittest.cc and samples/sample8_unittest.cc
-// for more examples.
-//
-// In the future, we plan to publish the API for defining new parameter
-// generators. But for now this interface remains part of the internal
-// implementation and is subject to change.
-//
-//
-// A parameterized test fixture must be derived from testing::Test and from
-// testing::WithParamInterface<T>, where T is the type of the parameter
-// values. Inheriting from TestWithParam<T> satisfies that requirement because
-// TestWithParam<T> inherits from both Test and WithParamInterface. In more
-// complicated hierarchies, however, it is occasionally useful to inherit
-// separately from Test and WithParamInterface. For example:
-
-class BaseTest : public ::testing::Test {
-  // You can inherit all the usual members for a non-parameterized test
-  // fixture here.
-};
-
-class DerivedTest : public BaseTest, public ::testing::WithParamInterface<int> {
-  // The usual test fixture members go here too.
-};
-
-TEST_F(BaseTest, HasFoo) {
-  // This is an ordinary non-parameterized test.
-}
-
-TEST_P(DerivedTest, DoesBlah) {
-  // GetParam works just the same here as if you inherit from TestWithParam.
-  EXPECT_TRUE(foo.Blah(GetParam()));
-}
-
-#endif  // 0
-
-#include <iterator>
-#include <utility>
-
-#include "gtest/internal/gtest-internal.h"
-#include "gtest/internal/gtest-param-util.h"
-#include "gtest/internal/gtest-port.h"
-
-namespace testing {
-
-// Functions producing parameter generators.
-//
-// Google Test uses these generators to produce parameters for value-
-// parameterized tests. When a parameterized test suite is instantiated
-// with a particular generator, Google Test creates and runs tests
-// for each element in the sequence produced by the generator.
-//
-// In the following sample, tests from test suite FooTest are instantiated
-// each three times with parameter values 3, 5, and 8:
-//
-// class FooTest : public TestWithParam<int> { ... };
-//
-// TEST_P(FooTest, TestThis) {
-// }
-// TEST_P(FooTest, TestThat) {
-// }
-// INSTANTIATE_TEST_SUITE_P(TestSequence, FooTest, Values(3, 5, 8));
-//
-
-// Range() returns generators providing sequences of values in a range.
-//
-// Synopsis:
-// Range(start, end)
-//   - returns a generator producing a sequence of values {start, start+1,
-//     start+2, ..., }.
-// Range(start, end, step)
-//   - returns a generator producing a sequence of values {start, start+step,
-//     start+step+step, ..., }.
-// Notes:
-//   * The generated sequences never include end. For example, Range(1, 5)
-//     returns a generator producing a sequence {1, 2, 3, 4}. Range(1, 9, 2)
-//     returns a generator producing {1, 3, 5, 7}.
-//   * start and end must have the same type. That type may be any integral or
-//     floating-point type or a user defined type satisfying these conditions:
-//     * It must be assignable (have operator=() defined).
-//     * It must have operator+() (operator+(int-compatible type) for
-//       two-operand version).
-//     * It must have operator<() defined.
-//     Elements in the resulting sequences will also have that type.
-//   * Condition start < end must be satisfied in order for resulting sequences
-//     to contain any elements.
-//
-template <typename T, typename IncrementT>
-internal::ParamGenerator<T> Range(T start, T end, IncrementT step) {
-  return internal::ParamGenerator<T>(
-      new internal::RangeGenerator<T, IncrementT>(start, end, step));
-}
-
-template <typename T>
-internal::ParamGenerator<T> Range(T start, T end) {
-  return Range(start, end, 1);
-}
-
-// ValuesIn() function allows generation of tests with parameters coming from
-// a container.
-//
-// Synopsis:
-// ValuesIn(const T (&array)[N])
-//   - returns a generator producing sequences with elements from
-//     a C-style array.
-// ValuesIn(const Container& container)
-//   - returns a generator producing sequences with elements from
-//     an STL-style container.
-// ValuesIn(Iterator begin, Iterator end)
-//   - returns a generator producing sequences with elements from
-//     a range [begin, end) defined by a pair of STL-style iterators. These
-//     iterators can also be plain C pointers.
-//
-// Please note that ValuesIn copies the values from the containers
-// passed in and keeps them to generate tests in RUN_ALL_TESTS().
-//
-// Examples:
-//
-// This instantiates tests from test suite StringTest
-// each with C-string values of "foo", "bar", and "baz":
-//
-// const char* strings[] = {"foo", "bar", "baz"};
-// INSTANTIATE_TEST_SUITE_P(StringSequence, StringTest, ValuesIn(strings));
-//
-// This instantiates tests from test suite StlStringTest
-// each with STL strings with values "a" and "b":
-//
-// ::std::vector< ::std::string> GetParameterStrings() {
-//   ::std::vector< ::std::string> v;
-//   v.push_back("a");
-//   v.push_back("b");
-//   return v;
-// }
-//
-// INSTANTIATE_TEST_SUITE_P(CharSequence,
-//                          StlStringTest,
-//                          ValuesIn(GetParameterStrings()));
-//
-//
-// This will also instantiate tests from CharTest
-// each with parameter values 'a' and 'b':
-//
-// ::std::list<char> GetParameterChars() {
-//   ::std::list<char> list;
-//   list.push_back('a');
-//   list.push_back('b');
-//   return list;
-// }
-// ::std::list<char> l = GetParameterChars();
-// INSTANTIATE_TEST_SUITE_P(CharSequence2,
-//                          CharTest,
-//                          ValuesIn(l.begin(), l.end()));
-//
-template <typename ForwardIterator>
-internal::ParamGenerator<
-    typename std::iterator_traits<ForwardIterator>::value_type>
-ValuesIn(ForwardIterator begin, ForwardIterator end) {
-  typedef typename std::iterator_traits<ForwardIterator>::value_type ParamType;
-  return internal::ParamGenerator<ParamType>(
-      new internal::ValuesInIteratorRangeGenerator<ParamType>(begin, end));
-}
-
-template <typename T, size_t N>
-internal::ParamGenerator<T> ValuesIn(const T (&array)[N]) {
-  return ValuesIn(array, array + N);
-}
-
-template <class Container>
-internal::ParamGenerator<typename Container::value_type> ValuesIn(
-    const Container& container) {
-  return ValuesIn(container.begin(), container.end());
-}
-
-// Values() allows generating tests from explicitly specified list of
-// parameters.
-//
-// Synopsis:
-// Values(T v1, T v2, ..., T vN)
-//   - returns a generator producing sequences with elements v1, v2, ..., vN.
-//
-// For example, this instantiates tests from test suite BarTest each
-// with values "one", "two", and "three":
-//
-// INSTANTIATE_TEST_SUITE_P(NumSequence,
-//                          BarTest,
-//                          Values("one", "two", "three"));
-//
-// This instantiates tests from test suite BazTest each with values 1, 2, 3.5.
-// The exact type of values will depend on the type of parameter in BazTest.
-//
-// INSTANTIATE_TEST_SUITE_P(FloatingNumbers, BazTest, Values(1, 2, 3.5));
-//
-//
-template <typename... T>
-internal::ValueArray<T...> Values(T... v) {
-  return internal::ValueArray<T...>(std::move(v)...);
-}
-
-// Bool() allows generating tests with parameters in a set of (false, true).
-//
-// Synopsis:
-// Bool()
-//   - returns a generator producing sequences with elements {false, true}.
-//
-// It is useful when testing code that depends on Boolean flags. Combinations
-// of multiple flags can be tested when several Bool()'s are combined using
-// Combine() function.
-//
-// In the following example all tests in the test suite FlagDependentTest
-// will be instantiated twice with parameters false and true.
-//
-// class FlagDependentTest : public testing::TestWithParam<bool> {
-//   virtual void SetUp() {
-//     external_flag = GetParam();
-//   }
-// }
-// INSTANTIATE_TEST_SUITE_P(BoolSequence, FlagDependentTest, Bool());
-//
-inline internal::ParamGenerator<bool> Bool() {
-  return Values(false, true);
-}
-
-// Combine() allows the user to combine two or more sequences to produce
-// values of a Cartesian product of those sequences' elements.
-//
-// Synopsis:
-// Combine(gen1, gen2, ..., genN)
-//   - returns a generator producing sequences with elements coming from
-//     the Cartesian product of elements from the sequences generated by
-//     gen1, gen2, ..., genN. The sequence elements will have a type of
-//     std::tuple<T1, T2, ..., TN> where T1, T2, ..., TN are the types
-//     of elements from sequences produces by gen1, gen2, ..., genN.
-//
-// Example:
-//
-// This will instantiate tests in test suite AnimalTest each one with
-// the parameter values tuple("cat", BLACK), tuple("cat", WHITE),
-// tuple("dog", BLACK), and tuple("dog", WHITE):
-//
-// enum Color { BLACK, GRAY, WHITE };
-// class AnimalTest
-//     : public testing::TestWithParam<std::tuple<const char*, Color> > {...};
-//
-// TEST_P(AnimalTest, AnimalLooksNice) {...}
-//
-// INSTANTIATE_TEST_SUITE_P(AnimalVariations, AnimalTest,
-//                          Combine(Values("cat", "dog"),
-//                                  Values(BLACK, WHITE)));
-//
-// This will instantiate tests in FlagDependentTest with all variations of two
-// Boolean flags:
-//
-// class FlagDependentTest
-//     : public testing::TestWithParam<std::tuple<bool, bool> > {
-//   virtual void SetUp() {
-//     // Assigns external_flag_1 and external_flag_2 values from the tuple.
-//     std::tie(external_flag_1, external_flag_2) = GetParam();
-//   }
-// };
-//
-// TEST_P(FlagDependentTest, TestFeature1) {
-//   // Test your code using external_flag_1 and external_flag_2 here.
-// }
-// INSTANTIATE_TEST_SUITE_P(TwoBoolSequence, FlagDependentTest,
-//                          Combine(Bool(), Bool()));
-//
-template <typename... Generator>
-internal::CartesianProductHolder<Generator...> Combine(const Generator&... g) {
-  return internal::CartesianProductHolder<Generator...>(g...);
-}
-
-#define TEST_P(test_suite_name, test_name)                                     \
-  class GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)                     \
-      : public test_suite_name {                                               \
-   public:                                                                     \
-    GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)() {}                    \
-    void TestBody() override;                                                  \
-                                                                               \
-   private:                                                                    \
-    static int AddToRegistry() {                                               \
-      ::testing::UnitTest::GetInstance()                                       \
-          ->parameterized_test_registry()                                      \
-          .GetTestSuitePatternHolder<test_suite_name>(                         \
-              GTEST_STRINGIFY_(test_suite_name),                               \
-              ::testing::internal::CodeLocation(__FILE__, __LINE__))           \
-          ->AddTestPattern(                                                    \
-              GTEST_STRINGIFY_(test_suite_name), GTEST_STRINGIFY_(test_name),  \
-              new ::testing::internal::TestMetaFactory<GTEST_TEST_CLASS_NAME_( \
-                  test_suite_name, test_name)>(),                              \
-              ::testing::internal::CodeLocation(__FILE__, __LINE__));          \
-      return 0;                                                                \
-    }                                                                          \
-    static int gtest_registering_dummy_ GTEST_ATTRIBUTE_UNUSED_;               \
-    GTEST_DISALLOW_COPY_AND_ASSIGN_(GTEST_TEST_CLASS_NAME_(test_suite_name,    \
-                                                           test_name));        \
-  };                                                                           \
-  int GTEST_TEST_CLASS_NAME_(test_suite_name,                                  \
-                             test_name)::gtest_registering_dummy_ =            \
-      GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::AddToRegistry();     \
-  void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::TestBody()
-
-// The last argument to INSTANTIATE_TEST_SUITE_P allows the user to specify
-// generator and an optional function or functor that generates custom test name
-// suffixes based on the test parameters. Such a function or functor should
-// accept one argument of type testing::TestParamInfo<class ParamType>, and
-// return std::string.
-//
-// testing::PrintToStringParamName is a builtin test suffix generator that
-// returns the value of testing::PrintToString(GetParam()).
-//
-// Note: test names must be non-empty, unique, and may only contain ASCII
-// alphanumeric characters or underscore. Because PrintToString adds quotes
-// to std::string and C strings, it won't work for these types.
-
-#define GTEST_EXPAND_(arg) arg
-#define GTEST_GET_FIRST_(first, ...) first
-#define GTEST_GET_SECOND_(first, second, ...) second
-
-#define INSTANTIATE_TEST_SUITE_P(prefix, test_suite_name, ...)                \
-  static ::testing::internal::ParamGenerator<test_suite_name::ParamType>      \
-      gtest_##prefix##test_suite_name##_EvalGenerator_() {                    \
-    return GTEST_EXPAND_(GTEST_GET_FIRST_(__VA_ARGS__, DUMMY_PARAM_));        \
-  }                                                                           \
-  static ::std::string gtest_##prefix##test_suite_name##_EvalGenerateName_(   \
-      const ::testing::TestParamInfo<test_suite_name::ParamType>& info) {     \
-    if (::testing::internal::AlwaysFalse()) {                                 \
-      ::testing::internal::TestNotEmpty(GTEST_EXPAND_(GTEST_GET_SECOND_(      \
-          __VA_ARGS__,                                                        \
-          ::testing::internal::DefaultParamName<test_suite_name::ParamType>,  \
-          DUMMY_PARAM_)));                                                    \
-      auto t = std::make_tuple(__VA_ARGS__);                                  \
-      static_assert(std::tuple_size<decltype(t)>::value <= 2,                 \
-                    "Too Many Args!");                                        \
-    }                                                                         \
-    return ((GTEST_EXPAND_(GTEST_GET_SECOND_(                                 \
-        __VA_ARGS__,                                                          \
-        ::testing::internal::DefaultParamName<test_suite_name::ParamType>,    \
-        DUMMY_PARAM_))))(info);                                               \
-  }                                                                           \
-  static int gtest_##prefix##test_suite_name##_dummy_                         \
-      GTEST_ATTRIBUTE_UNUSED_ =                                               \
-          ::testing::UnitTest::GetInstance()                                  \
-              ->parameterized_test_registry()                                 \
-              .GetTestSuitePatternHolder<test_suite_name>(                    \
-                  GTEST_STRINGIFY_(test_suite_name),                          \
-                  ::testing::internal::CodeLocation(__FILE__, __LINE__))      \
-              ->AddTestSuiteInstantiation(                                    \
-                  GTEST_STRINGIFY_(prefix),                                   \
-                  &gtest_##prefix##test_suite_name##_EvalGenerator_,          \
-                  &gtest_##prefix##test_suite_name##_EvalGenerateName_,       \
-                  __FILE__, __LINE__)
-
-
-// Allow Marking a Parameterized test class as not needing to be instantiated.
-#define GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(T)                   \
-  namespace gtest_do_not_use_outside_namespace_scope {}                   \
-  static const ::testing::internal::MarkAsIgnored gtest_allow_ignore_##T( \
-      GTEST_STRINGIFY_(T))
-
-// Legacy API is deprecated but still available
-#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-#define INSTANTIATE_TEST_CASE_P                                            \
-  static_assert(::testing::internal::InstantiateTestCase_P_IsDeprecated(), \
-                "");                                                       \
-  INSTANTIATE_TEST_SUITE_P
-#endif  // GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-
-}  // namespace testing
-
-#endif  // GOOGLETEST_INCLUDE_GTEST_GTEST_PARAM_TEST_H_
diff --git a/src/include/gromacs/external/googletest/googletest/include/gtest/gtest-printers.h b/src/include/gromacs/external/googletest/googletest/include/gtest/gtest-printers.h
deleted file mode 100644 (file)
index 2e33df4..0000000
+++ /dev/null
@@ -1,1027 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-// Google Test - The Google C++ Testing and Mocking Framework
-//
-// This file implements a universal value printer that can print a
-// value of any type T:
-//
-//   void ::testing::internal::UniversalPrinter<T>::Print(value, ostream_ptr);
-//
-// A user can teach this function how to print a class type T by
-// defining either operator<<() or PrintTo() in the namespace that
-// defines T.  More specifically, the FIRST defined function in the
-// following list will be used (assuming T is defined in namespace
-// foo):
-//
-//   1. foo::PrintTo(const T&, ostream*)
-//   2. operator<<(ostream&, const T&) defined in either foo or the
-//      global namespace.
-//
-// However if T is an STL-style container then it is printed element-wise
-// unless foo::PrintTo(const T&, ostream*) is defined. Note that
-// operator<<() is ignored for container types.
-//
-// If none of the above is defined, it will print the debug string of
-// the value if it is a protocol buffer, or print the raw bytes in the
-// value otherwise.
-//
-// To aid debugging: when T is a reference type, the address of the
-// value is also printed; when T is a (const) char pointer, both the
-// pointer value and the NUL-terminated string it points to are
-// printed.
-//
-// We also provide some convenient wrappers:
-//
-//   // Prints a value to a string.  For a (const or not) char
-//   // pointer, the NUL-terminated string (but not the pointer) is
-//   // printed.
-//   std::string ::testing::PrintToString(const T& value);
-//
-//   // Prints a value tersely: for a reference type, the referenced
-//   // value (but not the address) is printed; for a (const or not) char
-//   // pointer, the NUL-terminated string (but not the pointer) is
-//   // printed.
-//   void ::testing::internal::UniversalTersePrint(const T& value, ostream*);
-//
-//   // Prints value using the type inferred by the compiler.  The difference
-//   // from UniversalTersePrint() is that this function prints both the
-//   // pointer and the NUL-terminated string for a (const or not) char pointer.
-//   void ::testing::internal::UniversalPrint(const T& value, ostream*);
-//
-//   // Prints the fields of a tuple tersely to a string vector, one
-//   // element for each field. Tuple support must be enabled in
-//   // gtest-port.h.
-//   std::vector<string> UniversalTersePrintTupleFieldsToStrings(
-//       const Tuple& value);
-//
-// Known limitation:
-//
-// The print primitives print the elements of an STL-style container
-// using the compiler-inferred type of *iter where iter is a
-// const_iterator of the container.  When const_iterator is an input
-// iterator but not a forward iterator, this inferred type may not
-// match value_type, and the print output may be incorrect.  In
-// practice, this is rarely a problem as for most containers
-// const_iterator is a forward iterator.  We'll fix this if there's an
-// actual need for it.  Note that this fix cannot rely on value_type
-// being defined as many user-defined container types don't have
-// value_type.
-
-#ifndef GOOGLETEST_INCLUDE_GTEST_GTEST_PRINTERS_H_
-#define GOOGLETEST_INCLUDE_GTEST_GTEST_PRINTERS_H_
-
-#include <functional>
-#include <memory>
-#include <ostream>  // NOLINT
-#include <sstream>
-#include <string>
-#include <tuple>
-#include <type_traits>
-#include <utility>
-#include <vector>
-
-#include "gtest/internal/gtest-internal.h"
-#include "gtest/internal/gtest-port.h"
-
-namespace testing {
-
-// Definitions in the internal* namespaces are subject to change without notice.
-// DO NOT USE THEM IN USER CODE!
-namespace internal {
-
-template <typename T>
-void UniversalPrint(const T& value, ::std::ostream* os);
-
-// Used to print an STL-style container when the user doesn't define
-// a PrintTo() for it.
-struct ContainerPrinter {
-  template <typename T,
-            typename = typename std::enable_if<
-                (sizeof(IsContainerTest<T>(0)) == sizeof(IsContainer)) &&
-                !IsRecursiveContainer<T>::value>::type>
-  static void PrintValue(const T& container, std::ostream* os) {
-    const size_t kMaxCount = 32;  // The maximum number of elements to print.
-    *os << '{';
-    size_t count = 0;
-    for (auto&& elem : container) {
-      if (count > 0) {
-        *os << ',';
-        if (count == kMaxCount) {  // Enough has been printed.
-          *os << " ...";
-          break;
-        }
-      }
-      *os << ' ';
-      // We cannot call PrintTo(elem, os) here as PrintTo() doesn't
-      // handle `elem` being a native array.
-      internal::UniversalPrint(elem, os);
-      ++count;
-    }
-
-    if (count > 0) {
-      *os << ' ';
-    }
-    *os << '}';
-  }
-};
-
-// Used to print a pointer that is neither a char pointer nor a member
-// pointer, when the user doesn't define PrintTo() for it.  (A member
-// variable pointer or member function pointer doesn't really point to
-// a location in the address space.  Their representation is
-// implementation-defined.  Therefore they will be printed as raw
-// bytes.)
-struct FunctionPointerPrinter {
-  template <typename T, typename = typename std::enable_if<
-                            std::is_function<T>::value>::type>
-  static void PrintValue(T* p, ::std::ostream* os) {
-    if (p == nullptr) {
-      *os << "NULL";
-    } else {
-      // T is a function type, so '*os << p' doesn't do what we want
-      // (it just prints p as bool).  We want to print p as a const
-      // void*.
-      *os << reinterpret_cast<const void*>(p);
-    }
-  }
-};
-
-struct PointerPrinter {
-  template <typename T>
-  static void PrintValue(T* p, ::std::ostream* os) {
-    if (p == nullptr) {
-      *os << "NULL";
-    } else {
-      // T is not a function type.  We just call << to print p,
-      // relying on ADL to pick up user-defined << for their pointer
-      // types, if any.
-      *os << p;
-    }
-  }
-};
-
-namespace internal_stream_operator_without_lexical_name_lookup {
-
-// The presence of an operator<< here will terminate lexical scope lookup
-// straight away (even though it cannot be a match because of its argument
-// types). Thus, the two operator<< calls in StreamPrinter will find only ADL
-// candidates.
-struct LookupBlocker {};
-void operator<<(LookupBlocker, LookupBlocker);
-
-struct StreamPrinter {
-  template <typename T,
-            // Don't accept member pointers here. We'd print them via implicit
-            // conversion to bool, which isn't useful.
-            typename = typename std::enable_if<
-                !std::is_member_pointer<T>::value>::type,
-            // Only accept types for which we can find a streaming operator via
-            // ADL (possibly involving implicit conversions).
-            typename = decltype(std::declval<std::ostream&>()
-                                << std::declval<const T&>())>
-  static void PrintValue(const T& value, ::std::ostream* os) {
-    // Call streaming operator found by ADL, possibly with implicit conversions
-    // of the arguments.
-    *os << value;
-  }
-};
-
-}  // namespace internal_stream_operator_without_lexical_name_lookup
-
-struct ProtobufPrinter {
-  // We print a protobuf using its ShortDebugString() when the string
-  // doesn't exceed this many characters; otherwise we print it using
-  // DebugString() for better readability.
-  static const size_t kProtobufOneLinerMaxLength = 50;
-
-  template <typename T,
-            typename = typename std::enable_if<
-                internal::HasDebugStringAndShortDebugString<T>::value>::type>
-  static void PrintValue(const T& value, ::std::ostream* os) {
-    std::string pretty_str = value.ShortDebugString();
-    if (pretty_str.length() > kProtobufOneLinerMaxLength) {
-      pretty_str = "\n" + value.DebugString();
-    }
-    *os << ("<" + pretty_str + ">");
-  }
-};
-
-struct ConvertibleToIntegerPrinter {
-  // Since T has no << operator or PrintTo() but can be implicitly
-  // converted to BiggestInt, we print it as a BiggestInt.
-  //
-  // Most likely T is an enum type (either named or unnamed), in which
-  // case printing it as an integer is the desired behavior.  In case
-  // T is not an enum, printing it as an integer is the best we can do
-  // given that it has no user-defined printer.
-  static void PrintValue(internal::BiggestInt value, ::std::ostream* os) {
-    *os << value;
-  }
-};
-
-struct ConvertibleToStringViewPrinter {
-#if GTEST_INTERNAL_HAS_STRING_VIEW
-  static void PrintValue(internal::StringView value, ::std::ostream* os) {
-    internal::UniversalPrint(value, os);
-  }
-#endif
-};
-
-
-// Prints the given number of bytes in the given object to the given
-// ostream.
-GTEST_API_ void PrintBytesInObjectTo(const unsigned char* obj_bytes,
-                                     size_t count,
-                                     ::std::ostream* os);
-struct RawBytesPrinter {
-  // SFINAE on `sizeof` to make sure we have a complete type.
-  template <typename T, size_t = sizeof(T)>
-  static void PrintValue(const T& value, ::std::ostream* os) {
-    PrintBytesInObjectTo(
-        static_cast<const unsigned char*>(
-            // Load bearing cast to void* to support iOS
-            reinterpret_cast<const void*>(std::addressof(value))),
-        sizeof(value), os);
-  }
-};
-
-struct FallbackPrinter {
-  template <typename T>
-  static void PrintValue(const T&, ::std::ostream* os) {
-    *os << "(incomplete type)";
-  }
-};
-
-// Try every printer in order and return the first one that works.
-template <typename T, typename E, typename Printer, typename... Printers>
-struct FindFirstPrinter : FindFirstPrinter<T, E, Printers...> {};
-
-template <typename T, typename Printer, typename... Printers>
-struct FindFirstPrinter<
-    T, decltype(Printer::PrintValue(std::declval<const T&>(), nullptr)),
-    Printer, Printers...> {
-  using type = Printer;
-};
-
-// Select the best printer in the following order:
-//  - Print containers (they have begin/end/etc).
-//  - Print function pointers.
-//  - Print object pointers.
-//  - Use the stream operator, if available.
-//  - Print protocol buffers.
-//  - Print types convertible to BiggestInt.
-//  - Print types convertible to StringView, if available.
-//  - Fallback to printing the raw bytes of the object.
-template <typename T>
-void PrintWithFallback(const T& value, ::std::ostream* os) {
-  using Printer = typename FindFirstPrinter<
-      T, void, ContainerPrinter, FunctionPointerPrinter, PointerPrinter,
-      internal_stream_operator_without_lexical_name_lookup::StreamPrinter,
-      ProtobufPrinter, ConvertibleToIntegerPrinter,
-      ConvertibleToStringViewPrinter, RawBytesPrinter, FallbackPrinter>::type;
-  Printer::PrintValue(value, os);
-}
-
-// FormatForComparison<ToPrint, OtherOperand>::Format(value) formats a
-// value of type ToPrint that is an operand of a comparison assertion
-// (e.g. ASSERT_EQ).  OtherOperand is the type of the other operand in
-// the comparison, and is used to help determine the best way to
-// format the value.  In particular, when the value is a C string
-// (char pointer) and the other operand is an STL string object, we
-// want to format the C string as a string, since we know it is
-// compared by value with the string object.  If the value is a char
-// pointer but the other operand is not an STL string object, we don't
-// know whether the pointer is supposed to point to a NUL-terminated
-// string, and thus want to print it as a pointer to be safe.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-
-// The default case.
-template <typename ToPrint, typename OtherOperand>
-class FormatForComparison {
- public:
-  static ::std::string Format(const ToPrint& value) {
-    return ::testing::PrintToString(value);
-  }
-};
-
-// Array.
-template <typename ToPrint, size_t N, typename OtherOperand>
-class FormatForComparison<ToPrint[N], OtherOperand> {
- public:
-  static ::std::string Format(const ToPrint* value) {
-    return FormatForComparison<const ToPrint*, OtherOperand>::Format(value);
-  }
-};
-
-// By default, print C string as pointers to be safe, as we don't know
-// whether they actually point to a NUL-terminated string.
-
-#define GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(CharType)                \
-  template <typename OtherOperand>                                      \
-  class FormatForComparison<CharType*, OtherOperand> {                  \
-   public:                                                              \
-    static ::std::string Format(CharType* value) {                      \
-      return ::testing::PrintToString(static_cast<const void*>(value)); \
-    }                                                                   \
-  }
-
-GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(char);
-GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(const char);
-GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(wchar_t);
-GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(const wchar_t);
-#ifdef __cpp_lib_char8_t
-GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(char8_t);
-GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(const char8_t);
-#endif
-GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(char16_t);
-GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(const char16_t);
-GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(char32_t);
-GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(const char32_t);
-
-#undef GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_
-
-// If a C string is compared with an STL string object, we know it's meant
-// to point to a NUL-terminated string, and thus can print it as a string.
-
-#define GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(CharType, OtherStringType) \
-  template <>                                                           \
-  class FormatForComparison<CharType*, OtherStringType> {               \
-   public:                                                              \
-    static ::std::string Format(CharType* value) {                      \
-      return ::testing::PrintToString(value);                           \
-    }                                                                   \
-  }
-
-GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(char, ::std::string);
-GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const char, ::std::string);
-#ifdef __cpp_char8_t
-GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(char8_t, ::std::u8string);
-GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const char8_t, ::std::u8string);
-#endif
-GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(char16_t, ::std::u16string);
-GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const char16_t, ::std::u16string);
-GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(char32_t, ::std::u32string);
-GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const char32_t, ::std::u32string);
-
-#if GTEST_HAS_STD_WSTRING
-GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(wchar_t, ::std::wstring);
-GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(const wchar_t, ::std::wstring);
-#endif
-
-#undef GTEST_IMPL_FORMAT_C_STRING_AS_STRING_
-
-// Formats a comparison assertion (e.g. ASSERT_EQ, EXPECT_LT, and etc)
-// operand to be used in a failure message.  The type (but not value)
-// of the other operand may affect the format.  This allows us to
-// print a char* as a raw pointer when it is compared against another
-// char* or void*, and print it as a C string when it is compared
-// against an std::string object, for example.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-template <typename T1, typename T2>
-std::string FormatForComparisonFailureMessage(
-    const T1& value, const T2& /* other_operand */) {
-  return FormatForComparison<T1, T2>::Format(value);
-}
-
-// UniversalPrinter<T>::Print(value, ostream_ptr) prints the given
-// value to the given ostream.  The caller must ensure that
-// 'ostream_ptr' is not NULL, or the behavior is undefined.
-//
-// We define UniversalPrinter as a class template (as opposed to a
-// function template), as we need to partially specialize it for
-// reference types, which cannot be done with function templates.
-template <typename T>
-class UniversalPrinter;
-
-// Prints the given value using the << operator if it has one;
-// otherwise prints the bytes in it.  This is what
-// UniversalPrinter<T>::Print() does when PrintTo() is not specialized
-// or overloaded for type T.
-//
-// A user can override this behavior for a class type Foo by defining
-// an overload of PrintTo() in the namespace where Foo is defined.  We
-// give the user this option as sometimes defining a << operator for
-// Foo is not desirable (e.g. the coding style may prevent doing it,
-// or there is already a << operator but it doesn't do what the user
-// wants).
-template <typename T>
-void PrintTo(const T& value, ::std::ostream* os) {
-  internal::PrintWithFallback(value, os);
-}
-
-// The following list of PrintTo() overloads tells
-// UniversalPrinter<T>::Print() how to print standard types (built-in
-// types, strings, plain arrays, and pointers).
-
-// Overloads for various char types.
-GTEST_API_ void PrintTo(unsigned char c, ::std::ostream* os);
-GTEST_API_ void PrintTo(signed char c, ::std::ostream* os);
-inline void PrintTo(char c, ::std::ostream* os) {
-  // When printing a plain char, we always treat it as unsigned.  This
-  // way, the output won't be affected by whether the compiler thinks
-  // char is signed or not.
-  PrintTo(static_cast<unsigned char>(c), os);
-}
-
-// Overloads for other simple built-in types.
-inline void PrintTo(bool x, ::std::ostream* os) {
-  *os << (x ? "true" : "false");
-}
-
-// Overload for wchar_t type.
-// Prints a wchar_t as a symbol if it is printable or as its internal
-// code otherwise and also as its decimal code (except for L'\0').
-// The L'\0' char is printed as "L'\\0'". The decimal code is printed
-// as signed integer when wchar_t is implemented by the compiler
-// as a signed type and is printed as an unsigned integer when wchar_t
-// is implemented as an unsigned type.
-GTEST_API_ void PrintTo(wchar_t wc, ::std::ostream* os);
-
-GTEST_API_ void PrintTo(char32_t c, ::std::ostream* os);
-inline void PrintTo(char16_t c, ::std::ostream* os) {
-  PrintTo(ImplicitCast_<char32_t>(c), os);
-}
-#ifdef __cpp_char8_t
-inline void PrintTo(char8_t c, ::std::ostream* os) {
-  PrintTo(ImplicitCast_<char32_t>(c), os);
-}
-#endif
-
-// Overloads for C strings.
-GTEST_API_ void PrintTo(const char* s, ::std::ostream* os);
-inline void PrintTo(char* s, ::std::ostream* os) {
-  PrintTo(ImplicitCast_<const char*>(s), os);
-}
-
-// signed/unsigned char is often used for representing binary data, so
-// we print pointers to it as void* to be safe.
-inline void PrintTo(const signed char* s, ::std::ostream* os) {
-  PrintTo(ImplicitCast_<const void*>(s), os);
-}
-inline void PrintTo(signed char* s, ::std::ostream* os) {
-  PrintTo(ImplicitCast_<const void*>(s), os);
-}
-inline void PrintTo(const unsigned char* s, ::std::ostream* os) {
-  PrintTo(ImplicitCast_<const void*>(s), os);
-}
-inline void PrintTo(unsigned char* s, ::std::ostream* os) {
-  PrintTo(ImplicitCast_<const void*>(s), os);
-}
-#ifdef __cpp_char8_t
-// Overloads for u8 strings.
-GTEST_API_ void PrintTo(const char8_t* s, ::std::ostream* os);
-inline void PrintTo(char8_t* s, ::std::ostream* os) {
-  PrintTo(ImplicitCast_<const char8_t*>(s), os);
-}
-#endif
-// Overloads for u16 strings.
-GTEST_API_ void PrintTo(const char16_t* s, ::std::ostream* os);
-inline void PrintTo(char16_t* s, ::std::ostream* os) {
-  PrintTo(ImplicitCast_<const char16_t*>(s), os);
-}
-// Overloads for u32 strings.
-GTEST_API_ void PrintTo(const char32_t* s, ::std::ostream* os);
-inline void PrintTo(char32_t* s, ::std::ostream* os) {
-  PrintTo(ImplicitCast_<const char32_t*>(s), os);
-}
-
-// MSVC can be configured to define wchar_t as a typedef of unsigned
-// short.  It defines _NATIVE_WCHAR_T_DEFINED when wchar_t is a native
-// type.  When wchar_t is a typedef, defining an overload for const
-// wchar_t* would cause unsigned short* be printed as a wide string,
-// possibly causing invalid memory accesses.
-#if !defined(_MSC_VER) || defined(_NATIVE_WCHAR_T_DEFINED)
-// Overloads for wide C strings
-GTEST_API_ void PrintTo(const wchar_t* s, ::std::ostream* os);
-inline void PrintTo(wchar_t* s, ::std::ostream* os) {
-  PrintTo(ImplicitCast_<const wchar_t*>(s), os);
-}
-#endif
-
-// Overload for C arrays.  Multi-dimensional arrays are printed
-// properly.
-
-// Prints the given number of elements in an array, without printing
-// the curly braces.
-template <typename T>
-void PrintRawArrayTo(const T a[], size_t count, ::std::ostream* os) {
-  UniversalPrint(a[0], os);
-  for (size_t i = 1; i != count; i++) {
-    *os << ", ";
-    UniversalPrint(a[i], os);
-  }
-}
-
-// Overloads for ::std::string.
-GTEST_API_ void PrintStringTo(const ::std::string&s, ::std::ostream* os);
-inline void PrintTo(const ::std::string& s, ::std::ostream* os) {
-  PrintStringTo(s, os);
-}
-
-// Overloads for ::std::u8string
-#ifdef __cpp_char8_t
-GTEST_API_ void PrintU8StringTo(const ::std::u8string& s, ::std::ostream* os);
-inline void PrintTo(const ::std::u8string& s, ::std::ostream* os) {
-  PrintU8StringTo(s, os);
-}
-#endif
-
-// Overloads for ::std::u16string
-GTEST_API_ void PrintU16StringTo(const ::std::u16string& s, ::std::ostream* os);
-inline void PrintTo(const ::std::u16string& s, ::std::ostream* os) {
-  PrintU16StringTo(s, os);
-}
-
-// Overloads for ::std::u32string
-GTEST_API_ void PrintU32StringTo(const ::std::u32string& s, ::std::ostream* os);
-inline void PrintTo(const ::std::u32string& s, ::std::ostream* os) {
-  PrintU32StringTo(s, os);
-}
-
-// Overloads for ::std::wstring.
-#if GTEST_HAS_STD_WSTRING
-GTEST_API_ void PrintWideStringTo(const ::std::wstring&s, ::std::ostream* os);
-inline void PrintTo(const ::std::wstring& s, ::std::ostream* os) {
-  PrintWideStringTo(s, os);
-}
-#endif  // GTEST_HAS_STD_WSTRING
-
-#if GTEST_INTERNAL_HAS_STRING_VIEW
-// Overload for internal::StringView.
-inline void PrintTo(internal::StringView sp, ::std::ostream* os) {
-  PrintTo(::std::string(sp), os);
-}
-#endif  // GTEST_INTERNAL_HAS_STRING_VIEW
-
-inline void PrintTo(std::nullptr_t, ::std::ostream* os) { *os << "(nullptr)"; }
-
-template <typename T>
-void PrintTo(std::reference_wrapper<T> ref, ::std::ostream* os) {
-  UniversalPrinter<T&>::Print(ref.get(), os);
-}
-
-inline const void* VoidifyPointer(const void* p) { return p; }
-inline const void* VoidifyPointer(volatile const void* p) {
-  return const_cast<const void*>(p);
-}
-
-template <typename T, typename Ptr>
-void PrintSmartPointer(const Ptr& ptr, std::ostream* os, char) {
-  if (ptr == nullptr) {
-    *os << "(nullptr)";
-  } else {
-    // We can't print the value. Just print the pointer..
-    *os << "(" << (VoidifyPointer)(ptr.get()) << ")";
-  }
-}
-template <typename T, typename Ptr,
-          typename = typename std::enable_if<!std::is_void<T>::value &&
-                                             !std::is_array<T>::value>::type>
-void PrintSmartPointer(const Ptr& ptr, std::ostream* os, int) {
-  if (ptr == nullptr) {
-    *os << "(nullptr)";
-  } else {
-    *os << "(ptr = " << (VoidifyPointer)(ptr.get()) << ", value = ";
-    UniversalPrinter<T>::Print(*ptr, os);
-    *os << ")";
-  }
-}
-
-template <typename T, typename D>
-void PrintTo(const std::unique_ptr<T, D>& ptr, std::ostream* os) {
-  (PrintSmartPointer<T>)(ptr, os, 0);
-}
-
-template <typename T>
-void PrintTo(const std::shared_ptr<T>& ptr, std::ostream* os) {
-  (PrintSmartPointer<T>)(ptr, os, 0);
-}
-
-// Helper function for printing a tuple.  T must be instantiated with
-// a tuple type.
-template <typename T>
-void PrintTupleTo(const T&, std::integral_constant<size_t, 0>,
-                  ::std::ostream*) {}
-
-template <typename T, size_t I>
-void PrintTupleTo(const T& t, std::integral_constant<size_t, I>,
-                  ::std::ostream* os) {
-  PrintTupleTo(t, std::integral_constant<size_t, I - 1>(), os);
-  GTEST_INTENTIONAL_CONST_COND_PUSH_()
-  if (I > 1) {
-    GTEST_INTENTIONAL_CONST_COND_POP_()
-    *os << ", ";
-  }
-  UniversalPrinter<typename std::tuple_element<I - 1, T>::type>::Print(
-      std::get<I - 1>(t), os);
-}
-
-template <typename... Types>
-void PrintTo(const ::std::tuple<Types...>& t, ::std::ostream* os) {
-  *os << "(";
-  PrintTupleTo(t, std::integral_constant<size_t, sizeof...(Types)>(), os);
-  *os << ")";
-}
-
-// Overload for std::pair.
-template <typename T1, typename T2>
-void PrintTo(const ::std::pair<T1, T2>& value, ::std::ostream* os) {
-  *os << '(';
-  // We cannot use UniversalPrint(value.first, os) here, as T1 may be
-  // a reference type.  The same for printing value.second.
-  UniversalPrinter<T1>::Print(value.first, os);
-  *os << ", ";
-  UniversalPrinter<T2>::Print(value.second, os);
-  *os << ')';
-}
-
-// Implements printing a non-reference type T by letting the compiler
-// pick the right overload of PrintTo() for T.
-template <typename T>
-class UniversalPrinter {
- public:
-  // MSVC warns about adding const to a function type, so we want to
-  // disable the warning.
-  GTEST_DISABLE_MSC_WARNINGS_PUSH_(4180)
-
-  // Note: we deliberately don't call this PrintTo(), as that name
-  // conflicts with ::testing::internal::PrintTo in the body of the
-  // function.
-  static void Print(const T& value, ::std::ostream* os) {
-    // By default, ::testing::internal::PrintTo() is used for printing
-    // the value.
-    //
-    // Thanks to Koenig look-up, if T is a class and has its own
-    // PrintTo() function defined in its namespace, that function will
-    // be visible here.  Since it is more specific than the generic ones
-    // in ::testing::internal, it will be picked by the compiler in the
-    // following statement - exactly what we want.
-    PrintTo(value, os);
-  }
-
-  GTEST_DISABLE_MSC_WARNINGS_POP_()
-};
-
-// Remove any const-qualifiers before passing a type to UniversalPrinter.
-template <typename T>
-class UniversalPrinter<const T> : public UniversalPrinter<T> {};
-
-#if GTEST_INTERNAL_HAS_ANY
-
-// Printer for std::any / absl::any
-
-template <>
-class UniversalPrinter<Any> {
- public:
-  static void Print(const Any& value, ::std::ostream* os) {
-    if (value.has_value()) {
-      *os << "value of type " << GetTypeName(value);
-    } else {
-      *os << "no value";
-    }
-  }
-
- private:
-  static std::string GetTypeName(const Any& value) {
-#if GTEST_HAS_RTTI
-    return internal::GetTypeName(value.type());
-#else
-    static_cast<void>(value);  // possibly unused
-    return "<unknown_type>";
-#endif  // GTEST_HAS_RTTI
-  }
-};
-
-#endif  // GTEST_INTERNAL_HAS_ANY
-
-#if GTEST_INTERNAL_HAS_OPTIONAL
-
-// Printer for std::optional / absl::optional
-
-template <typename T>
-class UniversalPrinter<Optional<T>> {
- public:
-  static void Print(const Optional<T>& value, ::std::ostream* os) {
-    *os << '(';
-    if (!value) {
-      *os << "nullopt";
-    } else {
-      UniversalPrint(*value, os);
-    }
-    *os << ')';
-  }
-};
-
-#endif  // GTEST_INTERNAL_HAS_OPTIONAL
-
-#if GTEST_INTERNAL_HAS_VARIANT
-
-// Printer for std::variant / absl::variant
-
-template <typename... T>
-class UniversalPrinter<Variant<T...>> {
- public:
-  static void Print(const Variant<T...>& value, ::std::ostream* os) {
-    *os << '(';
-#if GTEST_HAS_ABSL
-    absl::visit(Visitor{os, value.index()}, value);
-#else
-    std::visit(Visitor{os, value.index()}, value);
-#endif  // GTEST_HAS_ABSL
-    *os << ')';
-  }
-
- private:
-  struct Visitor {
-    template <typename U>
-    void operator()(const U& u) const {
-      *os << "'" << GetTypeName<U>() << "(index = " << index
-          << ")' with value ";
-      UniversalPrint(u, os);
-    }
-    ::std::ostream* os;
-    std::size_t index;
-  };
-};
-
-#endif  // GTEST_INTERNAL_HAS_VARIANT
-
-// UniversalPrintArray(begin, len, os) prints an array of 'len'
-// elements, starting at address 'begin'.
-template <typename T>
-void UniversalPrintArray(const T* begin, size_t len, ::std::ostream* os) {
-  if (len == 0) {
-    *os << "{}";
-  } else {
-    *os << "{ ";
-    const size_t kThreshold = 18;
-    const size_t kChunkSize = 8;
-    // If the array has more than kThreshold elements, we'll have to
-    // omit some details by printing only the first and the last
-    // kChunkSize elements.
-    if (len <= kThreshold) {
-      PrintRawArrayTo(begin, len, os);
-    } else {
-      PrintRawArrayTo(begin, kChunkSize, os);
-      *os << ", ..., ";
-      PrintRawArrayTo(begin + len - kChunkSize, kChunkSize, os);
-    }
-    *os << " }";
-  }
-}
-// This overload prints a (const) char array compactly.
-GTEST_API_ void UniversalPrintArray(
-    const char* begin, size_t len, ::std::ostream* os);
-
-#ifdef __cpp_char8_t
-// This overload prints a (const) char8_t array compactly.
-GTEST_API_ void UniversalPrintArray(const char8_t* begin, size_t len,
-                                    ::std::ostream* os);
-#endif
-
-// This overload prints a (const) char16_t array compactly.
-GTEST_API_ void UniversalPrintArray(const char16_t* begin, size_t len,
-                                    ::std::ostream* os);
-
-// This overload prints a (const) char32_t array compactly.
-GTEST_API_ void UniversalPrintArray(const char32_t* begin, size_t len,
-                                    ::std::ostream* os);
-
-// This overload prints a (const) wchar_t array compactly.
-GTEST_API_ void UniversalPrintArray(
-    const wchar_t* begin, size_t len, ::std::ostream* os);
-
-// Implements printing an array type T[N].
-template <typename T, size_t N>
-class UniversalPrinter<T[N]> {
- public:
-  // Prints the given array, omitting some elements when there are too
-  // many.
-  static void Print(const T (&a)[N], ::std::ostream* os) {
-    UniversalPrintArray(a, N, os);
-  }
-};
-
-// Implements printing a reference type T&.
-template <typename T>
-class UniversalPrinter<T&> {
- public:
-  // MSVC warns about adding const to a function type, so we want to
-  // disable the warning.
-  GTEST_DISABLE_MSC_WARNINGS_PUSH_(4180)
-
-  static void Print(const T& value, ::std::ostream* os) {
-    // Prints the address of the value.  We use reinterpret_cast here
-    // as static_cast doesn't compile when T is a function type.
-    *os << "@" << reinterpret_cast<const void*>(&value) << " ";
-
-    // Then prints the value itself.
-    UniversalPrint(value, os);
-  }
-
-  GTEST_DISABLE_MSC_WARNINGS_POP_()
-};
-
-// Prints a value tersely: for a reference type, the referenced value
-// (but not the address) is printed; for a (const) char pointer, the
-// NUL-terminated string (but not the pointer) is printed.
-
-template <typename T>
-class UniversalTersePrinter {
- public:
-  static void Print(const T& value, ::std::ostream* os) {
-    UniversalPrint(value, os);
-  }
-};
-template <typename T>
-class UniversalTersePrinter<T&> {
- public:
-  static void Print(const T& value, ::std::ostream* os) {
-    UniversalPrint(value, os);
-  }
-};
-template <typename T, size_t N>
-class UniversalTersePrinter<T[N]> {
- public:
-  static void Print(const T (&value)[N], ::std::ostream* os) {
-    UniversalPrinter<T[N]>::Print(value, os);
-  }
-};
-template <>
-class UniversalTersePrinter<const char*> {
- public:
-  static void Print(const char* str, ::std::ostream* os) {
-    if (str == nullptr) {
-      *os << "NULL";
-    } else {
-      UniversalPrint(std::string(str), os);
-    }
-  }
-};
-template <>
-class UniversalTersePrinter<char*> : public UniversalTersePrinter<const char*> {
-};
-
-#ifdef __cpp_char8_t
-template <>
-class UniversalTersePrinter<const char8_t*> {
- public:
-  static void Print(const char8_t* str, ::std::ostream* os) {
-    if (str == nullptr) {
-      *os << "NULL";
-    } else {
-      UniversalPrint(::std::u8string(str), os);
-    }
-  }
-};
-template <>
-class UniversalTersePrinter<char8_t*>
-    : public UniversalTersePrinter<const char8_t*> {};
-#endif
-
-template <>
-class UniversalTersePrinter<const char16_t*> {
- public:
-  static void Print(const char16_t* str, ::std::ostream* os) {
-    if (str == nullptr) {
-      *os << "NULL";
-    } else {
-      UniversalPrint(::std::u16string(str), os);
-    }
-  }
-};
-template <>
-class UniversalTersePrinter<char16_t*>
-    : public UniversalTersePrinter<const char16_t*> {};
-
-template <>
-class UniversalTersePrinter<const char32_t*> {
- public:
-  static void Print(const char32_t* str, ::std::ostream* os) {
-    if (str == nullptr) {
-      *os << "NULL";
-    } else {
-      UniversalPrint(::std::u32string(str), os);
-    }
-  }
-};
-template <>
-class UniversalTersePrinter<char32_t*>
-    : public UniversalTersePrinter<const char32_t*> {};
-
-#if GTEST_HAS_STD_WSTRING
-template <>
-class UniversalTersePrinter<const wchar_t*> {
- public:
-  static void Print(const wchar_t* str, ::std::ostream* os) {
-    if (str == nullptr) {
-      *os << "NULL";
-    } else {
-      UniversalPrint(::std::wstring(str), os);
-    }
-  }
-};
-#endif
-
-template <>
-class UniversalTersePrinter<wchar_t*> {
- public:
-  static void Print(wchar_t* str, ::std::ostream* os) {
-    UniversalTersePrinter<const wchar_t*>::Print(str, os);
-  }
-};
-
-template <typename T>
-void UniversalTersePrint(const T& value, ::std::ostream* os) {
-  UniversalTersePrinter<T>::Print(value, os);
-}
-
-// Prints a value using the type inferred by the compiler.  The
-// difference between this and UniversalTersePrint() is that for a
-// (const) char pointer, this prints both the pointer and the
-// NUL-terminated string.
-template <typename T>
-void UniversalPrint(const T& value, ::std::ostream* os) {
-  // A workarond for the bug in VC++ 7.1 that prevents us from instantiating
-  // UniversalPrinter with T directly.
-  typedef T T1;
-  UniversalPrinter<T1>::Print(value, os);
-}
-
-typedef ::std::vector< ::std::string> Strings;
-
-  // Tersely prints the first N fields of a tuple to a string vector,
-  // one element for each field.
-template <typename Tuple>
-void TersePrintPrefixToStrings(const Tuple&, std::integral_constant<size_t, 0>,
-                               Strings*) {}
-template <typename Tuple, size_t I>
-void TersePrintPrefixToStrings(const Tuple& t,
-                               std::integral_constant<size_t, I>,
-                               Strings* strings) {
-  TersePrintPrefixToStrings(t, std::integral_constant<size_t, I - 1>(),
-                            strings);
-  ::std::stringstream ss;
-  UniversalTersePrint(std::get<I - 1>(t), &ss);
-  strings->push_back(ss.str());
-}
-
-// Prints the fields of a tuple tersely to a string vector, one
-// element for each field.  See the comment before
-// UniversalTersePrint() for how we define "tersely".
-template <typename Tuple>
-Strings UniversalTersePrintTupleFieldsToStrings(const Tuple& value) {
-  Strings result;
-  TersePrintPrefixToStrings(
-      value, std::integral_constant<size_t, std::tuple_size<Tuple>::value>(),
-      &result);
-  return result;
-}
-
-}  // namespace internal
-
-template <typename T>
-::std::string PrintToString(const T& value) {
-  ::std::stringstream ss;
-  internal::UniversalTersePrinter<T>::Print(value, &ss);
-  return ss.str();
-}
-
-}  // namespace testing
-
-// Include any custom printer added by the local installation.
-// We must include this header at the end to make sure it can use the
-// declarations from this file.
-#include "gtest/internal/custom/gtest-printers.h"
-
-#endif  // GOOGLETEST_INCLUDE_GTEST_GTEST_PRINTERS_H_
diff --git a/src/include/gromacs/external/googletest/googletest/include/gtest/gtest-spi.h b/src/include/gromacs/external/googletest/googletest/include/gtest/gtest-spi.h
deleted file mode 100644 (file)
index bce8b22..0000000
+++ /dev/null
@@ -1,236 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-//
-// Utilities for testing Google Test itself and code that uses Google Test
-// (e.g. frameworks built on top of Google Test).
-
-#ifndef GOOGLETEST_INCLUDE_GTEST_GTEST_SPI_H_
-#define GOOGLETEST_INCLUDE_GTEST_GTEST_SPI_H_
-
-#include "gtest/gtest.h"
-
-GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \
-/* class A needs to have dll-interface to be used by clients of class B */)
-
-namespace testing {
-
-// This helper class can be used to mock out Google Test failure reporting
-// so that we can test Google Test or code that builds on Google Test.
-//
-// An object of this class appends a TestPartResult object to the
-// TestPartResultArray object given in the constructor whenever a Google Test
-// failure is reported. It can either intercept only failures that are
-// generated in the same thread that created this object or it can intercept
-// all generated failures. The scope of this mock object can be controlled with
-// the second argument to the two arguments constructor.
-class GTEST_API_ ScopedFakeTestPartResultReporter
-    : public TestPartResultReporterInterface {
- public:
-  // The two possible mocking modes of this object.
-  enum InterceptMode {
-    INTERCEPT_ONLY_CURRENT_THREAD,  // Intercepts only thread local failures.
-    INTERCEPT_ALL_THREADS           // Intercepts all failures.
-  };
-
-  // The c'tor sets this object as the test part result reporter used
-  // by Google Test.  The 'result' parameter specifies where to report the
-  // results. This reporter will only catch failures generated in the current
-  // thread. DEPRECATED
-  explicit ScopedFakeTestPartResultReporter(TestPartResultArray* result);
-
-  // Same as above, but you can choose the interception scope of this object.
-  ScopedFakeTestPartResultReporter(InterceptMode intercept_mode,
-                                   TestPartResultArray* result);
-
-  // The d'tor restores the previous test part result reporter.
-  ~ScopedFakeTestPartResultReporter() override;
-
-  // Appends the TestPartResult object to the TestPartResultArray
-  // received in the constructor.
-  //
-  // This method is from the TestPartResultReporterInterface
-  // interface.
-  void ReportTestPartResult(const TestPartResult& result) override;
-
- private:
-  void Init();
-
-  const InterceptMode intercept_mode_;
-  TestPartResultReporterInterface* old_reporter_;
-  TestPartResultArray* const result_;
-
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(ScopedFakeTestPartResultReporter);
-};
-
-namespace internal {
-
-// A helper class for implementing EXPECT_FATAL_FAILURE() and
-// EXPECT_NONFATAL_FAILURE().  Its destructor verifies that the given
-// TestPartResultArray contains exactly one failure that has the given
-// type and contains the given substring.  If that's not the case, a
-// non-fatal failure will be generated.
-class GTEST_API_ SingleFailureChecker {
- public:
-  // The constructor remembers the arguments.
-  SingleFailureChecker(const TestPartResultArray* results,
-                       TestPartResult::Type type, const std::string& substr);
-  ~SingleFailureChecker();
- private:
-  const TestPartResultArray* const results_;
-  const TestPartResult::Type type_;
-  const std::string substr_;
-
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(SingleFailureChecker);
-};
-
-}  // namespace internal
-
-}  // namespace testing
-
-GTEST_DISABLE_MSC_WARNINGS_POP_()  //  4251
-
-// A set of macros for testing Google Test assertions or code that's expected
-// to generate Google Test fatal failures.  It verifies that the given
-// statement will cause exactly one fatal Google Test failure with 'substr'
-// being part of the failure message.
-//
-// There are two different versions of this macro. EXPECT_FATAL_FAILURE only
-// affects and considers failures generated in the current thread and
-// EXPECT_FATAL_FAILURE_ON_ALL_THREADS does the same but for all threads.
-//
-// The verification of the assertion is done correctly even when the statement
-// throws an exception or aborts the current function.
-//
-// Known restrictions:
-//   - 'statement' cannot reference local non-static variables or
-//     non-static members of the current object.
-//   - 'statement' cannot return a value.
-//   - You cannot stream a failure message to this macro.
-//
-// Note that even though the implementations of the following two
-// macros are much alike, we cannot refactor them to use a common
-// helper macro, due to some peculiarity in how the preprocessor
-// works.  The AcceptsMacroThatExpandsToUnprotectedComma test in
-// gtest_unittest.cc will fail to compile if we do that.
-#define EXPECT_FATAL_FAILURE(statement, substr) \
-  do { \
-    class GTestExpectFatalFailureHelper {\
-     public:\
-      static void Execute() { statement; }\
-    };\
-    ::testing::TestPartResultArray gtest_failures;\
-    ::testing::internal::SingleFailureChecker gtest_checker(\
-        &gtest_failures, ::testing::TestPartResult::kFatalFailure, (substr));\
-    {\
-      ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\
-          ::testing::ScopedFakeTestPartResultReporter:: \
-          INTERCEPT_ONLY_CURRENT_THREAD, &gtest_failures);\
-      GTestExpectFatalFailureHelper::Execute();\
-    }\
-  } while (::testing::internal::AlwaysFalse())
-
-#define EXPECT_FATAL_FAILURE_ON_ALL_THREADS(statement, substr) \
-  do { \
-    class GTestExpectFatalFailureHelper {\
-     public:\
-      static void Execute() { statement; }\
-    };\
-    ::testing::TestPartResultArray gtest_failures;\
-    ::testing::internal::SingleFailureChecker gtest_checker(\
-        &gtest_failures, ::testing::TestPartResult::kFatalFailure, (substr));\
-    {\
-      ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\
-          ::testing::ScopedFakeTestPartResultReporter:: \
-          INTERCEPT_ALL_THREADS, &gtest_failures);\
-      GTestExpectFatalFailureHelper::Execute();\
-    }\
-  } while (::testing::internal::AlwaysFalse())
-
-// A macro for testing Google Test assertions or code that's expected to
-// generate Google Test non-fatal failures.  It asserts that the given
-// statement will cause exactly one non-fatal Google Test failure with 'substr'
-// being part of the failure message.
-//
-// There are two different versions of this macro. EXPECT_NONFATAL_FAILURE only
-// affects and considers failures generated in the current thread and
-// EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS does the same but for all threads.
-//
-// 'statement' is allowed to reference local variables and members of
-// the current object.
-//
-// The verification of the assertion is done correctly even when the statement
-// throws an exception or aborts the current function.
-//
-// Known restrictions:
-//   - You cannot stream a failure message to this macro.
-//
-// Note that even though the implementations of the following two
-// macros are much alike, we cannot refactor them to use a common
-// helper macro, due to some peculiarity in how the preprocessor
-// works.  If we do that, the code won't compile when the user gives
-// EXPECT_NONFATAL_FAILURE() a statement that contains a macro that
-// expands to code containing an unprotected comma.  The
-// AcceptsMacroThatExpandsToUnprotectedComma test in gtest_unittest.cc
-// catches that.
-//
-// For the same reason, we have to write
-//   if (::testing::internal::AlwaysTrue()) { statement; }
-// instead of
-//   GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement)
-// to avoid an MSVC warning on unreachable code.
-#define EXPECT_NONFATAL_FAILURE(statement, substr) \
-  do {\
-    ::testing::TestPartResultArray gtest_failures;\
-    ::testing::internal::SingleFailureChecker gtest_checker(\
-        &gtest_failures, ::testing::TestPartResult::kNonFatalFailure, \
-        (substr));\
-    {\
-      ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\
-          ::testing::ScopedFakeTestPartResultReporter:: \
-          INTERCEPT_ONLY_CURRENT_THREAD, &gtest_failures);\
-      if (::testing::internal::AlwaysTrue()) { statement; }\
-    }\
-  } while (::testing::internal::AlwaysFalse())
-
-#define EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS(statement, substr) \
-  do {\
-    ::testing::TestPartResultArray gtest_failures;\
-    ::testing::internal::SingleFailureChecker gtest_checker(\
-        &gtest_failures, ::testing::TestPartResult::kNonFatalFailure, \
-        (substr));\
-    {\
-      ::testing::ScopedFakeTestPartResultReporter gtest_reporter(\
-          ::testing::ScopedFakeTestPartResultReporter::INTERCEPT_ALL_THREADS, \
-          &gtest_failures);\
-      if (::testing::internal::AlwaysTrue()) { statement; }\
-    }\
-  } while (::testing::internal::AlwaysFalse())
-
-#endif  // GOOGLETEST_INCLUDE_GTEST_GTEST_SPI_H_
diff --git a/src/include/gromacs/external/googletest/googletest/include/gtest/gtest-test-part.h b/src/include/gromacs/external/googletest/googletest/include/gtest/gtest-test-part.h
deleted file mode 100644 (file)
index db9f4b9..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef GOOGLETEST_INCLUDE_GTEST_GTEST_TEST_PART_H_
-#define GOOGLETEST_INCLUDE_GTEST_GTEST_TEST_PART_H_
-
-#include <iosfwd>
-#include <vector>
-#include "gtest/internal/gtest-internal.h"
-#include "gtest/internal/gtest-string.h"
-
-GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \
-/* class A needs to have dll-interface to be used by clients of class B */)
-
-namespace testing {
-
-// A copyable object representing the result of a test part (i.e. an
-// assertion or an explicit FAIL(), ADD_FAILURE(), or SUCCESS()).
-//
-// Don't inherit from TestPartResult as its destructor is not virtual.
-class GTEST_API_ TestPartResult {
- public:
-  // The possible outcomes of a test part (i.e. an assertion or an
-  // explicit SUCCEED(), FAIL(), or ADD_FAILURE()).
-  enum Type {
-    kSuccess,          // Succeeded.
-    kNonFatalFailure,  // Failed but the test can continue.
-    kFatalFailure,     // Failed and the test should be terminated.
-    kSkip              // Skipped.
-  };
-
-  // C'tor.  TestPartResult does NOT have a default constructor.
-  // Always use this constructor (with parameters) to create a
-  // TestPartResult object.
-  TestPartResult(Type a_type, const char* a_file_name, int a_line_number,
-                 const char* a_message)
-      : type_(a_type),
-        file_name_(a_file_name == nullptr ? "" : a_file_name),
-        line_number_(a_line_number),
-        summary_(ExtractSummary(a_message)),
-        message_(a_message) {}
-
-  // Gets the outcome of the test part.
-  Type type() const { return type_; }
-
-  // Gets the name of the source file where the test part took place, or
-  // NULL if it's unknown.
-  const char* file_name() const {
-    return file_name_.empty() ? nullptr : file_name_.c_str();
-  }
-
-  // Gets the line in the source file where the test part took place,
-  // or -1 if it's unknown.
-  int line_number() const { return line_number_; }
-
-  // Gets the summary of the failure message.
-  const char* summary() const { return summary_.c_str(); }
-
-  // Gets the message associated with the test part.
-  const char* message() const { return message_.c_str(); }
-
-  // Returns true if and only if the test part was skipped.
-  bool skipped() const { return type_ == kSkip; }
-
-  // Returns true if and only if the test part passed.
-  bool passed() const { return type_ == kSuccess; }
-
-  // Returns true if and only if the test part non-fatally failed.
-  bool nonfatally_failed() const { return type_ == kNonFatalFailure; }
-
-  // Returns true if and only if the test part fatally failed.
-  bool fatally_failed() const { return type_ == kFatalFailure; }
-
-  // Returns true if and only if the test part failed.
-  bool failed() const { return fatally_failed() || nonfatally_failed(); }
-
- private:
-  Type type_;
-
-  // Gets the summary of the failure message by omitting the stack
-  // trace in it.
-  static std::string ExtractSummary(const char* message);
-
-  // The name of the source file where the test part took place, or
-  // "" if the source file is unknown.
-  std::string file_name_;
-  // The line in the source file where the test part took place, or -1
-  // if the line number is unknown.
-  int line_number_;
-  std::string summary_;  // The test failure summary.
-  std::string message_;  // The test failure message.
-};
-
-// Prints a TestPartResult object.
-std::ostream& operator<<(std::ostream& os, const TestPartResult& result);
-
-// An array of TestPartResult objects.
-//
-// Don't inherit from TestPartResultArray as its destructor is not
-// virtual.
-class GTEST_API_ TestPartResultArray {
- public:
-  TestPartResultArray() {}
-
-  // Appends the given TestPartResult to the array.
-  void Append(const TestPartResult& result);
-
-  // Returns the TestPartResult at the given index (0-based).
-  const TestPartResult& GetTestPartResult(int index) const;
-
-  // Returns the number of TestPartResult objects in the array.
-  int size() const;
-
- private:
-  std::vector<TestPartResult> array_;
-
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(TestPartResultArray);
-};
-
-// This interface knows how to report a test part result.
-class GTEST_API_ TestPartResultReporterInterface {
- public:
-  virtual ~TestPartResultReporterInterface() {}
-
-  virtual void ReportTestPartResult(const TestPartResult& result) = 0;
-};
-
-namespace internal {
-
-// This helper class is used by {ASSERT|EXPECT}_NO_FATAL_FAILURE to check if a
-// statement generates new fatal failures. To do so it registers itself as the
-// current test part result reporter. Besides checking if fatal failures were
-// reported, it only delegates the reporting to the former result reporter.
-// The original result reporter is restored in the destructor.
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-class GTEST_API_ HasNewFatalFailureHelper
-    : public TestPartResultReporterInterface {
- public:
-  HasNewFatalFailureHelper();
-  ~HasNewFatalFailureHelper() override;
-  void ReportTestPartResult(const TestPartResult& result) override;
-  bool has_new_fatal_failure() const { return has_new_fatal_failure_; }
- private:
-  bool has_new_fatal_failure_;
-  TestPartResultReporterInterface* original_reporter_;
-
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(HasNewFatalFailureHelper);
-};
-
-}  // namespace internal
-
-}  // namespace testing
-
-GTEST_DISABLE_MSC_WARNINGS_POP_()  //  4251
-
-#endif  // GOOGLETEST_INCLUDE_GTEST_GTEST_TEST_PART_H_
diff --git a/src/include/gromacs/external/googletest/googletest/include/gtest/gtest-typed-test.h b/src/include/gromacs/external/googletest/googletest/include/gtest/gtest-typed-test.h
deleted file mode 100644 (file)
index 8e078b3..0000000
+++ /dev/null
@@ -1,327 +0,0 @@
-// Copyright 2008 Google Inc.
-// All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef GOOGLETEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_
-#define GOOGLETEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_
-
-// This header implements typed tests and type-parameterized tests.
-
-// Typed (aka type-driven) tests repeat the same test for types in a
-// list.  You must know which types you want to test with when writing
-// typed tests. Here's how you do it:
-
-#if 0
-
-// First, define a fixture class template.  It should be parameterized
-// by a type.  Remember to derive it from testing::Test.
-template <typename T>
-class FooTest : public testing::Test {
- public:
-  ...
-  typedef std::list<T> List;
-  static T shared_;
-  T value_;
-};
-
-// Next, associate a list of types with the test suite, which will be
-// repeated for each type in the list.  The typedef is necessary for
-// the macro to parse correctly.
-typedef testing::Types<char, int, unsigned int> MyTypes;
-TYPED_TEST_SUITE(FooTest, MyTypes);
-
-// If the type list contains only one type, you can write that type
-// directly without Types<...>:
-//   TYPED_TEST_SUITE(FooTest, int);
-
-// Then, use TYPED_TEST() instead of TEST_F() to define as many typed
-// tests for this test suite as you want.
-TYPED_TEST(FooTest, DoesBlah) {
-  // Inside a test, refer to the special name TypeParam to get the type
-  // parameter.  Since we are inside a derived class template, C++ requires
-  // us to visit the members of FooTest via 'this'.
-  TypeParam n = this->value_;
-
-  // To visit static members of the fixture, add the TestFixture::
-  // prefix.
-  n += TestFixture::shared_;
-
-  // To refer to typedefs in the fixture, add the "typename
-  // TestFixture::" prefix.
-  typename TestFixture::List values;
-  values.push_back(n);
-  ...
-}
-
-TYPED_TEST(FooTest, HasPropertyA) { ... }
-
-// TYPED_TEST_SUITE takes an optional third argument which allows to specify a
-// class that generates custom test name suffixes based on the type. This should
-// be a class which has a static template function GetName(int index) returning
-// a string for each type. The provided integer index equals the index of the
-// type in the provided type list. In many cases the index can be ignored.
-//
-// For example:
-//   class MyTypeNames {
-//    public:
-//     template <typename T>
-//     static std::string GetName(int) {
-//       if (std::is_same<T, char>()) return "char";
-//       if (std::is_same<T, int>()) return "int";
-//       if (std::is_same<T, unsigned int>()) return "unsignedInt";
-//     }
-//   };
-//   TYPED_TEST_SUITE(FooTest, MyTypes, MyTypeNames);
-
-#endif  // 0
-
-// Type-parameterized tests are abstract test patterns parameterized
-// by a type.  Compared with typed tests, type-parameterized tests
-// allow you to define the test pattern without knowing what the type
-// parameters are.  The defined pattern can be instantiated with
-// different types any number of times, in any number of translation
-// units.
-//
-// If you are designing an interface or concept, you can define a
-// suite of type-parameterized tests to verify properties that any
-// valid implementation of the interface/concept should have.  Then,
-// each implementation can easily instantiate the test suite to verify
-// that it conforms to the requirements, without having to write
-// similar tests repeatedly.  Here's an example:
-
-#if 0
-
-// First, define a fixture class template.  It should be parameterized
-// by a type.  Remember to derive it from testing::Test.
-template <typename T>
-class FooTest : public testing::Test {
-  ...
-};
-
-// Next, declare that you will define a type-parameterized test suite
-// (the _P suffix is for "parameterized" or "pattern", whichever you
-// prefer):
-TYPED_TEST_SUITE_P(FooTest);
-
-// Then, use TYPED_TEST_P() to define as many type-parameterized tests
-// for this type-parameterized test suite as you want.
-TYPED_TEST_P(FooTest, DoesBlah) {
-  // Inside a test, refer to TypeParam to get the type parameter.
-  TypeParam n = 0;
-  ...
-}
-
-TYPED_TEST_P(FooTest, HasPropertyA) { ... }
-
-// Now the tricky part: you need to register all test patterns before
-// you can instantiate them.  The first argument of the macro is the
-// test suite name; the rest are the names of the tests in this test
-// case.
-REGISTER_TYPED_TEST_SUITE_P(FooTest,
-                            DoesBlah, HasPropertyA);
-
-// Finally, you are free to instantiate the pattern with the types you
-// want.  If you put the above code in a header file, you can #include
-// it in multiple C++ source files and instantiate it multiple times.
-//
-// To distinguish different instances of the pattern, the first
-// argument to the INSTANTIATE_* macro is a prefix that will be added
-// to the actual test suite name.  Remember to pick unique prefixes for
-// different instances.
-typedef testing::Types<char, int, unsigned int> MyTypes;
-INSTANTIATE_TYPED_TEST_SUITE_P(My, FooTest, MyTypes);
-
-// If the type list contains only one type, you can write that type
-// directly without Types<...>:
-//   INSTANTIATE_TYPED_TEST_SUITE_P(My, FooTest, int);
-//
-// Similar to the optional argument of TYPED_TEST_SUITE above,
-// INSTANTIATE_TEST_SUITE_P takes an optional fourth argument which allows to
-// generate custom names.
-//   INSTANTIATE_TYPED_TEST_SUITE_P(My, FooTest, MyTypes, MyTypeNames);
-
-#endif  // 0
-
-#include "gtest/internal/gtest-internal.h"
-#include "gtest/internal/gtest-port.h"
-#include "gtest/internal/gtest-type-util.h"
-
-// Implements typed tests.
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// Expands to the name of the typedef for the type parameters of the
-// given test suite.
-#define GTEST_TYPE_PARAMS_(TestSuiteName) gtest_type_params_##TestSuiteName##_
-
-// Expands to the name of the typedef for the NameGenerator, responsible for
-// creating the suffixes of the name.
-#define GTEST_NAME_GENERATOR_(TestSuiteName) \
-  gtest_type_params_##TestSuiteName##_NameGenerator
-
-#define TYPED_TEST_SUITE(CaseName, Types, ...)                          \
-  typedef ::testing::internal::GenerateTypeList<Types>::type            \
-      GTEST_TYPE_PARAMS_(CaseName);                                     \
-  typedef ::testing::internal::NameGeneratorSelector<__VA_ARGS__>::type \
-      GTEST_NAME_GENERATOR_(CaseName)
-
-#define TYPED_TEST(CaseName, TestName)                                        \
-  static_assert(sizeof(GTEST_STRINGIFY_(TestName)) > 1,                       \
-                "test-name must not be empty");                               \
-  template <typename gtest_TypeParam_>                                        \
-  class GTEST_TEST_CLASS_NAME_(CaseName, TestName)                            \
-      : public CaseName<gtest_TypeParam_> {                                   \
-   private:                                                                   \
-    typedef CaseName<gtest_TypeParam_> TestFixture;                           \
-    typedef gtest_TypeParam_ TypeParam;                                       \
-    void TestBody() override;                                                 \
-  };                                                                          \
-  static bool gtest_##CaseName##_##TestName##_registered_                     \
-      GTEST_ATTRIBUTE_UNUSED_ = ::testing::internal::TypeParameterizedTest<   \
-          CaseName,                                                           \
-          ::testing::internal::TemplateSel<GTEST_TEST_CLASS_NAME_(CaseName,   \
-                                                                  TestName)>, \
-          GTEST_TYPE_PARAMS_(                                                 \
-              CaseName)>::Register("",                                        \
-                                   ::testing::internal::CodeLocation(         \
-                                       __FILE__, __LINE__),                   \
-                                   GTEST_STRINGIFY_(CaseName),                \
-                                   GTEST_STRINGIFY_(TestName), 0,             \
-                                   ::testing::internal::GenerateNames<        \
-                                       GTEST_NAME_GENERATOR_(CaseName),       \
-                                       GTEST_TYPE_PARAMS_(CaseName)>());      \
-  template <typename gtest_TypeParam_>                                        \
-  void GTEST_TEST_CLASS_NAME_(CaseName,                                       \
-                              TestName)<gtest_TypeParam_>::TestBody()
-
-// Legacy API is deprecated but still available
-#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-#define TYPED_TEST_CASE                                                \
-  static_assert(::testing::internal::TypedTestCaseIsDeprecated(), ""); \
-  TYPED_TEST_SUITE
-#endif  // GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-
-// Implements type-parameterized tests.
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// Expands to the namespace name that the type-parameterized tests for
-// the given type-parameterized test suite are defined in.  The exact
-// name of the namespace is subject to change without notice.
-#define GTEST_SUITE_NAMESPACE_(TestSuiteName) gtest_suite_##TestSuiteName##_
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// Expands to the name of the variable used to remember the names of
-// the defined tests in the given test suite.
-#define GTEST_TYPED_TEST_SUITE_P_STATE_(TestSuiteName) \
-  gtest_typed_test_suite_p_state_##TestSuiteName##_
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE DIRECTLY.
-//
-// Expands to the name of the variable used to remember the names of
-// the registered tests in the given test suite.
-#define GTEST_REGISTERED_TEST_NAMES_(TestSuiteName) \
-  gtest_registered_test_names_##TestSuiteName##_
-
-// The variables defined in the type-parameterized test macros are
-// static as typically these macros are used in a .h file that can be
-// #included in multiple translation units linked together.
-#define TYPED_TEST_SUITE_P(SuiteName)              \
-  static ::testing::internal::TypedTestSuitePState \
-      GTEST_TYPED_TEST_SUITE_P_STATE_(SuiteName)
-
-// Legacy API is deprecated but still available
-#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-#define TYPED_TEST_CASE_P                                                 \
-  static_assert(::testing::internal::TypedTestCase_P_IsDeprecated(), ""); \
-  TYPED_TEST_SUITE_P
-#endif  // GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-
-#define TYPED_TEST_P(SuiteName, TestName)                             \
-  namespace GTEST_SUITE_NAMESPACE_(SuiteName) {                       \
-    template <typename gtest_TypeParam_>                              \
-    class TestName : public SuiteName<gtest_TypeParam_> {             \
-     private:                                                         \
-      typedef SuiteName<gtest_TypeParam_> TestFixture;                \
-      typedef gtest_TypeParam_ TypeParam;                             \
-      void TestBody() override;                                       \
-    };                                                                \
-    static bool gtest_##TestName##_defined_ GTEST_ATTRIBUTE_UNUSED_ = \
-        GTEST_TYPED_TEST_SUITE_P_STATE_(SuiteName).AddTestName(       \
-            __FILE__, __LINE__, GTEST_STRINGIFY_(SuiteName),          \
-            GTEST_STRINGIFY_(TestName));                              \
-  }                                                                   \
-  template <typename gtest_TypeParam_>                                \
-  void GTEST_SUITE_NAMESPACE_(                                        \
-      SuiteName)::TestName<gtest_TypeParam_>::TestBody()
-
-// Note: this won't work correctly if the trailing arguments are macros.
-#define REGISTER_TYPED_TEST_SUITE_P(SuiteName, ...)                         \
-  namespace GTEST_SUITE_NAMESPACE_(SuiteName) {                             \
-    typedef ::testing::internal::Templates<__VA_ARGS__> gtest_AllTests_;    \
-  }                                                                         \
-  static const char* const GTEST_REGISTERED_TEST_NAMES_(                    \
-      SuiteName) GTEST_ATTRIBUTE_UNUSED_ =                                  \
-      GTEST_TYPED_TEST_SUITE_P_STATE_(SuiteName).VerifyRegisteredTestNames( \
-          GTEST_STRINGIFY_(SuiteName), __FILE__, __LINE__, #__VA_ARGS__)
-
-// Legacy API is deprecated but still available
-#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-#define REGISTER_TYPED_TEST_CASE_P                                           \
-  static_assert(::testing::internal::RegisterTypedTestCase_P_IsDeprecated(), \
-                "");                                                         \
-  REGISTER_TYPED_TEST_SUITE_P
-#endif  // GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-
-#define INSTANTIATE_TYPED_TEST_SUITE_P(Prefix, SuiteName, Types, ...)       \
-  static_assert(sizeof(GTEST_STRINGIFY_(Prefix)) > 1,                       \
-                "test-suit-prefix must not be empty");                      \
-  static bool gtest_##Prefix##_##SuiteName GTEST_ATTRIBUTE_UNUSED_ =        \
-      ::testing::internal::TypeParameterizedTestSuite<                      \
-          SuiteName, GTEST_SUITE_NAMESPACE_(SuiteName)::gtest_AllTests_,    \
-          ::testing::internal::GenerateTypeList<Types>::type>::             \
-          Register(GTEST_STRINGIFY_(Prefix),                                \
-                   ::testing::internal::CodeLocation(__FILE__, __LINE__),   \
-                   &GTEST_TYPED_TEST_SUITE_P_STATE_(SuiteName),             \
-                   GTEST_STRINGIFY_(SuiteName),                             \
-                   GTEST_REGISTERED_TEST_NAMES_(SuiteName),                 \
-                   ::testing::internal::GenerateNames<                      \
-                       ::testing::internal::NameGeneratorSelector<          \
-                           __VA_ARGS__>::type,                              \
-                       ::testing::internal::GenerateTypeList<Types>::type>())
-
-// Legacy API is deprecated but still available
-#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-#define INSTANTIATE_TYPED_TEST_CASE_P                                      \
-  static_assert(                                                           \
-      ::testing::internal::InstantiateTypedTestCase_P_IsDeprecated(), ""); \
-  INSTANTIATE_TYPED_TEST_SUITE_P
-#endif  // GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-
-#endif  // GOOGLETEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_
diff --git a/src/include/gromacs/external/googletest/googletest/include/gtest/gtest.h b/src/include/gromacs/external/googletest/googletest/include/gtest/gtest.h
deleted file mode 100644 (file)
index 0a4c8a2..0000000
+++ /dev/null
@@ -1,2501 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-//
-// The Google C++ Testing and Mocking Framework (Google Test)
-//
-// This header file defines the public API for Google Test.  It should be
-// included by any test program that uses Google Test.
-//
-// IMPORTANT NOTE: Due to limitation of the C++ language, we have to
-// leave some internal implementation details in this header file.
-// They are clearly marked by comments like this:
-//
-//   // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-//
-// Such code is NOT meant to be used by a user directly, and is subject
-// to CHANGE WITHOUT NOTICE.  Therefore DO NOT DEPEND ON IT in a user
-// program!
-//
-// Acknowledgment: Google Test borrowed the idea of automatic test
-// registration from Barthelemy Dagenais' (barthelemy@prologique.com)
-// easyUnit framework.
-
-#ifndef GOOGLETEST_INCLUDE_GTEST_GTEST_H_
-#define GOOGLETEST_INCLUDE_GTEST_GTEST_H_
-
-#include <cstddef>
-#include <limits>
-#include <memory>
-#include <ostream>
-#include <type_traits>
-#include <vector>
-
-#include "gtest/internal/gtest-internal.h"
-#include "gtest/internal/gtest-string.h"
-#include "gtest/gtest-death-test.h"
-#include "gtest/gtest-matchers.h"
-#include "gtest/gtest-message.h"
-#include "gtest/gtest-param-test.h"
-#include "gtest/gtest-printers.h"
-#include "gtest/gtest_prod.h"
-#include "gtest/gtest-test-part.h"
-#include "gtest/gtest-typed-test.h"
-
-GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \
-/* class A needs to have dll-interface to be used by clients of class B */)
-
-// Declares the flags.
-
-// This flag temporary enables the disabled tests.
-GTEST_DECLARE_bool_(also_run_disabled_tests);
-
-// This flag brings the debugger on an assertion failure.
-GTEST_DECLARE_bool_(break_on_failure);
-
-// This flag controls whether Google Test catches all test-thrown exceptions
-// and logs them as failures.
-GTEST_DECLARE_bool_(catch_exceptions);
-
-// This flag enables using colors in terminal output. Available values are
-// "yes" to enable colors, "no" (disable colors), or "auto" (the default)
-// to let Google Test decide.
-GTEST_DECLARE_string_(color);
-
-// This flag controls whether the test runner should continue execution past
-// first failure.
-GTEST_DECLARE_bool_(fail_fast);
-
-// This flag sets up the filter to select by name using a glob pattern
-// the tests to run. If the filter is not given all tests are executed.
-GTEST_DECLARE_string_(filter);
-
-// This flag controls whether Google Test installs a signal handler that dumps
-// debugging information when fatal signals are raised.
-GTEST_DECLARE_bool_(install_failure_signal_handler);
-
-// This flag causes the Google Test to list tests. None of the tests listed
-// are actually run if the flag is provided.
-GTEST_DECLARE_bool_(list_tests);
-
-// This flag controls whether Google Test emits a detailed XML report to a file
-// in addition to its normal textual output.
-GTEST_DECLARE_string_(output);
-
-// This flags control whether Google Test prints only test failures.
-GTEST_DECLARE_bool_(brief);
-
-// This flags control whether Google Test prints the elapsed time for each
-// test.
-GTEST_DECLARE_bool_(print_time);
-
-// This flags control whether Google Test prints UTF8 characters as text.
-GTEST_DECLARE_bool_(print_utf8);
-
-// This flag specifies the random number seed.
-GTEST_DECLARE_int32_(random_seed);
-
-// This flag sets how many times the tests are repeated. The default value
-// is 1. If the value is -1 the tests are repeating forever.
-GTEST_DECLARE_int32_(repeat);
-
-// This flag controls whether Google Test Environments are recreated for each
-// repeat of the tests. The default value is true. If set to false the global
-// test Environment objects are only set up once, for the first iteration, and
-// only torn down once, for the last.
-GTEST_DECLARE_bool_(recreate_environments_when_repeating);
-
-// This flag controls whether Google Test includes Google Test internal
-// stack frames in failure stack traces.
-GTEST_DECLARE_bool_(show_internal_stack_frames);
-
-// When this flag is specified, tests' order is randomized on every iteration.
-GTEST_DECLARE_bool_(shuffle);
-
-// This flag specifies the maximum number of stack frames to be
-// printed in a failure message.
-GTEST_DECLARE_int32_(stack_trace_depth);
-
-// When this flag is specified, a failed assertion will throw an
-// exception if exceptions are enabled, or exit the program with a
-// non-zero code otherwise. For use with an external test framework.
-GTEST_DECLARE_bool_(throw_on_failure);
-
-// When this flag is set with a "host:port" string, on supported
-// platforms test results are streamed to the specified port on
-// the specified host machine.
-GTEST_DECLARE_string_(stream_result_to);
-
-#if GTEST_USE_OWN_FLAGFILE_FLAG_
-GTEST_DECLARE_string_(flagfile);
-#endif  // GTEST_USE_OWN_FLAGFILE_FLAG_
-
-namespace testing {
-
-// Silence C4100 (unreferenced formal parameter) and 4805
-// unsafe mix of type 'const int' and type 'const bool'
-#ifdef _MSC_VER
-#pragma warning(push)
-#pragma warning(disable : 4805)
-#pragma warning(disable : 4100)
-#endif
-
-// The upper limit for valid stack trace depths.
-const int kMaxStackTraceDepth = 100;
-
-namespace internal {
-
-class AssertHelper;
-class DefaultGlobalTestPartResultReporter;
-class ExecDeathTest;
-class NoExecDeathTest;
-class FinalSuccessChecker;
-class GTestFlagSaver;
-class StreamingListenerTest;
-class TestResultAccessor;
-class TestEventListenersAccessor;
-class TestEventRepeater;
-class UnitTestRecordPropertyTestHelper;
-class WindowsDeathTest;
-class FuchsiaDeathTest;
-class UnitTestImpl* GetUnitTestImpl();
-void ReportFailureInUnknownLocation(TestPartResult::Type result_type,
-                                    const std::string& message);
-std::set<std::string>* GetIgnoredParameterizedTestSuites();
-
-}  // namespace internal
-
-// The friend relationship of some of these classes is cyclic.
-// If we don't forward declare them the compiler might confuse the classes
-// in friendship clauses with same named classes on the scope.
-class Test;
-class TestSuite;
-
-// Old API is still available but deprecated
-#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-using TestCase = TestSuite;
-#endif
-class TestInfo;
-class UnitTest;
-
-// A class for indicating whether an assertion was successful.  When
-// the assertion wasn't successful, the AssertionResult object
-// remembers a non-empty message that describes how it failed.
-//
-// To create an instance of this class, use one of the factory functions
-// (AssertionSuccess() and AssertionFailure()).
-//
-// This class is useful for two purposes:
-//   1. Defining predicate functions to be used with Boolean test assertions
-//      EXPECT_TRUE/EXPECT_FALSE and their ASSERT_ counterparts
-//   2. Defining predicate-format functions to be
-//      used with predicate assertions (ASSERT_PRED_FORMAT*, etc).
-//
-// For example, if you define IsEven predicate:
-//
-//   testing::AssertionResult IsEven(int n) {
-//     if ((n % 2) == 0)
-//       return testing::AssertionSuccess();
-//     else
-//       return testing::AssertionFailure() << n << " is odd";
-//   }
-//
-// Then the failed expectation EXPECT_TRUE(IsEven(Fib(5)))
-// will print the message
-//
-//   Value of: IsEven(Fib(5))
-//     Actual: false (5 is odd)
-//   Expected: true
-//
-// instead of a more opaque
-//
-//   Value of: IsEven(Fib(5))
-//     Actual: false
-//   Expected: true
-//
-// in case IsEven is a simple Boolean predicate.
-//
-// If you expect your predicate to be reused and want to support informative
-// messages in EXPECT_FALSE and ASSERT_FALSE (negative assertions show up
-// about half as often as positive ones in our tests), supply messages for
-// both success and failure cases:
-//
-//   testing::AssertionResult IsEven(int n) {
-//     if ((n % 2) == 0)
-//       return testing::AssertionSuccess() << n << " is even";
-//     else
-//       return testing::AssertionFailure() << n << " is odd";
-//   }
-//
-// Then a statement EXPECT_FALSE(IsEven(Fib(6))) will print
-//
-//   Value of: IsEven(Fib(6))
-//     Actual: true (8 is even)
-//   Expected: false
-//
-// NB: Predicates that support negative Boolean assertions have reduced
-// performance in positive ones so be careful not to use them in tests
-// that have lots (tens of thousands) of positive Boolean assertions.
-//
-// To use this class with EXPECT_PRED_FORMAT assertions such as:
-//
-//   // Verifies that Foo() returns an even number.
-//   EXPECT_PRED_FORMAT1(IsEven, Foo());
-//
-// you need to define:
-//
-//   testing::AssertionResult IsEven(const char* expr, int n) {
-//     if ((n % 2) == 0)
-//       return testing::AssertionSuccess();
-//     else
-//       return testing::AssertionFailure()
-//         << "Expected: " << expr << " is even\n  Actual: it's " << n;
-//   }
-//
-// If Foo() returns 5, you will see the following message:
-//
-//   Expected: Foo() is even
-//     Actual: it's 5
-//
-class GTEST_API_ AssertionResult {
- public:
-  // Copy constructor.
-  // Used in EXPECT_TRUE/FALSE(assertion_result).
-  AssertionResult(const AssertionResult& other);
-
-// C4800 is a level 3 warning in Visual Studio 2015 and earlier.
-// This warning is not emitted in Visual Studio 2017.
-// This warning is off by default starting in Visual Studio 2019 but can be
-// enabled with command-line options.
-#if defined(_MSC_VER) && (_MSC_VER < 1910 || _MSC_VER >= 1920)
-  GTEST_DISABLE_MSC_WARNINGS_PUSH_(4800 /* forcing value to bool */)
-#endif
-
-  // Used in the EXPECT_TRUE/FALSE(bool_expression).
-  //
-  // T must be contextually convertible to bool.
-  //
-  // The second parameter prevents this overload from being considered if
-  // the argument is implicitly convertible to AssertionResult. In that case
-  // we want AssertionResult's copy constructor to be used.
-  template <typename T>
-  explicit AssertionResult(
-      const T& success,
-      typename std::enable_if<
-          !std::is_convertible<T, AssertionResult>::value>::type*
-      /*enabler*/
-      = nullptr)
-      : success_(success) {}
-
-#if defined(_MSC_VER) && (_MSC_VER < 1910 || _MSC_VER >= 1920)
-  GTEST_DISABLE_MSC_WARNINGS_POP_()
-#endif
-
-  // Assignment operator.
-  AssertionResult& operator=(AssertionResult other) {
-    swap(other);
-    return *this;
-  }
-
-  // Returns true if and only if the assertion succeeded.
-  operator bool() const { return success_; }  // NOLINT
-
-  // Returns the assertion's negation. Used with EXPECT/ASSERT_FALSE.
-  AssertionResult operator!() const;
-
-  // Returns the text streamed into this AssertionResult. Test assertions
-  // use it when they fail (i.e., the predicate's outcome doesn't match the
-  // assertion's expectation). When nothing has been streamed into the
-  // object, returns an empty string.
-  const char* message() const {
-    return message_.get() != nullptr ? message_->c_str() : "";
-  }
-  // Deprecated; please use message() instead.
-  const char* failure_message() const { return message(); }
-
-  // Streams a custom failure message into this object.
-  template <typename T> AssertionResult& operator<<(const T& value) {
-    AppendMessage(Message() << value);
-    return *this;
-  }
-
-  // Allows streaming basic output manipulators such as endl or flush into
-  // this object.
-  AssertionResult& operator<<(
-      ::std::ostream& (*basic_manipulator)(::std::ostream& stream)) {
-    AppendMessage(Message() << basic_manipulator);
-    return *this;
-  }
-
- private:
-  // Appends the contents of message to message_.
-  void AppendMessage(const Message& a_message) {
-    if (message_.get() == nullptr) message_.reset(new ::std::string);
-    message_->append(a_message.GetString().c_str());
-  }
-
-  // Swap the contents of this AssertionResult with other.
-  void swap(AssertionResult& other);
-
-  // Stores result of the assertion predicate.
-  bool success_;
-  // Stores the message describing the condition in case the expectation
-  // construct is not satisfied with the predicate's outcome.
-  // Referenced via a pointer to avoid taking too much stack frame space
-  // with test assertions.
-  std::unique_ptr< ::std::string> message_;
-};
-
-// Makes a successful assertion result.
-GTEST_API_ AssertionResult AssertionSuccess();
-
-// Makes a failed assertion result.
-GTEST_API_ AssertionResult AssertionFailure();
-
-// Makes a failed assertion result with the given failure message.
-// Deprecated; use AssertionFailure() << msg.
-GTEST_API_ AssertionResult AssertionFailure(const Message& msg);
-
-}  // namespace testing
-
-// Includes the auto-generated header that implements a family of generic
-// predicate assertion macros. This include comes late because it relies on
-// APIs declared above.
-#include "gtest/gtest_pred_impl.h"
-
-namespace testing {
-
-// The abstract class that all tests inherit from.
-//
-// In Google Test, a unit test program contains one or many TestSuites, and
-// each TestSuite contains one or many Tests.
-//
-// When you define a test using the TEST macro, you don't need to
-// explicitly derive from Test - the TEST macro automatically does
-// this for you.
-//
-// The only time you derive from Test is when defining a test fixture
-// to be used in a TEST_F.  For example:
-//
-//   class FooTest : public testing::Test {
-//    protected:
-//     void SetUp() override { ... }
-//     void TearDown() override { ... }
-//     ...
-//   };
-//
-//   TEST_F(FooTest, Bar) { ... }
-//   TEST_F(FooTest, Baz) { ... }
-//
-// Test is not copyable.
-class GTEST_API_ Test {
- public:
-  friend class TestInfo;
-
-  // The d'tor is virtual as we intend to inherit from Test.
-  virtual ~Test();
-
-  // Sets up the stuff shared by all tests in this test suite.
-  //
-  // Google Test will call Foo::SetUpTestSuite() before running the first
-  // test in test suite Foo.  Hence a sub-class can define its own
-  // SetUpTestSuite() method to shadow the one defined in the super
-  // class.
-  static void SetUpTestSuite() {}
-
-  // Tears down the stuff shared by all tests in this test suite.
-  //
-  // Google Test will call Foo::TearDownTestSuite() after running the last
-  // test in test suite Foo.  Hence a sub-class can define its own
-  // TearDownTestSuite() method to shadow the one defined in the super
-  // class.
-  static void TearDownTestSuite() {}
-
-  // Legacy API is deprecated but still available. Use SetUpTestSuite and
-  // TearDownTestSuite instead.
-#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-  static void TearDownTestCase() {}
-  static void SetUpTestCase() {}
-#endif  // GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-
-  // Returns true if and only if the current test has a fatal failure.
-  static bool HasFatalFailure();
-
-  // Returns true if and only if the current test has a non-fatal failure.
-  static bool HasNonfatalFailure();
-
-  // Returns true if and only if the current test was skipped.
-  static bool IsSkipped();
-
-  // Returns true if and only if the current test has a (either fatal or
-  // non-fatal) failure.
-  static bool HasFailure() { return HasFatalFailure() || HasNonfatalFailure(); }
-
-  // Logs a property for the current test, test suite, or for the entire
-  // invocation of the test program when used outside of the context of a
-  // test suite.  Only the last value for a given key is remembered.  These
-  // are public static so they can be called from utility functions that are
-  // not members of the test fixture.  Calls to RecordProperty made during
-  // lifespan of the test (from the moment its constructor starts to the
-  // moment its destructor finishes) will be output in XML as attributes of
-  // the <testcase> element.  Properties recorded from fixture's
-  // SetUpTestSuite or TearDownTestSuite are logged as attributes of the
-  // corresponding <testsuite> element.  Calls to RecordProperty made in the
-  // global context (before or after invocation of RUN_ALL_TESTS and from
-  // SetUp/TearDown method of Environment objects registered with Google
-  // Test) will be output as attributes of the <testsuites> element.
-  static void RecordProperty(const std::string& key, const std::string& value);
-  static void RecordProperty(const std::string& key, int value);
-
- protected:
-  // Creates a Test object.
-  Test();
-
-  // Sets up the test fixture.
-  virtual void SetUp();
-
-  // Tears down the test fixture.
-  virtual void TearDown();
-
- private:
-  // Returns true if and only if the current test has the same fixture class
-  // as the first test in the current test suite.
-  static bool HasSameFixtureClass();
-
-  // Runs the test after the test fixture has been set up.
-  //
-  // A sub-class must implement this to define the test logic.
-  //
-  // DO NOT OVERRIDE THIS FUNCTION DIRECTLY IN A USER PROGRAM.
-  // Instead, use the TEST or TEST_F macro.
-  virtual void TestBody() = 0;
-
-  // Sets up, executes, and tears down the test.
-  void Run();
-
-  // Deletes self.  We deliberately pick an unusual name for this
-  // internal method to avoid clashing with names used in user TESTs.
-  void DeleteSelf_() { delete this; }
-
-  const std::unique_ptr<GTEST_FLAG_SAVER_> gtest_flag_saver_;
-
-  // Often a user misspells SetUp() as Setup() and spends a long time
-  // wondering why it is never called by Google Test.  The declaration of
-  // the following method is solely for catching such an error at
-  // compile time:
-  //
-  //   - The return type is deliberately chosen to be not void, so it
-  //   will be a conflict if void Setup() is declared in the user's
-  //   test fixture.
-  //
-  //   - This method is private, so it will be another compiler error
-  //   if the method is called from the user's test fixture.
-  //
-  // DO NOT OVERRIDE THIS FUNCTION.
-  //
-  // If you see an error about overriding the following function or
-  // about it being private, you have mis-spelled SetUp() as Setup().
-  struct Setup_should_be_spelled_SetUp {};
-  virtual Setup_should_be_spelled_SetUp* Setup() { return nullptr; }
-
-  // We disallow copying Tests.
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(Test);
-};
-
-typedef internal::TimeInMillis TimeInMillis;
-
-// A copyable object representing a user specified test property which can be
-// output as a key/value string pair.
-//
-// Don't inherit from TestProperty as its destructor is not virtual.
-class TestProperty {
- public:
-  // C'tor.  TestProperty does NOT have a default constructor.
-  // Always use this constructor (with parameters) to create a
-  // TestProperty object.
-  TestProperty(const std::string& a_key, const std::string& a_value) :
-    key_(a_key), value_(a_value) {
-  }
-
-  // Gets the user supplied key.
-  const char* key() const {
-    return key_.c_str();
-  }
-
-  // Gets the user supplied value.
-  const char* value() const {
-    return value_.c_str();
-  }
-
-  // Sets a new value, overriding the one supplied in the constructor.
-  void SetValue(const std::string& new_value) {
-    value_ = new_value;
-  }
-
- private:
-  // The key supplied by the user.
-  std::string key_;
-  // The value supplied by the user.
-  std::string value_;
-};
-
-// The result of a single Test.  This includes a list of
-// TestPartResults, a list of TestProperties, a count of how many
-// death tests there are in the Test, and how much time it took to run
-// the Test.
-//
-// TestResult is not copyable.
-class GTEST_API_ TestResult {
- public:
-  // Creates an empty TestResult.
-  TestResult();
-
-  // D'tor.  Do not inherit from TestResult.
-  ~TestResult();
-
-  // Gets the number of all test parts.  This is the sum of the number
-  // of successful test parts and the number of failed test parts.
-  int total_part_count() const;
-
-  // Returns the number of the test properties.
-  int test_property_count() const;
-
-  // Returns true if and only if the test passed (i.e. no test part failed).
-  bool Passed() const { return !Skipped() && !Failed(); }
-
-  // Returns true if and only if the test was skipped.
-  bool Skipped() const;
-
-  // Returns true if and only if the test failed.
-  bool Failed() const;
-
-  // Returns true if and only if the test fatally failed.
-  bool HasFatalFailure() const;
-
-  // Returns true if and only if the test has a non-fatal failure.
-  bool HasNonfatalFailure() const;
-
-  // Returns the elapsed time, in milliseconds.
-  TimeInMillis elapsed_time() const { return elapsed_time_; }
-
-  // Gets the time of the test case start, in ms from the start of the
-  // UNIX epoch.
-  TimeInMillis start_timestamp() const { return start_timestamp_; }
-
-  // Returns the i-th test part result among all the results. i can range from 0
-  // to total_part_count() - 1. If i is not in that range, aborts the program.
-  const TestPartResult& GetTestPartResult(int i) const;
-
-  // Returns the i-th test property. i can range from 0 to
-  // test_property_count() - 1. If i is not in that range, aborts the
-  // program.
-  const TestProperty& GetTestProperty(int i) const;
-
- private:
-  friend class TestInfo;
-  friend class TestSuite;
-  friend class UnitTest;
-  friend class internal::DefaultGlobalTestPartResultReporter;
-  friend class internal::ExecDeathTest;
-  friend class internal::TestResultAccessor;
-  friend class internal::UnitTestImpl;
-  friend class internal::WindowsDeathTest;
-  friend class internal::FuchsiaDeathTest;
-
-  // Gets the vector of TestPartResults.
-  const std::vector<TestPartResult>& test_part_results() const {
-    return test_part_results_;
-  }
-
-  // Gets the vector of TestProperties.
-  const std::vector<TestProperty>& test_properties() const {
-    return test_properties_;
-  }
-
-  // Sets the start time.
-  void set_start_timestamp(TimeInMillis start) { start_timestamp_ = start; }
-
-  // Sets the elapsed time.
-  void set_elapsed_time(TimeInMillis elapsed) { elapsed_time_ = elapsed; }
-
-  // Adds a test property to the list. The property is validated and may add
-  // a non-fatal failure if invalid (e.g., if it conflicts with reserved
-  // key names). If a property is already recorded for the same key, the
-  // value will be updated, rather than storing multiple values for the same
-  // key.  xml_element specifies the element for which the property is being
-  // recorded and is used for validation.
-  void RecordProperty(const std::string& xml_element,
-                      const TestProperty& test_property);
-
-  // Adds a failure if the key is a reserved attribute of Google Test
-  // testsuite tags.  Returns true if the property is valid.
-  // FIXME: Validate attribute names are legal and human readable.
-  static bool ValidateTestProperty(const std::string& xml_element,
-                                   const TestProperty& test_property);
-
-  // Adds a test part result to the list.
-  void AddTestPartResult(const TestPartResult& test_part_result);
-
-  // Returns the death test count.
-  int death_test_count() const { return death_test_count_; }
-
-  // Increments the death test count, returning the new count.
-  int increment_death_test_count() { return ++death_test_count_; }
-
-  // Clears the test part results.
-  void ClearTestPartResults();
-
-  // Clears the object.
-  void Clear();
-
-  // Protects mutable state of the property vector and of owned
-  // properties, whose values may be updated.
-  internal::Mutex test_properties_mutex_;
-
-  // The vector of TestPartResults
-  std::vector<TestPartResult> test_part_results_;
-  // The vector of TestProperties
-  std::vector<TestProperty> test_properties_;
-  // Running count of death tests.
-  int death_test_count_;
-  // The start time, in milliseconds since UNIX Epoch.
-  TimeInMillis start_timestamp_;
-  // The elapsed time, in milliseconds.
-  TimeInMillis elapsed_time_;
-
-  // We disallow copying TestResult.
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(TestResult);
-};  // class TestResult
-
-// A TestInfo object stores the following information about a test:
-//
-//   Test suite name
-//   Test name
-//   Whether the test should be run
-//   A function pointer that creates the test object when invoked
-//   Test result
-//
-// The constructor of TestInfo registers itself with the UnitTest
-// singleton such that the RUN_ALL_TESTS() macro knows which tests to
-// run.
-class GTEST_API_ TestInfo {
- public:
-  // Destructs a TestInfo object.  This function is not virtual, so
-  // don't inherit from TestInfo.
-  ~TestInfo();
-
-  // Returns the test suite name.
-  const char* test_suite_name() const { return test_suite_name_.c_str(); }
-
-// Legacy API is deprecated but still available
-#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-  const char* test_case_name() const { return test_suite_name(); }
-#endif  // GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-
-  // Returns the test name.
-  const char* name() const { return name_.c_str(); }
-
-  // Returns the name of the parameter type, or NULL if this is not a typed
-  // or a type-parameterized test.
-  const char* type_param() const {
-    if (type_param_.get() != nullptr) return type_param_->c_str();
-    return nullptr;
-  }
-
-  // Returns the text representation of the value parameter, or NULL if this
-  // is not a value-parameterized test.
-  const char* value_param() const {
-    if (value_param_.get() != nullptr) return value_param_->c_str();
-    return nullptr;
-  }
-
-  // Returns the file name where this test is defined.
-  const char* file() const { return location_.file.c_str(); }
-
-  // Returns the line where this test is defined.
-  int line() const { return location_.line; }
-
-  // Return true if this test should not be run because it's in another shard.
-  bool is_in_another_shard() const { return is_in_another_shard_; }
-
-  // Returns true if this test should run, that is if the test is not
-  // disabled (or it is disabled but the also_run_disabled_tests flag has
-  // been specified) and its full name matches the user-specified filter.
-  //
-  // Google Test allows the user to filter the tests by their full names.
-  // The full name of a test Bar in test suite Foo is defined as
-  // "Foo.Bar".  Only the tests that match the filter will run.
-  //
-  // A filter is a colon-separated list of glob (not regex) patterns,
-  // optionally followed by a '-' and a colon-separated list of
-  // negative patterns (tests to exclude).  A test is run if it
-  // matches one of the positive patterns and does not match any of
-  // the negative patterns.
-  //
-  // For example, *A*:Foo.* is a filter that matches any string that
-  // contains the character 'A' or starts with "Foo.".
-  bool should_run() const { return should_run_; }
-
-  // Returns true if and only if this test will appear in the XML report.
-  bool is_reportable() const {
-    // The XML report includes tests matching the filter, excluding those
-    // run in other shards.
-    return matches_filter_ && !is_in_another_shard_;
-  }
-
-  // Returns the result of the test.
-  const TestResult* result() const { return &result_; }
-
- private:
-#if GTEST_HAS_DEATH_TEST
-  friend class internal::DefaultDeathTestFactory;
-#endif  // GTEST_HAS_DEATH_TEST
-  friend class Test;
-  friend class TestSuite;
-  friend class internal::UnitTestImpl;
-  friend class internal::StreamingListenerTest;
-  friend TestInfo* internal::MakeAndRegisterTestInfo(
-      const char* test_suite_name, const char* name, const char* type_param,
-      const char* value_param, internal::CodeLocation code_location,
-      internal::TypeId fixture_class_id, internal::SetUpTestSuiteFunc set_up_tc,
-      internal::TearDownTestSuiteFunc tear_down_tc,
-      internal::TestFactoryBase* factory);
-
-  // Constructs a TestInfo object. The newly constructed instance assumes
-  // ownership of the factory object.
-  TestInfo(const std::string& test_suite_name, const std::string& name,
-           const char* a_type_param,   // NULL if not a type-parameterized test
-           const char* a_value_param,  // NULL if not a value-parameterized test
-           internal::CodeLocation a_code_location,
-           internal::TypeId fixture_class_id,
-           internal::TestFactoryBase* factory);
-
-  // Increments the number of death tests encountered in this test so
-  // far.
-  int increment_death_test_count() {
-    return result_.increment_death_test_count();
-  }
-
-  // Creates the test object, runs it, records its result, and then
-  // deletes it.
-  void Run();
-
-  // Skip and records the test result for this object.
-  void Skip();
-
-  static void ClearTestResult(TestInfo* test_info) {
-    test_info->result_.Clear();
-  }
-
-  // These fields are immutable properties of the test.
-  const std::string test_suite_name_;    // test suite name
-  const std::string name_;               // Test name
-  // Name of the parameter type, or NULL if this is not a typed or a
-  // type-parameterized test.
-  const std::unique_ptr<const ::std::string> type_param_;
-  // Text representation of the value parameter, or NULL if this is not a
-  // value-parameterized test.
-  const std::unique_ptr<const ::std::string> value_param_;
-  internal::CodeLocation location_;
-  const internal::TypeId fixture_class_id_;  // ID of the test fixture class
-  bool should_run_;           // True if and only if this test should run
-  bool is_disabled_;          // True if and only if this test is disabled
-  bool matches_filter_;       // True if this test matches the
-                              // user-specified filter.
-  bool is_in_another_shard_;  // Will be run in another shard.
-  internal::TestFactoryBase* const factory_;  // The factory that creates
-                                              // the test object
-
-  // This field is mutable and needs to be reset before running the
-  // test for the second time.
-  TestResult result_;
-
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(TestInfo);
-};
-
-// A test suite, which consists of a vector of TestInfos.
-//
-// TestSuite is not copyable.
-class GTEST_API_ TestSuite {
- public:
-  // Creates a TestSuite with the given name.
-  //
-  // TestSuite does NOT have a default constructor.  Always use this
-  // constructor to create a TestSuite object.
-  //
-  // Arguments:
-  //
-  //   name:         name of the test suite
-  //   a_type_param: the name of the test's type parameter, or NULL if
-  //                 this is not a type-parameterized test.
-  //   set_up_tc:    pointer to the function that sets up the test suite
-  //   tear_down_tc: pointer to the function that tears down the test suite
-  TestSuite(const char* name, const char* a_type_param,
-            internal::SetUpTestSuiteFunc set_up_tc,
-            internal::TearDownTestSuiteFunc tear_down_tc);
-
-  // Destructor of TestSuite.
-  virtual ~TestSuite();
-
-  // Gets the name of the TestSuite.
-  const char* name() const { return name_.c_str(); }
-
-  // Returns the name of the parameter type, or NULL if this is not a
-  // type-parameterized test suite.
-  const char* type_param() const {
-    if (type_param_.get() != nullptr) return type_param_->c_str();
-    return nullptr;
-  }
-
-  // Returns true if any test in this test suite should run.
-  bool should_run() const { return should_run_; }
-
-  // Gets the number of successful tests in this test suite.
-  int successful_test_count() const;
-
-  // Gets the number of skipped tests in this test suite.
-  int skipped_test_count() const;
-
-  // Gets the number of failed tests in this test suite.
-  int failed_test_count() const;
-
-  // Gets the number of disabled tests that will be reported in the XML report.
-  int reportable_disabled_test_count() const;
-
-  // Gets the number of disabled tests in this test suite.
-  int disabled_test_count() const;
-
-  // Gets the number of tests to be printed in the XML report.
-  int reportable_test_count() const;
-
-  // Get the number of tests in this test suite that should run.
-  int test_to_run_count() const;
-
-  // Gets the number of all tests in this test suite.
-  int total_test_count() const;
-
-  // Returns true if and only if the test suite passed.
-  bool Passed() const { return !Failed(); }
-
-  // Returns true if and only if the test suite failed.
-  bool Failed() const {
-    return failed_test_count() > 0 || ad_hoc_test_result().Failed();
-  }
-
-  // Returns the elapsed time, in milliseconds.
-  TimeInMillis elapsed_time() const { return elapsed_time_; }
-
-  // Gets the time of the test suite start, in ms from the start of the
-  // UNIX epoch.
-  TimeInMillis start_timestamp() const { return start_timestamp_; }
-
-  // Returns the i-th test among all the tests. i can range from 0 to
-  // total_test_count() - 1. If i is not in that range, returns NULL.
-  const TestInfo* GetTestInfo(int i) const;
-
-  // Returns the TestResult that holds test properties recorded during
-  // execution of SetUpTestSuite and TearDownTestSuite.
-  const TestResult& ad_hoc_test_result() const { return ad_hoc_test_result_; }
-
- private:
-  friend class Test;
-  friend class internal::UnitTestImpl;
-
-  // Gets the (mutable) vector of TestInfos in this TestSuite.
-  std::vector<TestInfo*>& test_info_list() { return test_info_list_; }
-
-  // Gets the (immutable) vector of TestInfos in this TestSuite.
-  const std::vector<TestInfo*>& test_info_list() const {
-    return test_info_list_;
-  }
-
-  // Returns the i-th test among all the tests. i can range from 0 to
-  // total_test_count() - 1. If i is not in that range, returns NULL.
-  TestInfo* GetMutableTestInfo(int i);
-
-  // Sets the should_run member.
-  void set_should_run(bool should) { should_run_ = should; }
-
-  // Adds a TestInfo to this test suite.  Will delete the TestInfo upon
-  // destruction of the TestSuite object.
-  void AddTestInfo(TestInfo * test_info);
-
-  // Clears the results of all tests in this test suite.
-  void ClearResult();
-
-  // Clears the results of all tests in the given test suite.
-  static void ClearTestSuiteResult(TestSuite* test_suite) {
-    test_suite->ClearResult();
-  }
-
-  // Runs every test in this TestSuite.
-  void Run();
-
-  // Skips the execution of tests under this TestSuite
-  void Skip();
-
-  // Runs SetUpTestSuite() for this TestSuite.  This wrapper is needed
-  // for catching exceptions thrown from SetUpTestSuite().
-  void RunSetUpTestSuite() {
-    if (set_up_tc_ != nullptr) {
-      (*set_up_tc_)();
-    }
-  }
-
-  // Runs TearDownTestSuite() for this TestSuite.  This wrapper is
-  // needed for catching exceptions thrown from TearDownTestSuite().
-  void RunTearDownTestSuite() {
-    if (tear_down_tc_ != nullptr) {
-      (*tear_down_tc_)();
-    }
-  }
-
-  // Returns true if and only if test passed.
-  static bool TestPassed(const TestInfo* test_info) {
-    return test_info->should_run() && test_info->result()->Passed();
-  }
-
-  // Returns true if and only if test skipped.
-  static bool TestSkipped(const TestInfo* test_info) {
-    return test_info->should_run() && test_info->result()->Skipped();
-  }
-
-  // Returns true if and only if test failed.
-  static bool TestFailed(const TestInfo* test_info) {
-    return test_info->should_run() && test_info->result()->Failed();
-  }
-
-  // Returns true if and only if the test is disabled and will be reported in
-  // the XML report.
-  static bool TestReportableDisabled(const TestInfo* test_info) {
-    return test_info->is_reportable() && test_info->is_disabled_;
-  }
-
-  // Returns true if and only if test is disabled.
-  static bool TestDisabled(const TestInfo* test_info) {
-    return test_info->is_disabled_;
-  }
-
-  // Returns true if and only if this test will appear in the XML report.
-  static bool TestReportable(const TestInfo* test_info) {
-    return test_info->is_reportable();
-  }
-
-  // Returns true if the given test should run.
-  static bool ShouldRunTest(const TestInfo* test_info) {
-    return test_info->should_run();
-  }
-
-  // Shuffles the tests in this test suite.
-  void ShuffleTests(internal::Random* random);
-
-  // Restores the test order to before the first shuffle.
-  void UnshuffleTests();
-
-  // Name of the test suite.
-  std::string name_;
-  // Name of the parameter type, or NULL if this is not a typed or a
-  // type-parameterized test.
-  const std::unique_ptr<const ::std::string> type_param_;
-  // The vector of TestInfos in their original order.  It owns the
-  // elements in the vector.
-  std::vector<TestInfo*> test_info_list_;
-  // Provides a level of indirection for the test list to allow easy
-  // shuffling and restoring the test order.  The i-th element in this
-  // vector is the index of the i-th test in the shuffled test list.
-  std::vector<int> test_indices_;
-  // Pointer to the function that sets up the test suite.
-  internal::SetUpTestSuiteFunc set_up_tc_;
-  // Pointer to the function that tears down the test suite.
-  internal::TearDownTestSuiteFunc tear_down_tc_;
-  // True if and only if any test in this test suite should run.
-  bool should_run_;
-  // The start time, in milliseconds since UNIX Epoch.
-  TimeInMillis start_timestamp_;
-  // Elapsed time, in milliseconds.
-  TimeInMillis elapsed_time_;
-  // Holds test properties recorded during execution of SetUpTestSuite and
-  // TearDownTestSuite.
-  TestResult ad_hoc_test_result_;
-
-  // We disallow copying TestSuites.
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(TestSuite);
-};
-
-// An Environment object is capable of setting up and tearing down an
-// environment.  You should subclass this to define your own
-// environment(s).
-//
-// An Environment object does the set-up and tear-down in virtual
-// methods SetUp() and TearDown() instead of the constructor and the
-// destructor, as:
-//
-//   1. You cannot safely throw from a destructor.  This is a problem
-//      as in some cases Google Test is used where exceptions are enabled, and
-//      we may want to implement ASSERT_* using exceptions where they are
-//      available.
-//   2. You cannot use ASSERT_* directly in a constructor or
-//      destructor.
-class Environment {
- public:
-  // The d'tor is virtual as we need to subclass Environment.
-  virtual ~Environment() {}
-
-  // Override this to define how to set up the environment.
-  virtual void SetUp() {}
-
-  // Override this to define how to tear down the environment.
-  virtual void TearDown() {}
- private:
-  // If you see an error about overriding the following function or
-  // about it being private, you have mis-spelled SetUp() as Setup().
-  struct Setup_should_be_spelled_SetUp {};
-  virtual Setup_should_be_spelled_SetUp* Setup() { return nullptr; }
-};
-
-#if GTEST_HAS_EXCEPTIONS
-
-// Exception which can be thrown from TestEventListener::OnTestPartResult.
-class GTEST_API_ AssertionException
-    : public internal::GoogleTestFailureException {
- public:
-  explicit AssertionException(const TestPartResult& result)
-      : GoogleTestFailureException(result) {}
-};
-
-#endif  // GTEST_HAS_EXCEPTIONS
-
-// The interface for tracing execution of tests. The methods are organized in
-// the order the corresponding events are fired.
-class TestEventListener {
- public:
-  virtual ~TestEventListener() {}
-
-  // Fired before any test activity starts.
-  virtual void OnTestProgramStart(const UnitTest& unit_test) = 0;
-
-  // Fired before each iteration of tests starts.  There may be more than
-  // one iteration if GTEST_FLAG(repeat) is set. iteration is the iteration
-  // index, starting from 0.
-  virtual void OnTestIterationStart(const UnitTest& unit_test,
-                                    int iteration) = 0;
-
-  // Fired before environment set-up for each iteration of tests starts.
-  virtual void OnEnvironmentsSetUpStart(const UnitTest& unit_test) = 0;
-
-  // Fired after environment set-up for each iteration of tests ends.
-  virtual void OnEnvironmentsSetUpEnd(const UnitTest& unit_test) = 0;
-
-  // Fired before the test suite starts.
-  virtual void OnTestSuiteStart(const TestSuite& /*test_suite*/) {}
-
-  //  Legacy API is deprecated but still available
-#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-  virtual void OnTestCaseStart(const TestCase& /*test_case*/) {}
-#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-
-  // Fired before the test starts.
-  virtual void OnTestStart(const TestInfo& test_info) = 0;
-
-  // Fired after a failed assertion or a SUCCEED() invocation.
-  // If you want to throw an exception from this function to skip to the next
-  // TEST, it must be AssertionException defined above, or inherited from it.
-  virtual void OnTestPartResult(const TestPartResult& test_part_result) = 0;
-
-  // Fired after the test ends.
-  virtual void OnTestEnd(const TestInfo& test_info) = 0;
-
-  // Fired after the test suite ends.
-  virtual void OnTestSuiteEnd(const TestSuite& /*test_suite*/) {}
-
-//  Legacy API is deprecated but still available
-#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-  virtual void OnTestCaseEnd(const TestCase& /*test_case*/) {}
-#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-
-  // Fired before environment tear-down for each iteration of tests starts.
-  virtual void OnEnvironmentsTearDownStart(const UnitTest& unit_test) = 0;
-
-  // Fired after environment tear-down for each iteration of tests ends.
-  virtual void OnEnvironmentsTearDownEnd(const UnitTest& unit_test) = 0;
-
-  // Fired after each iteration of tests finishes.
-  virtual void OnTestIterationEnd(const UnitTest& unit_test,
-                                  int iteration) = 0;
-
-  // Fired after all test activities have ended.
-  virtual void OnTestProgramEnd(const UnitTest& unit_test) = 0;
-};
-
-// The convenience class for users who need to override just one or two
-// methods and are not concerned that a possible change to a signature of
-// the methods they override will not be caught during the build.  For
-// comments about each method please see the definition of TestEventListener
-// above.
-class EmptyTestEventListener : public TestEventListener {
- public:
-  void OnTestProgramStart(const UnitTest& /*unit_test*/) override {}
-  void OnTestIterationStart(const UnitTest& /*unit_test*/,
-                            int /*iteration*/) override {}
-  void OnEnvironmentsSetUpStart(const UnitTest& /*unit_test*/) override {}
-  void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) override {}
-  void OnTestSuiteStart(const TestSuite& /*test_suite*/) override {}
-//  Legacy API is deprecated but still available
-#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-  void OnTestCaseStart(const TestCase& /*test_case*/) override {}
-#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-
-  void OnTestStart(const TestInfo& /*test_info*/) override {}
-  void OnTestPartResult(const TestPartResult& /*test_part_result*/) override {}
-  void OnTestEnd(const TestInfo& /*test_info*/) override {}
-  void OnTestSuiteEnd(const TestSuite& /*test_suite*/) override {}
-#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-  void OnTestCaseEnd(const TestCase& /*test_case*/) override {}
-#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-
-  void OnEnvironmentsTearDownStart(const UnitTest& /*unit_test*/) override {}
-  void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/) override {}
-  void OnTestIterationEnd(const UnitTest& /*unit_test*/,
-                          int /*iteration*/) override {}
-  void OnTestProgramEnd(const UnitTest& /*unit_test*/) override {}
-};
-
-// TestEventListeners lets users add listeners to track events in Google Test.
-class GTEST_API_ TestEventListeners {
- public:
-  TestEventListeners();
-  ~TestEventListeners();
-
-  // Appends an event listener to the end of the list. Google Test assumes
-  // the ownership of the listener (i.e. it will delete the listener when
-  // the test program finishes).
-  void Append(TestEventListener* listener);
-
-  // Removes the given event listener from the list and returns it.  It then
-  // becomes the caller's responsibility to delete the listener. Returns
-  // NULL if the listener is not found in the list.
-  TestEventListener* Release(TestEventListener* listener);
-
-  // Returns the standard listener responsible for the default console
-  // output.  Can be removed from the listeners list to shut down default
-  // console output.  Note that removing this object from the listener list
-  // with Release transfers its ownership to the caller and makes this
-  // function return NULL the next time.
-  TestEventListener* default_result_printer() const {
-    return default_result_printer_;
-  }
-
-  // Returns the standard listener responsible for the default XML output
-  // controlled by the --gtest_output=xml flag.  Can be removed from the
-  // listeners list by users who want to shut down the default XML output
-  // controlled by this flag and substitute it with custom one.  Note that
-  // removing this object from the listener list with Release transfers its
-  // ownership to the caller and makes this function return NULL the next
-  // time.
-  TestEventListener* default_xml_generator() const {
-    return default_xml_generator_;
-  }
-
- private:
-  friend class TestSuite;
-  friend class TestInfo;
-  friend class internal::DefaultGlobalTestPartResultReporter;
-  friend class internal::NoExecDeathTest;
-  friend class internal::TestEventListenersAccessor;
-  friend class internal::UnitTestImpl;
-
-  // Returns repeater that broadcasts the TestEventListener events to all
-  // subscribers.
-  TestEventListener* repeater();
-
-  // Sets the default_result_printer attribute to the provided listener.
-  // The listener is also added to the listener list and previous
-  // default_result_printer is removed from it and deleted. The listener can
-  // also be NULL in which case it will not be added to the list. Does
-  // nothing if the previous and the current listener objects are the same.
-  void SetDefaultResultPrinter(TestEventListener* listener);
-
-  // Sets the default_xml_generator attribute to the provided listener.  The
-  // listener is also added to the listener list and previous
-  // default_xml_generator is removed from it and deleted. The listener can
-  // also be NULL in which case it will not be added to the list. Does
-  // nothing if the previous and the current listener objects are the same.
-  void SetDefaultXmlGenerator(TestEventListener* listener);
-
-  // Controls whether events will be forwarded by the repeater to the
-  // listeners in the list.
-  bool EventForwardingEnabled() const;
-  void SuppressEventForwarding();
-
-  // The actual list of listeners.
-  internal::TestEventRepeater* repeater_;
-  // Listener responsible for the standard result output.
-  TestEventListener* default_result_printer_;
-  // Listener responsible for the creation of the XML output file.
-  TestEventListener* default_xml_generator_;
-
-  // We disallow copying TestEventListeners.
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(TestEventListeners);
-};
-
-// A UnitTest consists of a vector of TestSuites.
-//
-// This is a singleton class.  The only instance of UnitTest is
-// created when UnitTest::GetInstance() is first called.  This
-// instance is never deleted.
-//
-// UnitTest is not copyable.
-//
-// This class is thread-safe as long as the methods are called
-// according to their specification.
-class GTEST_API_ UnitTest {
- public:
-  // Gets the singleton UnitTest object.  The first time this method
-  // is called, a UnitTest object is constructed and returned.
-  // Consecutive calls will return the same object.
-  static UnitTest* GetInstance();
-
-  // Runs all tests in this UnitTest object and prints the result.
-  // Returns 0 if successful, or 1 otherwise.
-  //
-  // This method can only be called from the main thread.
-  //
-  // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-  int Run() GTEST_MUST_USE_RESULT_;
-
-  // Returns the working directory when the first TEST() or TEST_F()
-  // was executed.  The UnitTest object owns the string.
-  const char* original_working_dir() const;
-
-  // Returns the TestSuite object for the test that's currently running,
-  // or NULL if no test is running.
-  const TestSuite* current_test_suite() const GTEST_LOCK_EXCLUDED_(mutex_);
-
-// Legacy API is still available but deprecated
-#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-  const TestCase* current_test_case() const GTEST_LOCK_EXCLUDED_(mutex_);
-#endif
-
-  // Returns the TestInfo object for the test that's currently running,
-  // or NULL if no test is running.
-  const TestInfo* current_test_info() const
-      GTEST_LOCK_EXCLUDED_(mutex_);
-
-  // Returns the random seed used at the start of the current test run.
-  int random_seed() const;
-
-  // Returns the ParameterizedTestSuiteRegistry object used to keep track of
-  // value-parameterized tests and instantiate and register them.
-  //
-  // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-  internal::ParameterizedTestSuiteRegistry& parameterized_test_registry()
-      GTEST_LOCK_EXCLUDED_(mutex_);
-
-  // Gets the number of successful test suites.
-  int successful_test_suite_count() const;
-
-  // Gets the number of failed test suites.
-  int failed_test_suite_count() const;
-
-  // Gets the number of all test suites.
-  int total_test_suite_count() const;
-
-  // Gets the number of all test suites that contain at least one test
-  // that should run.
-  int test_suite_to_run_count() const;
-
-  //  Legacy API is deprecated but still available
-#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-  int successful_test_case_count() const;
-  int failed_test_case_count() const;
-  int total_test_case_count() const;
-  int test_case_to_run_count() const;
-#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-
-  // Gets the number of successful tests.
-  int successful_test_count() const;
-
-  // Gets the number of skipped tests.
-  int skipped_test_count() const;
-
-  // Gets the number of failed tests.
-  int failed_test_count() const;
-
-  // Gets the number of disabled tests that will be reported in the XML report.
-  int reportable_disabled_test_count() const;
-
-  // Gets the number of disabled tests.
-  int disabled_test_count() const;
-
-  // Gets the number of tests to be printed in the XML report.
-  int reportable_test_count() const;
-
-  // Gets the number of all tests.
-  int total_test_count() const;
-
-  // Gets the number of tests that should run.
-  int test_to_run_count() const;
-
-  // Gets the time of the test program start, in ms from the start of the
-  // UNIX epoch.
-  TimeInMillis start_timestamp() const;
-
-  // Gets the elapsed time, in milliseconds.
-  TimeInMillis elapsed_time() const;
-
-  // Returns true if and only if the unit test passed (i.e. all test suites
-  // passed).
-  bool Passed() const;
-
-  // Returns true if and only if the unit test failed (i.e. some test suite
-  // failed or something outside of all tests failed).
-  bool Failed() const;
-
-  // Gets the i-th test suite among all the test suites. i can range from 0 to
-  // total_test_suite_count() - 1. If i is not in that range, returns NULL.
-  const TestSuite* GetTestSuite(int i) const;
-
-//  Legacy API is deprecated but still available
-#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-  const TestCase* GetTestCase(int i) const;
-#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-
-  // Returns the TestResult containing information on test failures and
-  // properties logged outside of individual test suites.
-  const TestResult& ad_hoc_test_result() const;
-
-  // Returns the list of event listeners that can be used to track events
-  // inside Google Test.
-  TestEventListeners& listeners();
-
- private:
-  // Registers and returns a global test environment.  When a test
-  // program is run, all global test environments will be set-up in
-  // the order they were registered.  After all tests in the program
-  // have finished, all global test environments will be torn-down in
-  // the *reverse* order they were registered.
-  //
-  // The UnitTest object takes ownership of the given environment.
-  //
-  // This method can only be called from the main thread.
-  Environment* AddEnvironment(Environment* env);
-
-  // Adds a TestPartResult to the current TestResult object.  All
-  // Google Test assertion macros (e.g. ASSERT_TRUE, EXPECT_EQ, etc)
-  // eventually call this to report their results.  The user code
-  // should use the assertion macros instead of calling this directly.
-  void AddTestPartResult(TestPartResult::Type result_type,
-                         const char* file_name,
-                         int line_number,
-                         const std::string& message,
-                         const std::string& os_stack_trace)
-      GTEST_LOCK_EXCLUDED_(mutex_);
-
-  // Adds a TestProperty to the current TestResult object when invoked from
-  // inside a test, to current TestSuite's ad_hoc_test_result_ when invoked
-  // from SetUpTestSuite or TearDownTestSuite, or to the global property set
-  // when invoked elsewhere.  If the result already contains a property with
-  // the same key, the value will be updated.
-  void RecordProperty(const std::string& key, const std::string& value);
-
-  // Gets the i-th test suite among all the test suites. i can range from 0 to
-  // total_test_suite_count() - 1. If i is not in that range, returns NULL.
-  TestSuite* GetMutableTestSuite(int i);
-
-  // Accessors for the implementation object.
-  internal::UnitTestImpl* impl() { return impl_; }
-  const internal::UnitTestImpl* impl() const { return impl_; }
-
-  // These classes and functions are friends as they need to access private
-  // members of UnitTest.
-  friend class ScopedTrace;
-  friend class Test;
-  friend class internal::AssertHelper;
-  friend class internal::StreamingListenerTest;
-  friend class internal::UnitTestRecordPropertyTestHelper;
-  friend Environment* AddGlobalTestEnvironment(Environment* env);
-  friend std::set<std::string>* internal::GetIgnoredParameterizedTestSuites();
-  friend internal::UnitTestImpl* internal::GetUnitTestImpl();
-  friend void internal::ReportFailureInUnknownLocation(
-      TestPartResult::Type result_type,
-      const std::string& message);
-
-  // Creates an empty UnitTest.
-  UnitTest();
-
-  // D'tor
-  virtual ~UnitTest();
-
-  // Pushes a trace defined by SCOPED_TRACE() on to the per-thread
-  // Google Test trace stack.
-  void PushGTestTrace(const internal::TraceInfo& trace)
-      GTEST_LOCK_EXCLUDED_(mutex_);
-
-  // Pops a trace from the per-thread Google Test trace stack.
-  void PopGTestTrace()
-      GTEST_LOCK_EXCLUDED_(mutex_);
-
-  // Protects mutable state in *impl_.  This is mutable as some const
-  // methods need to lock it too.
-  mutable internal::Mutex mutex_;
-
-  // Opaque implementation object.  This field is never changed once
-  // the object is constructed.  We don't mark it as const here, as
-  // doing so will cause a warning in the constructor of UnitTest.
-  // Mutable state in *impl_ is protected by mutex_.
-  internal::UnitTestImpl* impl_;
-
-  // We disallow copying UnitTest.
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(UnitTest);
-};
-
-// A convenient wrapper for adding an environment for the test
-// program.
-//
-// You should call this before RUN_ALL_TESTS() is called, probably in
-// main().  If you use gtest_main, you need to call this before main()
-// starts for it to take effect.  For example, you can define a global
-// variable like this:
-//
-//   testing::Environment* const foo_env =
-//       testing::AddGlobalTestEnvironment(new FooEnvironment);
-//
-// However, we strongly recommend you to write your own main() and
-// call AddGlobalTestEnvironment() there, as relying on initialization
-// of global variables makes the code harder to read and may cause
-// problems when you register multiple environments from different
-// translation units and the environments have dependencies among them
-// (remember that the compiler doesn't guarantee the order in which
-// global variables from different translation units are initialized).
-inline Environment* AddGlobalTestEnvironment(Environment* env) {
-  return UnitTest::GetInstance()->AddEnvironment(env);
-}
-
-// Initializes Google Test.  This must be called before calling
-// RUN_ALL_TESTS().  In particular, it parses a command line for the
-// flags that Google Test recognizes.  Whenever a Google Test flag is
-// seen, it is removed from argv, and *argc is decremented.
-//
-// No value is returned.  Instead, the Google Test flag variables are
-// updated.
-//
-// Calling the function for the second time has no user-visible effect.
-GTEST_API_ void InitGoogleTest(int* argc, char** argv);
-
-// This overloaded version can be used in Windows programs compiled in
-// UNICODE mode.
-GTEST_API_ void InitGoogleTest(int* argc, wchar_t** argv);
-
-// This overloaded version can be used on Arduino/embedded platforms where
-// there is no argc/argv.
-GTEST_API_ void InitGoogleTest();
-
-namespace internal {
-
-// Separate the error generating code from the code path to reduce the stack
-// frame size of CmpHelperEQ. This helps reduce the overhead of some sanitizers
-// when calling EXPECT_* in a tight loop.
-template <typename T1, typename T2>
-AssertionResult CmpHelperEQFailure(const char* lhs_expression,
-                                   const char* rhs_expression,
-                                   const T1& lhs, const T2& rhs) {
-  return EqFailure(lhs_expression,
-                   rhs_expression,
-                   FormatForComparisonFailureMessage(lhs, rhs),
-                   FormatForComparisonFailureMessage(rhs, lhs),
-                   false);
-}
-
-// This block of code defines operator==/!=
-// to block lexical scope lookup.
-// It prevents using invalid operator==/!= defined at namespace scope.
-struct faketype {};
-inline bool operator==(faketype, faketype) { return true; }
-inline bool operator!=(faketype, faketype) { return false; }
-
-// The helper function for {ASSERT|EXPECT}_EQ.
-template <typename T1, typename T2>
-AssertionResult CmpHelperEQ(const char* lhs_expression,
-                            const char* rhs_expression,
-                            const T1& lhs,
-                            const T2& rhs) {
-  if (lhs == rhs) {
-    return AssertionSuccess();
-  }
-
-  return CmpHelperEQFailure(lhs_expression, rhs_expression, lhs, rhs);
-}
-
-class EqHelper {
- public:
-  // This templatized version is for the general case.
-  template <
-      typename T1, typename T2,
-      // Disable this overload for cases where one argument is a pointer
-      // and the other is the null pointer constant.
-      typename std::enable_if<!std::is_integral<T1>::value ||
-                              !std::is_pointer<T2>::value>::type* = nullptr>
-  static AssertionResult Compare(const char* lhs_expression,
-                                 const char* rhs_expression, const T1& lhs,
-                                 const T2& rhs) {
-    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
-  }
-
-  // With this overloaded version, we allow anonymous enums to be used
-  // in {ASSERT|EXPECT}_EQ when compiled with gcc 4, as anonymous
-  // enums can be implicitly cast to BiggestInt.
-  //
-  // Even though its body looks the same as the above version, we
-  // cannot merge the two, as it will make anonymous enums unhappy.
-  static AssertionResult Compare(const char* lhs_expression,
-                                 const char* rhs_expression,
-                                 BiggestInt lhs,
-                                 BiggestInt rhs) {
-    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
-  }
-
-  template <typename T>
-  static AssertionResult Compare(
-      const char* lhs_expression, const char* rhs_expression,
-      // Handle cases where '0' is used as a null pointer literal.
-      std::nullptr_t /* lhs */, T* rhs) {
-    // We already know that 'lhs' is a null pointer.
-    return CmpHelperEQ(lhs_expression, rhs_expression, static_cast<T*>(nullptr),
-                       rhs);
-  }
-};
-
-// Separate the error generating code from the code path to reduce the stack
-// frame size of CmpHelperOP. This helps reduce the overhead of some sanitizers
-// when calling EXPECT_OP in a tight loop.
-template <typename T1, typename T2>
-AssertionResult CmpHelperOpFailure(const char* expr1, const char* expr2,
-                                   const T1& val1, const T2& val2,
-                                   const char* op) {
-  return AssertionFailure()
-         << "Expected: (" << expr1 << ") " << op << " (" << expr2
-         << "), actual: " << FormatForComparisonFailureMessage(val1, val2)
-         << " vs " << FormatForComparisonFailureMessage(val2, val1);
-}
-
-// A macro for implementing the helper functions needed to implement
-// ASSERT_?? and EXPECT_??.  It is here just to avoid copy-and-paste
-// of similar code.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-
-#define GTEST_IMPL_CMP_HELPER_(op_name, op)\
-template <typename T1, typename T2>\
-AssertionResult CmpHelper##op_name(const char* expr1, const char* expr2, \
-                                   const T1& val1, const T2& val2) {\
-  if (val1 op val2) {\
-    return AssertionSuccess();\
-  } else {\
-    return CmpHelperOpFailure(expr1, expr2, val1, val2, #op);\
-  }\
-}
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-
-// Implements the helper function for {ASSERT|EXPECT}_NE
-GTEST_IMPL_CMP_HELPER_(NE, !=)
-// Implements the helper function for {ASSERT|EXPECT}_LE
-GTEST_IMPL_CMP_HELPER_(LE, <=)
-// Implements the helper function for {ASSERT|EXPECT}_LT
-GTEST_IMPL_CMP_HELPER_(LT, <)
-// Implements the helper function for {ASSERT|EXPECT}_GE
-GTEST_IMPL_CMP_HELPER_(GE, >=)
-// Implements the helper function for {ASSERT|EXPECT}_GT
-GTEST_IMPL_CMP_HELPER_(GT, >)
-
-#undef GTEST_IMPL_CMP_HELPER_
-
-// The helper function for {ASSERT|EXPECT}_STREQ.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-GTEST_API_ AssertionResult CmpHelperSTREQ(const char* s1_expression,
-                                          const char* s2_expression,
-                                          const char* s1,
-                                          const char* s2);
-
-// The helper function for {ASSERT|EXPECT}_STRCASEEQ.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-GTEST_API_ AssertionResult CmpHelperSTRCASEEQ(const char* s1_expression,
-                                              const char* s2_expression,
-                                              const char* s1,
-                                              const char* s2);
-
-// The helper function for {ASSERT|EXPECT}_STRNE.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-GTEST_API_ AssertionResult CmpHelperSTRNE(const char* s1_expression,
-                                          const char* s2_expression,
-                                          const char* s1,
-                                          const char* s2);
-
-// The helper function for {ASSERT|EXPECT}_STRCASENE.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-GTEST_API_ AssertionResult CmpHelperSTRCASENE(const char* s1_expression,
-                                              const char* s2_expression,
-                                              const char* s1,
-                                              const char* s2);
-
-
-// Helper function for *_STREQ on wide strings.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-GTEST_API_ AssertionResult CmpHelperSTREQ(const char* s1_expression,
-                                          const char* s2_expression,
-                                          const wchar_t* s1,
-                                          const wchar_t* s2);
-
-// Helper function for *_STRNE on wide strings.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-GTEST_API_ AssertionResult CmpHelperSTRNE(const char* s1_expression,
-                                          const char* s2_expression,
-                                          const wchar_t* s1,
-                                          const wchar_t* s2);
-
-}  // namespace internal
-
-// IsSubstring() and IsNotSubstring() are intended to be used as the
-// first argument to {EXPECT,ASSERT}_PRED_FORMAT2(), not by
-// themselves.  They check whether needle is a substring of haystack
-// (NULL is considered a substring of itself only), and return an
-// appropriate error message when they fail.
-//
-// The {needle,haystack}_expr arguments are the stringified
-// expressions that generated the two real arguments.
-GTEST_API_ AssertionResult IsSubstring(
-    const char* needle_expr, const char* haystack_expr,
-    const char* needle, const char* haystack);
-GTEST_API_ AssertionResult IsSubstring(
-    const char* needle_expr, const char* haystack_expr,
-    const wchar_t* needle, const wchar_t* haystack);
-GTEST_API_ AssertionResult IsNotSubstring(
-    const char* needle_expr, const char* haystack_expr,
-    const char* needle, const char* haystack);
-GTEST_API_ AssertionResult IsNotSubstring(
-    const char* needle_expr, const char* haystack_expr,
-    const wchar_t* needle, const wchar_t* haystack);
-GTEST_API_ AssertionResult IsSubstring(
-    const char* needle_expr, const char* haystack_expr,
-    const ::std::string& needle, const ::std::string& haystack);
-GTEST_API_ AssertionResult IsNotSubstring(
-    const char* needle_expr, const char* haystack_expr,
-    const ::std::string& needle, const ::std::string& haystack);
-
-#if GTEST_HAS_STD_WSTRING
-GTEST_API_ AssertionResult IsSubstring(
-    const char* needle_expr, const char* haystack_expr,
-    const ::std::wstring& needle, const ::std::wstring& haystack);
-GTEST_API_ AssertionResult IsNotSubstring(
-    const char* needle_expr, const char* haystack_expr,
-    const ::std::wstring& needle, const ::std::wstring& haystack);
-#endif  // GTEST_HAS_STD_WSTRING
-
-namespace internal {
-
-// Helper template function for comparing floating-points.
-//
-// Template parameter:
-//
-//   RawType: the raw floating-point type (either float or double)
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-template <typename RawType>
-AssertionResult CmpHelperFloatingPointEQ(const char* lhs_expression,
-                                         const char* rhs_expression,
-                                         RawType lhs_value,
-                                         RawType rhs_value) {
-  const FloatingPoint<RawType> lhs(lhs_value), rhs(rhs_value);
-
-  if (lhs.AlmostEquals(rhs)) {
-    return AssertionSuccess();
-  }
-
-  ::std::stringstream lhs_ss;
-  lhs_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2)
-         << lhs_value;
-
-  ::std::stringstream rhs_ss;
-  rhs_ss << std::setprecision(std::numeric_limits<RawType>::digits10 + 2)
-         << rhs_value;
-
-  return EqFailure(lhs_expression,
-                   rhs_expression,
-                   StringStreamToString(&lhs_ss),
-                   StringStreamToString(&rhs_ss),
-                   false);
-}
-
-// Helper function for implementing ASSERT_NEAR.
-//
-// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
-GTEST_API_ AssertionResult DoubleNearPredFormat(const char* expr1,
-                                                const char* expr2,
-                                                const char* abs_error_expr,
-                                                double val1,
-                                                double val2,
-                                                double abs_error);
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-// A class that enables one to stream messages to assertion macros
-class GTEST_API_ AssertHelper {
- public:
-  // Constructor.
-  AssertHelper(TestPartResult::Type type,
-               const char* file,
-               int line,
-               const char* message);
-  ~AssertHelper();
-
-  // Message assignment is a semantic trick to enable assertion
-  // streaming; see the GTEST_MESSAGE_ macro below.
-  void operator=(const Message& message) const;
-
- private:
-  // We put our data in a struct so that the size of the AssertHelper class can
-  // be as small as possible.  This is important because gcc is incapable of
-  // re-using stack space even for temporary variables, so every EXPECT_EQ
-  // reserves stack space for another AssertHelper.
-  struct AssertHelperData {
-    AssertHelperData(TestPartResult::Type t,
-                     const char* srcfile,
-                     int line_num,
-                     const char* msg)
-        : type(t), file(srcfile), line(line_num), message(msg) { }
-
-    TestPartResult::Type const type;
-    const char* const file;
-    int const line;
-    std::string const message;
-
-   private:
-    GTEST_DISALLOW_COPY_AND_ASSIGN_(AssertHelperData);
-  };
-
-  AssertHelperData* const data_;
-
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(AssertHelper);
-};
-
-}  // namespace internal
-
-// The pure interface class that all value-parameterized tests inherit from.
-// A value-parameterized class must inherit from both ::testing::Test and
-// ::testing::WithParamInterface. In most cases that just means inheriting
-// from ::testing::TestWithParam, but more complicated test hierarchies
-// may need to inherit from Test and WithParamInterface at different levels.
-//
-// This interface has support for accessing the test parameter value via
-// the GetParam() method.
-//
-// Use it with one of the parameter generator defining functions, like Range(),
-// Values(), ValuesIn(), Bool(), and Combine().
-//
-// class FooTest : public ::testing::TestWithParam<int> {
-//  protected:
-//   FooTest() {
-//     // Can use GetParam() here.
-//   }
-//   ~FooTest() override {
-//     // Can use GetParam() here.
-//   }
-//   void SetUp() override {
-//     // Can use GetParam() here.
-//   }
-//   void TearDown override {
-//     // Can use GetParam() here.
-//   }
-// };
-// TEST_P(FooTest, DoesBar) {
-//   // Can use GetParam() method here.
-//   Foo foo;
-//   ASSERT_TRUE(foo.DoesBar(GetParam()));
-// }
-// INSTANTIATE_TEST_SUITE_P(OneToTenRange, FooTest, ::testing::Range(1, 10));
-
-template <typename T>
-class WithParamInterface {
- public:
-  typedef T ParamType;
-  virtual ~WithParamInterface() {}
-
-  // The current parameter value. Is also available in the test fixture's
-  // constructor.
-  static const ParamType& GetParam() {
-    GTEST_CHECK_(parameter_ != nullptr)
-        << "GetParam() can only be called inside a value-parameterized test "
-        << "-- did you intend to write TEST_P instead of TEST_F?";
-    return *parameter_;
-  }
-
- private:
-  // Sets parameter value. The caller is responsible for making sure the value
-  // remains alive and unchanged throughout the current test.
-  static void SetParam(const ParamType* parameter) {
-    parameter_ = parameter;
-  }
-
-  // Static value used for accessing parameter during a test lifetime.
-  static const ParamType* parameter_;
-
-  // TestClass must be a subclass of WithParamInterface<T> and Test.
-  template <class TestClass> friend class internal::ParameterizedTestFactory;
-};
-
-template <typename T>
-const T* WithParamInterface<T>::parameter_ = nullptr;
-
-// Most value-parameterized classes can ignore the existence of
-// WithParamInterface, and can just inherit from ::testing::TestWithParam.
-
-template <typename T>
-class TestWithParam : public Test, public WithParamInterface<T> {
-};
-
-// Macros for indicating success/failure in test code.
-
-// Skips test in runtime.
-// Skipping test aborts current function.
-// Skipped tests are neither successful nor failed.
-#define GTEST_SKIP() GTEST_SKIP_("")
-
-// ADD_FAILURE unconditionally adds a failure to the current test.
-// SUCCEED generates a success - it doesn't automatically make the
-// current test successful, as a test is only successful when it has
-// no failure.
-//
-// EXPECT_* verifies that a certain condition is satisfied.  If not,
-// it behaves like ADD_FAILURE.  In particular:
-//
-//   EXPECT_TRUE  verifies that a Boolean condition is true.
-//   EXPECT_FALSE verifies that a Boolean condition is false.
-//
-// FAIL and ASSERT_* are similar to ADD_FAILURE and EXPECT_*, except
-// that they will also abort the current function on failure.  People
-// usually want the fail-fast behavior of FAIL and ASSERT_*, but those
-// writing data-driven tests often find themselves using ADD_FAILURE
-// and EXPECT_* more.
-
-// Generates a nonfatal failure with a generic message.
-#define ADD_FAILURE() GTEST_NONFATAL_FAILURE_("Failed")
-
-// Generates a nonfatal failure at the given source file location with
-// a generic message.
-#define ADD_FAILURE_AT(file, line) \
-  GTEST_MESSAGE_AT_(file, line, "Failed", \
-                    ::testing::TestPartResult::kNonFatalFailure)
-
-// Generates a fatal failure with a generic message.
-#define GTEST_FAIL() GTEST_FATAL_FAILURE_("Failed")
-
-// Like GTEST_FAIL(), but at the given source file location.
-#define GTEST_FAIL_AT(file, line)         \
-  GTEST_MESSAGE_AT_(file, line, "Failed", \
-                    ::testing::TestPartResult::kFatalFailure)
-
-// Define this macro to 1 to omit the definition of FAIL(), which is a
-// generic name and clashes with some other libraries.
-#if !GTEST_DONT_DEFINE_FAIL
-# define FAIL() GTEST_FAIL()
-#endif
-
-// Generates a success with a generic message.
-#define GTEST_SUCCEED() GTEST_SUCCESS_("Succeeded")
-
-// Define this macro to 1 to omit the definition of SUCCEED(), which
-// is a generic name and clashes with some other libraries.
-#if !GTEST_DONT_DEFINE_SUCCEED
-# define SUCCEED() GTEST_SUCCEED()
-#endif
-
-// Macros for testing exceptions.
-//
-//    * {ASSERT|EXPECT}_THROW(statement, expected_exception):
-//         Tests that the statement throws the expected exception.
-//    * {ASSERT|EXPECT}_NO_THROW(statement):
-//         Tests that the statement doesn't throw any exception.
-//    * {ASSERT|EXPECT}_ANY_THROW(statement):
-//         Tests that the statement throws an exception.
-
-#define EXPECT_THROW(statement, expected_exception) \
-  GTEST_TEST_THROW_(statement, expected_exception, GTEST_NONFATAL_FAILURE_)
-#define EXPECT_NO_THROW(statement) \
-  GTEST_TEST_NO_THROW_(statement, GTEST_NONFATAL_FAILURE_)
-#define EXPECT_ANY_THROW(statement) \
-  GTEST_TEST_ANY_THROW_(statement, GTEST_NONFATAL_FAILURE_)
-#define ASSERT_THROW(statement, expected_exception) \
-  GTEST_TEST_THROW_(statement, expected_exception, GTEST_FATAL_FAILURE_)
-#define ASSERT_NO_THROW(statement) \
-  GTEST_TEST_NO_THROW_(statement, GTEST_FATAL_FAILURE_)
-#define ASSERT_ANY_THROW(statement) \
-  GTEST_TEST_ANY_THROW_(statement, GTEST_FATAL_FAILURE_)
-
-// Boolean assertions. Condition can be either a Boolean expression or an
-// AssertionResult. For more information on how to use AssertionResult with
-// these macros see comments on that class.
-#define GTEST_EXPECT_TRUE(condition) \
-  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
-                      GTEST_NONFATAL_FAILURE_)
-#define GTEST_EXPECT_FALSE(condition) \
-  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
-                      GTEST_NONFATAL_FAILURE_)
-#define GTEST_ASSERT_TRUE(condition) \
-  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
-                      GTEST_FATAL_FAILURE_)
-#define GTEST_ASSERT_FALSE(condition) \
-  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
-                      GTEST_FATAL_FAILURE_)
-
-// Define these macros to 1 to omit the definition of the corresponding
-// EXPECT or ASSERT, which clashes with some users' own code.
-
-#if !GTEST_DONT_DEFINE_EXPECT_TRUE
-#define EXPECT_TRUE(condition) GTEST_EXPECT_TRUE(condition)
-#endif
-
-#if !GTEST_DONT_DEFINE_EXPECT_FALSE
-#define EXPECT_FALSE(condition) GTEST_EXPECT_FALSE(condition)
-#endif
-
-#if !GTEST_DONT_DEFINE_ASSERT_TRUE
-#define ASSERT_TRUE(condition) GTEST_ASSERT_TRUE(condition)
-#endif
-
-#if !GTEST_DONT_DEFINE_ASSERT_FALSE
-#define ASSERT_FALSE(condition) GTEST_ASSERT_FALSE(condition)
-#endif
-
-// Macros for testing equalities and inequalities.
-//
-//    * {ASSERT|EXPECT}_EQ(v1, v2): Tests that v1 == v2
-//    * {ASSERT|EXPECT}_NE(v1, v2): Tests that v1 != v2
-//    * {ASSERT|EXPECT}_LT(v1, v2): Tests that v1 < v2
-//    * {ASSERT|EXPECT}_LE(v1, v2): Tests that v1 <= v2
-//    * {ASSERT|EXPECT}_GT(v1, v2): Tests that v1 > v2
-//    * {ASSERT|EXPECT}_GE(v1, v2): Tests that v1 >= v2
-//
-// When they are not, Google Test prints both the tested expressions and
-// their actual values.  The values must be compatible built-in types,
-// or you will get a compiler error.  By "compatible" we mean that the
-// values can be compared by the respective operator.
-//
-// Note:
-//
-//   1. It is possible to make a user-defined type work with
-//   {ASSERT|EXPECT}_??(), but that requires overloading the
-//   comparison operators and is thus discouraged by the Google C++
-//   Usage Guide.  Therefore, you are advised to use the
-//   {ASSERT|EXPECT}_TRUE() macro to assert that two objects are
-//   equal.
-//
-//   2. The {ASSERT|EXPECT}_??() macros do pointer comparisons on
-//   pointers (in particular, C strings).  Therefore, if you use it
-//   with two C strings, you are testing how their locations in memory
-//   are related, not how their content is related.  To compare two C
-//   strings by content, use {ASSERT|EXPECT}_STR*().
-//
-//   3. {ASSERT|EXPECT}_EQ(v1, v2) is preferred to
-//   {ASSERT|EXPECT}_TRUE(v1 == v2), as the former tells you
-//   what the actual value is when it fails, and similarly for the
-//   other comparisons.
-//
-//   4. Do not depend on the order in which {ASSERT|EXPECT}_??()
-//   evaluate their arguments, which is undefined.
-//
-//   5. These macros evaluate their arguments exactly once.
-//
-// Examples:
-//
-//   EXPECT_NE(Foo(), 5);
-//   EXPECT_EQ(a_pointer, NULL);
-//   ASSERT_LT(i, array_size);
-//   ASSERT_GT(records.size(), 0) << "There is no record left.";
-
-#define EXPECT_EQ(val1, val2) \
-  EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
-#define EXPECT_NE(val1, val2) \
-  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperNE, val1, val2)
-#define EXPECT_LE(val1, val2) \
-  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperLE, val1, val2)
-#define EXPECT_LT(val1, val2) \
-  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperLT, val1, val2)
-#define EXPECT_GE(val1, val2) \
-  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperGE, val1, val2)
-#define EXPECT_GT(val1, val2) \
-  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperGT, val1, val2)
-
-#define GTEST_ASSERT_EQ(val1, val2) \
-  ASSERT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
-#define GTEST_ASSERT_NE(val1, val2) \
-  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperNE, val1, val2)
-#define GTEST_ASSERT_LE(val1, val2) \
-  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperLE, val1, val2)
-#define GTEST_ASSERT_LT(val1, val2) \
-  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperLT, val1, val2)
-#define GTEST_ASSERT_GE(val1, val2) \
-  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperGE, val1, val2)
-#define GTEST_ASSERT_GT(val1, val2) \
-  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperGT, val1, val2)
-
-// Define macro GTEST_DONT_DEFINE_ASSERT_XY to 1 to omit the definition of
-// ASSERT_XY(), which clashes with some users' own code.
-
-#if !GTEST_DONT_DEFINE_ASSERT_EQ
-# define ASSERT_EQ(val1, val2) GTEST_ASSERT_EQ(val1, val2)
-#endif
-
-#if !GTEST_DONT_DEFINE_ASSERT_NE
-# define ASSERT_NE(val1, val2) GTEST_ASSERT_NE(val1, val2)
-#endif
-
-#if !GTEST_DONT_DEFINE_ASSERT_LE
-# define ASSERT_LE(val1, val2) GTEST_ASSERT_LE(val1, val2)
-#endif
-
-#if !GTEST_DONT_DEFINE_ASSERT_LT
-# define ASSERT_LT(val1, val2) GTEST_ASSERT_LT(val1, val2)
-#endif
-
-#if !GTEST_DONT_DEFINE_ASSERT_GE
-# define ASSERT_GE(val1, val2) GTEST_ASSERT_GE(val1, val2)
-#endif
-
-#if !GTEST_DONT_DEFINE_ASSERT_GT
-# define ASSERT_GT(val1, val2) GTEST_ASSERT_GT(val1, val2)
-#endif
-
-// C-string Comparisons.  All tests treat NULL and any non-NULL string
-// as different.  Two NULLs are equal.
-//
-//    * {ASSERT|EXPECT}_STREQ(s1, s2):     Tests that s1 == s2
-//    * {ASSERT|EXPECT}_STRNE(s1, s2):     Tests that s1 != s2
-//    * {ASSERT|EXPECT}_STRCASEEQ(s1, s2): Tests that s1 == s2, ignoring case
-//    * {ASSERT|EXPECT}_STRCASENE(s1, s2): Tests that s1 != s2, ignoring case
-//
-// For wide or narrow string objects, you can use the
-// {ASSERT|EXPECT}_??() macros.
-//
-// Don't depend on the order in which the arguments are evaluated,
-// which is undefined.
-//
-// These macros evaluate their arguments exactly once.
-
-#define EXPECT_STREQ(s1, s2) \
-  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTREQ, s1, s2)
-#define EXPECT_STRNE(s1, s2) \
-  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRNE, s1, s2)
-#define EXPECT_STRCASEEQ(s1, s2) \
-  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASEEQ, s1, s2)
-#define EXPECT_STRCASENE(s1, s2)\
-  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASENE, s1, s2)
-
-#define ASSERT_STREQ(s1, s2) \
-  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTREQ, s1, s2)
-#define ASSERT_STRNE(s1, s2) \
-  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRNE, s1, s2)
-#define ASSERT_STRCASEEQ(s1, s2) \
-  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASEEQ, s1, s2)
-#define ASSERT_STRCASENE(s1, s2)\
-  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperSTRCASENE, s1, s2)
-
-// Macros for comparing floating-point numbers.
-//
-//    * {ASSERT|EXPECT}_FLOAT_EQ(val1, val2):
-//         Tests that two float values are almost equal.
-//    * {ASSERT|EXPECT}_DOUBLE_EQ(val1, val2):
-//         Tests that two double values are almost equal.
-//    * {ASSERT|EXPECT}_NEAR(v1, v2, abs_error):
-//         Tests that v1 and v2 are within the given distance to each other.
-//
-// Google Test uses ULP-based comparison to automatically pick a default
-// error bound that is appropriate for the operands.  See the
-// FloatingPoint template class in gtest-internal.h if you are
-// interested in the implementation details.
-
-#define EXPECT_FLOAT_EQ(val1, val2)\
-  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<float>, \
-                      val1, val2)
-
-#define EXPECT_DOUBLE_EQ(val1, val2)\
-  EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<double>, \
-                      val1, val2)
-
-#define ASSERT_FLOAT_EQ(val1, val2)\
-  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<float>, \
-                      val1, val2)
-
-#define ASSERT_DOUBLE_EQ(val1, val2)\
-  ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperFloatingPointEQ<double>, \
-                      val1, val2)
-
-#define EXPECT_NEAR(val1, val2, abs_error)\
-  EXPECT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, \
-                      val1, val2, abs_error)
-
-#define ASSERT_NEAR(val1, val2, abs_error)\
-  ASSERT_PRED_FORMAT3(::testing::internal::DoubleNearPredFormat, \
-                      val1, val2, abs_error)
-
-// These predicate format functions work on floating-point values, and
-// can be used in {ASSERT|EXPECT}_PRED_FORMAT2*(), e.g.
-//
-//   EXPECT_PRED_FORMAT2(testing::DoubleLE, Foo(), 5.0);
-
-// Asserts that val1 is less than, or almost equal to, val2.  Fails
-// otherwise.  In particular, it fails if either val1 or val2 is NaN.
-GTEST_API_ AssertionResult FloatLE(const char* expr1, const char* expr2,
-                                   float val1, float val2);
-GTEST_API_ AssertionResult DoubleLE(const char* expr1, const char* expr2,
-                                    double val1, double val2);
-
-
-#if GTEST_OS_WINDOWS
-
-// Macros that test for HRESULT failure and success, these are only useful
-// on Windows, and rely on Windows SDK macros and APIs to compile.
-//
-//    * {ASSERT|EXPECT}_HRESULT_{SUCCEEDED|FAILED}(expr)
-//
-// When expr unexpectedly fails or succeeds, Google Test prints the
-// expected result and the actual result with both a human-readable
-// string representation of the error, if available, as well as the
-// hex result code.
-# define EXPECT_HRESULT_SUCCEEDED(expr) \
-    EXPECT_PRED_FORMAT1(::testing::internal::IsHRESULTSuccess, (expr))
-
-# define ASSERT_HRESULT_SUCCEEDED(expr) \
-    ASSERT_PRED_FORMAT1(::testing::internal::IsHRESULTSuccess, (expr))
-
-# define EXPECT_HRESULT_FAILED(expr) \
-    EXPECT_PRED_FORMAT1(::testing::internal::IsHRESULTFailure, (expr))
-
-# define ASSERT_HRESULT_FAILED(expr) \
-    ASSERT_PRED_FORMAT1(::testing::internal::IsHRESULTFailure, (expr))
-
-#endif  // GTEST_OS_WINDOWS
-
-// Macros that execute statement and check that it doesn't generate new fatal
-// failures in the current thread.
-//
-//   * {ASSERT|EXPECT}_NO_FATAL_FAILURE(statement);
-//
-// Examples:
-//
-//   EXPECT_NO_FATAL_FAILURE(Process());
-//   ASSERT_NO_FATAL_FAILURE(Process()) << "Process() failed";
-//
-#define ASSERT_NO_FATAL_FAILURE(statement) \
-    GTEST_TEST_NO_FATAL_FAILURE_(statement, GTEST_FATAL_FAILURE_)
-#define EXPECT_NO_FATAL_FAILURE(statement) \
-    GTEST_TEST_NO_FATAL_FAILURE_(statement, GTEST_NONFATAL_FAILURE_)
-
-// Causes a trace (including the given source file path and line number,
-// and the given message) to be included in every test failure message generated
-// by code in the scope of the lifetime of an instance of this class. The effect
-// is undone with the destruction of the instance.
-//
-// The message argument can be anything streamable to std::ostream.
-//
-// Example:
-//   testing::ScopedTrace trace("file.cc", 123, "message");
-//
-class GTEST_API_ ScopedTrace {
- public:
-  // The c'tor pushes the given source file location and message onto
-  // a trace stack maintained by Google Test.
-
-  // Template version. Uses Message() to convert the values into strings.
-  // Slow, but flexible.
-  template <typename T>
-  ScopedTrace(const char* file, int line, const T& message) {
-    PushTrace(file, line, (Message() << message).GetString());
-  }
-
-  // Optimize for some known types.
-  ScopedTrace(const char* file, int line, const char* message) {
-    PushTrace(file, line, message ? message : "(null)");
-  }
-
-  ScopedTrace(const char* file, int line, const std::string& message) {
-    PushTrace(file, line, message);
-  }
-
-  // The d'tor pops the info pushed by the c'tor.
-  //
-  // Note that the d'tor is not virtual in order to be efficient.
-  // Don't inherit from ScopedTrace!
-  ~ScopedTrace();
-
- private:
-  void PushTrace(const char* file, int line, std::string message);
-
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(ScopedTrace);
-} GTEST_ATTRIBUTE_UNUSED_;  // A ScopedTrace object does its job in its
-                            // c'tor and d'tor.  Therefore it doesn't
-                            // need to be used otherwise.
-
-// Causes a trace (including the source file path, the current line
-// number, and the given message) to be included in every test failure
-// message generated by code in the current scope.  The effect is
-// undone when the control leaves the current scope.
-//
-// The message argument can be anything streamable to std::ostream.
-//
-// In the implementation, we include the current line number as part
-// of the dummy variable name, thus allowing multiple SCOPED_TRACE()s
-// to appear in the same block - as long as they are on different
-// lines.
-//
-// Assuming that each thread maintains its own stack of traces.
-// Therefore, a SCOPED_TRACE() would (correctly) only affect the
-// assertions in its own thread.
-#define SCOPED_TRACE(message) \
-  ::testing::ScopedTrace GTEST_CONCAT_TOKEN_(gtest_trace_, __LINE__)(\
-    __FILE__, __LINE__, (message))
-
-// Compile-time assertion for type equality.
-// StaticAssertTypeEq<type1, type2>() compiles if and only if type1 and type2
-// are the same type.  The value it returns is not interesting.
-//
-// Instead of making StaticAssertTypeEq a class template, we make it a
-// function template that invokes a helper class template.  This
-// prevents a user from misusing StaticAssertTypeEq<T1, T2> by
-// defining objects of that type.
-//
-// CAVEAT:
-//
-// When used inside a method of a class template,
-// StaticAssertTypeEq<T1, T2>() is effective ONLY IF the method is
-// instantiated.  For example, given:
-//
-//   template <typename T> class Foo {
-//    public:
-//     void Bar() { testing::StaticAssertTypeEq<int, T>(); }
-//   };
-//
-// the code:
-//
-//   void Test1() { Foo<bool> foo; }
-//
-// will NOT generate a compiler error, as Foo<bool>::Bar() is never
-// actually instantiated.  Instead, you need:
-//
-//   void Test2() { Foo<bool> foo; foo.Bar(); }
-//
-// to cause a compiler error.
-template <typename T1, typename T2>
-constexpr bool StaticAssertTypeEq() noexcept {
-  static_assert(std::is_same<T1, T2>::value, "T1 and T2 are not the same type");
-  return true;
-}
-
-// Defines a test.
-//
-// The first parameter is the name of the test suite, and the second
-// parameter is the name of the test within the test suite.
-//
-// The convention is to end the test suite name with "Test".  For
-// example, a test suite for the Foo class can be named FooTest.
-//
-// Test code should appear between braces after an invocation of
-// this macro.  Example:
-//
-//   TEST(FooTest, InitializesCorrectly) {
-//     Foo foo;
-//     EXPECT_TRUE(foo.StatusIsOK());
-//   }
-
-// Note that we call GetTestTypeId() instead of GetTypeId<
-// ::testing::Test>() here to get the type ID of testing::Test.  This
-// is to work around a suspected linker bug when using Google Test as
-// a framework on Mac OS X.  The bug causes GetTypeId<
-// ::testing::Test>() to return different values depending on whether
-// the call is from the Google Test framework itself or from user test
-// code.  GetTestTypeId() is guaranteed to always return the same
-// value, as it always calls GetTypeId<>() from the Google Test
-// framework.
-#define GTEST_TEST(test_suite_name, test_name)             \
-  GTEST_TEST_(test_suite_name, test_name, ::testing::Test, \
-              ::testing::internal::GetTestTypeId())
-
-// Define this macro to 1 to omit the definition of TEST(), which
-// is a generic name and clashes with some other libraries.
-#if !GTEST_DONT_DEFINE_TEST
-#define TEST(test_suite_name, test_name) GTEST_TEST(test_suite_name, test_name)
-#endif
-
-// Defines a test that uses a test fixture.
-//
-// The first parameter is the name of the test fixture class, which
-// also doubles as the test suite name.  The second parameter is the
-// name of the test within the test suite.
-//
-// A test fixture class must be declared earlier.  The user should put
-// the test code between braces after using this macro.  Example:
-//
-//   class FooTest : public testing::Test {
-//    protected:
-//     void SetUp() override { b_.AddElement(3); }
-//
-//     Foo a_;
-//     Foo b_;
-//   };
-//
-//   TEST_F(FooTest, InitializesCorrectly) {
-//     EXPECT_TRUE(a_.StatusIsOK());
-//   }
-//
-//   TEST_F(FooTest, ReturnsElementCountCorrectly) {
-//     EXPECT_EQ(a_.size(), 0);
-//     EXPECT_EQ(b_.size(), 1);
-//   }
-#define GTEST_TEST_F(test_fixture, test_name)\
-  GTEST_TEST_(test_fixture, test_name, test_fixture, \
-              ::testing::internal::GetTypeId<test_fixture>())
-#if !GTEST_DONT_DEFINE_TEST_F
-#define TEST_F(test_fixture, test_name) GTEST_TEST_F(test_fixture, test_name)
-#endif
-
-// Returns a path to temporary directory.
-// Tries to determine an appropriate directory for the platform.
-GTEST_API_ std::string TempDir();
-
-#ifdef _MSC_VER
-#  pragma warning(pop)
-#endif
-
-// Dynamically registers a test with the framework.
-//
-// This is an advanced API only to be used when the `TEST` macros are
-// insufficient. The macros should be preferred when possible, as they avoid
-// most of the complexity of calling this function.
-//
-// The `factory` argument is a factory callable (move-constructible) object or
-// function pointer that creates a new instance of the Test object. It
-// handles ownership to the caller. The signature of the callable is
-// `Fixture*()`, where `Fixture` is the test fixture class for the test. All
-// tests registered with the same `test_suite_name` must return the same
-// fixture type. This is checked at runtime.
-//
-// The framework will infer the fixture class from the factory and will call
-// the `SetUpTestSuite` and `TearDownTestSuite` for it.
-//
-// Must be called before `RUN_ALL_TESTS()` is invoked, otherwise behavior is
-// undefined.
-//
-// Use case example:
-//
-// class MyFixture : public ::testing::Test {
-//  public:
-//   // All of these optional, just like in regular macro usage.
-//   static void SetUpTestSuite() { ... }
-//   static void TearDownTestSuite() { ... }
-//   void SetUp() override { ... }
-//   void TearDown() override { ... }
-// };
-//
-// class MyTest : public MyFixture {
-//  public:
-//   explicit MyTest(int data) : data_(data) {}
-//   void TestBody() override { ... }
-//
-//  private:
-//   int data_;
-// };
-//
-// void RegisterMyTests(const std::vector<int>& values) {
-//   for (int v : values) {
-//     ::testing::RegisterTest(
-//         "MyFixture", ("Test" + std::to_string(v)).c_str(), nullptr,
-//         std::to_string(v).c_str(),
-//         __FILE__, __LINE__,
-//         // Important to use the fixture type as the return type here.
-//         [=]() -> MyFixture* { return new MyTest(v); });
-//   }
-// }
-// ...
-// int main(int argc, char** argv) {
-//   std::vector<int> values_to_test = LoadValuesFromConfig();
-//   RegisterMyTests(values_to_test);
-//   ...
-//   return RUN_ALL_TESTS();
-// }
-//
-template <int&... ExplicitParameterBarrier, typename Factory>
-TestInfo* RegisterTest(const char* test_suite_name, const char* test_name,
-                       const char* type_param, const char* value_param,
-                       const char* file, int line, Factory factory) {
-  using TestT = typename std::remove_pointer<decltype(factory())>::type;
-
-  class FactoryImpl : public internal::TestFactoryBase {
-   public:
-    explicit FactoryImpl(Factory f) : factory_(std::move(f)) {}
-    Test* CreateTest() override { return factory_(); }
-
-   private:
-    Factory factory_;
-  };
-
-#ifndef __clang_analyzer__
-  return internal::MakeAndRegisterTestInfo(
-      test_suite_name, test_name, type_param, value_param,
-      internal::CodeLocation(file, line), internal::GetTypeId<TestT>(),
-      internal::SuiteApiResolver<TestT>::GetSetUpCaseOrSuite(file, line),
-      internal::SuiteApiResolver<TestT>::GetTearDownCaseOrSuite(file, line),
-      new FactoryImpl{std::move(factory)});
-#else
-  return nullptr;
-#endif
-}
-
-}  // namespace testing
-
-// Use this function in main() to run all tests.  It returns 0 if all
-// tests are successful, or 1 otherwise.
-//
-// RUN_ALL_TESTS() should be invoked after the command line has been
-// parsed by InitGoogleTest().
-//
-// This function was formerly a macro; thus, it is in the global
-// namespace and has an all-caps name.
-int RUN_ALL_TESTS() GTEST_MUST_USE_RESULT_;
-
-inline int RUN_ALL_TESTS() {
-  return ::testing::UnitTest::GetInstance()->Run();
-}
-
-GTEST_DISABLE_MSC_WARNINGS_POP_()  //  4251
-
-#endif  // GOOGLETEST_INCLUDE_GTEST_GTEST_H_
diff --git a/src/include/gromacs/external/googletest/googletest/include/gtest/gtest_pred_impl.h b/src/include/gromacs/external/googletest/googletest/include/gtest/gtest_pred_impl.h
deleted file mode 100644 (file)
index 67a96c9..0000000
+++ /dev/null
@@ -1,358 +0,0 @@
-// Copyright 2006, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// This file is AUTOMATICALLY GENERATED on 07/21/2021 by command
-// 'gen_gtest_pred_impl.py 5'.  DO NOT EDIT BY HAND!
-//
-// Implements a family of generic predicate assertion macros.
-
-#ifndef GOOGLETEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_
-#define GOOGLETEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_
-
-#include "gtest/gtest.h"
-
-namespace testing {
-
-// This header implements a family of generic predicate assertion
-// macros:
-//
-//   ASSERT_PRED_FORMAT1(pred_format, v1)
-//   ASSERT_PRED_FORMAT2(pred_format, v1, v2)
-//   ...
-//
-// where pred_format is a function or functor that takes n (in the
-// case of ASSERT_PRED_FORMATn) values and their source expression
-// text, and returns a testing::AssertionResult.  See the definition
-// of ASSERT_EQ in gtest.h for an example.
-//
-// If you don't care about formatting, you can use the more
-// restrictive version:
-//
-//   ASSERT_PRED1(pred, v1)
-//   ASSERT_PRED2(pred, v1, v2)
-//   ...
-//
-// where pred is an n-ary function or functor that returns bool,
-// and the values v1, v2, ..., must support the << operator for
-// streaming to std::ostream.
-//
-// We also define the EXPECT_* variations.
-//
-// For now we only support predicates whose arity is at most 5.
-// Please email googletestframework@googlegroups.com if you need
-// support for higher arities.
-
-// GTEST_ASSERT_ is the basic statement to which all of the assertions
-// in this file reduce.  Don't use this in your code.
-
-#define GTEST_ASSERT_(expression, on_failure) \
-  GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
-  if (const ::testing::AssertionResult gtest_ar = (expression)) \
-    ; \
-  else \
-    on_failure(gtest_ar.failure_message())
-
-
-// Helper function for implementing {EXPECT|ASSERT}_PRED1.  Don't use
-// this in your code.
-template <typename Pred,
-          typename T1>
-AssertionResult AssertPred1Helper(const char* pred_text,
-                                  const char* e1,
-                                  Pred pred,
-                                  const T1& v1) {
-  if (pred(v1)) return AssertionSuccess();
-
-  return AssertionFailure()
-         << pred_text << "(" << e1 << ") evaluates to false, where"
-         << "\n"
-         << e1 << " evaluates to " << ::testing::PrintToString(v1);
-}
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT1.
-// Don't use this in your code.
-#define GTEST_PRED_FORMAT1_(pred_format, v1, on_failure)\
-  GTEST_ASSERT_(pred_format(#v1, v1), \
-                on_failure)
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED1.  Don't use
-// this in your code.
-#define GTEST_PRED1_(pred, v1, on_failure)\
-  GTEST_ASSERT_(::testing::AssertPred1Helper(#pred, \
-                                             #v1, \
-                                             pred, \
-                                             v1), on_failure)
-
-// Unary predicate assertion macros.
-#define EXPECT_PRED_FORMAT1(pred_format, v1) \
-  GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_NONFATAL_FAILURE_)
-#define EXPECT_PRED1(pred, v1) \
-  GTEST_PRED1_(pred, v1, GTEST_NONFATAL_FAILURE_)
-#define ASSERT_PRED_FORMAT1(pred_format, v1) \
-  GTEST_PRED_FORMAT1_(pred_format, v1, GTEST_FATAL_FAILURE_)
-#define ASSERT_PRED1(pred, v1) \
-  GTEST_PRED1_(pred, v1, GTEST_FATAL_FAILURE_)
-
-
-
-// Helper function for implementing {EXPECT|ASSERT}_PRED2.  Don't use
-// this in your code.
-template <typename Pred,
-          typename T1,
-          typename T2>
-AssertionResult AssertPred2Helper(const char* pred_text,
-                                  const char* e1,
-                                  const char* e2,
-                                  Pred pred,
-                                  const T1& v1,
-                                  const T2& v2) {
-  if (pred(v1, v2)) return AssertionSuccess();
-
-  return AssertionFailure()
-         << pred_text << "(" << e1 << ", " << e2
-         << ") evaluates to false, where"
-         << "\n"
-         << e1 << " evaluates to " << ::testing::PrintToString(v1) << "\n"
-         << e2 << " evaluates to " << ::testing::PrintToString(v2);
-}
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT2.
-// Don't use this in your code.
-#define GTEST_PRED_FORMAT2_(pred_format, v1, v2, on_failure)\
-  GTEST_ASSERT_(pred_format(#v1, #v2, v1, v2), \
-                on_failure)
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED2.  Don't use
-// this in your code.
-#define GTEST_PRED2_(pred, v1, v2, on_failure)\
-  GTEST_ASSERT_(::testing::AssertPred2Helper(#pred, \
-                                             #v1, \
-                                             #v2, \
-                                             pred, \
-                                             v1, \
-                                             v2), on_failure)
-
-// Binary predicate assertion macros.
-#define EXPECT_PRED_FORMAT2(pred_format, v1, v2) \
-  GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_NONFATAL_FAILURE_)
-#define EXPECT_PRED2(pred, v1, v2) \
-  GTEST_PRED2_(pred, v1, v2, GTEST_NONFATAL_FAILURE_)
-#define ASSERT_PRED_FORMAT2(pred_format, v1, v2) \
-  GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_FATAL_FAILURE_)
-#define ASSERT_PRED2(pred, v1, v2) \
-  GTEST_PRED2_(pred, v1, v2, GTEST_FATAL_FAILURE_)
-
-
-
-// Helper function for implementing {EXPECT|ASSERT}_PRED3.  Don't use
-// this in your code.
-template <typename Pred,
-          typename T1,
-          typename T2,
-          typename T3>
-AssertionResult AssertPred3Helper(const char* pred_text,
-                                  const char* e1,
-                                  const char* e2,
-                                  const char* e3,
-                                  Pred pred,
-                                  const T1& v1,
-                                  const T2& v2,
-                                  const T3& v3) {
-  if (pred(v1, v2, v3)) return AssertionSuccess();
-
-  return AssertionFailure()
-         << pred_text << "(" << e1 << ", " << e2 << ", " << e3
-         << ") evaluates to false, where"
-         << "\n"
-         << e1 << " evaluates to " << ::testing::PrintToString(v1) << "\n"
-         << e2 << " evaluates to " << ::testing::PrintToString(v2) << "\n"
-         << e3 << " evaluates to " << ::testing::PrintToString(v3);
-}
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT3.
-// Don't use this in your code.
-#define GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, on_failure)\
-  GTEST_ASSERT_(pred_format(#v1, #v2, #v3, v1, v2, v3), \
-                on_failure)
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED3.  Don't use
-// this in your code.
-#define GTEST_PRED3_(pred, v1, v2, v3, on_failure)\
-  GTEST_ASSERT_(::testing::AssertPred3Helper(#pred, \
-                                             #v1, \
-                                             #v2, \
-                                             #v3, \
-                                             pred, \
-                                             v1, \
-                                             v2, \
-                                             v3), on_failure)
-
-// Ternary predicate assertion macros.
-#define EXPECT_PRED_FORMAT3(pred_format, v1, v2, v3) \
-  GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, GTEST_NONFATAL_FAILURE_)
-#define EXPECT_PRED3(pred, v1, v2, v3) \
-  GTEST_PRED3_(pred, v1, v2, v3, GTEST_NONFATAL_FAILURE_)
-#define ASSERT_PRED_FORMAT3(pred_format, v1, v2, v3) \
-  GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, GTEST_FATAL_FAILURE_)
-#define ASSERT_PRED3(pred, v1, v2, v3) \
-  GTEST_PRED3_(pred, v1, v2, v3, GTEST_FATAL_FAILURE_)
-
-
-
-// Helper function for implementing {EXPECT|ASSERT}_PRED4.  Don't use
-// this in your code.
-template <typename Pred,
-          typename T1,
-          typename T2,
-          typename T3,
-          typename T4>
-AssertionResult AssertPred4Helper(const char* pred_text,
-                                  const char* e1,
-                                  const char* e2,
-                                  const char* e3,
-                                  const char* e4,
-                                  Pred pred,
-                                  const T1& v1,
-                                  const T2& v2,
-                                  const T3& v3,
-                                  const T4& v4) {
-  if (pred(v1, v2, v3, v4)) return AssertionSuccess();
-
-  return AssertionFailure()
-         << pred_text << "(" << e1 << ", " << e2 << ", " << e3 << ", " << e4
-         << ") evaluates to false, where"
-         << "\n"
-         << e1 << " evaluates to " << ::testing::PrintToString(v1) << "\n"
-         << e2 << " evaluates to " << ::testing::PrintToString(v2) << "\n"
-         << e3 << " evaluates to " << ::testing::PrintToString(v3) << "\n"
-         << e4 << " evaluates to " << ::testing::PrintToString(v4);
-}
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT4.
-// Don't use this in your code.
-#define GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, on_failure)\
-  GTEST_ASSERT_(pred_format(#v1, #v2, #v3, #v4, v1, v2, v3, v4), \
-                on_failure)
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED4.  Don't use
-// this in your code.
-#define GTEST_PRED4_(pred, v1, v2, v3, v4, on_failure)\
-  GTEST_ASSERT_(::testing::AssertPred4Helper(#pred, \
-                                             #v1, \
-                                             #v2, \
-                                             #v3, \
-                                             #v4, \
-                                             pred, \
-                                             v1, \
-                                             v2, \
-                                             v3, \
-                                             v4), on_failure)
-
-// 4-ary predicate assertion macros.
-#define EXPECT_PRED_FORMAT4(pred_format, v1, v2, v3, v4) \
-  GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, GTEST_NONFATAL_FAILURE_)
-#define EXPECT_PRED4(pred, v1, v2, v3, v4) \
-  GTEST_PRED4_(pred, v1, v2, v3, v4, GTEST_NONFATAL_FAILURE_)
-#define ASSERT_PRED_FORMAT4(pred_format, v1, v2, v3, v4) \
-  GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, GTEST_FATAL_FAILURE_)
-#define ASSERT_PRED4(pred, v1, v2, v3, v4) \
-  GTEST_PRED4_(pred, v1, v2, v3, v4, GTEST_FATAL_FAILURE_)
-
-
-
-// Helper function for implementing {EXPECT|ASSERT}_PRED5.  Don't use
-// this in your code.
-template <typename Pred,
-          typename T1,
-          typename T2,
-          typename T3,
-          typename T4,
-          typename T5>
-AssertionResult AssertPred5Helper(const char* pred_text,
-                                  const char* e1,
-                                  const char* e2,
-                                  const char* e3,
-                                  const char* e4,
-                                  const char* e5,
-                                  Pred pred,
-                                  const T1& v1,
-                                  const T2& v2,
-                                  const T3& v3,
-                                  const T4& v4,
-                                  const T5& v5) {
-  if (pred(v1, v2, v3, v4, v5)) return AssertionSuccess();
-
-  return AssertionFailure()
-         << pred_text << "(" << e1 << ", " << e2 << ", " << e3 << ", " << e4
-         << ", " << e5 << ") evaluates to false, where"
-         << "\n"
-         << e1 << " evaluates to " << ::testing::PrintToString(v1) << "\n"
-         << e2 << " evaluates to " << ::testing::PrintToString(v2) << "\n"
-         << e3 << " evaluates to " << ::testing::PrintToString(v3) << "\n"
-         << e4 << " evaluates to " << ::testing::PrintToString(v4) << "\n"
-         << e5 << " evaluates to " << ::testing::PrintToString(v5);
-}
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT5.
-// Don't use this in your code.
-#define GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, on_failure)\
-  GTEST_ASSERT_(pred_format(#v1, #v2, #v3, #v4, #v5, v1, v2, v3, v4, v5), \
-                on_failure)
-
-// Internal macro for implementing {EXPECT|ASSERT}_PRED5.  Don't use
-// this in your code.
-#define GTEST_PRED5_(pred, v1, v2, v3, v4, v5, on_failure)\
-  GTEST_ASSERT_(::testing::AssertPred5Helper(#pred, \
-                                             #v1, \
-                                             #v2, \
-                                             #v3, \
-                                             #v4, \
-                                             #v5, \
-                                             pred, \
-                                             v1, \
-                                             v2, \
-                                             v3, \
-                                             v4, \
-                                             v5), on_failure)
-
-// 5-ary predicate assertion macros.
-#define EXPECT_PRED_FORMAT5(pred_format, v1, v2, v3, v4, v5) \
-  GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, GTEST_NONFATAL_FAILURE_)
-#define EXPECT_PRED5(pred, v1, v2, v3, v4, v5) \
-  GTEST_PRED5_(pred, v1, v2, v3, v4, v5, GTEST_NONFATAL_FAILURE_)
-#define ASSERT_PRED_FORMAT5(pred_format, v1, v2, v3, v4, v5) \
-  GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, GTEST_FATAL_FAILURE_)
-#define ASSERT_PRED5(pred, v1, v2, v3, v4, v5) \
-  GTEST_PRED5_(pred, v1, v2, v3, v4, v5, GTEST_FATAL_FAILURE_)
-
-
-
-}  // namespace testing
-
-#endif  // GOOGLETEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_
diff --git a/src/include/gromacs/external/googletest/googletest/include/gtest/gtest_prod.h b/src/include/gromacs/external/googletest/googletest/include/gtest/gtest_prod.h
deleted file mode 100644 (file)
index 25766ee..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2006, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-//
-// Google C++ Testing and Mocking Framework definitions useful in production code.
-
-#ifndef GOOGLETEST_INCLUDE_GTEST_GTEST_PROD_H_
-#define GOOGLETEST_INCLUDE_GTEST_GTEST_PROD_H_
-
-// When you need to test the private or protected members of a class,
-// use the FRIEND_TEST macro to declare your tests as friends of the
-// class.  For example:
-//
-// class MyClass {
-//  private:
-//   void PrivateMethod();
-//   FRIEND_TEST(MyClassTest, PrivateMethodWorks);
-// };
-//
-// class MyClassTest : public testing::Test {
-//   // ...
-// };
-//
-// TEST_F(MyClassTest, PrivateMethodWorks) {
-//   // Can call MyClass::PrivateMethod() here.
-// }
-//
-// Note: The test class must be in the same namespace as the class being tested.
-// For example, putting MyClassTest in an anonymous namespace will not work.
-
-#define FRIEND_TEST(test_case_name, test_name)\
-friend class test_case_name##_##test_name##_Test
-
-#endif  // GOOGLETEST_INCLUDE_GTEST_GTEST_PROD_H_
diff --git a/src/include/gromacs/external/googletest/googletest/include/gtest/internal/custom/gtest-port.h b/src/include/gromacs/external/googletest/googletest/include/gtest/internal/custom/gtest-port.h
deleted file mode 100644 (file)
index db02881..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2015, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Injection point for custom user configurations. See README for details
-//
-// ** Custom implementation starts here **
-
-#ifndef GOOGLETEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PORT_H_
-#define GOOGLETEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PORT_H_
-
-#endif  // GOOGLETEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PORT_H_
diff --git a/src/include/gromacs/external/googletest/googletest/include/gtest/internal/custom/gtest-printers.h b/src/include/gromacs/external/googletest/googletest/include/gtest/internal/custom/gtest-printers.h
deleted file mode 100644 (file)
index b9495d8..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2015, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// This file provides an injection point for custom printers in a local
-// installation of gTest.
-// It will be included from gtest-printers.h and the overrides in this file
-// will be visible to everyone.
-//
-// Injection point for custom user configurations. See README for details
-//
-// ** Custom implementation starts here **
-
-#ifndef GOOGLETEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PRINTERS_H_
-#define GOOGLETEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PRINTERS_H_
-
-#endif  // GOOGLETEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PRINTERS_H_
diff --git a/src/include/gromacs/external/googletest/googletest/include/gtest/internal/custom/gtest.h b/src/include/gromacs/external/googletest/googletest/include/gtest/internal/custom/gtest.h
deleted file mode 100644 (file)
index afaaf17..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2015, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Injection point for custom user configurations. See README for details
-//
-// ** Custom implementation starts here **
-
-#ifndef GOOGLETEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_H_
-#define GOOGLETEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_H_
-
-#endif  // GOOGLETEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_H_
diff --git a/src/include/gromacs/external/googletest/googletest/include/gtest/internal/gtest-death-test-internal.h b/src/include/gromacs/external/googletest/googletest/include/gtest/internal/gtest-death-test-internal.h
deleted file mode 100644 (file)
index 8e0023a..0000000
+++ /dev/null
@@ -1,301 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// The Google C++ Testing and Mocking Framework (Google Test)
-//
-// This header file defines internal utilities needed for implementing
-// death tests.  They are subject to change without notice.
-
-#ifndef GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_
-#define GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_
-
-#include "gtest/gtest-matchers.h"
-#include "gtest/internal/gtest-internal.h"
-
-#include <stdio.h>
-#include <memory>
-
-GTEST_DECLARE_string_(internal_run_death_test);
-
-namespace testing {
-namespace internal {
-
-// Names of the flags (needed for parsing Google Test flags).
-const char kDeathTestStyleFlag[] = "death_test_style";
-const char kDeathTestUseFork[] = "death_test_use_fork";
-const char kInternalRunDeathTestFlag[] = "internal_run_death_test";
-
-#if GTEST_HAS_DEATH_TEST
-
-GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \
-/* class A needs to have dll-interface to be used by clients of class B */)
-
-// DeathTest is a class that hides much of the complexity of the
-// GTEST_DEATH_TEST_ macro.  It is abstract; its static Create method
-// returns a concrete class that depends on the prevailing death test
-// style, as defined by the --gtest_death_test_style and/or
-// --gtest_internal_run_death_test flags.
-
-// In describing the results of death tests, these terms are used with
-// the corresponding definitions:
-//
-// exit status:  The integer exit information in the format specified
-//               by wait(2)
-// exit code:    The integer code passed to exit(3), _exit(2), or
-//               returned from main()
-class GTEST_API_ DeathTest {
- public:
-  // Create returns false if there was an error determining the
-  // appropriate action to take for the current death test; for example,
-  // if the gtest_death_test_style flag is set to an invalid value.
-  // The LastMessage method will return a more detailed message in that
-  // case.  Otherwise, the DeathTest pointer pointed to by the "test"
-  // argument is set.  If the death test should be skipped, the pointer
-  // is set to NULL; otherwise, it is set to the address of a new concrete
-  // DeathTest object that controls the execution of the current test.
-  static bool Create(const char* statement, Matcher<const std::string&> matcher,
-                     const char* file, int line, DeathTest** test);
-  DeathTest();
-  virtual ~DeathTest() { }
-
-  // A helper class that aborts a death test when it's deleted.
-  class ReturnSentinel {
-   public:
-    explicit ReturnSentinel(DeathTest* test) : test_(test) { }
-    ~ReturnSentinel() { test_->Abort(TEST_ENCOUNTERED_RETURN_STATEMENT); }
-   private:
-    DeathTest* const test_;
-    GTEST_DISALLOW_COPY_AND_ASSIGN_(ReturnSentinel);
-  } GTEST_ATTRIBUTE_UNUSED_;
-
-  // An enumeration of possible roles that may be taken when a death
-  // test is encountered.  EXECUTE means that the death test logic should
-  // be executed immediately.  OVERSEE means that the program should prepare
-  // the appropriate environment for a child process to execute the death
-  // test, then wait for it to complete.
-  enum TestRole { OVERSEE_TEST, EXECUTE_TEST };
-
-  // An enumeration of the three reasons that a test might be aborted.
-  enum AbortReason {
-    TEST_ENCOUNTERED_RETURN_STATEMENT,
-    TEST_THREW_EXCEPTION,
-    TEST_DID_NOT_DIE
-  };
-
-  // Assumes one of the above roles.
-  virtual TestRole AssumeRole() = 0;
-
-  // Waits for the death test to finish and returns its status.
-  virtual int Wait() = 0;
-
-  // Returns true if the death test passed; that is, the test process
-  // exited during the test, its exit status matches a user-supplied
-  // predicate, and its stderr output matches a user-supplied regular
-  // expression.
-  // The user-supplied predicate may be a macro expression rather
-  // than a function pointer or functor, or else Wait and Passed could
-  // be combined.
-  virtual bool Passed(bool exit_status_ok) = 0;
-
-  // Signals that the death test did not die as expected.
-  virtual void Abort(AbortReason reason) = 0;
-
-  // Returns a human-readable outcome message regarding the outcome of
-  // the last death test.
-  static const char* LastMessage();
-
-  static void set_last_death_test_message(const std::string& message);
-
- private:
-  // A string containing a description of the outcome of the last death test.
-  static std::string last_death_test_message_;
-
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(DeathTest);
-};
-
-GTEST_DISABLE_MSC_WARNINGS_POP_()  //  4251
-
-// Factory interface for death tests.  May be mocked out for testing.
-class DeathTestFactory {
- public:
-  virtual ~DeathTestFactory() { }
-  virtual bool Create(const char* statement,
-                      Matcher<const std::string&> matcher, const char* file,
-                      int line, DeathTest** test) = 0;
-};
-
-// A concrete DeathTestFactory implementation for normal use.
-class DefaultDeathTestFactory : public DeathTestFactory {
- public:
-  bool Create(const char* statement, Matcher<const std::string&> matcher,
-              const char* file, int line, DeathTest** test) override;
-};
-
-// Returns true if exit_status describes a process that was terminated
-// by a signal, or exited normally with a nonzero exit code.
-GTEST_API_ bool ExitedUnsuccessfully(int exit_status);
-
-// A string passed to EXPECT_DEATH (etc.) is caught by one of these overloads
-// and interpreted as a regex (rather than an Eq matcher) for legacy
-// compatibility.
-inline Matcher<const ::std::string&> MakeDeathTestMatcher(
-    ::testing::internal::RE regex) {
-  return ContainsRegex(regex.pattern());
-}
-inline Matcher<const ::std::string&> MakeDeathTestMatcher(const char* regex) {
-  return ContainsRegex(regex);
-}
-inline Matcher<const ::std::string&> MakeDeathTestMatcher(
-    const ::std::string& regex) {
-  return ContainsRegex(regex);
-}
-
-// If a Matcher<const ::std::string&> is passed to EXPECT_DEATH (etc.), it's
-// used directly.
-inline Matcher<const ::std::string&> MakeDeathTestMatcher(
-    Matcher<const ::std::string&> matcher) {
-  return matcher;
-}
-
-// Traps C++ exceptions escaping statement and reports them as test
-// failures. Note that trapping SEH exceptions is not implemented here.
-# if GTEST_HAS_EXCEPTIONS
-#  define GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, death_test) \
-  try { \
-    GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
-  } catch (const ::std::exception& gtest_exception) { \
-    fprintf(\
-        stderr, \
-        "\n%s: Caught std::exception-derived exception escaping the " \
-        "death test statement. Exception message: %s\n", \
-        ::testing::internal::FormatFileLocation(__FILE__, __LINE__).c_str(), \
-        gtest_exception.what()); \
-    fflush(stderr); \
-    death_test->Abort(::testing::internal::DeathTest::TEST_THREW_EXCEPTION); \
-  } catch (...) { \
-    death_test->Abort(::testing::internal::DeathTest::TEST_THREW_EXCEPTION); \
-  }
-
-# else
-#  define GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, death_test) \
-  GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement)
-
-# endif
-
-// This macro is for implementing ASSERT_DEATH*, EXPECT_DEATH*,
-// ASSERT_EXIT*, and EXPECT_EXIT*.
-#define GTEST_DEATH_TEST_(statement, predicate, regex_or_matcher, fail)        \
-  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                                \
-  if (::testing::internal::AlwaysTrue()) {                                     \
-    ::testing::internal::DeathTest* gtest_dt;                                  \
-    if (!::testing::internal::DeathTest::Create(                               \
-            #statement,                                                        \
-            ::testing::internal::MakeDeathTestMatcher(regex_or_matcher),       \
-            __FILE__, __LINE__, &gtest_dt)) {                                  \
-      goto GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__);                        \
-    }                                                                          \
-    if (gtest_dt != nullptr) {                                                 \
-      std::unique_ptr< ::testing::internal::DeathTest> gtest_dt_ptr(gtest_dt); \
-      switch (gtest_dt->AssumeRole()) {                                        \
-        case ::testing::internal::DeathTest::OVERSEE_TEST:                     \
-          if (!gtest_dt->Passed(predicate(gtest_dt->Wait()))) {                \
-            goto GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__);                  \
-          }                                                                    \
-          break;                                                               \
-        case ::testing::internal::DeathTest::EXECUTE_TEST: {                   \
-          ::testing::internal::DeathTest::ReturnSentinel gtest_sentinel(       \
-              gtest_dt);                                                       \
-          GTEST_EXECUTE_DEATH_TEST_STATEMENT_(statement, gtest_dt);            \
-          gtest_dt->Abort(::testing::internal::DeathTest::TEST_DID_NOT_DIE);   \
-          break;                                                               \
-        }                                                                      \
-      }                                                                        \
-    }                                                                          \
-  } else                                                                       \
-    GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__)                                \
-        : fail(::testing::internal::DeathTest::LastMessage())
-// The symbol "fail" here expands to something into which a message
-// can be streamed.
-
-// This macro is for implementing ASSERT/EXPECT_DEBUG_DEATH when compiled in
-// NDEBUG mode. In this case we need the statements to be executed and the macro
-// must accept a streamed message even though the message is never printed.
-// The regex object is not evaluated, but it is used to prevent "unused"
-// warnings and to avoid an expression that doesn't compile in debug mode.
-#define GTEST_EXECUTE_STATEMENT_(statement, regex_or_matcher)    \
-  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                  \
-  if (::testing::internal::AlwaysTrue()) {                       \
-    GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement);   \
-  } else if (!::testing::internal::AlwaysTrue()) {               \
-    ::testing::internal::MakeDeathTestMatcher(regex_or_matcher); \
-  } else                                                         \
-    ::testing::Message()
-
-// A class representing the parsed contents of the
-// --gtest_internal_run_death_test flag, as it existed when
-// RUN_ALL_TESTS was called.
-class InternalRunDeathTestFlag {
- public:
-  InternalRunDeathTestFlag(const std::string& a_file,
-                           int a_line,
-                           int an_index,
-                           int a_write_fd)
-      : file_(a_file), line_(a_line), index_(an_index),
-        write_fd_(a_write_fd) {}
-
-  ~InternalRunDeathTestFlag() {
-    if (write_fd_ >= 0)
-      posix::Close(write_fd_);
-  }
-
-  const std::string& file() const { return file_; }
-  int line() const { return line_; }
-  int index() const { return index_; }
-  int write_fd() const { return write_fd_; }
-
- private:
-  std::string file_;
-  int line_;
-  int index_;
-  int write_fd_;
-
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(InternalRunDeathTestFlag);
-};
-
-// Returns a newly created InternalRunDeathTestFlag object with fields
-// initialized from the GTEST_FLAG(internal_run_death_test) flag if
-// the flag is specified; otherwise returns NULL.
-InternalRunDeathTestFlag* ParseInternalRunDeathTestFlag();
-
-#endif  // GTEST_HAS_DEATH_TEST
-
-}  // namespace internal
-}  // namespace testing
-
-#endif  // GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_DEATH_TEST_INTERNAL_H_
diff --git a/src/include/gromacs/external/googletest/googletest/include/gtest/internal/gtest-filepath.h b/src/include/gromacs/external/googletest/googletest/include/gtest/internal/gtest-filepath.h
deleted file mode 100644 (file)
index 43f47dc..0000000
+++ /dev/null
@@ -1,209 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Google Test filepath utilities
-//
-// This header file declares classes and functions used internally by
-// Google Test.  They are subject to change without notice.
-//
-// This file is #included in gtest/internal/gtest-internal.h.
-// Do not include this header file separately!
-
-#ifndef GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_
-#define GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_
-
-#include "gtest/internal/gtest-string.h"
-
-GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \
-/* class A needs to have dll-interface to be used by clients of class B */)
-
-namespace testing {
-namespace internal {
-
-// FilePath - a class for file and directory pathname manipulation which
-// handles platform-specific conventions (like the pathname separator).
-// Used for helper functions for naming files in a directory for xml output.
-// Except for Set methods, all methods are const or static, which provides an
-// "immutable value object" -- useful for peace of mind.
-// A FilePath with a value ending in a path separator ("like/this/") represents
-// a directory, otherwise it is assumed to represent a file. In either case,
-// it may or may not represent an actual file or directory in the file system.
-// Names are NOT checked for syntax correctness -- no checking for illegal
-// characters, malformed paths, etc.
-
-class GTEST_API_ FilePath {
- public:
-  FilePath() : pathname_("") { }
-  FilePath(const FilePath& rhs) : pathname_(rhs.pathname_) { }
-
-  explicit FilePath(const std::string& pathname) : pathname_(pathname) {
-    Normalize();
-  }
-
-  FilePath& operator=(const FilePath& rhs) {
-    Set(rhs);
-    return *this;
-  }
-
-  void Set(const FilePath& rhs) {
-    pathname_ = rhs.pathname_;
-  }
-
-  const std::string& string() const { return pathname_; }
-  const char* c_str() const { return pathname_.c_str(); }
-
-  // Returns the current working directory, or "" if unsuccessful.
-  static FilePath GetCurrentDir();
-
-  // Given directory = "dir", base_name = "test", number = 0,
-  // extension = "xml", returns "dir/test.xml". If number is greater
-  // than zero (e.g., 12), returns "dir/test_12.xml".
-  // On Windows platform, uses \ as the separator rather than /.
-  static FilePath MakeFileName(const FilePath& directory,
-                               const FilePath& base_name,
-                               int number,
-                               const char* extension);
-
-  // Given directory = "dir", relative_path = "test.xml",
-  // returns "dir/test.xml".
-  // On Windows, uses \ as the separator rather than /.
-  static FilePath ConcatPaths(const FilePath& directory,
-                              const FilePath& relative_path);
-
-  // Returns a pathname for a file that does not currently exist. The pathname
-  // will be directory/base_name.extension or
-  // directory/base_name_<number>.extension if directory/base_name.extension
-  // already exists. The number will be incremented until a pathname is found
-  // that does not already exist.
-  // Examples: 'dir/foo_test.xml' or 'dir/foo_test_1.xml'.
-  // There could be a race condition if two or more processes are calling this
-  // function at the same time -- they could both pick the same filename.
-  static FilePath GenerateUniqueFileName(const FilePath& directory,
-                                         const FilePath& base_name,
-                                         const char* extension);
-
-  // Returns true if and only if the path is "".
-  bool IsEmpty() const { return pathname_.empty(); }
-
-  // If input name has a trailing separator character, removes it and returns
-  // the name, otherwise return the name string unmodified.
-  // On Windows platform, uses \ as the separator, other platforms use /.
-  FilePath RemoveTrailingPathSeparator() const;
-
-  // Returns a copy of the FilePath with the directory part removed.
-  // Example: FilePath("path/to/file").RemoveDirectoryName() returns
-  // FilePath("file"). If there is no directory part ("just_a_file"), it returns
-  // the FilePath unmodified. If there is no file part ("just_a_dir/") it
-  // returns an empty FilePath ("").
-  // On Windows platform, '\' is the path separator, otherwise it is '/'.
-  FilePath RemoveDirectoryName() const;
-
-  // RemoveFileName returns the directory path with the filename removed.
-  // Example: FilePath("path/to/file").RemoveFileName() returns "path/to/".
-  // If the FilePath is "a_file" or "/a_file", RemoveFileName returns
-  // FilePath("./") or, on Windows, FilePath(".\\"). If the filepath does
-  // not have a file, like "just/a/dir/", it returns the FilePath unmodified.
-  // On Windows platform, '\' is the path separator, otherwise it is '/'.
-  FilePath RemoveFileName() const;
-
-  // Returns a copy of the FilePath with the case-insensitive extension removed.
-  // Example: FilePath("dir/file.exe").RemoveExtension("EXE") returns
-  // FilePath("dir/file"). If a case-insensitive extension is not
-  // found, returns a copy of the original FilePath.
-  FilePath RemoveExtension(const char* extension) const;
-
-  // Creates directories so that path exists. Returns true if successful or if
-  // the directories already exist; returns false if unable to create
-  // directories for any reason. Will also return false if the FilePath does
-  // not represent a directory (that is, it doesn't end with a path separator).
-  bool CreateDirectoriesRecursively() const;
-
-  // Create the directory so that path exists. Returns true if successful or
-  // if the directory already exists; returns false if unable to create the
-  // directory for any reason, including if the parent directory does not
-  // exist. Not named "CreateDirectory" because that's a macro on Windows.
-  bool CreateFolder() const;
-
-  // Returns true if FilePath describes something in the file-system,
-  // either a file, directory, or whatever, and that something exists.
-  bool FileOrDirectoryExists() const;
-
-  // Returns true if pathname describes a directory in the file-system
-  // that exists.
-  bool DirectoryExists() const;
-
-  // Returns true if FilePath ends with a path separator, which indicates that
-  // it is intended to represent a directory. Returns false otherwise.
-  // This does NOT check that a directory (or file) actually exists.
-  bool IsDirectory() const;
-
-  // Returns true if pathname describes a root directory. (Windows has one
-  // root directory per disk drive.)
-  bool IsRootDirectory() const;
-
-  // Returns true if pathname describes an absolute path.
-  bool IsAbsolutePath() const;
-
- private:
-  // Replaces multiple consecutive separators with a single separator.
-  // For example, "bar///foo" becomes "bar/foo". Does not eliminate other
-  // redundancies that might be in a pathname involving "." or "..".
-  //
-  // A pathname with multiple consecutive separators may occur either through
-  // user error or as a result of some scripts or APIs that generate a pathname
-  // with a trailing separator. On other platforms the same API or script
-  // may NOT generate a pathname with a trailing "/". Then elsewhere that
-  // pathname may have another "/" and pathname components added to it,
-  // without checking for the separator already being there.
-  // The script language and operating system may allow paths like "foo//bar"
-  // but some of the functions in FilePath will not handle that correctly. In
-  // particular, RemoveTrailingPathSeparator() only removes one separator, and
-  // it is called in CreateDirectoriesRecursively() assuming that it will change
-  // a pathname from directory syntax (trailing separator) to filename syntax.
-  //
-  // On Windows this method also replaces the alternate path separator '/' with
-  // the primary path separator '\\', so that for example "bar\\/\\foo" becomes
-  // "bar\\foo".
-
-  void Normalize();
-
-  // Returns a pointer to the last occurrence of a valid path separator in
-  // the FilePath. On Windows, for example, both '/' and '\' are valid path
-  // separators. Returns NULL if no path separator was found.
-  const char* FindLastPathSeparator() const;
-
-  std::string pathname_;
-};  // class FilePath
-
-}  // namespace internal
-}  // namespace testing
-
-GTEST_DISABLE_MSC_WARNINGS_POP_()  //  4251
-
-#endif  // GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_FILEPATH_H_
diff --git a/src/include/gromacs/external/googletest/googletest/include/gtest/internal/gtest-internal.h b/src/include/gromacs/external/googletest/googletest/include/gtest/internal/gtest-internal.h
deleted file mode 100644 (file)
index d38204f..0000000
+++ /dev/null
@@ -1,1558 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// The Google C++ Testing and Mocking Framework (Google Test)
-//
-// This header file declares functions and macros used internally by
-// Google Test.  They are subject to change without notice.
-
-#ifndef GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_
-#define GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_
-
-#include "gtest/internal/gtest-port.h"
-
-#if GTEST_OS_LINUX
-# include <stdlib.h>
-# include <sys/types.h>
-# include <sys/wait.h>
-# include <unistd.h>
-#endif  // GTEST_OS_LINUX
-
-#if GTEST_HAS_EXCEPTIONS
-# include <stdexcept>
-#endif
-
-#include <ctype.h>
-#include <float.h>
-#include <string.h>
-#include <cstdint>
-#include <iomanip>
-#include <limits>
-#include <map>
-#include <set>
-#include <string>
-#include <type_traits>
-#include <vector>
-
-#include "gtest/gtest-message.h"
-#include "gtest/internal/gtest-filepath.h"
-#include "gtest/internal/gtest-string.h"
-#include "gtest/internal/gtest-type-util.h"
-
-// Due to C++ preprocessor weirdness, we need double indirection to
-// concatenate two tokens when one of them is __LINE__.  Writing
-//
-//   foo ## __LINE__
-//
-// will result in the token foo__LINE__, instead of foo followed by
-// the current line number.  For more details, see
-// http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.6
-#define GTEST_CONCAT_TOKEN_(foo, bar) GTEST_CONCAT_TOKEN_IMPL_(foo, bar)
-#define GTEST_CONCAT_TOKEN_IMPL_(foo, bar) foo ## bar
-
-// Stringifies its argument.
-// Work around a bug in visual studio which doesn't accept code like this:
-//
-//   #define GTEST_STRINGIFY_(name) #name
-//   #define MACRO(a, b, c) ... GTEST_STRINGIFY_(a) ...
-//   MACRO(, x, y)
-//
-// Complaining about the argument to GTEST_STRINGIFY_ being empty.
-// This is allowed by the spec.
-#define GTEST_STRINGIFY_HELPER_(name, ...) #name
-#define GTEST_STRINGIFY_(...) GTEST_STRINGIFY_HELPER_(__VA_ARGS__, )
-
-namespace proto2 {
-class MessageLite;
-}
-
-namespace testing {
-
-// Forward declarations.
-
-class AssertionResult;                 // Result of an assertion.
-class Message;                         // Represents a failure message.
-class Test;                            // Represents a test.
-class TestInfo;                        // Information about a test.
-class TestPartResult;                  // Result of a test part.
-class UnitTest;                        // A collection of test suites.
-
-template <typename T>
-::std::string PrintToString(const T& value);
-
-namespace internal {
-
-struct TraceInfo;                      // Information about a trace point.
-class TestInfoImpl;                    // Opaque implementation of TestInfo
-class UnitTestImpl;                    // Opaque implementation of UnitTest
-
-// The text used in failure messages to indicate the start of the
-// stack trace.
-GTEST_API_ extern const char kStackTraceMarker[];
-
-// An IgnoredValue object can be implicitly constructed from ANY value.
-class IgnoredValue {
-  struct Sink {};
- public:
-  // This constructor template allows any value to be implicitly
-  // converted to IgnoredValue.  The object has no data member and
-  // doesn't try to remember anything about the argument.  We
-  // deliberately omit the 'explicit' keyword in order to allow the
-  // conversion to be implicit.
-  // Disable the conversion if T already has a magical conversion operator.
-  // Otherwise we get ambiguity.
-  template <typename T,
-            typename std::enable_if<!std::is_convertible<T, Sink>::value,
-                                    int>::type = 0>
-  IgnoredValue(const T& /* ignored */) {}  // NOLINT(runtime/explicit)
-};
-
-// Appends the user-supplied message to the Google-Test-generated message.
-GTEST_API_ std::string AppendUserMessage(
-    const std::string& gtest_msg, const Message& user_msg);
-
-#if GTEST_HAS_EXCEPTIONS
-
-GTEST_DISABLE_MSC_WARNINGS_PUSH_(4275 \
-/* an exported class was derived from a class that was not exported */)
-
-// This exception is thrown by (and only by) a failed Google Test
-// assertion when GTEST_FLAG(throw_on_failure) is true (if exceptions
-// are enabled).  We derive it from std::runtime_error, which is for
-// errors presumably detectable only at run time.  Since
-// std::runtime_error inherits from std::exception, many testing
-// frameworks know how to extract and print the message inside it.
-class GTEST_API_ GoogleTestFailureException : public ::std::runtime_error {
- public:
-  explicit GoogleTestFailureException(const TestPartResult& failure);
-};
-
-GTEST_DISABLE_MSC_WARNINGS_POP_()  //  4275
-
-#endif  // GTEST_HAS_EXCEPTIONS
-
-namespace edit_distance {
-// Returns the optimal edits to go from 'left' to 'right'.
-// All edits cost the same, with replace having lower priority than
-// add/remove.
-// Simple implementation of the Wagner-Fischer algorithm.
-// See http://en.wikipedia.org/wiki/Wagner-Fischer_algorithm
-enum EditType { kMatch, kAdd, kRemove, kReplace };
-GTEST_API_ std::vector<EditType> CalculateOptimalEdits(
-    const std::vector<size_t>& left, const std::vector<size_t>& right);
-
-// Same as above, but the input is represented as strings.
-GTEST_API_ std::vector<EditType> CalculateOptimalEdits(
-    const std::vector<std::string>& left,
-    const std::vector<std::string>& right);
-
-// Create a diff of the input strings in Unified diff format.
-GTEST_API_ std::string CreateUnifiedDiff(const std::vector<std::string>& left,
-                                         const std::vector<std::string>& right,
-                                         size_t context = 2);
-
-}  // namespace edit_distance
-
-// Calculate the diff between 'left' and 'right' and return it in unified diff
-// format.
-// If not null, stores in 'total_line_count' the total number of lines found
-// in left + right.
-GTEST_API_ std::string DiffStrings(const std::string& left,
-                                   const std::string& right,
-                                   size_t* total_line_count);
-
-// Constructs and returns the message for an equality assertion
-// (e.g. ASSERT_EQ, EXPECT_STREQ, etc) failure.
-//
-// The first four parameters are the expressions used in the assertion
-// and their values, as strings.  For example, for ASSERT_EQ(foo, bar)
-// where foo is 5 and bar is 6, we have:
-//
-//   expected_expression: "foo"
-//   actual_expression:   "bar"
-//   expected_value:      "5"
-//   actual_value:        "6"
-//
-// The ignoring_case parameter is true if and only if the assertion is a
-// *_STRCASEEQ*.  When it's true, the string " (ignoring case)" will
-// be inserted into the message.
-GTEST_API_ AssertionResult EqFailure(const char* expected_expression,
-                                     const char* actual_expression,
-                                     const std::string& expected_value,
-                                     const std::string& actual_value,
-                                     bool ignoring_case);
-
-// Constructs a failure message for Boolean assertions such as EXPECT_TRUE.
-GTEST_API_ std::string GetBoolAssertionFailureMessage(
-    const AssertionResult& assertion_result,
-    const char* expression_text,
-    const char* actual_predicate_value,
-    const char* expected_predicate_value);
-
-// This template class represents an IEEE floating-point number
-// (either single-precision or double-precision, depending on the
-// template parameters).
-//
-// The purpose of this class is to do more sophisticated number
-// comparison.  (Due to round-off error, etc, it's very unlikely that
-// two floating-points will be equal exactly.  Hence a naive
-// comparison by the == operation often doesn't work.)
-//
-// Format of IEEE floating-point:
-//
-//   The most-significant bit being the leftmost, an IEEE
-//   floating-point looks like
-//
-//     sign_bit exponent_bits fraction_bits
-//
-//   Here, sign_bit is a single bit that designates the sign of the
-//   number.
-//
-//   For float, there are 8 exponent bits and 23 fraction bits.
-//
-//   For double, there are 11 exponent bits and 52 fraction bits.
-//
-//   More details can be found at
-//   http://en.wikipedia.org/wiki/IEEE_floating-point_standard.
-//
-// Template parameter:
-//
-//   RawType: the raw floating-point type (either float or double)
-template <typename RawType>
-class FloatingPoint {
- public:
-  // Defines the unsigned integer type that has the same size as the
-  // floating point number.
-  typedef typename TypeWithSize<sizeof(RawType)>::UInt Bits;
-
-  // Constants.
-
-  // # of bits in a number.
-  static const size_t kBitCount = 8*sizeof(RawType);
-
-  // # of fraction bits in a number.
-  static const size_t kFractionBitCount =
-    std::numeric_limits<RawType>::digits - 1;
-
-  // # of exponent bits in a number.
-  static const size_t kExponentBitCount = kBitCount - 1 - kFractionBitCount;
-
-  // The mask for the sign bit.
-  static const Bits kSignBitMask = static_cast<Bits>(1) << (kBitCount - 1);
-
-  // The mask for the fraction bits.
-  static const Bits kFractionBitMask =
-    ~static_cast<Bits>(0) >> (kExponentBitCount + 1);
-
-  // The mask for the exponent bits.
-  static const Bits kExponentBitMask = ~(kSignBitMask | kFractionBitMask);
-
-  // How many ULP's (Units in the Last Place) we want to tolerate when
-  // comparing two numbers.  The larger the value, the more error we
-  // allow.  A 0 value means that two numbers must be exactly the same
-  // to be considered equal.
-  //
-  // The maximum error of a single floating-point operation is 0.5
-  // units in the last place.  On Intel CPU's, all floating-point
-  // calculations are done with 80-bit precision, while double has 64
-  // bits.  Therefore, 4 should be enough for ordinary use.
-  //
-  // See the following article for more details on ULP:
-  // http://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/
-  static const uint32_t kMaxUlps = 4;
-
-  // Constructs a FloatingPoint from a raw floating-point number.
-  //
-  // On an Intel CPU, passing a non-normalized NAN (Not a Number)
-  // around may change its bits, although the new value is guaranteed
-  // to be also a NAN.  Therefore, don't expect this constructor to
-  // preserve the bits in x when x is a NAN.
-  explicit FloatingPoint(const RawType& x) { u_.value_ = x; }
-
-  // Static methods
-
-  // Reinterprets a bit pattern as a floating-point number.
-  //
-  // This function is needed to test the AlmostEquals() method.
-  static RawType ReinterpretBits(const Bits bits) {
-    FloatingPoint fp(0);
-    fp.u_.bits_ = bits;
-    return fp.u_.value_;
-  }
-
-  // Returns the floating-point number that represent positive infinity.
-  static RawType Infinity() {
-    return ReinterpretBits(kExponentBitMask);
-  }
-
-  // Returns the maximum representable finite floating-point number.
-  static RawType Max();
-
-  // Non-static methods
-
-  // Returns the bits that represents this number.
-  const Bits &bits() const { return u_.bits_; }
-
-  // Returns the exponent bits of this number.
-  Bits exponent_bits() const { return kExponentBitMask & u_.bits_; }
-
-  // Returns the fraction bits of this number.
-  Bits fraction_bits() const { return kFractionBitMask & u_.bits_; }
-
-  // Returns the sign bit of this number.
-  Bits sign_bit() const { return kSignBitMask & u_.bits_; }
-
-  // Returns true if and only if this is NAN (not a number).
-  bool is_nan() const {
-    // It's a NAN if the exponent bits are all ones and the fraction
-    // bits are not entirely zeros.
-    return (exponent_bits() == kExponentBitMask) && (fraction_bits() != 0);
-  }
-
-  // Returns true if and only if this number is at most kMaxUlps ULP's away
-  // from rhs.  In particular, this function:
-  //
-  //   - returns false if either number is (or both are) NAN.
-  //   - treats really large numbers as almost equal to infinity.
-  //   - thinks +0.0 and -0.0 are 0 DLP's apart.
-  bool AlmostEquals(const FloatingPoint& rhs) const {
-    // The IEEE standard says that any comparison operation involving
-    // a NAN must return false.
-    if (is_nan() || rhs.is_nan()) return false;
-
-    return DistanceBetweenSignAndMagnitudeNumbers(u_.bits_, rhs.u_.bits_)
-        <= kMaxUlps;
-  }
-
- private:
-  // The data type used to store the actual floating-point number.
-  union FloatingPointUnion {
-    RawType value_;  // The raw floating-point number.
-    Bits bits_;      // The bits that represent the number.
-  };
-
-  // Converts an integer from the sign-and-magnitude representation to
-  // the biased representation.  More precisely, let N be 2 to the
-  // power of (kBitCount - 1), an integer x is represented by the
-  // unsigned number x + N.
-  //
-  // For instance,
-  //
-  //   -N + 1 (the most negative number representable using
-  //          sign-and-magnitude) is represented by 1;
-  //   0      is represented by N; and
-  //   N - 1  (the biggest number representable using
-  //          sign-and-magnitude) is represented by 2N - 1.
-  //
-  // Read http://en.wikipedia.org/wiki/Signed_number_representations
-  // for more details on signed number representations.
-  static Bits SignAndMagnitudeToBiased(const Bits &sam) {
-    if (kSignBitMask & sam) {
-      // sam represents a negative number.
-      return ~sam + 1;
-    } else {
-      // sam represents a positive number.
-      return kSignBitMask | sam;
-    }
-  }
-
-  // Given two numbers in the sign-and-magnitude representation,
-  // returns the distance between them as an unsigned number.
-  static Bits DistanceBetweenSignAndMagnitudeNumbers(const Bits &sam1,
-                                                     const Bits &sam2) {
-    const Bits biased1 = SignAndMagnitudeToBiased(sam1);
-    const Bits biased2 = SignAndMagnitudeToBiased(sam2);
-    return (biased1 >= biased2) ? (biased1 - biased2) : (biased2 - biased1);
-  }
-
-  FloatingPointUnion u_;
-};
-
-// We cannot use std::numeric_limits<T>::max() as it clashes with the max()
-// macro defined by <windows.h>.
-template <>
-inline float FloatingPoint<float>::Max() { return FLT_MAX; }
-template <>
-inline double FloatingPoint<double>::Max() { return DBL_MAX; }
-
-// Typedefs the instances of the FloatingPoint template class that we
-// care to use.
-typedef FloatingPoint<float> Float;
-typedef FloatingPoint<double> Double;
-
-// In order to catch the mistake of putting tests that use different
-// test fixture classes in the same test suite, we need to assign
-// unique IDs to fixture classes and compare them.  The TypeId type is
-// used to hold such IDs.  The user should treat TypeId as an opaque
-// type: the only operation allowed on TypeId values is to compare
-// them for equality using the == operator.
-typedef const void* TypeId;
-
-template <typename T>
-class TypeIdHelper {
- public:
-  // dummy_ must not have a const type.  Otherwise an overly eager
-  // compiler (e.g. MSVC 7.1 & 8.0) may try to merge
-  // TypeIdHelper<T>::dummy_ for different Ts as an "optimization".
-  static bool dummy_;
-};
-
-template <typename T>
-bool TypeIdHelper<T>::dummy_ = false;
-
-// GetTypeId<T>() returns the ID of type T.  Different values will be
-// returned for different types.  Calling the function twice with the
-// same type argument is guaranteed to return the same ID.
-template <typename T>
-TypeId GetTypeId() {
-  // The compiler is required to allocate a different
-  // TypeIdHelper<T>::dummy_ variable for each T used to instantiate
-  // the template.  Therefore, the address of dummy_ is guaranteed to
-  // be unique.
-  return &(TypeIdHelper<T>::dummy_);
-}
-
-// Returns the type ID of ::testing::Test.  Always call this instead
-// of GetTypeId< ::testing::Test>() to get the type ID of
-// ::testing::Test, as the latter may give the wrong result due to a
-// suspected linker bug when compiling Google Test as a Mac OS X
-// framework.
-GTEST_API_ TypeId GetTestTypeId();
-
-// Defines the abstract factory interface that creates instances
-// of a Test object.
-class TestFactoryBase {
- public:
-  virtual ~TestFactoryBase() {}
-
-  // Creates a test instance to run. The instance is both created and destroyed
-  // within TestInfoImpl::Run()
-  virtual Test* CreateTest() = 0;
-
- protected:
-  TestFactoryBase() {}
-
- private:
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(TestFactoryBase);
-};
-
-// This class provides implementation of TeastFactoryBase interface.
-// It is used in TEST and TEST_F macros.
-template <class TestClass>
-class TestFactoryImpl : public TestFactoryBase {
- public:
-  Test* CreateTest() override { return new TestClass; }
-};
-
-#if GTEST_OS_WINDOWS
-
-// Predicate-formatters for implementing the HRESULT checking macros
-// {ASSERT|EXPECT}_HRESULT_{SUCCEEDED|FAILED}
-// We pass a long instead of HRESULT to avoid causing an
-// include dependency for the HRESULT type.
-GTEST_API_ AssertionResult IsHRESULTSuccess(const char* expr,
-                                            long hr);  // NOLINT
-GTEST_API_ AssertionResult IsHRESULTFailure(const char* expr,
-                                            long hr);  // NOLINT
-
-#endif  // GTEST_OS_WINDOWS
-
-// Types of SetUpTestSuite() and TearDownTestSuite() functions.
-using SetUpTestSuiteFunc = void (*)();
-using TearDownTestSuiteFunc = void (*)();
-
-struct CodeLocation {
-  CodeLocation(const std::string& a_file, int a_line)
-      : file(a_file), line(a_line) {}
-
-  std::string file;
-  int line;
-};
-
-//  Helper to identify which setup function for TestCase / TestSuite to call.
-//  Only one function is allowed, either TestCase or TestSute but not both.
-
-// Utility functions to help SuiteApiResolver
-using SetUpTearDownSuiteFuncType = void (*)();
-
-inline SetUpTearDownSuiteFuncType GetNotDefaultOrNull(
-    SetUpTearDownSuiteFuncType a, SetUpTearDownSuiteFuncType def) {
-  return a == def ? nullptr : a;
-}
-
-template <typename T>
-//  Note that SuiteApiResolver inherits from T because
-//  SetUpTestSuite()/TearDownTestSuite() could be protected. Ths way
-//  SuiteApiResolver can access them.
-struct SuiteApiResolver : T {
-  // testing::Test is only forward declared at this point. So we make it a
-  // dependend class for the compiler to be OK with it.
-  using Test =
-      typename std::conditional<sizeof(T) != 0, ::testing::Test, void>::type;
-
-  static SetUpTearDownSuiteFuncType GetSetUpCaseOrSuite(const char* filename,
-                                                        int line_num) {
-#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-    SetUpTearDownSuiteFuncType test_case_fp =
-        GetNotDefaultOrNull(&T::SetUpTestCase, &Test::SetUpTestCase);
-    SetUpTearDownSuiteFuncType test_suite_fp =
-        GetNotDefaultOrNull(&T::SetUpTestSuite, &Test::SetUpTestSuite);
-
-    GTEST_CHECK_(!test_case_fp || !test_suite_fp)
-        << "Test can not provide both SetUpTestSuite and SetUpTestCase, please "
-           "make sure there is only one present at "
-        << filename << ":" << line_num;
-
-    return test_case_fp != nullptr ? test_case_fp : test_suite_fp;
-#else
-    (void)(filename);
-    (void)(line_num);
-    return &T::SetUpTestSuite;
-#endif
-  }
-
-  static SetUpTearDownSuiteFuncType GetTearDownCaseOrSuite(const char* filename,
-                                                           int line_num) {
-#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-    SetUpTearDownSuiteFuncType test_case_fp =
-        GetNotDefaultOrNull(&T::TearDownTestCase, &Test::TearDownTestCase);
-    SetUpTearDownSuiteFuncType test_suite_fp =
-        GetNotDefaultOrNull(&T::TearDownTestSuite, &Test::TearDownTestSuite);
-
-    GTEST_CHECK_(!test_case_fp || !test_suite_fp)
-        << "Test can not provide both TearDownTestSuite and TearDownTestCase,"
-           " please make sure there is only one present at"
-        << filename << ":" << line_num;
-
-    return test_case_fp != nullptr ? test_case_fp : test_suite_fp;
-#else
-    (void)(filename);
-    (void)(line_num);
-    return &T::TearDownTestSuite;
-#endif
-  }
-};
-
-// Creates a new TestInfo object and registers it with Google Test;
-// returns the created object.
-//
-// Arguments:
-//
-//   test_suite_name:  name of the test suite
-//   name:             name of the test
-//   type_param:       the name of the test's type parameter, or NULL if
-//                     this is not a typed or a type-parameterized test.
-//   value_param:      text representation of the test's value parameter,
-//                     or NULL if this is not a type-parameterized test.
-//   code_location:    code location where the test is defined
-//   fixture_class_id: ID of the test fixture class
-//   set_up_tc:        pointer to the function that sets up the test suite
-//   tear_down_tc:     pointer to the function that tears down the test suite
-//   factory:          pointer to the factory that creates a test object.
-//                     The newly created TestInfo instance will assume
-//                     ownership of the factory object.
-GTEST_API_ TestInfo* MakeAndRegisterTestInfo(
-    const char* test_suite_name, const char* name, const char* type_param,
-    const char* value_param, CodeLocation code_location,
-    TypeId fixture_class_id, SetUpTestSuiteFunc set_up_tc,
-    TearDownTestSuiteFunc tear_down_tc, TestFactoryBase* factory);
-
-// If *pstr starts with the given prefix, modifies *pstr to be right
-// past the prefix and returns true; otherwise leaves *pstr unchanged
-// and returns false.  None of pstr, *pstr, and prefix can be NULL.
-GTEST_API_ bool SkipPrefix(const char* prefix, const char** pstr);
-
-GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \
-/* class A needs to have dll-interface to be used by clients of class B */)
-
-// State of the definition of a type-parameterized test suite.
-class GTEST_API_ TypedTestSuitePState {
- public:
-  TypedTestSuitePState() : registered_(false) {}
-
-  // Adds the given test name to defined_test_names_ and return true
-  // if the test suite hasn't been registered; otherwise aborts the
-  // program.
-  bool AddTestName(const char* file, int line, const char* case_name,
-                   const char* test_name) {
-    if (registered_) {
-      fprintf(stderr,
-              "%s Test %s must be defined before "
-              "REGISTER_TYPED_TEST_SUITE_P(%s, ...).\n",
-              FormatFileLocation(file, line).c_str(), test_name, case_name);
-      fflush(stderr);
-      posix::Abort();
-    }
-    registered_tests_.insert(
-        ::std::make_pair(test_name, CodeLocation(file, line)));
-    return true;
-  }
-
-  bool TestExists(const std::string& test_name) const {
-    return registered_tests_.count(test_name) > 0;
-  }
-
-  const CodeLocation& GetCodeLocation(const std::string& test_name) const {
-    RegisteredTestsMap::const_iterator it = registered_tests_.find(test_name);
-    GTEST_CHECK_(it != registered_tests_.end());
-    return it->second;
-  }
-
-  // Verifies that registered_tests match the test names in
-  // defined_test_names_; returns registered_tests if successful, or
-  // aborts the program otherwise.
-  const char* VerifyRegisteredTestNames(const char* test_suite_name,
-                                        const char* file, int line,
-                                        const char* registered_tests);
-
- private:
-  typedef ::std::map<std::string, CodeLocation> RegisteredTestsMap;
-
-  bool registered_;
-  RegisteredTestsMap registered_tests_;
-};
-
-//  Legacy API is deprecated but still available
-#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-using TypedTestCasePState = TypedTestSuitePState;
-#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-
-GTEST_DISABLE_MSC_WARNINGS_POP_()  //  4251
-
-// Skips to the first non-space char after the first comma in 'str';
-// returns NULL if no comma is found in 'str'.
-inline const char* SkipComma(const char* str) {
-  const char* comma = strchr(str, ',');
-  if (comma == nullptr) {
-    return nullptr;
-  }
-  while (IsSpace(*(++comma))) {}
-  return comma;
-}
-
-// Returns the prefix of 'str' before the first comma in it; returns
-// the entire string if it contains no comma.
-inline std::string GetPrefixUntilComma(const char* str) {
-  const char* comma = strchr(str, ',');
-  return comma == nullptr ? str : std::string(str, comma);
-}
-
-// Splits a given string on a given delimiter, populating a given
-// vector with the fields.
-void SplitString(const ::std::string& str, char delimiter,
-                 ::std::vector< ::std::string>* dest);
-
-// The default argument to the template below for the case when the user does
-// not provide a name generator.
-struct DefaultNameGenerator {
-  template <typename T>
-  static std::string GetName(int i) {
-    return StreamableToString(i);
-  }
-};
-
-template <typename Provided = DefaultNameGenerator>
-struct NameGeneratorSelector {
-  typedef Provided type;
-};
-
-template <typename NameGenerator>
-void GenerateNamesRecursively(internal::None, std::vector<std::string>*, int) {}
-
-template <typename NameGenerator, typename Types>
-void GenerateNamesRecursively(Types, std::vector<std::string>* result, int i) {
-  result->push_back(NameGenerator::template GetName<typename Types::Head>(i));
-  GenerateNamesRecursively<NameGenerator>(typename Types::Tail(), result,
-                                          i + 1);
-}
-
-template <typename NameGenerator, typename Types>
-std::vector<std::string> GenerateNames() {
-  std::vector<std::string> result;
-  GenerateNamesRecursively<NameGenerator>(Types(), &result, 0);
-  return result;
-}
-
-// TypeParameterizedTest<Fixture, TestSel, Types>::Register()
-// registers a list of type-parameterized tests with Google Test.  The
-// return value is insignificant - we just need to return something
-// such that we can call this function in a namespace scope.
-//
-// Implementation note: The GTEST_TEMPLATE_ macro declares a template
-// template parameter.  It's defined in gtest-type-util.h.
-template <GTEST_TEMPLATE_ Fixture, class TestSel, typename Types>
-class TypeParameterizedTest {
- public:
-  // 'index' is the index of the test in the type list 'Types'
-  // specified in INSTANTIATE_TYPED_TEST_SUITE_P(Prefix, TestSuite,
-  // Types).  Valid values for 'index' are [0, N - 1] where N is the
-  // length of Types.
-  static bool Register(const char* prefix, const CodeLocation& code_location,
-                       const char* case_name, const char* test_names, int index,
-                       const std::vector<std::string>& type_names =
-                           GenerateNames<DefaultNameGenerator, Types>()) {
-    typedef typename Types::Head Type;
-    typedef Fixture<Type> FixtureClass;
-    typedef typename GTEST_BIND_(TestSel, Type) TestClass;
-
-    // First, registers the first type-parameterized test in the type
-    // list.
-    MakeAndRegisterTestInfo(
-        (std::string(prefix) + (prefix[0] == '\0' ? "" : "/") + case_name +
-         "/" + type_names[static_cast<size_t>(index)])
-            .c_str(),
-        StripTrailingSpaces(GetPrefixUntilComma(test_names)).c_str(),
-        GetTypeName<Type>().c_str(),
-        nullptr,  // No value parameter.
-        code_location, GetTypeId<FixtureClass>(),
-        SuiteApiResolver<TestClass>::GetSetUpCaseOrSuite(
-            code_location.file.c_str(), code_location.line),
-        SuiteApiResolver<TestClass>::GetTearDownCaseOrSuite(
-            code_location.file.c_str(), code_location.line),
-        new TestFactoryImpl<TestClass>);
-
-    // Next, recurses (at compile time) with the tail of the type list.
-    return TypeParameterizedTest<Fixture, TestSel,
-                                 typename Types::Tail>::Register(prefix,
-                                                                 code_location,
-                                                                 case_name,
-                                                                 test_names,
-                                                                 index + 1,
-                                                                 type_names);
-  }
-};
-
-// The base case for the compile time recursion.
-template <GTEST_TEMPLATE_ Fixture, class TestSel>
-class TypeParameterizedTest<Fixture, TestSel, internal::None> {
- public:
-  static bool Register(const char* /*prefix*/, const CodeLocation&,
-                       const char* /*case_name*/, const char* /*test_names*/,
-                       int /*index*/,
-                       const std::vector<std::string>& =
-                           std::vector<std::string>() /*type_names*/) {
-    return true;
-  }
-};
-
-GTEST_API_ void RegisterTypeParameterizedTestSuite(const char* test_suite_name,
-                                                   CodeLocation code_location);
-GTEST_API_ void RegisterTypeParameterizedTestSuiteInstantiation(
-    const char* case_name);
-
-// TypeParameterizedTestSuite<Fixture, Tests, Types>::Register()
-// registers *all combinations* of 'Tests' and 'Types' with Google
-// Test.  The return value is insignificant - we just need to return
-// something such that we can call this function in a namespace scope.
-template <GTEST_TEMPLATE_ Fixture, typename Tests, typename Types>
-class TypeParameterizedTestSuite {
- public:
-  static bool Register(const char* prefix, CodeLocation code_location,
-                       const TypedTestSuitePState* state, const char* case_name,
-                       const char* test_names,
-                       const std::vector<std::string>& type_names =
-                           GenerateNames<DefaultNameGenerator, Types>()) {
-    RegisterTypeParameterizedTestSuiteInstantiation(case_name);
-    std::string test_name = StripTrailingSpaces(
-        GetPrefixUntilComma(test_names));
-    if (!state->TestExists(test_name)) {
-      fprintf(stderr, "Failed to get code location for test %s.%s at %s.",
-              case_name, test_name.c_str(),
-              FormatFileLocation(code_location.file.c_str(),
-                                 code_location.line).c_str());
-      fflush(stderr);
-      posix::Abort();
-    }
-    const CodeLocation& test_location = state->GetCodeLocation(test_name);
-
-    typedef typename Tests::Head Head;
-
-    // First, register the first test in 'Test' for each type in 'Types'.
-    TypeParameterizedTest<Fixture, Head, Types>::Register(
-        prefix, test_location, case_name, test_names, 0, type_names);
-
-    // Next, recurses (at compile time) with the tail of the test list.
-    return TypeParameterizedTestSuite<Fixture, typename Tests::Tail,
-                                      Types>::Register(prefix, code_location,
-                                                       state, case_name,
-                                                       SkipComma(test_names),
-                                                       type_names);
-  }
-};
-
-// The base case for the compile time recursion.
-template <GTEST_TEMPLATE_ Fixture, typename Types>
-class TypeParameterizedTestSuite<Fixture, internal::None, Types> {
- public:
-  static bool Register(const char* /*prefix*/, const CodeLocation&,
-                       const TypedTestSuitePState* /*state*/,
-                       const char* /*case_name*/, const char* /*test_names*/,
-                       const std::vector<std::string>& =
-                           std::vector<std::string>() /*type_names*/) {
-    return true;
-  }
-};
-
-// Returns the current OS stack trace as an std::string.
-//
-// The maximum number of stack frames to be included is specified by
-// the gtest_stack_trace_depth flag.  The skip_count parameter
-// specifies the number of top frames to be skipped, which doesn't
-// count against the number of frames to be included.
-//
-// For example, if Foo() calls Bar(), which in turn calls
-// GetCurrentOsStackTraceExceptTop(..., 1), Foo() will be included in
-// the trace but Bar() and GetCurrentOsStackTraceExceptTop() won't.
-GTEST_API_ std::string GetCurrentOsStackTraceExceptTop(
-    UnitTest* unit_test, int skip_count);
-
-// Helpers for suppressing warnings on unreachable code or constant
-// condition.
-
-// Always returns true.
-GTEST_API_ bool AlwaysTrue();
-
-// Always returns false.
-inline bool AlwaysFalse() { return !AlwaysTrue(); }
-
-// Helper for suppressing false warning from Clang on a const char*
-// variable declared in a conditional expression always being NULL in
-// the else branch.
-struct GTEST_API_ ConstCharPtr {
-  ConstCharPtr(const char* str) : value(str) {}
-  operator bool() const { return true; }
-  const char* value;
-};
-
-// Helper for declaring std::string within 'if' statement
-// in pre C++17 build environment.
-struct TrueWithString {
-  TrueWithString() = default;
-  explicit TrueWithString(const char* str) : value(str) {}
-  explicit TrueWithString(const std::string& str) : value(str) {}
-  explicit operator bool() const { return true; }
-  std::string value;
-};
-
-// A simple Linear Congruential Generator for generating random
-// numbers with a uniform distribution.  Unlike rand() and srand(), it
-// doesn't use global state (and therefore can't interfere with user
-// code).  Unlike rand_r(), it's portable.  An LCG isn't very random,
-// but it's good enough for our purposes.
-class GTEST_API_ Random {
- public:
-  static const uint32_t kMaxRange = 1u << 31;
-
-  explicit Random(uint32_t seed) : state_(seed) {}
-
-  void Reseed(uint32_t seed) { state_ = seed; }
-
-  // Generates a random number from [0, range).  Crashes if 'range' is
-  // 0 or greater than kMaxRange.
-  uint32_t Generate(uint32_t range);
-
- private:
-  uint32_t state_;
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(Random);
-};
-
-// Turns const U&, U&, const U, and U all into U.
-#define GTEST_REMOVE_REFERENCE_AND_CONST_(T) \
-  typename std::remove_const<typename std::remove_reference<T>::type>::type
-
-// HasDebugStringAndShortDebugString<T>::value is a compile-time bool constant
-// that's true if and only if T has methods DebugString() and ShortDebugString()
-// that return std::string.
-template <typename T>
-class HasDebugStringAndShortDebugString {
- private:
-  template <typename C>
-  static auto CheckDebugString(C*) -> typename std::is_same<
-      std::string, decltype(std::declval<const C>().DebugString())>::type;
-  template <typename>
-  static std::false_type CheckDebugString(...);
-
-  template <typename C>
-  static auto CheckShortDebugString(C*) -> typename std::is_same<
-      std::string, decltype(std::declval<const C>().ShortDebugString())>::type;
-  template <typename>
-  static std::false_type CheckShortDebugString(...);
-
-  using HasDebugStringType = decltype(CheckDebugString<T>(nullptr));
-  using HasShortDebugStringType = decltype(CheckShortDebugString<T>(nullptr));
-
- public:
-  static constexpr bool value =
-      HasDebugStringType::value && HasShortDebugStringType::value;
-};
-
-template <typename T>
-constexpr bool HasDebugStringAndShortDebugString<T>::value;
-
-// When the compiler sees expression IsContainerTest<C>(0), if C is an
-// STL-style container class, the first overload of IsContainerTest
-// will be viable (since both C::iterator* and C::const_iterator* are
-// valid types and NULL can be implicitly converted to them).  It will
-// be picked over the second overload as 'int' is a perfect match for
-// the type of argument 0.  If C::iterator or C::const_iterator is not
-// a valid type, the first overload is not viable, and the second
-// overload will be picked.  Therefore, we can determine whether C is
-// a container class by checking the type of IsContainerTest<C>(0).
-// The value of the expression is insignificant.
-//
-// In C++11 mode we check the existence of a const_iterator and that an
-// iterator is properly implemented for the container.
-//
-// For pre-C++11 that we look for both C::iterator and C::const_iterator.
-// The reason is that C++ injects the name of a class as a member of the
-// class itself (e.g. you can refer to class iterator as either
-// 'iterator' or 'iterator::iterator').  If we look for C::iterator
-// only, for example, we would mistakenly think that a class named
-// iterator is an STL container.
-//
-// Also note that the simpler approach of overloading
-// IsContainerTest(typename C::const_iterator*) and
-// IsContainerTest(...) doesn't work with Visual Age C++ and Sun C++.
-typedef int IsContainer;
-template <class C,
-          class Iterator = decltype(::std::declval<const C&>().begin()),
-          class = decltype(::std::declval<const C&>().end()),
-          class = decltype(++::std::declval<Iterator&>()),
-          class = decltype(*::std::declval<Iterator>()),
-          class = typename C::const_iterator>
-IsContainer IsContainerTest(int /* dummy */) {
-  return 0;
-}
-
-typedef char IsNotContainer;
-template <class C>
-IsNotContainer IsContainerTest(long /* dummy */) { return '\0'; }
-
-// Trait to detect whether a type T is a hash table.
-// The heuristic used is that the type contains an inner type `hasher` and does
-// not contain an inner type `reverse_iterator`.
-// If the container is iterable in reverse, then order might actually matter.
-template <typename T>
-struct IsHashTable {
- private:
-  template <typename U>
-  static char test(typename U::hasher*, typename U::reverse_iterator*);
-  template <typename U>
-  static int test(typename U::hasher*, ...);
-  template <typename U>
-  static char test(...);
-
- public:
-  static const bool value = sizeof(test<T>(nullptr, nullptr)) == sizeof(int);
-};
-
-template <typename T>
-const bool IsHashTable<T>::value;
-
-template <typename C,
-          bool = sizeof(IsContainerTest<C>(0)) == sizeof(IsContainer)>
-struct IsRecursiveContainerImpl;
-
-template <typename C>
-struct IsRecursiveContainerImpl<C, false> : public std::false_type {};
-
-// Since the IsRecursiveContainerImpl depends on the IsContainerTest we need to
-// obey the same inconsistencies as the IsContainerTest, namely check if
-// something is a container is relying on only const_iterator in C++11 and
-// is relying on both const_iterator and iterator otherwise
-template <typename C>
-struct IsRecursiveContainerImpl<C, true> {
-  using value_type = decltype(*std::declval<typename C::const_iterator>());
-  using type =
-      std::is_same<typename std::remove_const<
-                       typename std::remove_reference<value_type>::type>::type,
-                   C>;
-};
-
-// IsRecursiveContainer<Type> is a unary compile-time predicate that
-// evaluates whether C is a recursive container type. A recursive container
-// type is a container type whose value_type is equal to the container type
-// itself. An example for a recursive container type is
-// boost::filesystem::path, whose iterator has a value_type that is equal to
-// boost::filesystem::path.
-template <typename C>
-struct IsRecursiveContainer : public IsRecursiveContainerImpl<C>::type {};
-
-// Utilities for native arrays.
-
-// ArrayEq() compares two k-dimensional native arrays using the
-// elements' operator==, where k can be any integer >= 0.  When k is
-// 0, ArrayEq() degenerates into comparing a single pair of values.
-
-template <typename T, typename U>
-bool ArrayEq(const T* lhs, size_t size, const U* rhs);
-
-// This generic version is used when k is 0.
-template <typename T, typename U>
-inline bool ArrayEq(const T& lhs, const U& rhs) { return lhs == rhs; }
-
-// This overload is used when k >= 1.
-template <typename T, typename U, size_t N>
-inline bool ArrayEq(const T(&lhs)[N], const U(&rhs)[N]) {
-  return internal::ArrayEq(lhs, N, rhs);
-}
-
-// This helper reduces code bloat.  If we instead put its logic inside
-// the previous ArrayEq() function, arrays with different sizes would
-// lead to different copies of the template code.
-template <typename T, typename U>
-bool ArrayEq(const T* lhs, size_t size, const U* rhs) {
-  for (size_t i = 0; i != size; i++) {
-    if (!internal::ArrayEq(lhs[i], rhs[i]))
-      return false;
-  }
-  return true;
-}
-
-// Finds the first element in the iterator range [begin, end) that
-// equals elem.  Element may be a native array type itself.
-template <typename Iter, typename Element>
-Iter ArrayAwareFind(Iter begin, Iter end, const Element& elem) {
-  for (Iter it = begin; it != end; ++it) {
-    if (internal::ArrayEq(*it, elem))
-      return it;
-  }
-  return end;
-}
-
-// CopyArray() copies a k-dimensional native array using the elements'
-// operator=, where k can be any integer >= 0.  When k is 0,
-// CopyArray() degenerates into copying a single value.
-
-template <typename T, typename U>
-void CopyArray(const T* from, size_t size, U* to);
-
-// This generic version is used when k is 0.
-template <typename T, typename U>
-inline void CopyArray(const T& from, U* to) { *to = from; }
-
-// This overload is used when k >= 1.
-template <typename T, typename U, size_t N>
-inline void CopyArray(const T(&from)[N], U(*to)[N]) {
-  internal::CopyArray(from, N, *to);
-}
-
-// This helper reduces code bloat.  If we instead put its logic inside
-// the previous CopyArray() function, arrays with different sizes
-// would lead to different copies of the template code.
-template <typename T, typename U>
-void CopyArray(const T* from, size_t size, U* to) {
-  for (size_t i = 0; i != size; i++) {
-    internal::CopyArray(from[i], to + i);
-  }
-}
-
-// The relation between an NativeArray object (see below) and the
-// native array it represents.
-// We use 2 different structs to allow non-copyable types to be used, as long
-// as RelationToSourceReference() is passed.
-struct RelationToSourceReference {};
-struct RelationToSourceCopy {};
-
-// Adapts a native array to a read-only STL-style container.  Instead
-// of the complete STL container concept, this adaptor only implements
-// members useful for Google Mock's container matchers.  New members
-// should be added as needed.  To simplify the implementation, we only
-// support Element being a raw type (i.e. having no top-level const or
-// reference modifier).  It's the client's responsibility to satisfy
-// this requirement.  Element can be an array type itself (hence
-// multi-dimensional arrays are supported).
-template <typename Element>
-class NativeArray {
- public:
-  // STL-style container typedefs.
-  typedef Element value_type;
-  typedef Element* iterator;
-  typedef const Element* const_iterator;
-
-  // Constructs from a native array. References the source.
-  NativeArray(const Element* array, size_t count, RelationToSourceReference) {
-    InitRef(array, count);
-  }
-
-  // Constructs from a native array. Copies the source.
-  NativeArray(const Element* array, size_t count, RelationToSourceCopy) {
-    InitCopy(array, count);
-  }
-
-  // Copy constructor.
-  NativeArray(const NativeArray& rhs) {
-    (this->*rhs.clone_)(rhs.array_, rhs.size_);
-  }
-
-  ~NativeArray() {
-    if (clone_ != &NativeArray::InitRef)
-      delete[] array_;
-  }
-
-  // STL-style container methods.
-  size_t size() const { return size_; }
-  const_iterator begin() const { return array_; }
-  const_iterator end() const { return array_ + size_; }
-  bool operator==(const NativeArray& rhs) const {
-    return size() == rhs.size() &&
-        ArrayEq(begin(), size(), rhs.begin());
-  }
-
- private:
-  static_assert(!std::is_const<Element>::value, "Type must not be const");
-  static_assert(!std::is_reference<Element>::value,
-                "Type must not be a reference");
-
-  // Initializes this object with a copy of the input.
-  void InitCopy(const Element* array, size_t a_size) {
-    Element* const copy = new Element[a_size];
-    CopyArray(array, a_size, copy);
-    array_ = copy;
-    size_ = a_size;
-    clone_ = &NativeArray::InitCopy;
-  }
-
-  // Initializes this object with a reference of the input.
-  void InitRef(const Element* array, size_t a_size) {
-    array_ = array;
-    size_ = a_size;
-    clone_ = &NativeArray::InitRef;
-  }
-
-  const Element* array_;
-  size_t size_;
-  void (NativeArray::*clone_)(const Element*, size_t);
-};
-
-// Backport of std::index_sequence.
-template <size_t... Is>
-struct IndexSequence {
-  using type = IndexSequence;
-};
-
-// Double the IndexSequence, and one if plus_one is true.
-template <bool plus_one, typename T, size_t sizeofT>
-struct DoubleSequence;
-template <size_t... I, size_t sizeofT>
-struct DoubleSequence<true, IndexSequence<I...>, sizeofT> {
-  using type = IndexSequence<I..., (sizeofT + I)..., 2 * sizeofT>;
-};
-template <size_t... I, size_t sizeofT>
-struct DoubleSequence<false, IndexSequence<I...>, sizeofT> {
-  using type = IndexSequence<I..., (sizeofT + I)...>;
-};
-
-// Backport of std::make_index_sequence.
-// It uses O(ln(N)) instantiation depth.
-template <size_t N>
-struct MakeIndexSequenceImpl
-    : DoubleSequence<N % 2 == 1, typename MakeIndexSequenceImpl<N / 2>::type,
-                     N / 2>::type {};
-
-template <>
-struct MakeIndexSequenceImpl<0> : IndexSequence<> {};
-
-template <size_t N>
-using MakeIndexSequence = typename MakeIndexSequenceImpl<N>::type;
-
-template <typename... T>
-using IndexSequenceFor = typename MakeIndexSequence<sizeof...(T)>::type;
-
-template <size_t>
-struct Ignore {
-  Ignore(...);  // NOLINT
-};
-
-template <typename>
-struct ElemFromListImpl;
-template <size_t... I>
-struct ElemFromListImpl<IndexSequence<I...>> {
-  // We make Ignore a template to solve a problem with MSVC.
-  // A non-template Ignore would work fine with `decltype(Ignore(I))...`, but
-  // MSVC doesn't understand how to deal with that pack expansion.
-  // Use `0 * I` to have a single instantiation of Ignore.
-  template <typename R>
-  static R Apply(Ignore<0 * I>..., R (*)(), ...);
-};
-
-template <size_t N, typename... T>
-struct ElemFromList {
-  using type =
-      decltype(ElemFromListImpl<typename MakeIndexSequence<N>::type>::Apply(
-          static_cast<T (*)()>(nullptr)...));
-};
-
-struct FlatTupleConstructTag {};
-
-template <typename... T>
-class FlatTuple;
-
-template <typename Derived, size_t I>
-struct FlatTupleElemBase;
-
-template <typename... T, size_t I>
-struct FlatTupleElemBase<FlatTuple<T...>, I> {
-  using value_type = typename ElemFromList<I, T...>::type;
-  FlatTupleElemBase() = default;
-  template <typename Arg>
-  explicit FlatTupleElemBase(FlatTupleConstructTag, Arg&& t)
-      : value(std::forward<Arg>(t)) {}
-  value_type value;
-};
-
-template <typename Derived, typename Idx>
-struct FlatTupleBase;
-
-template <size_t... Idx, typename... T>
-struct FlatTupleBase<FlatTuple<T...>, IndexSequence<Idx...>>
-    : FlatTupleElemBase<FlatTuple<T...>, Idx>... {
-  using Indices = IndexSequence<Idx...>;
-  FlatTupleBase() = default;
-  template <typename... Args>
-  explicit FlatTupleBase(FlatTupleConstructTag, Args&&... args)
-      : FlatTupleElemBase<FlatTuple<T...>, Idx>(FlatTupleConstructTag{},
-                                                std::forward<Args>(args))... {}
-
-  template <size_t I>
-  const typename ElemFromList<I, T...>::type& Get() const {
-    return FlatTupleElemBase<FlatTuple<T...>, I>::value;
-  }
-
-  template <size_t I>
-  typename ElemFromList<I, T...>::type& Get() {
-    return FlatTupleElemBase<FlatTuple<T...>, I>::value;
-  }
-
-  template <typename F>
-  auto Apply(F&& f) -> decltype(std::forward<F>(f)(this->Get<Idx>()...)) {
-    return std::forward<F>(f)(Get<Idx>()...);
-  }
-
-  template <typename F>
-  auto Apply(F&& f) const -> decltype(std::forward<F>(f)(this->Get<Idx>()...)) {
-    return std::forward<F>(f)(Get<Idx>()...);
-  }
-};
-
-// Analog to std::tuple but with different tradeoffs.
-// This class minimizes the template instantiation depth, thus allowing more
-// elements than std::tuple would. std::tuple has been seen to require an
-// instantiation depth of more than 10x the number of elements in some
-// implementations.
-// FlatTuple and ElemFromList are not recursive and have a fixed depth
-// regardless of T...
-// MakeIndexSequence, on the other hand, it is recursive but with an
-// instantiation depth of O(ln(N)).
-template <typename... T>
-class FlatTuple
-    : private FlatTupleBase<FlatTuple<T...>,
-                            typename MakeIndexSequence<sizeof...(T)>::type> {
-  using Indices = typename FlatTupleBase<
-      FlatTuple<T...>, typename MakeIndexSequence<sizeof...(T)>::type>::Indices;
-
- public:
-  FlatTuple() = default;
-  template <typename... Args>
-  explicit FlatTuple(FlatTupleConstructTag tag, Args&&... args)
-      : FlatTuple::FlatTupleBase(tag, std::forward<Args>(args)...) {}
-
-  using FlatTuple::FlatTupleBase::Apply;
-  using FlatTuple::FlatTupleBase::Get;
-};
-
-// Utility functions to be called with static_assert to induce deprecation
-// warnings.
-GTEST_INTERNAL_DEPRECATED(
-    "INSTANTIATE_TEST_CASE_P is deprecated, please use "
-    "INSTANTIATE_TEST_SUITE_P")
-constexpr bool InstantiateTestCase_P_IsDeprecated() { return true; }
-
-GTEST_INTERNAL_DEPRECATED(
-    "TYPED_TEST_CASE_P is deprecated, please use "
-    "TYPED_TEST_SUITE_P")
-constexpr bool TypedTestCase_P_IsDeprecated() { return true; }
-
-GTEST_INTERNAL_DEPRECATED(
-    "TYPED_TEST_CASE is deprecated, please use "
-    "TYPED_TEST_SUITE")
-constexpr bool TypedTestCaseIsDeprecated() { return true; }
-
-GTEST_INTERNAL_DEPRECATED(
-    "REGISTER_TYPED_TEST_CASE_P is deprecated, please use "
-    "REGISTER_TYPED_TEST_SUITE_P")
-constexpr bool RegisterTypedTestCase_P_IsDeprecated() { return true; }
-
-GTEST_INTERNAL_DEPRECATED(
-    "INSTANTIATE_TYPED_TEST_CASE_P is deprecated, please use "
-    "INSTANTIATE_TYPED_TEST_SUITE_P")
-constexpr bool InstantiateTypedTestCase_P_IsDeprecated() { return true; }
-
-}  // namespace internal
-}  // namespace testing
-
-namespace std {
-// Some standard library implementations use `struct tuple_size` and some use
-// `class tuple_size`. Clang warns about the mismatch.
-// https://reviews.llvm.org/D55466
-#ifdef __clang__
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wmismatched-tags"
-#endif
-template <typename... Ts>
-struct tuple_size<testing::internal::FlatTuple<Ts...>>
-    : std::integral_constant<size_t, sizeof...(Ts)> {};
-#ifdef __clang__
-#pragma clang diagnostic pop
-#endif
-}  // namespace std
-
-#define GTEST_MESSAGE_AT_(file, line, message, result_type) \
-  ::testing::internal::AssertHelper(result_type, file, line, message) \
-    = ::testing::Message()
-
-#define GTEST_MESSAGE_(message, result_type) \
-  GTEST_MESSAGE_AT_(__FILE__, __LINE__, message, result_type)
-
-#define GTEST_FATAL_FAILURE_(message) \
-  return GTEST_MESSAGE_(message, ::testing::TestPartResult::kFatalFailure)
-
-#define GTEST_NONFATAL_FAILURE_(message) \
-  GTEST_MESSAGE_(message, ::testing::TestPartResult::kNonFatalFailure)
-
-#define GTEST_SUCCESS_(message) \
-  GTEST_MESSAGE_(message, ::testing::TestPartResult::kSuccess)
-
-#define GTEST_SKIP_(message) \
-  return GTEST_MESSAGE_(message, ::testing::TestPartResult::kSkip)
-
-// Suppress MSVC warning 4072 (unreachable code) for the code following
-// statement if it returns or throws (or doesn't return or throw in some
-// situations).
-// NOTE: The "else" is important to keep this expansion to prevent a top-level
-// "else" from attaching to our "if".
-#define GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement) \
-  if (::testing::internal::AlwaysTrue()) {                        \
-    statement;                                                    \
-  } else                     /* NOLINT */                         \
-    static_assert(true, "")  // User must have a semicolon after expansion.
-
-#if GTEST_HAS_EXCEPTIONS
-
-namespace testing {
-namespace internal {
-
-class NeverThrown {
- public:
-  const char* what() const noexcept {
-    return "this exception should never be thrown";
-  }
-};
-
-}  // namespace internal
-}  // namespace testing
-
-#if GTEST_HAS_RTTI
-
-#define GTEST_EXCEPTION_TYPE_(e) ::testing::internal::GetTypeName(typeid(e))
-
-#else  // GTEST_HAS_RTTI
-
-#define GTEST_EXCEPTION_TYPE_(e) \
-  std::string { "an std::exception-derived error" }
-
-#endif  // GTEST_HAS_RTTI
-
-#define GTEST_TEST_THROW_CATCH_STD_EXCEPTION_(statement, expected_exception)   \
-  catch (typename std::conditional<                                            \
-         std::is_same<typename std::remove_cv<typename std::remove_reference<  \
-                          expected_exception>::type>::type,                    \
-                      std::exception>::value,                                  \
-         const ::testing::internal::NeverThrown&, const std::exception&>::type \
-             e) {                                                              \
-    gtest_msg.value = "Expected: " #statement                                  \
-                      " throws an exception of type " #expected_exception      \
-                      ".\n  Actual: it throws ";                               \
-    gtest_msg.value += GTEST_EXCEPTION_TYPE_(e);                               \
-    gtest_msg.value += " with description \"";                                 \
-    gtest_msg.value += e.what();                                               \
-    gtest_msg.value += "\".";                                                  \
-    goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__);                \
-  }
-
-#else  // GTEST_HAS_EXCEPTIONS
-
-#define GTEST_TEST_THROW_CATCH_STD_EXCEPTION_(statement, expected_exception)
-
-#endif  // GTEST_HAS_EXCEPTIONS
-
-#define GTEST_TEST_THROW_(statement, expected_exception, fail)              \
-  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                             \
-  if (::testing::internal::TrueWithString gtest_msg{}) {                    \
-    bool gtest_caught_expected = false;                                     \
-    try {                                                                   \
-      GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement);            \
-    } catch (expected_exception const&) {                                   \
-      gtest_caught_expected = true;                                         \
-    }                                                                       \
-    GTEST_TEST_THROW_CATCH_STD_EXCEPTION_(statement, expected_exception)    \
-    catch (...) {                                                           \
-      gtest_msg.value = "Expected: " #statement                             \
-                        " throws an exception of type " #expected_exception \
-                        ".\n  Actual: it throws a different type.";         \
-      goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__);           \
-    }                                                                       \
-    if (!gtest_caught_expected) {                                           \
-      gtest_msg.value = "Expected: " #statement                             \
-                        " throws an exception of type " #expected_exception \
-                        ".\n  Actual: it throws nothing.";                  \
-      goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__);           \
-    }                                                                       \
-  } else /*NOLINT*/                                                         \
-    GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__)                   \
-        : fail(gtest_msg.value.c_str())
-
-#if GTEST_HAS_EXCEPTIONS
-
-#define GTEST_TEST_NO_THROW_CATCH_STD_EXCEPTION_()                \
-  catch (std::exception const& e) {                               \
-    gtest_msg.value = "it throws ";                               \
-    gtest_msg.value += GTEST_EXCEPTION_TYPE_(e);                  \
-    gtest_msg.value += " with description \"";                    \
-    gtest_msg.value += e.what();                                  \
-    gtest_msg.value += "\".";                                     \
-    goto GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__); \
-  }
-
-#else  // GTEST_HAS_EXCEPTIONS
-
-#define GTEST_TEST_NO_THROW_CATCH_STD_EXCEPTION_()
-
-#endif  // GTEST_HAS_EXCEPTIONS
-
-#define GTEST_TEST_NO_THROW_(statement, fail) \
-  GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
-  if (::testing::internal::TrueWithString gtest_msg{}) { \
-    try { \
-      GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
-    } \
-    GTEST_TEST_NO_THROW_CATCH_STD_EXCEPTION_() \
-    catch (...) { \
-      gtest_msg.value = "it throws."; \
-      goto GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__); \
-    } \
-  } else \
-    GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__): \
-      fail(("Expected: " #statement " doesn't throw an exception.\n" \
-            "  Actual: " + gtest_msg.value).c_str())
-
-#define GTEST_TEST_ANY_THROW_(statement, fail) \
-  GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
-  if (::testing::internal::AlwaysTrue()) { \
-    bool gtest_caught_any = false; \
-    try { \
-      GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
-    } \
-    catch (...) { \
-      gtest_caught_any = true; \
-    } \
-    if (!gtest_caught_any) { \
-      goto GTEST_CONCAT_TOKEN_(gtest_label_testanythrow_, __LINE__); \
-    } \
-  } else \
-    GTEST_CONCAT_TOKEN_(gtest_label_testanythrow_, __LINE__): \
-      fail("Expected: " #statement " throws an exception.\n" \
-           "  Actual: it doesn't.")
-
-
-// Implements Boolean test assertions such as EXPECT_TRUE. expression can be
-// either a boolean expression or an AssertionResult. text is a textual
-// representation of expression as it was passed into the EXPECT_TRUE.
-#define GTEST_TEST_BOOLEAN_(expression, text, actual, expected, fail) \
-  GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
-  if (const ::testing::AssertionResult gtest_ar_ = \
-      ::testing::AssertionResult(expression)) \
-    ; \
-  else \
-    fail(::testing::internal::GetBoolAssertionFailureMessage(\
-        gtest_ar_, text, #actual, #expected).c_str())
-
-#define GTEST_TEST_NO_FATAL_FAILURE_(statement, fail) \
-  GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
-  if (::testing::internal::AlwaysTrue()) { \
-    ::testing::internal::HasNewFatalFailureHelper gtest_fatal_failure_checker; \
-    GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
-    if (gtest_fatal_failure_checker.has_new_fatal_failure()) { \
-      goto GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__); \
-    } \
-  } else \
-    GTEST_CONCAT_TOKEN_(gtest_label_testnofatal_, __LINE__): \
-      fail("Expected: " #statement " doesn't generate new fatal " \
-           "failures in the current thread.\n" \
-           "  Actual: it does.")
-
-// Expands to the name of the class that implements the given test.
-#define GTEST_TEST_CLASS_NAME_(test_suite_name, test_name) \
-  test_suite_name##_##test_name##_Test
-
-// Helper macro for defining tests.
-#define GTEST_TEST_(test_suite_name, test_name, parent_class, parent_id)      \
-  static_assert(sizeof(GTEST_STRINGIFY_(test_suite_name)) > 1,                \
-                "test_suite_name must not be empty");                         \
-  static_assert(sizeof(GTEST_STRINGIFY_(test_name)) > 1,                      \
-                "test_name must not be empty");                               \
-  class GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)                    \
-      : public parent_class {                                                 \
-   public:                                                                    \
-    GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)() = default;           \
-    ~GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)() override = default; \
-    GTEST_DISALLOW_COPY_AND_ASSIGN_(GTEST_TEST_CLASS_NAME_(test_suite_name,   \
-                                                           test_name));       \
-    GTEST_DISALLOW_MOVE_AND_ASSIGN_(GTEST_TEST_CLASS_NAME_(test_suite_name,   \
-                                                           test_name));       \
-                                                                              \
-   private:                                                                   \
-    void TestBody() override;                                                 \
-    static ::testing::TestInfo* const test_info_ GTEST_ATTRIBUTE_UNUSED_;     \
-  };                                                                          \
-                                                                              \
-  ::testing::TestInfo* const GTEST_TEST_CLASS_NAME_(test_suite_name,          \
-                                                    test_name)::test_info_ =  \
-      ::testing::internal::MakeAndRegisterTestInfo(                           \
-          #test_suite_name, #test_name, nullptr, nullptr,                     \
-          ::testing::internal::CodeLocation(__FILE__, __LINE__), (parent_id), \
-          ::testing::internal::SuiteApiResolver<                              \
-              parent_class>::GetSetUpCaseOrSuite(__FILE__, __LINE__),         \
-          ::testing::internal::SuiteApiResolver<                              \
-              parent_class>::GetTearDownCaseOrSuite(__FILE__, __LINE__),      \
-          new ::testing::internal::TestFactoryImpl</* NOLINT(cppcoreguidelines-owning-memory) */ GTEST_TEST_CLASS_NAME_(    \
-              test_suite_name, test_name)>);                                  \
-  void GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)::TestBody()
-
-#endif  // GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_INTERNAL_H_
diff --git a/src/include/gromacs/external/googletest/googletest/include/gtest/internal/gtest-param-util.h b/src/include/gromacs/external/googletest/googletest/include/gtest/internal/gtest-param-util.h
deleted file mode 100644 (file)
index d2312c0..0000000
+++ /dev/null
@@ -1,945 +0,0 @@
-// Copyright 2008 Google Inc.
-// All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-// Type and function utilities for implementing parameterized tests.
-
-#ifndef GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_
-#define GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_
-
-#include <ctype.h>
-
-#include <cassert>
-#include <iterator>
-#include <memory>
-#include <set>
-#include <tuple>
-#include <type_traits>
-#include <utility>
-#include <vector>
-
-#include "gtest/internal/gtest-internal.h"
-#include "gtest/internal/gtest-port.h"
-#include "gtest/gtest-printers.h"
-#include "gtest/gtest-test-part.h"
-
-namespace testing {
-// Input to a parameterized test name generator, describing a test parameter.
-// Consists of the parameter value and the integer parameter index.
-template <class ParamType>
-struct TestParamInfo {
-  TestParamInfo(const ParamType& a_param, size_t an_index) :
-    param(a_param),
-    index(an_index) {}
-  ParamType param;
-  size_t index;
-};
-
-// A builtin parameterized test name generator which returns the result of
-// testing::PrintToString.
-struct PrintToStringParamName {
-  template <class ParamType>
-  std::string operator()(const TestParamInfo<ParamType>& info) const {
-    return PrintToString(info.param);
-  }
-};
-
-namespace internal {
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-// Utility Functions
-
-// Outputs a message explaining invalid registration of different
-// fixture class for the same test suite. This may happen when
-// TEST_P macro is used to define two tests with the same name
-// but in different namespaces.
-GTEST_API_ void ReportInvalidTestSuiteType(const char* test_suite_name,
-                                           CodeLocation code_location);
-
-template <typename> class ParamGeneratorInterface;
-template <typename> class ParamGenerator;
-
-// Interface for iterating over elements provided by an implementation
-// of ParamGeneratorInterface<T>.
-template <typename T>
-class ParamIteratorInterface {
- public:
-  virtual ~ParamIteratorInterface() {}
-  // A pointer to the base generator instance.
-  // Used only for the purposes of iterator comparison
-  // to make sure that two iterators belong to the same generator.
-  virtual const ParamGeneratorInterface<T>* BaseGenerator() const = 0;
-  // Advances iterator to point to the next element
-  // provided by the generator. The caller is responsible
-  // for not calling Advance() on an iterator equal to
-  // BaseGenerator()->End().
-  virtual void Advance() = 0;
-  // Clones the iterator object. Used for implementing copy semantics
-  // of ParamIterator<T>.
-  virtual ParamIteratorInterface* Clone() const = 0;
-  // Dereferences the current iterator and provides (read-only) access
-  // to the pointed value. It is the caller's responsibility not to call
-  // Current() on an iterator equal to BaseGenerator()->End().
-  // Used for implementing ParamGenerator<T>::operator*().
-  virtual const T* Current() const = 0;
-  // Determines whether the given iterator and other point to the same
-  // element in the sequence generated by the generator.
-  // Used for implementing ParamGenerator<T>::operator==().
-  virtual bool Equals(const ParamIteratorInterface& other) const = 0;
-};
-
-// Class iterating over elements provided by an implementation of
-// ParamGeneratorInterface<T>. It wraps ParamIteratorInterface<T>
-// and implements the const forward iterator concept.
-template <typename T>
-class ParamIterator {
- public:
-  typedef T value_type;
-  typedef const T& reference;
-  typedef ptrdiff_t difference_type;
-
-  // ParamIterator assumes ownership of the impl_ pointer.
-  ParamIterator(const ParamIterator& other) : impl_(other.impl_->Clone()) {}
-  ParamIterator& operator=(const ParamIterator& other) {
-    if (this != &other)
-      impl_.reset(other.impl_->Clone());
-    return *this;
-  }
-
-  const T& operator*() const { return *impl_->Current(); }
-  const T* operator->() const { return impl_->Current(); }
-  // Prefix version of operator++.
-  ParamIterator& operator++() {
-    impl_->Advance();
-    return *this;
-  }
-  // Postfix version of operator++.
-  ParamIterator operator++(int /*unused*/) {
-    ParamIteratorInterface<T>* clone = impl_->Clone();
-    impl_->Advance();
-    return ParamIterator(clone);
-  }
-  bool operator==(const ParamIterator& other) const {
-    return impl_.get() == other.impl_.get() || impl_->Equals(*other.impl_);
-  }
-  bool operator!=(const ParamIterator& other) const {
-    return !(*this == other);
-  }
-
- private:
-  friend class ParamGenerator<T>;
-  explicit ParamIterator(ParamIteratorInterface<T>* impl) : impl_(impl) {}
-  std::unique_ptr<ParamIteratorInterface<T> > impl_;
-};
-
-// ParamGeneratorInterface<T> is the binary interface to access generators
-// defined in other translation units.
-template <typename T>
-class ParamGeneratorInterface {
- public:
-  typedef T ParamType;
-
-  virtual ~ParamGeneratorInterface() {}
-
-  // Generator interface definition
-  virtual ParamIteratorInterface<T>* Begin() const = 0;
-  virtual ParamIteratorInterface<T>* End() const = 0;
-};
-
-// Wraps ParamGeneratorInterface<T> and provides general generator syntax
-// compatible with the STL Container concept.
-// This class implements copy initialization semantics and the contained
-// ParamGeneratorInterface<T> instance is shared among all copies
-// of the original object. This is possible because that instance is immutable.
-template<typename T>
-class ParamGenerator {
- public:
-  typedef ParamIterator<T> iterator;
-
-  explicit ParamGenerator(ParamGeneratorInterface<T>* impl) : impl_(impl) {}
-  ParamGenerator(const ParamGenerator& other) : impl_(other.impl_) {}
-
-  ParamGenerator& operator=(const ParamGenerator& other) {
-    impl_ = other.impl_;
-    return *this;
-  }
-
-  iterator begin() const { return iterator(impl_->Begin()); }
-  iterator end() const { return iterator(impl_->End()); }
-
- private:
-  std::shared_ptr<const ParamGeneratorInterface<T> > impl_;
-};
-
-// Generates values from a range of two comparable values. Can be used to
-// generate sequences of user-defined types that implement operator+() and
-// operator<().
-// This class is used in the Range() function.
-template <typename T, typename IncrementT>
-class RangeGenerator : public ParamGeneratorInterface<T> {
- public:
-  RangeGenerator(T begin, T end, IncrementT step)
-      : begin_(begin), end_(end),
-        step_(step), end_index_(CalculateEndIndex(begin, end, step)) {}
-  ~RangeGenerator() override {}
-
-  ParamIteratorInterface<T>* Begin() const override {
-    return new Iterator(this, begin_, 0, step_);
-  }
-  ParamIteratorInterface<T>* End() const override {
-    return new Iterator(this, end_, end_index_, step_);
-  }
-
- private:
-  class Iterator : public ParamIteratorInterface<T> {
-   public:
-    Iterator(const ParamGeneratorInterface<T>* base, T value, int index,
-             IncrementT step)
-        : base_(base), value_(value), index_(index), step_(step) {}
-    ~Iterator() override {}
-
-    const ParamGeneratorInterface<T>* BaseGenerator() const override {
-      return base_;
-    }
-    void Advance() override {
-      value_ = static_cast<T>(value_ + step_);
-      index_++;
-    }
-    ParamIteratorInterface<T>* Clone() const override {
-      return new Iterator(*this);
-    }
-    const T* Current() const override { return &value_; }
-    bool Equals(const ParamIteratorInterface<T>& other) const override {
-      // Having the same base generator guarantees that the other
-      // iterator is of the same type and we can downcast.
-      GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
-          << "The program attempted to compare iterators "
-          << "from different generators." << std::endl;
-      const int other_index =
-          CheckedDowncastToActualType<const Iterator>(&other)->index_;
-      return index_ == other_index;
-    }
-
-   private:
-    Iterator(const Iterator& other)
-        : ParamIteratorInterface<T>(),
-          base_(other.base_), value_(other.value_), index_(other.index_),
-          step_(other.step_) {}
-
-    // No implementation - assignment is unsupported.
-    void operator=(const Iterator& other);
-
-    const ParamGeneratorInterface<T>* const base_;
-    T value_;
-    int index_;
-    const IncrementT step_;
-  };  // class RangeGenerator::Iterator
-
-  static int CalculateEndIndex(const T& begin,
-                               const T& end,
-                               const IncrementT& step) {
-    int end_index = 0;
-    for (T i = begin; i < end; i = static_cast<T>(i + step))
-      end_index++;
-    return end_index;
-  }
-
-  // No implementation - assignment is unsupported.
-  void operator=(const RangeGenerator& other);
-
-  const T begin_;
-  const T end_;
-  const IncrementT step_;
-  // The index for the end() iterator. All the elements in the generated
-  // sequence are indexed (0-based) to aid iterator comparison.
-  const int end_index_;
-};  // class RangeGenerator
-
-
-// Generates values from a pair of STL-style iterators. Used in the
-// ValuesIn() function. The elements are copied from the source range
-// since the source can be located on the stack, and the generator
-// is likely to persist beyond that stack frame.
-template <typename T>
-class ValuesInIteratorRangeGenerator : public ParamGeneratorInterface<T> {
- public:
-  template <typename ForwardIterator>
-  ValuesInIteratorRangeGenerator(ForwardIterator begin, ForwardIterator end)
-      : container_(begin, end) {}
-  ~ValuesInIteratorRangeGenerator() override {}
-
-  ParamIteratorInterface<T>* Begin() const override {
-    return new Iterator(this, container_.begin());
-  }
-  ParamIteratorInterface<T>* End() const override {
-    return new Iterator(this, container_.end());
-  }
-
- private:
-  typedef typename ::std::vector<T> ContainerType;
-
-  class Iterator : public ParamIteratorInterface<T> {
-   public:
-    Iterator(const ParamGeneratorInterface<T>* base,
-             typename ContainerType::const_iterator iterator)
-        : base_(base), iterator_(iterator) {}
-    ~Iterator() override {}
-
-    const ParamGeneratorInterface<T>* BaseGenerator() const override {
-      return base_;
-    }
-    void Advance() override {
-      ++iterator_;
-      value_.reset();
-    }
-    ParamIteratorInterface<T>* Clone() const override {
-      return new Iterator(*this);
-    }
-    // We need to use cached value referenced by iterator_ because *iterator_
-    // can return a temporary object (and of type other then T), so just
-    // having "return &*iterator_;" doesn't work.
-    // value_ is updated here and not in Advance() because Advance()
-    // can advance iterator_ beyond the end of the range, and we cannot
-    // detect that fact. The client code, on the other hand, is
-    // responsible for not calling Current() on an out-of-range iterator.
-    const T* Current() const override {
-      if (value_.get() == nullptr) value_.reset(new T(*iterator_));
-      return value_.get();
-    }
-    bool Equals(const ParamIteratorInterface<T>& other) const override {
-      // Having the same base generator guarantees that the other
-      // iterator is of the same type and we can downcast.
-      GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
-          << "The program attempted to compare iterators "
-          << "from different generators." << std::endl;
-      return iterator_ ==
-          CheckedDowncastToActualType<const Iterator>(&other)->iterator_;
-    }
-
-   private:
-    Iterator(const Iterator& other)
-          // The explicit constructor call suppresses a false warning
-          // emitted by gcc when supplied with the -Wextra option.
-        : ParamIteratorInterface<T>(),
-          base_(other.base_),
-          iterator_(other.iterator_) {}
-
-    const ParamGeneratorInterface<T>* const base_;
-    typename ContainerType::const_iterator iterator_;
-    // A cached value of *iterator_. We keep it here to allow access by
-    // pointer in the wrapping iterator's operator->().
-    // value_ needs to be mutable to be accessed in Current().
-    // Use of std::unique_ptr helps manage cached value's lifetime,
-    // which is bound by the lifespan of the iterator itself.
-    mutable std::unique_ptr<const T> value_;
-  };  // class ValuesInIteratorRangeGenerator::Iterator
-
-  // No implementation - assignment is unsupported.
-  void operator=(const ValuesInIteratorRangeGenerator& other);
-
-  const ContainerType container_;
-};  // class ValuesInIteratorRangeGenerator
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// Default parameterized test name generator, returns a string containing the
-// integer test parameter index.
-template <class ParamType>
-std::string DefaultParamName(const TestParamInfo<ParamType>& info) {
-  Message name_stream;
-  name_stream << info.index;
-  return name_stream.GetString();
-}
-
-template <typename T = int>
-void TestNotEmpty() {
-  static_assert(sizeof(T) == 0, "Empty arguments are not allowed.");
-}
-template <typename T = int>
-void TestNotEmpty(const T&) {}
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// Stores a parameter value and later creates tests parameterized with that
-// value.
-template <class TestClass>
-class ParameterizedTestFactory : public TestFactoryBase {
- public:
-  typedef typename TestClass::ParamType ParamType;
-  explicit ParameterizedTestFactory(ParamType parameter) :
-      parameter_(parameter) {}
-  Test* CreateTest() override {
-    TestClass::SetParam(&parameter_);
-    return new TestClass();
-  }
-
- private:
-  const ParamType parameter_;
-
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestFactory);
-};
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// TestMetaFactoryBase is a base class for meta-factories that create
-// test factories for passing into MakeAndRegisterTestInfo function.
-template <class ParamType>
-class TestMetaFactoryBase {
- public:
-  virtual ~TestMetaFactoryBase() {}
-
-  virtual TestFactoryBase* CreateTestFactory(ParamType parameter) = 0;
-};
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// TestMetaFactory creates test factories for passing into
-// MakeAndRegisterTestInfo function. Since MakeAndRegisterTestInfo receives
-// ownership of test factory pointer, same factory object cannot be passed
-// into that method twice. But ParameterizedTestSuiteInfo is going to call
-// it for each Test/Parameter value combination. Thus it needs meta factory
-// creator class.
-template <class TestSuite>
-class TestMetaFactory
-    : public TestMetaFactoryBase<typename TestSuite::ParamType> {
- public:
-  using ParamType = typename TestSuite::ParamType;
-
-  TestMetaFactory() {}
-
-  TestFactoryBase* CreateTestFactory(ParamType parameter) override {
-    return new ParameterizedTestFactory<TestSuite>(parameter);
-  }
-
- private:
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(TestMetaFactory);
-};
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// ParameterizedTestSuiteInfoBase is a generic interface
-// to ParameterizedTestSuiteInfo classes. ParameterizedTestSuiteInfoBase
-// accumulates test information provided by TEST_P macro invocations
-// and generators provided by INSTANTIATE_TEST_SUITE_P macro invocations
-// and uses that information to register all resulting test instances
-// in RegisterTests method. The ParameterizeTestSuiteRegistry class holds
-// a collection of pointers to the ParameterizedTestSuiteInfo objects
-// and calls RegisterTests() on each of them when asked.
-class ParameterizedTestSuiteInfoBase {
- public:
-  virtual ~ParameterizedTestSuiteInfoBase() {}
-
-  // Base part of test suite name for display purposes.
-  virtual const std::string& GetTestSuiteName() const = 0;
-  // Test suite id to verify identity.
-  virtual TypeId GetTestSuiteTypeId() const = 0;
-  // UnitTest class invokes this method to register tests in this
-  // test suite right before running them in RUN_ALL_TESTS macro.
-  // This method should not be called more than once on any single
-  // instance of a ParameterizedTestSuiteInfoBase derived class.
-  virtual void RegisterTests() = 0;
-
- protected:
-  ParameterizedTestSuiteInfoBase() {}
-
- private:
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestSuiteInfoBase);
-};
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// Report a the name of a test_suit as safe to ignore
-// as the side effect of construction of this type.
-struct GTEST_API_ MarkAsIgnored {
-  explicit MarkAsIgnored(const char* test_suite);
-};
-
-GTEST_API_ void InsertSyntheticTestCase(const std::string& name,
-                                        CodeLocation location, bool has_test_p);
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// ParameterizedTestSuiteInfo accumulates tests obtained from TEST_P
-// macro invocations for a particular test suite and generators
-// obtained from INSTANTIATE_TEST_SUITE_P macro invocations for that
-// test suite. It registers tests with all values generated by all
-// generators when asked.
-template <class TestSuite>
-class ParameterizedTestSuiteInfo : public ParameterizedTestSuiteInfoBase {
- public:
-  // ParamType and GeneratorCreationFunc are private types but are required
-  // for declarations of public methods AddTestPattern() and
-  // AddTestSuiteInstantiation().
-  using ParamType = typename TestSuite::ParamType;
-  // A function that returns an instance of appropriate generator type.
-  typedef ParamGenerator<ParamType>(GeneratorCreationFunc)();
-  using ParamNameGeneratorFunc = std::string(const TestParamInfo<ParamType>&);
-
-  explicit ParameterizedTestSuiteInfo(const char* name,
-                                      CodeLocation code_location)
-      : test_suite_name_(name), code_location_(code_location) {}
-
-  // Test suite base name for display purposes.
-  const std::string& GetTestSuiteName() const override {
-    return test_suite_name_;
-  }
-  // Test suite id to verify identity.
-  TypeId GetTestSuiteTypeId() const override { return GetTypeId<TestSuite>(); }
-  // TEST_P macro uses AddTestPattern() to record information
-  // about a single test in a LocalTestInfo structure.
-  // test_suite_name is the base name of the test suite (without invocation
-  // prefix). test_base_name is the name of an individual test without
-  // parameter index. For the test SequenceA/FooTest.DoBar/1 FooTest is
-  // test suite base name and DoBar is test base name.
-  void AddTestPattern(const char* test_suite_name, const char* test_base_name,
-                      TestMetaFactoryBase<ParamType>* meta_factory,
-                      CodeLocation code_location) {
-    tests_.push_back(std::shared_ptr<TestInfo>(new TestInfo(
-        test_suite_name, test_base_name, meta_factory, code_location)));
-  }
-  // INSTANTIATE_TEST_SUITE_P macro uses AddGenerator() to record information
-  // about a generator.
-  int AddTestSuiteInstantiation(const std::string& instantiation_name,
-                                GeneratorCreationFunc* func,
-                                ParamNameGeneratorFunc* name_func,
-                                const char* file, int line) {
-    instantiations_.push_back(
-        InstantiationInfo(instantiation_name, func, name_func, file, line));
-    return 0;  // Return value used only to run this method in namespace scope.
-  }
-  // UnitTest class invokes this method to register tests in this test suite
-  // right before running tests in RUN_ALL_TESTS macro.
-  // This method should not be called more than once on any single
-  // instance of a ParameterizedTestSuiteInfoBase derived class.
-  // UnitTest has a guard to prevent from calling this method more than once.
-  void RegisterTests() override {
-    bool generated_instantiations = false;
-
-    for (typename TestInfoContainer::iterator test_it = tests_.begin();
-         test_it != tests_.end(); ++test_it) {
-      std::shared_ptr<TestInfo> test_info = *test_it;
-      for (typename InstantiationContainer::iterator gen_it =
-               instantiations_.begin(); gen_it != instantiations_.end();
-               ++gen_it) {
-        const std::string& instantiation_name = gen_it->name;
-        ParamGenerator<ParamType> generator((*gen_it->generator)());
-        ParamNameGeneratorFunc* name_func = gen_it->name_func;
-        const char* file = gen_it->file;
-        int line = gen_it->line;
-
-        std::string test_suite_name;
-        if ( !instantiation_name.empty() )
-          test_suite_name = instantiation_name + "/";
-        test_suite_name += test_info->test_suite_base_name;
-
-        size_t i = 0;
-        std::set<std::string> test_param_names;
-        for (typename ParamGenerator<ParamType>::iterator param_it =
-                 generator.begin();
-             param_it != generator.end(); ++param_it, ++i) {
-          generated_instantiations = true;
-
-          Message test_name_stream;
-
-          std::string param_name = name_func(
-              TestParamInfo<ParamType>(*param_it, i));
-
-          GTEST_CHECK_(IsValidParamName(param_name))
-              << "Parameterized test name '" << param_name
-              << "' is invalid, in " << file
-              << " line " << line << std::endl;
-
-          GTEST_CHECK_(test_param_names.count(param_name) == 0)
-              << "Duplicate parameterized test name '" << param_name
-              << "', in " << file << " line " << line << std::endl;
-
-          test_param_names.insert(param_name);
-
-          if (!test_info->test_base_name.empty()) {
-            test_name_stream << test_info->test_base_name << "/";
-          }
-          test_name_stream << param_name;
-          MakeAndRegisterTestInfo(
-              test_suite_name.c_str(), test_name_stream.GetString().c_str(),
-              nullptr,  // No type parameter.
-              PrintToString(*param_it).c_str(), test_info->code_location,
-              GetTestSuiteTypeId(),
-              SuiteApiResolver<TestSuite>::GetSetUpCaseOrSuite(file, line),
-              SuiteApiResolver<TestSuite>::GetTearDownCaseOrSuite(file, line),
-              test_info->test_meta_factory->CreateTestFactory(*param_it));
-        }  // for param_it
-      }  // for gen_it
-    }  // for test_it
-
-    if (!generated_instantiations) {
-      // There are no generaotrs, or they all generate nothing ...
-      InsertSyntheticTestCase(GetTestSuiteName(), code_location_,
-                              !tests_.empty());
-    }
-  }    // RegisterTests
-
- private:
-  // LocalTestInfo structure keeps information about a single test registered
-  // with TEST_P macro.
-  struct TestInfo {
-    TestInfo(const char* a_test_suite_base_name, const char* a_test_base_name,
-             TestMetaFactoryBase<ParamType>* a_test_meta_factory,
-             CodeLocation a_code_location)
-        : test_suite_base_name(a_test_suite_base_name),
-          test_base_name(a_test_base_name),
-          test_meta_factory(a_test_meta_factory),
-          code_location(a_code_location) {}
-
-    const std::string test_suite_base_name;
-    const std::string test_base_name;
-    const std::unique_ptr<TestMetaFactoryBase<ParamType> > test_meta_factory;
-    const CodeLocation code_location;
-  };
-  using TestInfoContainer = ::std::vector<std::shared_ptr<TestInfo> >;
-  // Records data received from INSTANTIATE_TEST_SUITE_P macros:
-  //  <Instantiation name, Sequence generator creation function,
-  //     Name generator function, Source file, Source line>
-  struct InstantiationInfo {
-      InstantiationInfo(const std::string &name_in,
-                        GeneratorCreationFunc* generator_in,
-                        ParamNameGeneratorFunc* name_func_in,
-                        const char* file_in,
-                        int line_in)
-          : name(name_in),
-            generator(generator_in),
-            name_func(name_func_in),
-            file(file_in),
-            line(line_in) {}
-
-      std::string name;
-      GeneratorCreationFunc* generator;
-      ParamNameGeneratorFunc* name_func;
-      const char* file;
-      int line;
-  };
-  typedef ::std::vector<InstantiationInfo> InstantiationContainer;
-
-  static bool IsValidParamName(const std::string& name) {
-    // Check for empty string
-    if (name.empty())
-      return false;
-
-    // Check for invalid characters
-    for (std::string::size_type index = 0; index < name.size(); ++index) {
-      if (!IsAlNum(name[index]) && name[index] != '_')
-        return false;
-    }
-
-    return true;
-  }
-
-  const std::string test_suite_name_;
-  CodeLocation code_location_;
-  TestInfoContainer tests_;
-  InstantiationContainer instantiations_;
-
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestSuiteInfo);
-};  // class ParameterizedTestSuiteInfo
-
-//  Legacy API is deprecated but still available
-#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-template <class TestCase>
-using ParameterizedTestCaseInfo = ParameterizedTestSuiteInfo<TestCase>;
-#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// ParameterizedTestSuiteRegistry contains a map of
-// ParameterizedTestSuiteInfoBase classes accessed by test suite names. TEST_P
-// and INSTANTIATE_TEST_SUITE_P macros use it to locate their corresponding
-// ParameterizedTestSuiteInfo descriptors.
-class ParameterizedTestSuiteRegistry {
- public:
-  ParameterizedTestSuiteRegistry() {}
-  ~ParameterizedTestSuiteRegistry() {
-    for (auto& test_suite_info : test_suite_infos_) {
-      delete test_suite_info;
-    }
-  }
-
-  // Looks up or creates and returns a structure containing information about
-  // tests and instantiations of a particular test suite.
-  template <class TestSuite>
-  ParameterizedTestSuiteInfo<TestSuite>* GetTestSuitePatternHolder(
-      const char* test_suite_name, CodeLocation code_location) {
-    ParameterizedTestSuiteInfo<TestSuite>* typed_test_info = nullptr;
-    for (auto& test_suite_info : test_suite_infos_) {
-      if (test_suite_info->GetTestSuiteName() == test_suite_name) {
-        if (test_suite_info->GetTestSuiteTypeId() != GetTypeId<TestSuite>()) {
-          // Complain about incorrect usage of Google Test facilities
-          // and terminate the program since we cannot guaranty correct
-          // test suite setup and tear-down in this case.
-          ReportInvalidTestSuiteType(test_suite_name, code_location);
-          posix::Abort();
-        } else {
-          // At this point we are sure that the object we found is of the same
-          // type we are looking for, so we downcast it to that type
-          // without further checks.
-          typed_test_info = CheckedDowncastToActualType<
-              ParameterizedTestSuiteInfo<TestSuite> >(test_suite_info);
-        }
-        break;
-      }
-    }
-    if (typed_test_info == nullptr) {
-      typed_test_info = new ParameterizedTestSuiteInfo<TestSuite>(
-          test_suite_name, code_location);
-      test_suite_infos_.push_back(typed_test_info);
-    }
-    return typed_test_info;
-  }
-  void RegisterTests() {
-    for (auto& test_suite_info : test_suite_infos_) {
-      test_suite_info->RegisterTests();
-    }
-  }
-//  Legacy API is deprecated but still available
-#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-  template <class TestCase>
-  ParameterizedTestCaseInfo<TestCase>* GetTestCasePatternHolder(
-      const char* test_case_name, CodeLocation code_location) {
-    return GetTestSuitePatternHolder<TestCase>(test_case_name, code_location);
-  }
-
-#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-
- private:
-  using TestSuiteInfoContainer = ::std::vector<ParameterizedTestSuiteInfoBase*>;
-
-  TestSuiteInfoContainer test_suite_infos_;
-
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(ParameterizedTestSuiteRegistry);
-};
-
-// Keep track of what type-parameterized test suite are defined and
-// where as well as which are intatiated. This allows susequently
-// identifying suits that are defined but never used.
-class TypeParameterizedTestSuiteRegistry {
- public:
-  // Add a suite definition
-  void RegisterTestSuite(const char* test_suite_name,
-                         CodeLocation code_location);
-
-  // Add an instantiation of a suit.
-  void RegisterInstantiation(const char* test_suite_name);
-
-  // For each suit repored as defined but not reported as instantiation,
-  // emit a test that reports that fact (configurably, as an error).
-  void CheckForInstantiations();
-
- private:
-  struct TypeParameterizedTestSuiteInfo {
-    explicit TypeParameterizedTestSuiteInfo(CodeLocation c)
-        : code_location(c), instantiated(false) {}
-
-    CodeLocation code_location;
-    bool instantiated;
-  };
-
-  std::map<std::string, TypeParameterizedTestSuiteInfo> suites_;
-};
-
-}  // namespace internal
-
-// Forward declarations of ValuesIn(), which is implemented in
-// include/gtest/gtest-param-test.h.
-template <class Container>
-internal::ParamGenerator<typename Container::value_type> ValuesIn(
-    const Container& container);
-
-namespace internal {
-// Used in the Values() function to provide polymorphic capabilities.
-
-#ifdef _MSC_VER
-#pragma warning(push)
-#pragma warning(disable : 4100)
-#endif
-
-template <typename... Ts>
-class ValueArray {
- public:
-  explicit ValueArray(Ts... v) : v_(FlatTupleConstructTag{}, std::move(v)...) {}
-
-  template <typename T>
-  operator ParamGenerator<T>() const {  // NOLINT
-    return ValuesIn(MakeVector<T>(MakeIndexSequence<sizeof...(Ts)>()));
-  }
-
- private:
-  template <typename T, size_t... I>
-  std::vector<T> MakeVector(IndexSequence<I...>) const {
-    return std::vector<T>{static_cast<T>(v_.template Get<I>())...};
-  }
-
-  FlatTuple<Ts...> v_;
-};
-
-#ifdef _MSC_VER
-#pragma warning(pop)
-#endif
-
-template <typename... T>
-class CartesianProductGenerator
-    : public ParamGeneratorInterface<::std::tuple<T...>> {
- public:
-  typedef ::std::tuple<T...> ParamType;
-
-  CartesianProductGenerator(const std::tuple<ParamGenerator<T>...>& g)
-      : generators_(g) {}
-  ~CartesianProductGenerator() override {}
-
-  ParamIteratorInterface<ParamType>* Begin() const override {
-    return new Iterator(this, generators_, false);
-  }
-  ParamIteratorInterface<ParamType>* End() const override {
-    return new Iterator(this, generators_, true);
-  }
-
- private:
-  template <class I>
-  class IteratorImpl;
-  template <size_t... I>
-  class IteratorImpl<IndexSequence<I...>>
-      : public ParamIteratorInterface<ParamType> {
-   public:
-    IteratorImpl(const ParamGeneratorInterface<ParamType>* base,
-             const std::tuple<ParamGenerator<T>...>& generators, bool is_end)
-        : base_(base),
-          begin_(std::get<I>(generators).begin()...),
-          end_(std::get<I>(generators).end()...),
-          current_(is_end ? end_ : begin_) {
-      ComputeCurrentValue();
-    }
-    ~IteratorImpl() override {}
-
-    const ParamGeneratorInterface<ParamType>* BaseGenerator() const override {
-      return base_;
-    }
-    // Advance should not be called on beyond-of-range iterators
-    // so no component iterators must be beyond end of range, either.
-    void Advance() override {
-      assert(!AtEnd());
-      // Advance the last iterator.
-      ++std::get<sizeof...(T) - 1>(current_);
-      // if that reaches end, propagate that up.
-      AdvanceIfEnd<sizeof...(T) - 1>();
-      ComputeCurrentValue();
-    }
-    ParamIteratorInterface<ParamType>* Clone() const override {
-      return new IteratorImpl(*this);
-    }
-
-    const ParamType* Current() const override { return current_value_.get(); }
-
-    bool Equals(const ParamIteratorInterface<ParamType>& other) const override {
-      // Having the same base generator guarantees that the other
-      // iterator is of the same type and we can downcast.
-      GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
-          << "The program attempted to compare iterators "
-          << "from different generators." << std::endl;
-      const IteratorImpl* typed_other =
-          CheckedDowncastToActualType<const IteratorImpl>(&other);
-
-      // We must report iterators equal if they both point beyond their
-      // respective ranges. That can happen in a variety of fashions,
-      // so we have to consult AtEnd().
-      if (AtEnd() && typed_other->AtEnd()) return true;
-
-      bool same = true;
-      bool dummy[] = {
-          (same = same && std::get<I>(current_) ==
-                              std::get<I>(typed_other->current_))...};
-      (void)dummy;
-      return same;
-    }
-
-   private:
-    template <size_t ThisI>
-    void AdvanceIfEnd() {
-      if (std::get<ThisI>(current_) != std::get<ThisI>(end_)) return;
-
-      bool last = ThisI == 0;
-      if (last) {
-        // We are done. Nothing else to propagate.
-        return;
-      }
-
-      constexpr size_t NextI = ThisI - (ThisI != 0);
-      std::get<ThisI>(current_) = std::get<ThisI>(begin_);
-      ++std::get<NextI>(current_);
-      AdvanceIfEnd<NextI>();
-    }
-
-    void ComputeCurrentValue() {
-      if (!AtEnd())
-        current_value_ = std::make_shared<ParamType>(*std::get<I>(current_)...);
-    }
-    bool AtEnd() const {
-      bool at_end = false;
-      bool dummy[] = {
-          (at_end = at_end || std::get<I>(current_) == std::get<I>(end_))...};
-      (void)dummy;
-      return at_end;
-    }
-
-    const ParamGeneratorInterface<ParamType>* const base_;
-    std::tuple<typename ParamGenerator<T>::iterator...> begin_;
-    std::tuple<typename ParamGenerator<T>::iterator...> end_;
-    std::tuple<typename ParamGenerator<T>::iterator...> current_;
-    std::shared_ptr<ParamType> current_value_;
-  };
-
-  using Iterator = IteratorImpl<typename MakeIndexSequence<sizeof...(T)>::type>;
-
-  std::tuple<ParamGenerator<T>...> generators_;
-};
-
-template <class... Gen>
-class CartesianProductHolder {
- public:
-  CartesianProductHolder(const Gen&... g) : generators_(g...) {}
-  template <typename... T>
-  operator ParamGenerator<::std::tuple<T...>>() const {
-    return ParamGenerator<::std::tuple<T...>>(
-        new CartesianProductGenerator<T...>(generators_));
-  }
-
- private:
-  std::tuple<Gen...> generators_;
-};
-
-}  // namespace internal
-}  // namespace testing
-
-#endif  // GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_
diff --git a/src/include/gromacs/external/googletest/googletest/include/gtest/internal/gtest-port-arch.h b/src/include/gromacs/external/googletest/googletest/include/gtest/internal/gtest-port-arch.h
deleted file mode 100644 (file)
index 4dcdc89..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-// Copyright 2015, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// The Google C++ Testing and Mocking Framework (Google Test)
-//
-// This header file defines the GTEST_OS_* macro.
-// It is separate from gtest-port.h so that custom/gtest-port.h can include it.
-
-#ifndef GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_ARCH_H_
-#define GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_ARCH_H_
-
-// Determines the platform on which Google Test is compiled.
-#ifdef __CYGWIN__
-# define GTEST_OS_CYGWIN 1
-# elif defined(__MINGW__) || defined(__MINGW32__) || defined(__MINGW64__)
-#  define GTEST_OS_WINDOWS_MINGW 1
-#  define GTEST_OS_WINDOWS 1
-#elif defined _WIN32
-# define GTEST_OS_WINDOWS 1
-# ifdef _WIN32_WCE
-#  define GTEST_OS_WINDOWS_MOBILE 1
-# elif defined(WINAPI_FAMILY)
-#  include <winapifamily.h>
-#  if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
-#   define GTEST_OS_WINDOWS_DESKTOP 1
-#  elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PHONE_APP)
-#   define GTEST_OS_WINDOWS_PHONE 1
-#  elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
-#   define GTEST_OS_WINDOWS_RT 1
-#  elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_TV_TITLE)
-#   define GTEST_OS_WINDOWS_PHONE 1
-#   define GTEST_OS_WINDOWS_TV_TITLE 1
-#  else
-    // WINAPI_FAMILY defined but no known partition matched.
-    // Default to desktop.
-#   define GTEST_OS_WINDOWS_DESKTOP 1
-#  endif
-# else
-#  define GTEST_OS_WINDOWS_DESKTOP 1
-# endif  // _WIN32_WCE
-#elif defined __OS2__
-# define GTEST_OS_OS2 1
-#elif defined __APPLE__
-# define GTEST_OS_MAC 1
-# include <TargetConditionals.h>
-# if TARGET_OS_IPHONE
-#  define GTEST_OS_IOS 1
-# endif
-#elif defined __DragonFly__
-# define GTEST_OS_DRAGONFLY 1
-#elif defined __FreeBSD__
-# define GTEST_OS_FREEBSD 1
-#elif defined __Fuchsia__
-# define GTEST_OS_FUCHSIA 1
-#elif defined(__GNU__)
-# define GTEST_OS_GNU_HURD 1
-#elif defined(__GLIBC__) && defined(__FreeBSD_kernel__)
-# define GTEST_OS_GNU_KFREEBSD 1
-#elif defined __linux__
-# define GTEST_OS_LINUX 1
-# if defined __ANDROID__
-#  define GTEST_OS_LINUX_ANDROID 1
-# endif
-#elif defined __MVS__
-# define GTEST_OS_ZOS 1
-#elif defined(__sun) && defined(__SVR4)
-# define GTEST_OS_SOLARIS 1
-#elif defined(_AIX)
-# define GTEST_OS_AIX 1
-#elif defined(__hpux)
-# define GTEST_OS_HPUX 1
-#elif defined __native_client__
-# define GTEST_OS_NACL 1
-#elif defined __NetBSD__
-# define GTEST_OS_NETBSD 1
-#elif defined __OpenBSD__
-# define GTEST_OS_OPENBSD 1
-#elif defined __QNX__
-# define GTEST_OS_QNX 1
-#elif defined(__HAIKU__)
-#define GTEST_OS_HAIKU 1
-#elif defined ESP8266
-#define GTEST_OS_ESP8266 1
-#elif defined ESP32
-#define GTEST_OS_ESP32 1
-#elif defined(__XTENSA__)
-#define GTEST_OS_XTENSA 1
-#endif  // __CYGWIN__
-
-#endif  // GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_ARCH_H_
diff --git a/src/include/gromacs/external/googletest/googletest/include/gtest/internal/gtest-port.h b/src/include/gromacs/external/googletest/googletest/include/gtest/internal/gtest-port.h
deleted file mode 100644 (file)
index bfa2a4b..0000000
+++ /dev/null
@@ -1,2406 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Low-level types and utilities for porting Google Test to various
-// platforms.  All macros ending with _ and symbols defined in an
-// internal namespace are subject to change without notice.  Code
-// outside Google Test MUST NOT USE THEM DIRECTLY.  Macros that don't
-// end with _ are part of Google Test's public API and can be used by
-// code outside Google Test.
-//
-// This file is fundamental to Google Test.  All other Google Test source
-// files are expected to #include this.  Therefore, it cannot #include
-// any other Google Test header.
-
-#ifndef GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
-#define GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
-
-// Environment-describing macros
-// -----------------------------
-//
-// Google Test can be used in many different environments.  Macros in
-// this section tell Google Test what kind of environment it is being
-// used in, such that Google Test can provide environment-specific
-// features and implementations.
-//
-// Google Test tries to automatically detect the properties of its
-// environment, so users usually don't need to worry about these
-// macros.  However, the automatic detection is not perfect.
-// Sometimes it's necessary for a user to define some of the following
-// macros in the build script to override Google Test's decisions.
-//
-// If the user doesn't define a macro in the list, Google Test will
-// provide a default definition.  After this header is #included, all
-// macros in this list will be defined to either 1 or 0.
-//
-// Notes to maintainers:
-//   - Each macro here is a user-tweakable knob; do not grow the list
-//     lightly.
-//   - Use #if to key off these macros.  Don't use #ifdef or "#if
-//     defined(...)", which will not work as these macros are ALWAYS
-//     defined.
-//
-//   GTEST_HAS_CLONE          - Define it to 1/0 to indicate that clone(2)
-//                              is/isn't available.
-//   GTEST_HAS_EXCEPTIONS     - Define it to 1/0 to indicate that exceptions
-//                              are enabled.
-//   GTEST_HAS_POSIX_RE       - Define it to 1/0 to indicate that POSIX regular
-//                              expressions are/aren't available.
-//   GTEST_HAS_PTHREAD        - Define it to 1/0 to indicate that <pthread.h>
-//                              is/isn't available.
-//   GTEST_HAS_RTTI           - Define it to 1/0 to indicate that RTTI is/isn't
-//                              enabled.
-//   GTEST_HAS_STD_WSTRING    - Define it to 1/0 to indicate that
-//                              std::wstring does/doesn't work (Google Test can
-//                              be used where std::wstring is unavailable).
-//   GTEST_HAS_SEH            - Define it to 1/0 to indicate whether the
-//                              compiler supports Microsoft's "Structured
-//                              Exception Handling".
-//   GTEST_HAS_STREAM_REDIRECTION
-//                            - Define it to 1/0 to indicate whether the
-//                              platform supports I/O stream redirection using
-//                              dup() and dup2().
-//   GTEST_LINKED_AS_SHARED_LIBRARY
-//                            - Define to 1 when compiling tests that use
-//                              Google Test as a shared library (known as
-//                              DLL on Windows).
-//   GTEST_CREATE_SHARED_LIBRARY
-//                            - Define to 1 when compiling Google Test itself
-//                              as a shared library.
-//   GTEST_DEFAULT_DEATH_TEST_STYLE
-//                            - The default value of --gtest_death_test_style.
-//                              The legacy default has been "fast" in the open
-//                              source version since 2008. The recommended value
-//                              is "threadsafe", and can be set in
-//                              custom/gtest-port.h.
-
-// Platform-indicating macros
-// --------------------------
-//
-// Macros indicating the platform on which Google Test is being used
-// (a macro is defined to 1 if compiled on the given platform;
-// otherwise UNDEFINED -- it's never defined to 0.).  Google Test
-// defines these macros automatically.  Code outside Google Test MUST
-// NOT define them.
-//
-//   GTEST_OS_AIX      - IBM AIX
-//   GTEST_OS_CYGWIN   - Cygwin
-//   GTEST_OS_DRAGONFLY - DragonFlyBSD
-//   GTEST_OS_FREEBSD  - FreeBSD
-//   GTEST_OS_FUCHSIA  - Fuchsia
-//   GTEST_OS_GNU_HURD - GNU/Hurd
-//   GTEST_OS_GNU_KFREEBSD - GNU/kFreeBSD
-//   GTEST_OS_HAIKU    - Haiku
-//   GTEST_OS_HPUX     - HP-UX
-//   GTEST_OS_LINUX    - Linux
-//     GTEST_OS_LINUX_ANDROID - Google Android
-//   GTEST_OS_MAC      - Mac OS X
-//     GTEST_OS_IOS    - iOS
-//   GTEST_OS_NACL     - Google Native Client (NaCl)
-//   GTEST_OS_NETBSD   - NetBSD
-//   GTEST_OS_OPENBSD  - OpenBSD
-//   GTEST_OS_OS2      - OS/2
-//   GTEST_OS_QNX      - QNX
-//   GTEST_OS_SOLARIS  - Sun Solaris
-//   GTEST_OS_WINDOWS  - Windows (Desktop, MinGW, or Mobile)
-//     GTEST_OS_WINDOWS_DESKTOP  - Windows Desktop
-//     GTEST_OS_WINDOWS_MINGW    - MinGW
-//     GTEST_OS_WINDOWS_MOBILE   - Windows Mobile
-//     GTEST_OS_WINDOWS_PHONE    - Windows Phone
-//     GTEST_OS_WINDOWS_RT       - Windows Store App/WinRT
-//   GTEST_OS_ZOS      - z/OS
-//
-// Among the platforms, Cygwin, Linux, Mac OS X, and Windows have the
-// most stable support.  Since core members of the Google Test project
-// don't have access to other platforms, support for them may be less
-// stable.  If you notice any problems on your platform, please notify
-// googletestframework@googlegroups.com (patches for fixing them are
-// even more welcome!).
-//
-// It is possible that none of the GTEST_OS_* macros are defined.
-
-// Feature-indicating macros
-// -------------------------
-//
-// Macros indicating which Google Test features are available (a macro
-// is defined to 1 if the corresponding feature is supported;
-// otherwise UNDEFINED -- it's never defined to 0.).  Google Test
-// defines these macros automatically.  Code outside Google Test MUST
-// NOT define them.
-//
-// These macros are public so that portable tests can be written.
-// Such tests typically surround code using a feature with an #if
-// which controls that code.  For example:
-//
-// #if GTEST_HAS_DEATH_TEST
-//   EXPECT_DEATH(DoSomethingDeadly());
-// #endif
-//
-//   GTEST_HAS_DEATH_TEST   - death tests
-//   GTEST_HAS_TYPED_TEST   - typed tests
-//   GTEST_HAS_TYPED_TEST_P - type-parameterized tests
-//   GTEST_IS_THREADSAFE    - Google Test is thread-safe.
-//   GTEST_USES_POSIX_RE    - enhanced POSIX regex is used. Do not confuse with
-//                            GTEST_HAS_POSIX_RE (see above) which users can
-//                            define themselves.
-//   GTEST_USES_SIMPLE_RE   - our own simple regex is used;
-//                            the above RE\b(s) are mutually exclusive.
-
-// Misc public macros
-// ------------------
-//
-//   GTEST_FLAG(flag_name)  - references the variable corresponding to
-//                            the given Google Test flag.
-
-// Internal utilities
-// ------------------
-//
-// The following macros and utilities are for Google Test's INTERNAL
-// use only.  Code outside Google Test MUST NOT USE THEM DIRECTLY.
-//
-// Macros for basic C++ coding:
-//   GTEST_AMBIGUOUS_ELSE_BLOCKER_ - for disabling a gcc warning.
-//   GTEST_ATTRIBUTE_UNUSED_  - declares that a class' instances or a
-//                              variable don't have to be used.
-//   GTEST_DISALLOW_ASSIGN_   - disables copy operator=.
-//   GTEST_DISALLOW_COPY_AND_ASSIGN_ - disables copy ctor and operator=.
-//   GTEST_DISALLOW_MOVE_ASSIGN_   - disables move operator=.
-//   GTEST_DISALLOW_MOVE_AND_ASSIGN_ - disables move ctor and operator=.
-//   GTEST_MUST_USE_RESULT_   - declares that a function's result must be used.
-//   GTEST_INTENTIONAL_CONST_COND_PUSH_ - start code section where MSVC C4127 is
-//                                        suppressed (constant conditional).
-//   GTEST_INTENTIONAL_CONST_COND_POP_  - finish code section where MSVC C4127
-//                                        is suppressed.
-//   GTEST_INTERNAL_HAS_ANY - for enabling UniversalPrinter<std::any> or
-//                            UniversalPrinter<absl::any> specializations.
-//   GTEST_INTERNAL_HAS_OPTIONAL - for enabling UniversalPrinter<std::optional>
-//   or
-//                                 UniversalPrinter<absl::optional>
-//                                 specializations.
-//   GTEST_INTERNAL_HAS_STRING_VIEW - for enabling Matcher<std::string_view> or
-//                                    Matcher<absl::string_view>
-//                                    specializations.
-//   GTEST_INTERNAL_HAS_VARIANT - for enabling UniversalPrinter<std::variant> or
-//                                UniversalPrinter<absl::variant>
-//                                specializations.
-//
-// Synchronization:
-//   Mutex, MutexLock, ThreadLocal, GetThreadCount()
-//                            - synchronization primitives.
-//
-// Regular expressions:
-//   RE             - a simple regular expression class using the POSIX
-//                    Extended Regular Expression syntax on UNIX-like platforms
-//                    or a reduced regular exception syntax on other
-//                    platforms, including Windows.
-// Logging:
-//   GTEST_LOG_()   - logs messages at the specified severity level.
-//   LogToStderr()  - directs all log messages to stderr.
-//   FlushInfoLog() - flushes informational log messages.
-//
-// Stdout and stderr capturing:
-//   CaptureStdout()     - starts capturing stdout.
-//   GetCapturedStdout() - stops capturing stdout and returns the captured
-//                         string.
-//   CaptureStderr()     - starts capturing stderr.
-//   GetCapturedStderr() - stops capturing stderr and returns the captured
-//                         string.
-//
-// Integer types:
-//   TypeWithSize   - maps an integer to a int type.
-//   TimeInMillis   - integers of known sizes.
-//   BiggestInt     - the biggest signed integer type.
-//
-// Command-line utilities:
-//   GTEST_DECLARE_*()  - declares a flag.
-//   GTEST_DEFINE_*()   - defines a flag.
-//   GetInjectableArgvs() - returns the command line as a vector of strings.
-//
-// Environment variable utilities:
-//   GetEnv()             - gets the value of an environment variable.
-//   BoolFromGTestEnv()   - parses a bool environment variable.
-//   Int32FromGTestEnv()  - parses an int32_t environment variable.
-//   StringFromGTestEnv() - parses a string environment variable.
-//
-// Deprecation warnings:
-//   GTEST_INTERNAL_DEPRECATED(message) - attribute marking a function as
-//                                        deprecated; calling a marked function
-//                                        should generate a compiler warning
-
-#include <ctype.h>   // for isspace, etc
-#include <stddef.h>  // for ptrdiff_t
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <cerrno>
-#include <cstdint>
-#include <limits>
-#include <type_traits>
-
-#ifndef _WIN32_WCE
-# include <sys/types.h>
-# include <sys/stat.h>
-#endif  // !_WIN32_WCE
-
-#if defined __APPLE__
-# include <AvailabilityMacros.h>
-# include <TargetConditionals.h>
-#endif
-
-#include <iostream>  // NOLINT
-#include <locale>
-#include <memory>
-#include <string>  // NOLINT
-#include <tuple>
-#include <vector>  // NOLINT
-
-#include "gtest/internal/custom/gtest-port.h"
-#include "gtest/internal/gtest-port-arch.h"
-
-#if !defined(GTEST_DEV_EMAIL_)
-# define GTEST_DEV_EMAIL_ "googletestframework@@googlegroups.com"
-# define GTEST_FLAG_PREFIX_ "gtest_"
-# define GTEST_FLAG_PREFIX_DASH_ "gtest-"
-# define GTEST_FLAG_PREFIX_UPPER_ "GTEST_"
-# define GTEST_NAME_ "Google Test"
-# define GTEST_PROJECT_URL_ "https://github.com/google/googletest/"
-#endif  // !defined(GTEST_DEV_EMAIL_)
-
-#if !defined(GTEST_INIT_GOOGLE_TEST_NAME_)
-# define GTEST_INIT_GOOGLE_TEST_NAME_ "testing::InitGoogleTest"
-#endif  // !defined(GTEST_INIT_GOOGLE_TEST_NAME_)
-
-// Determines the version of gcc that is used to compile this.
-#ifdef __GNUC__
-// 40302 means version 4.3.2.
-# define GTEST_GCC_VER_ \
-    (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__)
-#endif  // __GNUC__
-
-// Macros for disabling Microsoft Visual C++ warnings.
-//
-//   GTEST_DISABLE_MSC_WARNINGS_PUSH_(4800 4385)
-//   /* code that triggers warnings C4800 and C4385 */
-//   GTEST_DISABLE_MSC_WARNINGS_POP_()
-#if defined(_MSC_VER)
-# define GTEST_DISABLE_MSC_WARNINGS_PUSH_(warnings) \
-    __pragma(warning(push))                        \
-    __pragma(warning(disable: warnings))
-# define GTEST_DISABLE_MSC_WARNINGS_POP_()          \
-    __pragma(warning(pop))
-#else
-// Not all compilers are MSVC
-# define GTEST_DISABLE_MSC_WARNINGS_PUSH_(warnings)
-# define GTEST_DISABLE_MSC_WARNINGS_POP_()
-#endif
-
-// Clang on Windows does not understand MSVC's pragma warning.
-// We need clang-specific way to disable function deprecation warning.
-#ifdef __clang__
-# define GTEST_DISABLE_MSC_DEPRECATED_PUSH_()                         \
-    _Pragma("clang diagnostic push")                                  \
-    _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"") \
-    _Pragma("clang diagnostic ignored \"-Wdeprecated-implementations\"")
-#define GTEST_DISABLE_MSC_DEPRECATED_POP_() \
-    _Pragma("clang diagnostic pop")
-#else
-# define GTEST_DISABLE_MSC_DEPRECATED_PUSH_() \
-    GTEST_DISABLE_MSC_WARNINGS_PUSH_(4996)
-# define GTEST_DISABLE_MSC_DEPRECATED_POP_() \
-    GTEST_DISABLE_MSC_WARNINGS_POP_()
-#endif
-
-// Brings in definitions for functions used in the testing::internal::posix
-// namespace (read, write, close, chdir, isatty, stat). We do not currently
-// use them on Windows Mobile.
-#if GTEST_OS_WINDOWS
-# if !GTEST_OS_WINDOWS_MOBILE
-#  include <direct.h>
-#  include <io.h>
-# endif
-// In order to avoid having to include <windows.h>, use forward declaration
-#if GTEST_OS_WINDOWS_MINGW && !defined(__MINGW64_VERSION_MAJOR)
-// MinGW defined _CRITICAL_SECTION and _RTL_CRITICAL_SECTION as two
-// separate (equivalent) structs, instead of using typedef
-typedef struct _CRITICAL_SECTION GTEST_CRITICAL_SECTION;
-#else
-// Assume CRITICAL_SECTION is a typedef of _RTL_CRITICAL_SECTION.
-// This assumption is verified by
-// WindowsTypesTest.CRITICAL_SECTIONIs_RTL_CRITICAL_SECTION.
-typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
-#endif
-#elif GTEST_OS_XTENSA
-#include <unistd.h>
-// Xtensa toolchains define strcasecmp in the string.h header instead of
-// strings.h. string.h is already included.
-#else
-// This assumes that non-Windows OSes provide unistd.h. For OSes where this
-// is not the case, we need to include headers that provide the functions
-// mentioned above.
-# include <unistd.h>
-# include <strings.h>
-#endif  // GTEST_OS_WINDOWS
-
-#if GTEST_OS_LINUX_ANDROID
-// Used to define __ANDROID_API__ matching the target NDK API level.
-#  include <android/api-level.h>  // NOLINT
-#endif
-
-// Defines this to true if and only if Google Test can use POSIX regular
-// expressions.
-#ifndef GTEST_HAS_POSIX_RE
-# if GTEST_OS_LINUX_ANDROID
-// On Android, <regex.h> is only available starting with Gingerbread.
-#  define GTEST_HAS_POSIX_RE (__ANDROID_API__ >= 9)
-# else
-#define GTEST_HAS_POSIX_RE (!GTEST_OS_WINDOWS && !GTEST_OS_XTENSA)
-# endif
-#endif
-
-#if GTEST_USES_PCRE
-// The appropriate headers have already been included.
-
-#elif GTEST_HAS_POSIX_RE
-
-// On some platforms, <regex.h> needs someone to define size_t, and
-// won't compile otherwise.  We can #include it here as we already
-// included <stdlib.h>, which is guaranteed to define size_t through
-// <stddef.h>.
-# include <regex.h>  // NOLINT
-
-# define GTEST_USES_POSIX_RE 1
-
-#elif GTEST_OS_WINDOWS
-
-// <regex.h> is not available on Windows.  Use our own simple regex
-// implementation instead.
-# define GTEST_USES_SIMPLE_RE 1
-
-#else
-
-// <regex.h> may not be available on this platform.  Use our own
-// simple regex implementation instead.
-# define GTEST_USES_SIMPLE_RE 1
-
-#endif  // GTEST_USES_PCRE
-
-#ifndef GTEST_HAS_EXCEPTIONS
-// The user didn't tell us whether exceptions are enabled, so we need
-// to figure it out.
-# if defined(_MSC_VER) && defined(_CPPUNWIND)
-// MSVC defines _CPPUNWIND to 1 if and only if exceptions are enabled.
-#  define GTEST_HAS_EXCEPTIONS 1
-# elif defined(__BORLANDC__)
-// C++Builder's implementation of the STL uses the _HAS_EXCEPTIONS
-// macro to enable exceptions, so we'll do the same.
-// Assumes that exceptions are enabled by default.
-#  ifndef _HAS_EXCEPTIONS
-#   define _HAS_EXCEPTIONS 1
-#  endif  // _HAS_EXCEPTIONS
-#  define GTEST_HAS_EXCEPTIONS _HAS_EXCEPTIONS
-# elif defined(__clang__)
-// clang defines __EXCEPTIONS if and only if exceptions are enabled before clang
-// 220714, but if and only if cleanups are enabled after that. In Obj-C++ files,
-// there can be cleanups for ObjC exceptions which also need cleanups, even if
-// C++ exceptions are disabled. clang has __has_feature(cxx_exceptions) which
-// checks for C++ exceptions starting at clang r206352, but which checked for
-// cleanups prior to that. To reliably check for C++ exception availability with
-// clang, check for
-// __EXCEPTIONS && __has_feature(cxx_exceptions).
-#  define GTEST_HAS_EXCEPTIONS (__EXCEPTIONS && __has_feature(cxx_exceptions))
-# elif defined(__GNUC__) && __EXCEPTIONS
-// gcc defines __EXCEPTIONS to 1 if and only if exceptions are enabled.
-#  define GTEST_HAS_EXCEPTIONS 1
-# elif defined(__SUNPRO_CC)
-// Sun Pro CC supports exceptions.  However, there is no compile-time way of
-// detecting whether they are enabled or not.  Therefore, we assume that
-// they are enabled unless the user tells us otherwise.
-#  define GTEST_HAS_EXCEPTIONS 1
-# elif defined(__IBMCPP__) && __EXCEPTIONS
-// xlC defines __EXCEPTIONS to 1 if and only if exceptions are enabled.
-#  define GTEST_HAS_EXCEPTIONS 1
-# elif defined(__HP_aCC)
-// Exception handling is in effect by default in HP aCC compiler. It has to
-// be turned of by +noeh compiler option if desired.
-#  define GTEST_HAS_EXCEPTIONS 1
-# else
-// For other compilers, we assume exceptions are disabled to be
-// conservative.
-#  define GTEST_HAS_EXCEPTIONS 0
-# endif  // defined(_MSC_VER) || defined(__BORLANDC__)
-#endif  // GTEST_HAS_EXCEPTIONS
-
-#ifndef GTEST_HAS_STD_WSTRING
-// The user didn't tell us whether ::std::wstring is available, so we need
-// to figure it out.
-// Cygwin 1.7 and below doesn't support ::std::wstring.
-// Solaris' libc++ doesn't support it either.  Android has
-// no support for it at least as recent as Froyo (2.2).
-#define GTEST_HAS_STD_WSTRING                                         \
-  (!(GTEST_OS_LINUX_ANDROID || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS || \
-     GTEST_OS_HAIKU || GTEST_OS_ESP32 || GTEST_OS_ESP8266 || GTEST_OS_XTENSA))
-
-#endif  // GTEST_HAS_STD_WSTRING
-
-// Determines whether RTTI is available.
-#ifndef GTEST_HAS_RTTI
-// The user didn't tell us whether RTTI is enabled, so we need to
-// figure it out.
-
-# ifdef _MSC_VER
-
-#ifdef _CPPRTTI  // MSVC defines this macro if and only if RTTI is enabled.
-#   define GTEST_HAS_RTTI 1
-#  else
-#   define GTEST_HAS_RTTI 0
-#  endif
-
-// Starting with version 4.3.2, gcc defines __GXX_RTTI if and only if RTTI is
-// enabled.
-# elif defined(__GNUC__)
-
-#  ifdef __GXX_RTTI
-// When building against STLport with the Android NDK and with
-// -frtti -fno-exceptions, the build fails at link time with undefined
-// references to __cxa_bad_typeid. Note sure if STL or toolchain bug,
-// so disable RTTI when detected.
-#   if GTEST_OS_LINUX_ANDROID && defined(_STLPORT_MAJOR) && \
-       !defined(__EXCEPTIONS)
-#    define GTEST_HAS_RTTI 0
-#   else
-#    define GTEST_HAS_RTTI 1
-#   endif  // GTEST_OS_LINUX_ANDROID && __STLPORT_MAJOR && !__EXCEPTIONS
-#  else
-#   define GTEST_HAS_RTTI 0
-#  endif  // __GXX_RTTI
-
-// Clang defines __GXX_RTTI starting with version 3.0, but its manual recommends
-// using has_feature instead. has_feature(cxx_rtti) is supported since 2.7, the
-// first version with C++ support.
-# elif defined(__clang__)
-
-#  define GTEST_HAS_RTTI __has_feature(cxx_rtti)
-
-// Starting with version 9.0 IBM Visual Age defines __RTTI_ALL__ to 1 if
-// both the typeid and dynamic_cast features are present.
-# elif defined(__IBMCPP__) && (__IBMCPP__ >= 900)
-
-#  ifdef __RTTI_ALL__
-#   define GTEST_HAS_RTTI 1
-#  else
-#   define GTEST_HAS_RTTI 0
-#  endif
-
-# else
-
-// For all other compilers, we assume RTTI is enabled.
-#  define GTEST_HAS_RTTI 1
-
-# endif  // _MSC_VER
-
-#endif  // GTEST_HAS_RTTI
-
-// It's this header's responsibility to #include <typeinfo> when RTTI
-// is enabled.
-#if GTEST_HAS_RTTI
-# include <typeinfo>
-#endif
-
-// Determines whether Google Test can use the pthreads library.
-#ifndef GTEST_HAS_PTHREAD
-// The user didn't tell us explicitly, so we make reasonable assumptions about
-// which platforms have pthreads support.
-//
-// To disable threading support in Google Test, add -DGTEST_HAS_PTHREAD=0
-// to your compiler flags.
-#define GTEST_HAS_PTHREAD                                                      \
-  (GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_HPUX || GTEST_OS_QNX ||          \
-   GTEST_OS_FREEBSD || GTEST_OS_NACL || GTEST_OS_NETBSD || GTEST_OS_FUCHSIA || \
-   GTEST_OS_DRAGONFLY || GTEST_OS_GNU_KFREEBSD || GTEST_OS_OPENBSD ||          \
-   GTEST_OS_HAIKU || GTEST_OS_GNU_HURD)
-#endif  // GTEST_HAS_PTHREAD
-
-#if GTEST_HAS_PTHREAD
-// gtest-port.h guarantees to #include <pthread.h> when GTEST_HAS_PTHREAD is
-// true.
-# include <pthread.h>  // NOLINT
-
-// For timespec and nanosleep, used below.
-# include <time.h>  // NOLINT
-#endif
-
-// Determines whether clone(2) is supported.
-// Usually it will only be available on Linux, excluding
-// Linux on the Itanium architecture.
-// Also see http://linux.die.net/man/2/clone.
-#ifndef GTEST_HAS_CLONE
-// The user didn't tell us, so we need to figure it out.
-
-# if GTEST_OS_LINUX && !defined(__ia64__)
-#  if GTEST_OS_LINUX_ANDROID
-// On Android, clone() became available at different API levels for each 32-bit
-// architecture.
-#    if defined(__LP64__) || \
-        (defined(__arm__) && __ANDROID_API__ >= 9) || \
-        (defined(__mips__) && __ANDROID_API__ >= 12) || \
-        (defined(__i386__) && __ANDROID_API__ >= 17)
-#     define GTEST_HAS_CLONE 1
-#    else
-#     define GTEST_HAS_CLONE 0
-#    endif
-#  else
-#   define GTEST_HAS_CLONE 1
-#  endif
-# else
-#  define GTEST_HAS_CLONE 0
-# endif  // GTEST_OS_LINUX && !defined(__ia64__)
-
-#endif  // GTEST_HAS_CLONE
-
-// Determines whether to support stream redirection. This is used to test
-// output correctness and to implement death tests.
-#ifndef GTEST_HAS_STREAM_REDIRECTION
-// By default, we assume that stream redirection is supported on all
-// platforms except known mobile ones.
-#if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_WINDOWS_PHONE || \
-    GTEST_OS_WINDOWS_RT || GTEST_OS_ESP8266 || GTEST_OS_XTENSA
-#  define GTEST_HAS_STREAM_REDIRECTION 0
-# else
-#  define GTEST_HAS_STREAM_REDIRECTION 1
-# endif  // !GTEST_OS_WINDOWS_MOBILE
-#endif  // GTEST_HAS_STREAM_REDIRECTION
-
-// Determines whether to support death tests.
-// pops up a dialog window that cannot be suppressed programmatically.
-#if (GTEST_OS_LINUX || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS ||             \
-     (GTEST_OS_MAC && !GTEST_OS_IOS) ||                                   \
-     (GTEST_OS_WINDOWS_DESKTOP && _MSC_VER) || GTEST_OS_WINDOWS_MINGW ||  \
-     GTEST_OS_AIX || GTEST_OS_HPUX || GTEST_OS_OPENBSD || GTEST_OS_QNX || \
-     GTEST_OS_FREEBSD || GTEST_OS_NETBSD || GTEST_OS_FUCHSIA ||           \
-     GTEST_OS_DRAGONFLY || GTEST_OS_GNU_KFREEBSD || GTEST_OS_HAIKU ||     \
-     GTEST_OS_GNU_HURD)
-# define GTEST_HAS_DEATH_TEST 1
-#endif
-
-// Determines whether to support type-driven tests.
-
-// Typed tests need <typeinfo> and variadic macros, which GCC, VC++ 8.0,
-// Sun Pro CC, IBM Visual Age, and HP aCC support.
-#if defined(__GNUC__) || defined(_MSC_VER) || defined(__SUNPRO_CC) || \
-    defined(__IBMCPP__) || defined(__HP_aCC)
-# define GTEST_HAS_TYPED_TEST 1
-# define GTEST_HAS_TYPED_TEST_P 1
-#endif
-
-// Determines whether the system compiler uses UTF-16 for encoding wide strings.
-#define GTEST_WIDE_STRING_USES_UTF16_ \
-  (GTEST_OS_WINDOWS || GTEST_OS_CYGWIN || GTEST_OS_AIX || GTEST_OS_OS2)
-
-// Determines whether test results can be streamed to a socket.
-#if GTEST_OS_LINUX || GTEST_OS_GNU_KFREEBSD || GTEST_OS_DRAGONFLY || \
-    GTEST_OS_FREEBSD || GTEST_OS_NETBSD || GTEST_OS_OPENBSD ||       \
-    GTEST_OS_GNU_HURD
-# define GTEST_CAN_STREAM_RESULTS_ 1
-#endif
-
-// Defines some utility macros.
-
-// The GNU compiler emits a warning if nested "if" statements are followed by
-// an "else" statement and braces are not used to explicitly disambiguate the
-// "else" binding.  This leads to problems with code like:
-//
-//   if (gate)
-//     ASSERT_*(condition) << "Some message";
-//
-// The "switch (0) case 0:" idiom is used to suppress this.
-#ifdef __INTEL_COMPILER
-# define GTEST_AMBIGUOUS_ELSE_BLOCKER_
-#else
-# define GTEST_AMBIGUOUS_ELSE_BLOCKER_ switch (0) case 0: default:  // NOLINT
-#endif
-
-// Use this annotation at the end of a struct/class definition to
-// prevent the compiler from optimizing away instances that are never
-// used.  This is useful when all interesting logic happens inside the
-// c'tor and / or d'tor.  Example:
-//
-//   struct Foo {
-//     Foo() { ... }
-//   } GTEST_ATTRIBUTE_UNUSED_;
-//
-// Also use it after a variable or parameter declaration to tell the
-// compiler the variable/parameter does not have to be used.
-#if defined(__GNUC__) && !defined(COMPILER_ICC)
-# define GTEST_ATTRIBUTE_UNUSED_ __attribute__ ((unused))
-#elif defined(__clang__)
-# if __has_attribute(unused)
-#  define GTEST_ATTRIBUTE_UNUSED_ __attribute__ ((unused))
-# endif
-#endif
-#ifndef GTEST_ATTRIBUTE_UNUSED_
-# define GTEST_ATTRIBUTE_UNUSED_
-#endif
-
-// Use this annotation before a function that takes a printf format string.
-#if (defined(__GNUC__) || defined(__clang__)) && !defined(COMPILER_ICC)
-# if defined(__MINGW_PRINTF_FORMAT)
-// MinGW has two different printf implementations. Ensure the format macro
-// matches the selected implementation. See
-// https://sourceforge.net/p/mingw-w64/wiki2/gnu%20printf/.
-#  define GTEST_ATTRIBUTE_PRINTF_(string_index, first_to_check) \
-       __attribute__((__format__(__MINGW_PRINTF_FORMAT, string_index, \
-                                 first_to_check)))
-# else
-#  define GTEST_ATTRIBUTE_PRINTF_(string_index, first_to_check) \
-       __attribute__((__format__(__printf__, string_index, first_to_check)))
-# endif
-#else
-# define GTEST_ATTRIBUTE_PRINTF_(string_index, first_to_check)
-#endif
-
-
-// A macro to disallow copy operator=
-// This should be used in the private: declarations for a class.
-#define GTEST_DISALLOW_ASSIGN_(type) \
-  type& operator=(type const &) = delete
-
-// A macro to disallow copy constructor and operator=
-// This should be used in the private: declarations for a class.
-#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type) \
-  type(type const&) = delete;                 \
-  type& operator=(type const&) = delete
-
-// A macro to disallow move operator=
-// This should be used in the private: declarations for a class.
-#define GTEST_DISALLOW_MOVE_ASSIGN_(type) \
-  type& operator=(type &&) noexcept = delete
-
-// A macro to disallow move constructor and operator=
-// This should be used in the private: declarations for a class.
-#define GTEST_DISALLOW_MOVE_AND_ASSIGN_(type) \
-  type(type&&) noexcept = delete;             \
-  type& operator=(type&&) noexcept = delete
-
-// Tell the compiler to warn about unused return values for functions declared
-// with this macro.  The macro should be used on function declarations
-// following the argument list:
-//
-//   Sprocket* AllocateSprocket() GTEST_MUST_USE_RESULT_;
-#if defined(__GNUC__) && !defined(COMPILER_ICC)
-# define GTEST_MUST_USE_RESULT_ __attribute__ ((warn_unused_result))
-#else
-# define GTEST_MUST_USE_RESULT_
-#endif  // __GNUC__ && !COMPILER_ICC
-
-// MS C++ compiler emits warning when a conditional expression is compile time
-// constant. In some contexts this warning is false positive and needs to be
-// suppressed. Use the following two macros in such cases:
-//
-// GTEST_INTENTIONAL_CONST_COND_PUSH_()
-// while (true) {
-// GTEST_INTENTIONAL_CONST_COND_POP_()
-// }
-# define GTEST_INTENTIONAL_CONST_COND_PUSH_() \
-    GTEST_DISABLE_MSC_WARNINGS_PUSH_(4127)
-# define GTEST_INTENTIONAL_CONST_COND_POP_() \
-    GTEST_DISABLE_MSC_WARNINGS_POP_()
-
-// Determine whether the compiler supports Microsoft's Structured Exception
-// Handling.  This is supported by several Windows compilers but generally
-// does not exist on any other system.
-#ifndef GTEST_HAS_SEH
-// The user didn't tell us, so we need to figure it out.
-
-# if defined(_MSC_VER) || defined(__BORLANDC__)
-// These two compilers are known to support SEH.
-#  define GTEST_HAS_SEH 1
-# else
-// Assume no SEH.
-#  define GTEST_HAS_SEH 0
-# endif
-
-#endif  // GTEST_HAS_SEH
-
-#ifndef GTEST_IS_THREADSAFE
-
-#define GTEST_IS_THREADSAFE                                                 \
-  (GTEST_HAS_MUTEX_AND_THREAD_LOCAL_ ||                                     \
-   (GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT) || \
-   GTEST_HAS_PTHREAD)
-
-#endif  // GTEST_IS_THREADSAFE
-
-// GTEST_API_ qualifies all symbols that must be exported. The definitions below
-// are guarded by #ifndef to give embedders a chance to define GTEST_API_ in
-// gtest/internal/custom/gtest-port.h
-#ifndef GTEST_API_
-
-#ifdef _MSC_VER
-# if GTEST_LINKED_AS_SHARED_LIBRARY
-#  define GTEST_API_ __declspec(dllimport)
-# elif GTEST_CREATE_SHARED_LIBRARY
-#  define GTEST_API_ __declspec(dllexport)
-# endif
-#elif __GNUC__ >= 4 || defined(__clang__)
-# define GTEST_API_ __attribute__((visibility ("default")))
-#endif  // _MSC_VER
-
-#endif  // GTEST_API_
-
-#ifndef GTEST_API_
-# define GTEST_API_
-#endif  // GTEST_API_
-
-#ifndef GTEST_DEFAULT_DEATH_TEST_STYLE
-# define GTEST_DEFAULT_DEATH_TEST_STYLE  "fast"
-#endif  // GTEST_DEFAULT_DEATH_TEST_STYLE
-
-#ifdef __GNUC__
-// Ask the compiler to never inline a given function.
-# define GTEST_NO_INLINE_ __attribute__((noinline))
-#else
-# define GTEST_NO_INLINE_
-#endif
-
-// _LIBCPP_VERSION is defined by the libc++ library from the LLVM project.
-#if !defined(GTEST_HAS_CXXABI_H_)
-# if defined(__GLIBCXX__) || (defined(_LIBCPP_VERSION) && !defined(_MSC_VER))
-#  define GTEST_HAS_CXXABI_H_ 1
-# else
-#  define GTEST_HAS_CXXABI_H_ 0
-# endif
-#endif
-
-// A function level attribute to disable checking for use of uninitialized
-// memory when built with MemorySanitizer.
-#if defined(__clang__)
-# if __has_feature(memory_sanitizer)
-#  define GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_ \
-       __attribute__((no_sanitize_memory))
-# else
-#  define GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_
-# endif  // __has_feature(memory_sanitizer)
-#else
-# define GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_
-#endif  // __clang__
-
-// A function level attribute to disable AddressSanitizer instrumentation.
-#if defined(__clang__)
-# if __has_feature(address_sanitizer)
-#  define GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_ \
-       __attribute__((no_sanitize_address))
-# else
-#  define GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_
-# endif  // __has_feature(address_sanitizer)
-#else
-# define GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_
-#endif  // __clang__
-
-// A function level attribute to disable HWAddressSanitizer instrumentation.
-#if defined(__clang__)
-# if __has_feature(hwaddress_sanitizer)
-#  define GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_ \
-       __attribute__((no_sanitize("hwaddress")))
-# else
-#  define GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_
-# endif  // __has_feature(hwaddress_sanitizer)
-#else
-# define GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_
-#endif  // __clang__
-
-// A function level attribute to disable ThreadSanitizer instrumentation.
-#if defined(__clang__)
-# if __has_feature(thread_sanitizer)
-#  define GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_ \
-       __attribute__((no_sanitize_thread))
-# else
-#  define GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_
-# endif  // __has_feature(thread_sanitizer)
-#else
-# define GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_
-#endif  // __clang__
-
-namespace testing {
-
-class Message;
-
-// Legacy imports for backwards compatibility.
-// New code should use std:: names directly.
-using std::get;
-using std::make_tuple;
-using std::tuple;
-using std::tuple_element;
-using std::tuple_size;
-
-namespace internal {
-
-// A secret type that Google Test users don't know about.  It has no
-// definition on purpose.  Therefore it's impossible to create a
-// Secret object, which is what we want.
-class Secret;
-
-// The GTEST_COMPILE_ASSERT_ is a legacy macro used to verify that a compile
-// time expression is true (in new code, use static_assert instead). For
-// example, you could use it to verify the size of a static array:
-//
-//   GTEST_COMPILE_ASSERT_(GTEST_ARRAY_SIZE_(names) == NUM_NAMES,
-//                         names_incorrect_size);
-//
-// The second argument to the macro must be a valid C++ identifier. If the
-// expression is false, compiler will issue an error containing this identifier.
-#define GTEST_COMPILE_ASSERT_(expr, msg) static_assert(expr, #msg)
-
-// A helper for suppressing warnings on constant condition.  It just
-// returns 'condition'.
-GTEST_API_ bool IsTrue(bool condition);
-
-// Defines RE.
-
-#if GTEST_USES_PCRE
-// if used, PCRE is injected by custom/gtest-port.h
-#elif GTEST_USES_POSIX_RE || GTEST_USES_SIMPLE_RE
-
-// A simple C++ wrapper for <regex.h>.  It uses the POSIX Extended
-// Regular Expression syntax.
-class GTEST_API_ RE {
- public:
-  // A copy constructor is required by the Standard to initialize object
-  // references from r-values.
-  RE(const RE& other) { Init(other.pattern()); }
-
-  // Constructs an RE from a string.
-  RE(const ::std::string& regex) { Init(regex.c_str()); }  // NOLINT
-
-  RE(const char* regex) { Init(regex); }  // NOLINT
-  ~RE();
-
-  // Returns the string representation of the regex.
-  const char* pattern() const { return pattern_; }
-
-  // FullMatch(str, re) returns true if and only if regular expression re
-  // matches the entire str.
-  // PartialMatch(str, re) returns true if and only if regular expression re
-  // matches a substring of str (including str itself).
-  static bool FullMatch(const ::std::string& str, const RE& re) {
-    return FullMatch(str.c_str(), re);
-  }
-  static bool PartialMatch(const ::std::string& str, const RE& re) {
-    return PartialMatch(str.c_str(), re);
-  }
-
-  static bool FullMatch(const char* str, const RE& re);
-  static bool PartialMatch(const char* str, const RE& re);
-
- private:
-  void Init(const char* regex);
-  const char* pattern_;
-  bool is_valid_;
-
-# if GTEST_USES_POSIX_RE
-
-  regex_t full_regex_;     // For FullMatch().
-  regex_t partial_regex_;  // For PartialMatch().
-
-# else  // GTEST_USES_SIMPLE_RE
-
-  const char* full_pattern_;  // For FullMatch();
-
-# endif
-};
-
-#endif  // GTEST_USES_PCRE
-
-// Formats a source file path and a line number as they would appear
-// in an error message from the compiler used to compile this code.
-GTEST_API_ ::std::string FormatFileLocation(const char* file, int line);
-
-// Formats a file location for compiler-independent XML output.
-// Although this function is not platform dependent, we put it next to
-// FormatFileLocation in order to contrast the two functions.
-GTEST_API_ ::std::string FormatCompilerIndependentFileLocation(const char* file,
-                                                               int line);
-
-// Defines logging utilities:
-//   GTEST_LOG_(severity) - logs messages at the specified severity level. The
-//                          message itself is streamed into the macro.
-//   LogToStderr()  - directs all log messages to stderr.
-//   FlushInfoLog() - flushes informational log messages.
-
-enum GTestLogSeverity {
-  GTEST_INFO,
-  GTEST_WARNING,
-  GTEST_ERROR,
-  GTEST_FATAL
-};
-
-// Formats log entry severity, provides a stream object for streaming the
-// log message, and terminates the message with a newline when going out of
-// scope.
-class GTEST_API_ GTestLog {
- public:
-  GTestLog(GTestLogSeverity severity, const char* file, int line);
-
-  // Flushes the buffers and, if severity is GTEST_FATAL, aborts the program.
-  ~GTestLog();
-
-  ::std::ostream& GetStream() { return ::std::cerr; }
-
- private:
-  const GTestLogSeverity severity_;
-
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(GTestLog);
-};
-
-#if !defined(GTEST_LOG_)
-
-# define GTEST_LOG_(severity) \
-    ::testing::internal::GTestLog(::testing::internal::GTEST_##severity, \
-                                  __FILE__, __LINE__).GetStream()
-
-inline void LogToStderr() {}
-inline void FlushInfoLog() { fflush(nullptr); }
-
-#endif  // !defined(GTEST_LOG_)
-
-#if !defined(GTEST_CHECK_)
-// INTERNAL IMPLEMENTATION - DO NOT USE.
-//
-// GTEST_CHECK_ is an all-mode assert. It aborts the program if the condition
-// is not satisfied.
-//  Synopsys:
-//    GTEST_CHECK_(boolean_condition);
-//     or
-//    GTEST_CHECK_(boolean_condition) << "Additional message";
-//
-//    This checks the condition and if the condition is not satisfied
-//    it prints message about the condition violation, including the
-//    condition itself, plus additional message streamed into it, if any,
-//    and then it aborts the program. It aborts the program irrespective of
-//    whether it is built in the debug mode or not.
-# define GTEST_CHECK_(condition) \
-    GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
-    if (::testing::internal::IsTrue(condition)) \
-      ; \
-    else \
-      GTEST_LOG_(FATAL) << "Condition " #condition " failed. "
-#endif  // !defined(GTEST_CHECK_)
-
-// An all-mode assert to verify that the given POSIX-style function
-// call returns 0 (indicating success).  Known limitation: this
-// doesn't expand to a balanced 'if' statement, so enclose the macro
-// in {} if you need to use it as the only statement in an 'if'
-// branch.
-#define GTEST_CHECK_POSIX_SUCCESS_(posix_call) \
-  if (const int gtest_error = (posix_call)) \
-    GTEST_LOG_(FATAL) << #posix_call << "failed with error " \
-                      << gtest_error
-
-// Transforms "T" into "const T&" according to standard reference collapsing
-// rules (this is only needed as a backport for C++98 compilers that do not
-// support reference collapsing). Specifically, it transforms:
-//
-//   char         ==> const char&
-//   const char   ==> const char&
-//   char&        ==> char&
-//   const char&  ==> const char&
-//
-// Note that the non-const reference will not have "const" added. This is
-// standard, and necessary so that "T" can always bind to "const T&".
-template <typename T>
-struct ConstRef { typedef const T& type; };
-template <typename T>
-struct ConstRef<T&> { typedef T& type; };
-
-// The argument T must depend on some template parameters.
-#define GTEST_REFERENCE_TO_CONST_(T) \
-  typename ::testing::internal::ConstRef<T>::type
-
-// INTERNAL IMPLEMENTATION - DO NOT USE IN USER CODE.
-//
-// Use ImplicitCast_ as a safe version of static_cast for upcasting in
-// the type hierarchy (e.g. casting a Foo* to a SuperclassOfFoo* or a
-// const Foo*).  When you use ImplicitCast_, the compiler checks that
-// the cast is safe.  Such explicit ImplicitCast_s are necessary in
-// surprisingly many situations where C++ demands an exact type match
-// instead of an argument type convertable to a target type.
-//
-// The syntax for using ImplicitCast_ is the same as for static_cast:
-//
-//   ImplicitCast_<ToType>(expr)
-//
-// ImplicitCast_ would have been part of the C++ standard library,
-// but the proposal was submitted too late.  It will probably make
-// its way into the language in the future.
-//
-// This relatively ugly name is intentional. It prevents clashes with
-// similar functions users may have (e.g., implicit_cast). The internal
-// namespace alone is not enough because the function can be found by ADL.
-template<typename To>
-inline To ImplicitCast_(To x) { return x; }
-
-// When you upcast (that is, cast a pointer from type Foo to type
-// SuperclassOfFoo), it's fine to use ImplicitCast_<>, since upcasts
-// always succeed.  When you downcast (that is, cast a pointer from
-// type Foo to type SubclassOfFoo), static_cast<> isn't safe, because
-// how do you know the pointer is really of type SubclassOfFoo?  It
-// could be a bare Foo, or of type DifferentSubclassOfFoo.  Thus,
-// when you downcast, you should use this macro.  In debug mode, we
-// use dynamic_cast<> to double-check the downcast is legal (we die
-// if it's not).  In normal mode, we do the efficient static_cast<>
-// instead.  Thus, it's important to test in debug mode to make sure
-// the cast is legal!
-//    This is the only place in the code we should use dynamic_cast<>.
-// In particular, you SHOULDN'T be using dynamic_cast<> in order to
-// do RTTI (eg code like this:
-//    if (dynamic_cast<Subclass1>(foo)) HandleASubclass1Object(foo);
-//    if (dynamic_cast<Subclass2>(foo)) HandleASubclass2Object(foo);
-// You should design the code some other way not to need this.
-//
-// This relatively ugly name is intentional. It prevents clashes with
-// similar functions users may have (e.g., down_cast). The internal
-// namespace alone is not enough because the function can be found by ADL.
-template<typename To, typename From>  // use like this: DownCast_<T*>(foo);
-inline To DownCast_(From* f) {  // so we only accept pointers
-  // Ensures that To is a sub-type of From *.  This test is here only
-  // for compile-time type checking, and has no overhead in an
-  // optimized build at run-time, as it will be optimized away
-  // completely.
-  GTEST_INTENTIONAL_CONST_COND_PUSH_()
-  if (false) {
-  GTEST_INTENTIONAL_CONST_COND_POP_()
-  const To to = nullptr;
-  ::testing::internal::ImplicitCast_<From*>(to);
-  }
-
-#if GTEST_HAS_RTTI
-  // RTTI: debug mode only!
-  GTEST_CHECK_(f == nullptr || dynamic_cast<To>(f) != nullptr);
-#endif
-  return static_cast<To>(f);
-}
-
-// Downcasts the pointer of type Base to Derived.
-// Derived must be a subclass of Base. The parameter MUST
-// point to a class of type Derived, not any subclass of it.
-// When RTTI is available, the function performs a runtime
-// check to enforce this.
-template <class Derived, class Base>
-Derived* CheckedDowncastToActualType(Base* base) {
-#if GTEST_HAS_RTTI
-  GTEST_CHECK_(typeid(*base) == typeid(Derived));
-#endif
-
-#if GTEST_HAS_DOWNCAST_
-  return ::down_cast<Derived*>(base);
-#elif GTEST_HAS_RTTI
-  return dynamic_cast<Derived*>(base);  // NOLINT
-#else
-  return static_cast<Derived*>(base);  // Poor man's downcast.
-#endif
-}
-
-#if GTEST_HAS_STREAM_REDIRECTION
-
-// Defines the stderr capturer:
-//   CaptureStdout     - starts capturing stdout.
-//   GetCapturedStdout - stops capturing stdout and returns the captured string.
-//   CaptureStderr     - starts capturing stderr.
-//   GetCapturedStderr - stops capturing stderr and returns the captured string.
-//
-GTEST_API_ void CaptureStdout();
-GTEST_API_ std::string GetCapturedStdout();
-GTEST_API_ void CaptureStderr();
-GTEST_API_ std::string GetCapturedStderr();
-
-#endif  // GTEST_HAS_STREAM_REDIRECTION
-// Returns the size (in bytes) of a file.
-GTEST_API_ size_t GetFileSize(FILE* file);
-
-// Reads the entire content of a file as a string.
-GTEST_API_ std::string ReadEntireFile(FILE* file);
-
-// All command line arguments.
-GTEST_API_ std::vector<std::string> GetArgvs();
-
-#if GTEST_HAS_DEATH_TEST
-
-std::vector<std::string> GetInjectableArgvs();
-// Deprecated: pass the args vector by value instead.
-void SetInjectableArgvs(const std::vector<std::string>* new_argvs);
-void SetInjectableArgvs(const std::vector<std::string>& new_argvs);
-void ClearInjectableArgvs();
-
-#endif  // GTEST_HAS_DEATH_TEST
-
-// Defines synchronization primitives.
-#if GTEST_IS_THREADSAFE
-# if GTEST_HAS_PTHREAD
-// Sleeps for (roughly) n milliseconds.  This function is only for testing
-// Google Test's own constructs.  Don't use it in user tests, either
-// directly or indirectly.
-inline void SleepMilliseconds(int n) {
-  const timespec time = {
-    0,                  // 0 seconds.
-    n * 1000L * 1000L,  // And n ms.
-  };
-  nanosleep(&time, nullptr);
-}
-# endif  // GTEST_HAS_PTHREAD
-
-# if GTEST_HAS_NOTIFICATION_
-// Notification has already been imported into the namespace.
-// Nothing to do here.
-
-# elif GTEST_HAS_PTHREAD
-// Allows a controller thread to pause execution of newly created
-// threads until notified.  Instances of this class must be created
-// and destroyed in the controller thread.
-//
-// This class is only for testing Google Test's own constructs. Do not
-// use it in user tests, either directly or indirectly.
-class Notification {
- public:
-  Notification() : notified_(false) {
-    GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_init(&mutex_, nullptr));
-  }
-  ~Notification() {
-    pthread_mutex_destroy(&mutex_);
-  }
-
-  // Notifies all threads created with this notification to start. Must
-  // be called from the controller thread.
-  void Notify() {
-    pthread_mutex_lock(&mutex_);
-    notified_ = true;
-    pthread_mutex_unlock(&mutex_);
-  }
-
-  // Blocks until the controller thread notifies. Must be called from a test
-  // thread.
-  void WaitForNotification() {
-    for (;;) {
-      pthread_mutex_lock(&mutex_);
-      const bool notified = notified_;
-      pthread_mutex_unlock(&mutex_);
-      if (notified)
-        break;
-      SleepMilliseconds(10);
-    }
-  }
-
- private:
-  pthread_mutex_t mutex_;
-  bool notified_;
-
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(Notification);
-};
-
-# elif GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT
-
-GTEST_API_ void SleepMilliseconds(int n);
-
-// Provides leak-safe Windows kernel handle ownership.
-// Used in death tests and in threading support.
-class GTEST_API_ AutoHandle {
- public:
-  // Assume that Win32 HANDLE type is equivalent to void*. Doing so allows us to
-  // avoid including <windows.h> in this header file. Including <windows.h> is
-  // undesirable because it defines a lot of symbols and macros that tend to
-  // conflict with client code. This assumption is verified by
-  // WindowsTypesTest.HANDLEIsVoidStar.
-  typedef void* Handle;
-  AutoHandle();
-  explicit AutoHandle(Handle handle);
-
-  ~AutoHandle();
-
-  Handle Get() const;
-  void Reset();
-  void Reset(Handle handle);
-
- private:
-  // Returns true if and only if the handle is a valid handle object that can be
-  // closed.
-  bool IsCloseable() const;
-
-  Handle handle_;
-
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(AutoHandle);
-};
-
-// Allows a controller thread to pause execution of newly created
-// threads until notified.  Instances of this class must be created
-// and destroyed in the controller thread.
-//
-// This class is only for testing Google Test's own constructs. Do not
-// use it in user tests, either directly or indirectly.
-class GTEST_API_ Notification {
- public:
-  Notification();
-  void Notify();
-  void WaitForNotification();
-
- private:
-  AutoHandle event_;
-
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(Notification);
-};
-# endif  // GTEST_HAS_NOTIFICATION_
-
-// On MinGW, we can have both GTEST_OS_WINDOWS and GTEST_HAS_PTHREAD
-// defined, but we don't want to use MinGW's pthreads implementation, which
-// has conformance problems with some versions of the POSIX standard.
-# if GTEST_HAS_PTHREAD && !GTEST_OS_WINDOWS_MINGW
-
-// As a C-function, ThreadFuncWithCLinkage cannot be templated itself.
-// Consequently, it cannot select a correct instantiation of ThreadWithParam
-// in order to call its Run(). Introducing ThreadWithParamBase as a
-// non-templated base class for ThreadWithParam allows us to bypass this
-// problem.
-class ThreadWithParamBase {
- public:
-  virtual ~ThreadWithParamBase() {}
-  virtual void Run() = 0;
-};
-
-// pthread_create() accepts a pointer to a function type with the C linkage.
-// According to the Standard (7.5/1), function types with different linkages
-// are different even if they are otherwise identical.  Some compilers (for
-// example, SunStudio) treat them as different types.  Since class methods
-// cannot be defined with C-linkage we need to define a free C-function to
-// pass into pthread_create().
-extern "C" inline void* ThreadFuncWithCLinkage(void* thread) {
-  static_cast<ThreadWithParamBase*>(thread)->Run();
-  return nullptr;
-}
-
-// Helper class for testing Google Test's multi-threading constructs.
-// To use it, write:
-//
-//   void ThreadFunc(int param) { /* Do things with param */ }
-//   Notification thread_can_start;
-//   ...
-//   // The thread_can_start parameter is optional; you can supply NULL.
-//   ThreadWithParam<int> thread(&ThreadFunc, 5, &thread_can_start);
-//   thread_can_start.Notify();
-//
-// These classes are only for testing Google Test's own constructs. Do
-// not use them in user tests, either directly or indirectly.
-template <typename T>
-class ThreadWithParam : public ThreadWithParamBase {
- public:
-  typedef void UserThreadFunc(T);
-
-  ThreadWithParam(UserThreadFunc* func, T param, Notification* thread_can_start)
-      : func_(func),
-        param_(param),
-        thread_can_start_(thread_can_start),
-        finished_(false) {
-    ThreadWithParamBase* const base = this;
-    // The thread can be created only after all fields except thread_
-    // have been initialized.
-    GTEST_CHECK_POSIX_SUCCESS_(
-        pthread_create(&thread_, nullptr, &ThreadFuncWithCLinkage, base));
-  }
-  ~ThreadWithParam() override { Join(); }
-
-  void Join() {
-    if (!finished_) {
-      GTEST_CHECK_POSIX_SUCCESS_(pthread_join(thread_, nullptr));
-      finished_ = true;
-    }
-  }
-
-  void Run() override {
-    if (thread_can_start_ != nullptr) thread_can_start_->WaitForNotification();
-    func_(param_);
-  }
-
- private:
-  UserThreadFunc* const func_;  // User-supplied thread function.
-  const T param_;  // User-supplied parameter to the thread function.
-  // When non-NULL, used to block execution until the controller thread
-  // notifies.
-  Notification* const thread_can_start_;
-  bool finished_;  // true if and only if we know that the thread function has
-                   // finished.
-  pthread_t thread_;  // The native thread object.
-
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadWithParam);
-};
-# endif  // !GTEST_OS_WINDOWS && GTEST_HAS_PTHREAD ||
-         // GTEST_HAS_MUTEX_AND_THREAD_LOCAL_
-
-# if GTEST_HAS_MUTEX_AND_THREAD_LOCAL_
-// Mutex and ThreadLocal have already been imported into the namespace.
-// Nothing to do here.
-
-# elif GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT
-
-// Mutex implements mutex on Windows platforms.  It is used in conjunction
-// with class MutexLock:
-//
-//   Mutex mutex;
-//   ...
-//   MutexLock lock(&mutex);  // Acquires the mutex and releases it at the
-//                            // end of the current scope.
-//
-// A static Mutex *must* be defined or declared using one of the following
-// macros:
-//   GTEST_DEFINE_STATIC_MUTEX_(g_some_mutex);
-//   GTEST_DECLARE_STATIC_MUTEX_(g_some_mutex);
-//
-// (A non-static Mutex is defined/declared in the usual way).
-class GTEST_API_ Mutex {
- public:
-  enum MutexType { kStatic = 0, kDynamic = 1 };
-  // We rely on kStaticMutex being 0 as it is to what the linker initializes
-  // type_ in static mutexes.  critical_section_ will be initialized lazily
-  // in ThreadSafeLazyInit().
-  enum StaticConstructorSelector { kStaticMutex = 0 };
-
-  // This constructor intentionally does nothing.  It relies on type_ being
-  // statically initialized to 0 (effectively setting it to kStatic) and on
-  // ThreadSafeLazyInit() to lazily initialize the rest of the members.
-  explicit Mutex(StaticConstructorSelector /*dummy*/) {}
-
-  Mutex();
-  ~Mutex();
-
-  void Lock();
-
-  void Unlock();
-
-  // Does nothing if the current thread holds the mutex. Otherwise, crashes
-  // with high probability.
-  void AssertHeld();
-
- private:
-  // Initializes owner_thread_id_ and critical_section_ in static mutexes.
-  void ThreadSafeLazyInit();
-
-  // Per https://blogs.msdn.microsoft.com/oldnewthing/20040223-00/?p=40503,
-  // we assume that 0 is an invalid value for thread IDs.
-  unsigned int owner_thread_id_;
-
-  // For static mutexes, we rely on these members being initialized to zeros
-  // by the linker.
-  MutexType type_;
-  long critical_section_init_phase_;  // NOLINT
-  GTEST_CRITICAL_SECTION* critical_section_;
-
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(Mutex);
-};
-
-# define GTEST_DECLARE_STATIC_MUTEX_(mutex) \
-    extern ::testing::internal::Mutex mutex
-
-# define GTEST_DEFINE_STATIC_MUTEX_(mutex) \
-    ::testing::internal::Mutex mutex(::testing::internal::Mutex::kStaticMutex)
-
-// We cannot name this class MutexLock because the ctor declaration would
-// conflict with a macro named MutexLock, which is defined on some
-// platforms. That macro is used as a defensive measure to prevent against
-// inadvertent misuses of MutexLock like "MutexLock(&mu)" rather than
-// "MutexLock l(&mu)".  Hence the typedef trick below.
-class GTestMutexLock {
- public:
-  explicit GTestMutexLock(Mutex* mutex)
-      : mutex_(mutex) { mutex_->Lock(); }
-
-  ~GTestMutexLock() { mutex_->Unlock(); }
-
- private:
-  Mutex* const mutex_;
-
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(GTestMutexLock);
-};
-
-typedef GTestMutexLock MutexLock;
-
-// Base class for ValueHolder<T>.  Allows a caller to hold and delete a value
-// without knowing its type.
-class ThreadLocalValueHolderBase {
- public:
-  virtual ~ThreadLocalValueHolderBase() {}
-};
-
-// Provides a way for a thread to send notifications to a ThreadLocal
-// regardless of its parameter type.
-class ThreadLocalBase {
- public:
-  // Creates a new ValueHolder<T> object holding a default value passed to
-  // this ThreadLocal<T>'s constructor and returns it.  It is the caller's
-  // responsibility not to call this when the ThreadLocal<T> instance already
-  // has a value on the current thread.
-  virtual ThreadLocalValueHolderBase* NewValueForCurrentThread() const = 0;
-
- protected:
-  ThreadLocalBase() {}
-  virtual ~ThreadLocalBase() {}
-
- private:
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadLocalBase);
-};
-
-// Maps a thread to a set of ThreadLocals that have values instantiated on that
-// thread and notifies them when the thread exits.  A ThreadLocal instance is
-// expected to persist until all threads it has values on have terminated.
-class GTEST_API_ ThreadLocalRegistry {
- public:
-  // Registers thread_local_instance as having value on the current thread.
-  // Returns a value that can be used to identify the thread from other threads.
-  static ThreadLocalValueHolderBase* GetValueOnCurrentThread(
-      const ThreadLocalBase* thread_local_instance);
-
-  // Invoked when a ThreadLocal instance is destroyed.
-  static void OnThreadLocalDestroyed(
-      const ThreadLocalBase* thread_local_instance);
-};
-
-class GTEST_API_ ThreadWithParamBase {
- public:
-  void Join();
-
- protected:
-  class Runnable {
-   public:
-    virtual ~Runnable() {}
-    virtual void Run() = 0;
-  };
-
-  ThreadWithParamBase(Runnable *runnable, Notification* thread_can_start);
-  virtual ~ThreadWithParamBase();
-
- private:
-  AutoHandle thread_;
-};
-
-// Helper class for testing Google Test's multi-threading constructs.
-template <typename T>
-class ThreadWithParam : public ThreadWithParamBase {
- public:
-  typedef void UserThreadFunc(T);
-
-  ThreadWithParam(UserThreadFunc* func, T param, Notification* thread_can_start)
-      : ThreadWithParamBase(new RunnableImpl(func, param), thread_can_start) {
-  }
-  virtual ~ThreadWithParam() {}
-
- private:
-  class RunnableImpl : public Runnable {
-   public:
-    RunnableImpl(UserThreadFunc* func, T param)
-        : func_(func),
-          param_(param) {
-    }
-    virtual ~RunnableImpl() {}
-    virtual void Run() {
-      func_(param_);
-    }
-
-   private:
-    UserThreadFunc* const func_;
-    const T param_;
-
-    GTEST_DISALLOW_COPY_AND_ASSIGN_(RunnableImpl);
-  };
-
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadWithParam);
-};
-
-// Implements thread-local storage on Windows systems.
-//
-//   // Thread 1
-//   ThreadLocal<int> tl(100);  // 100 is the default value for each thread.
-//
-//   // Thread 2
-//   tl.set(150);  // Changes the value for thread 2 only.
-//   EXPECT_EQ(150, tl.get());
-//
-//   // Thread 1
-//   EXPECT_EQ(100, tl.get());  // In thread 1, tl has the original value.
-//   tl.set(200);
-//   EXPECT_EQ(200, tl.get());
-//
-// The template type argument T must have a public copy constructor.
-// In addition, the default ThreadLocal constructor requires T to have
-// a public default constructor.
-//
-// The users of a TheadLocal instance have to make sure that all but one
-// threads (including the main one) using that instance have exited before
-// destroying it. Otherwise, the per-thread objects managed for them by the
-// ThreadLocal instance are not guaranteed to be destroyed on all platforms.
-//
-// Google Test only uses global ThreadLocal objects.  That means they
-// will die after main() has returned.  Therefore, no per-thread
-// object managed by Google Test will be leaked as long as all threads
-// using Google Test have exited when main() returns.
-template <typename T>
-class ThreadLocal : public ThreadLocalBase {
- public:
-  ThreadLocal() : default_factory_(new DefaultValueHolderFactory()) {}
-  explicit ThreadLocal(const T& value)
-      : default_factory_(new InstanceValueHolderFactory(value)) {}
-
-  ~ThreadLocal() { ThreadLocalRegistry::OnThreadLocalDestroyed(this); }
-
-  T* pointer() { return GetOrCreateValue(); }
-  const T* pointer() const { return GetOrCreateValue(); }
-  const T& get() const { return *pointer(); }
-  void set(const T& value) { *pointer() = value; }
-
- private:
-  // Holds a value of T.  Can be deleted via its base class without the caller
-  // knowing the type of T.
-  class ValueHolder : public ThreadLocalValueHolderBase {
-   public:
-    ValueHolder() : value_() {}
-    explicit ValueHolder(const T& value) : value_(value) {}
-
-    T* pointer() { return &value_; }
-
-   private:
-    T value_;
-    GTEST_DISALLOW_COPY_AND_ASSIGN_(ValueHolder);
-  };
-
-
-  T* GetOrCreateValue() const {
-    return static_cast<ValueHolder*>(
-        ThreadLocalRegistry::GetValueOnCurrentThread(this))->pointer();
-  }
-
-  virtual ThreadLocalValueHolderBase* NewValueForCurrentThread() const {
-    return default_factory_->MakeNewHolder();
-  }
-
-  class ValueHolderFactory {
-   public:
-    ValueHolderFactory() {}
-    virtual ~ValueHolderFactory() {}
-    virtual ValueHolder* MakeNewHolder() const = 0;
-
-   private:
-    GTEST_DISALLOW_COPY_AND_ASSIGN_(ValueHolderFactory);
-  };
-
-  class DefaultValueHolderFactory : public ValueHolderFactory {
-   public:
-    DefaultValueHolderFactory() {}
-    ValueHolder* MakeNewHolder() const override { return new ValueHolder(); }
-
-   private:
-    GTEST_DISALLOW_COPY_AND_ASSIGN_(DefaultValueHolderFactory);
-  };
-
-  class InstanceValueHolderFactory : public ValueHolderFactory {
-   public:
-    explicit InstanceValueHolderFactory(const T& value) : value_(value) {}
-    ValueHolder* MakeNewHolder() const override {
-      return new ValueHolder(value_);
-    }
-
-   private:
-    const T value_;  // The value for each thread.
-
-    GTEST_DISALLOW_COPY_AND_ASSIGN_(InstanceValueHolderFactory);
-  };
-
-  std::unique_ptr<ValueHolderFactory> default_factory_;
-
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadLocal);
-};
-
-# elif GTEST_HAS_PTHREAD
-
-// MutexBase and Mutex implement mutex on pthreads-based platforms.
-class MutexBase {
- public:
-  // Acquires this mutex.
-  void Lock() {
-    GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_lock(&mutex_));
-    owner_ = pthread_self();
-    has_owner_ = true;
-  }
-
-  // Releases this mutex.
-  void Unlock() {
-    // Since the lock is being released the owner_ field should no longer be
-    // considered valid. We don't protect writing to has_owner_ here, as it's
-    // the caller's responsibility to ensure that the current thread holds the
-    // mutex when this is called.
-    has_owner_ = false;
-    GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_unlock(&mutex_));
-  }
-
-  // Does nothing if the current thread holds the mutex. Otherwise, crashes
-  // with high probability.
-  void AssertHeld() const {
-    GTEST_CHECK_(has_owner_ && pthread_equal(owner_, pthread_self()))
-        << "The current thread is not holding the mutex @" << this;
-  }
-
-  // A static mutex may be used before main() is entered.  It may even
-  // be used before the dynamic initialization stage.  Therefore we
-  // must be able to initialize a static mutex object at link time.
-  // This means MutexBase has to be a POD and its member variables
-  // have to be public.
- public:
-  pthread_mutex_t mutex_;  // The underlying pthread mutex.
-  // has_owner_ indicates whether the owner_ field below contains a valid thread
-  // ID and is therefore safe to inspect (e.g., to use in pthread_equal()). All
-  // accesses to the owner_ field should be protected by a check of this field.
-  // An alternative might be to memset() owner_ to all zeros, but there's no
-  // guarantee that a zero'd pthread_t is necessarily invalid or even different
-  // from pthread_self().
-  bool has_owner_;
-  pthread_t owner_;  // The thread holding the mutex.
-};
-
-// Forward-declares a static mutex.
-#  define GTEST_DECLARE_STATIC_MUTEX_(mutex) \
-     extern ::testing::internal::MutexBase mutex
-
-// Defines and statically (i.e. at link time) initializes a static mutex.
-// The initialization list here does not explicitly initialize each field,
-// instead relying on default initialization for the unspecified fields. In
-// particular, the owner_ field (a pthread_t) is not explicitly initialized.
-// This allows initialization to work whether pthread_t is a scalar or struct.
-// The flag -Wmissing-field-initializers must not be specified for this to work.
-#define GTEST_DEFINE_STATIC_MUTEX_(mutex) \
-  ::testing::internal::MutexBase mutex = {PTHREAD_MUTEX_INITIALIZER, false, 0}
-
-// The Mutex class can only be used for mutexes created at runtime. It
-// shares its API with MutexBase otherwise.
-class Mutex : public MutexBase {
- public:
-  Mutex() {
-    GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_init(&mutex_, nullptr));
-    has_owner_ = false;
-  }
-  ~Mutex() {
-    GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_destroy(&mutex_));
-  }
-
- private:
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(Mutex);
-};
-
-// We cannot name this class MutexLock because the ctor declaration would
-// conflict with a macro named MutexLock, which is defined on some
-// platforms. That macro is used as a defensive measure to prevent against
-// inadvertent misuses of MutexLock like "MutexLock(&mu)" rather than
-// "MutexLock l(&mu)".  Hence the typedef trick below.
-class GTestMutexLock {
- public:
-  explicit GTestMutexLock(MutexBase* mutex)
-      : mutex_(mutex) { mutex_->Lock(); }
-
-  ~GTestMutexLock() { mutex_->Unlock(); }
-
- private:
-  MutexBase* const mutex_;
-
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(GTestMutexLock);
-};
-
-typedef GTestMutexLock MutexLock;
-
-// Helpers for ThreadLocal.
-
-// pthread_key_create() requires DeleteThreadLocalValue() to have
-// C-linkage.  Therefore it cannot be templatized to access
-// ThreadLocal<T>.  Hence the need for class
-// ThreadLocalValueHolderBase.
-class ThreadLocalValueHolderBase {
- public:
-  virtual ~ThreadLocalValueHolderBase() {}
-};
-
-// Called by pthread to delete thread-local data stored by
-// pthread_setspecific().
-extern "C" inline void DeleteThreadLocalValue(void* value_holder) {
-  delete static_cast<ThreadLocalValueHolderBase*>(value_holder);
-}
-
-// Implements thread-local storage on pthreads-based systems.
-template <typename T>
-class GTEST_API_ ThreadLocal {
- public:
-  ThreadLocal()
-      : key_(CreateKey()), default_factory_(new DefaultValueHolderFactory()) {}
-  explicit ThreadLocal(const T& value)
-      : key_(CreateKey()),
-        default_factory_(new InstanceValueHolderFactory(value)) {}
-
-  ~ThreadLocal() {
-    // Destroys the managed object for the current thread, if any.
-    DeleteThreadLocalValue(pthread_getspecific(key_));
-
-    // Releases resources associated with the key.  This will *not*
-    // delete managed objects for other threads.
-    GTEST_CHECK_POSIX_SUCCESS_(pthread_key_delete(key_));
-  }
-
-  T* pointer() { return GetOrCreateValue(); }
-  const T* pointer() const { return GetOrCreateValue(); }
-  const T& get() const { return *pointer(); }
-  void set(const T& value) { *pointer() = value; }
-
- private:
-  // Holds a value of type T.
-  class ValueHolder : public ThreadLocalValueHolderBase {
-   public:
-    ValueHolder() : value_() {}
-    explicit ValueHolder(const T& value) : value_(value) {}
-
-    T* pointer() { return &value_; }
-
-   private:
-    T value_;
-    GTEST_DISALLOW_COPY_AND_ASSIGN_(ValueHolder);
-  };
-
-  static pthread_key_t CreateKey() {
-    pthread_key_t key;
-    // When a thread exits, DeleteThreadLocalValue() will be called on
-    // the object managed for that thread.
-    GTEST_CHECK_POSIX_SUCCESS_(
-        pthread_key_create(&key, &DeleteThreadLocalValue));
-    return key;
-  }
-
-  T* GetOrCreateValue() const {
-    ThreadLocalValueHolderBase* const holder =
-        static_cast<ThreadLocalValueHolderBase*>(pthread_getspecific(key_));
-    if (holder != nullptr) {
-      return CheckedDowncastToActualType<ValueHolder>(holder)->pointer();
-    }
-
-    ValueHolder* const new_holder = default_factory_->MakeNewHolder();
-    ThreadLocalValueHolderBase* const holder_base = new_holder;
-    GTEST_CHECK_POSIX_SUCCESS_(pthread_setspecific(key_, holder_base));
-    return new_holder->pointer();
-  }
-
-  class ValueHolderFactory {
-   public:
-    ValueHolderFactory() {}
-    virtual ~ValueHolderFactory() {}
-    virtual ValueHolder* MakeNewHolder() const = 0;
-
-   private:
-    GTEST_DISALLOW_COPY_AND_ASSIGN_(ValueHolderFactory);
-  };
-
-  class DefaultValueHolderFactory : public ValueHolderFactory {
-   public:
-    DefaultValueHolderFactory() {}
-    ValueHolder* MakeNewHolder() const override { return new ValueHolder(); }
-
-   private:
-    GTEST_DISALLOW_COPY_AND_ASSIGN_(DefaultValueHolderFactory);
-  };
-
-  class InstanceValueHolderFactory : public ValueHolderFactory {
-   public:
-    explicit InstanceValueHolderFactory(const T& value) : value_(value) {}
-    ValueHolder* MakeNewHolder() const override {
-      return new ValueHolder(value_);
-    }
-
-   private:
-    const T value_;  // The value for each thread.
-
-    GTEST_DISALLOW_COPY_AND_ASSIGN_(InstanceValueHolderFactory);
-  };
-
-  // A key pthreads uses for looking up per-thread values.
-  const pthread_key_t key_;
-  std::unique_ptr<ValueHolderFactory> default_factory_;
-
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(ThreadLocal);
-};
-
-# endif  // GTEST_HAS_MUTEX_AND_THREAD_LOCAL_
-
-#else  // GTEST_IS_THREADSAFE
-
-// A dummy implementation of synchronization primitives (mutex, lock,
-// and thread-local variable).  Necessary for compiling Google Test where
-// mutex is not supported - using Google Test in multiple threads is not
-// supported on such platforms.
-
-class Mutex {
- public:
-  Mutex() {}
-  void Lock() {}
-  void Unlock() {}
-  void AssertHeld() const {}
-};
-
-# define GTEST_DECLARE_STATIC_MUTEX_(mutex) \
-  extern ::testing::internal::Mutex mutex
-
-# define GTEST_DEFINE_STATIC_MUTEX_(mutex) ::testing::internal::Mutex mutex
-
-// We cannot name this class MutexLock because the ctor declaration would
-// conflict with a macro named MutexLock, which is defined on some
-// platforms. That macro is used as a defensive measure to prevent against
-// inadvertent misuses of MutexLock like "MutexLock(&mu)" rather than
-// "MutexLock l(&mu)".  Hence the typedef trick below.
-class GTestMutexLock {
- public:
-  explicit GTestMutexLock(Mutex*) {}  // NOLINT
-};
-
-typedef GTestMutexLock MutexLock;
-
-template <typename T>
-class GTEST_API_ ThreadLocal {
- public:
-  ThreadLocal() : value_() {}
-  explicit ThreadLocal(const T& value) : value_(value) {}
-  T* pointer() { return &value_; }
-  const T* pointer() const { return &value_; }
-  const T& get() const { return value_; }
-  void set(const T& value) { value_ = value; }
- private:
-  T value_;
-};
-
-#endif  // GTEST_IS_THREADSAFE
-
-// Returns the number of threads running in the process, or 0 to indicate that
-// we cannot detect it.
-GTEST_API_ size_t GetThreadCount();
-
-#if GTEST_OS_WINDOWS
-# define GTEST_PATH_SEP_ "\\"
-# define GTEST_HAS_ALT_PATH_SEP_ 1
-#else
-# define GTEST_PATH_SEP_ "/"
-# define GTEST_HAS_ALT_PATH_SEP_ 0
-#endif  // GTEST_OS_WINDOWS
-
-// Utilities for char.
-
-// isspace(int ch) and friends accept an unsigned char or EOF.  char
-// may be signed, depending on the compiler (or compiler flags).
-// Therefore we need to cast a char to unsigned char before calling
-// isspace(), etc.
-
-inline bool IsAlpha(char ch) {
-  return isalpha(static_cast<unsigned char>(ch)) != 0;
-}
-inline bool IsAlNum(char ch) {
-  return isalnum(static_cast<unsigned char>(ch)) != 0;
-}
-inline bool IsDigit(char ch) {
-  return isdigit(static_cast<unsigned char>(ch)) != 0;
-}
-inline bool IsLower(char ch) {
-  return islower(static_cast<unsigned char>(ch)) != 0;
-}
-inline bool IsSpace(char ch) {
-  return isspace(static_cast<unsigned char>(ch)) != 0;
-}
-inline bool IsUpper(char ch) {
-  return isupper(static_cast<unsigned char>(ch)) != 0;
-}
-inline bool IsXDigit(char ch) {
-  return isxdigit(static_cast<unsigned char>(ch)) != 0;
-}
-#ifdef __cpp_char8_t
-inline bool IsXDigit(char8_t ch) {
-  return isxdigit(static_cast<unsigned char>(ch)) != 0;
-}
-#endif
-inline bool IsXDigit(char16_t ch) {
-  const unsigned char low_byte = static_cast<unsigned char>(ch);
-  return ch == low_byte && isxdigit(low_byte) != 0;
-}
-inline bool IsXDigit(char32_t ch) {
-  const unsigned char low_byte = static_cast<unsigned char>(ch);
-  return ch == low_byte && isxdigit(low_byte) != 0;
-}
-inline bool IsXDigit(wchar_t ch) {
-  const unsigned char low_byte = static_cast<unsigned char>(ch);
-  return ch == low_byte && isxdigit(low_byte) != 0;
-}
-
-inline char ToLower(char ch) {
-  return static_cast<char>(tolower(static_cast<unsigned char>(ch)));
-}
-inline char ToUpper(char ch) {
-  return static_cast<char>(toupper(static_cast<unsigned char>(ch)));
-}
-
-inline std::string StripTrailingSpaces(std::string str) {
-  std::string::iterator it = str.end();
-  while (it != str.begin() && IsSpace(*--it))
-    it = str.erase(it);
-  return str;
-}
-
-// The testing::internal::posix namespace holds wrappers for common
-// POSIX functions.  These wrappers hide the differences between
-// Windows/MSVC and POSIX systems.  Since some compilers define these
-// standard functions as macros, the wrapper cannot have the same name
-// as the wrapped function.
-
-namespace posix {
-
-// Functions with a different name on Windows.
-
-#if GTEST_OS_WINDOWS
-
-typedef struct _stat StatStruct;
-
-# ifdef __BORLANDC__
-inline int DoIsATTY(int fd) { return isatty(fd); }
-inline int StrCaseCmp(const char* s1, const char* s2) {
-  return stricmp(s1, s2);
-}
-inline char* StrDup(const char* src) { return strdup(src); }
-# else  // !__BORLANDC__
-#  if GTEST_OS_WINDOWS_MOBILE
-inline int DoIsATTY(int /* fd */) { return 0; }
-#  else
-inline int DoIsATTY(int fd) { return _isatty(fd); }
-#  endif  // GTEST_OS_WINDOWS_MOBILE
-inline int StrCaseCmp(const char* s1, const char* s2) {
-  return _stricmp(s1, s2);
-}
-inline char* StrDup(const char* src) { return _strdup(src); }
-# endif  // __BORLANDC__
-
-# if GTEST_OS_WINDOWS_MOBILE
-inline int FileNo(FILE* file) { return reinterpret_cast<int>(_fileno(file)); }
-// Stat(), RmDir(), and IsDir() are not needed on Windows CE at this
-// time and thus not defined there.
-# else
-inline int FileNo(FILE* file) { return _fileno(file); }
-inline int Stat(const char* path, StatStruct* buf) { return _stat(path, buf); }
-inline int RmDir(const char* dir) { return _rmdir(dir); }
-inline bool IsDir(const StatStruct& st) {
-  return (_S_IFDIR & st.st_mode) != 0;
-}
-# endif  // GTEST_OS_WINDOWS_MOBILE
-
-#elif GTEST_OS_ESP8266
-typedef struct stat StatStruct;
-
-inline int FileNo(FILE* file) { return fileno(file); }
-inline int DoIsATTY(int fd) { return isatty(fd); }
-inline int Stat(const char* path, StatStruct* buf) {
-  // stat function not implemented on ESP8266
-  return 0;
-}
-inline int StrCaseCmp(const char* s1, const char* s2) {
-  return strcasecmp(s1, s2);
-}
-inline char* StrDup(const char* src) { return strdup(src); }
-inline int RmDir(const char* dir) { return rmdir(dir); }
-inline bool IsDir(const StatStruct& st) { return S_ISDIR(st.st_mode); }
-
-#else
-
-typedef struct stat StatStruct;
-
-inline int FileNo(FILE* file) { return fileno(file); }
-inline int DoIsATTY(int fd) { return isatty(fd); }
-inline int Stat(const char* path, StatStruct* buf) { return stat(path, buf); }
-inline int StrCaseCmp(const char* s1, const char* s2) {
-  return strcasecmp(s1, s2);
-}
-inline char* StrDup(const char* src) { return strdup(src); }
-inline int RmDir(const char* dir) { return rmdir(dir); }
-inline bool IsDir(const StatStruct& st) { return S_ISDIR(st.st_mode); }
-
-#endif  // GTEST_OS_WINDOWS
-
-inline int IsATTY(int fd) {
-  // DoIsATTY might change errno (for example ENOTTY in case you redirect stdout
-  // to a file on Linux), which is unexpected, so save the previous value, and
-  // restore it after the call.
-  int savedErrno = errno;
-  int isAttyValue = DoIsATTY(fd);
-  errno = savedErrno;
-
-  return isAttyValue;
-}
-
-// Functions deprecated by MSVC 8.0.
-
-GTEST_DISABLE_MSC_DEPRECATED_PUSH_()
-
-// ChDir(), FReopen(), FDOpen(), Read(), Write(), Close(), and
-// StrError() aren't needed on Windows CE at this time and thus not
-// defined there.
-
-#if !GTEST_OS_WINDOWS_MOBILE && !GTEST_OS_WINDOWS_PHONE && \
-    !GTEST_OS_WINDOWS_RT && !GTEST_OS_ESP8266 && !GTEST_OS_XTENSA
-inline int ChDir(const char* dir) { return chdir(dir); }
-#endif
-inline FILE* FOpen(const char* path, const char* mode) {
-#if GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MINGW
-  struct wchar_codecvt : public std::codecvt<wchar_t, char, std::mbstate_t> {};
-  std::wstring_convert<wchar_codecvt> converter;
-  std::wstring wide_path = converter.from_bytes(path);
-  std::wstring wide_mode = converter.from_bytes(mode);
-  return _wfopen(wide_path.c_str(), wide_mode.c_str());
-#else  // GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MINGW
-  return fopen(path, mode);
-#endif  // GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MINGW
-}
-#if !GTEST_OS_WINDOWS_MOBILE
-inline FILE *FReopen(const char* path, const char* mode, FILE* stream) {
-  return freopen(path, mode, stream);
-}
-inline FILE* FDOpen(int fd, const char* mode) { return fdopen(fd, mode); }
-#endif
-inline int FClose(FILE* fp) { return fclose(fp); }
-#if !GTEST_OS_WINDOWS_MOBILE
-inline int Read(int fd, void* buf, unsigned int count) {
-  return static_cast<int>(read(fd, buf, count));
-}
-inline int Write(int fd, const void* buf, unsigned int count) {
-  return static_cast<int>(write(fd, buf, count));
-}
-inline int Close(int fd) { return close(fd); }
-inline const char* StrError(int errnum) { return strerror(errnum); }
-#endif
-inline const char* GetEnv(const char* name) {
-#if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_WINDOWS_PHONE || \
-    GTEST_OS_WINDOWS_RT || GTEST_OS_ESP8266 || GTEST_OS_XTENSA
-  // We are on an embedded platform, which has no environment variables.
-  static_cast<void>(name);  // To prevent 'unused argument' warning.
-  return nullptr;
-#elif defined(__BORLANDC__) || defined(__SunOS_5_8) || defined(__SunOS_5_9)
-  // Environment variables which we programmatically clear will be set to the
-  // empty string rather than unset (NULL).  Handle that case.
-  const char* const env = getenv(name);
-  return (env != nullptr && env[0] != '\0') ? env : nullptr;
-#else
-  return getenv(name);
-#endif
-}
-
-GTEST_DISABLE_MSC_DEPRECATED_POP_()
-
-#if GTEST_OS_WINDOWS_MOBILE
-// Windows CE has no C library. The abort() function is used in
-// several places in Google Test. This implementation provides a reasonable
-// imitation of standard behaviour.
-[[noreturn]] void Abort();
-#else
-[[noreturn]] inline void Abort() { abort(); }
-#endif  // GTEST_OS_WINDOWS_MOBILE
-
-}  // namespace posix
-
-// MSVC "deprecates" snprintf and issues warnings wherever it is used.  In
-// order to avoid these warnings, we need to use _snprintf or _snprintf_s on
-// MSVC-based platforms.  We map the GTEST_SNPRINTF_ macro to the appropriate
-// function in order to achieve that.  We use macro definition here because
-// snprintf is a variadic function.
-#if _MSC_VER && !GTEST_OS_WINDOWS_MOBILE
-// MSVC 2005 and above support variadic macros.
-# define GTEST_SNPRINTF_(buffer, size, format, ...) \
-     _snprintf_s(buffer, size, size, format, __VA_ARGS__)
-#elif defined(_MSC_VER)
-// Windows CE does not define _snprintf_s
-# define GTEST_SNPRINTF_ _snprintf
-#else
-# define GTEST_SNPRINTF_ snprintf
-#endif
-
-// The biggest signed integer type the compiler supports.
-//
-// long long is guaranteed to be at least 64-bits in C++11.
-using BiggestInt = long long;  // NOLINT
-
-// The maximum number a BiggestInt can represent.
-constexpr BiggestInt kMaxBiggestInt = (std::numeric_limits<BiggestInt>::max)();
-
-// This template class serves as a compile-time function from size to
-// type.  It maps a size in bytes to a primitive type with that
-// size. e.g.
-//
-//   TypeWithSize<4>::UInt
-//
-// is typedef-ed to be unsigned int (unsigned integer made up of 4
-// bytes).
-//
-// Such functionality should belong to STL, but I cannot find it
-// there.
-//
-// Google Test uses this class in the implementation of floating-point
-// comparison.
-//
-// For now it only handles UInt (unsigned int) as that's all Google Test
-// needs.  Other types can be easily added in the future if need
-// arises.
-template <size_t size>
-class TypeWithSize {
- public:
-  // This prevents the user from using TypeWithSize<N> with incorrect
-  // values of N.
-  using UInt = void;
-};
-
-// The specialization for size 4.
-template <>
-class TypeWithSize<4> {
- public:
-  using Int = std::int32_t;
-  using UInt = std::uint32_t;
-};
-
-// The specialization for size 8.
-template <>
-class TypeWithSize<8> {
- public:
-  using Int = std::int64_t;
-  using UInt = std::uint64_t;
-};
-
-// Integer types of known sizes.
-using TimeInMillis = int64_t;  // Represents time in milliseconds.
-
-// Utilities for command line flags and environment variables.
-
-// Macro for referencing flags.
-#if !defined(GTEST_FLAG)
-# define GTEST_FLAG(name) FLAGS_gtest_##name
-#endif  // !defined(GTEST_FLAG)
-
-#if !defined(GTEST_USE_OWN_FLAGFILE_FLAG_)
-# define GTEST_USE_OWN_FLAGFILE_FLAG_ 1
-#endif  // !defined(GTEST_USE_OWN_FLAGFILE_FLAG_)
-
-#if !defined(GTEST_DECLARE_bool_)
-# define GTEST_FLAG_SAVER_ ::testing::internal::GTestFlagSaver
-
-// Macros for declaring flags.
-#define GTEST_DECLARE_bool_(name)          \
-  namespace testing {                      \
-  GTEST_API_ extern bool GTEST_FLAG(name); \
-  }
-#define GTEST_DECLARE_int32_(name)                 \
-  namespace testing {                              \
-  GTEST_API_ extern std::int32_t GTEST_FLAG(name); \
-  }
-#define GTEST_DECLARE_string_(name)                 \
-  namespace testing {                               \
-  GTEST_API_ extern ::std::string GTEST_FLAG(name); \
-  }
-
-// Macros for defining flags.
-#define GTEST_DEFINE_bool_(name, default_val, doc)  \
-  namespace testing {                               \
-  GTEST_API_ bool GTEST_FLAG(name) = (default_val); \
-  }
-#define GTEST_DEFINE_int32_(name, default_val, doc)         \
-  namespace testing {                                       \
-  GTEST_API_ std::int32_t GTEST_FLAG(name) = (default_val); \
-  }
-#define GTEST_DEFINE_string_(name, default_val, doc)         \
-  namespace testing {                                        \
-  GTEST_API_ ::std::string GTEST_FLAG(name) = (default_val); \
-  }
-
-#endif  // !defined(GTEST_DECLARE_bool_)
-
-#if !defined(GTEST_FLAG_GET)
-#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
-#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
-#endif  // !defined(GTEST_FLAG_GET)
-
-// Thread annotations
-#if !defined(GTEST_EXCLUSIVE_LOCK_REQUIRED_)
-# define GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks)
-# define GTEST_LOCK_EXCLUDED_(locks)
-#endif  // !defined(GTEST_EXCLUSIVE_LOCK_REQUIRED_)
-
-// Parses 'str' for a 32-bit signed integer.  If successful, writes the result
-// to *value and returns true; otherwise leaves *value unchanged and returns
-// false.
-GTEST_API_ bool ParseInt32(const Message& src_text, const char* str,
-                           int32_t* value);
-
-// Parses a bool/int32_t/string from the environment variable
-// corresponding to the given Google Test flag.
-bool BoolFromGTestEnv(const char* flag, bool default_val);
-GTEST_API_ int32_t Int32FromGTestEnv(const char* flag, int32_t default_val);
-std::string OutputFlagAlsoCheckEnvVar();
-const char* StringFromGTestEnv(const char* flag, const char* default_val);
-
-}  // namespace internal
-}  // namespace testing
-
-#if !defined(GTEST_INTERNAL_DEPRECATED)
-
-// Internal Macro to mark an API deprecated, for googletest usage only
-// Usage: class GTEST_INTERNAL_DEPRECATED(message) MyClass or
-// GTEST_INTERNAL_DEPRECATED(message) <return_type> myFunction(); Every usage of
-// a deprecated entity will trigger a warning when compiled with
-// `-Wdeprecated-declarations` option (clang, gcc, any __GNUC__ compiler).
-// For msvc /W3 option will need to be used
-// Note that for 'other' compilers this macro evaluates to nothing to prevent
-// compilations errors.
-#if defined(_MSC_VER)
-#define GTEST_INTERNAL_DEPRECATED(message) __declspec(deprecated(message))
-#elif defined(__GNUC__)
-#define GTEST_INTERNAL_DEPRECATED(message) __attribute__((deprecated(message)))
-#else
-#define GTEST_INTERNAL_DEPRECATED(message)
-#endif
-
-#endif  // !defined(GTEST_INTERNAL_DEPRECATED)
-
-#if GTEST_HAS_ABSL
-// Always use absl::any for UniversalPrinter<> specializations if googletest
-// is built with absl support.
-#define GTEST_INTERNAL_HAS_ANY 1
-#include "absl/types/any.h"
-namespace testing {
-namespace internal {
-using Any = ::absl::any;
-}  // namespace internal
-}  // namespace testing
-#else
-#ifdef __has_include
-#if __has_include(<any>) && __cplusplus >= 201703L
-// Otherwise for C++17 and higher use std::any for UniversalPrinter<>
-// specializations.
-#define GTEST_INTERNAL_HAS_ANY 1
-#include <any>
-namespace testing {
-namespace internal {
-using Any = ::std::any;
-}  // namespace internal
-}  // namespace testing
-// The case where absl is configured NOT to alias std::any is not
-// supported.
-#endif  // __has_include(<any>) && __cplusplus >= 201703L
-#endif  // __has_include
-#endif  // GTEST_HAS_ABSL
-
-#if GTEST_HAS_ABSL
-// Always use absl::optional for UniversalPrinter<> specializations if
-// googletest is built with absl support.
-#define GTEST_INTERNAL_HAS_OPTIONAL 1
-#include "absl/types/optional.h"
-namespace testing {
-namespace internal {
-template <typename T>
-using Optional = ::absl::optional<T>;
-}  // namespace internal
-}  // namespace testing
-#else
-#ifdef __has_include
-#if __has_include(<optional>) && __cplusplus >= 201703L
-// Otherwise for C++17 and higher use std::optional for UniversalPrinter<>
-// specializations.
-#define GTEST_INTERNAL_HAS_OPTIONAL 1
-#include <optional>
-namespace testing {
-namespace internal {
-template <typename T>
-using Optional = ::std::optional<T>;
-}  // namespace internal
-}  // namespace testing
-// The case where absl is configured NOT to alias std::optional is not
-// supported.
-#endif  // __has_include(<optional>) && __cplusplus >= 201703L
-#endif  // __has_include
-#endif  // GTEST_HAS_ABSL
-
-#if GTEST_HAS_ABSL
-// Always use absl::string_view for Matcher<> specializations if googletest
-// is built with absl support.
-# define GTEST_INTERNAL_HAS_STRING_VIEW 1
-#include "absl/strings/string_view.h"
-namespace testing {
-namespace internal {
-using StringView = ::absl::string_view;
-}  // namespace internal
-}  // namespace testing
-#else
-# ifdef __has_include
-#   if __has_include(<string_view>) && __cplusplus >= 201703L
-// Otherwise for C++17 and higher use std::string_view for Matcher<>
-// specializations.
-#   define GTEST_INTERNAL_HAS_STRING_VIEW 1
-#include <string_view>
-namespace testing {
-namespace internal {
-using StringView = ::std::string_view;
-}  // namespace internal
-}  // namespace testing
-// The case where absl is configured NOT to alias std::string_view is not
-// supported.
-#  endif  // __has_include(<string_view>) && __cplusplus >= 201703L
-# endif  // __has_include
-#endif  // GTEST_HAS_ABSL
-
-#if GTEST_HAS_ABSL
-// Always use absl::variant for UniversalPrinter<> specializations if googletest
-// is built with absl support.
-#define GTEST_INTERNAL_HAS_VARIANT 1
-#include "absl/types/variant.h"
-namespace testing {
-namespace internal {
-template <typename... T>
-using Variant = ::absl::variant<T...>;
-}  // namespace internal
-}  // namespace testing
-#else
-#ifdef __has_include
-#if __has_include(<variant>) && __cplusplus >= 201703L
-// Otherwise for C++17 and higher use std::variant for UniversalPrinter<>
-// specializations.
-#define GTEST_INTERNAL_HAS_VARIANT 1
-#include <variant>
-namespace testing {
-namespace internal {
-template <typename... T>
-using Variant = ::std::variant<T...>;
-}  // namespace internal
-}  // namespace testing
-// The case where absl is configured NOT to alias std::variant is not supported.
-#endif  // __has_include(<variant>) && __cplusplus >= 201703L
-#endif  // __has_include
-#endif  // GTEST_HAS_ABSL
-
-#endif  // GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
diff --git a/src/include/gromacs/external/googletest/googletest/include/gtest/internal/gtest-string.h b/src/include/gromacs/external/googletest/googletest/include/gtest/internal/gtest-string.h
deleted file mode 100644 (file)
index 0f2bcbe..0000000
+++ /dev/null
@@ -1,173 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// The Google C++ Testing and Mocking Framework (Google Test)
-//
-// This header file declares the String class and functions used internally by
-// Google Test.  They are subject to change without notice. They should not used
-// by code external to Google Test.
-//
-// This header file is #included by gtest-internal.h.
-// It should not be #included by other files.
-
-#ifndef GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_
-#define GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_
-
-#ifdef __BORLANDC__
-// string.h is not guaranteed to provide strcpy on C++ Builder.
-# include <mem.h>
-#endif
-
-#include <string.h>
-#include <cstdint>
-#include <string>
-
-#include "gtest/internal/gtest-port.h"
-
-namespace testing {
-namespace internal {
-
-// String - an abstract class holding static string utilities.
-class GTEST_API_ String {
- public:
-  // Static utility methods
-
-  // Clones a 0-terminated C string, allocating memory using new.  The
-  // caller is responsible for deleting the return value using
-  // delete[].  Returns the cloned string, or NULL if the input is
-  // NULL.
-  //
-  // This is different from strdup() in string.h, which allocates
-  // memory using malloc().
-  static const char* CloneCString(const char* c_str);
-
-#if GTEST_OS_WINDOWS_MOBILE
-  // Windows CE does not have the 'ANSI' versions of Win32 APIs. To be
-  // able to pass strings to Win32 APIs on CE we need to convert them
-  // to 'Unicode', UTF-16.
-
-  // Creates a UTF-16 wide string from the given ANSI string, allocating
-  // memory using new. The caller is responsible for deleting the return
-  // value using delete[]. Returns the wide string, or NULL if the
-  // input is NULL.
-  //
-  // The wide string is created using the ANSI codepage (CP_ACP) to
-  // match the behaviour of the ANSI versions of Win32 calls and the
-  // C runtime.
-  static LPCWSTR AnsiToUtf16(const char* c_str);
-
-  // Creates an ANSI string from the given wide string, allocating
-  // memory using new. The caller is responsible for deleting the return
-  // value using delete[]. Returns the ANSI string, or NULL if the
-  // input is NULL.
-  //
-  // The returned string is created using the ANSI codepage (CP_ACP) to
-  // match the behaviour of the ANSI versions of Win32 calls and the
-  // C runtime.
-  static const char* Utf16ToAnsi(LPCWSTR utf16_str);
-#endif
-
-  // Compares two C strings.  Returns true if and only if they have the same
-  // content.
-  //
-  // Unlike strcmp(), this function can handle NULL argument(s).  A
-  // NULL C string is considered different to any non-NULL C string,
-  // including the empty string.
-  static bool CStringEquals(const char* lhs, const char* rhs);
-
-  // Converts a wide C string to a String using the UTF-8 encoding.
-  // NULL will be converted to "(null)".  If an error occurred during
-  // the conversion, "(failed to convert from wide string)" is
-  // returned.
-  static std::string ShowWideCString(const wchar_t* wide_c_str);
-
-  // Compares two wide C strings.  Returns true if and only if they have the
-  // same content.
-  //
-  // Unlike wcscmp(), this function can handle NULL argument(s).  A
-  // NULL C string is considered different to any non-NULL C string,
-  // including the empty string.
-  static bool WideCStringEquals(const wchar_t* lhs, const wchar_t* rhs);
-
-  // Compares two C strings, ignoring case.  Returns true if and only if
-  // they have the same content.
-  //
-  // Unlike strcasecmp(), this function can handle NULL argument(s).
-  // A NULL C string is considered different to any non-NULL C string,
-  // including the empty string.
-  static bool CaseInsensitiveCStringEquals(const char* lhs,
-                                           const char* rhs);
-
-  // Compares two wide C strings, ignoring case.  Returns true if and only if
-  // they have the same content.
-  //
-  // Unlike wcscasecmp(), this function can handle NULL argument(s).
-  // A NULL C string is considered different to any non-NULL wide C string,
-  // including the empty string.
-  // NB: The implementations on different platforms slightly differ.
-  // On windows, this method uses _wcsicmp which compares according to LC_CTYPE
-  // environment variable. On GNU platform this method uses wcscasecmp
-  // which compares according to LC_CTYPE category of the current locale.
-  // On MacOS X, it uses towlower, which also uses LC_CTYPE category of the
-  // current locale.
-  static bool CaseInsensitiveWideCStringEquals(const wchar_t* lhs,
-                                               const wchar_t* rhs);
-
-  // Returns true if and only if the given string ends with the given suffix,
-  // ignoring case. Any string is considered to end with an empty suffix.
-  static bool EndsWithCaseInsensitive(
-      const std::string& str, const std::string& suffix);
-
-  // Formats an int value as "%02d".
-  static std::string FormatIntWidth2(int value);  // "%02d" for width == 2
-
-  // Formats an int value to given width with leading zeros.
-  static std::string FormatIntWidthN(int value, int width);
-
-  // Formats an int value as "%X".
-  static std::string FormatHexInt(int value);
-
-  // Formats an int value as "%X".
-  static std::string FormatHexUInt32(uint32_t value);
-
-  // Formats a byte as "%02X".
-  static std::string FormatByte(unsigned char value);
-
- private:
-  String();  // Not meant to be instantiated.
-};  // class String
-
-// Gets the content of the stringstream's buffer as an std::string.  Each '\0'
-// character in the buffer is replaced with "\\0".
-GTEST_API_ std::string StringStreamToString(::std::stringstream* stream);
-
-}  // namespace internal
-}  // namespace testing
-
-#endif  // GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_STRING_H_
diff --git a/src/include/gromacs/external/googletest/googletest/include/gtest/internal/gtest-type-util.h b/src/include/gromacs/external/googletest/googletest/include/gtest/internal/gtest-type-util.h
deleted file mode 100644 (file)
index 90910e9..0000000
+++ /dev/null
@@ -1,181 +0,0 @@
-// Copyright 2008 Google Inc.
-// All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Type utilities needed for implementing typed and type-parameterized
-// tests.
-
-#ifndef GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_
-#define GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_
-
-#include "gtest/internal/gtest-port.h"
-
-// #ifdef __GNUC__ is too general here.  It is possible to use gcc without using
-// libstdc++ (which is where cxxabi.h comes from).
-# if GTEST_HAS_CXXABI_H_
-#  include <cxxabi.h>
-# elif defined(__HP_aCC)
-#  include <acxx_demangle.h>
-# endif  // GTEST_HASH_CXXABI_H_
-
-namespace testing {
-namespace internal {
-
-// Canonicalizes a given name with respect to the Standard C++ Library.
-// This handles removing the inline namespace within `std` that is
-// used by various standard libraries (e.g., `std::__1`).  Names outside
-// of namespace std are returned unmodified.
-inline std::string CanonicalizeForStdLibVersioning(std::string s) {
-  static const char prefix[] = "std::__";
-  if (s.compare(0, strlen(prefix), prefix) == 0) {
-    std::string::size_type end = s.find("::", strlen(prefix));
-    if (end != s.npos) {
-      // Erase everything between the initial `std` and the second `::`.
-      s.erase(strlen("std"), end - strlen("std"));
-    }
-  }
-  return s;
-}
-
-#if GTEST_HAS_RTTI
-// GetTypeName(const std::type_info&) returns a human-readable name of type T.
-inline std::string GetTypeName(const std::type_info& type) {
-  const char* const name = type.name();
-#if GTEST_HAS_CXXABI_H_ || defined(__HP_aCC)
-  int status = 0;
-  // gcc's implementation of typeid(T).name() mangles the type name,
-  // so we have to demangle it.
-#if GTEST_HAS_CXXABI_H_
-  using abi::__cxa_demangle;
-#endif  // GTEST_HAS_CXXABI_H_
-  char* const readable_name = __cxa_demangle(name, nullptr, nullptr, &status);
-  const std::string name_str(status == 0 ? readable_name : name);
-  free(readable_name);
-  return CanonicalizeForStdLibVersioning(name_str);
-#else
-  return name;
-#endif  // GTEST_HAS_CXXABI_H_ || __HP_aCC
-}
-#endif  // GTEST_HAS_RTTI
-
-// GetTypeName<T>() returns a human-readable name of type T if and only if
-// RTTI is enabled, otherwise it returns a dummy type name.
-// NB: This function is also used in Google Mock, so don't move it inside of
-// the typed-test-only section below.
-template <typename T>
-std::string GetTypeName() {
-#if GTEST_HAS_RTTI
-  return GetTypeName(typeid(T));
-#else
-  return "<type>";
-#endif  // GTEST_HAS_RTTI
-}
-
-// A unique type indicating an empty node
-struct None {};
-
-# define GTEST_TEMPLATE_ template <typename T> class
-
-// The template "selector" struct TemplateSel<Tmpl> is used to
-// represent Tmpl, which must be a class template with one type
-// parameter, as a type.  TemplateSel<Tmpl>::Bind<T>::type is defined
-// as the type Tmpl<T>.  This allows us to actually instantiate the
-// template "selected" by TemplateSel<Tmpl>.
-//
-// This trick is necessary for simulating typedef for class templates,
-// which C++ doesn't support directly.
-template <GTEST_TEMPLATE_ Tmpl>
-struct TemplateSel {
-  template <typename T>
-  struct Bind {
-    typedef Tmpl<T> type;
-  };
-};
-
-# define GTEST_BIND_(TmplSel, T) \
-  TmplSel::template Bind<T>::type
-
-template <GTEST_TEMPLATE_ Head_, GTEST_TEMPLATE_... Tail_>
-struct Templates {
-  using Head = TemplateSel<Head_>;
-  using Tail = Templates<Tail_...>;
-};
-
-template <GTEST_TEMPLATE_ Head_>
-struct Templates<Head_> {
-  using Head = TemplateSel<Head_>;
-  using Tail = None;
-};
-
-// Tuple-like type lists
-template <typename Head_, typename... Tail_>
-struct Types {
-  using Head = Head_;
-  using Tail = Types<Tail_...>;
-};
-
-template <typename Head_>
-struct Types<Head_> {
-  using Head = Head_;
-  using Tail = None;
-};
-
-// Helper metafunctions to tell apart a single type from types
-// generated by ::testing::Types
-template <typename... Ts>
-struct ProxyTypeList {
-  using type = Types<Ts...>;
-};
-
-template <typename>
-struct is_proxy_type_list : std::false_type {};
-
-template <typename... Ts>
-struct is_proxy_type_list<ProxyTypeList<Ts...>> : std::true_type {};
-
-// Generator which conditionally creates type lists.
-// It recognizes if a requested type list should be created
-// and prevents creating a new type list nested within another one.
-template <typename T>
-struct GenerateTypeList {
- private:
-  using proxy = typename std::conditional<is_proxy_type_list<T>::value, T,
-                                          ProxyTypeList<T>>::type;
-
- public:
-  using type = typename proxy::type;
-};
-
-}  // namespace internal
-
-template <typename... Ts>
-using Types = internal::ProxyTypeList<Ts...>;
-
-}  // namespace testing
-
-#endif  // GOOGLETEST_INCLUDE_GTEST_INTERNAL_GTEST_TYPE_UTIL_H_
diff --git a/src/include/gromacs/external/googletest/googletest/samples/prime_tables.h b/src/include/gromacs/external/googletest/googletest/samples/prime_tables.h
deleted file mode 100644 (file)
index 3a10352..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-// Copyright 2008 Google Inc.
-// All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-
-// This provides interface PrimeTable that determines whether a number is a
-// prime and determines a next prime number. This interface is used
-// in Google Test samples demonstrating use of parameterized tests.
-
-#ifndef GOOGLETEST_SAMPLES_PRIME_TABLES_H_
-#define GOOGLETEST_SAMPLES_PRIME_TABLES_H_
-
-#include <algorithm>
-
-// The prime table interface.
-class PrimeTable {
- public:
-  virtual ~PrimeTable() {}
-
-  // Returns true if and only if n is a prime number.
-  virtual bool IsPrime(int n) const = 0;
-
-  // Returns the smallest prime number greater than p; or returns -1
-  // if the next prime is beyond the capacity of the table.
-  virtual int GetNextPrime(int p) const = 0;
-};
-
-// Implementation #1 calculates the primes on-the-fly.
-class OnTheFlyPrimeTable : public PrimeTable {
- public:
-  bool IsPrime(int n) const override {
-    if (n <= 1) return false;
-
-    for (int i = 2; i*i <= n; i++) {
-      // n is divisible by an integer other than 1 and itself.
-      if ((n % i) == 0) return false;
-    }
-
-    return true;
-  }
-
-  int GetNextPrime(int p) const override {
-    if (p < 0) return -1;
-
-    for (int n = p + 1;; n++) {
-      if (IsPrime(n)) return n;
-    }
-  }
-};
-
-// Implementation #2 pre-calculates the primes and stores the result
-// in an array.
-class PreCalculatedPrimeTable : public PrimeTable {
- public:
-  // 'max' specifies the maximum number the prime table holds.
-  explicit PreCalculatedPrimeTable(int max)
-      : is_prime_size_(max + 1), is_prime_(new bool[max + 1]) {
-    CalculatePrimesUpTo(max);
-  }
-  ~PreCalculatedPrimeTable() override { delete[] is_prime_; }
-
-  bool IsPrime(int n) const override {
-    return 0 <= n && n < is_prime_size_ && is_prime_[n];
-  }
-
-  int GetNextPrime(int p) const override {
-    for (int n = p + 1; n < is_prime_size_; n++) {
-      if (is_prime_[n]) return n;
-    }
-
-    return -1;
-  }
-
- private:
-  void CalculatePrimesUpTo(int max) {
-    ::std::fill(is_prime_, is_prime_ + is_prime_size_, true);
-    is_prime_[0] = is_prime_[1] = false;
-
-    // Checks every candidate for prime number (we know that 2 is the only even
-    // prime).
-    for (int i = 2; i*i <= max; i += i%2+1) {
-      if (!is_prime_[i]) continue;
-
-      // Marks all multiples of i (except i itself) as non-prime.
-      // We are starting here from i-th multiplier, because all smaller
-      // complex numbers were already marked.
-      for (int j = i*i; j <= max; j += i) {
-        is_prime_[j] = false;
-      }
-    }
-  }
-
-  const int is_prime_size_;
-  bool* const is_prime_;
-
-  // Disables compiler warning "assignment operator could not be generated."
-  void operator=(const PreCalculatedPrimeTable& rhs);
-};
-
-#endif  // GOOGLETEST_SAMPLES_PRIME_TABLES_H_
diff --git a/src/include/gromacs/external/googletest/googletest/samples/sample1.h b/src/include/gromacs/external/googletest/googletest/samples/sample1.h
deleted file mode 100644 (file)
index ba392cf..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// A sample program demonstrating using Google C++ testing framework.
-
-#ifndef GOOGLETEST_SAMPLES_SAMPLE1_H_
-#define GOOGLETEST_SAMPLES_SAMPLE1_H_
-
-// Returns n! (the factorial of n).  For negative n, n! is defined to be 1.
-int Factorial(int n);
-
-// Returns true if and only if n is a prime number.
-bool IsPrime(int n);
-
-#endif  // GOOGLETEST_SAMPLES_SAMPLE1_H_
diff --git a/src/include/gromacs/external/googletest/googletest/samples/sample2.h b/src/include/gromacs/external/googletest/googletest/samples/sample2.h
deleted file mode 100644 (file)
index 0f98689..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// A sample program demonstrating using Google C++ testing framework.
-
-#ifndef GOOGLETEST_SAMPLES_SAMPLE2_H_
-#define GOOGLETEST_SAMPLES_SAMPLE2_H_
-
-#include <string.h>
-
-
-// A simple string class.
-class MyString {
- private:
-  const char* c_string_;
-  const MyString& operator=(const MyString& rhs);
-
- public:
-  // Clones a 0-terminated C string, allocating memory using new.
-  static const char* CloneCString(const char* a_c_string);
-
-  ////////////////////////////////////////////////////////////
-  //
-  // C'tors
-
-  // The default c'tor constructs a NULL string.
-  MyString() : c_string_(nullptr) {}
-
-  // Constructs a MyString by cloning a 0-terminated C string.
-  explicit MyString(const char* a_c_string) : c_string_(nullptr) {
-    Set(a_c_string);
-  }
-
-  // Copy c'tor
-  MyString(const MyString& string) : c_string_(nullptr) {
-    Set(string.c_string_);
-  }
-
-  ////////////////////////////////////////////////////////////
-  //
-  // D'tor.  MyString is intended to be a final class, so the d'tor
-  // doesn't need to be virtual.
-  ~MyString() { delete[] c_string_; }
-
-  // Gets the 0-terminated C string this MyString object represents.
-  const char* c_string() const { return c_string_; }
-
-  size_t Length() const { return c_string_ == nullptr ? 0 : strlen(c_string_); }
-
-  // Sets the 0-terminated C string this MyString object represents.
-  void Set(const char* c_string);
-};
-
-#endif  // GOOGLETEST_SAMPLES_SAMPLE2_H_
diff --git a/src/include/gromacs/external/googletest/googletest/samples/sample3-inl.h b/src/include/gromacs/external/googletest/googletest/samples/sample3-inl.h
deleted file mode 100644 (file)
index 659e0f0..0000000
+++ /dev/null
@@ -1,172 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// A sample program demonstrating using Google C++ testing framework.
-
-#ifndef GOOGLETEST_SAMPLES_SAMPLE3_INL_H_
-#define GOOGLETEST_SAMPLES_SAMPLE3_INL_H_
-
-#include <stddef.h>
-
-
-// Queue is a simple queue implemented as a singled-linked list.
-//
-// The element type must support copy constructor.
-template <typename E>  // E is the element type
-class Queue;
-
-// QueueNode is a node in a Queue, which consists of an element of
-// type E and a pointer to the next node.
-template <typename E>  // E is the element type
-class QueueNode {
-  friend class Queue<E>;
-
- public:
-  // Gets the element in this node.
-  const E& element() const { return element_; }
-
-  // Gets the next node in the queue.
-  QueueNode* next() { return next_; }
-  const QueueNode* next() const { return next_; }
-
- private:
-  // Creates a node with a given element value.  The next pointer is
-  // set to NULL.
-  explicit QueueNode(const E& an_element)
-      : element_(an_element), next_(nullptr) {}
-
-  // We disable the default assignment operator and copy c'tor.
-  const QueueNode& operator = (const QueueNode&);
-  QueueNode(const QueueNode&);
-
-  E element_;
-  QueueNode* next_;
-};
-
-template <typename E>  // E is the element type.
-class Queue {
- public:
-  // Creates an empty queue.
-  Queue() : head_(nullptr), last_(nullptr), size_(0) {}
-
-  // D'tor.  Clears the queue.
-  ~Queue() { Clear(); }
-
-  // Clears the queue.
-  void Clear() {
-    if (size_ > 0) {
-      // 1. Deletes every node.
-      QueueNode<E>* node = head_;
-      QueueNode<E>* next = node->next();
-      for (; ;) {
-        delete node;
-        node = next;
-        if (node == nullptr) break;
-        next = node->next();
-      }
-
-      // 2. Resets the member variables.
-      head_ = last_ = nullptr;
-      size_ = 0;
-    }
-  }
-
-  // Gets the number of elements.
-  size_t Size() const { return size_; }
-
-  // Gets the first element of the queue, or NULL if the queue is empty.
-  QueueNode<E>* Head() { return head_; }
-  const QueueNode<E>* Head() const { return head_; }
-
-  // Gets the last element of the queue, or NULL if the queue is empty.
-  QueueNode<E>* Last() { return last_; }
-  const QueueNode<E>* Last() const { return last_; }
-
-  // Adds an element to the end of the queue.  A copy of the element is
-  // created using the copy constructor, and then stored in the queue.
-  // Changes made to the element in the queue doesn't affect the source
-  // object, and vice versa.
-  void Enqueue(const E& element) {
-    QueueNode<E>* new_node = new QueueNode<E>(element);
-
-    if (size_ == 0) {
-      head_ = last_ = new_node;
-      size_ = 1;
-    } else {
-      last_->next_ = new_node;
-      last_ = new_node;
-      size_++;
-    }
-  }
-
-  // Removes the head of the queue and returns it.  Returns NULL if
-  // the queue is empty.
-  E* Dequeue() {
-    if (size_ == 0) {
-      return nullptr;
-    }
-
-    const QueueNode<E>* const old_head = head_;
-    head_ = head_->next_;
-    size_--;
-    if (size_ == 0) {
-      last_ = nullptr;
-    }
-
-    E* element = new E(old_head->element());
-    delete old_head;
-
-    return element;
-  }
-
-  // Applies a function/functor on each element of the queue, and
-  // returns the result in a new queue.  The original queue is not
-  // affected.
-  template <typename F>
-  Queue* Map(F function) const {
-    Queue* new_queue = new Queue();
-    for (const QueueNode<E>* node = head_; node != nullptr;
-         node = node->next_) {
-      new_queue->Enqueue(function(node->element()));
-    }
-
-    return new_queue;
-  }
-
- private:
-  QueueNode<E>* head_;  // The first node of the queue.
-  QueueNode<E>* last_;  // The last node of the queue.
-  size_t size_;  // The number of elements in the queue.
-
-  // We disallow copying a queue.
-  Queue(const Queue&);
-  const Queue& operator = (const Queue&);
-};
-
-#endif  // GOOGLETEST_SAMPLES_SAMPLE3_INL_H_
diff --git a/src/include/gromacs/external/googletest/googletest/samples/sample4.h b/src/include/gromacs/external/googletest/googletest/samples/sample4.h
deleted file mode 100644 (file)
index 0c4ed92..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// A sample program demonstrating using Google C++ testing framework.
-#ifndef GOOGLETEST_SAMPLES_SAMPLE4_H_
-#define GOOGLETEST_SAMPLES_SAMPLE4_H_
-
-// A simple monotonic counter.
-class Counter {
- private:
-  int counter_;
-
- public:
-  // Creates a counter that starts at 0.
-  Counter() : counter_(0) {}
-
-  // Returns the current counter value, and increments it.
-  int Increment();
-
-  // Returns the current counter value, and decrements it.
-  int Decrement();
-
-  // Prints the current counter value to STDOUT.
-  void Print() const;
-};
-
-#endif  // GOOGLETEST_SAMPLES_SAMPLE4_H_
diff --git a/src/include/gromacs/external/googletest/googletest/src/gtest-internal-inl.h b/src/include/gromacs/external/googletest/googletest/src/gtest-internal-inl.h
deleted file mode 100644 (file)
index 075b84c..0000000
+++ /dev/null
@@ -1,1204 +0,0 @@
-// Copyright 2005, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Utility functions and classes used by the Google C++ testing framework.//
-// This file contains purely Google Test's internal implementation.  Please
-// DO NOT #INCLUDE IT IN A USER PROGRAM.
-
-#ifndef GOOGLETEST_SRC_GTEST_INTERNAL_INL_H_
-#define GOOGLETEST_SRC_GTEST_INTERNAL_INL_H_
-
-#ifndef _WIN32_WCE
-# include <errno.h>
-#endif  // !_WIN32_WCE
-#include <stddef.h>
-#include <stdlib.h>  // For strtoll/_strtoul64/malloc/free.
-#include <string.h>  // For memmove.
-
-#include <algorithm>
-#include <cstdint>
-#include <memory>
-#include <string>
-#include <vector>
-
-#include "gtest/internal/gtest-port.h"
-
-#if GTEST_CAN_STREAM_RESULTS_
-# include <arpa/inet.h>  // NOLINT
-# include <netdb.h>  // NOLINT
-#endif
-
-#if GTEST_OS_WINDOWS
-# include <windows.h>  // NOLINT
-#endif  // GTEST_OS_WINDOWS
-
-#include "gtest/gtest.h"
-#include "gtest/gtest-spi.h"
-
-GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \
-/* class A needs to have dll-interface to be used by clients of class B */)
-
-// Declares the flags.
-//
-// We don't want the users to modify this flag in the code, but want
-// Google Test's own unit tests to be able to access it. Therefore we
-// declare it here as opposed to in gtest.h.
-GTEST_DECLARE_bool_(death_test_use_fork);
-
-namespace testing {
-namespace internal {
-
-// The value of GetTestTypeId() as seen from within the Google Test
-// library.  This is solely for testing GetTestTypeId().
-GTEST_API_ extern const TypeId kTestTypeIdInGoogleTest;
-
-// A valid random seed must be in [1, kMaxRandomSeed].
-const int kMaxRandomSeed = 99999;
-
-// g_help_flag is true if and only if the --help flag or an equivalent form
-// is specified on the command line.
-GTEST_API_ extern bool g_help_flag;
-
-// Returns the current time in milliseconds.
-GTEST_API_ TimeInMillis GetTimeInMillis();
-
-// Returns true if and only if Google Test should use colors in the output.
-GTEST_API_ bool ShouldUseColor(bool stdout_is_tty);
-
-// Formats the given time in milliseconds as seconds.
-GTEST_API_ std::string FormatTimeInMillisAsSeconds(TimeInMillis ms);
-
-// Converts the given time in milliseconds to a date string in the ISO 8601
-// format, without the timezone information.  N.B.: due to the use the
-// non-reentrant localtime() function, this function is not thread safe.  Do
-// not use it in any code that can be called from multiple threads.
-GTEST_API_ std::string FormatEpochTimeInMillisAsIso8601(TimeInMillis ms);
-
-// Parses a string for an Int32 flag, in the form of "--flag=value".
-//
-// On success, stores the value of the flag in *value, and returns
-// true.  On failure, returns false without changing *value.
-GTEST_API_ bool ParseFlag(const char* str, const char* flag, int32_t* value);
-
-// Returns a random seed in range [1, kMaxRandomSeed] based on the
-// given --gtest_random_seed flag value.
-inline int GetRandomSeedFromFlag(int32_t random_seed_flag) {
-  const unsigned int raw_seed = (random_seed_flag == 0) ?
-      static_cast<unsigned int>(GetTimeInMillis()) :
-      static_cast<unsigned int>(random_seed_flag);
-
-  // Normalizes the actual seed to range [1, kMaxRandomSeed] such that
-  // it's easy to type.
-  const int normalized_seed =
-      static_cast<int>((raw_seed - 1U) %
-                       static_cast<unsigned int>(kMaxRandomSeed)) + 1;
-  return normalized_seed;
-}
-
-// Returns the first valid random seed after 'seed'.  The behavior is
-// undefined if 'seed' is invalid.  The seed after kMaxRandomSeed is
-// considered to be 1.
-inline int GetNextRandomSeed(int seed) {
-  GTEST_CHECK_(1 <= seed && seed <= kMaxRandomSeed)
-      << "Invalid random seed " << seed << " - must be in [1, "
-      << kMaxRandomSeed << "].";
-  const int next_seed = seed + 1;
-  return (next_seed > kMaxRandomSeed) ? 1 : next_seed;
-}
-
-// This class saves the values of all Google Test flags in its c'tor, and
-// restores them in its d'tor.
-class GTestFlagSaver {
- public:
-  // The c'tor.
-  GTestFlagSaver() {
-    also_run_disabled_tests_ = GTEST_FLAG_GET(also_run_disabled_tests);
-    break_on_failure_ = GTEST_FLAG_GET(break_on_failure);
-    catch_exceptions_ = GTEST_FLAG_GET(catch_exceptions);
-    color_ = GTEST_FLAG_GET(color);
-    death_test_style_ = GTEST_FLAG_GET(death_test_style);
-    death_test_use_fork_ = GTEST_FLAG_GET(death_test_use_fork);
-    fail_fast_ = GTEST_FLAG_GET(fail_fast);
-    filter_ = GTEST_FLAG_GET(filter);
-    internal_run_death_test_ = GTEST_FLAG_GET(internal_run_death_test);
-    list_tests_ = GTEST_FLAG_GET(list_tests);
-    output_ = GTEST_FLAG_GET(output);
-    brief_ = GTEST_FLAG_GET(brief);
-    print_time_ = GTEST_FLAG_GET(print_time);
-    print_utf8_ = GTEST_FLAG_GET(print_utf8);
-    random_seed_ = GTEST_FLAG_GET(random_seed);
-    repeat_ = GTEST_FLAG_GET(repeat);
-    recreate_environments_when_repeating_ =
-        GTEST_FLAG_GET(recreate_environments_when_repeating);
-    shuffle_ = GTEST_FLAG_GET(shuffle);
-    stack_trace_depth_ = GTEST_FLAG_GET(stack_trace_depth);
-    stream_result_to_ = GTEST_FLAG_GET(stream_result_to);
-    throw_on_failure_ = GTEST_FLAG_GET(throw_on_failure);
-  }
-
-  // The d'tor is not virtual.  DO NOT INHERIT FROM THIS CLASS.
-  ~GTestFlagSaver() {
-    GTEST_FLAG_SET(also_run_disabled_tests, also_run_disabled_tests_);
-    GTEST_FLAG_SET(break_on_failure, break_on_failure_);
-    GTEST_FLAG_SET(catch_exceptions, catch_exceptions_);
-    GTEST_FLAG_SET(color, color_);
-    GTEST_FLAG_SET(death_test_style, death_test_style_);
-    GTEST_FLAG_SET(death_test_use_fork, death_test_use_fork_);
-    GTEST_FLAG_SET(filter, filter_);
-    GTEST_FLAG_SET(fail_fast, fail_fast_);
-    GTEST_FLAG_SET(internal_run_death_test, internal_run_death_test_);
-    GTEST_FLAG_SET(list_tests, list_tests_);
-    GTEST_FLAG_SET(output, output_);
-    GTEST_FLAG_SET(brief, brief_);
-    GTEST_FLAG_SET(print_time, print_time_);
-    GTEST_FLAG_SET(print_utf8, print_utf8_);
-    GTEST_FLAG_SET(random_seed, random_seed_);
-    GTEST_FLAG_SET(repeat, repeat_);
-    GTEST_FLAG_SET(recreate_environments_when_repeating,
-                   recreate_environments_when_repeating_);
-    GTEST_FLAG_SET(shuffle, shuffle_);
-    GTEST_FLAG_SET(stack_trace_depth, stack_trace_depth_);
-    GTEST_FLAG_SET(stream_result_to, stream_result_to_);
-    GTEST_FLAG_SET(throw_on_failure, throw_on_failure_);
-  }
-
- private:
-  // Fields for saving the original values of flags.
-  bool also_run_disabled_tests_;
-  bool break_on_failure_;
-  bool catch_exceptions_;
-  std::string color_;
-  std::string death_test_style_;
-  bool death_test_use_fork_;
-  bool fail_fast_;
-  std::string filter_;
-  std::string internal_run_death_test_;
-  bool list_tests_;
-  std::string output_;
-  bool brief_;
-  bool print_time_;
-  bool print_utf8_;
-  int32_t random_seed_;
-  int32_t repeat_;
-  bool recreate_environments_when_repeating_;
-  bool shuffle_;
-  int32_t stack_trace_depth_;
-  std::string stream_result_to_;
-  bool throw_on_failure_;
-} GTEST_ATTRIBUTE_UNUSED_;
-
-// Converts a Unicode code point to a narrow string in UTF-8 encoding.
-// code_point parameter is of type UInt32 because wchar_t may not be
-// wide enough to contain a code point.
-// If the code_point is not a valid Unicode code point
-// (i.e. outside of Unicode range U+0 to U+10FFFF) it will be converted
-// to "(Invalid Unicode 0xXXXXXXXX)".
-GTEST_API_ std::string CodePointToUtf8(uint32_t code_point);
-
-// Converts a wide string to a narrow string in UTF-8 encoding.
-// The wide string is assumed to have the following encoding:
-//   UTF-16 if sizeof(wchar_t) == 2 (on Windows, Cygwin)
-//   UTF-32 if sizeof(wchar_t) == 4 (on Linux)
-// Parameter str points to a null-terminated wide string.
-// Parameter num_chars may additionally limit the number
-// of wchar_t characters processed. -1 is used when the entire string
-// should be processed.
-// If the string contains code points that are not valid Unicode code points
-// (i.e. outside of Unicode range U+0 to U+10FFFF) they will be output
-// as '(Invalid Unicode 0xXXXXXXXX)'. If the string is in UTF16 encoding
-// and contains invalid UTF-16 surrogate pairs, values in those pairs
-// will be encoded as individual Unicode characters from Basic Normal Plane.
-GTEST_API_ std::string WideStringToUtf8(const wchar_t* str, int num_chars);
-
-// Reads the GTEST_SHARD_STATUS_FILE environment variable, and creates the file
-// if the variable is present. If a file already exists at this location, this
-// function will write over it. If the variable is present, but the file cannot
-// be created, prints an error and exits.
-void WriteToShardStatusFileIfNeeded();
-
-// Checks whether sharding is enabled by examining the relevant
-// environment variable values. If the variables are present,
-// but inconsistent (e.g., shard_index >= total_shards), prints
-// an error and exits. If in_subprocess_for_death_test, sharding is
-// disabled because it must only be applied to the original test
-// process. Otherwise, we could filter out death tests we intended to execute.
-GTEST_API_ bool ShouldShard(const char* total_shards_str,
-                            const char* shard_index_str,
-                            bool in_subprocess_for_death_test);
-
-// Parses the environment variable var as a 32-bit integer. If it is unset,
-// returns default_val. If it is not a 32-bit integer, prints an error and
-// and aborts.
-GTEST_API_ int32_t Int32FromEnvOrDie(const char* env_var, int32_t default_val);
-
-// Given the total number of shards, the shard index, and the test id,
-// returns true if and only if the test should be run on this shard. The test id
-// is some arbitrary but unique non-negative integer assigned to each test
-// method. Assumes that 0 <= shard_index < total_shards.
-GTEST_API_ bool ShouldRunTestOnShard(
-    int total_shards, int shard_index, int test_id);
-
-// STL container utilities.
-
-// Returns the number of elements in the given container that satisfy
-// the given predicate.
-template <class Container, typename Predicate>
-inline int CountIf(const Container& c, Predicate predicate) {
-  // Implemented as an explicit loop since std::count_if() in libCstd on
-  // Solaris has a non-standard signature.
-  int count = 0;
-  for (typename Container::const_iterator it = c.begin(); it != c.end(); ++it) {
-    if (predicate(*it))
-      ++count;
-  }
-  return count;
-}
-
-// Applies a function/functor to each element in the container.
-template <class Container, typename Functor>
-void ForEach(const Container& c, Functor functor) {
-  std::for_each(c.begin(), c.end(), functor);
-}
-
-// Returns the i-th element of the vector, or default_value if i is not
-// in range [0, v.size()).
-template <typename E>
-inline E GetElementOr(const std::vector<E>& v, int i, E default_value) {
-  return (i < 0 || i >= static_cast<int>(v.size())) ? default_value
-                                                    : v[static_cast<size_t>(i)];
-}
-
-// Performs an in-place shuffle of a range of the vector's elements.
-// 'begin' and 'end' are element indices as an STL-style range;
-// i.e. [begin, end) are shuffled, where 'end' == size() means to
-// shuffle to the end of the vector.
-template <typename E>
-void ShuffleRange(internal::Random* random, int begin, int end,
-                  std::vector<E>* v) {
-  const int size = static_cast<int>(v->size());
-  GTEST_CHECK_(0 <= begin && begin <= size)
-      << "Invalid shuffle range start " << begin << ": must be in range [0, "
-      << size << "].";
-  GTEST_CHECK_(begin <= end && end <= size)
-      << "Invalid shuffle range finish " << end << ": must be in range ["
-      << begin << ", " << size << "].";
-
-  // Fisher-Yates shuffle, from
-  // http://en.wikipedia.org/wiki/Fisher-Yates_shuffle
-  for (int range_width = end - begin; range_width >= 2; range_width--) {
-    const int last_in_range = begin + range_width - 1;
-    const int selected =
-        begin +
-        static_cast<int>(random->Generate(static_cast<uint32_t>(range_width)));
-    std::swap((*v)[static_cast<size_t>(selected)],
-              (*v)[static_cast<size_t>(last_in_range)]);
-  }
-}
-
-// Performs an in-place shuffle of the vector's elements.
-template <typename E>
-inline void Shuffle(internal::Random* random, std::vector<E>* v) {
-  ShuffleRange(random, 0, static_cast<int>(v->size()), v);
-}
-
-// A function for deleting an object.  Handy for being used as a
-// functor.
-template <typename T>
-static void Delete(T* x) {
-  delete x;
-}
-
-// A predicate that checks the key of a TestProperty against a known key.
-//
-// TestPropertyKeyIs is copyable.
-class TestPropertyKeyIs {
- public:
-  // Constructor.
-  //
-  // TestPropertyKeyIs has NO default constructor.
-  explicit TestPropertyKeyIs(const std::string& key) : key_(key) {}
-
-  // Returns true if and only if the test name of test property matches on key_.
-  bool operator()(const TestProperty& test_property) const {
-    return test_property.key() == key_;
-  }
-
- private:
-  std::string key_;
-};
-
-// Class UnitTestOptions.
-//
-// This class contains functions for processing options the user
-// specifies when running the tests.  It has only static members.
-//
-// In most cases, the user can specify an option using either an
-// environment variable or a command line flag.  E.g. you can set the
-// test filter using either GTEST_FILTER or --gtest_filter.  If both
-// the variable and the flag are present, the latter overrides the
-// former.
-class GTEST_API_ UnitTestOptions {
- public:
-  // Functions for processing the gtest_output flag.
-
-  // Returns the output format, or "" for normal printed output.
-  static std::string GetOutputFormat();
-
-  // Returns the absolute path of the requested output file, or the
-  // default (test_detail.xml in the original working directory) if
-  // none was explicitly specified.
-  static std::string GetAbsolutePathToOutputFile();
-
-  // Functions for processing the gtest_filter flag.
-
-  // Returns true if and only if the user-specified filter matches the test
-  // suite name and the test name.
-  static bool FilterMatchesTest(const std::string& test_suite_name,
-                                const std::string& test_name);
-
-#if GTEST_OS_WINDOWS
-  // Function for supporting the gtest_catch_exception flag.
-
-  // Returns EXCEPTION_EXECUTE_HANDLER if Google Test should handle the
-  // given SEH exception, or EXCEPTION_CONTINUE_SEARCH otherwise.
-  // This function is useful as an __except condition.
-  static int GTestShouldProcessSEH(DWORD exception_code);
-#endif  // GTEST_OS_WINDOWS
-
-  // Returns true if "name" matches the ':' separated list of glob-style
-  // filters in "filter".
-  static bool MatchesFilter(const std::string& name, const char* filter);
-};
-
-// Returns the current application's name, removing directory path if that
-// is present.  Used by UnitTestOptions::GetOutputFile.
-GTEST_API_ FilePath GetCurrentExecutableName();
-
-// The role interface for getting the OS stack trace as a string.
-class OsStackTraceGetterInterface {
- public:
-  OsStackTraceGetterInterface() {}
-  virtual ~OsStackTraceGetterInterface() {}
-
-  // Returns the current OS stack trace as an std::string.  Parameters:
-  //
-  //   max_depth  - the maximum number of stack frames to be included
-  //                in the trace.
-  //   skip_count - the number of top frames to be skipped; doesn't count
-  //                against max_depth.
-  virtual std::string CurrentStackTrace(int max_depth, int skip_count) = 0;
-
-  // UponLeavingGTest() should be called immediately before Google Test calls
-  // user code. It saves some information about the current stack that
-  // CurrentStackTrace() will use to find and hide Google Test stack frames.
-  virtual void UponLeavingGTest() = 0;
-
-  // This string is inserted in place of stack frames that are part of
-  // Google Test's implementation.
-  static const char* const kElidedFramesMarker;
-
- private:
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(OsStackTraceGetterInterface);
-};
-
-// A working implementation of the OsStackTraceGetterInterface interface.
-class OsStackTraceGetter : public OsStackTraceGetterInterface {
- public:
-  OsStackTraceGetter() {}
-
-  std::string CurrentStackTrace(int max_depth, int skip_count) override;
-  void UponLeavingGTest() override;
-
- private:
-#if GTEST_HAS_ABSL
-  Mutex mutex_;  // Protects all internal state.
-
-  // We save the stack frame below the frame that calls user code.
-  // We do this because the address of the frame immediately below
-  // the user code changes between the call to UponLeavingGTest()
-  // and any calls to the stack trace code from within the user code.
-  void* caller_frame_ = nullptr;
-#endif  // GTEST_HAS_ABSL
-
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(OsStackTraceGetter);
-};
-
-// Information about a Google Test trace point.
-struct TraceInfo {
-  const char* file;
-  int line;
-  std::string message;
-};
-
-// This is the default global test part result reporter used in UnitTestImpl.
-// This class should only be used by UnitTestImpl.
-class DefaultGlobalTestPartResultReporter
-  : public TestPartResultReporterInterface {
- public:
-  explicit DefaultGlobalTestPartResultReporter(UnitTestImpl* unit_test);
-  // Implements the TestPartResultReporterInterface. Reports the test part
-  // result in the current test.
-  void ReportTestPartResult(const TestPartResult& result) override;
-
- private:
-  UnitTestImpl* const unit_test_;
-
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(DefaultGlobalTestPartResultReporter);
-};
-
-// This is the default per thread test part result reporter used in
-// UnitTestImpl. This class should only be used by UnitTestImpl.
-class DefaultPerThreadTestPartResultReporter
-    : public TestPartResultReporterInterface {
- public:
-  explicit DefaultPerThreadTestPartResultReporter(UnitTestImpl* unit_test);
-  // Implements the TestPartResultReporterInterface. The implementation just
-  // delegates to the current global test part result reporter of *unit_test_.
-  void ReportTestPartResult(const TestPartResult& result) override;
-
- private:
-  UnitTestImpl* const unit_test_;
-
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(DefaultPerThreadTestPartResultReporter);
-};
-
-// The private implementation of the UnitTest class.  We don't protect
-// the methods under a mutex, as this class is not accessible by a
-// user and the UnitTest class that delegates work to this class does
-// proper locking.
-class GTEST_API_ UnitTestImpl {
- public:
-  explicit UnitTestImpl(UnitTest* parent);
-  virtual ~UnitTestImpl();
-
-  // There are two different ways to register your own TestPartResultReporter.
-  // You can register your own repoter to listen either only for test results
-  // from the current thread or for results from all threads.
-  // By default, each per-thread test result repoter just passes a new
-  // TestPartResult to the global test result reporter, which registers the
-  // test part result for the currently running test.
-
-  // Returns the global test part result reporter.
-  TestPartResultReporterInterface* GetGlobalTestPartResultReporter();
-
-  // Sets the global test part result reporter.
-  void SetGlobalTestPartResultReporter(
-      TestPartResultReporterInterface* reporter);
-
-  // Returns the test part result reporter for the current thread.
-  TestPartResultReporterInterface* GetTestPartResultReporterForCurrentThread();
-
-  // Sets the test part result reporter for the current thread.
-  void SetTestPartResultReporterForCurrentThread(
-      TestPartResultReporterInterface* reporter);
-
-  // Gets the number of successful test suites.
-  int successful_test_suite_count() const;
-
-  // Gets the number of failed test suites.
-  int failed_test_suite_count() const;
-
-  // Gets the number of all test suites.
-  int total_test_suite_count() const;
-
-  // Gets the number of all test suites that contain at least one test
-  // that should run.
-  int test_suite_to_run_count() const;
-
-  // Gets the number of successful tests.
-  int successful_test_count() const;
-
-  // Gets the number of skipped tests.
-  int skipped_test_count() const;
-
-  // Gets the number of failed tests.
-  int failed_test_count() const;
-
-  // Gets the number of disabled tests that will be reported in the XML report.
-  int reportable_disabled_test_count() const;
-
-  // Gets the number of disabled tests.
-  int disabled_test_count() const;
-
-  // Gets the number of tests to be printed in the XML report.
-  int reportable_test_count() const;
-
-  // Gets the number of all tests.
-  int total_test_count() const;
-
-  // Gets the number of tests that should run.
-  int test_to_run_count() const;
-
-  // Gets the time of the test program start, in ms from the start of the
-  // UNIX epoch.
-  TimeInMillis start_timestamp() const { return start_timestamp_; }
-
-  // Gets the elapsed time, in milliseconds.
-  TimeInMillis elapsed_time() const { return elapsed_time_; }
-
-  // Returns true if and only if the unit test passed (i.e. all test suites
-  // passed).
-  bool Passed() const { return !Failed(); }
-
-  // Returns true if and only if the unit test failed (i.e. some test suite
-  // failed or something outside of all tests failed).
-  bool Failed() const {
-    return failed_test_suite_count() > 0 || ad_hoc_test_result()->Failed();
-  }
-
-  // Gets the i-th test suite among all the test suites. i can range from 0 to
-  // total_test_suite_count() - 1. If i is not in that range, returns NULL.
-  const TestSuite* GetTestSuite(int i) const {
-    const int index = GetElementOr(test_suite_indices_, i, -1);
-    return index < 0 ? nullptr : test_suites_[static_cast<size_t>(i)];
-  }
-
-  //  Legacy API is deprecated but still available
-#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-  const TestCase* GetTestCase(int i) const { return GetTestSuite(i); }
-#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-
-  // Gets the i-th test suite among all the test suites. i can range from 0 to
-  // total_test_suite_count() - 1. If i is not in that range, returns NULL.
-  TestSuite* GetMutableSuiteCase(int i) {
-    const int index = GetElementOr(test_suite_indices_, i, -1);
-    return index < 0 ? nullptr : test_suites_[static_cast<size_t>(index)];
-  }
-
-  // Provides access to the event listener list.
-  TestEventListeners* listeners() { return &listeners_; }
-
-  // Returns the TestResult for the test that's currently running, or
-  // the TestResult for the ad hoc test if no test is running.
-  TestResult* current_test_result();
-
-  // Returns the TestResult for the ad hoc test.
-  const TestResult* ad_hoc_test_result() const { return &ad_hoc_test_result_; }
-
-  // Sets the OS stack trace getter.
-  //
-  // Does nothing if the input and the current OS stack trace getter
-  // are the same; otherwise, deletes the old getter and makes the
-  // input the current getter.
-  void set_os_stack_trace_getter(OsStackTraceGetterInterface* getter);
-
-  // Returns the current OS stack trace getter if it is not NULL;
-  // otherwise, creates an OsStackTraceGetter, makes it the current
-  // getter, and returns it.
-  OsStackTraceGetterInterface* os_stack_trace_getter();
-
-  // Returns the current OS stack trace as an std::string.
-  //
-  // The maximum number of stack frames to be included is specified by
-  // the gtest_stack_trace_depth flag.  The skip_count parameter
-  // specifies the number of top frames to be skipped, which doesn't
-  // count against the number of frames to be included.
-  //
-  // For example, if Foo() calls Bar(), which in turn calls
-  // CurrentOsStackTraceExceptTop(1), Foo() will be included in the
-  // trace but Bar() and CurrentOsStackTraceExceptTop() won't.
-  std::string CurrentOsStackTraceExceptTop(int skip_count) GTEST_NO_INLINE_;
-
-  // Finds and returns a TestSuite with the given name.  If one doesn't
-  // exist, creates one and returns it.
-  //
-  // Arguments:
-  //
-  //   test_suite_name: name of the test suite
-  //   type_param:      the name of the test's type parameter, or NULL if
-  //                    this is not a typed or a type-parameterized test.
-  //   set_up_tc:       pointer to the function that sets up the test suite
-  //   tear_down_tc:    pointer to the function that tears down the test suite
-  TestSuite* GetTestSuite(const char* test_suite_name, const char* type_param,
-                          internal::SetUpTestSuiteFunc set_up_tc,
-                          internal::TearDownTestSuiteFunc tear_down_tc);
-
-//  Legacy API is deprecated but still available
-#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-  TestCase* GetTestCase(const char* test_case_name, const char* type_param,
-                        internal::SetUpTestSuiteFunc set_up_tc,
-                        internal::TearDownTestSuiteFunc tear_down_tc) {
-    return GetTestSuite(test_case_name, type_param, set_up_tc, tear_down_tc);
-  }
-#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_
-
-  // Adds a TestInfo to the unit test.
-  //
-  // Arguments:
-  //
-  //   set_up_tc:    pointer to the function that sets up the test suite
-  //   tear_down_tc: pointer to the function that tears down the test suite
-  //   test_info:    the TestInfo object
-  void AddTestInfo(internal::SetUpTestSuiteFunc set_up_tc,
-                   internal::TearDownTestSuiteFunc tear_down_tc,
-                   TestInfo* test_info) {
-#if GTEST_HAS_DEATH_TEST
-    // In order to support thread-safe death tests, we need to
-    // remember the original working directory when the test program
-    // was first invoked.  We cannot do this in RUN_ALL_TESTS(), as
-    // the user may have changed the current directory before calling
-    // RUN_ALL_TESTS().  Therefore we capture the current directory in
-    // AddTestInfo(), which is called to register a TEST or TEST_F
-    // before main() is reached.
-    if (original_working_dir_.IsEmpty()) {
-      original_working_dir_.Set(FilePath::GetCurrentDir());
-      GTEST_CHECK_(!original_working_dir_.IsEmpty())
-          << "Failed to get the current working directory.";
-    }
-#endif  // GTEST_HAS_DEATH_TEST
-
-    GetTestSuite(test_info->test_suite_name(), test_info->type_param(),
-                 set_up_tc, tear_down_tc)
-        ->AddTestInfo(test_info);
-  }
-
-  // Returns ParameterizedTestSuiteRegistry object used to keep track of
-  // value-parameterized tests and instantiate and register them.
-  internal::ParameterizedTestSuiteRegistry& parameterized_test_registry() {
-    return parameterized_test_registry_;
-  }
-
-  std::set<std::string>* ignored_parameterized_test_suites() {
-    return &ignored_parameterized_test_suites_;
-  }
-
-  // Returns TypeParameterizedTestSuiteRegistry object used to keep track of
-  // type-parameterized tests and instantiations of them.
-  internal::TypeParameterizedTestSuiteRegistry&
-  type_parameterized_test_registry() {
-    return type_parameterized_test_registry_;
-  }
-
-  // Sets the TestSuite object for the test that's currently running.
-  void set_current_test_suite(TestSuite* a_current_test_suite) {
-    current_test_suite_ = a_current_test_suite;
-  }
-
-  // Sets the TestInfo object for the test that's currently running.  If
-  // current_test_info is NULL, the assertion results will be stored in
-  // ad_hoc_test_result_.
-  void set_current_test_info(TestInfo* a_current_test_info) {
-    current_test_info_ = a_current_test_info;
-  }
-
-  // Registers all parameterized tests defined using TEST_P and
-  // INSTANTIATE_TEST_SUITE_P, creating regular tests for each test/parameter
-  // combination. This method can be called more then once; it has guards
-  // protecting from registering the tests more then once.  If
-  // value-parameterized tests are disabled, RegisterParameterizedTests is
-  // present but does nothing.
-  void RegisterParameterizedTests();
-
-  // Runs all tests in this UnitTest object, prints the result, and
-  // returns true if all tests are successful.  If any exception is
-  // thrown during a test, this test is considered to be failed, but
-  // the rest of the tests will still be run.
-  bool RunAllTests();
-
-  // Clears the results of all tests, except the ad hoc tests.
-  void ClearNonAdHocTestResult() {
-    ForEach(test_suites_, TestSuite::ClearTestSuiteResult);
-  }
-
-  // Clears the results of ad-hoc test assertions.
-  void ClearAdHocTestResult() {
-    ad_hoc_test_result_.Clear();
-  }
-
-  // Adds a TestProperty to the current TestResult object when invoked in a
-  // context of a test or a test suite, or to the global property set. If the
-  // result already contains a property with the same key, the value will be
-  // updated.
-  void RecordProperty(const TestProperty& test_property);
-
-  enum ReactionToSharding {
-    HONOR_SHARDING_PROTOCOL,
-    IGNORE_SHARDING_PROTOCOL
-  };
-
-  // Matches the full name of each test against the user-specified
-  // filter to decide whether the test should run, then records the
-  // result in each TestSuite and TestInfo object.
-  // If shard_tests == HONOR_SHARDING_PROTOCOL, further filters tests
-  // based on sharding variables in the environment.
-  // Returns the number of tests that should run.
-  int FilterTests(ReactionToSharding shard_tests);
-
-  // Prints the names of the tests matching the user-specified filter flag.
-  void ListTestsMatchingFilter();
-
-  const TestSuite* current_test_suite() const { return current_test_suite_; }
-  TestInfo* current_test_info() { return current_test_info_; }
-  const TestInfo* current_test_info() const { return current_test_info_; }
-
-  // Returns the vector of environments that need to be set-up/torn-down
-  // before/after the tests are run.
-  std::vector<Environment*>& environments() { return environments_; }
-
-  // Getters for the per-thread Google Test trace stack.
-  std::vector<TraceInfo>& gtest_trace_stack() {
-    return *(gtest_trace_stack_.pointer());
-  }
-  const std::vector<TraceInfo>& gtest_trace_stack() const {
-    return gtest_trace_stack_.get();
-  }
-
-#if GTEST_HAS_DEATH_TEST
-  void InitDeathTestSubprocessControlInfo() {
-    internal_run_death_test_flag_.reset(ParseInternalRunDeathTestFlag());
-  }
-  // Returns a pointer to the parsed --gtest_internal_run_death_test
-  // flag, or NULL if that flag was not specified.
-  // This information is useful only in a death test child process.
-  // Must not be called before a call to InitGoogleTest.
-  const InternalRunDeathTestFlag* internal_run_death_test_flag() const {
-    return internal_run_death_test_flag_.get();
-  }
-
-  // Returns a pointer to the current death test factory.
-  internal::DeathTestFactory* death_test_factory() {
-    return death_test_factory_.get();
-  }
-
-  void SuppressTestEventsIfInSubprocess();
-
-  friend class ReplaceDeathTestFactory;
-#endif  // GTEST_HAS_DEATH_TEST
-
-  // Initializes the event listener performing XML output as specified by
-  // UnitTestOptions. Must not be called before InitGoogleTest.
-  void ConfigureXmlOutput();
-
-#if GTEST_CAN_STREAM_RESULTS_
-  // Initializes the event listener for streaming test results to a socket.
-  // Must not be called before InitGoogleTest.
-  void ConfigureStreamingOutput();
-#endif
-
-  // Performs initialization dependent upon flag values obtained in
-  // ParseGoogleTestFlagsOnly.  Is called from InitGoogleTest after the call to
-  // ParseGoogleTestFlagsOnly.  In case a user neglects to call InitGoogleTest
-  // this function is also called from RunAllTests.  Since this function can be
-  // called more than once, it has to be idempotent.
-  void PostFlagParsingInit();
-
-  // Gets the random seed used at the start of the current test iteration.
-  int random_seed() const { return random_seed_; }
-
-  // Gets the random number generator.
-  internal::Random* random() { return &random_; }
-
-  // Shuffles all test suites, and the tests within each test suite,
-  // making sure that death tests are still run first.
-  void ShuffleTests();
-
-  // Restores the test suites and tests to their order before the first shuffle.
-  void UnshuffleTests();
-
-  // Returns the value of GTEST_FLAG(catch_exceptions) at the moment
-  // UnitTest::Run() starts.
-  bool catch_exceptions() const { return catch_exceptions_; }
-
- private:
-  friend class ::testing::UnitTest;
-
-  // Used by UnitTest::Run() to capture the state of
-  // GTEST_FLAG(catch_exceptions) at the moment it starts.
-  void set_catch_exceptions(bool value) { catch_exceptions_ = value; }
-
-  // The UnitTest object that owns this implementation object.
-  UnitTest* const parent_;
-
-  // The working directory when the first TEST() or TEST_F() was
-  // executed.
-  internal::FilePath original_working_dir_;
-
-  // The default test part result reporters.
-  DefaultGlobalTestPartResultReporter default_global_test_part_result_reporter_;
-  DefaultPerThreadTestPartResultReporter
-      default_per_thread_test_part_result_reporter_;
-
-  // Points to (but doesn't own) the global test part result reporter.
-  TestPartResultReporterInterface* global_test_part_result_repoter_;
-
-  // Protects read and write access to global_test_part_result_reporter_.
-  internal::Mutex global_test_part_result_reporter_mutex_;
-
-  // Points to (but doesn't own) the per-thread test part result reporter.
-  internal::ThreadLocal<TestPartResultReporterInterface*>
-      per_thread_test_part_result_reporter_;
-
-  // The vector of environments that need to be set-up/torn-down
-  // before/after the tests are run.
-  std::vector<Environment*> environments_;
-
-  // The vector of TestSuites in their original order.  It owns the
-  // elements in the vector.
-  std::vector<TestSuite*> test_suites_;
-
-  // Provides a level of indirection for the test suite list to allow
-  // easy shuffling and restoring the test suite order.  The i-th
-  // element of this vector is the index of the i-th test suite in the
-  // shuffled order.
-  std::vector<int> test_suite_indices_;
-
-  // ParameterizedTestRegistry object used to register value-parameterized
-  // tests.
-  internal::ParameterizedTestSuiteRegistry parameterized_test_registry_;
-  internal::TypeParameterizedTestSuiteRegistry
-      type_parameterized_test_registry_;
-
-  // The set holding the name of parameterized
-  // test suites that may go uninstantiated.
-  std::set<std::string> ignored_parameterized_test_suites_;
-
-  // Indicates whether RegisterParameterizedTests() has been called already.
-  bool parameterized_tests_registered_;
-
-  // Index of the last death test suite registered.  Initially -1.
-  int last_death_test_suite_;
-
-  // This points to the TestSuite for the currently running test.  It
-  // changes as Google Test goes through one test suite after another.
-  // When no test is running, this is set to NULL and Google Test
-  // stores assertion results in ad_hoc_test_result_.  Initially NULL.
-  TestSuite* current_test_suite_;
-
-  // This points to the TestInfo for the currently running test.  It
-  // changes as Google Test goes through one test after another.  When
-  // no test is running, this is set to NULL and Google Test stores
-  // assertion results in ad_hoc_test_result_.  Initially NULL.
-  TestInfo* current_test_info_;
-
-  // Normally, a user only writes assertions inside a TEST or TEST_F,
-  // or inside a function called by a TEST or TEST_F.  Since Google
-  // Test keeps track of which test is current running, it can
-  // associate such an assertion with the test it belongs to.
-  //
-  // If an assertion is encountered when no TEST or TEST_F is running,
-  // Google Test attributes the assertion result to an imaginary "ad hoc"
-  // test, and records the result in ad_hoc_test_result_.
-  TestResult ad_hoc_test_result_;
-
-  // The list of event listeners that can be used to track events inside
-  // Google Test.
-  TestEventListeners listeners_;
-
-  // The OS stack trace getter.  Will be deleted when the UnitTest
-  // object is destructed.  By default, an OsStackTraceGetter is used,
-  // but the user can set this field to use a custom getter if that is
-  // desired.
-  OsStackTraceGetterInterface* os_stack_trace_getter_;
-
-  // True if and only if PostFlagParsingInit() has been called.
-  bool post_flag_parse_init_performed_;
-
-  // The random number seed used at the beginning of the test run.
-  int random_seed_;
-
-  // Our random number generator.
-  internal::Random random_;
-
-  // The time of the test program start, in ms from the start of the
-  // UNIX epoch.
-  TimeInMillis start_timestamp_;
-
-  // How long the test took to run, in milliseconds.
-  TimeInMillis elapsed_time_;
-
-#if GTEST_HAS_DEATH_TEST
-  // The decomposed components of the gtest_internal_run_death_test flag,
-  // parsed when RUN_ALL_TESTS is called.
-  std::unique_ptr<InternalRunDeathTestFlag> internal_run_death_test_flag_;
-  std::unique_ptr<internal::DeathTestFactory> death_test_factory_;
-#endif  // GTEST_HAS_DEATH_TEST
-
-  // A per-thread stack of traces created by the SCOPED_TRACE() macro.
-  internal::ThreadLocal<std::vector<TraceInfo> > gtest_trace_stack_;
-
-  // The value of GTEST_FLAG(catch_exceptions) at the moment RunAllTests()
-  // starts.
-  bool catch_exceptions_;
-
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(UnitTestImpl);
-};  // class UnitTestImpl
-
-// Convenience function for accessing the global UnitTest
-// implementation object.
-inline UnitTestImpl* GetUnitTestImpl() {
-  return UnitTest::GetInstance()->impl();
-}
-
-#if GTEST_USES_SIMPLE_RE
-
-// Internal helper functions for implementing the simple regular
-// expression matcher.
-GTEST_API_ bool IsInSet(char ch, const char* str);
-GTEST_API_ bool IsAsciiDigit(char ch);
-GTEST_API_ bool IsAsciiPunct(char ch);
-GTEST_API_ bool IsRepeat(char ch);
-GTEST_API_ bool IsAsciiWhiteSpace(char ch);
-GTEST_API_ bool IsAsciiWordChar(char ch);
-GTEST_API_ bool IsValidEscape(char ch);
-GTEST_API_ bool AtomMatchesChar(bool escaped, char pattern, char ch);
-GTEST_API_ bool ValidateRegex(const char* regex);
-GTEST_API_ bool MatchRegexAtHead(const char* regex, const char* str);
-GTEST_API_ bool MatchRepetitionAndRegexAtHead(
-    bool escaped, char ch, char repeat, const char* regex, const char* str);
-GTEST_API_ bool MatchRegexAnywhere(const char* regex, const char* str);
-
-#endif  // GTEST_USES_SIMPLE_RE
-
-// Parses the command line for Google Test flags, without initializing
-// other parts of Google Test.
-GTEST_API_ void ParseGoogleTestFlagsOnly(int* argc, char** argv);
-GTEST_API_ void ParseGoogleTestFlagsOnly(int* argc, wchar_t** argv);
-
-#if GTEST_HAS_DEATH_TEST
-
-// Returns the message describing the last system error, regardless of the
-// platform.
-GTEST_API_ std::string GetLastErrnoDescription();
-
-// Attempts to parse a string into a positive integer pointed to by the
-// number parameter.  Returns true if that is possible.
-// GTEST_HAS_DEATH_TEST implies that we have ::std::string, so we can use
-// it here.
-template <typename Integer>
-bool ParseNaturalNumber(const ::std::string& str, Integer* number) {
-  // Fail fast if the given string does not begin with a digit;
-  // this bypasses strtoXXX's "optional leading whitespace and plus
-  // or minus sign" semantics, which are undesirable here.
-  if (str.empty() || !IsDigit(str[0])) {
-    return false;
-  }
-  errno = 0;
-
-  char* end;
-  // BiggestConvertible is the largest integer type that system-provided
-  // string-to-number conversion routines can return.
-  using BiggestConvertible = unsigned long long;  // NOLINT
-
-  const BiggestConvertible parsed = strtoull(str.c_str(), &end, 10);  // NOLINT
-  const bool parse_success = *end == '\0' && errno == 0;
-
-  GTEST_CHECK_(sizeof(Integer) <= sizeof(parsed));
-
-  const Integer result = static_cast<Integer>(parsed);
-  if (parse_success && static_cast<BiggestConvertible>(result) == parsed) {
-    *number = result;
-    return true;
-  }
-  return false;
-}
-#endif  // GTEST_HAS_DEATH_TEST
-
-// TestResult contains some private methods that should be hidden from
-// Google Test user but are required for testing. This class allow our tests
-// to access them.
-//
-// This class is supplied only for the purpose of testing Google Test's own
-// constructs. Do not use it in user tests, either directly or indirectly.
-class TestResultAccessor {
- public:
-  static void RecordProperty(TestResult* test_result,
-                             const std::string& xml_element,
-                             const TestProperty& property) {
-    test_result->RecordProperty(xml_element, property);
-  }
-
-  static void ClearTestPartResults(TestResult* test_result) {
-    test_result->ClearTestPartResults();
-  }
-
-  static const std::vector<testing::TestPartResult>& test_part_results(
-      const TestResult& test_result) {
-    return test_result.test_part_results();
-  }
-};
-
-#if GTEST_CAN_STREAM_RESULTS_
-
-// Streams test results to the given port on the given host machine.
-class StreamingListener : public EmptyTestEventListener {
- public:
-  // Abstract base class for writing strings to a socket.
-  class AbstractSocketWriter {
-   public:
-    virtual ~AbstractSocketWriter() {}
-
-    // Sends a string to the socket.
-    virtual void Send(const std::string& message) = 0;
-
-    // Closes the socket.
-    virtual void CloseConnection() {}
-
-    // Sends a string and a newline to the socket.
-    void SendLn(const std::string& message) { Send(message + "\n"); }
-  };
-
-  // Concrete class for actually writing strings to a socket.
-  class SocketWriter : public AbstractSocketWriter {
-   public:
-    SocketWriter(const std::string& host, const std::string& port)
-        : sockfd_(-1), host_name_(host), port_num_(port) {
-      MakeConnection();
-    }
-
-    ~SocketWriter() override {
-      if (sockfd_ != -1)
-        CloseConnection();
-    }
-
-    // Sends a string to the socket.
-    void Send(const std::string& message) override {
-      GTEST_CHECK_(sockfd_ != -1)
-          << "Send() can be called only when there is a connection.";
-
-      const auto len = static_cast<size_t>(message.length());
-      if (write(sockfd_, message.c_str(), len) != static_cast<ssize_t>(len)) {
-        GTEST_LOG_(WARNING)
-            << "stream_result_to: failed to stream to "
-            << host_name_ << ":" << port_num_;
-      }
-    }
-
-   private:
-    // Creates a client socket and connects to the server.
-    void MakeConnection();
-
-    // Closes the socket.
-    void CloseConnection() override {
-      GTEST_CHECK_(sockfd_ != -1)
-          << "CloseConnection() can be called only when there is a connection.";
-
-      close(sockfd_);
-      sockfd_ = -1;
-    }
-
-    int sockfd_;  // socket file descriptor
-    const std::string host_name_;
-    const std::string port_num_;
-
-    GTEST_DISALLOW_COPY_AND_ASSIGN_(SocketWriter);
-  };  // class SocketWriter
-
-  // Escapes '=', '&', '%', and '\n' characters in str as "%xx".
-  static std::string UrlEncode(const char* str);
-
-  StreamingListener(const std::string& host, const std::string& port)
-      : socket_writer_(new SocketWriter(host, port)) {
-    Start();
-  }
-
-  explicit StreamingListener(AbstractSocketWriter* socket_writer)
-      : socket_writer_(socket_writer) { Start(); }
-
-  void OnTestProgramStart(const UnitTest& /* unit_test */) override {
-    SendLn("event=TestProgramStart");
-  }
-
-  void OnTestProgramEnd(const UnitTest& unit_test) override {
-    // Note that Google Test current only report elapsed time for each
-    // test iteration, not for the entire test program.
-    SendLn("event=TestProgramEnd&passed=" + FormatBool(unit_test.Passed()));
-
-    // Notify the streaming server to stop.
-    socket_writer_->CloseConnection();
-  }
-
-  void OnTestIterationStart(const UnitTest& /* unit_test */,
-                            int iteration) override {
-    SendLn("event=TestIterationStart&iteration=" +
-           StreamableToString(iteration));
-  }
-
-  void OnTestIterationEnd(const UnitTest& unit_test,
-                          int /* iteration */) override {
-    SendLn("event=TestIterationEnd&passed=" +
-           FormatBool(unit_test.Passed()) + "&elapsed_time=" +
-           StreamableToString(unit_test.elapsed_time()) + "ms");
-  }
-
-  // Note that "event=TestCaseStart" is a wire format and has to remain
-  // "case" for compatibility
-  void OnTestCaseStart(const TestCase& test_case) override {
-    SendLn(std::string("event=TestCaseStart&name=") + test_case.name());
-  }
-
-  // Note that "event=TestCaseEnd" is a wire format and has to remain
-  // "case" for compatibility
-  void OnTestCaseEnd(const TestCase& test_case) override {
-    SendLn("event=TestCaseEnd&passed=" + FormatBool(test_case.Passed()) +
-           "&elapsed_time=" + StreamableToString(test_case.elapsed_time()) +
-           "ms");
-  }
-
-  void OnTestStart(const TestInfo& test_info) override {
-    SendLn(std::string("event=TestStart&name=") + test_info.name());
-  }
-
-  void OnTestEnd(const TestInfo& test_info) override {
-    SendLn("event=TestEnd&passed=" +
-           FormatBool((test_info.result())->Passed()) +
-           "&elapsed_time=" +
-           StreamableToString((test_info.result())->elapsed_time()) + "ms");
-  }
-
-  void OnTestPartResult(const TestPartResult& test_part_result) override {
-    const char* file_name = test_part_result.file_name();
-    if (file_name == nullptr) file_name = "";
-    SendLn("event=TestPartResult&file=" + UrlEncode(file_name) +
-           "&line=" + StreamableToString(test_part_result.line_number()) +
-           "&message=" + UrlEncode(test_part_result.message()));
-  }
-
- private:
-  // Sends the given message and a newline to the socket.
-  void SendLn(const std::string& message) { socket_writer_->SendLn(message); }
-
-  // Called at the start of streaming to notify the receiver what
-  // protocol we are using.
-  void Start() { SendLn("gtest_streaming_protocol_version=1.0"); }
-
-  std::string FormatBool(bool value) { return value ? "1" : "0"; }
-
-  const std::unique_ptr<AbstractSocketWriter> socket_writer_;
-
-  GTEST_DISALLOW_COPY_AND_ASSIGN_(StreamingListener);
-};  // class StreamingListener
-
-#endif  // GTEST_CAN_STREAM_RESULTS_
-
-}  // namespace internal
-}  // namespace testing
-
-GTEST_DISABLE_MSC_WARNINGS_POP_()  //  4251
-
-#endif  // GOOGLETEST_SRC_GTEST_INTERNAL_INL_H_
diff --git a/src/include/gromacs/external/googletest/googletest/test/googletest-param-test-test.h b/src/include/gromacs/external/googletest/googletest/test/googletest-param-test-test.h
deleted file mode 100644 (file)
index 8919375..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// The Google C++ Testing and Mocking Framework (Google Test)
-//
-// This header file provides classes and functions used internally
-// for testing Google Test itself.
-
-#ifndef GOOGLETEST_TEST_GOOGLETEST_PARAM_TEST_TEST_H_
-#define GOOGLETEST_TEST_GOOGLETEST_PARAM_TEST_TEST_H_
-
-#include "gtest/gtest.h"
-
-// Test fixture for testing definition and instantiation of a test
-// in separate translation units.
-class ExternalInstantiationTest : public ::testing::TestWithParam<int> {
-};
-
-// Test fixture for testing instantiation of a test in multiple
-// translation units.
-class InstantiationInMultipleTranslationUnitsTest
-    : public ::testing::TestWithParam<int> {
-};
-
-#endif  // GOOGLETEST_TEST_GOOGLETEST_PARAM_TEST_TEST_H_
diff --git a/src/include/gromacs/external/googletest/googletest/test/gtest-typed-test_test.h b/src/include/gromacs/external/googletest/googletest/test/gtest-typed-test_test.h
deleted file mode 100644 (file)
index 8ce559c..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2008 Google Inc.
-// All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#ifndef GOOGLETEST_TEST_GTEST_TYPED_TEST_TEST_H_
-#define GOOGLETEST_TEST_GTEST_TYPED_TEST_TEST_H_
-
-#include "gtest/gtest.h"
-
-using testing::Test;
-
-// For testing that the same type-parameterized test case can be
-// instantiated in different translation units linked together.
-// ContainerTest will be instantiated in both gtest-typed-test_test.cc
-// and gtest-typed-test2_test.cc.
-
-template <typename T>
-class ContainerTest : public Test {
-};
-
-TYPED_TEST_SUITE_P(ContainerTest);
-
-TYPED_TEST_P(ContainerTest, CanBeDefaultConstructed) {
-  TypeParam container;
-}
-
-TYPED_TEST_P(ContainerTest, InitialSizeIsZero) {
-  TypeParam container;
-  EXPECT_EQ(0U, container.size());
-}
-
-REGISTER_TYPED_TEST_SUITE_P(ContainerTest,
-                            CanBeDefaultConstructed, InitialSizeIsZero);
-
-#endif  // GOOGLETEST_TEST_GTEST_TYPED_TEST_TEST_H_
diff --git a/src/include/gromacs/external/googletest/googletest/test/production.h b/src/include/gromacs/external/googletest/googletest/test/production.h
deleted file mode 100644 (file)
index 41a5472..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2006, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//     * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//     * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-//
-// This is part of the unit test for gtest_prod.h.
-
-#ifndef GOOGLETEST_TEST_PRODUCTION_H_
-#define GOOGLETEST_TEST_PRODUCTION_H_
-
-#include "gtest/gtest_prod.h"
-
-class PrivateCode {
- public:
-  // Declares a friend test that does not use a fixture.
-  FRIEND_TEST(PrivateCodeTest, CanAccessPrivateMembers);
-
-  // Declares a friend test that uses a fixture.
-  FRIEND_TEST(PrivateCodeFixtureTest, CanAccessPrivateMembers);
-
-  PrivateCode();
-
-  int x() const { return x_; }
- private:
-  void set_x(int an_x) { x_ = an_x; }
-  int x_;
-};
-
-#endif  // GOOGLETEST_TEST_PRODUCTION_H_
diff --git a/src/include/gromacs/external/lmfit/lmmin.h b/src/include/gromacs/external/lmfit/lmmin.h
deleted file mode 100644 (file)
index d2ccfae..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Library:   lmfit (Levenberg-Marquardt least squares fitting)
- *
- * File:      lmmin.h
- *
- * Contents:  Declarations for Levenberg-Marquardt minimization.
- *
- * Copyright: Joachim Wuttke, Forschungszentrum Juelich GmbH (2004-2013)
- *
- * License:   see ../COPYING (FreeBSD)
- *
- * Homepage:  apps.jcns.fz-juelich.de/lmfit
- */
-
-#ifndef LMMIN_H
-#define LMMIN_H
-
-#include "lmstruct.h"
-
-/* Levenberg-Marquardt minimization. */
-void lmmin(
-    const int n_par, double* par, const int m_dat, const double* y,
-    const void* data,
-    void (*evaluate)(
-        const double* par, const int m_dat, const void* data,
-        double* fvec, int* userbreak),
-    const lm_control_struct* control, lm_status_struct* status);
-/*
- *   This routine contains the core algorithm of our library.
- *
- *   It minimizes the sum of the squares of m nonlinear functions
- *   in n variables by a modified Levenberg-Marquardt algorithm.
- *   The function evaluation is done by the user-provided routine 'evaluate'.
- *   The Jacobian is then calculated by a forward-difference approximation.
- *
- *   Parameters:
- *
- *      n_par is the number of variables (INPUT, positive integer).
- *
- *      par is the solution vector (INPUT/OUTPUT, array of length n).
- *        On input it must be set to an estimated solution.
- *        On output it yields the final estimate of the solution.
- *
- *      m_dat is the number of functions to be minimized (INPUT, positive integer).
- *        It must fulfill m>=n.
- *
- *      y contains data to be fitted. Use a null pointer if there are no data.
- *
- *      data is a pointer that is ignored by lmmin; it is however forwarded
- *        to the user-supplied functions evaluate and printout.
- *        In a typical application, it contains experimental data to be fitted.
- *
- *      evaluate is a user-supplied function that calculates the m functions.
- *        Parameters:
- *          n, x, m, data as above.
- *          fvec is an array of length m; on OUTPUT, it must contain the
- *            m function values for the parameter vector x.
- *          userbreak is an integer pointer. When *userbreak is set to a
- *            nonzero value, lmmin will terminate.
- *
- *      control contains INPUT variables that control the fit algorithm,
- *        as declared and explained in lmstruct.h
- *
- *      status contains OUTPUT variables that inform about the fit result,
- *        as declared and explained in lmstruct.h
- */
-
-/* Refined calculation of Eucledian norm. */
-double lm_enorm(const int, const double*);
-double lm_fnorm(const int, const double*, const double*);
-
-#endif /* LMMIN_H */
diff --git a/src/include/gromacs/external/lmfit/lmstruct.h b/src/include/gromacs/external/lmfit/lmstruct.h
deleted file mode 100644 (file)
index 1f513b3..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Library:   lmfit (Levenberg-Marquardt least squares fitting)
- *
- * File:      lmstruct.h
- *
- * Contents:  Declarations of parameter records, used in lmmin.h and lmcurve.h
- *
- * Copyright: Joachim Wuttke, Forschungszentrum Juelich GmbH (2004-2013)
- *
- * License:   see ../COPYING (FreeBSD)
- *
- * Homepage:  apps.jcns.fz-juelich.de/lmfit
- */
-
-#ifndef LMSTRUCT_H
-#define LMSTRUCT_H
-
-#include <stdio.h>
-
-/* Collection of input parameters for fit control. */
-typedef struct {
-    double ftol;      /* Relative error desired in the sum of squares.
-                         Termination occurs when both the actual and
-                         predicted relative reductions in the sum of squares
-                         are at most ftol. */
-    double xtol;      /* Relative error between last two approximations.
-                         Termination occurs when the relative error between
-                         two consecutive iterates is at most xtol. */
-    double gtol;      /* Orthogonality desired between fvec and its derivs.
-                         Termination occurs when the cosine of the angle
-                         between fvec and any column of the Jacobian is at
-                         most gtol in absolute value. */
-    double epsilon;   /* Step used to calculate the Jacobian, should be
-                         slightly larger than the relative error in the
-                         user-supplied functions. */
-    double stepbound; /* Used in determining the initial step bound. This
-                         bound is set to the product of stepbound and the
-                         Euclidean norm of diag*x if nonzero, or else to
-                         stepbound itself. In most cases stepbound should lie
-                         in the interval (0.1,100.0). Generally, the value
-                         100.0 is recommended. */
-    int patience;     /* Used to set the maximum number of function evaluations
-                         to patience*(number_of_parameters+1). */
-    int scale_diag;   /* If 1, the variables will be rescaled internally.
-                         Recommended value is 1. */
-    FILE* msgfile;    /* Progress messages will be written to this file. */
-    int verbosity;    /* OR'ed: 1: print some messages; 2: print Jacobian. */
-    int n_maxpri;     /* -1, or max number of parameters to print. */
-    int m_maxpri;     /* -1, or max number of residuals to print. */
-} lm_control_struct;
-
-/* Collection of output parameters for status info. */
-typedef struct {
-    double fnorm;  /* norm of the residue vector fvec. */
-    int nfev;      /* actual number of iterations. */
-    int outcome;   /* Status indicator. Nonnegative values are used as index
-                      for the message text lm_infmsg, set in lmmin.c. */
-    int userbreak; /* Set when function evaluation requests termination. */
-} lm_status_struct;
-
-/* Preset (and recommended) control parameter settings. */
-extern const lm_control_struct lm_control_double;
-extern const lm_control_struct lm_control_float;
-
-/* Preset message texts. */
-
-extern const char* lm_infmsg[];
-extern const char* lm_shortmsg[];
-
-#endif /* LMSTRUCT_H */
diff --git a/src/include/gromacs/external/muparser/include/muParser.h b/src/include/gromacs/external/muparser/include/muParser.h
deleted file mode 100644 (file)
index 321fba9..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
-
-        _____  __ _____________ _______  ______ ___________
-       /     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
-   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
-   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
-                \/      |__|       \/           \/     \/
-   Copyright (C) 2004 - 2020 Ingo Berg
-
-       Redistribution and use in source and binary forms, with or without modification, are permitted
-       provided that the following conditions are met:
-
-         * Redistributions of source code must retain the above copyright notice, this list of
-               conditions and the following disclaimer.
-         * Redistributions in binary form must reproduce the above copyright notice, this list of
-               conditions and the following disclaimer in the documentation and/or other materials provided
-               with the distribution.
-
-       THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
-       IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-       FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-       CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-       DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-       DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-       IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-       OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef MU_PARSER_H
-#define MU_PARSER_H
-
-//--- Standard includes ------------------------------------------------------------------------
-#include <vector>
-
-//--- Parser includes --------------------------------------------------------------------------
-#include "muParserBase.h"
-#include "muParserTemplateMagic.h"
-
-/** \file
-       \brief Definition of the standard floating point parser.
-*/
-
-namespace mu
-{
-       /** \brief Mathematical expressions parser.
-
-         Standard implementation of the mathematical expressions parser.
-         Can be used as a reference implementation for subclassing the parser.
-       */
-       class API_EXPORT_CXX Parser : public ParserBase
-       {
-       public:
-
-               Parser();
-
-               virtual void InitCharSets();
-               virtual void InitFun();
-               virtual void InitConst();
-               virtual void InitOprt();
-               virtual void OnDetectVar(string_type* pExpr, int& nStart, int& nEnd);
-
-               value_type Diff(value_type* a_Var, value_type a_fPos, value_type a_fEpsilon = 0) const;
-
-       protected:
-
-               static int IsVal(const char_type* a_szExpr, int* a_iPos, value_type* a_fVal);
-       };
-} // namespace mu
-
-#endif
-
diff --git a/src/include/gromacs/external/muparser/include/muParserBase.h b/src/include/gromacs/external/muparser/include/muParserBase.h
deleted file mode 100644 (file)
index 7793818..0000000
+++ /dev/null
@@ -1,294 +0,0 @@
-/*
-
-        _____  __ _____________ _______  ______ ___________
-       /     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
-   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
-   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
-                \/      |__|       \/           \/     \/
-   Copyright (C) 2004 - 2020 Ingo Berg
-
-       Redistribution and use in source and binary forms, with or without modification, are permitted
-       provided that the following conditions are met:
-
-         * Redistributions of source code must retain the above copyright notice, this list of
-               conditions and the following disclaimer.
-         * Redistributions in binary form must reproduce the above copyright notice, this list of
-               conditions and the following disclaimer in the documentation and/or other materials provided
-               with the distribution.
-
-       THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
-       IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-       FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-       CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-       DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-       DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-       IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-       OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef MU_PARSER_BASE_H
-#define MU_PARSER_BASE_H
-
-//--- Standard includes ------------------------------------------------------------------------
-#include <cmath>
-#include <string>
-#include <iostream>
-#include <map>
-#include <memory>
-#include <locale>
-#include <limits.h>
-
-//--- Parser includes --------------------------------------------------------------------------
-#include "muParserDef.h"
-#include "muParserTokenReader.h"
-#include "muParserBytecode.h"
-#include "muParserError.h"
-
-
-namespace mu
-{
-       /** \file
-               \brief This file contains the class definition of the muparser engine.
-       */
-
-       /** \brief Mathematical expressions parser (base parser engine).
-
-               This is the implementation of a bytecode based mathematical expressions parser.
-               The formula will be parsed from string and converted into a bytecode.
-               Future calculations will be done with the bytecode instead the formula string
-               resulting in a significant performance increase.
-               Complementary to a set of internally implemented functions the parser is able to handle
-               user defined functions and variables.
-       */
-       class API_EXPORT_CXX ParserBase
-       {
-               friend class ParserTokenReader;
-
-       private:
-
-               /** \brief Typedef for the parse functions.
-
-                 The parse function do the actual work. The parser exchanges
-                 the function pointer to the parser function depending on
-                 which state it is in. (i.e. bytecode parser vs. string parser)
-               */
-               typedef value_type(ParserBase::* ParseFunction)() const;
-
-               /** \brief Type used for storing an array of values. */
-               typedef std::vector<value_type> valbuf_type;
-
-               /** \brief Type for a vector of strings. */
-               typedef std::vector<string_type> stringbuf_type;
-
-               /** \brief Typedef for the token reader. */
-               typedef ParserTokenReader token_reader_type;
-
-               /** \brief Type used for parser tokens. */
-               typedef ParserToken<value_type, string_type> token_type;
-
-               /** \brief Maximum number of threads spawned by OpenMP when using the bulk mode. */
-               static const int s_MaxNumOpenMPThreads;
-
-       public:
-
-               /** \brief Type of the error class.
-
-                 Included for backwards compatibility.
-               */
-               typedef ParserError exception_type;
-
-               static void EnableDebugDump(bool bDumpCmd, bool bDumpStack);
-
-               ParserBase();
-               ParserBase(const ParserBase& a_Parser);
-               ParserBase& operator=(const ParserBase& a_Parser);
-
-               virtual ~ParserBase();
-
-               value_type Eval() const;
-               value_type* Eval(int& nStackSize) const;
-               void Eval(value_type* results, int nBulkSize);
-
-               int GetNumResults() const;
-
-               void SetExpr(const string_type& a_sExpr);
-               void SetVarFactory(facfun_type a_pFactory, void* pUserData = nullptr);
-
-               void SetDecSep(char_type cDecSep);
-               void SetThousandsSep(char_type cThousandsSep = 0);
-               void ResetLocale();
-
-               void EnableOptimizer(bool a_bIsOn = true);
-               void EnableBuiltInOprt(bool a_bIsOn = true);
-
-               bool HasBuiltInOprt() const;
-               void AddValIdent(identfun_type a_pCallback);
-
-               /** \fn void mu::ParserBase::DefineFun(const string_type &a_strName, fun_type0 a_pFun, bool a_bAllowOpt = true)
-                       \brief Define a parser function without arguments.
-                       \param a_strName Name of the function
-                       \param a_pFun Pointer to the callback function
-                       \param a_bAllowOpt A flag indicating this function may be optimized
-               */
-               template<typename T>
-               void DefineFun(const string_type& a_strName, T a_pFun, bool a_bAllowOpt = true)
-               {
-                       AddCallback(a_strName, ParserCallback(a_pFun, a_bAllowOpt), m_FunDef, ValidNameChars());
-               }
-
-               void DefineOprt(const string_type& a_strName, fun_type2 a_pFun, unsigned a_iPri = 0, EOprtAssociativity a_eAssociativity = oaLEFT, bool a_bAllowOpt = false);
-               void DefineConst(const string_type& a_sName, value_type a_fVal);
-               void DefineStrConst(const string_type& a_sName, const string_type& a_strVal);
-               void DefineVar(const string_type& a_sName, value_type* a_fVar);
-               void DefinePostfixOprt(const string_type& a_strFun, fun_type1 a_pOprt, bool a_bAllowOpt = true);
-               void DefineInfixOprt(const string_type& a_strName, fun_type1 a_pOprt, int a_iPrec = prINFIX, bool a_bAllowOpt = true);
-
-               // Clear user defined variables, constants or functions
-               void ClearVar();
-               void ClearFun();
-               void ClearConst();
-               void ClearInfixOprt();
-               void ClearPostfixOprt();
-               void ClearOprt();
-
-               void RemoveVar(const string_type& a_strVarName);
-               const varmap_type& GetUsedVar() const;
-               const varmap_type& GetVar() const;
-               const valmap_type& GetConst() const;
-               const string_type& GetExpr() const;
-               const funmap_type& GetFunDef() const;
-               string_type GetVersion(EParserVersionInfo eInfo = pviFULL) const;
-
-               const char_type** GetOprtDef() const;
-               void DefineNameChars(const char_type* a_szCharset);
-               void DefineOprtChars(const char_type* a_szCharset);
-               void DefineInfixOprtChars(const char_type* a_szCharset);
-
-               const char_type* ValidNameChars() const;
-               const char_type* ValidOprtChars() const;
-               const char_type* ValidInfixOprtChars() const;
-
-               void SetArgSep(char_type cArgSep);
-               char_type GetArgSep() const;
-
-       protected:
-
-               void Init();
-               void Error(EErrorCodes a_iErrc, int a_iPos = (int)mu::string_type::npos, const string_type& a_strTok = string_type()) const;
-
-               virtual void InitCharSets() = 0;
-               virtual void InitFun() = 0;
-               virtual void InitConst() = 0;
-               virtual void InitOprt() = 0;
-
-               virtual void OnDetectVar(string_type* pExpr, int& nStart, int& nEnd);
-
-               static const char_type* c_DefaultOprt[];
-               static std::locale s_locale;  ///< The locale used by the parser
-               static bool g_DbgDumpCmdCode;
-               static bool g_DbgDumpStack;
-
-               /** \brief A facet class used to change decimal and thousands separator. */
-               template<class TChar>
-               class change_dec_sep : public std::numpunct<TChar>
-               {
-               public:
-
-                       explicit change_dec_sep(char_type cDecSep, char_type cThousandsSep = 0, int nGroup = 3)
-                               :std::numpunct<TChar>()
-                               , m_nGroup(nGroup)
-                               , m_cDecPoint(cDecSep)
-                               , m_cThousandsSep(cThousandsSep)
-                       {}
-
-               protected:
-
-                       virtual char_type do_decimal_point() const
-                       {
-                               return m_cDecPoint;
-                       }
-
-                       virtual char_type do_thousands_sep() const
-                       {
-                               return m_cThousandsSep;
-                       }
-
-                       virtual std::string do_grouping() const
-                       {
-                               // fix for issue 4: https://code.google.com/p/muparser/issues/detail?id=4
-                               // courtesy of Jens Bartsch
-                               // original code:
-                               //        return std::string(1, (char)m_nGroup); 
-                               // new code:
-                               return std::string(1, (char)(m_cThousandsSep > 0 ? m_nGroup : CHAR_MAX));
-                       }
-
-               private:
-
-                       int m_nGroup;
-                       char_type m_cDecPoint;
-                       char_type m_cThousandsSep;
-               };
-
-       private:
-
-               void Assign(const ParserBase& a_Parser);
-               void InitTokenReader();
-               void ReInit() const;
-
-               void AddCallback(const string_type& a_strName, const ParserCallback& a_Callback, funmap_type& a_Storage, const char_type* a_szCharSet);
-               void ApplyRemainingOprt(std::stack<token_type>& a_stOpt, std::stack<token_type>& a_stVal) const;
-               void ApplyBinOprt(std::stack<token_type>& a_stOpt, std::stack<token_type>& a_stVal) const;
-               void ApplyIfElse(std::stack<token_type>& a_stOpt, std::stack<token_type>& a_stVal) const;
-               void ApplyFunc(std::stack<token_type>& a_stOpt, std::stack<token_type>& a_stVal, int iArgCount) const;
-
-               token_type ApplyStrFunc(const token_type& a_FunTok, const std::vector<token_type>& a_vArg) const;
-
-               int GetOprtPrecedence(const token_type& a_Tok) const;
-               EOprtAssociativity GetOprtAssociativity(const token_type& a_Tok) const;
-
-               void CreateRPN() const;
-
-               value_type ParseString() const;
-               value_type ParseCmdCode() const;
-               value_type ParseCmdCodeShort() const;
-               value_type ParseCmdCodeBulk(int nOffset, int nThreadID) const;
-
-               void  CheckName(const string_type& a_strName, const string_type& a_CharSet) const;
-               void  CheckOprt(const string_type& a_sName, const ParserCallback& a_Callback, const string_type& a_szCharSet) const;
-
-               void StackDump(const std::stack<token_type >& a_stVal, const std::stack<token_type >& a_stOprt) const;
-
-               /** \brief Pointer to the parser function.
-
-                 Eval() calls the function whose address is stored there.
-               */
-               mutable ParseFunction  m_pParseFormula;
-               mutable ParserByteCode m_vRPN;        ///< The Bytecode class.
-               mutable stringbuf_type  m_vStringBuf; ///< String buffer, used for storing string function arguments
-               stringbuf_type  m_vStringVarBuf;
-
-               std::unique_ptr<token_reader_type> m_pTokenReader; ///< Managed pointer to the token reader object.
-
-               funmap_type  m_FunDef;         ///< Map of function names and pointers.
-               funmap_type  m_PostOprtDef;    ///< Postfix operator callbacks
-               funmap_type  m_InfixOprtDef;   ///< unary infix operator.
-               funmap_type  m_OprtDef;        ///< Binary operator callbacks
-               valmap_type  m_ConstDef;       ///< user constants.
-               strmap_type  m_StrVarDef;      ///< user defined string constants
-               varmap_type  m_VarDef;         ///< user defind variables.
-
-               bool m_bBuiltInOp;             ///< Flag that can be used for switching built in operators on and off
-
-               string_type m_sNameChars;      ///< Charset for names
-               string_type m_sOprtChars;      ///< Charset for postfix/ binary operator tokens
-               string_type m_sInfixOprtChars; ///< Charset for infix operator tokens
-
-               // items merely used for caching state information
-               mutable valbuf_type m_vStackBuffer; ///< This is merely a buffer used for the stack in the cmd parsing routine
-               mutable int m_nFinalResultIdx;
-       };
-
-} // namespace mu
-
-#endif
diff --git a/src/include/gromacs/external/muparser/include/muParserBytecode.h b/src/include/gromacs/external/muparser/include/muParserBytecode.h
deleted file mode 100644 (file)
index 5074e23..0000000
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
-
-        _____  __ _____________ _______  ______ ___________
-       /     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
-   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
-   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
-                \/      |__|       \/           \/     \/
-   Copyright (C) 2004 - 2020 Ingo Berg
-
-       Redistribution and use in source and binary forms, with or without modification, are permitted
-       provided that the following conditions are met:
-
-         * Redistributions of source code must retain the above copyright notice, this list of
-               conditions and the following disclaimer.
-         * Redistributions in binary form must reproduce the above copyright notice, this list of
-               conditions and the following disclaimer in the documentation and/or other materials provided
-               with the distribution.
-
-       THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
-       IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-       FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-       CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-       DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-       DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-       IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-       OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef MU_PARSER_BYTECODE_H
-#define MU_PARSER_BYTECODE_H
-
-#include <string>
-#include <stack>
-#include <vector>
-
-#include "muParserDef.h"
-#include "muParserError.h"
-#include "muParserToken.h"
-
-/** \file
-       \brief Definition of the parser bytecode class.
-*/
-
-
-namespace mu
-{
-       struct SToken
-       {
-               ECmdCode Cmd;
-
-               union
-               {
-                       struct //SValData
-                       {
-                               value_type* ptr;
-                               value_type  data;
-                               value_type  data2;
-                       } Val;
-
-                       struct //SFunData
-                       {
-                               // Note: generic_fun_type is merely a placeholder. The real type could be 
-                               //       anything between gun_type1 and fun_type9. I can't use a void
-                               //       pointer due to constraints in the ANSI standard which allows
-                               //       data pointers and function pointers to differ in size.
-                               generic_fun_type ptr;
-                               int   argc;
-                               int   idx;
-                       } Fun;
-
-                       struct //SOprtData
-                       {
-                               value_type* ptr;
-                               int offset;
-                       } Oprt;
-               };
-       };
-
-
-       /** \brief Bytecode implementation of the Math Parser.
-
-               The bytecode contains the formula converted to revers polish notation stored in a continious
-               memory area. Associated with this data are operator codes, variable pointers, constant
-               values and function pointers. Those are necessary in order to calculate the result.
-               All those data items will be casted to the underlying datatype of the bytecode.
-       */
-       class ParserByteCode final
-       {
-       private:
-
-               /** \brief Token type for internal use only. */
-               typedef ParserToken<value_type, string_type> token_type;
-
-               /** \brief Token vector for storing the RPN. */
-               typedef std::vector<SToken> rpn_type;
-
-               /** \brief Position in the Calculation array. */
-               unsigned m_iStackPos;
-
-               /** \brief Maximum size needed for the stack. */
-               std::size_t m_iMaxStackSize;
-
-               /** \brief The actual rpn storage. */
-               rpn_type  m_vRPN;
-
-               bool m_bEnableOptimizer;
-
-               void ConstantFolding(ECmdCode a_Oprt);
-
-       public:
-
-               ParserByteCode();
-               ParserByteCode(const ParserByteCode& a_ByteCode);
-               ParserByteCode& operator=(const ParserByteCode& a_ByteCode);
-               void Assign(const ParserByteCode& a_ByteCode);
-
-               void AddVar(value_type* a_pVar);
-               void AddVal(value_type a_fVal);
-               void AddOp(ECmdCode a_Oprt);
-               void AddIfElse(ECmdCode a_Oprt);
-               void AddAssignOp(value_type* a_pVar);
-               void AddFun(generic_fun_type a_pFun, int a_iArgc);
-               void AddBulkFun(generic_fun_type a_pFun, int a_iArgc);
-               void AddStrFun(generic_fun_type a_pFun, int a_iArgc, int a_iIdx);
-
-               void EnableOptimizer(bool bStat);
-
-               void Finalize();
-               void clear();
-               std::size_t GetMaxStackSize() const;
-
-               std::size_t GetSize() const
-               {
-                       return m_vRPN.size();
-               }
-
-               inline const SToken* GetBase() const
-               {
-                       if (m_vRPN.size() == 0)
-                               throw ParserError(ecINTERNAL_ERROR);
-                       else
-                               return &m_vRPN[0];
-               }
-
-               void AsciiDump();
-       };
-
-} // namespace mu
-
-#endif
-
-
diff --git a/src/include/gromacs/external/muparser/include/muParserCallback.h b/src/include/gromacs/external/muparser/include/muParserCallback.h
deleted file mode 100644 (file)
index 1a8d060..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
-
-        _____  __ _____________ _______  ______ ___________
-       /     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
-   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
-   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
-                \/      |__|       \/           \/     \/
-   Copyright (C) 2004 - 2020 Ingo Berg
-
-       Redistribution and use in source and binary forms, with or without modification, are permitted
-       provided that the following conditions are met:
-
-         * Redistributions of source code must retain the above copyright notice, this list of
-               conditions and the following disclaimer.
-         * Redistributions in binary form must reproduce the above copyright notice, this list of
-               conditions and the following disclaimer in the documentation and/or other materials provided
-               with the distribution.
-
-       THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
-       IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-       FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-       CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-       DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-       DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-       IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-       OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-
-#ifndef MU_PARSER_CALLBACK_H
-#define MU_PARSER_CALLBACK_H
-
-#include "muParserDef.h"
-
-/** \file
-       \brief Definition of the parser callback class.
-*/
-
-namespace mu
-{
-
-       /** \brief Encapsulation of prototypes for a numerical parser function.
-
-               Encapsulates the prototyp for numerical parser functions. The class
-               stores the number of arguments for parser functions as well
-               as additional flags indication the function is non optimizeable.
-               The pointer to the callback function pointer is stored as void*
-               and needs to be casted according to the argument count.
-               Negative argument counts indicate a parser function with a variable number
-               of arguments.
-       */
-       class API_EXPORT_CXX ParserCallback final
-       {
-       public:
-               ParserCallback(fun_type0  a_pFun, bool a_bAllowOpti);
-               ParserCallback(fun_type1  a_pFun, bool a_bAllowOpti, int a_iPrec = -1, ECmdCode a_iCode = cmFUNC);
-               ParserCallback(fun_type2  a_pFun, bool a_bAllowOpti, int a_iPrec, EOprtAssociativity a_eAssociativity);
-               ParserCallback(fun_type2  a_pFun, bool a_bAllowOpti);
-               ParserCallback(fun_type3  a_pFun, bool a_bAllowOpti);
-               ParserCallback(fun_type4  a_pFun, bool a_bAllowOpti);
-               ParserCallback(fun_type5  a_pFun, bool a_bAllowOpti);
-               ParserCallback(fun_type6  a_pFun, bool a_bAllowOpti);
-               ParserCallback(fun_type7  a_pFun, bool a_bAllowOpti);
-               ParserCallback(fun_type8  a_pFun, bool a_bAllowOpti);
-               ParserCallback(fun_type9  a_pFun, bool a_bAllowOpti);
-               ParserCallback(fun_type10 a_pFun, bool a_bAllowOpti);
-
-               ParserCallback(bulkfun_type0  a_pFun, bool a_bAllowOpti);
-               ParserCallback(bulkfun_type1  a_pFun, bool a_bAllowOpti);
-               ParserCallback(bulkfun_type2  a_pFun, bool a_bAllowOpti);
-               ParserCallback(bulkfun_type3  a_pFun, bool a_bAllowOpti);
-               ParserCallback(bulkfun_type4  a_pFun, bool a_bAllowOpti);
-               ParserCallback(bulkfun_type5  a_pFun, bool a_bAllowOpti);
-               ParserCallback(bulkfun_type6  a_pFun, bool a_bAllowOpti);
-               ParserCallback(bulkfun_type7  a_pFun, bool a_bAllowOpti);
-               ParserCallback(bulkfun_type8  a_pFun, bool a_bAllowOpti);
-               ParserCallback(bulkfun_type9  a_pFun, bool a_bAllowOpti);
-               ParserCallback(bulkfun_type10 a_pFun, bool a_bAllowOpti);
-
-               ParserCallback(multfun_type a_pFun, bool a_bAllowOpti);
-               ParserCallback(strfun_type1 a_pFun, bool a_bAllowOpti);
-               ParserCallback(strfun_type2 a_pFun, bool a_bAllowOpti);
-               ParserCallback(strfun_type3 a_pFun, bool a_bAllowOpti);
-               ParserCallback(strfun_type4 a_pFun, bool a_bAllowOpti);
-               ParserCallback(strfun_type5 a_pFun, bool a_bAllowOpti);
-               ParserCallback();
-               ParserCallback(const ParserCallback& a_Fun);
-    ParserCallback & operator=(const ParserCallback& a_Fun);
-
-               ParserCallback* Clone() const;
-
-               bool  IsOptimizable() const;
-               void* GetAddr() const;
-               ECmdCode  GetCode() const;
-               ETypeCode GetType() const;
-               int GetPri()  const;
-               EOprtAssociativity GetAssociativity() const;
-               int GetArgc() const;
-
-       private:
-               void* m_pFun;                   ///< Pointer to the callback function, casted to void
-
-               /** \brief Number of numeric function arguments
-
-                       This number is negative for functions with variable number of arguments. in this cases
-                       they represent the actual number of arguments found.
-               */
-               int   m_iArgc;
-               int   m_iPri;                   ///< Valid only for binary and infix operators; Operator precedence.
-               EOprtAssociativity m_eOprtAsct; ///< Operator associativity; Valid only for binary operators 
-               ECmdCode  m_iCode;
-               ETypeCode m_iType;
-               bool  m_bAllowOpti;             ///< Flag indication optimizeability 
-       };
-
-
-       /** \brief Container for Callback objects. */
-       typedef std::map<string_type, ParserCallback> funmap_type;
-
-} // namespace mu
-
-#endif
-
diff --git a/src/include/gromacs/external/muparser/include/muParserDLL.h b/src/include/gromacs/external/muparser/include/muParserDLL.h
deleted file mode 100644 (file)
index 18051c4..0000000
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
-
-        _____  __ _____________ _______  ______ ___________
-       /     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
-   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
-   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
-                \/      |__|       \/           \/     \/
-   Copyright (C) 2004 - 2020 Ingo Berg
-
-       Redistribution and use in source and binary forms, with or without modification, are permitted
-       provided that the following conditions are met:
-
-         * Redistributions of source code must retain the above copyright notice, this list of
-               conditions and the following disclaimer.
-         * Redistributions in binary form must reproduce the above copyright notice, this list of
-               conditions and the following disclaimer in the documentation and/or other materials provided
-               with the distribution.
-
-       THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
-       IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-       FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-       CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-       DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-       DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-       IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-       OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef MU_PARSER_DLL_H
-#define MU_PARSER_DLL_H
-
-#include "muParserFixes.h"
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-       /** \file
-               \brief This file contains the DLL interface of muparser.
-       */
-
-       // Basic types
-       typedef void* muParserHandle_t;    // parser handle
-
-#ifndef _UNICODE
-       typedef char   muChar_t;            // character type
-#else
-       typedef wchar_t   muChar_t;            // character type
-#endif
-
-       typedef int    muBool_t;            // boolean type
-       typedef int    muInt_t;             // integer type 
-       typedef double muFloat_t;           // floating point type
-
-       // function types for calculation
-       typedef muFloat_t(*muFun0_t)(void);
-       typedef muFloat_t(*muFun1_t)(muFloat_t);
-       typedef muFloat_t(*muFun2_t)(muFloat_t, muFloat_t);
-       typedef muFloat_t(*muFun3_t)(muFloat_t, muFloat_t, muFloat_t);
-       typedef muFloat_t(*muFun4_t)(muFloat_t, muFloat_t, muFloat_t, muFloat_t);
-       typedef muFloat_t(*muFun5_t)(muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
-       typedef muFloat_t(*muFun6_t)(muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
-       typedef muFloat_t(*muFun7_t)(muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
-       typedef muFloat_t(*muFun8_t)(muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
-       typedef muFloat_t(*muFun9_t)(muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
-       typedef muFloat_t(*muFun10_t)(muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
-
-       // Function prototypes for bulkmode functions
-       typedef muFloat_t(*muBulkFun0_t)(int, int);
-       typedef muFloat_t(*muBulkFun1_t)(int, int, muFloat_t);
-       typedef muFloat_t(*muBulkFun2_t)(int, int, muFloat_t, muFloat_t);
-       typedef muFloat_t(*muBulkFun3_t)(int, int, muFloat_t, muFloat_t, muFloat_t);
-       typedef muFloat_t(*muBulkFun4_t)(int, int, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
-       typedef muFloat_t(*muBulkFun5_t)(int, int, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
-       typedef muFloat_t(*muBulkFun6_t)(int, int, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
-       typedef muFloat_t(*muBulkFun7_t)(int, int, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
-       typedef muFloat_t(*muBulkFun8_t)(int, int, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
-       typedef muFloat_t(*muBulkFun9_t)(int, int, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
-       typedef muFloat_t(*muBulkFun10_t)(int, int, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
-
-       typedef muFloat_t(*muMultFun_t)(const muFloat_t*, muInt_t);
-       typedef muFloat_t(*muStrFun1_t)(const muChar_t*);
-       typedef muFloat_t(*muStrFun2_t)(const muChar_t*, muFloat_t);
-       typedef muFloat_t(*muStrFun3_t)(const muChar_t*, muFloat_t, muFloat_t);
-
-       // Functions for parser management
-       typedef void (*muErrorHandler_t)(muParserHandle_t a_hParser);           // [optional] callback to an error handler
-       typedef muFloat_t* (*muFacFun_t)(const muChar_t*, void*);               // [optional] callback for creating new variables
-       typedef muInt_t(*muIdentFun_t)(const muChar_t*, muInt_t*, muFloat_t*); // [optional] value identification callbacks
-
-       //-----------------------------------------------------------------------------------------------------
-       // Constants
-       static const int muOPRT_ASCT_LEFT = 0;
-       static const int muOPRT_ASCT_RIGHT = 1;
-
-       static const int muBASETYPE_FLOAT = 0;
-       static const int muBASETYPE_INT = 1;
-
-       //-----------------------------------------------------------------------------------------------------
-       //
-       //
-       // muParser C compatible bindings
-       //
-       //
-       //-----------------------------------------------------------------------------------------------------
-
-
-       // Basic operations / initialization  
-       API_EXPORT(muParserHandle_t) mupCreate(int nBaseType);
-       API_EXPORT(void) mupRelease(muParserHandle_t a_hParser);
-       API_EXPORT(const muChar_t*) mupGetExpr(muParserHandle_t a_hParser);
-       API_EXPORT(void) mupSetExpr(muParserHandle_t a_hParser, const muChar_t* a_szExpr);
-       API_EXPORT(void) mupSetVarFactory(muParserHandle_t a_hParser, muFacFun_t a_pFactory, void* pUserData);
-       API_EXPORT(const muChar_t*) mupGetVersion(muParserHandle_t a_hParser);
-       API_EXPORT(muFloat_t) mupEval(muParserHandle_t a_hParser);
-       API_EXPORT(muFloat_t*) mupEvalMulti(muParserHandle_t a_hParser, int* nNum);
-       API_EXPORT(void) mupEvalBulk(muParserHandle_t a_hParser, muFloat_t* a_fResult, int nSize);
-
-       // Defining callbacks / variables / constants
-       API_EXPORT(void) mupDefineFun0(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun0_t a_pFun, muBool_t a_bOptimize);
-       API_EXPORT(void) mupDefineFun1(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun1_t a_pFun, muBool_t a_bOptimize);
-       API_EXPORT(void) mupDefineFun2(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun2_t a_pFun, muBool_t a_bOptimize);
-       API_EXPORT(void) mupDefineFun3(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun3_t a_pFun, muBool_t a_bOptimize);
-       API_EXPORT(void) mupDefineFun4(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun4_t a_pFun, muBool_t a_bOptimize);
-       API_EXPORT(void) mupDefineFun5(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun5_t a_pFun, muBool_t a_bOptimize);
-       API_EXPORT(void) mupDefineFun6(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun6_t a_pFun, muBool_t a_bOptimize);
-       API_EXPORT(void) mupDefineFun7(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun7_t a_pFun, muBool_t a_bOptimize);
-       API_EXPORT(void) mupDefineFun8(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun8_t a_pFun, muBool_t a_bOptimize);
-       API_EXPORT(void) mupDefineFun9(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun9_t a_pFun, muBool_t a_bOptimize);
-       API_EXPORT(void) mupDefineFun10(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun10_t a_pFun, muBool_t a_bOptimize);
-
-       // Defining bulkmode functions
-       API_EXPORT(void) mupDefineBulkFun0(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun0_t a_pFun);
-       API_EXPORT(void) mupDefineBulkFun1(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun1_t a_pFun);
-       API_EXPORT(void) mupDefineBulkFun2(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun2_t a_pFun);
-       API_EXPORT(void) mupDefineBulkFun3(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun3_t a_pFun);
-       API_EXPORT(void) mupDefineBulkFun4(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun4_t a_pFun);
-       API_EXPORT(void) mupDefineBulkFun5(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun5_t a_pFun);
-       API_EXPORT(void) mupDefineBulkFun6(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun6_t a_pFun);
-       API_EXPORT(void) mupDefineBulkFun7(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun7_t a_pFun);
-       API_EXPORT(void) mupDefineBulkFun8(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun8_t a_pFun);
-       API_EXPORT(void) mupDefineBulkFun9(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun9_t a_pFun);
-       API_EXPORT(void) mupDefineBulkFun10(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun10_t a_pFun);
-
-       // string functions
-       API_EXPORT(void) mupDefineStrFun1(muParserHandle_t a_hParser, const muChar_t* a_szName, muStrFun1_t a_pFun);
-       API_EXPORT(void) mupDefineStrFun2(muParserHandle_t a_hParser, const muChar_t* a_szName, muStrFun2_t a_pFun);
-       API_EXPORT(void) mupDefineStrFun3(muParserHandle_t a_hParser, const muChar_t* a_szName, muStrFun3_t a_pFun);
-
-       API_EXPORT(void) mupDefineMultFun(muParserHandle_t a_hParser,
-               const muChar_t* a_szName,
-               muMultFun_t a_pFun,
-               muBool_t a_bOptimize);
-
-       API_EXPORT(void) mupDefineOprt(muParserHandle_t a_hParser,
-               const muChar_t* a_szName,
-               muFun2_t a_pFun,
-               muInt_t a_nPrec,
-               muInt_t a_nOprtAsct,
-               muBool_t a_bOptimize);
-
-       API_EXPORT(void) mupDefineConst(muParserHandle_t a_hParser,
-               const muChar_t* a_szName,
-               muFloat_t a_fVal);
-
-       API_EXPORT(void) mupDefineStrConst(muParserHandle_t a_hParser,
-               const muChar_t* a_szName,
-               const muChar_t* a_sVal);
-
-       API_EXPORT(void) mupDefineVar(muParserHandle_t a_hParser,
-               const muChar_t* a_szName,
-               muFloat_t* a_fVar);
-
-       API_EXPORT(void) mupDefineBulkVar(muParserHandle_t a_hParser,
-               const muChar_t* a_szName,
-               muFloat_t* a_fVar);
-
-       API_EXPORT(void) mupDefinePostfixOprt(muParserHandle_t a_hParser,
-               const muChar_t* a_szName,
-               muFun1_t a_pOprt,
-               muBool_t a_bOptimize);
-
-
-       API_EXPORT(void) mupDefineInfixOprt(muParserHandle_t a_hParser,
-               const muChar_t* a_szName,
-               muFun1_t a_pOprt,
-               muBool_t a_bOptimize);
-
-       // Define character sets for identifiers
-       API_EXPORT(void) mupDefineNameChars(muParserHandle_t a_hParser, const muChar_t* a_szCharset);
-       API_EXPORT(void) mupDefineOprtChars(muParserHandle_t a_hParser, const muChar_t* a_szCharset);
-       API_EXPORT(void) mupDefineInfixOprtChars(muParserHandle_t a_hParser, const muChar_t* a_szCharset);
-
-       // Remove all / single variables
-       API_EXPORT(void) mupRemoveVar(muParserHandle_t a_hParser, const muChar_t* a_szName);
-       API_EXPORT(void) mupClearVar(muParserHandle_t a_hParser);
-       API_EXPORT(void) mupClearConst(muParserHandle_t a_hParser);
-       API_EXPORT(void) mupClearOprt(muParserHandle_t a_hParser);
-       API_EXPORT(void) mupClearFun(muParserHandle_t a_hParser);
-
-       // Querying variables / expression variables / constants
-       API_EXPORT(int) mupGetExprVarNum(muParserHandle_t a_hParser);
-       API_EXPORT(int) mupGetVarNum(muParserHandle_t a_hParser);
-       API_EXPORT(int) mupGetConstNum(muParserHandle_t a_hParser);
-       API_EXPORT(void) mupGetExprVar(muParserHandle_t a_hParser, unsigned a_iVar, const muChar_t** a_pszName, muFloat_t** a_pVar);
-       API_EXPORT(void) mupGetVar(muParserHandle_t a_hParser, unsigned a_iVar, const muChar_t** a_pszName, muFloat_t** a_pVar);
-       API_EXPORT(void) mupGetConst(muParserHandle_t a_hParser, unsigned a_iVar, const muChar_t** a_pszName, muFloat_t* a_pVar);
-       API_EXPORT(void) mupSetArgSep(muParserHandle_t a_hParser, const muChar_t cArgSep);
-       API_EXPORT(void) mupSetDecSep(muParserHandle_t a_hParser, const muChar_t cArgSep);
-       API_EXPORT(void) mupSetThousandsSep(muParserHandle_t a_hParser, const muChar_t cArgSep);
-       API_EXPORT(void) mupResetLocale(muParserHandle_t a_hParser);
-
-       // Add value recognition callbacks
-       API_EXPORT(void) mupAddValIdent(muParserHandle_t a_hParser, muIdentFun_t);
-
-       // Error handling
-       API_EXPORT(muBool_t) mupError(muParserHandle_t a_hParser);
-       API_EXPORT(void) mupErrorReset(muParserHandle_t a_hParser);
-       API_EXPORT(void) mupSetErrorHandler(muParserHandle_t a_hParser, muErrorHandler_t a_pErrHandler);
-       API_EXPORT(const muChar_t*) mupGetErrorMsg(muParserHandle_t a_hParser);
-       API_EXPORT(muInt_t) mupGetErrorCode(muParserHandle_t a_hParser);
-       API_EXPORT(muInt_t) mupGetErrorPos(muParserHandle_t a_hParser);
-       API_EXPORT(const muChar_t*) mupGetErrorToken(muParserHandle_t a_hParser);
-       //API_EXPORT(const muChar_t*) mupGetErrorExpr(muParserHandle_t a_hParser);
-
-       // This is used for .NET only. It creates a new variable allowing the dll to
-       // manage the variable rather than the .NET garbage collector.
-       API_EXPORT(muFloat_t*) mupCreateVar(void);
-       API_EXPORT(void) mupReleaseVar(muFloat_t*);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // include guard
diff --git a/src/include/gromacs/external/muparser/include/muParserDef.h b/src/include/gromacs/external/muparser/include/muParserDef.h
deleted file mode 100644 (file)
index 7ce24f2..0000000
+++ /dev/null
@@ -1,428 +0,0 @@
-/*
-
-        _____  __ _____________ _______  ______ ___________
-       /     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
-   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
-   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
-                \/      |__|       \/           \/     \/
-   Copyright (C) 2004 - 2020 Ingo Berg
-
-       Redistribution and use in source and binary forms, with or without modification, are permitted
-       provided that the following conditions are met:
-
-         * Redistributions of source code must retain the above copyright notice, this list of
-               conditions and the following disclaimer.
-         * Redistributions in binary form must reproduce the above copyright notice, this list of
-               conditions and the following disclaimer in the documentation and/or other materials provided
-               with the distribution.
-
-       THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
-       IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-       FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-       CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-       DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-       DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-       IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-       OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef MUP_DEF_H
-#define MUP_DEF_H
-
-#include <iostream>
-#include <string>
-#include <sstream>
-#include <map>
-
-#include "muParserFixes.h"
-
-/** \file
-       \brief This file contains standard definitions used by the parser.
-*/
-
-/** \brief Define the base datatype for values.
-
-  This datatype must be a built in value type. You can not use custom classes.
-  It should be working with all types except "int"!
-*/
-#define MUP_BASETYPE double
-
-/** \brief Activate this option in order to compile with OpenMP support.
-
-  OpenMP is used only in the bulk mode it may increase the performance a bit.
-
-  !!! DO NOT ACTIVATE THIS MACRO HERE IF YOU USE CMAKE FOR BUILDING !!!
-
-  use the cmake option instead!
-*/
-//#define MUP_USE_OPENMP
-
-#if defined(_UNICODE)
-       /** \brief Definition of the basic parser string type. */
-       #define MUP_STRING_TYPE std::wstring
-
-       #if !defined(_T)
-               #define _T(x) L##x
-       #endif // not defined _T
-#else
-       #ifndef _T
-               #define _T(x) x
-       #endif
-
-       /** \brief Definition of the basic parser string type. */
-       #define MUP_STRING_TYPE std::string
-#endif
-
-/** \brief An assertion that does not kill the program. */
-#define MUP_ASSERT(COND)                                                                                       \
-            if (!(COND))                                                                                       \
-            {                                                                                                          \
-              stringstream_type ss;                                                                    \
-              ss << _T("Assertion \"") _T(#COND) _T("\" failed: ")     \
-                 << __FILE__ << _T(" line ")                                           \
-                 << __LINE__ << _T(".");                                                       \
-              throw ParserError( ecINTERNAL_ERROR, -1, ss.str());   \
-            }
-
-#if defined(_MSC_VER)
-       #pragma warning(push)
-       #pragma warning(disable : 26812) 
-#endif
-
-
-namespace mu
-{
-#if defined(_UNICODE)
-
-       /** \brief Encapsulate wcout. */
-       inline std::wostream& console()
-       {
-               return std::wcout;
-       }
-
-       /** \brief Encapsulate cin. */
-       inline std::wistream& console_in()
-       {
-               return std::wcin;
-       }
-
-#else
-
-       /** \brief Encapsulate cout.
-
-         Used for supporting UNICODE more easily.
-       */
-       inline std::ostream& console()
-       {
-               return std::cout;
-       }
-
-       /** \brief Encapsulate cin.
-
-         Used for supporting UNICODE more easily.
-       */
-       inline std::istream& console_in()
-       {
-               return std::cin;
-       }
-
-#endif
-
-       /** \brief Bytecode values.
-
-               \attention The order of the operator entries must match the order in ParserBase::c_DefaultOprt!
-       */
-       enum ECmdCode
-       {
-               // The following are codes for built in binary operators
-               // apart from built in operators the user has the opportunity to
-               // add user defined operators.
-               cmLE = 0,                       ///< Operator item:  less or equal
-               cmGE = 1,                       ///< Operator item:  greater or equal
-               cmNEQ = 2,                      ///< Operator item:  not equal
-               cmEQ = 3,                       ///< Operator item:  equals
-               cmLT = 4,                       ///< Operator item:  less than
-               cmGT = 5,                       ///< Operator item:  greater than
-               cmADD = 6,                      ///< Operator item:  add
-               cmSUB = 7,                      ///< Operator item:  subtract
-               cmMUL = 8,                      ///< Operator item:  multiply
-               cmDIV = 9,                      ///< Operator item:  division
-               cmPOW = 10,                     ///< Operator item:  y to the power of ...
-               cmLAND = 11,
-               cmLOR = 12,
-               cmASSIGN = 13,          ///< Operator item:  Assignment operator
-               cmBO = 14,                      ///< Operator item:  opening bracket
-               cmBC = 15,                      ///< Operator item:  closing bracket
-               cmIF = 16,                      ///< For use in the ternary if-then-else operator
-               cmELSE = 17,            ///< For use in the ternary if-then-else operator
-               cmENDIF = 18,           ///< For use in the ternary if-then-else operator
-               cmARG_SEP = 19,         ///< function argument separator
-               cmVAR = 20,                     ///< variable item
-               cmVAL = 21,                     ///< value item
-
-               // For optimization purposes
-               cmVARPOW2 = 22,
-               cmVARPOW3 = 23,
-               cmVARPOW4 = 24,
-               cmVARMUL = 25,
-
-               // operators and functions
-               cmFUNC = 26,            ///< Code for a generic function item
-               cmFUNC_STR,                     ///< Code for a function with a string parameter
-               cmFUNC_BULK,            ///< Special callbacks for Bulk mode with an additional parameter for the bulk index 
-               cmSTRING,                       ///< Code for a string token
-               cmOPRT_BIN,                     ///< user defined binary operator
-               cmOPRT_POSTFIX,         ///< code for postfix operators
-               cmOPRT_INFIX,           ///< code for infix operators
-               cmEND,                          ///< end of formula
-               cmUNKNOWN                       ///< uninitialized item
-       };
-
-       /** \brief Types internally used by the parser.
-       */
-       enum ETypeCode
-       {
-               tpSTR = 0,     ///< String type (Function arguments and constants only, no string variables)
-               tpDBL = 1,     ///< Floating point variables
-               tpVOID = 2      ///< Undefined type.
-       };
-
-
-       enum EParserVersionInfo
-       {
-               pviBRIEF,
-               pviFULL
-       };
-
-
-       /** \brief Parser operator precedence values. */
-       enum EOprtAssociativity
-       {
-               oaLEFT = 0,
-               oaRIGHT = 1,
-               oaNONE = 2
-       };
-
-
-       /** \brief Parser operator precedence values. */
-       enum EOprtPrecedence
-       {
-               // binary operators
-               prLOR = 1,
-               prLAND = 2,
-               prLOGIC = 3,    ///< logic operators
-               prCMP = 4,              ///< comparsion operators
-               prADD_SUB = 5,  ///< addition
-               prMUL_DIV = 6,  ///< multiplication/division
-               prPOW = 7,              ///< power operator priority (highest)
-
-               // infix operators
-               prINFIX = 6,    ///< Signs have a higher priority than ADD_SUB, but lower than power operator
-               prPOSTFIX = 6   ///< Postfix operator priority (currently unused)
-       };
-
-
-       /** \brief Error codes. */
-       enum EErrorCodes
-       {
-               // Formula syntax errors
-               ecUNEXPECTED_OPERATOR = 0,      ///< Unexpected binary operator found
-               ecUNASSIGNABLE_TOKEN = 1,       ///< Token can't be identified.
-               ecUNEXPECTED_EOF = 2,           ///< Unexpected end of formula. (Example: "2+sin(")
-               ecUNEXPECTED_ARG_SEP = 3,       ///< An unexpected comma has been found. (Example: "1,23")
-               ecUNEXPECTED_ARG = 4,           ///< An unexpected argument has been found
-               ecUNEXPECTED_VAL = 5,           ///< An unexpected value token has been found
-               ecUNEXPECTED_VAR = 6,           ///< An unexpected variable token has been found
-               ecUNEXPECTED_PARENS = 7,        ///< Unexpected Parenthesis, opening or closing
-               ecUNEXPECTED_STR = 8,           ///< A string has been found at an inapropriate position
-               ecSTRING_EXPECTED = 9,          ///< A string function has been called with a different type of argument
-               ecVAL_EXPECTED = 10,            ///< A numerical function has been called with a non value type of argument
-               ecMISSING_PARENS = 11,          ///< Missing parens. (Example: "3*sin(3")
-               ecUNEXPECTED_FUN = 12,          ///< Unexpected function found. (Example: "sin(8)cos(9)")
-               ecUNTERMINATED_STRING = 13,     ///< unterminated string constant. (Example: "3*valueof("hello)")
-               ecTOO_MANY_PARAMS = 14,         ///< Too many function parameters
-               ecTOO_FEW_PARAMS = 15,          ///< Too few function parameters. (Example: "ite(1<2,2)")
-               ecOPRT_TYPE_CONFLICT = 16,      ///< binary operators may only be applied to value items of the same type
-               ecSTR_RESULT = 17,                      ///< result is a string
-
-               // Invalid Parser input Parameters
-               ecINVALID_NAME = 18,                    ///< Invalid function, variable or constant name.
-               ecINVALID_BINOP_IDENT = 19,             ///< Invalid binary operator identifier
-               ecINVALID_INFIX_IDENT = 20,             ///< Invalid function, variable or constant name.
-               ecINVALID_POSTFIX_IDENT = 21,   ///< Invalid function, variable or constant name.
-
-               ecBUILTIN_OVERLOAD = 22, ///< Trying to overload builtin operator
-               ecINVALID_FUN_PTR = 23, ///< Invalid callback function pointer 
-               ecINVALID_VAR_PTR = 24, ///< Invalid variable pointer 
-               ecEMPTY_EXPRESSION = 25, ///< The Expression is empty
-               ecNAME_CONFLICT = 26, ///< Name conflict
-               ecOPT_PRI = 27, ///< Invalid operator priority
-               // 
-               ecDOMAIN_ERROR = 28, ///< catch division by zero, sqrt(-1), log(0) (currently unused)
-               ecDIV_BY_ZERO = 29, ///< Division by zero (currently unused)
-               ecGENERIC = 30, ///< Generic error
-               ecLOCALE = 31, ///< Conflict with current locale
-
-               ecUNEXPECTED_CONDITIONAL = 32,
-               ecMISSING_ELSE_CLAUSE = 33,
-               ecMISPLACED_COLON = 34,
-
-               ecUNREASONABLE_NUMBER_OF_COMPUTATIONS = 35,
-
-               ecIDENTIFIER_TOO_LONG = 36, ///< Thrown when an identifier with more then 255 characters is used.
-
-               ecEXPRESSION_TOO_LONG = 37, ///< Throw an exception if the expression has more than 10000 characters. (an arbitrary limit)
-
-               ecINVALID_CHARACTERS_FOUND = 38,///< The expression or identifier contains invalid non printable characters
-
-               // internal errors
-               ecINTERNAL_ERROR = 39,    ///< Internal error of any kind.
-
-               // The last two are special entries 
-               ecCOUNT,                      ///< This is no error code, It just stores just the total number of error codes
-               ecUNDEFINED = -1  ///< Undefined message, placeholder to detect unassigned error messages
-       };
-
-       //------------------------------------------------------------------------------
-       // Basic Types
-       //------------------------------------------------------------------------------
-
-       /** \brief The numeric datatype used by the parser.
-
-         Normally this is a floating point type either single or double precision.
-       */
-       typedef MUP_BASETYPE value_type;
-
-       /** \brief The stringtype used by the parser.
-
-         Depends on whether UNICODE is used or not.
-       */
-       typedef MUP_STRING_TYPE string_type;
-
-       /** \brief The character type used by the parser.
-
-         Depends on whether UNICODE is used or not.
-       */
-       typedef string_type::value_type char_type;
-
-       /** \brief Typedef for easily using stringstream that respect the parser stringtype. */
-       typedef std::basic_stringstream<char_type, std::char_traits<char_type>, std::allocator<char_type> > stringstream_type;
-
-       // Data container types
-
-       /** \brief Type used for storing variables. */
-       typedef std::map<string_type, value_type*> varmap_type;
-
-       /** \brief Type used for storing constants. */
-       typedef std::map<string_type, value_type> valmap_type;
-
-       /** \brief Type for assigning a string name to an index in the internal string table. */
-       typedef std::map<string_type, std::size_t> strmap_type;
-
-       // Parser callbacks
-
-       /** \brief Callback type used for functions without arguments. */
-       typedef value_type(*generic_fun_type)();
-
-       /** \brief Callback type used for functions without arguments. */
-       typedef value_type(*fun_type0)();
-
-       /** \brief Callback type used for functions with a single arguments. */
-       typedef value_type(*fun_type1)(value_type);
-
-       /** \brief Callback type used for functions with two arguments. */
-       typedef value_type(*fun_type2)(value_type, value_type);
-
-       /** \brief Callback type used for functions with three arguments. */
-       typedef value_type(*fun_type3)(value_type, value_type, value_type);
-
-       /** \brief Callback type used for functions with four arguments. */
-       typedef value_type(*fun_type4)(value_type, value_type, value_type, value_type);
-
-       /** \brief Callback type used for functions with five arguments. */
-       typedef value_type(*fun_type5)(value_type, value_type, value_type, value_type, value_type);
-
-       /** \brief Callback type used for functions with six arguments. */
-       typedef value_type(*fun_type6)(value_type, value_type, value_type, value_type, value_type, value_type);
-
-       /** \brief Callback type used for functions with seven arguments. */
-       typedef value_type(*fun_type7)(value_type, value_type, value_type, value_type, value_type, value_type, value_type);
-
-       /** \brief Callback type used for functions with eight arguments. */
-       typedef value_type(*fun_type8)(value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type);
-
-       /** \brief Callback type used for functions with nine arguments. */
-       typedef value_type(*fun_type9)(value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type);
-
-       /** \brief Callback type used for functions with ten arguments. */
-       typedef value_type(*fun_type10)(value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type);
-
-       /** \brief Callback type used for functions without arguments. */
-       typedef value_type(*bulkfun_type0)(int, int);
-
-       /** \brief Callback type used for functions with a single arguments. */
-       typedef value_type(*bulkfun_type1)(int, int, value_type);
-
-       /** \brief Callback type used for functions with two arguments. */
-       typedef value_type(*bulkfun_type2)(int, int, value_type, value_type);
-
-       /** \brief Callback type used for functions with three arguments. */
-       typedef value_type(*bulkfun_type3)(int, int, value_type, value_type, value_type);
-
-       /** \brief Callback type used for functions with four arguments. */
-       typedef value_type(*bulkfun_type4)(int, int, value_type, value_type, value_type, value_type);
-
-       /** \brief Callback type used for functions with five arguments. */
-       typedef value_type(*bulkfun_type5)(int, int, value_type, value_type, value_type, value_type, value_type);
-
-       /** \brief Callback type used for functions with six arguments. */
-       typedef value_type(*bulkfun_type6)(int, int, value_type, value_type, value_type, value_type, value_type, value_type);
-
-       /** \brief Callback type used for functions with seven arguments. */
-       typedef value_type(*bulkfun_type7)(int, int, value_type, value_type, value_type, value_type, value_type, value_type, value_type);
-
-       /** \brief Callback type used for functions with eight arguments. */
-       typedef value_type(*bulkfun_type8)(int, int, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type);
-
-       /** \brief Callback type used for functions with nine arguments. */
-       typedef value_type(*bulkfun_type9)(int, int, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type);
-
-       /** \brief Callback type used for functions with ten arguments. */
-       typedef value_type(*bulkfun_type10)(int, int, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type);
-
-       /** \brief Callback type used for functions with a variable argument list. */
-       typedef value_type(*multfun_type)(const value_type*, int);
-
-       /** \brief Callback type used for functions taking a string as an argument. */
-       typedef value_type(*strfun_type1)(const char_type*);
-
-       /** \brief Callback type used for functions taking a string and a value as arguments. */
-       typedef value_type(*strfun_type2)(const char_type*, value_type);
-
-       /** \brief Callback type used for functions taking a string and two values as arguments. */
-       typedef value_type(*strfun_type3)(const char_type*, value_type, value_type);
-
-       /** \brief Callback type used for functions taking a string and a value as arguments. */
-       typedef value_type(*strfun_type4)(const char_type*, value_type, value_type, value_type);
-
-       /** \brief Callback type used for functions taking a string and two values as arguments. */
-       typedef value_type(*strfun_type5)(const char_type*, value_type, value_type, value_type, value_type);
-
-       /** \brief Callback used for functions that identify values in a string. */
-       typedef int (*identfun_type)(const char_type* sExpr, int* nPos, value_type* fVal);
-
-       /** \brief Callback used for variable creation factory functions. */
-       typedef value_type* (*facfun_type)(const char_type*, void*);
-
-       static const int MaxLenExpression = 5000;
-       static const int MaxLenIdentifier = 100;
-       static const string_type ParserVersion = string_type(_T("2.3.2"));
-       static const string_type ParserVersionDate = string_type(_T("20200617"));
-} // end of namespace
-
-#if defined(_MSC_VER)
-       #pragma warning(pop)
-#endif
-
-#endif
-
diff --git a/src/include/gromacs/external/muparser/include/muParserError.h b/src/include/gromacs/external/muparser/include/muParserError.h
deleted file mode 100644 (file)
index 438b8b6..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
-
-        _____  __ _____________ _______  ______ ___________
-       /     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
-   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
-   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
-                \/      |__|       \/           \/     \/
-   Copyright (C) 2004 - 2020 Ingo Berg
-
-       Redistribution and use in source and binary forms, with or without modification, are permitted
-       provided that the following conditions are met:
-
-         * Redistributions of source code must retain the above copyright notice, this list of
-               conditions and the following disclaimer.
-         * Redistributions in binary form must reproduce the above copyright notice, this list of
-               conditions and the following disclaimer in the documentation and/or other materials provided
-               with the distribution.
-
-       THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
-       IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-       FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-       CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-       DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-       DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-       IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-       OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef MU_PARSER_ERROR_H
-#define MU_PARSER_ERROR_H
-
-#include <stdexcept>
-#include <string>
-#include <sstream>
-#include <vector>
-#include <memory>
-
-#include "muParserDef.h"
-
-/** \file
-       \brief This file defines the error class used by the parser.
-*/
-
-namespace mu
-{
-       /** \brief A class that handles the error messages.     */
-       class ParserErrorMsg final
-       {
-       public:
-               static const ParserErrorMsg& Instance();
-               string_type operator[](unsigned a_iIdx) const;
-
-       private:
-               ParserErrorMsg& operator=(const ParserErrorMsg&) = delete;
-               ParserErrorMsg(const ParserErrorMsg&) = delete;
-               ParserErrorMsg();
-
-               ~ParserErrorMsg() = default;
-
-               std::vector<string_type>  m_vErrMsg;  ///< A vector with the predefined error messages
-       };
-
-
-       /** \brief Error class of the parser.
-
-         Part of the math parser package.
-       */
-       class API_EXPORT_CXX ParserError
-       {
-       private:
-
-               /** \brief Replace all ocuurences of a substring with another string. */
-               void ReplaceSubString(string_type& strSource, const string_type& strFind, const string_type& strReplaceWith);
-               void Reset();
-
-       public:
-
-               ParserError();
-               explicit ParserError(EErrorCodes a_iErrc);
-               explicit ParserError(const string_type& sMsg);
-               ParserError(EErrorCodes a_iErrc, const string_type& sTok, const string_type& sFormula = string_type(), int a_iPos = -1);
-               ParserError(EErrorCodes a_iErrc, int a_iPos, const string_type& sTok);
-               ParserError(const char_type* a_szMsg, int a_iPos = -1, const string_type& sTok = string_type());
-               ParserError(const ParserError& a_Obj);
-
-               ParserError& operator=(const ParserError& a_Obj);
-               ~ParserError();
-
-               void SetFormula(const string_type& a_strFormula);
-               const string_type& GetExpr() const;
-               const string_type& GetMsg() const;
-               int GetPos() const;
-               const string_type& GetToken() const;
-               EErrorCodes GetCode() const;
-
-       private:
-               string_type m_strMsg;     ///< The message string
-               string_type m_strFormula; ///< Formula string
-               string_type m_strTok;     ///< Token related with the error
-               int m_iPos;               ///< Formula position related to the error 
-               EErrorCodes m_iErrc;      ///< Error code
-               const ParserErrorMsg& m_ErrMsg;
-       };
-
-} // namespace mu
-
-#endif
-
diff --git a/src/include/gromacs/external/muparser/include/muParserFixes.h b/src/include/gromacs/external/muparser/include/muParserFixes.h
deleted file mode 100644 (file)
index 59aecad..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
-
-        _____  __ _____________ _______  ______ ___________
-       /     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
-   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
-   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
-                \/      |__|       \/           \/     \/
-   Copyright (C) 2004 - 2020 Ingo Berg
-
-       Redistribution and use in source and binary forms, with or without modification, are permitted
-       provided that the following conditions are met:
-
-         * Redistributions of source code must retain the above copyright notice, this list of
-               conditions and the following disclaimer.
-         * Redistributions in binary form must reproduce the above copyright notice, this list of
-               conditions and the following disclaimer in the documentation and/or other materials provided
-               with the distribution.
-
-       THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
-       IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-       FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-       CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-       DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-       DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-       IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-       OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef MU_PARSER_FIXES_H
-#define MU_PARSER_FIXES_H
-
-/** \file
-       \brief This file contains compatibility fixes for some platforms.
-*/
-
-//
-// Compatibility fixes
-//
-
-/* From http://gcc.gnu.org/wiki/Visibility */
-/* Generic helper definitions for shared library support */
-#if defined _WIN32 || defined __CYGWIN__
-       #define MUPARSER_HELPER_DLL_IMPORT __declspec(dllimport)
-       #define MUPARSER_HELPER_DLL_EXPORT __declspec(dllexport)
-       #define MUPARSER_HELPER_DLL_LOCAL
-#else
-       #if __GNUC__ >= 4
-               #define MUPARSER_HELPER_DLL_IMPORT __attribute__ ((visibility ("default")))
-               #define MUPARSER_HELPER_DLL_EXPORT __attribute__ ((visibility ("default")))
-               #define MUPARSER_HELPER_DLL_LOCAL  __attribute__ ((visibility ("hidden")))
-       #else
-               #define MUPARSER_HELPER_DLL_IMPORT
-               #define MUPARSER_HELPER_DLL_EXPORT
-               #define MUPARSER_HELPER_DLL_LOCAL
-       #endif
-#endif
-
-/* 
-       Now we use the generic helper definitions above to define API_EXPORT_CXX and MUPARSER_LOCAL.
-       API_EXPORT_CXX is used for the public API symbols. It either DLL imports or DLL exports (or does nothing for static build)
-       MUPARSER_LOCAL is used for non-api symbols.
-*/
-
-#ifndef MUPARSER_STATIC /* defined if muParser is compiled as a DLL */
-
-       #ifdef MUPARSERLIB_EXPORTS /* defined if we are building the muParser DLL (instead of using it) */
-               #define API_EXPORT_CXX MUPARSER_HELPER_DLL_EXPORT
-       #else
-               #define API_EXPORT_CXX MUPARSER_HELPER_DLL_IMPORT
-       #endif /* MUPARSER_DLL_EXPORTS */
-       #define MUPARSER_LOCAL MUPARSER_HELPER_DLL_LOCAL
-
-#else /* MUPARSER_STATIC is defined: this means muParser is a static lib. */
-
-       #define API_EXPORT_CXX
-       #define MUPARSER_LOCAL
-
-#endif /* !MUPARSER_STATIC */
-
-
-#ifdef _WIN32
-       #define API_EXPORT(TYPE) API_EXPORT_CXX TYPE __cdecl
-#else
-       #define API_EXPORT(TYPE) TYPE
-#endif
-
-
-#endif // include guard
-
-
diff --git a/src/include/gromacs/external/muparser/include/muParserInt.h b/src/include/gromacs/external/muparser/include/muParserInt.h
deleted file mode 100644 (file)
index dd772cf..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
-
-        _____  __ _____________ _______  ______ ___________
-       /     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
-   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
-   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
-                \/      |__|       \/           \/     \/
-   Copyright (C) 2004 - 2020 Ingo Berg
-
-       Redistribution and use in source and binary forms, with or without modification, are permitted
-       provided that the following conditions are met:
-
-         * Redistributions of source code must retain the above copyright notice, this list of
-               conditions and the following disclaimer.
-         * Redistributions in binary form must reproduce the above copyright notice, this list of
-               conditions and the following disclaimer in the documentation and/or other materials provided
-               with the distribution.
-
-       THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
-       IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-       FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-       CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-       DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-       DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-       IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-       OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef MU_PARSER_INT_H
-#define MU_PARSER_INT_H
-
-#include "muParserBase.h"
-#include <vector>
-
-
-/** \file
-       \brief Definition of a parser using integer value.
-*/
-
-
-namespace mu
-{
-
-       /** \brief Mathematical expressions parser.
-
-         This version of the parser handles only integer numbers. It disables the built in operators thus it is
-         slower than muParser. Integer values are stored in the double value_type and converted if needed.
-       */
-       class ParserInt : public ParserBase
-       {
-       private:
-               static int  Round(value_type v) { return (int)(v + ((v >= 0) ? 0.5 : -0.5)); };
-
-               static value_type  Abs(value_type);
-               static value_type  Sign(value_type);
-               static value_type  Ite(value_type, value_type, value_type);
-               // !! The unary Minus is a MUST, otherwise you can't use negative signs !!
-               static value_type  UnaryMinus(value_type);
-               // Functions with variable number of arguments
-               static value_type  Sum(const value_type* a_afArg, int a_iArgc);  // sum
-               static value_type  Min(const value_type* a_afArg, int a_iArgc);  // minimum
-               static value_type  Max(const value_type* a_afArg, int a_iArgc);  // maximum
-               // binary operator callbacks
-               static value_type  Add(value_type v1, value_type v2);
-               static value_type  Sub(value_type v1, value_type v2);
-               static value_type  Mul(value_type v1, value_type v2);
-               static value_type  Div(value_type v1, value_type v2);
-               static value_type  Mod(value_type v1, value_type v2);
-               static value_type  Pow(value_type v1, value_type v2);
-               static value_type  Shr(value_type v1, value_type v2);
-               static value_type  Shl(value_type v1, value_type v2);
-               static value_type  LogAnd(value_type v1, value_type v2);
-               static value_type  LogOr(value_type v1, value_type v2);
-               static value_type  And(value_type v1, value_type v2);
-               static value_type  Or(value_type v1, value_type v2);
-               static value_type  Xor(value_type v1, value_type v2);
-               static value_type  Less(value_type v1, value_type v2);
-               static value_type  Greater(value_type v1, value_type v2);
-               static value_type  LessEq(value_type v1, value_type v2);
-               static value_type  GreaterEq(value_type v1, value_type v2);
-               static value_type  Equal(value_type v1, value_type v2);
-               static value_type  NotEqual(value_type v1, value_type v2);
-               static value_type  Not(value_type v1);
-
-               static int IsHexVal(const char_type* a_szExpr, int* a_iPos, value_type* a_iVal);
-               static int IsBinVal(const char_type* a_szExpr, int* a_iPos, value_type* a_iVal);
-               static int IsVal(const char_type* a_szExpr, int* a_iPos, value_type* a_iVal);
-
-               /** \brief A facet class used to change decimal and thousands separator. */
-               template<class TChar>
-               class change_dec_sep : public std::numpunct<TChar>
-               {
-               public:
-
-                       explicit change_dec_sep(char_type cDecSep, char_type cThousandsSep = 0, int nGroup = 3)
-                               :std::numpunct<TChar>()
-                               , m_cDecPoint(cDecSep)
-                               , m_cThousandsSep(cThousandsSep)
-                               , m_nGroup(nGroup)
-                       {}
-
-               protected:
-
-                       virtual char_type do_decimal_point() const
-                       {
-                               return m_cDecPoint;
-                       }
-
-                       virtual char_type do_thousands_sep() const
-                       {
-                               return m_cThousandsSep;
-                       }
-
-                       virtual std::string do_grouping() const
-                       {
-                               // fix for issue 4: https://code.google.com/p/muparser/issues/detail?id=4
-                               // courtesy of Jens Bartsch
-                               // original code:
-                               //        return std::string(1, (char)m_nGroup); 
-                               // new code:
-                               return std::string(1, (char)(m_cThousandsSep > 0 ? m_nGroup : CHAR_MAX));
-                       }
-
-               private:
-
-                       int m_nGroup;
-                       char_type m_cDecPoint;
-                       char_type m_cThousandsSep;
-               };
-
-       public:
-               ParserInt();
-
-               virtual void InitFun();
-               virtual void InitOprt();
-               virtual void InitConst();
-               virtual void InitCharSets();
-       };
-
-} // namespace mu
-
-#endif
-
diff --git a/src/include/gromacs/external/muparser/include/muParserTemplateMagic.h b/src/include/gromacs/external/muparser/include/muParserTemplateMagic.h
deleted file mode 100644 (file)
index 1b26d00..0000000
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
-
-        _____  __ _____________ _______  ______ ___________
-       /     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
-   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
-   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
-                \/      |__|       \/           \/     \/
-   Copyright (C) 2004 - 2020 Ingo Berg
-
-       Redistribution and use in source and binary forms, with or without modification, are permitted
-       provided that the following conditions are met:
-
-         * Redistributions of source code must retain the above copyright notice, this list of
-               conditions and the following disclaimer.
-         * Redistributions in binary form must reproduce the above copyright notice, this list of
-               conditions and the following disclaimer in the documentation and/or other materials provided
-               with the distribution.
-
-       THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
-       IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-       FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-       CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-       DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-       DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-       IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-       OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef MU_PARSER_TEMPLATE_MAGIC_H
-#define MU_PARSER_TEMPLATE_MAGIC_H
-
-#include <cmath>
-#include "muParserError.h"
-
-
-namespace mu
-{
-       //-----------------------------------------------------------------------------------------------
-       //
-       // Compile time type detection
-       //
-       //-----------------------------------------------------------------------------------------------
-
-       /** \brief A class singling out integer types at compile time using
-                          template meta programming.
-       */
-       template<typename T>
-       struct TypeInfo
-       {
-               static bool IsInteger() { return false; }
-       };
-
-       template<>
-       struct TypeInfo<char>
-       {
-               static bool IsInteger() { return true; }
-       };
-
-       template<>
-       struct TypeInfo<short>
-       {
-               static bool IsInteger() { return true; }
-       };
-
-       template<>
-       struct TypeInfo<int>
-       {
-               static bool IsInteger() { return true; }
-       };
-
-       template<>
-       struct TypeInfo<long>
-       {
-               static bool IsInteger() { return true; }
-       };
-
-       template<>
-       struct TypeInfo<unsigned char>
-       {
-               static bool IsInteger() { return true; }
-       };
-
-       template<>
-       struct TypeInfo<unsigned short>
-       {
-               static bool IsInteger() { return true; }
-       };
-
-       template<>
-       struct TypeInfo<unsigned int>
-       {
-               static bool IsInteger() { return true; }
-       };
-
-       template<>
-       struct TypeInfo<unsigned long>
-       {
-               static bool IsInteger() { return true; }
-       };
-
-
-       //-----------------------------------------------------------------------------------------------
-       //
-       // Standard math functions with dummy overload for integer types
-       //
-       //-----------------------------------------------------------------------------------------------
-
-       /** \brief A template class for providing wrappers for essential math functions.
-
-         This template is spezialized for several types in order to provide a unified interface
-         for parser internal math function calls regardless of the data type.
-       */
-       template<typename T>
-       struct MathImpl
-       {
-               static T Sin(T v) { return sin(v); }
-               static T Cos(T v) { return cos(v); }
-               static T Tan(T v) { return tan(v); }
-               static T ASin(T v) { return asin(v); }
-               static T ACos(T v) { return acos(v); }
-               static T ATan(T v) { return atan(v); }
-               static T ATan2(T v1, T v2) { return atan2(v1, v2); }
-               static T Sinh(T v) { return sinh(v); }
-               static T Cosh(T v) { return cosh(v); }
-               static T Tanh(T v) { return tanh(v); }
-               static T ASinh(T v) { return log(v + sqrt(v * v + 1)); }
-               static T ACosh(T v) { return log(v + sqrt(v * v - 1)); }
-               static T ATanh(T v) { return ((T)0.5 * log((1 + v) / (1 - v))); }
-               static T Log(T v) { return log(v); }
-               static T Log2(T v) { return log(v) / log((T)2); } // Logarithm base 2
-               static T Log10(T v) { return log10(v); }         // Logarithm base 10
-               static T Exp(T v) { return exp(v); }
-               static T Abs(T v) { return (v >= 0) ? v : -v; }
-               static T Sqrt(T v) { return sqrt(v); }
-               static T Rint(T v) { return floor(v + (T)0.5); }
-               static T Sign(T v) { return (T)((v < 0) ? -1 : (v > 0) ? 1 : 0); }
-               static T Pow(T v1, T v2) { return std::pow(v1, v2); }
-
-               static T UnaryMinus(T v) { return -v; }
-               static T UnaryPlus(T v) { return v; }
-
-               static T Sum(const T *a_afArg, int a_iArgc)
-               {
-                       if (!a_iArgc)
-                               throw ParserError(_T("too few arguments for function sum."));
-
-                       T fRes = 0;
-                       for (int i = 0; i < a_iArgc; ++i) fRes += a_afArg[i];
-                       return fRes;
-               }
-
-               static T Avg(const T *a_afArg, int a_iArgc)
-               {
-                       if (!a_iArgc)
-                               throw ParserError(_T("too few arguments for function sum."));
-
-                       T fRes = 0;
-                       for (int i = 0; i < a_iArgc; ++i) fRes += a_afArg[i];
-                       return fRes / (T)a_iArgc;
-               }
-
-               static T Min(const T *a_afArg, int a_iArgc)
-               {
-                       if (!a_iArgc)
-                               throw ParserError(_T("too few arguments for function min."));
-
-                       T fRes = a_afArg[0];
-                       for (int i = 0; i < a_iArgc; ++i)
-                               fRes = std::min(fRes, a_afArg[i]);
-
-                       return fRes;
-               }
-
-               static T Max(const T *a_afArg, int a_iArgc)
-               {
-                       if (!a_iArgc)
-                               throw ParserError(_T("too few arguments for function min."));
-
-                       T fRes = a_afArg[0];
-                       for (int i = 0; i < a_iArgc; ++i) fRes = std::max(fRes, a_afArg[i]);
-
-                       return fRes;
-               }
-
-
-#if defined (__GNUG__)
-               // Bei zu genauer definition von pi kann die Berechnung von
-               // sin(pi*a) mit a=1 10 x langsamer sein! 
-               static constexpr T CONST_PI = (T)3.141592653589;
-#else
-               static constexpr T CONST_PI = (T)3.141592653589793238462643;
-#endif
-
-               static constexpr T CONST_E = (T)2.718281828459045235360287;
-       };
-}
-
-#endif
diff --git a/src/include/gromacs/external/muparser/include/muParserTest.h b/src/include/gromacs/external/muparser/include/muParserTest.h
deleted file mode 100644 (file)
index 9f4be55..0000000
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
-
-        _____  __ _____________ _______  ______ ___________
-       /     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
-   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
-   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
-                \/      |__|       \/           \/     \/
-   Copyright (C) 2004 - 2020 Ingo Berg
-
-       Redistribution and use in source and binary forms, with or without modification, are permitted
-       provided that the following conditions are met:
-
-         * Redistributions of source code must retain the above copyright notice, this list of
-               conditions and the following disclaimer.
-         * Redistributions in binary form must reproduce the above copyright notice, this list of
-               conditions and the following disclaimer in the documentation and/or other materials provided
-               with the distribution.
-
-       THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
-       IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-       FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-       CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-       DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-       DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-       IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-       OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef MU_PARSER_TEST_H
-#define MU_PARSER_TEST_H
-
-#include <string>
-#include <cstdlib>
-#include <numeric> // for accumulate
-#include "muParser.h"
-#include "muParserInt.h"
-
-/** \file
-       \brief This file contains the parser test class.
-*/
-
-namespace mu
-{
-       /** \brief Namespace for test cases. */
-       namespace Test
-       {
-               /** \brief Test cases for unit testing. */
-               class API_EXPORT_CXX ParserTester final
-               {
-               private:
-                       static int c_iCount;
-
-                       static value_type f0() { return 42; };
-
-                       // Multiarg callbacks
-                       static value_type f1of1(value_type v) { return v; };
-
-                       static value_type f1of2(value_type v, value_type) { return v; };
-                       static value_type f2of2(value_type, value_type v) { return v; };
-
-                       static value_type f1of3(value_type v, value_type, value_type) { return v; };
-                       static value_type f2of3(value_type, value_type v, value_type) { return v; };
-                       static value_type f3of3(value_type, value_type, value_type v) { return v; };
-
-                       static value_type f1of4(value_type v, value_type, value_type, value_type) { return v; }
-                       static value_type f2of4(value_type, value_type v, value_type, value_type) { return v; }
-                       static value_type f3of4(value_type, value_type, value_type v, value_type) { return v; }
-                       static value_type f4of4(value_type, value_type, value_type, value_type v) { return v; }
-
-                       static value_type f1of5(value_type v, value_type, value_type, value_type, value_type) { return v; }
-                       static value_type f2of5(value_type, value_type v, value_type, value_type, value_type) { return v; }
-                       static value_type f3of5(value_type, value_type, value_type v, value_type, value_type) { return v; }
-                       static value_type f4of5(value_type, value_type, value_type, value_type v, value_type) { return v; }
-                       static value_type f5of5(value_type, value_type, value_type, value_type, value_type v) { return v; }
-
-                       static value_type Min(value_type a_fVal1, value_type a_fVal2) { return (a_fVal1 < a_fVal2) ? a_fVal1 : a_fVal2; }
-                       static value_type Max(value_type a_fVal1, value_type a_fVal2) { return (a_fVal1 > a_fVal2) ? a_fVal1 : a_fVal2; }
-
-                       static value_type plus2(value_type v1) { return v1 + 2; }
-                       static value_type times3(value_type v1) { return v1 * 3; }
-                       static value_type sqr(value_type v1) { return v1 * v1; }
-                       static value_type sign(value_type v) { return -v; }
-                       static value_type add(value_type v1, value_type v2) { return v1 + v2; }
-                       static value_type land(value_type v1, value_type v2) { return (int)v1 & (int)v2; }
-
-
-                       static value_type FirstArg(const value_type* a_afArg, int a_iArgc)
-                       {
-                               if (!a_iArgc)
-                                       throw mu::Parser::exception_type(_T("too few arguments for function FirstArg."));
-
-                               return  a_afArg[0];
-                       }
-
-                       static value_type LastArg(const value_type* a_afArg, int a_iArgc)
-                       {
-                               if (!a_iArgc)
-                                       throw mu::Parser::exception_type(_T("too few arguments for function LastArg."));
-
-                               return  a_afArg[a_iArgc - 1];
-                       }
-
-                       static value_type Sum(const value_type* a_afArg, int a_iArgc)
-                       {
-                               if (!a_iArgc)
-                                       throw mu::Parser::exception_type(_T("too few arguments for function sum."));
-
-                               value_type fRes = 0;
-                               for (int i = 0; i < a_iArgc; ++i) fRes += a_afArg[i];
-                               return fRes;
-                       }
-
-                       static value_type Rnd(value_type v)
-                       {
-                               return (value_type)(1 + (v * std::rand() / (RAND_MAX + 1.0)));
-                       }
-
-                       static value_type RndWithString(const char_type*)
-                       {
-                               return (value_type)(1.0 + (1000.0 * std::rand() / (RAND_MAX + 1.0)));
-                       }
-
-                       static value_type Ping()
-                       {
-                               return 10;
-                       }
-
-                       static value_type ValueOf(const char_type*)
-                       {
-                               return 123;
-                       }
-
-                       static value_type StrFun1(const char_type* v1)
-                       {
-                               int val(0);
-                               stringstream_type(v1) >> val;
-                               return (value_type)val;
-                       }
-
-                       static value_type StrFun2(const char_type* v1, value_type v2)
-                       {
-                               int val(0);
-                               stringstream_type(v1) >> val;
-                               return (value_type)(val + v2);
-                       }
-
-                       static value_type StrFun3(const char_type* v1, value_type v2, value_type v3)
-                       {
-                               int val(0);
-                               stringstream_type(v1) >> val;
-                               return val + v2 + v3;
-                       }
-
-                       static value_type StrFun4(const char_type* v1, value_type v2, value_type v3, value_type v4)
-                       {
-                               int val(0);
-                               stringstream_type(v1) >> val;
-                               return val + v2 + v3 + v4;
-                       }
-
-                       static value_type StrFun5(const char_type* v1, value_type v2, value_type v3, value_type v4, value_type v5)
-                       {
-                               int val(0);
-                               stringstream_type(v1) >> val;
-                               return val + v2 + v3 + v4 + v5;
-                       }
-
-                       static value_type StrToFloat(const char_type* a_szMsg)
-                       {
-                               value_type val(0);
-                               stringstream_type(a_szMsg) >> val;
-                               return val;
-                       }
-
-                       // postfix operator callback
-                       static value_type Mega(value_type a_fVal) { return a_fVal * (value_type)1e6; }
-                       static value_type Micro(value_type a_fVal) { return a_fVal * (value_type)1e-6; }
-                       static value_type Milli(value_type a_fVal) { return a_fVal / (value_type)1e3; }
-
-                       // Custom value recognition
-                       static int IsHexVal(const char_type* a_szExpr, int* a_iPos, value_type* a_fVal);
-
-                       int TestNames();
-                       int TestSyntax();
-                       int TestMultiArg();
-                       int TestPostFix();
-                       int TestExpression();
-                       int TestInfixOprt();
-                       int TestBinOprt();
-                       int TestVarConst();
-                       int TestInterface();
-                       int TestException();
-                       int TestStrArg();
-                       int TestIfThenElse();
-                       int TestBulkMode();
-                       int TestOssFuzzTestCases();
-
-                       void Abort() const;
-
-               public:
-                       typedef int (ParserTester::* testfun_type)();
-
-                       ParserTester();
-                       int Run();
-
-               private:
-                       std::vector<testfun_type> m_vTestFun;
-                       void AddTest(testfun_type a_pFun);
-
-                       // Test Double Parser
-                       int EqnTest(const string_type& a_str, double a_fRes, bool a_fPass);
-                       int EqnTestWithVarChange(const string_type& a_str, double a_fRes1, double a_fVar1,      double a_fRes2, double a_fVar2);
-                       int ThrowTest(const string_type& a_str, int a_iErrc, bool a_bFail = true);
-
-                       // Test Int Parser
-                       int EqnTestInt(const string_type& a_str, double a_fRes, bool a_fPass);
-
-                       // Test Bulkmode
-                       int EqnTestBulk(const string_type& a_str, double a_fRes[4], bool a_fPass);
-
-               };
-       } // namespace Test
-} // namespace mu
-
-#endif
-
diff --git a/src/include/gromacs/external/muparser/include/muParserToken.h b/src/include/gromacs/external/muparser/include/muParserToken.h
deleted file mode 100644 (file)
index f12a4e8..0000000
+++ /dev/null
@@ -1,409 +0,0 @@
-/*
-
-        _____  __ _____________ _______  ______ ___________
-       /     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
-   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
-   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
-                \/      |__|       \/           \/     \/
-   Copyright (C) 2004 - 2020 Ingo Berg
-
-       Redistribution and use in source and binary forms, with or without modification, are permitted
-       provided that the following conditions are met:
-
-         * Redistributions of source code must retain the above copyright notice, this list of
-               conditions and the following disclaimer.
-         * Redistributions in binary form must reproduce the above copyright notice, this list of
-               conditions and the following disclaimer in the documentation and/or other materials provided
-               with the distribution.
-
-       THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
-       IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-       FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-       CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-       DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-       DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-       IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-       OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef MU_PARSER_TOKEN_H
-#define MU_PARSER_TOKEN_H
-
-#include <string>
-#include <stack>
-#include <vector>
-#include <memory>
-
-#if defined(_MSC_VER)
-       #pragma warning(push)
-       #pragma warning(disable : 26812) 
-#endif
-
-#include "muParserError.h"
-#include "muParserCallback.h"
-
-/** \file
-       \brief This file contains the parser token definition.
-*/
-
-namespace mu
-{
-       /** \brief Encapsulation of the data for a single formula token.
-
-               Formula token implementation. Part of the Math Parser Package.
-               Formula tokens can be either one of the following:
-               <ul>
-                       <li>value</li>
-                       <li>variable</li>
-                       <li>function with numerical arguments</li>
-                       <li>functions with a string as argument</li>
-                       <li>prefix operators</li>
-                       <li>infix operators</li>
-                       <li>binary operator</li>
-               </ul>
-       */
-       template<typename TBase, typename TString>
-       class ParserToken final
-       {
-       private:
-
-               ECmdCode  m_iCode;  ///< Type of the token; The token type is a constant of type #ECmdCode.
-               ETypeCode m_iType;
-               void* m_pTok;           ///< Stores Token pointer; not applicable for all tokens
-               int  m_iIdx;            ///< An otional index to an external buffer storing the token data
-               TString m_strTok;   ///< Token string
-               TString m_strVal;   ///< Value for string variables
-               value_type m_fVal;  ///< the value 
-               std::unique_ptr<ParserCallback> m_pCallback;
-
-       public:
-
-               /** \brief Constructor (default).
-
-                       Sets token to an neutral state of type cmUNKNOWN.
-                       \throw nothrow
-                       \sa ECmdCode
-               */
-               ParserToken()
-                       :m_iCode(cmUNKNOWN)
-                       , m_iType(tpVOID)
-                       , m_pTok(0)
-                       , m_iIdx(-1)
-                       , m_strTok()
-                       , m_strVal()
-                       , m_fVal(0)
-                       , m_pCallback()
-               {}
-
-               //------------------------------------------------------------------------------
-               /** \brief Create token from another one.
-
-                       Implemented by calling Assign(...)
-                       \throw nothrow
-                       \post m_iType==cmUNKNOWN
-                       \sa #Assign
-               */
-               ParserToken(const ParserToken& a_Tok)
-               {
-                       Assign(a_Tok);
-               }
-
-               
-               /** \brief Assignment operator.
-
-                       Copy token state from another token and return this.
-                       Implemented by calling Assign(...).
-                       \throw nothrow
-               */
-               ParserToken& operator=(const ParserToken& a_Tok)
-               {
-                       Assign(a_Tok);
-                       return *this;
-               }
-
-
-               /** \brief Copy token information from argument.
-
-                       \throw nothrow
-               */
-               void Assign(const ParserToken& a_Tok)
-               {
-                       m_iCode = a_Tok.m_iCode;
-                       m_pTok = a_Tok.m_pTok;
-                       m_strTok = a_Tok.m_strTok;
-                       m_iIdx = a_Tok.m_iIdx;
-                       m_strVal = a_Tok.m_strVal;
-                       m_iType = a_Tok.m_iType;
-                       m_fVal = a_Tok.m_fVal;
-                       // create new callback object if a_Tok has one 
-                       m_pCallback.reset(a_Tok.m_pCallback.get() ? a_Tok.m_pCallback->Clone() : 0);
-               }
-
-               //------------------------------------------------------------------------------
-               /** \brief Assign a token type.
-
-                 Token may not be of type value, variable or function. Those have separate set functions.
-
-                 \pre [assert] a_iType!=cmVAR
-                 \pre [assert] a_iType!=cmVAL
-                 \pre [assert] a_iType!=cmFUNC
-                 \post m_fVal = 0
-                 \post m_pTok = 0
-               */
-               ParserToken& Set(ECmdCode a_iType, const TString& a_strTok = TString())
-               {
-                       // The following types can't be set this way, they have special Set functions
-                       MUP_ASSERT(a_iType != cmVAR);
-                       MUP_ASSERT(a_iType != cmVAL);
-                       MUP_ASSERT(a_iType != cmFUNC);
-
-                       m_iCode = a_iType;
-                       m_iType = tpVOID;
-                       m_pTok = 0;
-                       m_strTok = a_strTok;
-                       m_iIdx = -1;
-
-                       return *this;
-               }
-
-               //------------------------------------------------------------------------------
-               /** \brief Set Callback type. */
-               ParserToken& Set(const ParserCallback& a_pCallback, const TString& a_sTok)
-               {
-                       MUP_ASSERT(a_pCallback.GetAddr());
-
-                       m_iCode = a_pCallback.GetCode();
-                       m_iType = tpVOID;
-                       m_strTok = a_sTok;
-                       m_pCallback.reset(new ParserCallback(a_pCallback));
-
-                       m_pTok = 0;
-                       m_iIdx = -1;
-
-                       return *this;
-               }
-
-               //------------------------------------------------------------------------------
-               /** \brief Make this token a value token.
-
-                       Member variables not necessary for value tokens will be invalidated.
-                       \throw nothrow
-               */
-               ParserToken& SetVal(TBase a_fVal, const TString& a_strTok = TString())
-               {
-                       m_iCode = cmVAL;
-                       m_iType = tpDBL;
-                       m_fVal = a_fVal;
-                       m_strTok = a_strTok;
-                       m_iIdx = -1;
-
-                       m_pTok = 0;
-                       m_pCallback.reset(0);
-
-                       return *this;
-               }
-
-               //------------------------------------------------------------------------------
-               /** \brief make this token a variable token.
-
-                       Member variables not necessary for variable tokens will be invalidated.
-                       \throw nothrow
-               */
-               ParserToken& SetVar(TBase* a_pVar, const TString& a_strTok)
-               {
-                       m_iCode = cmVAR;
-                       m_iType = tpDBL;
-                       m_strTok = a_strTok;
-                       m_iIdx = -1;
-                       m_pTok = (void*)a_pVar;
-                       m_pCallback.reset(0);
-                       return *this;
-               }
-
-               //------------------------------------------------------------------------------
-               /** \brief Make this token a variable token.
-
-                       Member variables not necessary for variable tokens will be invalidated.
-                       \throw nothrow
-               */
-               ParserToken& SetString(const TString& a_strTok, std::size_t a_iSize)
-               {
-                       m_iCode = cmSTRING;
-                       m_iType = tpSTR;
-                       m_strTok = a_strTok;
-                       m_iIdx = static_cast<int>(a_iSize);
-
-                       m_pTok = 0;
-                       m_pCallback.reset(0);
-                       return *this;
-               }
-
-               //------------------------------------------------------------------------------
-               /** \brief Set an index associated with the token related data.
-
-                       In cmSTRFUNC - This is the index to a string table in the main parser.
-                       \param a_iIdx The index the string function result will take in the bytecode parser.
-                       \throw exception_type if #a_iIdx<0 or #m_iType!=cmSTRING
-               */
-               void SetIdx(int a_iIdx)
-               {
-                       if (m_iCode != cmSTRING || a_iIdx < 0)
-                               throw ParserError(ecINTERNAL_ERROR);
-
-                       m_iIdx = a_iIdx;
-               }
-
-               //------------------------------------------------------------------------------
-               /** \brief Return Index associated with the token related data.
-
-                       In cmSTRFUNC - This is the index to a string table in the main parser.
-
-                       \throw exception_type if #m_iIdx<0 or #m_iType!=cmSTRING
-                       \return The index the result will take in the Bytecode calculatin array (#m_iIdx).
-               */
-               int GetIdx() const
-               {
-                       if (m_iIdx < 0 || m_iCode != cmSTRING)
-                               throw ParserError(ecINTERNAL_ERROR);
-
-                       return m_iIdx;
-               }
-
-               //------------------------------------------------------------------------------
-               /** \brief Return the token type.
-
-                       \return #m_iType
-                       \throw nothrow
-               */
-               ECmdCode GetCode() const
-               {
-                       if (m_pCallback.get())
-                       {
-                               return m_pCallback->GetCode();
-                       }
-                       else
-                       {
-                               return m_iCode;
-                       }
-               }
-
-               //------------------------------------------------------------------------------
-               ETypeCode GetType() const
-               {
-                       if (m_pCallback.get())
-                       {
-                               return m_pCallback->GetType();
-                       }
-                       else
-                       {
-                               return m_iType;
-                       }
-               }
-
-               //------------------------------------------------------------------------------
-               int GetPri() const
-               {
-                       if (!m_pCallback.get())
-                               throw ParserError(ecINTERNAL_ERROR);
-
-                       if (m_pCallback->GetCode() != cmOPRT_BIN && m_pCallback->GetCode() != cmOPRT_INFIX)
-                               throw ParserError(ecINTERNAL_ERROR);
-
-                       return m_pCallback->GetPri();
-               }
-
-               //------------------------------------------------------------------------------
-               EOprtAssociativity GetAssociativity() const
-               {
-                       if (m_pCallback.get() == nullptr || m_pCallback->GetCode() != cmOPRT_BIN)
-                               throw ParserError(ecINTERNAL_ERROR);
-
-                       return m_pCallback->GetAssociativity();
-               }
-
-               //------------------------------------------------------------------------------
-               /** \brief Return the address of the callback function assoziated with
-                                  function and operator tokens.
-
-                       \return The pointer stored in #m_pTok.
-                       \throw exception_type if token type is non of:
-                                  <ul>
-                                        <li>cmFUNC</li>
-                                        <li>cmSTRFUNC</li>
-                                        <li>cmPOSTOP</li>
-                                        <li>cmINFIXOP</li>
-                                        <li>cmOPRT_BIN</li>
-                                  </ul>
-                       \sa ECmdCode
-               */
-               generic_fun_type GetFuncAddr() const
-               {
-                       return (m_pCallback.get()) ? (generic_fun_type)m_pCallback->GetAddr() : 0;
-               }
-
-               //------------------------------------------------------------------------------
-               /** \biref Get value of the token.
-
-                       Only applicable to variable and value tokens.
-                       \throw exception_type if token is no value/variable token.
-               */
-               TBase GetVal() const
-               {
-                       switch (m_iCode)
-                       {
-                       case cmVAL:  return m_fVal;
-                       case cmVAR:  return *((TBase*)m_pTok);
-                       default:     throw ParserError(ecVAL_EXPECTED);
-                       }
-               }
-
-               //------------------------------------------------------------------------------
-               /** \brief Get address of a variable token.
-
-                 Valid only if m_iType==CmdVar.
-                 \throw exception_type if token is no variable token.
-               */
-               TBase* GetVar() const
-               {
-                       if (m_iCode != cmVAR)
-                               throw ParserError(ecINTERNAL_ERROR);
-
-                       return (TBase*)m_pTok;
-               }
-
-               //------------------------------------------------------------------------------
-               /** \brief Return the number of function arguments.
-
-                 Valid only if m_iType==CmdFUNC.
-               */
-               int GetArgCount() const
-               {
-                       MUP_ASSERT(m_pCallback.get());
-
-                       if (!m_pCallback->GetAddr())
-                               throw ParserError(ecINTERNAL_ERROR);
-
-                       return m_pCallback->GetArgc();
-               }
-
-               //------------------------------------------------------------------------------
-               /** \brief Return the token identifier.
-
-                       If #m_iType is cmSTRING the token identifier is the value of the string argument
-                       for a string function.
-                       \return #m_strTok
-                       \throw nothrow
-                       \sa m_strTok
-               */
-               const TString& GetAsString() const
-               {
-                       return m_strTok;
-               }
-       };
-} // namespace mu
-
-#if defined(_MSC_VER)
-       #pragma warning(pop)
-#endif
-
-#endif
diff --git a/src/include/gromacs/external/muparser/include/muParserTokenReader.h b/src/include/gromacs/external/muparser/include/muParserTokenReader.h
deleted file mode 100644 (file)
index caeb920..0000000
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
-
-        _____  __ _____________ _______  ______ ___________
-       /     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
-   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
-   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
-                \/      |__|       \/           \/     \/
-   Copyright (C) 2004 - 2020 Ingo Berg
-
-       Redistribution and use in source and binary forms, with or without modification, are permitted
-       provided that the following conditions are met:
-
-         * Redistributions of source code must retain the above copyright notice, this list of
-               conditions and the following disclaimer.
-         * Redistributions in binary form must reproduce the above copyright notice, this list of
-               conditions and the following disclaimer in the documentation and/or other materials provided
-               with the distribution.
-
-       THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
-       IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-       FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
-       CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-       DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-       DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-       IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-       OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef MU_PARSER_TOKEN_READER_H
-#define MU_PARSER_TOKEN_READER_H
-
-#include <cstdio>
-#include <cstring>
-#include <list>
-#include <map>
-#include <memory>
-#include <stack>
-#include <string>
-
-#include "muParserDef.h"
-#include "muParserToken.h"
-
-/** \file
-       \brief This file contains the parser token reader definition.
-*/
-
-
-namespace mu
-{
-       // Forward declaration
-       class ParserBase;
-
-       /** \brief Token reader for the ParserBase class. */
-       class ParserTokenReader final
-       {
-       private:
-
-               typedef ParserToken<value_type, string_type> token_type;
-
-       public:
-
-               ParserTokenReader(ParserBase* a_pParent);
-               ParserTokenReader* Clone(ParserBase* a_pParent) const;
-
-               void AddValIdent(identfun_type a_pCallback);
-               void SetVarCreator(facfun_type a_pFactory, void* pUserData);
-               void SetFormula(const string_type& a_strFormula);
-               void SetArgSep(char_type cArgSep);
-
-               int GetPos() const;
-               const string_type& GetExpr() const;
-               varmap_type& GetUsedVar();
-               char_type GetArgSep() const;
-
-               void IgnoreUndefVar(bool bIgnore);
-               void ReInit();
-               token_type ReadNextToken();
-
-       private:
-
-               /** \brief Syntax codes.
-
-                       The syntax codes control the syntax check done during the first time parsing of
-                       the expression string. They are flags that indicate which tokens are allowed next
-                       if certain tokens are identified.
-               */
-               enum ESynCodes
-               {
-                       noBO = 1 << 0,                  ///< to avoid i.e. "cos(7)(" 
-                       noBC = 1 << 1,                  ///< to avoid i.e. "sin)" or "()"
-                       noVAL = 1 << 2,                 ///< to avoid i.e. "tan 2" or "sin(8)3.14"
-                       noVAR = 1 << 3,                 ///< to avoid i.e. "sin a" or "sin(8)a"
-                       noARG_SEP = 1 << 4,             ///< to avoid i.e. ",," or "+," ...
-                       noFUN = 1 << 5,                 ///< to avoid i.e. "sqrt cos" or "(1)sin"       
-                       noOPT = 1 << 6,                 ///< to avoid i.e. "(+)"
-                       noPOSTOP = 1 << 7,              ///< to avoid i.e. "(5!!)" "sin!"
-                       noINFIXOP = 1 << 8,             ///< to avoid i.e. "++4" "!!4"
-                       noEND = 1 << 9,                 ///< to avoid unexpected end of formula
-                       noSTR = 1 << 10,                ///< to block numeric arguments on string functions
-                       noASSIGN = 1 << 11,             ///< to block assignment to constant i.e. "4=7"
-                       noIF = 1 << 12,
-                       noELSE = 1 << 13,
-                       sfSTART_OF_LINE = noOPT | noBC | noPOSTOP | noASSIGN | noIF | noELSE | noARG_SEP,
-                       noANY = ~0                              ///< All of he above flags set
-               };
-
-               ParserTokenReader(const ParserTokenReader& a_Reader);
-               ParserTokenReader& operator=(const ParserTokenReader& a_Reader);
-               void Assign(const ParserTokenReader& a_Reader);
-
-               void SetParent(ParserBase* a_pParent);
-               int ExtractToken(const char_type* a_szCharSet, string_type& a_strTok, std::size_t a_iPos) const;
-               int ExtractOperatorToken(string_type& a_sTok, std::size_t a_iPos) const;
-
-               bool IsBuiltIn(token_type& a_Tok);
-               bool IsArgSep(token_type& a_Tok);
-               bool IsEOF(token_type& a_Tok);
-               bool IsInfixOpTok(token_type& a_Tok);
-               bool IsFunTok(token_type& a_Tok);
-               bool IsPostOpTok(token_type& a_Tok);
-               bool IsOprt(token_type& a_Tok);
-               bool IsValTok(token_type& a_Tok);
-               bool IsVarTok(token_type& a_Tok);
-               bool IsStrVarTok(token_type& a_Tok);
-               bool IsUndefVarTok(token_type& a_Tok);
-               bool IsString(token_type& a_Tok);
-               void Error(EErrorCodes a_iErrc, int a_iPos = -1, const string_type& a_sTok = string_type()) const;
-
-               token_type& SaveBeforeReturn(const token_type& tok);
-
-               ParserBase* m_pParser;
-               string_type m_strFormula;
-               int  m_iPos;
-               int  m_iSynFlags;
-               bool m_bIgnoreUndefVar;
-
-               const funmap_type* m_pFunDef;
-               const funmap_type* m_pPostOprtDef;
-               const funmap_type* m_pInfixOprtDef;
-               const funmap_type* m_pOprtDef;
-               const valmap_type* m_pConstDef;
-               const strmap_type* m_pStrVarDef;
-
-               varmap_type* m_pVarDef;  ///< The only non const pointer to parser internals
-               facfun_type m_pFactory;
-               void* m_pFactoryData;
-               std::list<identfun_type> m_vIdentFun; ///< Value token identification function
-               varmap_type m_UsedVar;
-               value_type m_fZero;      ///< Dummy value of zero, referenced by undefined variables
-               
-               std::stack<int> m_bracketStack;
-
-               token_type m_lastTok;
-               char_type m_cArgSep;     ///< The character used for separating function arguments
-       };
-} // namespace mu
-
-#endif
-
-
diff --git a/src/include/gromacs/external/thread_mpi/include/thread_mpi.h b/src/include/gromacs/external/thread_mpi/include/thread_mpi.h
deleted file mode 100644 (file)
index 009f11d..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Written by Sander Pronk, Erik Lindahl, and possibly others.
-
-   Copyright (c) 2009, Sander Pronk, Erik Lindahl.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-/*
-   thread_mpi is a cross-platform threading library for applications in
-   high-performance computing. It supports:
-
-   - Cross-platform thread primitives (thread creation, mutexes, spinlocks,
-     barriers, thread-local storage, etc.).
-   - Cross-platform atomic operations (compare-and-swap, add-return, etc) for
-     safe lock-free synchronization.
-   - An implementation of (currently, much of) MPI, either as a drop-in
-     replacement, or for use in conjunction with a networked MPI
-     implementation.
-   - Shared-memory allocation and memory management (planned, as of now).
-   - Basic lock-free data structures (planned, as of now).
-
-   Because it can be used as a drop-in replacement for MPI, existing codes
-   using MPI can start using thread_mpi without major changes in the
-   source code, assuming -- and this is a big assumption -- that the code
-   is thread-safe.
-
-   Alternatively, networked MPI calls can be used in conjunction with
-   thread_mpi calls (simply by using
-    "#include <thread_mpi.h>"
-   instead of
-    "#include <tmpi.h>"
-   and pre-fixing all thread_mpi MPI-like calls with tMPI instead of MPI.
-
-   The availability of both MPI calls and shared-memory constructs makes it
-   possible to transition (relatively) seamlessly from an MPI-style code
-   to code that's optimal on multicore CPUs.
-
-   Although MPI-style message passing isn't neccesarily optimal for
-   performance on shared-memory systems, the MPI communicator concept and
-   its emphasis on collective operations makes sense even when computing on
-   one machine with multiple cores. The communicator forms the basis for
-   the shared-memory allocation and lock-free data structure implementations
-   in thread_mpi.
-
-   Although usable as a stand-alone library, thread_mpi is designed to
-   be incorporated in the code tree, eliminating any external build
-   requirements. The BSD-style license that this library is distributed
-   with reflects this.
-
-   The atomic operations (such as compare-and-swap) are supported on:
-   - gcc on x86, x86_64, PowerPC and Itanium.
-   - Intel compilers on x86, x86_64 and Itanium.
-   - xlc on PowerPC.
-   - (partial) HP/UX compilers on Itanium.
- */
-
-/** \file
- *
- * \brief Convenience header file for non-MPI compatibility.
- *
- * This file includes the tMPI header file thread_mpi/tmpi.h, as well
- * as thread_mpi/threads.h and thread_mpi/atomic.h header files. If you'd
- * like to use the components individually, include the relevant header
- * files directly.
- */
-
-#include "thread_mpi/atomic.h"
-#include "thread_mpi/threads.h"
-#include "thread_mpi/numa_malloc.h"
-#include "thread_mpi/barrier.h"
-#include "thread_mpi/event.h"
-#include "thread_mpi/lock.h"
-#include "thread_mpi/tmpi.h"
-#include "thread_mpi/collective.h"
diff --git a/src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic.h b/src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic.h
deleted file mode 100644 (file)
index 5dc7898..0000000
+++ /dev/null
@@ -1,630 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Written by Sander Pronk, Erik Lindahl, and possibly others.
-
-   Copyright (c) 2009, Sander Pronk, Erik Lindahl.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-#ifndef TMPI_ATOMIC_H_
-#define TMPI_ATOMIC_H_
-
-/*! \file atomic.h
- *
- *  \brief Atomic operations for fast SMP synchronization
- *
- *  This file defines atomic integer operations and spinlocks for
- *  fast synchronization in performance-critical regions.
- *
- *  In general, the best option is to use functions without explicit
- *  locking, e.g. tMPI_Atomic_fetch_add() or tMPI_Atomic_cas().
- *
- *  Depending on the architecture/compiler, these operations may either
- *  be provided as functions or macros; be aware that those macros may
- *  reference their arguments repeatedly, possibly leading to multiply
- *  evaluated code with side effects: be careful with what you use as
- *  arguments.
- *
- *  Not all architectures support atomic operations though inline assembly,
- *  and even if they do it might not be implemented here. In that case
- *  we use a fallback mutex implementation, so you can always count on
- *  the function interfaces working.
- *
- *  Don't use spinlocks in non-performance-critical regions like file I/O.
- *  Since they always spin busy they would waste CPU cycles instead of
- *  properly yielding to a computation thread while waiting for the disk.
- *
- *  Finally, note that all our spinlock operations are defined to return
- *  0 if initialization or locking completes successfully.
- *  This is the opposite of some other implementations, but the same standard
- *  as used for pthread mutexes. So, if e.g. are trying to lock a spinlock,
- *  you will have gotten the lock if the return value is 0.
- *
- *  tMPI_Spinlock_islocked(x) obviously still returns 1 if the lock is locked,
- *  and 0 if it is available, though...
- */
-/* Se the comments on the non-atomic versions for explanations */
-
-#include <stdio.h>
-
-#include "visibility.h"
-
-/* Setting TMPI_ATOMICS_DISABLED permits the build to enforce that no
- * atomic operations are used. This is used when building to run
- * ThreadSanitzer.
- *
- * It could also be useful as a temporary measure on some
- * compiler+hardware for which the detection below fails to produce a
- * correct result. Performance will be greatly improved by using
- * whatever atomic operations are available, so make sure such a
- * measure is only temporary! */
-#ifdef TMPI_ATOMICS_DISABLED
-
-#ifndef DOXYGEN
-#define TMPI_NO_ATOMICS
-#endif
-
-#else
-
-/* first check for gcc/icc platforms.
-   Some compatible compilers, like icc on linux+mac will take this path,
-   too */
-#if ( (defined(__GNUC__) || defined(__PATHSCALE__) || defined(__PGI)) && \
-    (!defined(__xlc__)) && (!defined(_CRAYC)) && (!defined(TMPI_TEST_NO_ATOMICS)) )
-
-#ifdef __GNUC__
-#define TMPI_GCC_VERSION (__GNUC__ * 10000 \
-                          + __GNUC_MINOR__ * 100 \
-                          + __GNUC_PATCHLEVEL__)
-#endif
-
-/* now check specifically for several architectures: */
-#if ((defined(__i386__) || defined(__x86_64__)) && !defined(__OPEN64__))
-/* first x86: */
-#include "atomic/gcc_x86.h"
-
-#elif (defined(__ia64__))
-/* then ia64: */
-#include "atomic/gcc_ia64.h"
-
-/* for now we use gcc intrinsics on gcc: */
-/*#elif (defined(__powerpc__) || (defined(__ppc__)) )*/
-/*#include "atomic/gcc_ppc.h"*/
-
-#elif defined(__FUJITSU) && ( defined(__sparc_v9__) || defined (__sparcv9) )
-
-/* Fujitsu FX10 SPARC compiler */
-#include "atomic/fujitsu_sparc64.h"
-
-#else
-/* otherwise, there's a generic gcc intrinsics version: */
-#include "atomic/gcc.h"
-
-#endif /* end of check for gcc specific architectures */
-
-/* not gcc: */
-#elif (defined(_MSC_VER) && (_MSC_VER >= 1200) && \
-    (!defined(TMPI_TEST_NO_ATOMICS)) )
-
-/* Microsoft Visual C on x86, define taken from FFTW who got it from
-   Morten Nissov. icc on windows will take this path.  */
-#include "atomic/msvc.h"
-
-#elif ( (defined(__IBM_GCC_ASM) || defined(__IBM_STDCPP_ASM))  && \
-    (defined(__powerpc__) || defined(__ppc__)) && \
-    (!defined(TMPI_TEST_NO_ATOMICS)) )
-
-/* PowerPC using xlC intrinsics.  */
-
-#include "atomic/xlc_ppc.h"
-
-#elif ( ( defined(__xlC__)  || defined(__xlc__) ) && \
-    (!defined(TMPI_TEST_NO_ATOMICS)) )
-/* IBM xlC compiler */
-#include "atomic/xlc_ppc.h"
-
-
-#elif (defined (__sun) && (defined(__sparcv9) || defined(__sparc)) && \
-    (!defined(TMPI_TEST_NO_ATOMICS)) )
-/* Solaris on SPARC (Sun C Compiler, Solaris Studio) */
-#include "atomic/suncc-sparc.h"
-
-#elif defined(__FUJITSU) && defined(__sparc__)
-
-/* Fujitsu FX10 SPARC compiler requires gcc compatibility with -Xg */
-#warning Atomics support for Fujitsu FX10 compiler requires -Xg (gcc compatibility)
-#define TMPI_NO_ATOMICS
-
-#elif defined(_CRAYC)
-
-/* Cray compiler */
-#include "atomic/cce.h"
-#else
-
-#ifndef DOXYGEN
-/** Indicates that no support for atomic operations is present. */
-#define TMPI_NO_ATOMICS
-#endif
-
-#endif /* platform-specific checks */
-
-#endif /* TMPI_NO_ATOMICS */
-
-#ifdef TMPI_NO_ATOMICS
-
-/* No atomic operations, use mutex fallback. Documentation is in x86 section */
-
-#ifdef TMPI_CHECK_ATOMICS
-#error No atomic operations implemented for this cpu/compiler combination.
-#endif
-
-
-/** Memory barrier operation
-
-   Modern CPUs rely heavily on out-of-order execution, and one common feature
-   is that load/stores might be reordered. Also, when using inline assembly
-   the compiler might already have loaded the variable we are changing into
-   a register, so any update to memory won't be visible.
-
-   This command creates a memory barrier, i.e. all memory results before
-   it in the code should be visible to all memory operations after it - the
-   CPU cannot propagate load/stores across it.
-
-   This barrier is a full barrier: all load and store operations of
-   instructions before it are completed, while all load and store operations
-   that are in instructions after it won't be done before this barrier.
-
-   \hideinitializer
- */
-#define tMPI_Atomic_memory_barrier()
-
-/** Memory barrier operation with acquire semantics
-
-   This barrier is a barrier with acquire semantics: the terminology comes
-   from its common use after acquiring a lock: all load/store instructions
-   after this barrier may not be re-ordered to happen before this barrier.
-
-   \hideinitializer
- */
-#define tMPI_Atomic_memory_barrier_acq()
-
-/** Memory barrier operation with release semantics
-
-   This barrier is a barrier with release semantics: the terminology comes
-   from its common use before releasing a lock: all load/store instructions
-   before this barrier may not be re-ordered to happen after this barrier.
-
-   \hideinitializer
- */
-#define tMPI_Atomic_memory_barrier_rel()
-
-#ifndef DOXYGEN
-/* signal that they exist */
-#define TMPI_HAVE_ACQ_REL_BARRIERS
-#endif
-
-/** Atomic operations datatype
- *
- *  Portable synchronization primitives like mutexes are effective for
- *  many purposes, but usually not very high performance.
- *  One of the problem is that you have the overhead of a function call,
- *  and another is that Mutexes often have extra overhead to make the
- *  scheduling fair. Finally, if performance is important we don't want
- *  to suspend the thread if we cannot lock a mutex, but spin-lock at 100%
- *  CPU usage until the resources is available (e.g. increment a counter).
- *
- *  These things can often be implemented with inline-assembly or other
- *  system-dependent functions, and we provide such functionality for the
- *  most common platforms. For portability we also have a fallback
- *  implementation using a mutex for locking.
- *
- *  Performance-wise, the fastest solution is always to avoid locking
- *  completely (obvious, but remember it!). If you cannot do that, the
- *  next best thing is to use atomic operations that e.g. increment a
- *  counter without explicit locking. Spinlocks are useful to lock an
- *  entire region, but leads to more overhead and can be difficult to
- *  debug - it is up to you to make sure that only the thread owning the
- *  lock unlocks it!
- *
- *  You should normally NOT use atomic operations for things like
- *  I/O threads. These should yield to other threads while waiting for
- *  the disk instead of spinning at 100% CPU usage.
- *
- *  It is imperative that you use the provided routines for reading
- *  and writing, since some implementations require memory barriers before
- *  the CPU or memory sees an updated result. The structure contents is
- *  only visible here so it can be inlined for performance - it might
- *  change without further notice.
- *
- *  \note No initialization is required for atomic variables.
- *
- *  Currently, we have (real) atomic operations for:
- *
- *  - gcc version 4.1 and later (all platforms)
- *  - x86 or x86_64, using GNU compilers
- *  - x86 or x86_64, using Intel compilers
- *  - x86 or x86_64, using Pathscale compilers
- *  - Itanium, using GNU compilers
- *  - Itanium, using Intel compilers
- *  - Itanium, using HP compilers
- *  - PowerPC, using GNU compilers
- *  - PowerPC, using IBM AIX compilers
- *  - PowerPC, using IBM compilers >=7.0 under Linux or Mac OS X.
- *  - Sparc64, using Fujitsu compilers.
- *
- * \see
- * - tMPI_Atomic_get
- * - tMPI_Atomic_set
- * - tMPI_Atomic_cas
- * - tMPI_Atomic_add_return
- * - tMPI_Atomic_fetch_add
- */
-typedef struct tMPI_Atomic
-{
-    int value; /**< The atomic value.*/
-}
-tMPI_Atomic_t;
-
-
-/** Atomic pointer type equivalent to tMPI_Atomic_t
- *
- * Useful for lock-free and wait-free data structures.
- * The only operations available for this type are:
- * \see
- * - tMPI_Atomic_ptr_get
- * - tMPI_Atomic_ptr_set
- * - tMPI_Atomic_ptr_cas
- */
-typedef struct tMPI_Atomic_ptr
-{
-    void *value; /**< The atomic pointer. */
-}
-tMPI_Atomic_ptr_t;
-
-
-/** Spinlock
- *
- *  Spinlocks provide a faster synchronization than mutexes,
- *  although they consume CPU-cycles while waiting. They are implemented
- *  with atomic operations and inline assembly whenever possible, and
- *  otherwise we use a fallback implementation where a spinlock is identical
- *  to a mutex (this is one of the reasons why you have to initialize them).
- *
- *  There are no guarantees whatsoever about fair scheduling or
- *  debugging if you make a mistake and unlock a variable somebody
- *  else has locked - performance is the primary goal of spinlocks.
- *
- * \see
- * - tMPI_Spinlock_init
- * - tMPI_Spinlock_lock
- * - tMPI_Spinlock_unlock
- * - tMPI_Spinlock_trylock
- * - tMPI_Spinlock_wait
- */
-typedef struct tMPI_Spinlock *tMPI_Spinlock_t;
-
-/*! \def TMPI_SPINLOCK_INITIALIZER
- * \brief Spinlock static initializer
- *
- *  This is used for static spinlock initialization, and has the same
- *  properties as TMPI_THREAD_MUTEX_INITIALIZER has for mutexes.
- *  This is only for inlining in the tMPI_Thread.h header file. Whether
- *  it is 0, 1, or something else when unlocked depends on the platform.
- *  Don't assume anything about it. It might even be a mutex when using the
- *  fallback implementation!
- *
- *  \hideinitializer
- */
-#define TMPI_SPINLOCK_INITIALIZER   { NULL }
-
-/* Since mutexes guarantee memory barriers this works fine */
-/** Return value of an atomic integer
- *
- *  Also implements proper memory barriers when necessary.
- *  The actual implementation is system-dependent.
- *
- *  \param  a   Atomic variable to read
- *  \return     Integer value of the atomic variable
- *
- *  \hideinitializer
- */
-TMPI_EXPORT
-int tMPI_Atomic_get(const tMPI_Atomic_t *a);
-
-/** Write value to an atomic integer
- *
- *  Also implements proper memory barriers when necessary.
- *  The actual implementation is system-dependent.
- *
- *  \param  a   Atomic variable
- *  \param  i   Integer to set the atomic variable to.
- *
- *  \hideinitializer
- */
-TMPI_EXPORT
-void tMPI_Atomic_set(tMPI_Atomic_t *a, int i);
-
-
-/** Return value of an atomic pointer
- *
- *  Also implements proper memory barriers when necessary.
- *  The actual implementation is system-dependent.
- *
- *  \param  a   Atomic variable to read
- *  \return     Pointer value of the atomic variable
- *
- *  \hideinitializer
- */
-TMPI_EXPORT
-void* tMPI_Atomic_ptr_get(const tMPI_Atomic_ptr_t *a);
-
-
-
-
-/** Write value to an atomic pointer
- *
- *  Also implements proper memory barriers when necessary.
- *  The actual implementation is system-dependent.
- *
- *  \param  a   Atomic variable
- *  \param  p   Pointer value to set the atomic variable to.
- *
- *  \hideinitializer
- */
-TMPI_EXPORT
-void tMPI_Atomic_ptr_set(tMPI_Atomic_ptr_t *a, void *p);
-
-/** Add integer to atomic variable
- *
- *  Also implements proper memory barriers when necessary.
- *  The actual implementation is system-dependent.
- *
- *  \param a   atomic datatype to modify
- *  \param i   integer to increment with. Use i<0 to subtract atomically.
- *
- *  \return The new value (after summation).
- */
-TMPI_EXPORT
-int tMPI_Atomic_add_return(tMPI_Atomic_t *a, int i);
-#ifndef DOXYGEN
-#define TMPI_ATOMIC_HAVE_NATIVE_ADD_RETURN
-#endif
-
-
-
-/** Add to variable, return the old value.
- *
- *  This operation is quite useful for synchronization counters.
- *  By performing a fetchadd with N, a thread can e.g. reserve a chunk
- *  with the next N iterations, and the return value is the index
- *  of the first element to treat.
- *
- *  Also implements proper memory barriers when necessary.
- *  The actual implementation is system-dependent.
- *
- *  \param a   atomic datatype to modify
- *  \param i   integer to increment with. Use i<0 to subtract atomically.
- *
- *  \return    The value of the atomic variable before addition.
- */
-TMPI_EXPORT
-int tMPI_Atomic_fetch_add(tMPI_Atomic_t *a, int i);
-#ifndef DOXYGEN
-#define TMPI_ATOMIC_HAVE_NATIVE_FETCH_ADD
-#endif
-
-
-
-/** Atomic compare-and-swap operation
- *
- *   The \a old value is compared with the memory value in the atomic datatype.
- *   If the are identical, the atomic type is swapped with the new value,
- *   and otherwise left unchanged.
- *
- *   This is *the* synchronization primitive: it has a consensus number of
- *   infinity, and is available in some form on all modern CPU architectures.
- *   In the words of Herlihy&Shavit (The art of multiprocessor programming),
- *   it is the 'king of all wild things'.
- *
- *   In practice, use it as follows: You can start by reading a value
- *   (without locking anything), perform some calculations, and then
- *   atomically try to update it in memory unless it has changed. If it has
- *   changed you will get an error return code - reread the new value
- *   an repeat the calculations in that case.
- *
- *   \param a        Atomic datatype ('memory' value)
- *   \param old_val  Integer value read from the atomic type at an earlier point
- *   \param new_val  New value to write to the atomic type if it currently is
- *                   identical to the old value.
- *
- *   \return    True (1) if the swap occurred: i.e. if the value in a was equal
- *              to old_val. False (0) if the swap didn't occur and the value
- *              was not equal to old_val.
- *
- *   \note   The exchange occured if the return value is identical to \a old.
- */
-TMPI_EXPORT
-int tMPI_Atomic_cas(tMPI_Atomic_t *a, int old_val, int new_val);
-
-
-
-
-/** Atomic pointer compare-and-swap operation
- *
- *   The \a old value is compared with the memory value in the atomic datatype.
- *   If the are identical, the atomic type is swapped with the new value,
- *   and otherwise left unchanged.
- *
- *   This is essential for implementing wait-free lists and other data
- *   structures. See 'tMPI_Atomic_cas()'.
- *
- *   \param a        Atomic datatype ('memory' value)
- *   \param old_val  Pointer value read from the atomic type at an earlier point
- *   \param new_val  New value to write to the atomic type if it currently is
- *                   identical to the old value.
- *
- *   \return    True (1) if the swap occurred: i.e. if the value in a was equal
- *              to old_val. False (0) if the swap didn't occur and the value
- *              was not equal to old_val.
- *
- *   \note   The exchange occured if the return value is identical to \a old.
- */
-TMPI_EXPORT
-int tMPI_Atomic_ptr_cas(tMPI_Atomic_ptr_t * a, void *old_val,
-                        void *new_val);
-
-/** Atomic swap operation.
-
-   Atomically swaps the data in the tMPI_Atomic_t operand with the value of b.
-   Note: This has no good assembly counterparts on many architectures, so
-         it might not be faster than a repreated CAS.
-
-   \param a  Pointer to atomic type
-   \param b  Value to swap
-   \return the original value of a
- */
-TMPI_EXPORT
-int tMPI_Atomic_swap(tMPI_Atomic_t *a, int b);
-
-/** Atomic swap pointer operation.
-
-   Atomically swaps the pointer in the tMPI_Atomic_ptr_t operand with the
-   value of b.
-   Note: This has no good assembly counterparts on many architectures, so
-         it might not be faster than a repreated CAS.
-
-   \param a  Pointer to atomic type
-   \param b  Value to swap
-   \return the original value of a
- */
-TMPI_EXPORT
-void *tMPI_Atomic_ptr_swap(tMPI_Atomic_ptr_t *a, void *b);
-#ifndef DOXYGEN
-#define TMPI_ATOMIC_HAVE_NATIVE_SWAP
-#endif
-
-
-/** Initialize spinlock
- *
- *  In theory you can call this from multiple threads, but remember
- *  that we don't check for errors. If the first thread proceeded to
- *  lock the spinlock after initialization, the second will happily
- *  overwrite the contents and unlock it without warning you.
- *
- *  \param x      Spinlock pointer.
- *
- *  \hideinitializer
- */
-TMPI_EXPORT
-void tMPI_Spinlock_init( tMPI_Spinlock_t *x);
-#ifndef DOXYGEN
-#define TMPI_ATOMIC_HAVE_NATIVE_SPINLOCK
-#endif
-
-/** Acquire spinlock
- *
- *  This routine blocks until the spinlock is available, and
- *  the locks it again before returning.
- *
- *  \param x     Spinlock pointer
- */
-TMPI_EXPORT
-void tMPI_Spinlock_lock( tMPI_Spinlock_t *x);
-
-
-/** Attempt to acquire spinlock
- *
- * This routine acquires the spinlock if possible, but if
- * already locked it return an error code immediately.
- *
- *  \param x     Spinlock pointer
- *
- * \return 0 if the mutex was available so we could lock it,
- *         otherwise a non-zero integer (1) if the lock is busy.
- */
-TMPI_EXPORT
-int tMPI_Spinlock_trylock( tMPI_Spinlock_t *x);
-
-/** Release spinlock
- *
- *  \param x     Spinlock pointer
- *
- *  Unlocks the spinlock, regardless if which thread locked it.
- */
-TMPI_EXPORT
-void tMPI_Spinlock_unlock( tMPI_Spinlock_t *x);
-
-
-
-/** Check if spinlock is locked
- *
- *  This routine returns immediately with the lock status.
- *
- *  \param x  Spinlock pointer
- *
- *  \return 1 if the spinlock is locked, 0 otherwise.
- */
-TMPI_EXPORT
-int tMPI_Spinlock_islocked( tMPI_Spinlock_t *x);
-
-/** Wait for a spinlock to become available
- *
- *  This routine blocks until the spinlock is unlocked,
- *  but in contrast to tMPI_Spinlock_lock() it returns without
- *  trying to lock the spinlock.
- *
- *  \param x  Spinlock pointer
- */
-TMPI_EXPORT
-void tMPI_Spinlock_wait(tMPI_Spinlock_t *x);
-
-
-#endif /* TMPI_NO_ATOMICS */
-
-/* now define all the atomics that are not avaible natively. These
-   are done on the assumption that a native CAS does exist. */
-#include "atomic/derived.h"
-
-/* this allows us to use the inline keyword without breaking support for
-   some compilers that don't support it: */
-#ifdef inline_defined_in_atomic
-#undef inline
-#endif
-
-#if !defined(TMPI_NO_ATOMICS) && !defined(TMPI_ATOMICS)
-/* Set it here to make sure the user code can check this without having to have
-   a config.h */
-/** Indicates that support for atomic operations is present. */
-#define TMPI_ATOMICS
-#endif
-
-#endif /* TMPI_ATOMIC_H_ */
diff --git a/src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/cce.h b/src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/cce.h
deleted file mode 100644 (file)
index 9030730..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Original for gcc written by Sander Pronk, Erik Lindahl, and possibly
-   others. Modified for the Cray compiler by Daniel Landau.
-
-   Copyright (c) 2009, Sander Pronk, Erik Lindahl.
-   Copyright 2014, Cray Inc.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-#include <intrinsics.h>
-
-#define tMPI_Atomic_memory_barrier() __builtin_ia32_mfence()
-
-
-typedef struct tMPI_Atomic
-{
-    volatile long value;
-}
-tMPI_Atomic_t;
-
-typedef struct tMPI_Atomic_ptr
-{
-    volatile void* value;
-}
-tMPI_Atomic_ptr_t;
-
-
-/* these are guaranteed to be  atomic on x86 and x86_64 */
-#define tMPI_Atomic_get(a)  ((int)( (a)->value) )
-#define tMPI_Atomic_set(a, i)  (((a)->value) = (i))
-
-
-#define tMPI_Atomic_ptr_get(a)  ((void*)((a)->value) )
-#define tMPI_Atomic_ptr_set(a, i)  (((a)->value) = (void*)(i))
-
-
-#include "cce_intrinsics.h"
-
-#include "cce_spinlock.h"
diff --git a/src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/cce_intrinsics.h b/src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/cce_intrinsics.h
deleted file mode 100644 (file)
index 40934e5..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Original for gcc written by Sander Pronk, Erik Lindahl, and possibly
-   others. Modified for the Cray compiler by Daniel Landau.
-
-
-   Copyright (c) 2009, Sander Pronk, Erik Lindahl.
-   Copyright 2014, Cray Inc.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-#include <intrinsics.h>
-
-#define tMPI_Atomic_memory_barrier() __builtin_ia32_mfence()
-
-TMPI_EXPORT
-static inline int tMPI_Atomic_cas(tMPI_Atomic_t *a, int oldval, int newval)
-{
-    return __sync_val_compare_and_swap(&(a->value), oldval, newval) == oldval;
-}
-
-TMPI_EXPORT
-static inline int tMPI_Atomic_ptr_cas(tMPI_Atomic_ptr_t* a, void *oldval,
-                                      void *newval)
-{
-    return __sync_val_compare_and_swap((size_t*)&(a->value), (size_t)oldval, (size_t)newval) == (size_t)oldval;
-}
-
-TMPI_EXPORT
-static inline int tMPI_Atomic_add_return(tMPI_Atomic_t *a, volatile int i)
-{
-    return __sync_add_and_fetch( &(a->value), i);
-}
-#define TMPI_ATOMIC_HAVE_NATIVE_ADD_RETURN
-
-
-TMPI_EXPORT
-static inline int tMPI_Atomic_fetch_add(tMPI_Atomic_t *a, volatile int i)
-{
-    return __sync_fetch_and_add( &(a->value), i);
-}
-#define TMPI_ATOMIC_HAVE_NATIVE_FETCH_ADD
diff --git a/src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/cce_spinlock.h b/src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/cce_spinlock.h
deleted file mode 100644 (file)
index 31de26f..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Original for gcc written by Sander Pronk, Erik Lindahl, and possibly
-   others. Modified for the Cray compiler by Daniel Landau.
-
-   Copyright (c) 2009, Sander Pronk, Erik Lindahl.
-   Copyright 2014, Cray Inc.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-#include <intrinsics.h>
-
-typedef struct tMPI_Spinlock
-{
-    volatile long lock /*__attribute__ ((aligned(64)))*/;
-} tMPI_Spinlock_t;
-
-#define TMPI_SPINLOCK_INITIALIZER   { 0 }
-
-#define TMPI_ATOMIC_HAVE_NATIVE_SPINLOCK
-
-
-
-static inline void tMPI_Spinlock_init(tMPI_Spinlock_t *x)
-{
-    x->lock = 0;
-}
-
-
-static inline void tMPI_Spinlock_lock(tMPI_Spinlock_t *x)
-{
-    while (__sync_lock_test_and_set(&(x->lock), 1) == 1)
-    {
-        /* this is nicer on the system bus: */
-        while (x->lock == 1)
-        {
-        }
-    }
-}
-
-
-static inline int tMPI_Spinlock_trylock(tMPI_Spinlock_t *x)
-{
-    return __sync_lock_test_and_set(&(x->lock), 1);
-}
-
-
-static inline void tMPI_Spinlock_unlock(tMPI_Spinlock_t *x)
-{
-    x->lock = 0;
-}
-
-static inline int tMPI_Spinlock_islocked(const tMPI_Spinlock_t *x)
-{
-    return ( x->lock == 1 );
-}
-
-static inline void tMPI_Spinlock_wait(tMPI_Spinlock_t *x)
-{
-    do
-    {
-    }
-    while (x->lock == 1);
-}
diff --git a/src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/cycles.h b/src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/cycles.h
deleted file mode 100644 (file)
index 51ccfef..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * define GMX_USE_RDTSCP=1 to use the serializing rdtscp instruction instead of rdtsc.
- * This is only supported on newer Intel/AMD hardware, but provides better accuracy.
- */
-
-/* check for cycle counters on supported platforms */
-#if ((defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__PATHSCALE__)  || defined(__PGIC__)) && (defined(__i386__) || defined(__x86_64__)))
-#define TMPI_CYCLE_COUNT
-/* x86 or x86-64 with GCC inline assembly */
-typedef unsigned long long tMPI_Cycles_t;
-
-static __inline__ tMPI_Cycles_t tMPI_Cycles_read(void)
-{
-    /* x86 with GCC inline assembly - pentium TSC register */
-    tMPI_Cycles_t cycle;
-    unsigned      low, high;
-
-#if GMX_USE_RDTSCP
-    __asm__ __volatile__("rdtscp" : "=a" (low), "=d" (high) :: "ecx" );
-#else
-    __asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high));
-#endif
-
-    cycle = ((unsigned long long)low) | (((unsigned long long)high)<<32);
-
-    return cycle;
-}
-#elif (defined(__INTEL_COMPILER) && defined(__ia64__))
-#define TMPI_CYCLE_COUNT
-typedef unsigned long tMPI_Cycles_t;
-static __inline__ tMPI_Cycles_t tMPI_Cycles_read(void)
-{
-    /* Intel compiler on ia64 */
-    return __getReg(_IA64_REG_AR_ITC);
-}
-#elif defined(__GNUC__) && defined(__ia64__)
-#define TMPI_CYCLE_COUNT
-typedef unsigned long tMPI_Cycles_t;
-static __inline__ tMPI_Cycles_t tMPI_Cycles_read(void)
-{
-    /* ia64 with GCC inline assembly */
-    tMPI_Cycles_t ret;
-    __asm__ __volatile__ ("mov %0=ar.itc" : "=r" (ret));
-    return ret;
-}
-#elif defined(_MSC_VER)
-#define TMPI_CYCLE_COUNT
-typedef __int64 tMPI_Cycles_t;
-static __inline tMPI_Cycles_t tMPI_Cycles_read(void)
-{
-#if GMX_USE_RDTSCP
-    unsigned int ui;
-    return __rdtscp(&ui);
-#else
-    return __rdtsc();
-#endif
-}
-#endif
diff --git a/src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/derived.h b/src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/derived.h
deleted file mode 100644 (file)
index 68b0fe5..0000000
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Written by Sander Pronk, Erik Lindahl, and possibly others.
-
-   Copyright (c) 2013, Sander Pronk, Erik Lindahl.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-
-/* These functions are fallback definitions for when there are no native
-   variants for fetch-add, spinlock, etc., but there is a native
-   compare-and-swap. */
-
-
-/* only define this if there were no separate acquire and release barriers */
-#ifndef TMPI_HAVE_ACQ_REL_BARRIERS
-
-/* if they're not defined explicitly, we just make full barriers out of both */
-#define tMPI_Atomic_memory_barrier_acq tMPI_Atomic_memory_barrier
-#define tMPI_Atomic_memory_barrier_rel tMPI_Atomic_memory_barrier
-
-#endif
-
-#ifndef TMPI_ATOMIC_HAVE_NATIVE_FETCH_ADD
-TMPI_EXPORT
-static inline int tMPI_Atomic_fetch_add(tMPI_Atomic_t *a, int i)
-{
-    int newval, oldval;
-    do
-    {
-        tMPI_Atomic_memory_barrier_acq();
-        oldval = tMPI_Atomic_get(a);
-        newval = oldval + i;
-    }
-    while (!tMPI_Atomic_cas(a, oldval, newval));
-    tMPI_Atomic_memory_barrier_rel();
-    return oldval;
-}
-#endif /* TMPI_HAVE_FETCH_ADD */
-
-
-#ifndef TMPI_ATOMIC_HAVE_NATIVE_ADD_RETURN
-TMPI_EXPORT
-static inline int tMPI_Atomic_add_return(tMPI_Atomic_t *a, int i)
-{
-    /* implement in terms of fetch-add */
-    return tMPI_Atomic_fetch_add(a, i) + i;
-}
-#endif /* TMPI_HAVE_ADD_RETURN */
-
-
-
-
-
-/* only do this if there was no better solution */
-#ifndef TMPI_ATOMIC_HAVE_NATIVE_SWAP
-TMPI_EXPORT
-static inline int tMPI_Atomic_swap(tMPI_Atomic_t *a, int b)
-{
-    int oldval;
-    do
-    {
-        oldval = (int)(a->value);
-    }
-    while (!tMPI_Atomic_cas(a, oldval, b));
-    return oldval;
-}
-
-
-TMPI_EXPORT
-static inline void *tMPI_Atomic_ptr_swap(tMPI_Atomic_ptr_t *a, void *b)
-{
-    void *oldval;
-    do
-    {
-        oldval = (void*)(a->value);
-    }
-    while (!tMPI_Atomic_ptr_cas(a, oldval, b));
-    return oldval;
-}
-#endif
-
-
-
-#ifndef TMPI_ATOMIC_HAVE_NATIVE_SPINLOCK
-
-typedef struct tMPI_Spinlock
-{
-    tMPI_Atomic_t a;
-}
-tMPI_Spinlock_t;
-
-#define TMPI_SPINLOCK_INITIALIZER   { 0 }
-
-
-
-TMPI_EXPORT
-static inline void tMPI_Spinlock_init(tMPI_Spinlock_t *x)
-{
-    tMPI_Atomic_set(&(x->a), 0);
-}
-
-
-TMPI_EXPORT
-static inline void tMPI_Spinlock_lock(tMPI_Spinlock_t *x)
-{
-    tMPI_Atomic_memory_barrier_acq();
-    do
-    {
-        while (tMPI_Atomic_get(&(x->a)) == 1)
-        {
-            tMPI_Atomic_memory_barrier_acq();
-        }
-    }
-    while (!tMPI_Atomic_cas(&(x->a), 0, 1));
-    tMPI_Atomic_memory_barrier_acq();
-}
-
-
-TMPI_EXPORT
-static inline int tMPI_Spinlock_trylock(tMPI_Spinlock_t *x)
-{
-    int ret;
-    tMPI_Atomic_memory_barrier_acq();
-    ret = !tMPI_Atomic_cas(&(x->a), 0, 1);
-    return ret;
-}
-
-
-TMPI_EXPORT
-static inline void tMPI_Spinlock_unlock(tMPI_Spinlock_t *x)
-{
-    tMPI_Atomic_memory_barrier_rel();
-    tMPI_Atomic_set(&(x->a), 0);
-    tMPI_Atomic_memory_barrier_rel();
-}
-
-
-TMPI_EXPORT
-static inline int tMPI_Spinlock_islocked(const tMPI_Spinlock_t *x)
-{
-    int ret;
-    tMPI_Atomic_memory_barrier_rel();
-    ret = (tMPI_Atomic_get(&(x->a)) != 0);
-    return ret;
-}
-
-
-TMPI_EXPORT
-static inline void tMPI_Spinlock_wait(tMPI_Spinlock_t *x)
-{
-    do
-    {
-    }
-    while (tMPI_Spinlock_islocked(x));
-}
-#endif /* TMPI_ATOMIC_HAVE_NATIVE_SPINLOCK */
diff --git a/src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/fujitsu_sparc64.h b/src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/fujitsu_sparc64.h
deleted file mode 100644 (file)
index 0566338..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Written by Sander Pronk, Erik Lindahl, and possibly others.
-
-   Copyright (c) 2013, Sander Pronk, Erik Lindahl.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-#define tMPI_Atomic_memory_barrier() { asm ("membar   #StoreStore | #LoadStore | #LoadLoad | #StoreLoad "); }
-#define tMPI_Atomic_memory_barrier_acq() { asm ("membar   #StoreStore | #StoreLoad ");  }
-#define tMPI_Atomic_memory_barrier_rel() { asm ("membar   #LoadStore | #StoreStore ");  }
-#define TMPI_HAVE_ACQ_REL_BARRIERS
-
-
-typedef struct tMPI_Atomic
-{
-    volatile int value __attribute__ ((aligned(64)));
-}
-tMPI_Atomic_t;
-
-
-typedef struct tMPI_Atomic_ptr
-{
-    volatile char* volatile* value __attribute__ ((aligned(64)));  /*!< Volatile, to avoid compiler aliasing */
-}
-tMPI_Atomic_ptr_t;
-
-
-/* On sparc64, aligned 32-bit and 64-bit memory accesses are atomic */
-#define tMPI_Atomic_get(a)   (int)((a)->value)
-#define tMPI_Atomic_set(a, i)  (((a)->value) = (i))
-#define tMPI_Atomic_ptr_get(a)   ((a)->value)
-#define tMPI_Atomic_ptr_set(a, i)  (((a)->value) = (i))
-
-#define TMPI_SPINLOCK_INITIALIZER   { 0 }
-
-/* we just define the CAS operation. Fetch-and-add and spinlocks are
-   implemented through derived.h; this follows the recommendations of the
-   Sparc v9 programming specs. */
-
-static inline int tMPI_Atomic_cas(tMPI_Atomic_t *a, int oldval, int newval)
-{
-    asm ("cas [%2], %1, %0"
-         : "=&r" (newval)
-         : "r" (oldval), "r" (&(a->value)), "0" (newval)
-         : "memory");
-    return newval == oldval;
-}
-
-
-static inline int tMPI_Atomic_ptr_cas(tMPI_Atomic_ptr_t *a, void* oldval,
-                                      void* newval)
-{
-    asm ("casx [%2], %1, %0         "
-         : "=&r" (newval)
-         : "r" (oldval), "r" (&(a->value)), "0" (newval)
-         : "memory");
-    return newval == oldval;
-}
diff --git a/src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/gcc.h b/src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/gcc.h
deleted file mode 100644 (file)
index 39537f3..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Written by Sander Pronk, Erik Lindahl, and possibly others.
-
-   Copyright (c) 2009, Sander Pronk, Erik Lindahl.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-
-/* this is for newer versions of gcc that have built-in intrinsics,
-   on platforms not explicitly supported with inline assembly. */
-
-#define tMPI_Atomic_memory_barrier()  __sync_synchronize()
-
-/* Only gcc and Intel support this check, otherwise set it to true (skip doc) */
-#if (!defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined DOXYGEN)
-#define __builtin_constant_p(i) (1)
-#endif
-
-
-typedef struct tMPI_Atomic
-{
-    volatile int value;
-}
-tMPI_Atomic_t;
-
-typedef struct tMPI_Atomic_ptr
-{
-    volatile void* value;
-}
-tMPI_Atomic_ptr_t;
-
-
-/* for now we simply assume that int and void* assignments are atomic */
-#define tMPI_Atomic_get(a)  ((int)( (a)->value) )
-#define tMPI_Atomic_set(a, i)  (((a)->value) = (i))
-
-
-#define tMPI_Atomic_ptr_get(a)  ((void*)((a)->value) )
-#define tMPI_Atomic_ptr_set(a, i)  (((a)->value) = (void*)(i))
-
-
-#include "gcc_intrinsics.h"
-
-#include "gcc_spinlock.h"
diff --git a/src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/gcc_ia64.h b/src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/gcc_ia64.h
deleted file mode 100644 (file)
index f3c3a17..0000000
+++ /dev/null
@@ -1,249 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Written by Sander Pronk, Erik Lindahl, and possibly others.
-
-   Copyright (c) 2009, Sander Pronk, Erik Lindahl.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-/* ia64 with GCC or Intel compilers. Since we need to define everything through
- * cmpxchg and fetchadd on ia64, we merge the different compilers and only
- * provide different implementations for that single function.
- * Documentation? Check the gcc/x86 section.
- */
-
-
-typedef struct tMPI_Atomic
-{
-    volatile int value; /*!< Volatile, to avoid compiler aliasing */
-}
-tMPI_Atomic_t;
-
-typedef struct tMPI_Atomic_ptr
-{
-    void* volatile value; /*!< Volatile, to avoid compiler aliasing */
-}
-tMPI_Atomic_ptr_t;
-
-
-
-#define tMPI_Atomic_get(a)   ((a)->value)
-#define tMPI_Atomic_set(a, i)  (((a)->value) = (i))
-
-#define tMPI_Atomic_ptr_get(a)   ((a)->value)
-#define tMPI_Atomic_ptr_set(a, i)  (((a)->value) = (i))
-
-
-
-#ifndef __INTEL_COMPILER
-#define TMPI_ATOMIC_HAVE_NATIVE_SWAP
-/* xchg operations: */
-/* ia64 xchg */
-static inline int tMPI_Atomic_swap(tMPI_Atomic_t *a, int b)
-{
-    volatile int res;
-    asm volatile ("xchg4 %0=[%1],%2" :
-                  "=r" (res) : "r" (&a->value), "r" (b) : "memory");
-
-    return res;
-}
-/* ia64 ptr xchg */
-static inline void* tMPI_Atomic_ptr_swap(tMPI_Atomic_ptr_t * a, void *b)
-{
-    void* volatile* res;
-
-
-    asm volatile ("xchg8 %0=[%1],%2" :
-                  "=r" (res) : "r" (&a->value), "r" (b) : "memory");
-    return (void*)res;
-}
-#endif
-
-
-
-/* do the intrinsics. icc on windows doesn't have them. */
-#if ( (TMPI_GCC_VERSION >= 40100) )
-
-#include "gcc_intrinsics.h"
-
-/* our spinlock is not really any better than gcc's based on its intrinsics */
-#include "gcc_spinlock.h"
-#else
-
-
-/* Compiler thingies */
-#ifdef __INTEL_COMPILER
-/* prototypes are neccessary for these intrisics: */
-#include <ia64intrin.h>
-void __memory_barrier(void);
-int _InterlockedCompareExchange(volatile int *dest, int xchg, int comp);
-/*void* _InterlockedCompareExchangePointer(void* volatile **dest, void* xchg,
-                                         void* comp);*/
-unsigned __int64 __fetchadd4_rel(unsigned int *addend, const int increment);
-/* ia64 memory barrier */
-#define tMPI_Atomic_memory_barrier() __sync_synchronize()
-/* ia64 cmpxchg */
-#define tMPI_Atomic_cas(a, oldval, newval) \
-    (_InterlockedCompareExchange(&((a)->value), newval, oldval) == oldval)
-/* ia64 pointer cmpxchg */
-#define tMPI_Atomic_ptr_cas(a, oldval, newval) \
-    (_InterlockedCompareExchangePointer(&((a)->value), newval, oldval) == oldval)
-
-/*#define tMPI_Atomic_ptr_cas(a, oldval, newval) __sync_val_compare_and_swap(&((a)->value),newval,oldval)*/
-
-
-/* ia64 fetchadd, but it only works with increments +/- 1,4,8,16 */
-#define tMPI_ia64_fetchadd(a, inc)  __fetchadd4_rel(a, inc)
-
-#define tMPI_Atomic_swap(a, b) _InterlockedExchange( &((a)->value), (b))
-#define tMPI_Atomic_ptr_swap(a, b) _InterlockedExchangePointer( &((a)->value), (b))
-#define TMPI_ATOMIC_HAVE_NATIVE_SWAP
-
-#elif defined __GNUC__
-
-/* ia64 memory barrier */
-#define tMPI_Atomic_memory_barrier() asm volatile ("mf" ::: "memory")
-
-/* ia64 cmpxchg */
-static inline int tMPI_Atomic_cas(tMPI_Atomic_t *a, int oldval, int newval)
-{
-#if GCC_VERSION < 40200
-    volatile int res;
-    asm volatile ("mov ar.ccv=%0;;" :: "rO" (oldval));
-    asm volatile ("cmpxchg4.acq %0=[%1],%2,ar.ccv" :
-                  "=r" (res) : "r" (&a->value), "r" (newval) : "memory");
-
-    return res == oldval;
-#else
-    return __sync_bool_compare_and_swap( &(a->value), oldval, newval);
-#endif
-}
-
-/* ia64 ptr cmpxchg */
-static inline int tMPI_Atomic_ptr_cas(tMPI_Atomic_ptr_t * a, void *oldval,
-                                      void *newval)
-{
-#if GCC_VERSION < 40200
-    void* volatile* res;
-    asm volatile ("mov ar.ccv=%0;;" :: "rO" (oldval));
-    asm volatile ("cmpxchg8.acq %0=[%1],%2,ar.ccv" :
-                  "=r" (res) : "r" (&a->value), "r" (newval) : "memory");
-
-    return ((void*)res) == oldval;
-#else
-    return __sync_bool_compare_and_swap( &(a->value), oldval, newval);
-#endif
-}
-
-
-/* fetchadd, but on ia64 it only works with increments +/- 1,4,8,16 */
-#define tMPI_ia64_fetchadd(a, inc)                                             \
-    ({  unsigned long res;                                                        \
-        asm volatile ("fetchadd4.rel %0=[%1],%2"                                  \
-                      : "=r" (res) : "r" (a), "r" (inc) : "memory");                \
-        res;                                                        \
-     })
-
-
-
-#else  /* Unknown compiler */
-#  error Unknown ia64 compiler (not GCC or ICC) - modify tMPI_Thread.h!
-#endif /* end of gcc/icc specific section */
-
-
-
-
-static inline int tMPI_Atomic_add_return(tMPI_Atomic_t *a, int i)
-{
-    volatile int oldval, newval;
-    volatile int __i = i;
-
-    /* Use fetchadd if, and only if, the increment value can be determined
-     * at compile time (otherwise this check is optimized away) and it is
-     * a value supported by fetchadd (1,4,8,16,-1,-4,-8,-16).
-     */
-    if (__builtin_constant_p(i) &&
-        ( (__i ==   1) || (__i ==   4)  || (__i ==   8) || (__i ==  16) ||
-          (__i ==  -1) || (__i ==  -4)  || (__i ==  -8) || (__i == -16) ) )
-    {
-        oldval = tMPI_ia64_fetchadd((unsigned int*)&(a->value), __i);
-        newval = oldval + i;
-    }
-    else
-    {
-        /* Use compare-exchange addition that works with any value */
-        do
-        {
-            oldval = tMPI_Atomic_get(a);
-            newval = oldval + i;
-        }
-        while (!tMPI_Atomic_cas(a, oldval, newval));
-    }
-    return (int)newval;
-}
-#define TMPI_ATOMIC_HAVE_NATIVE_ADD_RETURN
-
-
-
-static inline int tMPI_Atomic_fetch_add(tMPI_Atomic_t *a, int i)
-{
-    volatile int oldval, newval;
-    volatile int __i = i;
-
-    /* Use ia64 fetchadd if, and only if, the increment value can be determined
-     * at compile time (otherwise this check is optimized away) and it is
-     * a value supported by fetchadd (1,4,8,16,-1,-4,-8,-16).
-     */
-    if (__builtin_constant_p(i) &&
-        ( (__i ==   1) || (__i ==   4)  || (__i ==   8) || (__i ==  16) ||
-          (__i ==  -1) || (__i ==  -4)  || (__i ==  -8) || (__i == -16) ) )
-    {
-        oldval = tMPI_ia64_fetchadd((unsigned int*)&(a->value), __i);
-        newval = oldval + i;
-    }
-    else
-    {
-        /* Use compare-exchange addition that works with any value */
-        do
-        {
-            oldval = tMPI_Atomic_get(a);
-            newval = oldval + i;
-        }
-        while (!tMPI_Atomic_cas(a, oldval, newval));
-    }
-    return (int)oldval;
-}
-#define TMPI_ATOMIC_HAVE_NATIVE_FETCH_ADD
-
-#endif
-
-#undef tMPI_ia64_fetchadd
diff --git a/src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/gcc_intrinsics.h b/src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/gcc_intrinsics.h
deleted file mode 100644 (file)
index f909cb9..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Written by Sander Pronk, Erik Lindahl, and possibly others.
-
-   Copyright (c) 2009, Sander Pronk, Erik Lindahl.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-
-/* this is for newer versions of gcc that have built-in intrinsics */
-
-#define tMPI_Atomic_memory_barrier()  __sync_synchronize()
-
-
-
-TMPI_EXPORT
-static inline int tMPI_Atomic_cas(tMPI_Atomic_t *a, int oldval, int newval)
-{
-    return __sync_bool_compare_and_swap( &(a->value), oldval, newval);
-}
-
-TMPI_EXPORT
-static inline int tMPI_Atomic_ptr_cas(tMPI_Atomic_ptr_t* a, void *oldval,
-                                      void *newval)
-{
-#if !defined(__INTEL_COMPILER) && !defined(__CUDACC__)
-    return __sync_bool_compare_and_swap( &(a->value), oldval, newval);
-#else
-    /* the intel compilers need integer type arguments for compare_and_swap.
-        on the platforms supported by icc, size_t is always the size of
-        a pointer. */
-    return (__sync_bool_compare_and_swap( (size_t*)&(a->value),
-                                          (size_t)oldval,
-                                          (size_t)newval) );
-#endif
-}
-
-TMPI_EXPORT
-static inline int tMPI_Atomic_add_return(tMPI_Atomic_t *a, volatile int i)
-{
-    return __sync_add_and_fetch( &(a->value), i);
-}
-#define TMPI_ATOMIC_HAVE_NATIVE_ADD_RETURN
-
-
-TMPI_EXPORT
-static inline int tMPI_Atomic_fetch_add(tMPI_Atomic_t *a, volatile int i)
-{
-    return __sync_fetch_and_add( &(a->value), i);
-}
-#define TMPI_ATOMIC_HAVE_NATIVE_FETCH_ADD
diff --git a/src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/gcc_ppc.h b/src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/gcc_ppc.h
deleted file mode 100644 (file)
index 928d770..0000000
+++ /dev/null
@@ -1,292 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Written by Sander Pronk, Erik Lindahl, and possibly others.
-
-   Copyright (c) 2009, Sander Pronk, Erik Lindahl.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-
-/* NOTE:
-
- ***************************************************************************
-   this file is not used any more. gcc intrinsics take care of the atomics
- ***************************************************************************
-
- */
-
-#error included gcc_ppc.h. This file is outdated
-
-
-
-typedef struct tMPI_Atomic
-{
-    volatile int value;   /*!< Volatile, to avoid compiler aliasing */
-}
-tMPI_Atomic_t;
-
-typedef struct tMPI_Atomic_ptr
-{
-    void* volatile* value;   /*!< Volatile, to avoid compiler aliasing */
-}
-tMPI_Atomic_ptr_t;
-
-
-typedef struct tMPI_Spinlock
-{
-    volatile unsigned int lock;   /*!< Volatile, to avoid compiler aliasing */
-}
-tMPI_Spinlock_t;
-#define TMPI_ATOMIC_HAVE_NATIVE_SPINLOCK
-
-
-#define TMPI_SPINLOCK_INITIALIZER   { 0 }
-
-#define tMPI_Atomic_get(a)        ((a)->value)
-#define tMPI_Atomic_set(a, i)     (((a)->value) = (i))
-
-#define tMPI_Atomic_ptr_get(a)    (void*)((a)->value)
-#define tMPI_Atomic_ptr_set(a, i)  (((a)->value) = (void*)(i))
-
-
-#if (TMPI_GCC_VERSION >= 40100)
-
-#include "gcc_intrinsics.h"
-
-#else
-
-/* Compiler-dependent stuff: GCC memory barrier */
-#define tMPI_Atomic_memory_barrier() __asm__ __volatile__("isync" : : : "memory")
-
-
-
-#define TMPI_ATOMIC_HAVE_NATIVE_SWAP
-static inline int tMPI_Atomic_swap(tMPI_Atomic_t *a, int b)
-{
-    int ret;
-
-    __asm__ __volatile__ ("1:    lwarx   %0,0,%2 \n"
-                          "\tstwcx.  %3,0,%2 \n"
-                          "\tbne-    1b\n"
-                          : "=&r" (ret), "=m" (a->value)
-                          : "r" (&(a->value)), "r" (b)
-                          : "cc", "memory");
-
-    return ret;
-}
-
-static inline void* tMPI_Atomic_ptr_swap(tMPI_Atomic_ptr_t *a, void *b)
-{
-    int ret;
-
-#if (!defined(__PPC64__)) && (!defined(__ppc64))
-    __asm__ __volatile__ ("1:    lwarx   %0,0,%2 \n"
-                          "\tstwcx.  %3,0,%2 \n"
-                          "\tbne-    1b\n"
-                          : "=&r" (ret), "=m" (a->value)
-                          : "r" (&(a->value)), "r" (b)
-                          : "cc", "memory");
-#else
-    __asm__ __volatile__ ("1:    ldarx   %0,0,%2 \n"
-                          "\tstdcx.  %3,0,%2 \n"
-                          "\tbne-    1b\n"
-                          : "=&r" (ret), "=m" (a->value)
-                          : "r" (&(a->value)), "r" (b)
-                          : "cc", "memory");
-#endif
-
-    return ret;
-}
-
-
-
-static inline int tMPI_Atomic_cas(tMPI_Atomic_t *a, int oldval, int newval)
-{
-    int prev;
-
-    __asm__ __volatile__ ("1:    lwarx   %0,0,%2 \n"
-                          "\tcmpw    0,%0,%3 \n"
-                          "\tbne     2f \n"
-                          "\tstwcx.  %4,0,%2 \n"
-                          "bne-    1b\n"
-                          "\tsync\n"
-                          "2:\n"
-                          : "=&r" (prev), "=m" (a->value)
-                          : "r" (&a->value), "r" (oldval), "r" (newval),
-                          "m" (a->value)
-                          : "cc", "memory");
-
-    return prev == oldval;
-}
-
-
-static inline int tMPI_Atomic_ptr_cas(tMPI_Atomic_ptr_t *a, void *oldval,
-                                      void *newval)
-{
-    void *prev;
-
-#if (!defined(__PPC64__)) && (!defined(__ppc64))
-    __asm__ __volatile__ ("1:    lwarx   %0,0,%2 \n"
-                          "\tcmpw    0,%0,%3 \n"
-                          "\tbne     2f \n"
-                          "\tstwcx.  %4,0,%2 \n"
-                          "bne-    1b\n"
-                          "\tsync\n"
-                          "2:\n"
-                          : "=&r" (prev), "=m" (a->value)
-                          : "r" (&a->value), "r" (oldval), "r" (newval),
-                          "m" (a->value)
-                          : "cc", "memory");
-#else
-    __asm__ __volatile__ ("1:    ldarx   %0,0,%2 \n"
-                          "\tcmpd    0,%0,%3 \n"
-                          "\tbne     2f \n"
-                          "\tstdcx.  %4,0,%2 \n"
-                          "bne-    1b\n"
-                          "\tsync\n"
-                          "2:\n"
-                          : "=&r" (prev), "=m" (a->value)
-                          : "r" (&a->value), "r" (oldval), "r" (newval),
-                          "m" (a->value)
-                          : "cc", "memory");
-#endif
-    return prev == oldval;
-}
-
-#define TMPI_ATOMIC_HAVE_NATIVE_ADD_RETURN
-static inline int tMPI_Atomic_add_return(tMPI_Atomic_t *a, int i)
-{
-    int t;
-
-    __asm__ __volatile__("1:     lwarx   %0,0,%2\n"
-                         "\tadd     %0,%1,%0\n"
-                         "\tstwcx.  %0,0,%2 \n"
-                         "\tbne-    1b\n"
-                         "\tisync\n"
-                         : "=&r" (t)
-                         : "r" (i), "r" (&a->value)
-                         : "cc", "memory");
-    return t;
-}
-
-
-
-#define TMPI_ATOMIC_HAVE_NATIVE_FETCH_ADD
-static inline int tMPI_Atomic_fetch_add(tMPI_Atomic_t *a, int i)
-{
-    int t;
-
-    __asm__ __volatile__("\teieio\n"
-                         "1:     lwarx   %0,0,%2\n"
-                         "\tadd     %0,%1,%0\n"
-                         "\tstwcx.  %0,0,%2 \n"
-                         "\tbne-    1b\n"
-                         "\tisync\n"
-                         : "=&r" (t)
-                         : "r" (i), "r" (&a->value)
-                         : "cc", "memory");
-
-    return (t - i);
-}
-
-
-#endif
-
-
-static inline void tMPI_Spinlock_init(tMPI_Spinlock_t *x)
-{
-    x->lock = 0;
-}
-
-
-
-static inline void tMPI_Spinlock_lock(tMPI_Spinlock_t *x)
-{
-    unsigned int tmp;
-
-    __asm__ __volatile__("\tb      1f\n"
-                         "2:      lwzx    %0,0,%1\n"
-                         "\tcmpwi   0,%0,0\n"
-                         "\tbne+    2b\n"
-                         "1:      lwarx   %0,0,%1\n"
-                         "\tcmpwi   0,%0,0\n"
-                         "\tbne-    2b\n"
-                         "\tstwcx.  %2,0,%1\n"
-                         "bne-    2b\n"
-                         "\tisync\n"
-                         : "=&r" (tmp)
-                         : "r" (&x->lock), "r" (1)
-                         : "cr0", "memory");
-}
-
-
-static inline int tMPI_Spinlock_trylock(tMPI_Spinlock_t *x)
-{
-    unsigned int           old, t;
-    unsigned int           mask = 1;
-    volatile unsigned int *p    = &x->lock;
-
-    __asm__ __volatile__("\teieio\n"
-                         "1:      lwarx   %0,0,%4 \n"
-                         "\tor      %1,%0,%3 \n"
-                         "\tstwcx.  %1,0,%4 \n"
-                         "\tbne     1b\n"
-                         "\tsync\n"
-                         : "=&r" (old), "=&r" (t), "=m" (*p)
-                         : "r" (mask), "r" (p), "m" (*p)
-                         : "cc", "memory");
-
-    return (old & mask);
-}
-
-
-static inline void tMPI_Spinlock_unlock(tMPI_Spinlock_t *x)
-{
-    __asm__ __volatile__("\teieio\n" : : : "memory");
-    x->lock = 0;
-}
-
-
-static inline int tMPI_Spinlock_islocked(const tMPI_Spinlock_t *x)
-{
-    return ( x->lock != 0);
-}
-
-
-static inline void tMPI_Spinlock_wait(tMPI_Spinlock_t *x)
-{
-    do
-    {
-        tMPI_Atomic_memory_barrier();
-    }
-    while (tMPI_Spinlock_islocked(x));
-}
diff --git a/src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/gcc_spinlock.h b/src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/gcc_spinlock.h
deleted file mode 100644 (file)
index 84a244d..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Written by Sander Pronk, Erik Lindahl, and possibly others.
-
-   Copyright (c) 2009, Sander Pronk, Erik Lindahl.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-
-/* this is for newer versions of gcc that have built-in intrinsics.
-   These are the generic spinlocks:*/
-
-
-typedef struct tMPI_Spinlock
-{
-    volatile unsigned int lock /*__attribute__ ((aligned(64)))*/;
-} tMPI_Spinlock_t;
-
-#define TMPI_SPINLOCK_INITIALIZER   { 0 }
-
-#define TMPI_ATOMIC_HAVE_NATIVE_SPINLOCK
-
-
-
-static inline void tMPI_Spinlock_init(tMPI_Spinlock_t *x)
-{
-    x->lock = 0;
-}
-
-
-static inline void tMPI_Spinlock_lock(tMPI_Spinlock_t *x)
-{
-#if 1
-    while (__sync_lock_test_and_set(&(x->lock), 1) == 1)
-    {
-        /* this is nicer on the system bus: */
-        while (x->lock == 1)
-        {
-        }
-    }
-#else
-    do
-    {
-    }
-    while (__sync_lock_test_and_set(&(x->lock), 1) == 1);
-#endif
-}
-
-
-static inline int tMPI_Spinlock_trylock(tMPI_Spinlock_t *x)
-{
-    return __sync_lock_test_and_set(&(x->lock), 1);
-}
-
-
-static inline void tMPI_Spinlock_unlock(tMPI_Spinlock_t *x)
-{
-    __sync_lock_release(&(x->lock));
-}
-
-static inline int tMPI_Spinlock_islocked(const tMPI_Spinlock_t *x)
-{
-    __sync_synchronize();
-    return ( x->lock == 1 );
-}
-
-static inline void tMPI_Spinlock_wait(tMPI_Spinlock_t *x)
-{
-    do
-    {
-    }
-    while (x->lock == 1);
-    __sync_synchronize();
-}
diff --git a/src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/gcc_x86.h b/src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/gcc_x86.h
deleted file mode 100644 (file)
index a2d72af..0000000
+++ /dev/null
@@ -1,305 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Written by Sander Pronk, Erik Lindahl, and possibly others.
-
-   Copyright (c) 2009, Sander Pronk, Erik Lindahl.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-
-
-#include <limits.h>
-#include <stdint.h>
-/* This code is executed for x86 and x86-64, with these compilers:
- * GNU
- * Intel
- * Pathscale
- * All these support GCC-style inline assembly.
- * We also use this section for the documentation.
- */
-
-
-#if 0
-/* Only gcc and Intel support this check, otherwise set it to true (skip doc) */
-#if (!defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined DOXYGEN)
-#define __builtin_constant_p(i) (1)
-#endif
-#endif
-
-/* we put all of these on their own cache line by padding the data structure
-   to the size of a cache line on x86 (64 bytes): */
-#define TMPI_SIZEOF_X86_CACHE_LINE 64
-typedef struct tMPI_Atomic
-{
-    int  value;
-    char padding[TMPI_SIZEOF_X86_CACHE_LINE-sizeof(int)];
-} tMPI_Atomic_t;
-
-typedef struct tMPI_Atomic_ptr
-{
-    void* value;
-    char  padding[TMPI_SIZEOF_X86_CACHE_LINE-sizeof(void*)];
-} tMPI_Atomic_ptr_t;
-
-typedef struct tMPI_Spinlock
-{
-    unsigned int lock;
-    char         padding[TMPI_SIZEOF_X86_CACHE_LINE-sizeof(unsigned int)];
-} tMPI_Spinlock_t;
-
-
-#define TMPI_SPINLOCK_INITIALIZER   { 0 }
-
-#define TMPI_ATOMIC_HAVE_NATIVE_SPINLOCK
-
-
-
-/* these are guaranteed to be  atomic on x86 and x86_64 */
-#define tMPI_Atomic_get(a)  ((a)->value)
-#define tMPI_Atomic_set(a, i)  (((a)->value) = (i))
-
-#define tMPI_Atomic_ptr_get(a)  ((a)->value)
-#define tMPI_Atomic_ptr_set(a, i)  (((a)->value) = (void*)(i))
-
-
-/* do the intrinsics.
-
-   We disable this for 32-bit builds because the target may be 80386,
-   which didn't have cmpxchg, etc (they were introduced as only as 'recently'
-   as the 486, and gcc on some Linux versions still target 80386 by default).
-
-   We also specifically check for icc, because intrinsics are not always
-   supported there.
-
-   llvm has issues with inline assembly and also in 32 bits has support for
-   the gcc intrinsics */
-#if ( ( (TMPI_GCC_VERSION >= 40100) && defined(__x86_64__) &&  \
-    !defined(__INTEL_COMPILER) )  || defined(__llvm__) )
-#include "gcc_intrinsics.h"
-
-#else
-/* older versions of gcc don't support atomic intrinsics */
-
-#define tMPI_Atomic_memory_barrier() __asm__ __volatile__("sfence;" : : : "memory")
-
-#define TMPI_ATOMIC_HAVE_NATIVE_FETCH_ADD
-static inline int tMPI_Atomic_fetch_add(tMPI_Atomic_t *a, int i)
-{
-    volatile int res = i;
-    /* volatile because we read and write back to the same variable in the
-       asm section.  some compilers requires this to be volatile */
-    __asm__ __volatile__("lock ; xaddl %0, %1;"      /* swap-add */
-                         : "=r" (res)                /* with register as
-                                                        output*/
-                         : "m" (a->value), "0" (res) /* and memory as input */
-                         : "memory");
-    return res;
-}
-
-#define TMPI_ATOMIC_HAVE_NATIVE_ADD_RETURN
-static inline int tMPI_Atomic_add_return(tMPI_Atomic_t *a, int i)
-{
-    int          orig = i;
-    volatile int res  = i;
-
-    __asm__ __volatile__("lock ; xaddl %0, %1;"
-                         : "=r" (res)
-                         : "m" (a->value), "0" (res)
-                         :  "memory");
-    return res + orig; /* then add again from the right value */
-}
-
-
-
-static inline int tMPI_Atomic_cas(tMPI_Atomic_t *a, int oldval, int newval)
-{
-    int prev;
-
-    __asm__ __volatile__("lock ; cmpxchgl %1,%2"
-                         : "=a" (prev)
-                         : "q" (newval), "m" (a->value), "0" (oldval)
-                         : "memory");
-
-    return prev == oldval;
-}
-
-static inline int tMPI_Atomic_ptr_cas(tMPI_Atomic_ptr_t *a,
-                                      void              *oldval,
-                                      void              *newval)
-{
-    void* prev;
-#if (defined(__x86_64__) && !defined(__ILP32__))
-    __asm__ __volatile__("lock ; cmpxchgq %1,%2"
-                         : "=a" (prev)
-                         : "q" (newval), "m" (a->value), "0" (oldval)
-                         : "memory");
-#elif (defined(__x86_64__) && defined(__ILP32__)) || defined(__i386__)
-    __asm__ __volatile__("lock ; cmpxchgl %1,%2"
-                         : "=a" (prev)
-                         : "q" (newval), "m" (a->value), "0" (oldval)
-                         : "memory");
-#else
-#    error Cannot detect whether this is a 32-bit or 64-bit x86 build.
-#endif
-    return prev == oldval;
-}
-
-#endif /* end of check for gcc intrinsics */
-
-
-#define TMPI_ATOMIC_HAVE_NATIVE_SWAP
-/* do the swap fns; we told the intrinsics that we have them. */
-static inline int tMPI_Atomic_swap(tMPI_Atomic_t *a, int b)
-{
-    volatile int ret = b;
-    __asm__ __volatile__("\txchgl %0, %1;"
-                         : "+r" (ret), "+m" (a->value)
-                         :
-                         : "memory");
-    return (int)ret;
-}
-
-static inline void *tMPI_Atomic_ptr_swap(tMPI_Atomic_ptr_t *a, void *b)
-{
-    void *volatile *ret = (void* volatile*)b;
-#if (defined(__x86_64__) && !defined(__ILP32__))
-    __asm__ __volatile__("\txchgq %0, %1;"
-                         : "+r" (ret), "+m" (a->value)
-                         :
-                         : "memory");
-#elif (defined(__x86_64__) && defined(__ILP32__)) || defined(__i386__)
-    __asm__ __volatile__("\txchgl %0, %1;"
-                         : "+r" (ret), "+m" (a->value)
-                         :
-                         : "memory");
-#else
-#    error Cannot detect whether this is a 32-bit or 64-bit x86 build.
-#endif
-    return (void*)ret;
-}
-
-
-
-/* spinlocks : */
-
-static inline void tMPI_Spinlock_init(tMPI_Spinlock_t *x)
-{
-    x->lock = 0;
-}
-
-
-
-static inline void tMPI_Spinlock_lock(tMPI_Spinlock_t *x)
-{
-    /* this is a spinlock with a double loop, as recommended by Intel
-       it pauses in the outer loop (the one that just checks for the
-       availability of the lock), and thereby reduces bus contention and
-       prevents the pipeline from flushing. */
-    __asm__ __volatile__("1:\tcmpl $0, %0\n"    /* check the lock */
-                         "\tje 2f\n"            /* try to lock if it is
-                                                   free by jumping forward */
-                         "\tpause\n"            /* otherwise: small pause
-                                                   as recommended by Intel */
-                         "\tjmp 1b\n"           /* and jump back */
-
-                         "2:\tmovl $1, %%eax\n" /* set eax to 1, the locked
-                                                   value of the lock */
-                         "\txchgl %%eax, %0\n"  /* atomically exchange
-                                                   eax with the lock value */
-                         "\tcmpl $0, %%eax\n"   /* compare the exchanged
-                                                   value with 0 */
-                         "\tjne 1b"             /* jump backward if we didn't
-                                                   just lock */
-                         : "+m" (x->lock)       /* input & output var */
-                         :
-                         : "%eax", "memory"     /* we changed memory */
-                         );
-}
-
-
-
-static inline void tMPI_Spinlock_unlock(tMPI_Spinlock_t *x)
-{
-    /* this is apparently all that is needed for unlocking a lock */
-    __asm__ __volatile__(
-        "\n\tmovl $0, %0\n"
-        : "=m" (x->lock) : : "memory" );
-}
-
-
-
-static inline int tMPI_Spinlock_trylock(tMPI_Spinlock_t *x)
-{
-    int old_value = 1;
-
-    __asm__ __volatile__("\tmovl %2, %0\n"     /* set eax to 1, the locked
-                                                  value of the lock */
-                         "\txchgl %0, %1\n"    /* atomically exchange
-                                                  eax with the address in
-                                                  rdx. */
-                         : "+r" (old_value), "+m" (x->lock)
-                         : "i" (1)
-                         : "memory");
-    return (old_value);
-}
-
-
-
-static inline int tMPI_Spinlock_islocked(const tMPI_Spinlock_t *x)
-{
-    return ( (*((volatile int*)(&(x->lock)))) != 0);
-}
-
-
-static inline void tMPI_Spinlock_wait(tMPI_Spinlock_t *x)
-{
-    /* this is the spinlock without the xchg.  */
-    __asm__ __volatile__("1:\tcmpl $0, %0\n" /* check the lock */
-                         "\tje 2f\n"         /* try to lock if it is
-                                                free by jumping forward */
-                         "\tpause\n"         /* otherwise: small pause
-                                                as recommended by Intel */
-                         "\tjmp 1b\n"        /* and jump back */
-                         "2:\tnop\n"         /* jump target for end
-                                                of wait */
-                         : "+m" (x->lock)    /* input & output var */
-                         :
-                         : "memory"          /* we changed memory */
-                         );
-#if 0
-    do
-    {
-        tMPI_Atomic_memory_barrier();
-    }
-    while (tMPI_Spinlock_islocked(x));
-#endif
-}
diff --git a/src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/msvc.h b/src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/msvc.h
deleted file mode 100644 (file)
index 11f6438..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Written by Sander Pronk, Erik Lindahl, and possibly others.
-
-   Copyright (c) 2009, Sander Pronk, Erik Lindahl.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-
-/* we need this for all the data types. We use WIN32_LEAN_AND_MEAN to avoid
-      polluting the global namespace. */
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-
-#define tMPI_Atomic_memory_barrier()
-
-
-typedef struct tMPI_Atomic
-{
-    LONG volatile value;          /*!< Volatile, to avoid compiler aliasing */
-} tMPI_Atomic_t;
-
-typedef struct tMPI_Atomic_ptr
-{
-    void* volatile value;          /*!< Volatile, to avoid compiler aliasing */
-} tMPI_Atomic_ptr_t;
-
-typedef struct tMPI_Spinlock
-{
-    LONG volatile lock;           /*!< Volatile, to avoid compiler aliasing */
-} tMPI_Spinlock_t;
-
-#define TMPI_ATOMIC_HAVE_NATIVE_SPINLOCK
-
-#define TMPI_SPINLOCK_INITIALIZER   { 0 }
-
-
-#define tMPI_Atomic_get(a)  ((a)->value)
-#define tMPI_Atomic_set(a, i)  (((a)->value) = (i))
-
-
-#define tMPI_Atomic_ptr_get(a)    ((a)->value)
-#define tMPI_Atomic_ptr_set(a, i)  (((a)->value) = (void*)(i))
-
-
-#define tMPI_Atomic_fetch_add(a, i)  \
-    InterlockedExchangeAdd((LONG volatile *)(a), (LONG) (i))
-#define TMPI_ATOMIC_HAVE_NATIVE_FETCH_ADD
-
-#define tMPI_Atomic_add_return(a, i)  \
-    ( (i) + InterlockedExchangeAdd((LONG volatile *)(a), (LONG) (i)) )
-#define TMPI_ATOMIC_HAVE_NATIVE_ADD_RETURN
-
-#define tMPI_Atomic_cas(a, oldval, newval) \
-    (InterlockedCompareExchange((LONG volatile *)(a), (LONG) (newval), (LONG) (oldval)) == (LONG)oldval)
-
-#define tMPI_Atomic_ptr_cas(a, oldval, newval) \
-    (InterlockedCompareExchangePointer(&((a)->value), (PVOID) (newval),  \
-                                       (PVOID) (oldval)) == (PVOID)oldval)
-
-#define TMPI_ATOMIC_HAVE_NATIVE_SWAP
-#define tMPI_Atomic_swap(a, b) \
-    InterlockedExchange((LONG volatile *)(a), (LONG) (b))
-
-#define tMPI_Atomic_ptr_swap(a, b) \
-    InterlockedExchangePointer(&((a)->value), (PVOID) (b))
-
-
-
-static inline void tMPI_Spinlock_init(tMPI_Spinlock_t *x)
-{
-    x->lock = 0;
-}
-
-# define tMPI_Spinlock_lock(x)   \
-    while ((InterlockedCompareExchange((LONG volatile *)(x), 1, 0)) != 0)
-
-
-#define tMPI_Spinlock_trylock(x)   \
-    InterlockedCompareExchange((LONG volatile *)(x), 1, 0)
-
-
-static inline void tMPI_Spinlock_unlock(tMPI_Spinlock_t *x)
-{
-    x->lock = 0;
-}
-
-
-static inline int tMPI_Spinlock_islocked(const tMPI_Spinlock_t *x)
-{
-    return (*(volatile signed char *)(&(x)->lock) != 0);
-}
-
-
-static inline void tMPI_Spinlock_wait(tMPI_Spinlock_t *x)
-{
-    while (tMPI_Spinlock_islocked(x))
-    {
-        /*Sleep(0);*/
-    }
-}
diff --git a/src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/suncc-sparc.h b/src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/suncc-sparc.h
deleted file mode 100644 (file)
index 3f8024a..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Written by Sander Pronk, Erik Lindahl, and possibly others.
-
-   Copyright (c) 2009, Sander Pronk, Erik Lindahl.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-
-/* File contributed by Sergey Klyaus */
-
-#include <atomic.h>
-
-/* this is for newer versions of gcc that have built-in intrinsics,
-   on platforms not explicitly supported with inline assembly. */
-
-#define tMPI_Atomic_memory_barrier()  do { membar_consumer(); membar_producer(); } while (0)
-
-/* Only gcc and Intel support this check, otherwise set it to true (skip doc) */
-#if (!defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined DOXYGEN)
-#define __builtin_constant_p(i) (1)
-#endif
-
-
-typedef struct tMPI_Atomic
-{
-    volatile uint_t value;
-}
-tMPI_Atomic_t;
-
-typedef struct tMPI_Atomic_ptr
-{
-    void* volatile value;
-}
-tMPI_Atomic_ptr_t;
-
-
-/* for now we simply assume that int and void* assignments are atomic */
-#define tMPI_Atomic_get(a)  ((int)( (a)->value) )
-#define tMPI_Atomic_set(a, i)  (((a)->value) = (i))
-
-
-#define tMPI_Atomic_ptr_get(a)  ((void*)((a)->value) )
-#define tMPI_Atomic_ptr_set(a, i)  (((a)->value) = (void*)(i))
-
-
-static inline int tMPI_Atomic_cas(tMPI_Atomic_t *a, int oldval, int newval)
-{
-    return (int)atomic_cas_uint(&a->value, (uint_t)oldval, (uint_t)newval);
-}
-
-
-static inline int tMPI_Atomic_ptr_cas(tMPI_Atomic_ptr_t* a, void *oldval,
-                                      void *newval)
-{
-    /*atomic_cas_ptr always returns value stored in a, so*/
-    return atomic_cas_ptr(&(a->value), oldval, newval) == oldval;
-}
-
-static inline int tMPI_Atomic_add_return(tMPI_Atomic_t *a, volatile int i)
-{
-    return (int) atomic_add_int_nv(&a->value, i);
-}
-#define TMPI_ATOMIC_HAVE_NATIVE_ADD_RETURN
-
-static inline int tMPI_Atomic_fetch_add(tMPI_Atomic_t *a, volatile int i)
-{
-    return (int) atomic_add_int_nv(&a->value, i) - i;
-}
-#define TMPI_ATOMIC_HAVE_NATIVE_FETCH_ADD
diff --git a/src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/xlc_ppc.h b/src/include/gromacs/external/thread_mpi/include/thread_mpi/atomic/xlc_ppc.h
deleted file mode 100644 (file)
index 3b22137..0000000
+++ /dev/null
@@ -1,271 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Written by Sander Pronk, Erik Lindahl, and possibly others.
-
-   Copyright (c) 2009, Sander Pronk, Erik Lindahl.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-/* IBM xlC compiler */
-#include <builtins.h>
-
-
-#define TMPI_XLC_INTRINSICS
-
-/* ppc has many memory synchronization instructions */
-/*#define tMPI_Atomic_memory_barrier() { __fence(); __sync(); __fence();}*/
-/*#define tMPI_Atomic_memory_barrier() __isync();*/
-/*#define tMPI_Atomic_memory_barrier() __lwsync();*/
-
-/* for normal memory, this should be enough: */
-#define tMPI_Atomic_memory_barrier() { __fence(); __eieio(); __fence(); }
-#define tMPI_Atomic_memory_barrier_acq() { __eieio(); __fence(); }
-#define tMPI_Atomic_memory_barrier_rel() { __fence(); __eieio(); }
-#define TMPI_HAVE_ACQ_REL_BARRIERS
-
-/*#define tMPI_Atomic_memory_barrier() __eieio();*/
-
-
-typedef struct tMPI_Atomic
-{
-    volatile int value __attribute__ ((aligned(64)));
-}
-tMPI_Atomic_t;
-
-
-typedef struct tMPI_Atomic_ptr
-{
-    /* volatile char* volatile is not a bug, but means a volatile pointer
-       to a volatile value. This is needed for older versions of
-       xlc. */
-    volatile char* volatile value __attribute__ ((aligned(64)));  /*!< Volatile, to avoid compiler aliasing */
-}
-tMPI_Atomic_ptr_t;
-
-
-typedef struct tMPI_Spinlock
-{
-    volatile int lock __attribute__ ((aligned(64)));
-}
-tMPI_Spinlock_t;
-#define TMPI_ATOMIC_HAVE_NATIVE_SPINLOCK
-
-
-
-
-#define tMPI_Atomic_get(a)   (int)((a)->value)
-#define tMPI_Atomic_set(a, i)  (((a)->value) = (i))
-#define tMPI_Atomic_ptr_get(a)   ((a)->value)
-#define tMPI_Atomic_ptr_set(a, i)  (((a)->value) = (i))
-
-#define TMPI_SPINLOCK_INITIALIZER   { 0 }
-
-
-static inline int tMPI_Atomic_cas(tMPI_Atomic_t *a, int oldval, int newval)
-{
-#ifdef TMPI_XLC_INTRINSICS
-    int ret;
-
-    __fence(); /* this one needs to be here to avoid ptr. aliasing issues */
-    __eieio();
-    ret = (__compare_and_swap(&(a->value), &oldval, newval));
-    __isync();
-    __fence(); /* and this one needs to be here to avoid aliasing issues */
-    return ret;
-#else
-    int prev;
-    __asm__ __volatile__ ("1:    lwarx   %0,0,%2 \n"
-                          "\t cmpw    0,%0,%3 \n"
-                          "\t bne     2f \n"
-                          "\t stwcx.  %4,0,%2 \n"
-                          "\t bne-    1b \n"
-                          "\t sync \n"
-                          "2: \n"
-                          : "=&r" (prev), "=m" (a->value)
-                          : "r" (&a->value), "r" (oldval), "r" (newval),
-                          "m" (a->value));
-
-    return prev == oldval;
-#endif
-}
-
-
-static inline int tMPI_Atomic_ptr_cas(tMPI_Atomic_ptr_t *a, void* oldval,
-                                      void* newval)
-{
-    int                     ret;
-    volatile char* volatile oldv = (char*)oldval;
-    volatile char* volatile newv = (char*)newval;
-
-    __fence(); /* this one needs to be here to avoid ptr. aliasing issues */
-    __eieio();
-#if (!defined (__LP64__) ) && (!defined(__powerpc64__) )
-    ret = __compare_and_swap((int *)&(a->value), (int*)&oldv, (int)newv);
-#else
-    ret = __compare_and_swaplp((long *)&(a->value), (long*)&oldv, (long)newv);
-#endif
-    __isync();
-    __fence();
-
-    return ret;
-}
-
-
-
-
-static inline int tMPI_Atomic_add_return(tMPI_Atomic_t *a, int i)
-{
-#ifdef TMPI_XLC_INTRINSICS
-    int oldval, newval;
-
-    do
-    {
-        __fence();
-        __eieio(); /* these memory barriers are neccesary */
-        oldval = tMPI_Atomic_get(a);
-        newval = oldval + i;
-    }
-    /*while(!__compare_and_swap( &(a->value), &oldval, newval));*/
-    while (__check_lock_mp( (int*)&(a->value), oldval, newval));
-
-    /*__isync();*/
-    __fence();
-
-    return newval;
-#else
-    int t;
-
-    __asm__ __volatile__("1:     lwarx   %0,0,%2 \n"
-                         "\t add     %0,%1,%0 \n"
-                         "\t stwcx.  %0,0,%2 \n"
-                         "\t bne-    1b \n"
-                         "\t isync \n"
-                         : "=&r" (t)
-                         : "r" (i), "r" (&a->value) );
-    return t;
-#endif
-}
-#define TMPI_ATOMIC_HAVE_NATIVE_ADD_RETURN
-
-
-
-static inline int tMPI_Atomic_fetch_add(tMPI_Atomic_t *a, int i)
-{
-#ifdef TMPI_XLC_INTRINSICS
-    int oldval, newval;
-
-    do
-    {
-        __fence();
-        __eieio(); /* these memory barriers are neccesary */
-        oldval = tMPI_Atomic_get(a);
-        newval = oldval + i;
-    }
-    /*while(__check_lock_mp((const int*)&(a->value), oldval, newval));*/
-    while (__check_lock_mp( (int*)&(a->value), oldval, newval));
-    /*while(!__compare_and_swap( &(a->value), &oldval, newval));*/
-    /*__isync();*/
-    __fence();
-
-    return oldval;
-#else
-    int t;
-
-    __asm__ __volatile__("\t eieio\n"
-                         "1:     lwarx   %0,0,%2 \n"
-                         "\t add     %0,%1,%0 \n"
-                         "\t stwcx.  %0,0,%2 \n"
-                         "\t bne-    1b \n"
-                         "\t isync \n"
-                         : "=&r" (t)
-                         : "r" (i), "r" (&a->value));
-
-    return (t - i);
-#endif
-}
-#define TMPI_ATOMIC_HAVE_NATIVE_FETCH_ADD
-
-
-static inline void tMPI_Spinlock_init(tMPI_Spinlock_t *x)
-{
-    __fence();
-    __clear_lock_mp((const int*)x, 0);
-    __fence();
-}
-
-
-static inline void tMPI_Spinlock_lock(tMPI_Spinlock_t *x)
-{
-    __fence();
-    do
-    {
-    }
-    while (__check_lock_mp((int*)&(x->lock), 0, 1));
-    tMPI_Atomic_memory_barrier_acq();
-}
-
-
-static inline int tMPI_Spinlock_trylock(tMPI_Spinlock_t *x)
-{
-    int ret;
-    /* Return 0 if we got the lock */
-    __fence();
-    ret = __check_lock_mp((int*)&(x->lock), 0, 1);
-    tMPI_Atomic_memory_barrier_acq();
-    return ret;
-}
-
-
-static inline void tMPI_Spinlock_unlock(tMPI_Spinlock_t *x)
-{
-    tMPI_Atomic_memory_barrier_rel();
-    __clear_lock_mp((int*)&(x->lock), 0);
-}
-
-
-static inline int tMPI_Spinlock_islocked(const tMPI_Spinlock_t *x)
-{
-    int ret;
-    __fence();
-    ret = ((x->lock) != 0);
-    tMPI_Atomic_memory_barrier_acq();
-    return ret;
-}
-
-
-static inline void tMPI_Spinlock_wait(tMPI_Spinlock_t *x)
-{
-    do
-    {
-    }
-    while (tMPI_Spinlock_islocked(x));
-}
diff --git a/src/include/gromacs/external/thread_mpi/include/thread_mpi/barrier.h b/src/include/gromacs/external/thread_mpi/include/thread_mpi/barrier.h
deleted file mode 100644 (file)
index 58899a0..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Written by Sander Pronk, Erik Lindahl, and possibly others.
-
-   Copyright (c) 2009, Sander Pronk, Erik Lindahl.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-#ifndef TMPI_BARRIER_H_
-#define TMPI_BARRIER_H_
-
-#include "visibility.h"
-#include "wait.h"
-
-/** Fast (possibly busy-wait-based) barrier type
- *
- *  This barrier has the same functionality as the standard
- *  tMPI_Thread_barrier_t, but since it is based on spinlocks that yield
- *  to the scheduler in case of waiting, it provides faster synchronization
- *  at the cost of busy-waiting, while still behaving relatively nicely
- *  to other processes/threads. This is therefore the preferred type of
- *  barrier for when waits are expected to be reasonably short.
- *
- *  Variables of this type should be initialized by calling
- *  tMPI_Barrier_init() to set the number of threads
- *  that should be synchronized.
- *
- * \see
- * - tMPI_Barrier_init
- * - tMPI_Barrier_wait
- */
-typedef struct tMPI_Barrier_t tMPI_Barrier_t;
-struct tMPI_Barrier_t
-{
-    tMPI_Atomic_t     count;     /*!< Number of threads remaining     */
-    int               threshold; /*!< Total number of threads         */
-    tMPI_Atomic_t     cycle;     /*!< Current cycle (alternating 0/1) */
-    TMPI_YIELD_WAIT_DATA
-};
-
-
-
-/** Initialize barrier
- *
- *  \param barrier  Pointer to _spinlock_ barrier. Note that this is not
- *                  the same datatype as the full, thread based, barrier.
- *  \param count    Number of threads to synchronize. All threads
- *                  will be released after \a count calls to
- *                  tMPI_Barrier_wait().
- */
-TMPI_EXPORT
-void tMPI_Barrier_init(tMPI_Barrier_t *barrier, int count);
-
-
-/** Perform yielding, busy-waiting barrier synchronization
- *
- *  This function blocks until it has been called N times,
- *  where N is the count value the barrier was initialized with.
- *  After N total calls all threads return. The barrier automatically
- *  cycles, and thus requires another N calls to unblock another time.
- *
- *  \param barrier  Pointer to previously created barrier.
- *
- *  \return The last thread returns -1, all the others 0.
- */
-TMPI_EXPORT
-int tMPI_Barrier_wait(tMPI_Barrier_t *barrier);
-
-
-#ifdef DOXYGEN
-/** Get the number of threads to synchronize for a barrier
- *
- *  This function returns the total number of threads the barrier
- *  synchronizes.
- *
- *  \param barrier  Pointer to barrier.
- *
- *  \return the number of threads to synchronize
- */
-TMPI_EXPORT
-int tMPI_Barrier_N(tMPI_Barrier_t *barrier);
-#else
-#define tMPI_Barrier_N(barrier)  ((barrier)->threshold)
-#endif
-
-#endif /* TMPI_BARRIER_H_ */
diff --git a/src/include/gromacs/external/thread_mpi/include/thread_mpi/collective.h b/src/include/gromacs/external/thread_mpi/include/thread_mpi/collective.h
deleted file mode 100644 (file)
index 249bf6a..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Written by Sander Pronk, Erik Lindahl, and possibly others.
-
-   Copyright (c) 2009, Sander Pronk, Erik Lindahl.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-#ifndef TMPI_COLLECTIVE_H_
-#define TMPI_COLLECTIVE_H_
-
-/** \file
- *
- * \brief Collective functions
- *
- */
-
-#include "visibility.h"
-
-/** Execute function once over comm
-
-    Executes a given function only once per collective call over comm.
-
-    Collective function.
-
-    \param[in] function     the function to call
-    \param[in] param        the parameter to the function
-    \param[out] was_first   set to 1 if the current thread was the one to
-                            execute the function. unchanged if current thread
-                            was not the one to execute the function; ignored
-                            if NULL.
-    \param[in] comm         The communicator.
-    \returns MPI_SUCCESS on success.
- */
-TMPI_EXPORT
-int tMPI_Once(tMPI_Comm comm, void (*function)(void*), void *param,
-              int *was_first);
-
-/** Execute function once over comm, and wait for the function to return
-    its value.
-
-    Executes a given function only once per collective call over comm.
-
-    Collective function.
-
-    \param[in] function     the function to call
-    \param[in] param        the parameter to the function
-    \param[out] was_first   set to 1 if the current thread was the one to
-                            execute the function. unchanged if current thread
-                            was not the one to execute the function; ignored
-                            if NULL.
-    \param[in] comm         The communicator.
-    \returns the return value of the function
- */
-TMPI_EXPORT
-void* tMPI_Once_wait(tMPI_Comm comm, void* (*function)(void*), void *param,
-                     int *was_first);
-
-/** Allocate a shared block of memory as a collective call.
-
-    Collective function.
-
-    \param[in] comm         The communicator
-    \param[in] size         The size in bytes to allocate
- */
-TMPI_EXPORT
-void* tMPI_Shmalloc(tMPI_Comm comm, size_t size);
-
-
-
-
-
-
-#include "atomic.h"
-
-typedef struct
-{
-    tMPI_Atomic_t n_remaining; /* number of remaining operations */
-    void         *res;         /* result pointer */
-    tMPI_Comm     comm;
-} tMPI_Reduce_req;
-
-/** Allocate data structure for asynchronous reduce. */
-TMPI_EXPORT
-tMPI_Reduce_req *tMPI_Reduce_req_alloc(tMPI_Comm comm);
-
-#endif /* TMPI_COLLECTIVE_H_ */
diff --git a/src/include/gromacs/external/thread_mpi/include/thread_mpi/event.h b/src/include/gromacs/external/thread_mpi/include/thread_mpi/event.h
deleted file mode 100644 (file)
index 058e3a8..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Written by Sander Pronk, Erik Lindahl, and possibly others.
-
-   Copyright (c) 2009, Sander Pronk, Erik Lindahl.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-#ifndef TMPI_EVENT_H_
-#define TMPI_EVENT_H_
-
-#include "visibility.h"
-#include "wait.h"
-
-/*! \file
-
-   \brief Event notification wait and signaling functions.
-
-   The event structure offers lightweight signaling and scheduler-yielding
-   (but still spinning) waiting for waits of intermediate durations (i.e.
-   longer than appropriate for a spin lock but shorter than mutex_cond_wait().
-   These functions only take care of the waiting and signaling; the user is
-   responsible for the handling of the actual event structures and condition
-   variables.
- */
-
-/*! \brief Event notification structure.
-
-   Structure for notifying one thread that something has happened, allowing
-   that thread to wait, and possibly give up its timeslice. This structure
-   only takes care of the notification itself, and will not handle data
-   about incoming events - that is left up to the user.
-
-   This structure allows notification of a single thread by any number of
-   threads*/
-typedef struct tMPI_Event_t tMPI_Event;
-struct tMPI_Event_t
-{
-    tMPI_Atomic_t sync;      /* the event sync counter */
-    int           last_sync; /* the last sync event looked at */
-    TMPI_YIELD_WAIT_DATA     /* data associated with yielding */
-};
-
-
-
-/*! \brief Initialize the event object.
-
-    \param ev The event structure to be intialized. */
-TMPI_EXPORT
-void tMPI_Event_init(tMPI_Event *ev);
-
-/*! \brief Deallocate the internals of the contents of event object.
-
-    \param ev The event structure to be destroyed. */
-TMPI_EXPORT
-void tMPI_Event_destroy(tMPI_Event *ev);
-
-/*! \brief Wait for an event to occur.
-
-   Sets the number of events that had occurred during the wait in N.
-   \param ev The event structure to wait on.
-   \returns  The number of events that have occurred at function
-             return time. */
-TMPI_EXPORT
-int tMPI_Event_wait(tMPI_Event *ev);
-
-#ifdef DOXYGEN
-/*! \brief Signal an event, possibly waking an tMPI_Event_wait().
-
-    \param ev  The event to signal. */
-TMPI_EXPORT
-void tMPI_Event_signal(tMPI_Event *ev);
-#else
-#define tMPI_Event_signal(ev) \
-    { \
-        tMPI_Atomic_memory_barrier_rel(); \
-        tMPI_Atomic_fetch_add( &((ev)->sync), 1); \
-    }
-#endif
-
-#ifdef DOXYGEN
-/*! \brief Signal processing of an event.
-
-   Each event that is handled by the receiver, must be processed through
-   tMPI_Event_process(). Unprocessed events will make tMPI_Event_wait() return
-   immediately.
-
-   \param ev  The event object.
-   \param N   The number of processed events. */
-TMPI_EXPORT
-void tMPI_Event_process(tMPI_Event *ev, int N);
-#else
-#define tMPI_Event_process(ev, N) \
-    { \
-        (ev)->last_sync += N; \
-    }
-#endif
-
-#endif /* TMPI_EVENT_H_ */
diff --git a/src/include/gromacs/external/thread_mpi/include/thread_mpi/hwinfo.h b/src/include/gromacs/external/thread_mpi/include/thread_mpi/hwinfo.h
deleted file mode 100644 (file)
index c91b8f6..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Written by Sander Pronk, Erik Lindahl, and possibly others.
-
-   Copyright (c) 2009, Sander Pronk, Erik Lindahl.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-#ifndef _TMPI_HWINFO_H_
-#define _TMPI_HWINFO_H_
-
-/*! \file
-
-   \brief CPU/core/HT count function.
-
- */
-
-/*! \brief Determine number of hardware threads that can be run simultaneously
-
-    Returns the total number of cores and SMT threads that can run.
-
-    \returns The maximum number of threads that can run simulataneously.
-         If this number cannot be determined for the current architecture,
-         -1 is returned.
- */
-TMPI_EXPORT
-int tMPI_Get_hw_nthreads(void);
-
-
-/*! \brief Determine the recommended number of hardware threads to run on
-
-
-    Returns the total number of cores and SMT threads to run on. This is
-    equal to the number of hardware threads available, or 1 if the number
-    can't be determined, or if there are no atomics for this platform.
-
-    \returns The maximum number of threads to run on.
- */
-TMPI_EXPORT
-int tMPI_Get_recommended_nthreads(void);
-
-
-#endif
diff --git a/src/include/gromacs/external/thread_mpi/include/thread_mpi/list.h b/src/include/gromacs/external/thread_mpi/include/thread_mpi/list.h
deleted file mode 100644 (file)
index 14a8aa1..0000000
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Written by Sander Pronk, Erik Lindahl, and possibly others.
-
-   Copyright (c) 2009, Sander Pronk, Erik Lindahl.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-#ifndef TMPI_LIST_H_
-#define TMPI_LIST_H_
-
-#include "atomic.h"
-
-
-/** \file
- *
- * \brief Lock-free list data structures.
- *
- */
-
-
-/**  Lock-free single-ended stack (FIFO)
-
-   Is a list with push, pop and detach operations */
-typedef struct
-{
-    tMPI_Atomic_ptr_t head;          /**< Pointer to the top stack element. */
-} tMPI_Stack;
-
-/**  A single element in stack */
-typedef struct tMPI_Stack_element
-{
-    struct tMPI_Stack_element *next; /**< Pointer to the next stack element. */
-    void                      *data; /**< Pointer to data. */
-} tMPI_Stack_element;
-
-
-/**  Initialize a stack */
-TMPI_EXPORT
-void tMPI_Stack_init(tMPI_Stack *st);
-
-/**  Deallocates a stack */
-TMPI_EXPORT
-void tMPI_Stack_destroy(tMPI_Stack *st);
-
-/**  Pushes a stack element onto a stack */
-TMPI_EXPORT
-void tMPI_Stack_push(tMPI_Stack *st, tMPI_Stack_element *el);
-
-/**  Pops a stack element from  a stack */
-TMPI_EXPORT
-tMPI_Stack_element *tMPI_Stack_pop(tMPI_Stack *st);
-
-/**  Detaches entire stack for use by a single thread */
-TMPI_EXPORT
-tMPI_Stack_element *tMPI_Stack_detach(tMPI_Stack *st);
-
-
-
-#if 0
-/**  Lock-free double-ended queue (FIFO)
-
-   Is a list with enqueue and dequeue operations */
-typedef struct
-{
-    tMPI_Atomic_ptr_t head, tail;
-} tMPI_Queue;
-
-/**  A single element in a queue */
-typedef struct tMPI_Queue_element
-{
-    struct tMPI_Queue_element *next; /**< Pointer to the next queue element. */
-    struct tMPI_Queue_element *prev; /**< Pointer to the prev queue element. */
-    void                      *data; /**< Pointer to data. */
-} tMPI_Queue_element;
-
-/**  Initialize a queue */
-void tMPI_Queue_init(tMPI_Queue *q);
-
-/**  Deallocates a queue */
-void tMPI_Queue_destroy(tMPI_Queue *q);
-
-/**  Enqueue an element onto the head of a queue */
-void tMPI_Queue_enqueue(tMPI_Queue *q, tMPI_Queue_element *qe);
-
-/**  Dequeue an element from the end a queue */
-tMPI_Queue_element *tMPI_Queue_dequeue(tMPI_Queue *q);
-
-
-
-
-
-/**  Lock-free circular doubly linked list */
-typedef struct
-{
-    tMPI_Atomic_ptr_t head;
-} tMPI_List;
-
-/**  Lock-free circular doubly linked list */
-typedef struct tMPI_List_element
-{
-    struct tMPI_List_element *next, *prev;
-    void                     *data;
-} tMPI_List_element;
-
-/**  Initialize a list */
-void tMPI_List_init(tMPI_List *l);
-/**  Deallocates a list */
-void tMPI_List_destroy(tMPI_List *l);
-
-tMPI_List_element* tMPI_List_first(tMPI_List *l);
-tMPI_List_element* tMPI_List_next(tMPI_List         *l,
-                                  tMPI_List_element *le);
-tMPI_List_element* tMPI_List_prev(tMPI_List         *l,
-                                  tMPI_List_element *le);
-
-void tMPI_List_add(tMPI_List *l, tMPI_List_element *le);
-void tMPI_List_insert(tMPI_List *l, tMPI_List_element *after,
-                      tMPI_List_element *le);
-void tMPI_List_remove(tMPI_List *l, tMPI_List_element *le);
-#endif
-
-#endif /* TMPI_LIST_H_ */
diff --git a/src/include/gromacs/external/thread_mpi/include/thread_mpi/lock.h b/src/include/gromacs/external/thread_mpi/include/thread_mpi/lock.h
deleted file mode 100644 (file)
index 0a2bcef..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Written by Sander Pronk, Erik Lindahl, and possibly others.
-
-   Copyright (c) 2009, Sander Pronk, Erik Lindahl.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-#ifndef TMPI_FASTLOCK_H_
-#define TMPI_FASTLOCK_H_
-
-#include "visibility.h"
-#include "wait.h"
-#include "atomic.h"
-
-/** Fast (possibly busy-wait-based) lock type
- *
- *  This lock type forms an intermediate between the spinlocks and mutexes:
- *  it is based on a busy-wait loop, but yields to the scheduler if the lock
- *  is locked.  This is therefore the preferred type of  lock for when waits
- *  are expected to be reasonably short.
- *
- *  Variables of this type should be initialized by calling
- *  tMPI_Lock_init().
- *
- * \see
- * - tMPI_Lock_init
- * - tMPI_Lock_lock
- */
-typedef struct tMPI_Lock tMPI_Lock_t;
-struct tMPI_Lock
-{
-    tMPI_Spinlock_t   lock;      /*!< The underlying spin lock */
-    TMPI_YIELD_WAIT_DATA
-};
-
-
-/** Initialize lock
- *
- *  \param lock     Pointer to the new lock.
- */
-TMPI_EXPORT
-void tMPI_Lock_init(tMPI_Lock_t *lock);
-
-
-/** Perform yielding, busy-waiting locking
- *
- *  This function blocks until the lock is locked.
- *
- *  \param lock  Pointer to previously created lock.
- */
-TMPI_EXPORT
-void tMPI_Lock_lock(tMPI_Lock_t *lock);
-
-/** Unlock the lock
- *
- *  \param lock  Pointer to previously created lock.
- */
-TMPI_EXPORT
-void tMPI_Lock_unlock(tMPI_Lock_t *lock);
-
-/** Try to lock the lock but don't block if it is locked.
- *
- *  \param lock  Pointer to previously created lock.
- */
-TMPI_EXPORT
-int tMPI_Lock_trylock(tMPI_Lock_t *lock);
-
-/** Check the status of the lock without affecting its state
- *
- *  \param lock  Pointer to previously created lock.
- */
-TMPI_EXPORT
-int tMPI_Lock_islocked(tMPI_Lock_t *lock);
-
-#endif /* TMPI_FASTLOCK_H_ */
diff --git a/src/include/gromacs/external/thread_mpi/include/thread_mpi/mpi_bindings.h b/src/include/gromacs/external/thread_mpi/include/thread_mpi/mpi_bindings.h
deleted file mode 100644 (file)
index b663342..0000000
+++ /dev/null
@@ -1,255 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Written by Sander Pronk, Erik Lindahl, and possibly others.
-
-   Copyright (c) 2009, Sander Pronk, Erik Lindahl.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-#ifndef TMPI_MPI_BINDINGS_H_
-#define TMPI_MPI_BINDINGS_H_
-
-#include "tmpi.h"
-
-/** \file
-   \brief MPI bindings for thread_mpi/tmpi.h
-
-   This file contains only macros and redefinitions to expose the standard
-   MPI API with thread_mpi calls.
-
-   This is different from the API exposed through thread_mpi/tmpi.h, which
-   uses names like \a tMPI_Send() instead of \a MPI_Send()
-
-   \sa thread_mpi/tmpi.h for documentation of the available data types and
-      functions
-   \sa http://www.mpi-forum.org/docs/docs.html for MPI documentation.
- */
-
-#ifndef DOXYGEN
-
-/* The MPI_Comm structure contains the group of processes to communicate
-   with (defines the scope for global operations such as broadcast) */
-typedef struct tmpi_comm_ *MPI_Comm;
-/* The group part of the MPI-Comm structure */
-typedef struct tmpi_group_ *MPI_Group;
-/* Request structure for holding data about non-blocking transfers */
-typedef struct tmpi_req_ *MPI_Request;
-/* status of receives */
-typedef struct tmpi_status_ MPI_Status;
-/* data types */
-typedef struct tmpi_datatype_ *MPI_Datatype;
-/* reduce operations */
-typedef tMPI_Op MPI_Op;
-
-
-#define MPI_C_BOOL              TMPI_C_BOOL
-#define MPI_CHAR                TMPI_CHAR
-#define MPI_SHORT               TMPI_SHORT
-#define MPI_INT                 TMPI_INT
-#define MPI_LONG                TMPI_LONG
-#define MPI_LONG_LONG           TMPI_LONG_LONG
-#define MPI_LONG_LONG_INT       TMPI_LONG_LONG_INT
-#define MPI_SIGNED_CHAR         TMPI_SIGNED_CHAR
-#define MPI_UNSIGNED_CHAR       TMPI_UNSIGNED_CHAR
-#define MPI_UNSIGNED_SHORT      TMPI_UNSIGNED_SHORT
-#define MPI_UNSIGNED            TMPI_UNSIGNED
-#define MPI_UNSIGNED_LONG_LONG  TMPI_UNSIGNED_LONG_LONG
-#define MPI_FLOAT               TMPI_FLOAT
-#define MPI_DOUBLE              TMPI_DOUBLE
-#define MPI_LONG_DOUBLE         TMPI_LONG_DOUBLE
-#define MPI_WCHAR               TMPI_WCHAR
-#define MPI_BYTE                TMPI_BYTE
-#define MPI_INT64_T             TMPI_INT64_T
-
-
-#define MPI_SUCCESS                 TMPI_SUCCESS
-#define MPI_ERR_MALLOC              TMPI_ERR_MALLOC
-#define MPI_ERR_INIT                TMPI_ERR_INIT
-#define MPI_ERR_FINALIZE            TMPI_ERR_FINALIZE
-#define MPI_ERR_GROUP               TMPI_ERR_GROUP
-#define MPI_ERR_COMM                TMPI_ERR_COMM
-#define MPI_ERR_STATUS              TMPI_ERR_STATUS
-#define MPI_ERR_GROUP_RANK          TMPI_ERR_GROUP_RANK
-#define MPI_ERR_DIMS                TMPI_ERR_DIMS
-#define MPI_ERR_COORDS              TMPI_ERR_COORDS
-#define MPI_ERR_CART_CREATE_NPROCS  TMPI_ERR_CART_CREATE_NPROCS
-#define MPI_ERR_XFER_COUNTERPART    TMPI_ERR_XFER_COUNTERPART
-#define MPI_ERR_XFER_BUFSIZE        TMPI_ERR_XFER_BUFSIZE
-#define MPI_ERR_XFER_BUF_OVERLAP    TMPI_ERR_XFER_BUF_OVERLAP
-#define MPI_ERR_SEND_DEST           TMPI_ERR_SEND_DEST
-#define MPI_ERR_RECV_SRC            TMPI_ERR_RECV_SRC
-#define MPI_ERR_BUF                 TMPI_ERR_BUF
-#define MPI_ERR_MULTI_MISMATCH      TMPI_ERR_MULTI_MISMATCH
-#define MPI_ERR_OP_FN               TMPI_ERR_OP_FN
-#define MPI_ERR_ENVELOPES           TMPI_ERR_ENVELOPES
-#define MPI_ERR_REQUESTS            TMPI_ERR_REQUESTS
-#define MPI_ERR_IN_STATUS           TMPI_ERR_IN_STATUS
-#define MPI_FAILURE                 TMPI_FAILURE
-#define MPI_ERR_UNKNOWN             TMPI_ERR_UNKNOWN
-#define N_MPI_ERR                   N_TMPI_ERR
-
-#define MPI_MAX_ERROR_STRING        TMPI_MAX_ERROR_STRING
-#define MPI_UNDEFINED               TMPI_UNDEFINED
-
-
-#define MPI_Errhandler_fn           tMPI_Errhandler_fn
-#define MPI_Errhandler              tMPI_Errhandler
-#define MPI_ERRORS_ARE_FATAL        TMPI_ERRORS_ARE_FATAL
-#define MPI_ERRORS_RETURN           TMPI_ERRORS_RETURN
-
-
-
-/* miscelaneous defines */
-#define MPI_ANY_SOURCE          TMPI_ANY_SOURCE
-#define MPI_ANY_TAG             TMPI_ANY_TAG
-
-/* comm_compare defines */
-#define MPI_IDENT               TMPI_IDENT
-#define MPI_CONGRUENT           TMPI_CONGRUENT
-#define MPI_SIMILAR             TMPI_SIMILAR
-#define MPI_UNEQUAL             TMPI_UNEQUAL
-
-
-/* topology test defines */
-#define MPI_CART                TMPI_CART
-#define MPI_GRAPH               TMPI_GRAPH
-
-
-#define MPI_COMM_WORLD          TMPI_COMM_WORLD
-#define MPI_COMM_NULL           TMPI_COMM_NULL
-
-
-#define MPI_GROUP_NULL          TMPI_GROUP_NULL
-#define MPI_GROUP_EMPTY         TMPI_GROUP_EMPTY
-
-#define MPI_MAX_PROCESSOR_NAME  TMPI_MAX_PROCESSOR_NAME
-
-
-/* MPI status */
-#define MPI_STATUS_IGNORE       TMPI_STATUS_IGNORE
-#define MPI_STATUSES_IGNORE     TMPI_STATUSES_IGNORE
-
-#define MPI_SOURCE              TMPI_SOURCE
-#define MPI_TAG                 TMPI_TAG
-#define MPI_ERROR               TMPI_ERROR
-
-#define mpi_status_             tmpi_status_
-
-#define MPI_REQUEST_NULL        TMPI_REQUEST_NULL
-
-#define MPI_IN_PLACE            TMPI_IN_PLACE
-
-
-
-#define MPI_MAX          TMPI_MAX
-#define MPI_MIN          TMPI_MIN
-#define MPI_SUM          TMPI_SUM
-#define MPI_PROD         TMPI_PROD
-#define MPI_LAND         TMPI_LAND
-#define MPI_BAND         TMPI_BAND
-#define MPI_LOR          TMPI_LOR
-#define MPI_BOR          TMPI_BOR
-#define MPI_LXOR         TMPI_LXOR
-#define MPI_BXOR         TMPI_BXOR
-
-/* the functions: */
-#define MPI_Init                    tMPI_Init
-#define MPI_Finalize                tMPI_Finalize
-#define MPI_Abort                   tMPI_Abort
-#define MPI_Initialized             tMPI_Initialized
-#define MPI_Finalized               tMPI_Finalized
-
-#define MPI_Create_errhandler       tMPI_Create_errhandler
-#define MPI_Errhandler_free         tMPI_Errhandler_free
-#define MPI_Comm_set_errhandler     tMPI_Comm_set_errhandler
-#define MPI_Comm_get_errhandler     tMPI_Comm_get_errhandler
-#define MPI_Error_string            tMPI_Error_string
-
-#define MPI_Get_processor_name      tMPI_Get_processor_name
-#define MPI_Wtime                   tMPI_Wtime
-
-#define MPI_Group_size              tMPI_Group_size
-#define MPI_Group_rank              tMPI_Group_rank
-#define MPI_Group_incl              tMPI_Group_incl
-#define MPI_Comm_group              tMPI_Comm_group
-#define MPI_Group_free              tMPI_Group_free
-
-#define MPI_Comm_size               tMPI_Comm_size
-#define MPI_Comm_rank               tMPI_Comm_rank
-#define MPI_Comm_compare            tMPI_Comm_compare
-#define MPI_Comm_free               tMPI_Comm_free
-#define MPI_Comm_create             tMPI_Comm_create
-#define MPI_Comm_split              tMPI_Comm_split
-#define MPI_Comm_dup                tMPI_Comm_dup
-
-#define MPI_Topo_test               tMPI_Topo_test
-#define MPI_Cartdim_get             tMPI_Cartdim_get
-#define MPI_Cart_get                tMPI_Cart_get
-#define MPI_Cart_rank               tMPI_Cart_rank
-#define MPI_Cart_coords             tMPI_Cart_coords
-#define MPI_Cart_map                tMPI_Cart_map
-#define MPI_Cart_create             tMPI_Cart_create
-#define MPI_Cart_sub                tMPI_Cart_sub
-
-#define MPI_Type_contiguous         tMPI_Type_contiguous
-#define MPI_Type_commit             tMPI_Type_commit
-
-#define MPI_Send                    tMPI_Send
-#define MPI_Recv                    tMPI_Recv
-#define MPI_Sendrecv                tMPI_Sendrecv
-#define MPI_Get_count               tMPI_Get_count
-
-#define MPI_Isend                   tMPI_Isend
-#define MPI_Irecv                   tMPI_Irecv
-#define MPI_Test                    tMPI_Test
-#define MPI_Wait                    tMPI_Wait
-#define MPI_Waitall                 tMPI_Waitall
-
-#define MPI_Barrier                 tMPI_Barrier
-
-#define MPI_Bcast                   tMPI_Bcast
-
-#define MPI_Gather                  tMPI_Gather
-#define MPI_Gatherv                 tMPI_Gatherv
-#define MPI_Scatter                 tMPI_Scatter
-#define MPI_Scatterv                tMPI_Scatterv
-#define MPI_Alltoall                tMPI_Alltoall
-#define MPI_Alltoallv               tMPI_Alltoallv
-
-
-#define MPI_Reduce                  tMPI_Reduce
-#define MPI_Allreduce               tMPI_Allreduce
-#define MPI_Scan                    tMPI_Scan
-
-#endif /* DOXYGEN */
-
-#endif /* TMPI_MPI_BINDINGS_H_ */
diff --git a/src/include/gromacs/external/thread_mpi/include/thread_mpi/numa_malloc.h b/src/include/gromacs/external/thread_mpi/include/thread_mpi/numa_malloc.h
deleted file mode 100644 (file)
index 7b50653..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Written by Sander Pronk, Erik Lindahl, and possibly others.
-
-   Copyright (c) 2009, Sander Pronk, Erik Lindahl.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-
-#ifndef TMPI_NUMA_MALLOC_H_
-#define TMPI_NUMA_MALLOC_H_
-
-/*! \file
-
-    \brief NUMA aware memory allocators.
-
-    This file provides a NUMA aware version of malloc() and friends to
-    force local allocation, preventing expensive 'remote' memory access.
-
-    Note that memory allocated with tMPI_Malloc_local(), etc. MUST be
-    freed with tMPI_Free_numa().
-
-    Currently this is only implemented on Windows. Check for the presence
-    of these functions with
-    \code
-   #ifdef TMPI_NUMA_MALLOC
-    ....
-   #endif
-    \endcode
- */
-
-
-#include "visibility.h"
-
-
-#if (defined(WIN32) || defined( _WIN32 ) || defined(WIN64) || defined( _WIN64 )) && !defined (__CYGWIN__) && !defined (__CYGWIN32__)
-
-#define TMPI_NUMA_MALLOC
-
-#endif
-
-
-/*! \brief Allocate local memory by size in bytes.
-
-    \see malloc()
-
-    \param[in] size  = size in units of sizeof() of the memory to be allocated
-
-    \return Pointer to allocated memory, or NULL in case of failure
- */
-TMPI_EXPORT
-void *tMPI_Malloc_local(size_t size);
-
-
-/*! \brief Allocate local memory by array and element size.
-
-    \see calloc()
-
-    \param[in] nmemb  = number of array members
-    \param[in] size  = size in units of sizeof() of a single array element
-
-    \return Pointer to allocated memory, or NULL in case of failure
- */
-TMPI_EXPORT
-void *tMPI_Calloc_local(size_t nmemb, size_t size);
-
-
-/*! \brief Re-allocate to local memory.
-
-    \see realloc()
-
-    \param[in] ptr   = input pointer of originally allocated memory (can
-                        be allocated with NUMA or non-NUMA malloc())
-    \param[in] size  = new size in units of sizeof().
-
-    \return Pointer to allocated memory, or NULL in case of failure
- */
-TMPI_EXPORT
-void *tMPI_Realloc_local(void *ptr, size_t size);
-
-
-/*! \brief Free memory allocate with any of the NUMA-aware allocators
-
-    \see calloc()
-
-    \param[in] ptr = pointer to block of memory allocated with a NUMA allocator
-
-    \return Returns debug info: 0 if the memory was allocated with a NUMA
-            allocator, 1 if it was allocated by another allocator.
- */
-TMPI_EXPORT
-int tMPI_Free_numa(void *ptr);
-
-#endif /* TMPI_NUMA_MALLOC_H_ */
diff --git a/src/include/gromacs/external/thread_mpi/include/thread_mpi/threads.h b/src/include/gromacs/external/thread_mpi/include/thread_mpi/threads.h
deleted file mode 100644 (file)
index 11a459e..0000000
+++ /dev/null
@@ -1,676 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Written by Sander Pronk, Erik Lindahl, and possibly others.
-
-   Copyright (c) 2009, Sander Pronk, Erik Lindahl.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-
-#ifndef TMPI_THREADS_H_
-#define TMPI_THREADS_H_
-
-/*! \file threads.h
- *
- *  \brief Platform-independent multithreading support.
- *
- *  This file provides an portable thread interface very similar to POSIX
- *  threads, as a thin wrapper around the threads provided operating system
- *  (whether they be POSIX threads or something else).
- *
- *  In other words, while the naming conventions are very similar to
- *  pthreads, you should NOT assume that a thread_mpi thread type
- *  (thread,mutex,key, etc) is the same as the Pthreads equivalent,
- *  even on platforms where we are using pthreads.
- *
- *  Because the synchronization functions here are similar to the basic
- *  mutexes/conditions/barriers provided by the operating system,
- *  performance will most likely be worse than when using the atomic
- *  synchronization functions of atomic.h. On the other hand, because the
- *  operating system can schedule out waiting threads using these functions,
- *  they are the appropriate ones for I/O and initialization.
- *
- *  Since this module is merely intended to be a transparent wrapper around
- *  a system-dependent thread implementation, we simply echo errors to stderr.
- *  The user should check the return codes\] and take appropriate action
- *  when using these functions (fat chance, but errors are rare).
- */
-
-
-
-#include <stdio.h>
-
-#include "visibility.h"
-#include "atomic.h"
-
-
-/*! \brief Thread ID: abstract tMPI_Thread type
- *
- *  The contents of this structure depends on the actual threads
- *  implementation used.
- */
-typedef struct tMPI_Thread* tMPI_Thread_t;
-
-
-
-/*! \brief Opaque mutex datatype
- *
- *  This type is only defined in the header to enable static
- *  initialization with TMPI_THREAD_MUTEX_INITIALIZER.
- *  You should _never_ touch the contents or create a variable
- *  with automatic storage class without calling tMPI_Thread_mutex_init().
- */
-typedef struct
-{
-    tMPI_Atomic_t      initialized; /*!< Whether \a mutex has been
-                                       initialized. */
-    struct tMPI_Mutex* mutex;       /*!< Actual mutex data structure. */
-}  tMPI_Thread_mutex_t;
-/*! \brief Static initializer for tMPI_Thread_mutex_t
- *
- *  See the description of the tMPI_Thread_mutex_t datatype for instructions
- *  on how to use this. Note that any variables initialized with this value
- *  MUST have static storage allocation.
- */
-#define TMPI_THREAD_MUTEX_INITIALIZER { {0}, NULL }
-
-
-
-
-
-/*! \brief Pthread implementation of the abstract tMPI_Thread_key type
- *
- *  The contents of this structure depends on the actual threads
- *  implementation used.
- */
-typedef struct
-{
-    tMPI_Atomic_t           initialized; /*!< Whether \a key has been
-                                            initialized. */
-    struct tMPI_Thread_key *key;         /*!< Actual key data structure. */
-} tMPI_Thread_key_t;
-
-
-
-
-
-/*! \brief One-time initialization data for thread
- *
- *  This is an opaque datatype which is necessary for tMPI_Thread_once(),
- *  but since it needs to be initialized statically it must be defined
- *  in the header. You will be sorry if you touch the contents.
- *  Variables of this type should always be initialized statically to
- *  TMPI_THREAD_ONCE_INIT.
- *
- *  This type is used as control data for single-time initialization.
- *  The most common example is a mutex at file scope used when calling
- *  a non-threadsafe function, e.g. the FFTW initialization routines.
- *
- */
-typedef struct
-{
-    tMPI_Atomic_t once; /*!< Whether the operation has been performed. */
-} tMPI_Thread_once_t;
-/*! \brief Static initializer for tMPI_Thread_once_t
- *
- *  See the description of the tMPI_Thread_once_t datatype for instructions
- *  on how to use this. Normally, all variables of that type should be
- *  initialized statically to this value.
- */
-#define TMPI_THREAD_ONCE_INIT { {0} }
-
-
-
-
-/*! \brief Condition variable handle for threads
- *
- *  Condition variables are useful for synchronization together
- *  with a mutex: Lock the mutex and check if our thread is the last
- *  to the barrier. If no, wait for the condition to be signaled.
- *  If yes, reset whatever data you want and then signal the condition.
- *
- *  This should be considered an opaque structure, but since it is sometimes
- *  useful to initialize it statically it must go in the header.
- *  You will be sorry if you touch the contents.
- *
- *  There are two alternatives: Either initialize it as a static variable
- *  with TMPI_THREAD_COND_INITIALIZER, or call tMPI_Thread_cond_init()
- *  before using it.
- */
-typedef struct
-{
-    tMPI_Atomic_t            initialized; /*!< Whether \a condp has been
-                                             initialized. */
-    struct tMPI_Thread_cond* condp;       /*!< Actual condition variable data
-                                             structure. */
-} tMPI_Thread_cond_t;
-/*! \brief Static initializer for tMPI_Thread_cond_t
- *
- *  See the description of the tMPI_Thread_cond_t datatype for instructions
- *  on how to use this. Note that any variables initialized with this value
- *  MUST have static storage allocation.
- */
-#define TMPI_THREAD_COND_INITIALIZER { {0}, NULL}
-
-
-
-
-
-
-/*! \brief Pthread implementation of barrier type.
- *
- *  The contents of this structure depends on the actual threads
- *  implementation used.
- */
-typedef struct
-{
-    tMPI_Atomic_t               initialized; /*!< Whether \a barrierp has been initialized. */
-    struct tMPI_Thread_barrier* barrierp;    /*!< Actual barrier data structure. */
-    volatile int                threshold;   /*!< Total number of members in barrier     */
-    volatile int                count;       /*!< Remaining count before completion      */
-    volatile int                cycle;       /*!< Alternating 0/1 to indicate round      */
-}tMPI_Thread_barrier_t;
-/*! \brief Static initializer for tMPI_Thread_barrier_t
- *
- *  See the description of the tMPI_Thread_barrier_t datatype for instructions
- *  on how to use this. Note that variables initialized with this value
- *  MUST have static storage allocation.
- *
- * \param count  Threshold for barrier
- */
-#define TMPI_THREAD_BARRIER_INITIALIZER(count)   { \
-        NULL, count, count, 0 \
-}
-
-
-
-
-
-
-/** Thread support status enumeration */
-enum tMPI_Thread_support
-{
-    TMPI_THREAD_SUPPORT_NO  = 0, /*!< Starting threads will fail */
-    TMPI_THREAD_SUPPORT_YES = 1  /*!< Thread support available   */
-};
-
-
-/** Thread setaffinity support status enumeration */
-enum tMPI_Thread_setaffinity_support
-{
-    TMPI_SETAFFINITY_SUPPORT_NO  = 0, /*!< Setting thread affinity not
-                                           supported */
-    TMPI_SETAFFINITY_SUPPORT_YES = 1  /*!< Setting thread affinity supported */
-};
-
-
-
-
-/** handle a fatal error.
-
-   \param file     source code file name of error.
-   \param line     source code line number of error.
-   \param message  format string for error message.
- */
-TMPI_EXPORT
-void tMPI_Fatal_error(const char *file, int line, const char *message, ...);
-/** Convenience macro for the first two arguments to tMPI_Fatal_error(). */
-#define TMPI_FARGS __FILE__, __LINE__
-
-
-
-/*! \name Thread creation, destruction, and inspection
- \{ */
-/** Check if threads are supported
- *
- *  This routine provides a cleaner way to check if threads are supported
- *  instead of sprinkling your code with preprocessor conditionals.
- *
- *  All thread functions are still available even without thread support,
- *  but some of them might return failure error codes, for instance if you try
- *  to start a thread.
- *
- *  \return 1 if threads are supported, 0 if not.
- */
-TMPI_EXPORT
-enum tMPI_Thread_support tMPI_Thread_support(void);
-
-
-/** Get the number of hardware threads that can be run simultaneously.
-
-    Returns the total number of cores and SMT threads that can run.
-
-    \returns The maximum number of threads that can run simulataneously.
-        If this number cannot be determined for the current architecture,
-        0 is returned.
- */
-TMPI_EXPORT
-int tMPI_Thread_get_hw_number(void);
-
-
-/** Create a new thread
- *
- *  The new thread will call start_routine() with the argument arg.
- *
- *  Please be careful not to change arg after calling this function.
- *
- *  \param[out] thread          Pointer to thread ID
- *  \param[in] start_routine    The function to call in the new thread
- *  \param[in] arg              Argument to call with
- *
- *  \return Status - 0 on success, or an error code.
- */
-TMPI_EXPORT
-int tMPI_Thread_create(tMPI_Thread_t *thread,
-                       void           * (*start_routine)(void *),
-                       void         * arg);
-
-
-
-
-/** Wait for a specific thread to finish executing
- *
- *  If the thread has already finished the routine returns immediately.
- *
- *  \param[in] thread       Pointer to thread ID
- *  \param[out] value_ptr   Pointer to location where to store pointer to
- *                          exit value from threads that called
- *                          tMPI_Thread_exit().
- *
- *  \return 0 if the join went ok, or a non-zero error code.
- */
-TMPI_EXPORT
-int tMPI_Thread_join(tMPI_Thread_t thread, void **value_ptr);
-
-
-/** Terminate calling thread
- *
- *  Die voluntarily.
- *
- *  \param value_ptr   Pointer to a return value. Threads waiting for us to
- *                     join them can read this value if they try.
- *  \return
- */
-TMPI_EXPORT
-void tMPI_Thread_exit(void *value_ptr);
-
-
-
-/** Ask a thread to exit
- *
- *  This routine tries to end the execution of another thread, but there are
- *  no guarantees it will succeed.
- *
- *  \param thread     Handle to thread we want to see dead.
- *  \return 0 or a non-zero error message.
- */
-TMPI_EXPORT
-int tMPI_Thread_cancel(tMPI_Thread_t thread);
-
-
-
-
-/** Get a thread ID of the calling thread.
- *
- * This function also works on threads not started with tMPI_Thread_create,
- * or any other function in thread_mpi. This makes it possible to, for
- * example assign thread affinities to any thread.
- *
- * \return A thread ID of the calling thread */
-TMPI_EXPORT
-tMPI_Thread_t tMPI_Thread_self(void);
-
-
-
-/** Check whether two thread pointers point to the same thread
- *
- * \param[in]  t1  Thread ID 1
- * \param[in]  t2  Thread ID 2
- * \return non-zero if the thread structs refer to the same thread,
-            0 if the threads are different*/
-TMPI_EXPORT
-int tMPI_Thread_equal(tMPI_Thread_t t1, tMPI_Thread_t t2);
-
-
-/** Check whether this platform supports setting of thread affinity
- *
- * This function returns TMPI_SETAFFINITY_SUPPORT_YES if setting thread
- * affinity is supported by the platform, and TMPI_SETAFFINITY_SUPPORT_NO
- * if not. If this function returns 0, the function
- * tMPI_Thread_setaffinity_single will simply return 0 itself, effectively
- * ignoring the request.
- *
- * \return TMPI_SETAFFINITY_SUPPORT_YES if setting affinity is supported,
-            TMPI_SETAFFINITY_SUPPORT_NO otherwise */
-TMPI_EXPORT
-enum tMPI_Thread_setaffinity_support tMPI_Thread_setaffinity_support(void);
-
-
-/** Set thread affinity to a single core
- *
- * This function sets the thread affinity of a thread to a a specific
- * numbered processor. This only works if the underlying operating system
- * supports it. The processor number must be between 0 and the number returned
- * by tMPI_Thread_get_hw_number().
- *
- * \param[in] thread   Thread ID of the thread to set affinity for
- * \param[in] nr       Processor number to set affinity to
- * \return zero on success, non-zero on error */
-TMPI_EXPORT
-int tMPI_Thread_setaffinity_single(tMPI_Thread_t thread, unsigned int nr);
-
-
-/*! \} */
-/*! \name Mutexes
- \{ */
-
-
-/** Initialize a new mutex
- *
- *  This routine must be called before using any mutex not initialized
- *  with static storage class and TMPI_THREAD_MUTEX_INITIALIZER.
- *
- *  \param mtx   Pointer to a mutex opaque type.
- *  \return      0 or an error code.
- */
-TMPI_EXPORT
-int tMPI_Thread_mutex_init(tMPI_Thread_mutex_t *mtx);
-
-
-
-
-/** Kill a mutex you no longer need
- *
- *  Note that this call only frees resources allocated inside the mutex. It
- *  does not free the tMPI_Thread_mutex_t memory area itself if you created it
- *  with dynamic memory allocation.
- *
- *  \param mtx  Pointer to a mutex variable to get rid of.
- *  \return 0 or a non-zero error code.
- */
-TMPI_EXPORT
-int tMPI_Thread_mutex_destroy(tMPI_Thread_mutex_t *mtx);
-
-
-
-
-/** Wait for exclusive access to a mutex
- *
- *  This routine does not return until the mutex has been acquired.
- *
- *  \param mtx  Pointer to the mutex to lock
- *  \return 0 or a non-zero error code.
- */
-TMPI_EXPORT
-int tMPI_Thread_mutex_lock(tMPI_Thread_mutex_t *mtx);
-
-
-
-
-/** Try to lock a mutex, return if busy
- *
- *  This routine always returns directly.
- *
- *  \param mtx  Pointer to the mutex to try and lock
- *  \return If the mutex was available and we successfully locked it,
- *     we return 0. If the mutex was unavailable because it was
- *     already locked by another thread, we return non-zero. If the
- *     mutex was already held by this thread, the return value is
- *     implementation-defined (pthreads non-zero, winthreads zero).
- */
-TMPI_EXPORT
-int tMPI_Thread_mutex_trylock(tMPI_Thread_mutex_t *mtx);
-
-
-
-
-/** Release the exclusive access to a mutex
- *
- *  \param mtx  Pointer to the mutex to release
- *  \return 0 or a non-zero error code.
- */
-TMPI_EXPORT
-int tMPI_Thread_mutex_unlock(tMPI_Thread_mutex_t *mtx);
-
-
-
-/*! \} */
-/*! \name Thread-specific storage
- \{ */
-
-
-/** Initialize thread-specific-storage handle
- *
- *  The tMPI_Thread_key_t handle must always be initialized dynamically with
- *  this routine. If you need to initialize it statically in a file, use the
- *  tMPI_Thread_once() routine and corresponding data to initialize the
- *  thread-specific-storage key the first time you access it.
- *
- *  \param  key          Pointer to opaque thread key type.
- *  \param  destructor   Routine to call (to free memory of key) when we quit
- *
- *  \return status - 0 on sucess or a standard error code.
- *
- */
-TMPI_EXPORT
-int tMPI_Thread_key_create(tMPI_Thread_key_t *key, void (*destructor)(void *));
-
-
-
-
-/** Delete thread-specific-storage handle
- *
- *  Calling this routine will kill the handle, and invoke the automatic
- *  destructor routine for each non-NULL value pointed to by key.
- *
- *  \param  key  Opaque key type to destroy
- *  \return 0 or a non-zero error message.
- */
-TMPI_EXPORT
-int tMPI_Thread_key_delete(tMPI_Thread_key_t key);
-
-
-
-
-/** Get value for thread-specific-storage in this thread
- *
- *  If it has not yet been set, NULL is returned.
- *
- *  \param key   Thread-specific-storage handle.
- *  \return Pointer-to-void, the value of the data in this thread.
- */
-TMPI_EXPORT
-void * tMPI_Thread_getspecific(tMPI_Thread_key_t key);
-
-
-
-/** Set value for thread-specific-storage in this thread
- *
- *  \param key     Thread-specific-storage handle.
- *  \param value   What to set the data to (pointer-to-void).
- *  \return 0 or a non-zero error message.
- */
-TMPI_EXPORT
-int tMPI_Thread_setspecific(tMPI_Thread_key_t key, void *value);
-
-
-/*! \} */
-/*! \name Run-once
- \{ */
-
-
-/** Run the provided routine exactly once
- *
- *  The control data must have been initialized before calling this routine,
- *  but you can do it with the static initialzer TMPI_THREAD_ONCE_INIT.
- *
- *  tMPI_Thread_once() will not return to any of the calling routines until
- *  the initialization function has been completed.
- *
- *  \param once_data     Initialized one-time execution data
- *  \param init_routine  Function to call exactly once
- *  \return 0 or a non-zero error message.
- */
-TMPI_EXPORT
-int tMPI_Thread_once(tMPI_Thread_once_t *once_data,
-                     void                (*init_routine)(void));
-
-
-/*! \} */
-/*! \name Condition variables
- \{ */
-
-/** Initialize condition variable
- *
- *  This routine must be called before using any condition variable
- *  not initialized with static storage class and TMPI_THREAD_COND_INITIALIZER.
- *
- *  \param cond  Pointer to previously allocated condition variable
- *  \return      0 or a non-zero error message.
- */
-TMPI_EXPORT
-int tMPI_Thread_cond_init(tMPI_Thread_cond_t *cond);
-
-
-
-/** Destroy condition variable
- *
- *  This routine should be called when you are done with a condition variable.
- *  Note that it only releases memory allocated internally, not the
- *  tMPI_Thread_cond_t structure you provide a pointer to.
- *
- *  \param cond Pointer to condition variable.
- *  \return 0 or a non-zero error message.
- */
-TMPI_EXPORT
-int tMPI_Thread_cond_destroy(tMPI_Thread_cond_t *cond);
-
-
-
-/** Wait for a condition to be signaled
- *
- *  This routine releases the mutex, and waits for the condition to be
- *  signaled by another thread before it returns.
- *
- *  Note that threads waiting for conditions with tMPI_Thread_cond_wait
- *  may be subject to spurious wakeups: use this function in a while loop
- *  and check the state of a predicate associated with the wakeup
- *  before leaving the loop.
- *
- * \param cond  condition variable
- *  \param mtx  Mutex protecting the condition variable
- *
- *  \return 0 or a non-zero error message.
- */
-TMPI_EXPORT
-int tMPI_Thread_cond_wait(tMPI_Thread_cond_t  *cond,
-                          tMPI_Thread_mutex_t *mtx);
-
-
-
-
-/** Unblock one waiting thread
- *
- *  This routine signals a condition variable to one
- *  thread (if any) waiting for it after calling
- *  tMPI_Thread_cond_wait().
- *
- * \param cond  condition variable
- *
- *  \return 0 or a non-zero error message.
- */
-TMPI_EXPORT
-int tMPI_Thread_cond_signal(tMPI_Thread_cond_t *cond);
-
-
-/** Unblock all waiting threads
- *
- *  This routine signals a condition variable to all
- *  (if any) threads that are waiting for it after calling
- *  tMPI_Thread_cond_wait().
- *
- * \param cond  condition variable
- *
- *  \return 0 or a non-zero error message.
- */
-TMPI_EXPORT
-int tMPI_Thread_cond_broadcast(tMPI_Thread_cond_t *cond);
-
-
-
-/*! \} */
-/*! \name Barriers
- \{ */
-
-
-/** Initialize a synchronization barrier type
- *
- *  You only need to initialize a barrier once. They cycle
- *  automatically, so after release it is immediately ready
- *  to accept waiting threads again.
- *
- *  \param barrier  Pointer to previously allocated barrier type
- *  \param count    Number of threads to synchronize. All threads
- *                  will be released after \a count calls to
- *                  tMPI_Thread_barrier_wait().
- */
-TMPI_EXPORT
-int tMPI_Thread_barrier_init(tMPI_Thread_barrier_t *barrier, int count);
-
-
-
-/** Release data in a barrier datatype
- *
- *  \param barrier  Pointer to previously
- *                  initialized barrier.
- */
-TMPI_EXPORT
-int tMPI_Thread_barrier_destroy(tMPI_Thread_barrier_t *barrier);
-
-
-/** Perform barrier synchronization
- *
- *  This routine blocks until it has been called N times,
- *  where N is the count value the barrier was initialized with.
- *  After N total calls all threads return. The barrier automatically
- *  cycles, and thus requires another N calls to unblock another time.
- *
- *  \param barrier  Pointer to previously create barrier.
- *
- *  \return The last thread returns -1, all the others 0.
- */
-TMPI_EXPORT
-int tMPI_Thread_barrier_wait(tMPI_Thread_barrier_t *barrier);
-
-/*! \} */
-
-#endif /* TMPI_THREADS_H_ */
diff --git a/src/include/gromacs/external/thread_mpi/include/thread_mpi/tmpi.h b/src/include/gromacs/external/thread_mpi/include/thread_mpi/tmpi.h
deleted file mode 100644 (file)
index b4371da..0000000
+++ /dev/null
@@ -1,1389 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Written by Sander Pronk, Erik Lindahl, and possibly others.
-
-   Copyright (c) 2009,2016,2018,2019, Sander Pronk, Erik Lindahl.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-#ifndef TMPI_TMPI_H_
-#define TMPI_TMPI_H_
-
-/** \file
- *
- * \brief Partial implementation of MPI using only threads.
- *
- * See the MPI specification at
- * http://www.mpi-forum.org/docs/docs.html
- * for an explanation of what these functions do.
- *
- * Because this is a thread-based library, be very careful with global
- * variables and static variables in functions: they will be shared across
- * all threads and lead to conflicts if not properly mutex-ed or barrier-ed
- * out.
- *
- * \sa http://www.mpi-forum.org/docs/docs.html for MPI documentation.
- */
-
-
-/* for size_t, include stddef.h - which is in C89. This is done
-   regardless of whether we're compiling C++ or C code because the base
-   library for this is in C. */
-#include <stddef.h>
-
-#include "visibility.h"
-
-/** tMPI definition.
-
-   Use this to check for thread_mpi with the preprocessor. */
-#define TMPI
-
-
-/** tMPI initialization thread affinity strategy.
-
-    Used in the tMPI_Init_affinity() and  tMPI_Init_fn_affinity() functions,
-    to control how affinity is set. The default tMPI_Init() and tMPI_Init_fn()
-    functions use the TMPI_AFFINITY_ALL_CORES strategy.
-
-    These strategies are fairly basic. For more flexibility, use the
-    tMPI_Set_affinity() function.*/
-typedef enum
-{
-    TMPI_AFFINITY_NONE = 0,     /**< Do not set any thread affinity */
-    TMPI_AFFINITY_ALL_CORES,    /**< Only set affinity if the number of threads
-                                     is equal to the number of hardware threads
-                                     (cores + hyperthreads). This is the only
-                                     safe way to set thread affinity,
-                                     without clashes between multiple
-                                     instances of the same program. */
-} tMPI_Affinity_strategy;
-
-
-
-/** tMPI Communicator
-
-   Holds the group of processes to communicate
-   with, and defines the scope for global operations such as broadcast. */
-typedef struct tmpi_comm_ *tMPI_Comm;
-
-/** tMPI Group
-
-   The group structure. Contains a list of threads. */
-typedef struct tmpi_group_ *tMPI_Group;
-
-/** tMPI Request
-
-   Request structure for holding data about non-blocking transfers. */
-typedef struct tmpi_req_ *tMPI_Request;
-
-
-/** tMPI datatype
-
-   tMPI data type structure. Holds info about datatypes. */
-typedef struct tmpi_datatype_ *tMPI_Datatype;
-
-
-/*! \name tMPI Data types
-    These are MPI data types as specified by the MPI standard.
-    Note that not all are available.  */
-/*! \{ */
-TMPI_EXPORT
-extern const tMPI_Datatype TMPI_C_BOOL;             /**< bool */
-TMPI_EXPORT
-extern const tMPI_Datatype TMPI_CHAR;               /**< char */
-TMPI_EXPORT
-extern const tMPI_Datatype TMPI_SHORT;              /**< short */
-TMPI_EXPORT
-extern const tMPI_Datatype TMPI_INT;                /**< int */
-TMPI_EXPORT
-extern const tMPI_Datatype TMPI_LONG;               /**< long */
-#ifdef SIZEOF_LONG_LONG_INT
-TMPI_EXPORT
-extern const tMPI_Datatype TMPI_LONG_LONG;          /**< long long */
-TMPI_EXPORT
-extern const tMPI_Datatype TMPI_LONG_LONG_INT;      /**< long long int */
-#endif
-TMPI_EXPORT
-extern const tMPI_Datatype TMPI_SIGNED_CHAR;        /**< signed char */
-TMPI_EXPORT
-extern const tMPI_Datatype TMPI_UNSIGNED_CHAR;      /**< unsigned char */
-TMPI_EXPORT
-extern const tMPI_Datatype TMPI_UNSIGNED_SHORT;     /**< unsigned short */
-TMPI_EXPORT
-extern const tMPI_Datatype TMPI_UNSIGNED;           /**< unsigned int */
-TMPI_EXPORT
-extern const tMPI_Datatype TMPI_UNSIGNED_LONG;      /**< unsigned long */
-#ifdef SIZEOF_LONG_LONG_INT
-TMPI_EXPORT
-extern const tMPI_Datatype TMPI_UNSIGNED_LONG_LONG; /**< unsigned long long */
-#endif
-TMPI_EXPORT
-extern const tMPI_Datatype TMPI_FLOAT;              /**< float */
-TMPI_EXPORT
-extern const tMPI_Datatype TMPI_DOUBLE;             /**< double */
-TMPI_EXPORT
-extern const tMPI_Datatype TMPI_LONG_DOUBLE;        /**< long double */
-/*extern tMPI_Datatype tMPI_UNSIGNED_WCHAR */
-TMPI_EXPORT
-extern const tMPI_Datatype TMPI_BYTE;               /**< byte (for binary
-                                                               xmissions) */
-TMPI_EXPORT
-extern const tMPI_Datatype TMPI_POINTER;            /**< pointer (thread_mpi
-                                                                  specific) */
-
-TMPI_EXPORT
-extern const tMPI_Datatype TMPI_INT64_T;            /**< int64_t */
-
-/*! \} */
-
-
-/** Error codes */
-enum
-{
-    TMPI_SUCCESS = 0,            /*!< No error */
-    TMPI_ERR_NO_MEM,             /*!< Out of memory */
-    TMPI_ERR_IO,                 /*!< I/O Error (used for system errors) */
-    TMPI_ERR_INIT,               /*!< Initialization error */
-    TMPI_ERR_FINALIZE,           /*!< Finalize error */
-    TMPI_ERR_GROUP,              /*!< Group error */
-    TMPI_ERR_COMM,               /*!< Comm error */
-    TMPI_ERR_STATUS,             /*!< Status error */
-    TMPI_ERR_GROUP_RANK,         /*!< Group rank error */
-    TMPI_ERR_DIMS,               /*!< Invalid topology dimensions */
-    TMPI_ERR_COORDS,             /*!< Invalid topology coordinates */
-    TMPI_ERR_CART_CREATE_NPROCS, /*!< Not enough processes for topology*/
-    TMPI_ERR_XFER_COUNTERPART,   /*!< Invalid counterpart for xfer */
-    TMPI_ERR_XFER_BUFSIZE,       /*!< buffer size too small*/
-    TMPI_ERR_XFER_BUF_OVERLAP,   /*!< buffer overlaps (thread error?)*/
-    TMPI_ERR_SEND_DEST,          /*!< Faulty send destination */
-    TMPI_ERR_RECV_SRC,           /*!< Faulty receive source */
-    TMPI_ERR_BUF,                /*!< Invalid buffer */
-    TMPI_ERR_MULTI_MISMATCH,     /*!< Comm not the same in collective call*/
-    TMPI_ERR_OP_FN,              /*!< Invalid reduce operator*/
-    TMPI_ERR_ENVELOPES,          /*!< out of envelopes (tMPI internal) */
-    TMPI_ERR_REQUESTS,           /*!< out of requests (tMPI internal) */
-    TMPI_ERR_COPY_NBUFFERS,      /*!< out of copy buffers (tMPI internal)*/
-    TMPI_ERR_COPY_BUFFER_SIZE,   /*!< copy buffer size err (tMPI internal)*/
-    TMPI_ERR_IN_STATUS,          /*!< error code in tMPI_Status */
-    TMPI_ERR_PROCNR,             /*!< Hardware processor number (such as for
-                                      thread affinity) error */
-    TMPI_FAILURE,                /*!< Transmission failure */
-    TMPI_ERR_UNKNOWN,            /*!< Unknown error */
-    N_TMPI_ERR                   /* this must be the last one */
-};
-
-/** Maximum length of error string for tMPI_Error_string() */
-#define TMPI_MAX_ERROR_STRING            256
-
-/** default code for undefined value,
-
-    For example for undefined color in tMPI_Split(). */
-#define TMPI_UNDEFINED -1
-
-/** error handler function */
-typedef void (*tMPI_Errhandler_fn)(tMPI_Comm*, int*);
-/** error handler object */
-typedef struct tmpi_errhandler_ *tMPI_Errhandler;
-
-/** pre-defined error handler that abort()s on every error */
-extern tMPI_Errhandler TMPI_ERRORS_ARE_FATAL;
-/** pre-defined error handler that tries to continue on every error */
-extern tMPI_Errhandler TMPI_ERRORS_RETURN;
-
-/*! \name tMPI_Comm_compare() return codes */
-/*! \{ */
-/** Identical comms*/
-#define TMPI_IDENT 0
-/** Comms with the same members in the same order*/
-#define TMPI_CONGRUENT 1
-/** Comms with the same members in the different order*/
-#define TMPI_SIMILAR 2
-/** Comms with the different  members */
-#define TMPI_UNEQUAL 3
-/*! \} */
-
-
-/** Source number wildcard so tMPI_Recv(), etc. can receive from
-           any source. */
-#define TMPI_ANY_SOURCE -1
-/** Tag number wildcard so tMPI_Recv(), etc. can receive messages with
-           any tag. */
-#define TMPI_ANY_TAG -1
-
-/** Return code for Cartesian topology with tMPI_Topo_test().  */
-#define TMPI_CART 1
-/** Return code for graph topology with tMPI_Topo_test().  */
-#define TMPI_GRAPH 2
-
-
-/** Pre-initialized communicator with all available threads. */
-TMPI_EXPORT
-extern tMPI_Comm TMPI_COMM_WORLD;
-
-
-/** A pre-defined NULL communicator to compare against, to check comm
-           validity */
-#define TMPI_COMM_NULL nullptr
-/** A pre-defined NULL group to compare against, to check group
-           validity */
-#define TMPI_GROUP_NULL nullptr
-
-/** the empty group */
-extern tMPI_Group TMPI_GROUP_EMPTY;
-
-
-/** The maximum processor name returned using tMPI_Get_processor_name(). */
-#define TMPI_MAX_PROCESSOR_NAME 128
-
-
-/** Used as NULL status for tMPI_Recv(), etc. */
-#define TMPI_STATUS_IGNORE NULL
-/** Used as NULL status list for tMPI_Waitall(), etc. */
-#define TMPI_STATUSES_IGNORE NULL
-
-/** tMPI Status.
-
-   Holds status info (tag, sender, amount of data transmitted) for receives.
-   The status object is user-maintained. */
-typedef struct tmpi_status_
-{
-    int    TMPI_SOURCE;     /**< Message source rank. */
-    int    TMPI_TAG;        /**< Message source tag. */
-    int    TMPI_ERROR;      /**< Message error. */
-    size_t transferred;     /**< Number of transferred bytes */
-    int    cancelled;       /**< Whether the transmission was canceled */
-} tMPI_Status;
-/*typedef struct tmpi_status_ tMPI_Status;*/
-
-/** NULL request */
-#define TMPI_REQUEST_NULL NULL
-
-/** collective communication special to signify that the send
-           buffer is to function as receive buffer.
-
-           Used, for example in tMPI_Reduce. */
-#define TMPI_IN_PLACE NULL
-
-
-/** tMPI_Reduce operators.
-
-    These all work (except obviously bad combinations like bitwise
-    and/or/xor on floats, etc): */
-typedef enum
-{
-    TMPI_MAX,       /**< calculate maximum value */
-    TMPI_MIN,       /**< calculate minimum value */
-    TMPI_SUM,       /**< calculate sum */
-    TMPI_PROD,      /**< calculate product */
-    TMPI_LAND,      /**< calculate logical and */
-    TMPI_BAND,      /**< calculate binary and */
-    TMPI_LOR,       /**< calculate logical or */
-    TMPI_BOR,       /**< calculate binary or */
-    TMPI_LXOR,      /**< calculate logical xor */
-    TMPI_BXOR       /**< calculate binary xor */
-} tMPI_Op;
-
-#ifndef DOXYGEN
-/* function to obtain tMPI_COMM_SELF */
-tMPI_Comm tMPI_Get_comm_self(void);
-#endif
-/** The thread-specific comm containing only the thread itself.
-
-    \hideinitializer
-    \return the self comm object associated with the thread. */
-#define TMPI_COMM_SELF (tMPI_Get_comm_self())
-
-
-
-
-
-
-
-/* functions: */
-
-/*! \name Initialization and exit functions
- \{ */
-/** Traditional MPI initializer; spawns threads that start at the given
-    function.
-
-    Seeks the argument '-nt n', where n is the number of
-    threads that will be created. If n==0, the number of threads will
-    be the recommended number of threads for this platform as obtained
-    from tMPI_Get_recommended_ntreads().
-
-    The new threads then run the function start_function, with the original
-    argc and argv. This function could be main(), or any other function;
-    calling this function again - whether from the started threads or from
-    the main thread - has no effect.
-
-    On platforms that support thread affinity setting, this function will
-    use the 'all-cores' affinity strategy: it will only set thread affinity
-    if the number of threads is equal to the number of hardware threads
-    (cores + hyperthreads).
-
-    \param[in] argc             argc of original main() invocation, or NULL
-    \param[in] argv             argv of original main() invocation, or NULL.
-    \param[in] start_function   Starting function of type
-                                int start_function(int argc, char *argv[]);
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Init(int *argc, char ***argv,
-              int (*start_function)(int, char**));
-
-
-/** Generic init function thread MPI intializer and thread spawner.
-
-    Creates N threads (including main thread)
-    that run the function start_function, which takes a void* argument,
-    given by arg. The function start_function also gets called by the main
-    thread. When the function start_function returns it, will behave
-    as if tMPI_Finalize is called, and if it's a sub-thread it will
-    stop running.
-
-    If N==0, the number of threads will be the recommended number of
-    threads for this platform as obtained from tMPI_Get_recommended_ntreads().
-
-    Note that thread affinity strategy only has an effect when this is
-    supported by the underlying platform. As of yet (2012), this is not the
-    case for Mac OS X, for example.
-
-    \param[in]  main_thread_returns   whether the control in the main thread
-                                      should return immediately (if true), or
-                                      the start_function() should be called
-                                      from the main thread, too (if false).
-    \param[in] N                      The number of threads to start (or 0 to
-                                      automatically determine this).
-    \param[in] aff_strategy           The thread affinity strategy to use.
-    \param[in] start_function         The function to start threads at
-                                      (including main thread if
-                                      main_thread_returns).
-    \param[in] arg                    An optional argument for start_function().
-
-    \return  TMPI_FAILURE on failure, TMPI_SUCCESS on succes (after all
-             threads have finished if main_thread_returns=true).  */
-TMPI_EXPORT
-int tMPI_Init_fn(int main_thread_returns, int N,
-                 tMPI_Affinity_strategy aff_strategy,
-                 void (*start_function)(const void*), const void *arg);
-
-
-
-
-
-/** get the number of threads from the command line
-
-    can be called before tMPI_Init()
-
-    \param[in]  argc                    argc from main()
-    \param[in]  argv                    argv from main()
-    \param[in]  optname                 name of the argument specifying the
-                                        number of threads to run. If this is
-                                        NULL, this function will read the first
-                                        argument and interpret it as the number
-                                        of threads.
-    \param[out] nthreads                the number of threads
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Get_N(int *argc, char ***argv, const char *optname, int *nthreads);
-
-
-
-/** Waits for all other threads to finish and cleans up
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Finalize(void);
-
-
-/** Just kills all threads.
-
-    Not really neccesary because exit() would do that for us anyway.
-
-    \param[in] comm         Comm to kill threads for
-    \param[in] errorcode    Error code to exit with
-
-    \return Never returns. */
-TMPI_EXPORT
-int tMPI_Abort(tMPI_Comm comm, int errorcode);
-
-/** whether tMPI_Init, but not yet tMPI_Finalize, has been run
-
-    \param[out] flag     Set to TRUE if tMPI_Init() has been called,
-                         FALSE if not.
-
-    \return     always returns TMPI_SUCCESS. */
-TMPI_EXPORT
-int tMPI_Initialized(int *flag);
-
-/** Determine whether tMPI_Finalize has been run.
-
-    \param[out] flag        Set to TRUE if tMPI_Finalize() has been
-                            called, FALSE if not.
-
-    \return     always returns TMPI_SUCCESS.  */
-TMPI_EXPORT
-int tMPI_Finalized(int *flag);
-/** \} */
-
-
-
-
-
-
-
-
-
-/*! \name Error handling functions
- \{ */
-/** Create an error handler object from a function.
-
-    \param[in]  function        The function to make an error handler of.
-    \param[out] errhandler      The error handler.
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Create_errhandler(tMPI_Errhandler_fn *function,
-                           tMPI_Errhandler    *errhandler);
-
-
-/** Free the error handler object.
-
-    \param[in] errhandler       The error handler.
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Errhandler_free(tMPI_Errhandler *errhandler);
-
-/** Set the error handler.
-
-    \param[in] comm         the communicator to set the error handler for.
-    \param[in] errhandler   the error handler.
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Comm_set_errhandler(tMPI_Comm comm, tMPI_Errhandler errhandler);
-
-/** get the error handler.
-
-    Gets the error handler associated with a comm
-
-    \param[in]  comm         the communicator to get the error handler for.
-    \param[out] errhandler   the error handler.
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Comm_get_errhandler(tMPI_Comm comm, tMPI_Errhandler *errhandler);
-
-/** get the error string associated with an error code.
-
-    The length of the error string will never exceed TMPI_MAX_ERROR_STRING.
-
-    \param[in]  errorcode   The error code.
-    \param[out] string      The pre-allocated char pointer to output to.
-    \param[out] resultlen   The length of the error string. Will
-                            never be longer than TMPI_MAX_ERROR_STRING.
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Error_string(int errorcode, char *string, size_t *resultlen);
-/** \} */
-
-
-
-
-
-
-
-
-/*! \name Environment query functions
- \{ */
-/** returns string with thread number.
-
-    \param[out] name        Pre-allocated string to output name to (will not
-                            be longer than TMPI_MAX_PROCESSOR_NAME).
-    \param[out] resultlen   The length of the output. Note that this is an
-                            int instead of a size_t because the MPI standard
-                            for some reason defines all sizes as int
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Get_processor_name(char *name, int *resultlen);
-
-/** get a time value as a double, in seconds.
-
-    \return time value.
- */
-TMPI_EXPORT
-double tMPI_Wtime(void);
-/** get the resolution of tMPI_Wtime as a double, in seconds
-
-    \return time resolution. */
-TMPI_EXPORT
-double tMPI_Wtick(void);
-
-#ifndef DOXYGEN
-#define tMPI_This_threadnr() (int)(tMPI_Get_current() - threads)
-#else
-/** Get the thread number of this thread.
-    Mostly for debugging.
-
-    \return the global thread number. */
-int tMPI_This_Threadnr(void);
-#endif
-
-/** \} */
-
-
-
-
-
-
-
-
-
-/*! \name tMPI_Group functions
- \{ */
-/** Get the size (number of members) of a group.
-
-    \param[in]  group       The group.
-    \param[out] size        Size.
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Group_size(tMPI_Group group, int *size);
-
-/** Get the rank of a thread in a group
-
-    \param[in]  group       The group.
-    \param[out] rank        Variable for the rank, or TMPI_UNDEFINED
-                            if not in group.
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Group_rank(tMPI_Group group, int *rank);
-
-/** Create a new group as a the collection of threads with given ranks.
-
-    \param[in] group        The group from which the ranks are taken.
-    \param[in] n            The number of new group members.
-    \param[in] ranks        The ranks of the threads to add to the new group.
-    \param[out] newgroup    The new group.
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Group_incl(tMPI_Group group, int n, int *ranks, tMPI_Group *newgroup);
-
-/** Get a pointer to the group in the comm.
-
-    \param[in] comm         The comm from which to take the group.
-    \param[out] group       The comm's group.
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Comm_group(tMPI_Comm comm, tMPI_Group *group);
-
-/** De-allocate a group
-
-    \param[in] group        The group to de-allocate.
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Group_free(tMPI_Group *group);
-/*! \} */
-
-
-
-
-
-
-
-/*! \name tMPI_Comm functions
- \{ */
-/** Get the comm size (nr. of threads).
-
-    \param[in] comm         The comm to query.
-    \param[out] size        The comm size.
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Comm_size(tMPI_Comm comm, int *size);
-
-/** get the rank in comm of the current process
-
-    \param[in]  comm        The comm to query.
-    \param[out] rank        Thread rank in comm.
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Comm_rank(tMPI_Comm comm, int *rank);
-
-/** Compare two comms. Returns TMPI_IDENT if the two comms point to
-    the same underlying comm structure, TMPI_CONGRUENT if all
-    members appear in the both comms in the same order, TMPI_SIMILAR
-    if both comms have the smae members but not in the same order, or
-    TMPI_UNEQUAL if the comms have different members.
-
-    \param[in]  comm1        The first comm to compare.
-    \param[in]  comm2        The second comm to compare.
-    \param[out] result       The output result, one of the values
-                             described above.
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Comm_compare(tMPI_Comm comm1, tMPI_Comm comm2, int *result);
-
-
-/** De-allocate a comm
-
-    Collective function.
-
-    \param[in] comm         The comm to free.
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Comm_free(tMPI_Comm *comm);
-
-/** Create a comm based on group membership.
-
-    Collective function that creates a new comm containing only proceses
-    that are members of the given group.
-
-    \param[in]  comm        The originating comm.
-    \param[in]  group       The group of threads to create a comm from.
-    \param[out] newcomm     The new comm.
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Comm_create(tMPI_Comm comm, tMPI_Group group, tMPI_Comm *newcomm);
-
-/** Split up a group into same-colored sub-groups ordered by key.
-
-    This is the main comm creation function: it's a collective call that takes
-    a color and a key from each process, and arranges all threads that
-    call tMPI_Split() withe the same color together into a comm.
-
-    The rank in the new group will be based on the value given in key.
-
-    Passing TMPI_UNDEFINED as a color will result in the thread not being
-    part of any group, and getting TMPI_COMM_NULL back in newcomm.
-
-    \param[in]  comm        The originating comm.
-    \param[in]  color       This thread's color (determines which comm it will
-                            be in). Giving TMPI_UNDEFINED will result in
-                            this thread not being in any group.
-    \param[in]  key         This thread's key (determines rank).
-    \param[out] newcomm     The new comm.
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Comm_split(tMPI_Comm comm, int color, int key, tMPI_Comm *newcomm);
-
-/** Make a duplicate of a comm.
-
-    Collective function.
-
-    \param[in] comm         The originating comm.
-    \param[in] newcomm      The new comm.
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Comm_dup(tMPI_Comm comm, tMPI_Comm *newcomm);
-/*! \} */
-
-
-
-
-
-
-
-
-/*! \name Topology functions
- \{ */
-/* topology functions */
-/** Check what type of topology the comm has.
-
-    \param[in] comm         The comm to query
-    \param[out] status      The type of topology.
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Topo_test(tMPI_Comm comm, int *status);
-
-/** Get the dimensionality of a comm with a topology.
-
-    \param[in] comm         The comm to query.
-    \param[out] ndims       The number of dimensions.
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-
-TMPI_EXPORT
-int tMPI_Cartdim_get(tMPI_Comm comm, int *ndims);
-/** Get the size and pbc a of a comm with a Cartesian topology has.
-
-    \param[in]  comm        The comm to query.
-    \param[in]  maxdims     The maximum number of dimensions in the periods
-                            and coords parameter.
-    \param[out] dims        The number of dimensions.
-    \param[out] periods     The periodicity in each dimension.
-    \param[out] coords      The number of coordinates in each dimension.
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-
-TMPI_EXPORT
-int tMPI_Cart_get(tMPI_Comm comm, int maxdims, int *dims, int *periods,
-                  int *coords);
-
-
-/** Get rank that a specific set of process coordinates has in
-    a Cartesian topology.
-
-    \param[in]  comm        The comm to query.
-    \param[in]  coords      The coordinates in each dimension.
-    \param[out] rank        The rank associated with the coordinates.
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Cart_rank(tMPI_Comm comm, int *coords, int *rank);
-
-/** Get coordinates of a process rank in a Cartesian topology.
-
-    \param[in]  comm        The comm to query.
-    \param[in]  rank        The rank associated with the coordinates.
-    \param[in]  maxdims     The maximum number of dimensions in the coords
-                            parameter.
-    \param[out] coords      The coordinates in each dimension.
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Cart_coords(tMPI_Comm comm, int rank, int maxdims, int *coords);
-
-/** Get optimal rank this process would have in a Cartesian topology.
-
-    \param[in]  comm        The comm to query.
-    \param[in]  ndims       The number of dimensions.
-    \param[in]  dims        The size in each dimension.
-    \param[in]  periods     The periodicity in each dimension.
-
-    \param[out] newrank     The rank the thread would have given the topology.
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Cart_map(tMPI_Comm comm, int ndims, int *dims, int *periods,
-                  int *newrank);
-
-/** Create a comm with a Cartesian topology.
-
-    \param[in]  comm_old    The originating comm.
-    \param[in]  ndims       The number of dimensions.
-    \param[in]  dims        The size in each dimension.
-    \param[in]  periods     The periodicity in each dimension.
-    \param[in]  reorder     Whether to allow reordering of the threads
-                            according to tMPI_Cart_map().
-    \param[out] comm_cart   The new comm with Cartesian topology.
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Cart_create(tMPI_Comm comm_old, int ndims, int *dims, int *periods,
-                     int reorder, tMPI_Comm *comm_cart);
-
-/** Create a comms that are sub-spaces of the Cartesian topology communicator.
-    Works like a MPI_Comm_split() for the Cartesian dimensions specified
-    as false in remain_dims.
-
-    \param[in]  comm        The originating comm with Cartesian topology.
-    \param[in]  remain_dims An Boolean array that decides whether a specific
-                            dimensionality should remain in newcomm (if true),
-                            or should be split up (if false).
-    \param[out] newcomm     The new split communicator
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Cart_sub(tMPI_Comm comm, int *remain_dims, tMPI_Comm *newcomm);
-
-/*! \} */
-
-
-
-
-
-
-
-
-/*! \name Data type manipulation functions
- \{ */
-/** Create a contiguous data type (the only type possible right now).
-
-    Creates a datatype that is a vector of oldtype.
-
-    \param[in]  count       The number of oldtype types in the new type.
-    \param[in]  oldtype     The old data type.
-    \param[out] newtype     The new data type (still needs to be committed).
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Type_contiguous(int count, tMPI_Datatype oldtype,
-                         tMPI_Datatype *newtype);
-
-
-/** Make a data type ready for use.
-
-    \param[in,out] datatype  The new datatype.
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Type_commit(tMPI_Datatype *datatype);
-/*! \} */
-
-
-
-
-
-
-
-
-/*! \name Point-to-point communication functions
- \{ */
-
-/* blocking transfers. The actual transfer (copy) is done on the receiving end
-    (so that the receiver's cache already contains the data that it presumably
-     will use soon).  */
-/** Send message; blocks until buf is reusable.
-
-    \param[in]  buf         The buffer with data to send.
-    \param[in]  count       The number of items to send.
-    \param[in]  datatype    The data type of the items in buf.
-    \param[in]  dest        The rank of the destination thread.
-    \param[in]  tag         The message tag.
-    \param[in]  comm        The shared communicator.
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Send(const void* buf, int count, tMPI_Datatype datatype, int dest,
-              int tag, tMPI_Comm comm);
-
-/** Receive message; blocks until buf is filled.
-
-    \param[out] buf         The buffer for data to receive.
-    \param[in]  count       The maximum number of items to receive.
-    \param[in]  datatype    The data type of the items in buf.
-    \param[in]  source      The rank of the source thread (or TMPI_ANY_SOURCE).
-    \param[in]  tag         The message tag (or TMPI_ANY_TAG).
-    \param[in]  comm        The shared communicator.
-    \param[out] status      The message status.
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Recv(void* buf, int count, tMPI_Datatype datatype, int source,
-              int tag, tMPI_Comm comm, tMPI_Status *status);
-
-/** Send & receive message at the same time.
-
-    Blocks until recvbuf is filled, and sendbuf is ready for reuse.
-
-    \param[in]  sendbuf     The buffer with data to send.
-    \param[in]  sendcount   The number of items to send.
-    \param[in]  sendtype    The data type of the items in send buf.
-    \param[in]  dest        The rank of the destination thread.
-    \param[in]  sendtag     The send message tag.
-    \param[out] recvbuf     The buffer for data to receive.
-    \param[in]  recvcount   The maximum number of items to receive.
-    \param[in]  recvtype    The data type of the items in recvbuf.
-    \param[in]  source      The rank of the source thread (or TMPI_ANY_SOURCE).
-    \param[in]  recvtag     The recveive message tag (or TMPI_ANY_TAG).
-    \param[in]  comm        The shared communicator.
-    \param[out] status      The received message status.
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Sendrecv(const void *sendbuf, int sendcount, tMPI_Datatype sendtype,
-                  int dest, int sendtag, void *recvbuf, int recvcount,
-                  tMPI_Datatype recvtype, int source, int recvtag,
-                  tMPI_Comm comm, tMPI_Status *status);
-
-/* async send/recv. The actual transfer is done on the receiving
-    end, during tMPI_Wait, tMPI_Waitall or tMPI_Test. For tMPI_Waitall,
-    the incoming messages are processed in the order they come in.  */
-
-/** Initiate sending a message, non-blocking.
-
-    This makes the buffer available to be received. The contents of buf
-    should not be touched before the transmission is finished with
-    tMPI_Wait(), tMPI_Test() or tMPI_Waitall().
-
-
-    \param[in]  buf         The buffer with data to send.
-    \param[in]  count       The number of items to send.
-    \param[in]  datatype    The data type of the items in buf.
-    \param[in]  dest        The rank of the destination thread.
-    \param[in]  tag         The message tag.
-    \param[in]  comm        The shared communicator.
-    \param[out] request     The request object that can be used in tMPI_Wait(),
-                            tMPI_Test, etc.
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Isend(const void* buf, int count, tMPI_Datatype datatype, int dest,
-               int tag, tMPI_Comm comm, tMPI_Request *request);
-
-/** Initiate receiving a message.
-
-    This makes the buffer available to be filled with data. The contents of
-    buf should not be relied on before the transmission is finished with
-    tMPI_Wait(), tMPI_Test() or tMPI_Waitall().
-
-    \param[out] buf         The buffer for data to receive.
-    \param[in]  count       The maximum number of items to receive.
-    \param[in]  datatype    The data type of the items in buf.
-    \param[in]  source      The rank of the source thread (or TMPI_ANY_SOURCE).
-    \param[in]  tag         The message tag (or TMPI_ANY_TAG).
-    \param[in]  comm        The shared communicator.
-    \param[out] request     The request object that can be used in tMPI_Wait(),
-                            tMPI_Test, etc.
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Irecv(void* buf, int count, tMPI_Datatype datatype, int source,
-               int tag, tMPI_Comm comm, tMPI_Request *request);
-
-
-
-
-/** Test whether a message is transferred.
-
-    \param[in,out]  request The request obtained wit tMPI_Isend()/tMPI_Irecv().
-    \param[out]     flag    A flag set to TRUE(1) if the request is finished,
-                            FALSE(0) otherwise.
-    \param[out]     status  Message status (can be set to TMPI_STATUS_IGNORE).
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Test(tMPI_Request *request, int *flag, tMPI_Status *status);
-
-/** Wait until a message is transferred.
-
-    \param[in,out]  request The request obtained wit tMPI_Isend()/tMPI_Irecv().
-    \param[out]     status  Message status.
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Wait(tMPI_Request *request, tMPI_Status *status);
-
-
-
-
-/** Wait until several messages are transferred.
-
-    \param[in]      count               The number of requests
-    \param[in,out]  array_of_requests   List of count requests obtained with
-                                        tMPI_Isend()/tMPI_Irecv().
-    \param[out]     array_of_statuses   List of count message statuses (can
-                                        be set to TMPI_STATUSES_IGNORE).
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Waitall(int count, tMPI_Request *array_of_requests,
-                 tMPI_Status *array_of_statuses);
-
-/** Test whether several messages are transferred.
-
-    \param[in]      count               The number of requests
-    \param[in,out]  array_of_requests   List of count requests obtained with
-                                        tMPI_Isend()/tMPI_Irecv().
-    \param[out]     flag                Whether all requests have completed.
-    \param[out]     array_of_statuses   List of count message statuses (can
-                                        be set to TMPI_STATUSES_IGNORE).
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Testall(int count, tMPI_Request *array_of_requests, int *flag,
-                 tMPI_Status *array_of_statuses);
-
-/** Wait until one of several messages is transferred.
-
-    \param[in]      count               The number of requests
-    \param[in,out]  array_of_requests   List of count requests obtained with
-                                        tMPI_Isend()/tMPI_Irecv().
-    \param[out]     index               Index of the request that has
-                                        completed.
-    \param[out]     status              Pointer to tMPI_Status object
-                                        associated with completed request.
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Waitany(int count, tMPI_Request *array_of_requests,
-                 int *index, tMPI_Status *status);
-
-/** Test whether one of several messages is transferred.
-
-    \param[in]      count               The number of requests
-    \param[in,out]  array_of_requests   List of count requests obtained with
-                                        tMPI_Isend()/tMPI_Irecv().
-    \param[out]     index               Index of the request that has
-                                        completed.
-    \param[out]     flag                Whether any request has completed.
-    \param[out]     status              Pointer to tMPI_Status object
-                                        associated with completed request.
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Testany(int count, tMPI_Request *array_of_requests,
-                 int *index, int *flag, tMPI_Status *status);
-
-/** Wait until some of several messages are transferred. Waits until at least
-    one message is transferred.
-
-    \param[in]      incount             The number of requests
-    \param[in,out]  array_of_requests   List of count requests obtained with
-                                        tMPI_Isend()/tMPI_Irecv().
-    \param[out]     outcount            Number of completed requests
-    \param[out]     array_of_indices    Array of ints that gets filled with
-                                        the indices of the completed requests.
-    \param[out]     array_of_statuses   List of count message statuses (can
-                                        be set to TMPI_STATUSES_IGNORE).
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Waitsome(int incount, tMPI_Request *array_of_requests,
-                  int *outcount, int *array_of_indices,
-                  tMPI_Status *array_of_statuses);
-
-/** Test whether some of several messages are transferred.
-
-    \param[in]      incount             The number of requests
-    \param[in,out]  array_of_requests   List of count requests obtained with
-                                        tMPI_Isend()/tMPI_Irecv().
-    \param[out]     outcount            Number of completed requests
-    \param[out]     array_of_indices    Array of ints that gets filled with
-                                        the indices of the completed requests.
-    \param[out]     array_of_statuses   List of count message statuses (can
-                                        be set to TMPI_STATUSES_IGNORE).
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Testsome(int incount, tMPI_Request *array_of_requests,
-                  int *outcount, int *array_of_indices,
-                  tMPI_Status *array_of_statuses);
-
-
-
-
-
-
-/** get the number of actually transferred items from a receive
-    status.
-
-    \param[in]  status      The status.
-    \param[in]  datatype    The data type which was received.
-    \param[out] count       The number of items actually received.
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Get_count(tMPI_Status *status, tMPI_Datatype datatype, int *count);
-/*! \} */
-
-
-
-
-
-
-
-
-/*! \name Synchronization functions
- \{ */
-/** Block until all threads in the comm call this function.
-
-    \param[in]  comm    The comm object.
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Barrier(tMPI_Comm comm);
-/*! \} */
-
-
-
-
-
-
-
-/*! \name Multicast communication functions
- \{ */
-/** Broadcast from one thread to all others in comm.
-
-    Collective function; data is transferred from root's buffer to all others'
-    buffer.
-
-    \param[in,out]  buffer      The buffer to send from (root)/receive from
-                                (other threads).
-    \param[in]      count       The number of items to send/receive.
-    \param[in]      datatype    The type of the items to send/receive.
-    \param[in]      root        The rank of the sending thread.
-    \param[in]      comm        The communicator.
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Bcast(void* buffer, int count, tMPI_Datatype datatype, int root,
-               tMPI_Comm comm);
-
-/** Gather data from all threads in comm to root.
-
-    Collective function; assumes that all data is received in blocks of
-    recvcount.
-
-    \param[in]      sendbuf     The send buffer for all threads (root may
-                                specify TMPI_IN_PLACE, in which case it
-                                transfers nothing to itself).
-    \param[in]      sendcount   The number of items to send for all threads.
-    \param[in]      sendtype    The type of the items to send.
-    \param[out]     recvbuf     The receiving buffer (for root thread).
-    \param[in]      recvcount   The number of items to receive (for root).
-    \param[in]      recvtype    The type of the items to receive (for root).
-    \param[in]      root        The rank of root.
-    \param[in]      comm        The communicator.
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Gather(const void* sendbuf, int sendcount, tMPI_Datatype sendtype,
-                void* recvbuf, int recvcount, tMPI_Datatype recvtype, int root,
-                tMPI_Comm comm);
-
-
-/** Gather irregularly laid out data from all processes in comm to root.
-
-    Collective function.
-
-    \param[in]      sendbuf     The send buffer for all threads (root may
-                                specify TMPI_IN_PLACE, in which case it
-                                transfers nothing to itself).
-    \param[in]      sendcount   The number of items to send for all threads.
-    \param[in]      sendtype    The type of the items to send.
-    \param[out]     recvbuf     The receiving buffer (for root thread).
-    \param[in]      recvcounts  The list of number of items to receive (for
-                                root).
-    \param[in]      displs      The list of displacements in recvbuf to
-                                receive data in (for root).
-    \param[in]      recvtype    The type of the items to receive (for root).
-    \param[in]      root        The rank of root.
-    \param[in]      comm        The communicator.
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Gatherv(const void* sendbuf, int sendcount, tMPI_Datatype sendtype,
-                 void* recvbuf, int *recvcounts, int *displs,
-                 tMPI_Datatype recvtype, int root, tMPI_Comm comm);
-
-
-/** Spread parts of sendbuf to all processes in comm from root.
-
-    Collective function.
-
-    \param[in]      sendbuf     The send buffer for root.
-    \param[in]      sendcount   The number of items for root to send to each
-                                thread.
-    \param[in]      sendtype    The type of the items root sends.
-    \param[out]     recvbuf     The receiving buffer for all receiving threads
-                                (root may specify TMPI_IN_PLACE, in which case
-                                it transmits nothing to itself).
-    \param[in]      recvcount   The number of items recvbuf can receive.
-    \param[in]      recvtype    The type of items to receive.
-    \param[in]      root        The rank of root.
-    \param[in]      comm        The communicator.
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Scatter(const void* sendbuf, int sendcount, tMPI_Datatype sendtype,
-                 void* recvbuf, int recvcount, tMPI_Datatype recvtype, int root,
-                 tMPI_Comm comm);
-
-/** Spread irregularly laid out parts of sendbuf to all processes
-            in comm from root.
-
-    Collective function.
-
-    \param[in]      sendbuf     The send buffer for root.
-    \param[in]      sendcounts  List of the number of items for root to send
-                                to each thread.
-    \param[in]      displs      List of displacements in sendbuf from which
-                                to start transmission to each thread.
-    \param[in]      sendtype    The type of the items root sends.
-    \param[out]     recvbuf     The receiving buffer for all receiving threads
-                                (root may specify TMPI_IN_PLACE, in which case
-                                it transmits nothing to itself).
-    \param[in]      recvcount   The number of items recvbuf can receive.
-    \param[in]      recvtype    The type of items to receive.
-    \param[in]      root        The rank of root.
-    \param[in]      comm        The communicator.
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Scatterv(const void* sendbuf, int *sendcounts, int *displs,
-                  tMPI_Datatype sendtype, void* recvbuf, int recvcount,
-                  tMPI_Datatype recvtype, int root, tMPI_Comm comm);
-
-
-/** Spread out parts of sendbuf to all processes from all processes in
-           comm.
-
-    Collective function.
-
-    \param[in]      sendbuf     The send buffer.
-    \param[in]      sendcount   The number of items for to send to each thread.
-    \param[in]      sendtype    The type of the items to send.
-    \param[out]     recvbuf     The receive buffer for all threads.
-    \param[in]      recvcount   The number of items recvbuf can receive per
-                                thread.
-    \param[in]      recvtype    The type of items to receive.
-    \param[in]      comm        The communicator.
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Alltoall(void* sendbuf, int sendcount, tMPI_Datatype sendtype,
-                  void* recvbuf, int recvcount, tMPI_Datatype recvtype,
-                  tMPI_Comm comm);
-
-
-/** Spread out irregularly laid out parts of sendbuf to all
-           processes from all processes in comm.
-
-    Collective function.
-
-    \param[in]      sendbuf     The send buffer.
-    \param[in]      sendcounts  List of the number of items for to send to
-                                each thread.
-    \param[in]      sdispls     List of the displacements in sendbuf of items
-                                to send to each thread.
-    \param[in]      sendtype    The type of the items to send.
-    \param[out]     recvbuf     The receive buffer for all threads.
-    \param[in]      recvcounts  List of the number of items recvbuf can
-                                receive from each thread.
-    \param[in]      rdispls     List of the displacements in recvbuf of items
-                                to receive from each thread.
-    \param[in]      recvtype    The type of items to receive.
-    \param[in]      comm        The communicator.
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Alltoallv(void* sendbuf, int *sendcounts, int *sdispls,
-                   tMPI_Datatype sendtype, void* recvbuf, int *recvcounts,
-                   int *rdispls, tMPI_Datatype recvtype, tMPI_Comm comm);
-
-/*! \} */
-
-
-
-
-
-
-
-
-
-/*! \name Reduce functions
- \{ */
-/** Do an operation between all locally held buffers on all items in the
-    buffers, and send the results to root.
-
-    Collective function.
-
-    \param[in]  sendbuf     The operand parameters. Root may specify
-                            TMPI_IN_PLACE, in which case recvbuf will hold
-                            the operand parameters.
-    \param[out] recvbuf     The result buffer at root.
-    \param[in]  count       The number of items to do operation on.
-    \param[in]  datatype    The data type of the items.
-    \param[in]  op          The operation to perform.
-    \param[in]  root        The root thread (which is to receive the results).
-    \param[in]  comm        The communicator.
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Reduce(void* sendbuf, void* recvbuf, int count,
-                tMPI_Datatype datatype, tMPI_Op op, int root, tMPI_Comm comm);
-
-
-
-/** Do an operation between all locally held buffers on all items in the
-    buffers and broadcast the results.
-
-    Collective function.
-
-
-    \param[in]  sendbuf     The operand parameters. Any process may specify
-                            TMPI_IN_PLACE, in which case recvbuf will hold
-                            the operand parameters for that process.
-    \param[in,out] recvbuf  The result buffer.
-    \param[in]  count       The number of items to do operation on.
-    \param[in]  datatype    The data type of the items.
-    \param[in]  op          The operation to perform.
-    \param[in]  comm        The communicator.
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Allreduce(void* sendbuf, void* recvbuf, int count,
-                   tMPI_Datatype datatype, tMPI_Op op, tMPI_Comm comm);
-
-/** Do an tMPI_Reduce, but with the following assumption:
-    recvbuf points to a valid buffer in all calling threads, or
-    sendbuf has the value TMPI_IN_PLACE (in which case the values of
-    sendbuf may be changed in that thread).
-
-    This avoids unnecesary memory allocations associated with the normal
-    tMPI_Reduce.
-
-    Collective function.
-
-    \param[in]      sendbuf     The operand parameters (or TMPI_IN_PLACE,
-                                in which case the operand parameters will
-                                be in recvbuf).
-    \param[in,out]  recvbuf     The result buffer.
-    \param[in]      count       The number of items to do operation on.
-    \param[in]      datatype    The data type of the items.
-    \param[in]      op          The operation to perform.
-    \param[in]      root        The root thread (which is to receive
-                                the final results).
-    \param[in]      comm        The communicator.
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Reduce_fast(void* sendbuf, void* recvbuf, int count,
-                     tMPI_Datatype datatype, tMPI_Op op, int root,
-                     tMPI_Comm comm);
-
-/** Do a partial reduce operation, based on rank: the results of the
-    reduction operation of ranks 0 - i will be put in the recvbuf of
-    rank i.
-
-    Collective function.
-
-    \param[in]     sendbuf     The operand parameters. All ranks may specify
-                               TMPI_IN_PLACE, in which case recvbuf will hold
-                               the operand parameters.
-    \param[in,out] recvbuf     The result buffer.
-    \param[in]     count       The number of items to do operation on.
-    \param[in]     datatype    The data type of the items.
-    \param[in]     op          The operation to perform.
-    \param[in]     comm        The communicator.
-
-    \return  TMPI_SUCCESS on success, TMPI_FAILURE on failure.  */
-TMPI_EXPORT
-int tMPI_Scan(void* sendbuf, void* recvbuf, int count,
-              tMPI_Datatype datatype, tMPI_Op op, tMPI_Comm comm);
-
-
-/*! \} */
-
-
-
-#endif /* TMPI_TMPI_H_ */
diff --git a/src/include/gromacs/external/thread_mpi/include/thread_mpi/visibility.h b/src/include/gromacs/external/thread_mpi/include/thread_mpi/visibility.h
deleted file mode 100644 (file)
index 1cffaaa..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Written by Sander Pronk, Erik Lindahl, and possibly others.
-
-   Copyright (c) 2009, Sander Pronk, Erik Lindahl.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-#ifndef TMPI_VISIBILITY_H_
-#define TMPI_VISIBILITY_H_
-
-/** \file
- *
- * \brief Visibility macros
- *
- * These macros enable dynamic library visibility support. Either set the
- * 'TMPI_USE_VISIBILITY', or set the TMPI_EXPORT to the right export
- * statement, when incorporating thread_mpi into a larger project.
- *
- * All exported functions and classes will be tagged by the visibility macro.
- *
- * \sa http://gcc.gnu.org/wiki/Visibility
- *
- */
-
-#ifdef TMPI_USE_VISIBILITY  /* off by default */
-
-/* only set if the macro hasn't been set elsewhere */
-#ifndef TMPI_EXPORT
-
-/* gcc-like */
-#if defined(__GNUC__)
-
-#define TMPI_EXPORT __attribute__((__visibility__("default")))
-
-#elif defined _WIN32 || defined __CYGWIN__ || defined WINDOWS
-
-#ifdef TMPI_EXPORTS
-#define TMPI_EXPORT __declspec(dllexport)
-#else
-#define TMPI_EXPORT __declspec(dllimport)
-#endif
-
-#else /* no viable visibility */
-
-#define TMPI_EXPORT
-
-#endif /* compiler check */
-
-#endif /* TMPI_EXPORT */
-
-#else  /* TMPI_USE_VISIBILITY */
-
-#define TMPI_EXPORT
-
-#endif /* TMPI_USE_VISIBILITY */
-
-#endif /* TMPI_VISIBILITY_H_ */
diff --git a/src/include/gromacs/external/thread_mpi/include/thread_mpi/wait.h b/src/include/gromacs/external/thread_mpi/include/thread_mpi/wait.h
deleted file mode 100644 (file)
index ae29422..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Written by Sander Pronk, Erik Lindahl, and possibly others.
-
-   Copyright (c) 2009, Sander Pronk, Erik Lindahl.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-
-#ifndef TMPI_WAIT_H_
-#define TMPI_WAIT_H_
-
-#if TMPI_WAIT_FOR_NO_ONE
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#if GMX_FAHCORE
-// This lets F@H throttle CPU usage
-#define TMPI_YIELD_WAIT_DATA
-#define TMPI_YIELD_WAIT_DATA_INIT(data)
-#define TMPI_YIELD_WAIT(data) fcYieldWait()
-
-#elif !(defined( _WIN32 ) || defined( _WIN64 ) )
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_SCHED_H
-#include <sched.h>
-#endif
-
-/* for now we just do sched_yield(). It's in POSIX. */
-/* the data associated with waiting. */
-#define TMPI_YIELD_WAIT_DATA
-/* the initialization  associated with waiting. */
-#define TMPI_YIELD_WAIT_DATA_INIT(data)
-
-/* the waiting macro */
-#define TMPI_YIELD_WAIT(data)  sched_yield()
-
-#else
-/* and in Windows, we do SwitchToThread() alternated with Sleep(0). This
-   is apparently recommende practice (SwitchToThread() alone just gives
-   up the slice for threads on the current core, and Sleep(0) alone could
-   lead to starvation. This mixed approach actually gives better real-world
-   performance in the test program.*/
-/* the data associated with waiting. */
-#define TMPI_YIELD_WAIT_DATA  int yield_wait_counter;
-/* the initialization  associated with waiting. */
-#define TMPI_YIELD_WAIT_DATA_INIT(data) { (data)->yield_wait_counter = 0; }
-
-/* the waiting macro is so complicated because using SwitchToThread only schedules */
-#define TMPI_YIELD_WAIT(data)  { \
-        if ( ((data)->yield_wait_counter++)%100 == 0) \
-        { \
-            SwitchToThread(); \
-        } \
-        else \
-        { \
-            Sleep(0); \
-        } \
-}
-
-#endif
-
-
-#else /* !TMPI_WAIT_FOR_NO_ONE */
-
-/* the data associated with waiting. */
-#define TMPI_YIELD_WAIT_DATA
-/* the initialization  associated with waiting. */
-#define TMPI_YIELD_WAIT_DATA_INIT(data)
-
-/* the waiting macro */
-#define TMPI_YIELD_WAIT(data)  tMPI_Atomic_memory_barrier()
-
-
-#endif /* !TMPI_WAIT_FOR_NO_ONE */
-
-#endif /* TMPI_WAIT_H_ */
diff --git a/src/include/gromacs/external/thread_mpi/include/tmpi.h b/src/include/gromacs/external/thread_mpi/include/tmpi.h
deleted file mode 100644 (file)
index 57bc368..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Written by Sander Pronk, Erik Lindahl, and possibly others.
-
-   Copyright (c) 2009, Sander Pronk, Erik Lindahl.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-
-/*!
-   \if THREAD_MPI_MAIN
-   \mainpage thread_mpi thread_mpi threading library
-   \else
-   \page thread_mpi thread_mpi threading library
-   \endif
-
-   thread_mpi is a cross-platform threading library for applications in
-   high-performance computing. It supports:
-
-   - Cross-platform thread primitives (thread creation, mutexes, spinlocks,
-     barriers, thread-local storage, etc.).
-   - Cross-platform atomic operations (compare-and-swap, add-return, etc) for
-     safe lock-free synchronization.
-   - An implementation of (currently, much of) MPI, either as a drop-in
-     replacement, or for use in conjunction with a networked MPI
-     implementation.
-   - Shared-memory allocation and memory management (planned, as of now).
-   - Basic lock-free data structures (planned, as of now).
-
-   Because it can be used as a drop-in replacement for MPI, existing codes
-   using MPI can start using thread_mpi without major changes in the
-   source code, assuming -- and this is a big assumption -- that the code
-   is thread-safe.
-
-   Alternatively, networked MPI calls can be used in conjunction with
-   thread_mpi calls (simply by using
-    "#include <thread_mpi.h>"
-   instead of
-    "#include <tmpi.h>"
-   and pre-fixing all thread_mpi MPI-like calls with tMPI instead of MPI.
-
-   The availability of both MPI calls and shared-memory constructs makes it
-   possible to transition (relatively) seamlessly from an MPI-style code
-   to code that's optimal on multicore CPUs.
-
-   Although MPI-style message passing isn't neccesarily optimal for
-   performance on shared-memory systems, the MPI communicator concept and
-   its emphasis on collective operations makes sense even when computing on
-   one machine with multiple cores. The communicator forms the basis for
-   the shared-memory allocation and lock-free data structure implementations
-   in thread_mpi.
-
-   Although usable as a stand-alone library, thread_mpi is designed to
-   be incorporated in the code tree, eliminating any external build
-   requirements. The BSD-style license that this library is distributed
-   with reflects this.
-
-   Thread primitives and the atomic operations are cpu and operating system
-   dependent - thread_mpi attempts to make them available with the same
-   interface independently of the platform it's run on.
-   Currently the thread primitives are supported on:
-   - any operating system supporting POSIX threads
-   - Windows (XP and later).
-
-   The atomic operations (such as compare-and-swap) are supported on:
-   - gcc on x86, x86_64, PowerPC and Itanium.
-   - Intel compilers on x86, x86_64 and Itanium.
-   - xlc on PowerPC.
-   - (partial) HP/UX compilers on Itanium.
-
-   Detailed descriptions of the parts of the API can be found in:
-   - thread_mpi/threads.h for threading fundamentals.
-   - thread_mpi/atomic.h for atomic operations.
-   - thread_mpi/tmpi.h for the MPI functions as tMPI_-prefixed functions.
-   - thread_mpi/mpi_bindings.h for the MPI bindings.
- */
-
-
-/** \file
- *
- * \brief Convenience header file for MPI compatibility.
- *
- * This file includes the tMPI header file thread_mpi/tmpi.h and the true
- * MPI-style bindings of thread_mpi/mpi.h, as well as thread_mpi/threads.h and
- * thread_mpi/atomic.h header files. If you'd like to use the components
- * individually, or be able to use a networked MPI together with thread_mpi,
- * include the relevant header files directly.
- */
-
-
-#include "thread_mpi/atomic.h"
-#include "thread_mpi/numa_malloc.h"
-#include "thread_mpi/threads.h"
-#include "thread_mpi/barrier.h"
-#include "thread_mpi/event.h"
-#include "thread_mpi/lock.h"
-#include "thread_mpi/tmpi.h"
-#include "thread_mpi/collective.h"
-
-#include "thread_mpi/mpi_bindings.h"
diff --git a/src/include/gromacs/external/thread_mpi/src/collective.h b/src/include/gromacs/external/thread_mpi/src/collective.h
deleted file mode 100644 (file)
index 162fda6..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Written by Sander Pronk, Erik Lindahl, and possibly others.
-
-   Copyright (c) 2009, Sander Pronk, Erik Lindahl.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-
-/* get a pointer the next coll_env once it's ready */
-struct coll_env *tMPI_Get_cev(tMPI_Comm comm, int myrank, int *synct);
-
-/* post the availability of data in a cev.
-   cev         = the collective comm environment
-   myrank      = my rank
-   index       = the buffer index
-   tag         = the tag
-   datatype    = the datatype
-   busize      = the buffer size
-   buf         = the buffer to xfer
-   n_remaining = the number of remaining threads that need to transfer
-   synct       = the multicast sync number
-   dest        = -1 for all theads, or a specific rank number.
- */
-int tMPI_Post_multi(struct coll_env *cev, int myrank, int index,
-                    int tag, tMPI_Datatype datatype,
-                    size_t bufsize, void *buf, int n_remaining,
-                    int synct, int dest);
-
-/* transfer data from cev->met[rank] to recvbuf */
-void tMPI_Mult_recv(tMPI_Comm comm, struct coll_env *cev, int rank,
-                    int index, int expected_tag, tMPI_Datatype recvtype,
-                    size_t recvsize, void *recvbuf, int *ret);
-
-/* do a root transfer (from root send buffer to root recv buffer) */
-void tMPI_Coll_root_xfer(tMPI_Comm comm,
-                         tMPI_Datatype sendtype, tMPI_Datatype recvtype,
-                         size_t sendsize, size_t recvsize,
-                         void* sendbuf, void* recvbuf, int *ret);
-
-/* wait for other processes to copy data from my cev */
-void tMPI_Wait_for_others(struct coll_env *cev, int myrank);
-/* wait for data to become available from a specific rank */
-void tMPI_Wait_for_data(struct tmpi_thread *cur, struct coll_env *cev,
-                        int myrank);
-/*int rank, int myrank, int synct);*/
diff --git a/src/include/gromacs/external/thread_mpi/src/impl.h b/src/include/gromacs/external/thread_mpi/src/impl.h
deleted file mode 100644 (file)
index ebe60c2..0000000
+++ /dev/null
@@ -1,833 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Written by Sander Pronk, Erik Lindahl, and possibly others.
-
-   Copyright (c) 2009,2018, Sander Pronk, Erik Lindahl.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-
-/* this is the header file for the implementation side of the thread_mpi
-   library. It contains the definitions for all the internal data structures
-   and the prototypes for all the internal functions that aren't static.  */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#if defined( _WIN32 ) || defined( _WIN64 )
-#include <windows.h>
-#endif
-
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-
-#include <errno.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-
-#include "settings.h"
-#include "thread_mpi/atomic.h"
-#include "thread_mpi/threads.h"
-#include "thread_mpi/event.h"
-#include "thread_mpi/tmpi.h"
-#include "thread_mpi/collective.h"
-#include "thread_mpi/barrier.h"
-#include "thread_mpi/lock.h"
-#ifdef TMPI_PROFILE
-#include "profile.h"
-#endif
-
-
-
-/**************************************************************************
-
-   BASIC DEFINITIONS
-
- **************************************************************************/
-
-
-typedef int tmpi_bool;
-#define TRUE 1
-#define FALSE 0
-
-
-
-#ifdef USE_COLLECTIVE_COPY_BUFFER
-/**************************************************************************
-
-   PRE-ALLOCATED COMMUNICATION BUFFERS
-
- **************************************************************************/
-
-
-/* Buffer structure for collective communications. Every thread structure
-   has several of these ready to be used when the collective data
-   transmission is small enough for double copying to occur (i.e. the size
-   of the transmission is less than N*MAX_COPY_BUFFER_SIZE, where N is the
-   number of receiving threads).  */
-struct copy_buffer
-{
-    void               *buf;  /* the actual buffer */
-    struct copy_buffer *next; /* pointer to next free buffer in buffer_list */
-    size_t              size; /* allocated size of buffer */
-};
-
-/* a list of copy_buffers of a specific size. */
-struct copy_buffer_list
-{
-    struct copy_buffer *cb;       /* pointer to the first copy_buffer */
-    size_t              size;     /* allocated size of buffers in this list */
-    struct copy_buffer *cb_alloc; /* list as allocated */
-    int                 Nbufs;    /* number of allocated buffers */
-};
-#endif
-
-
-
-
-
-
-
-
-
-
-
-
-
-/**************************************************************************
-
-   POINT-TO-POINT COMMUNICATION DATA STRUCTURES
-
- **************************************************************************/
-
-/* the message envelopes (as described in the MPI standard).
-   These fully describes the message, and make each message unique (enough).
-
-   Transmitting data works by having the sender put a pointer to an envelope
-   onto the receiver's new envelope list corresponding to the originating
-   thread.
-   The sender then waits until the receiver finishes the transmission, while
-   matching all incoming new envelopes against its own list of receive
-   envelopes.
-
-   The receiver either directly matches its receiving envelope against
-   all previously un-matched sending envelopes, or, if no suitable envelope
-   is found, it puts the receive envelope on a receive list.
-   Once waiting for completion, the receiver matches against all incoming
-   new envelopes.  */
-
-/* the state of an individual point-to-point transmission */
-enum envelope_state
-{
-    env_unmatched       = 0, /* the envelope has not had a match yet */
-    env_copying         = 1, /* busy copying (only used for send envelope
-                                by receiver if using_cpbuf is true,
-                                but cb was still NULL).  */
-    env_cb_available    = 2, /* the copy buffer is available. Set by
-                                the sender on a send_buffer. */
-    env_finished        = 3  /* the transmission has finished */
-};
-
-
-/* the envelope. Held in tmpi_thread->evs[src_thread] for send envelopes,
-   or in tmpi_thread->evl for receive envelopes */
-struct envelope
-{
-    int       tag;                  /* the tag */
-    tMPI_Comm comm;                 /* this is a structure shared across threads, so we
-                                       can test easily whether two threads are talking
-                                       about the same comm. */
-
-    struct tmpi_thread *src, *dest; /* these are pretty obvious */
-
-    void               *buf;        /* buffer to be sent  */
-    size_t              bufsize;    /* the size of the data to be transmitted */
-    tMPI_Datatype       datatype;   /* the data type */
-
-    tmpi_bool           nonblock;   /* whether the receiver is non-blocking */
-
-    /* state, values from enum_envelope_state .
-       (there's a few busy-waits relying on this flag).
-       status=env_unmatched  is the initial state.*/
-    tMPI_Atomic_t state;
-
-    /* the error condition */
-    int error;
-
-    /* the message status */
-    /*tMPI_Status *status;*/
-
-    /* prev and next envelopes in the send/recv_envelope_list linked list  */
-    struct envelope *prev, *next;
-
-    tmpi_bool        send; /* whether this is a send envelope (if TRUE), or a receive
-                              envelope (if FALSE) */
-#ifdef USE_SEND_RECV_COPY_BUFFER
-    tmpi_bool using_cb;    /* whether a copy buffer is (going to be) used */
-    void    * cb;          /* the allocated copy buffer pointer */
-#endif
-    /* the next and previous envelopes in the request list */
-    struct envelope *prev_req, *next_req;
-
-    /* the list I'm in */
-    struct recv_envelope_list *rlist;
-    struct send_envelope_list *slist;
-};
-
-
-
-/* singly linked lists of free send & receive envelopes belonging to a
-   thread. */
-struct free_envelope_list
-{
-    struct envelope *head_recv;       /* the first element in the linked list */
-    struct envelope *recv_alloc_head; /* the allocated recv list */
-};
-
-/* collection of send envelopes to a specific thread */
-struct send_envelope_list
-{
-    struct envelope *head_free;  /* singly linked list with free send
-                                    envelopes. A single-thread LIFO.*/
-#ifdef TMPI_LOCK_FREE_LISTS
-    tMPI_Atomic_ptr_t head_new;  /* singly linked list with the new send
-                                    envelopes (i.e. those that are put there by
-                                    the sending thread, but not yet checked by
-                                    the receiving thread). This is a lock-free
-                                    shared detachable list.*/
-    tMPI_Atomic_ptr_t head_rts;  /* singly linked list with free send
-                                    envelopes returned by the other thread.
-                                    This is a lock-free shared LIFO.*/
-#else
-    struct envelope *head_new;   /* singly linked list with the new send
-                                    envelopes (i.e. those that are put there by
-                                    the sending thread, but not yet checked by
-                                    the receiving thread). */
-    struct envelope *head_rts;   /* singly linked list with free send envelopes */
-    tMPI_Spinlock_t  lock_new;   /* this locks head_new */
-    tMPI_Spinlock_t  lock_rts;   /* this locks head_rts */
-#endif
-    struct envelope *head_old;   /* the old send envelopes, in a circular doubly
-                                    linked list. These have been checked by the
-                                    receiving thread against the existing
-                                    recv_envelope_list. */
-
-    struct envelope *alloc_head; /* the allocated send list */
-    size_t           Nalloc;     /* number of allocted sends */
-};
-
-struct recv_envelope_list
-{
-    struct envelope *head;  /* first envelope in this list */
-    struct envelope  dummy; /* the dummy element for the list */
-};
-
-
-/* the request object for asynchronious operations. */
-struct tmpi_req_
-{
-    tmpi_bool           finished;    /* whether it's finished */
-    struct envelope    *ev;          /* the envelope */
-
-    struct tmpi_thread *source;      /* the message source (for receives) */
-    tMPI_Comm           comm;        /* the comm */
-    int                 tag;         /* the tag */
-    int                 error;       /* error code */
-    size_t              transferred; /* the number of transferred bytes */
-    tmpi_bool           cancelled;   /* whether the transmission was canceled */
-
-    struct tmpi_req_   *next, *prev; /* next,prev request in linked list,
-                                        used in the req_list, but also in
-                                        tMPI_Test_mult().  */
-};
-
-/* pre-allocated  request object list */
-struct req_list
-{
-    struct tmpi_req_ *head;       /* pre-allocated singly linked list of requests.
-                                     (i.e. reqs->prev is undefined). */
-    struct tmpi_req_ *alloc_head; /* the allocated block */
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-/**************************************************************************
-
-   MULTICAST COMMUNICATION DATA STRUCTURES
-
- **************************************************************************/
-
-/* these are data structures meant for keeping track of multicast operations
-   (tMPI_Bcast, tMPI_Gather, etc.). Because these operations are all collective
-   across the comm, and are always blocking, the protocol can be much simpler
-   than that for point-to-point communication through tMPI_Send/Recv, etc. */
-
-/* unique tags for multicast & collective operations */
-#define TMPI_BCAST_TAG      1
-#define TMPI_GATHER_TAG     2
-#define TMPI_GATHERV_TAG    3
-#define TMPI_SCATTER_TAG    4
-#define TMPI_SCATTERV_TAG   5
-#define TMPI_REDUCE_TAG     6
-#define TMPI_ALLTOALL_TAG   7
-#define TMPI_ALLTOALLV_TAG  8
-
-
-/* thread-specific part of the coll_env */
-struct coll_env_thread
-{
-    tMPI_Atomic_t current_sync; /* sync counter value for the current
-                                   communication */
-    tMPI_Atomic_t n_remaining;  /* remaining threads count for each thread */
-
-    int           tag;          /* collective communication type */
-    tMPI_Datatype datatype;     /* datatype */
-
-    void        **buf;          /* array of send/recv buffer values */
-    size_t       *bufsize;      /* array of number of bytes to send/recv */
-
-#ifdef USE_COLLECTIVE_COPY_BUFFER
-    tmpi_bool     using_cb;      /* whether a copy buffer is (going to be) used */
-    tMPI_Atomic_t buf_readcount; /* Number of threads reading from buf
-                                    while using_cpbuf is true, but cpbuf
-                                    is still NULL.  */
-    tMPI_Atomic_ptr_t  *cpbuf;   /* copy_buffer pointers. */
-    struct copy_buffer *cb;      /* the copy buffer cpbuf points to */
-#endif
-
-    tMPI_Event send_ev;   /* event associated with being the sending thread.
-                             Triggered when last receiving thread is ready,
-                             and the coll_env_thread is ready for re-use. */
-    tMPI_Event recv_ev;   /* event associated with being a receiving thread. */
-
-    tmpi_bool *read_data; /* whether we read data from a specific thread. */
-};
-
-/* Collective communications once sync. These run in parallel with
-   the collection of coll_env_threads*/
-struct coll_env_coll
-{
-    /* collective sync data */
-    tMPI_Atomic_t current_sync; /* sync counter value for the current
-                                   communication */
-    tMPI_Atomic_t n_remaining;  /* remaining threads count */
-
-    void         *res;          /* result data for once calls. */
-};
-
-/* the collective communication envelope. There's a few of these per
-   comm, and each one stands for one collective communication call.  */
-struct coll_env
-{
-    struct coll_env_thread *met; /* thread-specific collective envelope data.*/
-
-    struct coll_env_coll    coll;
-    int                     N;
-};
-
-/* multicast synchronization data structure. There's one of these for
-   each thread in each tMPI_Comm structure */
-struct coll_sync
-{
-    int         synct;  /* sync counter for coll_env_thread.  */
-    int         syncs;  /* sync counter for coll_env_coll.  */
-
-    tMPI_Event *events; /* One event for each other thread */
-    int         N;      /* the number of threads */
-};
-
-
-
-
-
-
-
-
-
-
-
-/**************************************************************************
-
-   THREAD DATA STRUCTURES
-
- **************************************************************************/
-
-/* information about a running thread. This structure is put in a
-   globally available array; the envelope exchange, etc. are all done through
-   the elements of this array.*/
-struct tmpi_thread
-{
-    tMPI_Thread_t thread_id; /* this thread's id */
-
-    /* p2p communication structures: */
-
-    /* the receive envelopes posted for other threads to check */
-    struct recv_envelope_list  evr;
-    /* the send envelopes posted by other threadas */
-    struct send_envelope_list *evs;
-    /* free send and receive envelopes */
-    struct free_envelope_list  envelopes;
-    /* number of finished send envelopes */
-    tMPI_Atomic_t              ev_outgoing_received;
-    /* the p2p communication events (incoming envelopes + finished send
-       envelopes generate events) */
-    tMPI_Event      p2p_event;
-    TMPI_YIELD_WAIT_DATA /* data associated with waiting */
-    struct req_list rql; /* list of pre-allocated requests */
-
-    /* collective communication structures: */
-#ifdef USE_COLLECTIVE_COPY_BUFFER
-    /* copy buffer list for multicast communications */
-    struct copy_buffer_list cbl_multi;
-#endif
-
-    /* miscellaneous data: */
-
-    tMPI_Comm self_comm; /* comms for MPI_COMM_SELF */
-#ifdef TMPI_PROFILE
-    /* the per-thread profile structure that keeps call counts & wait times. */
-    struct tmpi_profile profile;
-#endif
-    /* The start function (or NULL, if a main()-style start function is to
-       be called) */
-    void  (*start_fn)(const void*);
-    /* The main()-style start function */
-    int   (*start_fn_main)(int, char**);
-    /* the argument to the start function, if it's not main()*/
-    const void *start_arg;
-
-    /* we copy these for each thread (providing these to main() is not
-       required by the MPI standard, but it's convenient). Note that we copy,
-       because some programs (like Gromacs) like to manipulate these. */
-    int    argc;
-    char **argv;
-};
-
-
-
-
-
-
-/**************************************************************************
-
-   ERROR HANDLER DATA STRUCTURES
-
- **************************************************************************/
-
-
-/* the error handler  */
-struct tmpi_errhandler_
-{
-    int                err;
-    tMPI_Errhandler_fn fn;
-};
-
-/* standard error handler functions */
-void tmpi_errors_are_fatal_fn(tMPI_Comm *comm, int *err);
-void tmpi_errors_return_fn(tMPI_Comm *comm, int *err);
-
-
-
-
-
-/**************************************************************************
-
-   GLOBAL DATA STRUCTURE
-
- **************************************************************************/
-
-/* global MPI information */
-struct tmpi_global
-{
-    /* list of pointers to all user-defined types */
-    struct tmpi_datatype_ **usertypes;
-    int                     N_usertypes;
-    int                     Nalloc_usertypes;
-
-    /* spinlock/mutex for manipulating tmpi_user_types */
-    tMPI_Spinlock_t datatype_lock;
-
-    /* Lock to prevent multiple threads manipulating the linked list of comm
-       structures.*/
-    tMPI_Thread_mutex_t comm_link_lock;
-
-    /* barrier for tMPI_Finalize(), etc. */
-    tMPI_Thread_barrier_t barrier;
-
-    /* the timer for tMPI_Wtime() */
-    tMPI_Thread_mutex_t timer_mutex;
-#if !(defined( _WIN32 ) || defined( _WIN64 ) )
-    /* the time at initialization. */
-    struct timeval timer_init;
-#else
-    /* the time at initialization. */
-    DWORD timer_init;
-#endif
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-/**************************************************************************
-
-   COMMUNICATOR DATA STRUCTURES
-
- **************************************************************************/
-
-
-struct tmpi_group_
-{
-    int                  N;     /* the number of threads */
-    struct tmpi_thread **peers; /* the list of peers to communicate with */
-#if 0
-    int                  Nrefs; /* the number of references to this structure */
-#endif
-};
-
-
-/* the communicator objects are globally shared. */
-struct tmpi_comm_
-{
-    struct tmpi_group_ grp; /* the communicator group */
-
-    /* the barrier for tMPI_Barrier() */
-    tMPI_Barrier_t barrier;
-
-
-    /* List of barriers for reduce operations.
-       reduce_barrier[0] contains a list of N/2 barriers for N threads
-       reduce_barrier[1] contains a list of N/4 barriers for N/2 threads
-       reduce_barrier[2] contains a list of N/8 barriers for N/4 threads
-       and so on. (until N/x reaches 1)
-       This is to facilitate tree-based algorithms for tMPI_Reduce, etc.  */
-    tMPI_Barrier_t **reduce_barrier;
-    int             *N_reduce;      /* the number of barriers in each iteration */
-    int              N_reduce_iter; /* the number of iterations */
-
-
-    struct coll_env  *cev;   /* list of multicast envelope objecs */
-    struct coll_sync *csync; /* list of multicast sync objecs */
-
-    /* lists of globally shared send/receive buffers for tMPI_Reduce. */
-    tMPI_Atomic_ptr_t *reduce_sendbuf, *reduce_recvbuf;
-
-    /* mutex for communication object creation. Traditional mutexes are
-       better here because communicator creation should not be done in
-       time-critical sections of code.   */
-    tMPI_Thread_mutex_t comm_create_lock;
-    tMPI_Thread_cond_t  comm_create_prep;
-    tMPI_Thread_cond_t  comm_create_finish;
-
-    tMPI_Comm          *new_comm; /* newly created communicators */
-
-    /* the split structure is shared among the comm threads and is
-       allocated & deallocated during tMPI_Comm_split */
-    struct tmpi_split *split;
-
-    /* the topologies (only cartesian topology is currently implemented */
-    struct cart_topol *cart;
-    /*struct tmpi_graph_topol_ *graph;*/
-
-    tMPI_Errhandler erh;
-
-    /* links for a global circular list of all comms that starts at
-       TMPI_COMM_WORLD. Used to de-allocate the comm structures after
-       tMPI_Finalize(). */
-    struct tmpi_comm_ *next, *prev;
-
-    /* A counter that counts up to N before the comm is freed. */
-    tMPI_Atomic_t destroy_counter;
-};
-
-
-
-/* specific for tMPI_Split: */
-struct tmpi_split
-{
-    volatile int       Ncol_init;
-    volatile int       Ncol_destroy;
-    volatile tmpi_bool can_finish;
-    volatile int      *colors;
-    volatile int      *keys;
-};
-
-/* cartesian topology */
-struct cart_topol
-{
-    int  ndims;   /* number of dimensions */
-    int *dims;    /* procs per coordinate */
-    int *periods; /* whether the grid is periodic, per dimension */
-};
-
-#if 0
-/* graph topology */
-struct tmpi_graph_topol_
-{
-};
-#endif
-
-
-
-
-
-/**************************************************************************
-
-   DATA TYPE DATA STRUCTURES
-
- **************************************************************************/
-
-/* tMPI_Reduce Op functions */
-typedef void (*tMPI_Op_fn)(void*, void*, void*, int);
-
-
-struct tmpi_datatype_component
-{
-    struct tmpi_datatype_ *type;
-    unsigned int           count;
-};
-
-/* we don't support datatypes with holes (yet)  */
-struct tmpi_datatype_
-{
-    size_t                          size;         /* full extent of type. */
-    tMPI_Op_fn                     *op_functions; /* array of op functions for this datatype */
-    int                             N_comp;       /* number of components */
-    struct tmpi_datatype_component *comps;        /* the components */
-    tmpi_bool                       committed;    /* whether the data type is committed */
-};
-/* just as a shorthand:  */
-typedef struct tmpi_datatype_ tmpi_dt;
-
-
-
-
-
-
-
-
-/**************************************************************************
-
-   GLOBAL VARIABLES
-
- **************************************************************************/
-
-
-/* the threads themselves (tmpi_comm only contains lists of pointers to this
-         structure */
-extern struct tmpi_thread *threads;
-extern int                 Nthreads;
-
-/* thread info */
-extern tMPI_Thread_key_t id_key; /* the key to get the thread id */
-
-/* misc. global information about MPI */
-extern struct tmpi_global *tmpi_global;
-
-
-
-
-
-
-
-
-/**************************************************************************
-
-   FUNCTION PROTOTYPES & MACROS
-
- **************************************************************************/
-
-#ifdef TMPI_TRACE
-void tMPI_Trace_print(const char *fmt, ...);
-#endif
-
-/* error-checking malloc/realloc: */
-void *tMPI_Malloc(size_t size);
-void *tMPI_Realloc(void *p, size_t size);
-void tMPI_Free(void *p);
-
-
-/* get the current thread structure pointer */
-#define tMPI_Get_current() ((struct tmpi_thread*) \
-                            tMPI_Thread_getspecific(id_key))
-
-/* get the number of this thread */
-/*#define tMPI_This_threadnr() (tMPI_Get_current() - threads)*/
-
-/* get the number of a specific thread. We convert to the resulting size_t to
-   int, which is unlikely to cause problems in the foreseeable future. */
-#define tMPI_Threadnr(th) (int)(th - threads)
-
-/* get thread associated with rank  */
-#define tMPI_Get_thread(comm, rank) (comm->grp.peers[rank])
-
-
-#if 0
-/* get the current thread structure pointer */
-struct tmpi_thread *tMPI_Get_current(void);
-/* get the thread belonging to comm with rank rank */
-struct tmpi_thread *tMPI_Get_thread(tMPI_Comm comm, int rank);
-
-#endif
-
-/* handle an error, returning the errorcode */
-int tMPI_Error(tMPI_Comm comm, int tmpi_errno);
-
-
-
-/* check whether we're the main thread */
-tmpi_bool tMPI_Is_master(void);
-/* check whether the current process is in a group */
-tmpi_bool tMPI_In_group(tMPI_Group group);
-
-/* find the rank of a thread in a comm */
-int tMPI_Comm_seek_rank(tMPI_Comm comm, struct tmpi_thread *th);
-/* find the size of a comm */
-int tMPI_Comm_N(tMPI_Comm comm);
-
-/* allocate a comm object, making space for N threads */
-int tMPI_Comm_alloc(tMPI_Comm *newcomm, tMPI_Comm parent, int N);
-/* de-allocate a comm object */
-int tMPI_Comm_destroy(tMPI_Comm comm, tmpi_bool do_link_lock);
-/* allocate a group object */
-tMPI_Group tMPI_Group_alloc(void);
-
-/* topology functions */
-/* de-allocate a cartesian topology structure. (it is allocated with
-   the internal function tMPI_Cart_init()) */
-void tMPI_Cart_destroy(struct cart_topol *top);
-
-
-
-
-
-
-/* initialize a free envelope list with N envelopes */
-int tMPI_Free_env_list_init(struct free_envelope_list *evl, int N);
-/* destroy a free envelope list */
-void tMPI_Free_env_list_destroy(struct free_envelope_list *evl);
-
-
-/* initialize a send envelope list */
-int tMPI_Send_env_list_init(struct send_envelope_list *evl, int N);
-/* destroy a send envelope list */
-void tMPI_Send_env_list_destroy(struct send_envelope_list *evl);
-
-
-
-
-
-
-/* initialize a recv envelope list */
-int tMPI_Recv_env_list_init(struct recv_envelope_list *evl);
-/* destroy a recv envelope list */
-void tMPI_Recv_env_list_destroy(struct recv_envelope_list *evl);
-
-
-
-
-/* initialize request list */
-int tMPI_Req_list_init(struct req_list *rl, int N_reqs);
-/* destroy request list */
-void tMPI_Req_list_destroy(struct req_list *rl);
-
-
-
-/* collective data structure ops */
-
-
-/* initialize a coll env structure */
-int tMPI_Coll_env_init(struct coll_env *mev, int N);
-/* destroy a coll env structure */
-void tMPI_Coll_env_destroy(struct coll_env *mev);
-
-/* initialize a coll sync structure */
-int tMPI_Coll_sync_init(struct coll_sync *msc, int N);
-/* destroy a coll sync structure */
-void tMPI_Coll_sync_destroy(struct coll_sync *msc);
-
-#ifdef USE_COLLECTIVE_COPY_BUFFER
-/* initialize a copy_buffer_list */
-int tMPI_Copy_buffer_list_init(struct copy_buffer_list *cbl, int Nbufs,
-                               size_t size);
-/* initialize a copy_buffer_list */
-void tMPI_Copy_buffer_list_destroy(struct copy_buffer_list *cbl);
-/* get a copy buffer from a list */
-struct copy_buffer *tMPI_Copy_buffer_list_get(struct copy_buffer_list *cbl);
-/* return a copy buffer to a list */
-void tMPI_Copy_buffer_list_return(struct copy_buffer_list *cbl,
-                                  struct copy_buffer      *cb);
-/* initialize a copy buffer */
-int tMPI_Copy_buffer_init(struct copy_buffer *cb, size_t size);
-void tMPI_Copy_buffer_destroy(struct copy_buffer *cb);
-#endif
-
-
-/* reduce ops: run a single iteration of a reduce operation on a, b -> dest */
-int tMPI_Reduce_run_op(void *dest, void *src_a, void *src_b,
-                       tMPI_Datatype datatype, int count, tMPI_Op op,
-                       tMPI_Comm comm);
-
-
-/* and we need this prototype */
-int main(int argc, char **argv);
diff --git a/src/include/gromacs/external/thread_mpi/src/p2p.h b/src/include/gromacs/external/thread_mpi/src/p2p.h
deleted file mode 100644 (file)
index d3a8b8c..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Written by Sander Pronk, Erik Lindahl, and possibly others.
-
-   Copyright (c) 2009, Sander Pronk, Erik Lindahl.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-
-/* request list: */
-/* get a request from the thread's pre-allocated request list */
-struct tmpi_req_ *tMPI_Get_req(struct req_list *rl);
-/* return a request to the thread's pre-allocated request list */
-void tMPI_Return_req(struct req_list *rl, struct tmpi_req_ *req);
-
-/* initialize a request with sensible values */
-void tMPI_Req_init(struct tmpi_req_ *rq, struct envelope *ev);
-
-/* wait for incoming connections (and the completion of outgoing connections
-   if spin locks are disabled), and handle them. */
-void tMPI_Wait_process_incoming(struct tmpi_thread *th);
-
-
-
-
-
-/* check for the completion of a single request */
-tmpi_bool tMPI_Test_single(struct tmpi_thread *cur,
-                           struct tmpi_req_   *rq);
-/* check and wait for the completion of a single request */
-void tMPI_Wait_single(struct tmpi_thread *cur, struct tmpi_req_ *rq);
-
-/* check for the completion of a NULL-delimited doubly linked list of
-   requests */
-tmpi_bool tMPI_Test_multi(struct tmpi_thread *cur, struct tmpi_req_ *rqs,
-                          tmpi_bool *any_done);
-
-
-
-/* set a request status */
-void tMPI_Set_status(struct tmpi_req_ *req, tMPI_Status *st);
-
-
-/* post a send envelope */
-struct envelope *tMPI_Post_send(struct tmpi_thread *cur,
-                                tMPI_Comm comm,
-                                struct tmpi_thread *dest,
-                                void *send_buf, int send_count,
-                                tMPI_Datatype datatype, int tag,
-                                tmpi_bool nonblock);
-
-/* post and match a receive envelope */
-struct envelope* tMPI_Post_match_recv(struct tmpi_thread *cur,
-                                      tMPI_Comm comm,
-                                      struct tmpi_thread *src,
-                                      void *recv_buf, int recv_count,
-                                      tMPI_Datatype datatype,
-                                      int tag, tmpi_bool nonblock);
diff --git a/src/include/gromacs/external/thread_mpi/src/profile.h b/src/include/gromacs/external/thread_mpi/src/profile.h
deleted file mode 100644 (file)
index b4066df..0000000
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Written by Sander Pronk, Erik Lindahl, and possibly others.
-
-   Copyright (c) 2009, Sander Pronk, Erik Lindahl.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-
-/* the profiling functions. Many of these are macros, so they're inlined
-   forcibly. Profiling is turned on by defining TMPI_PROFILE, but the most
-   useful parts depend on the cycle counter, which currently only works for
-   x86, x86_64 and ia64. */
-#ifdef TMPI_PROFILE
-
-#include "thread_mpi/atomic/cycles.h"
-
-struct tmpi_thread;
-
-enum tmpi_functions
-{
-    TMPIFN_Send = 0, /* first the point-to-point comm functions */
-    TMPIFN_Recv,
-    TMPIFN_Sendrecv,
-    TMPIFN_Isend,
-    TMPIFN_Irecv,
-    TMPIFN_Wait,
-    TMPIFN_Test,
-    TMPIFN_Waitall,
-    TMPIFN_Testall,
-    TMPIFN_Waitany,
-    TMPIFN_Testany,
-    TMPIFN_Waitsome,
-    TMPIFN_Testsome,
-
-    TMPIFN_Barrier, /* then the barrier */
-
-    TMPIFN_Bcast,   /* and now the collective comm functions */
-    TMPIFN_Gather,
-    TMPIFN_Gatherv,
-    TMPIFN_Scatter,
-    TMPIFN_Scatterv,
-    TMPIFN_Alltoall,
-    TMPIFN_Alltoallv,
-
-    TMPIFN_Reduce,
-    TMPIFN_Allreduce,
-    TMPIFN_Scan,
-
-    TMPIFN_Nfunctions
-};
-
-enum tmpi_wait_functions
-{
-    TMPIWAIT_P2p,        /* p2p send wait */
-    TMPIWAIT_P2p_signal, /* p2p signaling wait */
-    TMPIWAIT_Coll_send,  /* collective recv wait */
-    TMPIWAIT_Coll_recv,  /* collective recv wait */
-    TMPIWAIT_Barrier,    /* collective recv wait */
-    TMPIWAIT_Reduce,     /* collective (all)reduce wait */
-
-    TMPIWAIT_N
-};
-
-
-/* thread-specific profiling data structure */
-struct tmpi_profile
-{
-    unsigned long int mpifn_calls[TMPIFN_Nfunctions]; /* array of counters */
-
-    unsigned long int buffered_p2p_xfers;             /* number of buffered p2p transfers */
-    unsigned long int total_p2p_xfers;                /* total number of p2p transfers */
-
-    unsigned long int buffered_coll_xfers;            /* number of buffered collective
-                                                         transfers */
-    unsigned long int total_coll_xfers;               /* total number of collective
-                                                         transfers */
-
-#ifdef TMPI_CYCLE_COUNT
-    /* cycle counters */
-    tMPI_Cycles_t mpifn_cycles[TMPIFN_Nfunctions]; /* array of cycle counters */
-    tMPI_Cycles_t wait_cycles[TMPIWAIT_N];         /* the wait cycles */
-
-    tMPI_Cycles_t global_start, global_stop;       /* timing start and stop times */
-    tMPI_Cycles_t mpifn_start;                     /* individual timing start times for profiling
-                                                      function call times.  This can be here
-                                                      because tmpi_profile is thread-specific. */
-    enum tmpi_functions fn;                        /* the function being cycle-counted */
-
-
-    tMPI_Cycles_t wait_start; /* individual timing start times for profiling
-                                 wait times. */
-
-    double totals;            /* totals counter for reporting end results */
-#endif
-};
-
-extern int tMPI_Profile_started;
-
-/* initialize the profile counter */
-int tMPI_Profile_init(struct tmpi_profile *prof);
-
-#if 0
-/* deallocations */
-void tMPI_Profile_destroy(struct tmpi_profile *prof);
-#endif
-
-/* stop counting */
-void tMPI_Profile_stop(struct tmpi_profile *prof);
-
-
-
-/* counter functions */
-/* start */
-#ifdef TMPI_CYCLE_COUNT
-/*void tMPI_Profile_count_start(struct tmpi_thread *th);*/
-#define tMPI_Profile_count_start(th) { th->profile.mpifn_start = tMPI_Cycles_read(); }
-#else
-#define tMPI_Profile_count_start(th) {}
-#endif
-
-/* end. this is where the counting actually happens */
-/*void tMPI_Profile_count_stop(struct tmpi_thread *th, enum tmpi_functions fn);*/
-#ifdef TMPI_CYCLE_COUNT
-#define tMPI_Profile_count_stop(th, fn) \
-    { \
-        tMPI_Cycles_t stop = tMPI_Cycles_read(); \
-        th->profile.mpifn_cycles[fn] += (stop - th->profile.mpifn_start); \
-        (th->profile.mpifn_calls[fn])++; \
-    }
-#else
-#define tMPI_Profile_count_stop(th, fn) \
-    { \
-        (th->profile.mpifn_calls[fn])++; \
-    }
-#endif
-
-
-
-
-
-
-
-/* wait functions */
-#ifdef TMPI_CYCLE_COUNT
-/* start waiting cycle count */
-/*void tMPI_Profile_wait_start(struct tmpi_thread *th);*/
-#define tMPI_Profile_wait_start(th) \
-    { \
-        th->profile.wait_start = tMPI_Cycles_read(); \
-    }
-
-/* stop waiting cycle count */
-/*void tMPI_Profile_wait_stop(struct tmpi_thread *th,
-                            enum tmpi_wait_functions fn);*/
-#define tMPI_Profile_wait_stop(th, fn) \
-    { \
-        tMPI_Cycles_t wait_stop = tMPI_Cycles_read(); \
-        th->profile.wait_cycles[fn] += (wait_stop - th->profile.wait_start); \
-    }
-#else
-#define tMPI_Profile_wait_start(th) {}
-#define tMPI_Profile_wait_stop(th, fn) {}
-#endif
-
-
-/* count the number of transfers at the receiving end. */
-/*void tMPI_Profile_count_buffered_p2p_xfer(struct tmpi_thread *th);
-   void tMPI_Profile_count_p2p_xfer(struct tmpi_thread *th);
-   void tMPI_Profile_count_buffered_coll_xfer(struct tmpi_thread *th);
-   void tMPI_Profile_count_coll_xfer(struct tmpi_thread *th);*/
-#define tMPI_Profile_count_buffered_p2p_xfer(th) \
-    { \
-        (th->profile.buffered_p2p_xfers)++; \
-    }
-
-#define tMPI_Profile_count_p2p_xfer(th) \
-    { \
-        (th->profile.total_p2p_xfers)++; \
-    }
-
-#define tMPI_Profile_count_buffered_coll_xfer(th) \
-    { \
-        (th->profile.buffered_coll_xfers)++; \
-    }
-
-#define tMPI_Profile_count_coll_xfer(th) \
-    { \
-        (th->profile.total_coll_xfers)++; \
-    }
-
-
-
-/* output functions */
-void tMPI_Profiles_summarize(int Nthreads, struct tmpi_thread *threads);
-
-#endif
diff --git a/src/include/gromacs/external/thread_mpi/src/pthreads.h b/src/include/gromacs/external/thread_mpi/src/pthreads.h
deleted file mode 100644 (file)
index 78905aa..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Written by Sander Pronk, Erik Lindahl, and possibly others.
-
-   Copyright (c) 2009, Sander Pronk, Erik Lindahl.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-/* the types that were defined in include/thread_mpi/threads.h */
-
-struct tMPI_Thread
-{
-    pthread_t th;              /*!< The POSIX thread ID */
-    int       started_by_tmpi; /*!< whether the thread is started by tMPI */
-};
-
-struct tMPI_Thread_key
-{
-    pthread_key_t pkey;
-};
-
-struct tMPI_Mutex
-{
-    pthread_mutex_t mtx;
-};
-
-struct tMPI_Thread_cond
-{
-    pthread_cond_t cond;
-};
-
-struct tMPI_Thread_barrier
-{
-    tMPI_Atomic_t     initialized;
-    pthread_mutex_t   mutex;     /*!< Lock for the barrier contents          */
-    pthread_cond_t    cv;        /*!< Condition to signal barrier completion */
-    int               threshold; /*!< Total number of members in barrier     */
-    int               count;     /*!< Remaining count before completion      */
-    int               cycle;     /*!< Alternating 0/1 to indicate round      */
-};
diff --git a/src/include/gromacs/external/thread_mpi/src/settings.h b/src/include/gromacs/external/thread_mpi/src/settings.h
deleted file mode 100644 (file)
index d44e973..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Written by Sander Pronk, Erik Lindahl, and possibly others.
-
-   Copyright (c) 2009, Sander Pronk, Erik Lindahl.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-
-/*#define TMPI_DEBUG*/
-
-
-/* If this is defined, thread_mpi will print a message when for every MPI
-   call is called or returns. Useful for debugging MPI-related issues
-   in the calling program. */
-/*#define TMPI_TRACE*/
-
-/* if this is defined, MPI will warn/hang/crash on practices that don't conform
-   to the MPI standard (such as not calling tMPI_Comm_free on all threads that
-   are part of the comm being freed). */
-#define TMPI_STRICT
-
-/* whether to warn if there are mallocs at performance-critical sections
-   (due to preallocations being too small) */
-#ifdef TMPI_WARNINGS
-#define TMPI_WARN_MALLOC
-#else
-/*#define TMPI_WARN_MALLOC*/
-#endif
-
-
-/* the number of envelopes to allocate per thread-to-thread path */
-#define N_EV_ALLOC 16
-
-/* the normal maximum number of threads for pre-defined arrays
-   (if the actual number of threads is bigger than this, it'll
-    allocate/deallocate arrays, so no problems will arise). */
-#define MAX_PREALLOC_THREADS 64
-
-/* Whether to use lock-free lists using compare-and-swap (cmpxchg on x86)
-   pointer functions. Message passing using blocking Send/Recv, and multicasts
-   are is still blocking, of course. */
-#define TMPI_LOCK_FREE_LISTS
-
-/* Whether to disable yielding to the OS scheduler during waits. Disabling
-   this improves performance very slightly if Nthreads<=Ncores on an
-   otherwise idle system because waits have slightly lower latencies, but
-   causes very poor performance if threads are competing for CPU time (for
-   example, when Nthreads>Ncores, or another process is running on the
-   system.
-
-   This option can be set with cmake. */
-/*#define TMPI_WAIT_FOR_NO_ONE 1 */
-
-
-
-/* whether to enable double-copying (where the sender copies data to an
-   intermediate buffer for small enough buffers, allowing it to return
-   from a blocking send call early. The receiver is free to copy from the
-   original buffer while the sender is copying, possibly allowing them to
-   work in parallel).
-
-   This option can be set with cmake. */
-/*#define TMPI_COPY_BUFFER*/
-
-
-/* The size (in bytes) of the maximum transmission size for which double
-   copying is allowed (i.e. the sender doesn't wait for the receiver to
-   become ready, but posts a copied buffer in its envelope).
-
-   A size of 8192 bytes was chosen after some testing with Gromacs. */
-#define COPY_BUFFER_SIZE 8192
-#ifdef TMPI_COPY_BUFFER
-/* We can separately specify whether we want copy buffers for send/recv or
-   multicast communications: */
-#define USE_SEND_RECV_COPY_BUFFER
-#define USE_COLLECTIVE_COPY_BUFFER
-#endif
-
-
-/* The number of collective envelopes per comm object. This is the maximum
-   number of simulataneous collective communications that can
-   take place per comm object. If TMPI_NO_COPY_BUFFER is set, simultaneous
-   collective communications don't happen and 2 is the right value.  */
-#ifdef USE_COLLECTIVE_COPY_BUFFER
-#define N_COLL_ENV 12
-#else
-#define N_COLL_ENV 2
-#endif
-
-
-/* Whether to do profiling of the number of MPI communication calls. A
-    report with the total number of calls for each communication function
-    will be generated at MPI_Finalize().
-
-    This option can be set with cmake.*/
-/*#define TMPI_PROFILE*/
-
-
-/* whether to turn on thread affinity (required for NUMA optimizations)
-   if the number of threads to spawn is equal to the number of processors. */
-#define TMPI_THREAD_AFFINITY
diff --git a/src/include/gromacs/external/thread_mpi/src/tmpi_ops.h b/src/include/gromacs/external/thread_mpi/src/tmpi_ops.h
deleted file mode 100644 (file)
index d454d4d..0000000
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Written by Sander Pronk, Erik Lindahl, and possibly others.
-
-   Copyright (c) 2009, Sander Pronk, Erik Lindahl.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-
-#ifdef THREAD_MPI_OPS
-
-/* cpp wizardry follows...
-
-   This file is #included directly from thread_mpi.c, and constructs
-   MPI_Reduce operators.
-
-   What this does is create the min, max, sum, prod, etc. functions for a given
-   datatype (pre-defined as TYPE, with identifier name TYPENM) and puts pointers
-   to these functions in an array called oplist_TYPENM.
-
-   gmx_thread_mpi_reduce.c includes this file once for each type used by MPI,
-   and thus builds up a set of arrays of function pointers, that then get used
-   in the mpi_datatype_ structure. This way, each operation/datatype entry
-   that makes sense can be extracted easily. Note that we don't (yet) support
-   user-defined ops */
-
-#define FNAMEr(tp, fn) tMPI_ ## tp ## _ ## fn
-#define FNAME(tp, fn) FNAMEr(tp, fn)
-
-/* macros to define functions and prototypes based on a name and an operation */
-#define FNr(tp, fname, fn) \
-    static void tMPI_ ## tp ## _ ## fname  (void *dest, void *src_a, void *src_b, \
-                                            int count) \
-    { \
-        /*printf("in function %s, count=%d\n", __FUNCTION__, count);*/ \
-        TYPE *a = (TYPE*)src_a; \
-        TYPE *b = (TYPE*)src_b; \
-        TYPE *d = (TYPE*)dest; \
-        int   i; \
-        for (i = 0; i < count; i++) { \
-            d[i] = (TYPE)(fn(a[i], b[i])); } \
-    }
-
-#define FN(tp, fname, fn) FNr(tp, fname, fn)
-
-#define OPFNr(tp, fname, operator)  \
-              static void tMPI_ ## tp ## _ ## fname  (void *dest, void *src_a, void *src_b, \
-                                                      int count) \
-              { \
-                  /*printf("in function %s, count=%d\n", __FUNCTION__, count);*/ \
-                  TYPE *a = (TYPE*)src_a; \
-                  TYPE *b = (TYPE*)src_b; \
-                  TYPE *d = (TYPE*)dest; \
-                  int i; \
-                  for (i = 0; i < count; i++) { \
-                      d[i] = (TYPE)(a[i] operator b[i]); } \
-              }
-
-#define OPFN(tp, fname, operator) OPFNr(tp, fname, operator)
-
-
-/* these are the function prototypes + definitions: */
-#if TYPECATEGORY!=LOGICALTYPE
-#define MAX(a, b)  (( (a) > (b) ) ? (a) : (b))
-FN(TYPENM, max, MAX)
-#undef MAX
-#define MIN(a, b)  (( (a) < (b) ) ? (a) : (b))
-FN(TYPENM, min, MIN)
-#undef MIN
-OPFN(TYPENM, sum, +)
-OPFN(TYPENM, prod, *)
-#endif
-#if TYPECATEGORY!=FLOATTYPE
-OPFN(TYPENM, land, &&)
-OPFN(TYPENM, lor, ||)
-#define XOR(a, b)  ( (!a) ^ (!b) )
-FN(TYPENM, lxor, XOR)
-#undef XOR
-#endif
-#if TYPECATEGORY==INTTYPE
-OPFN(TYPENM, band, &)
-OPFN(TYPENM, bor, |)
-OPFN(TYPENM, bxor, ^)
-#endif
-
-#define OPARRAYr(tp) oplist_ ## tp
-#define OPARRAY(tp) OPARRAYr(tp)
-
-tMPI_Op_fn OPARRAY(TYPENM)[] =
-{
-#if TYPECATEGORY==LOGICALTYPE
-    0,
-    0,
-    0,
-    0,
-    FNAME(TYPENM, land),
-    0,
-    FNAME(TYPENM, lor),
-    0,
-    FNAME(TYPENM, lxor),
-    0,
-#else
-    FNAME(TYPENM, max),
-    FNAME(TYPENM, min),
-    FNAME(TYPENM, sum),
-    FNAME(TYPENM, prod),
-#if TYPECATEGORY==INTTYPE
-    FNAME(TYPENM, land),
-    FNAME(TYPENM, band),
-    FNAME(TYPENM, lor),
-    FNAME(TYPENM, bor),
-    FNAME(TYPENM, lxor),
-    FNAME(TYPENM, bxor)
-#else
-    0,
-    0,
-    0,
-    0,
-    0,
-    0
-#endif
-#endif
-};
-
-
-#undef FNAME
-#undef FNAMEr
-#undef OPARRAYr
-#undef OPARRAY
-#undef FN
-#undef FNr
-#undef OPFN
-#undef OPFNr
-
-#undef TYPE
-#undef TYPENM
-#undef TYPECATEGORY
-#endif
diff --git a/src/include/gromacs/external/thread_mpi/src/unused.h b/src/include/gromacs/external/thread_mpi/src/unused.h
deleted file mode 100644 (file)
index 6287c67..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Written by Sander Pronk, Erik Lindahl, and possibly others.
-
-   Copyright (c) 2009, Sander Pronk, Erik Lindahl.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-/*
- * These attributes suppress compiler warnings about unused function arguments
- * by marking them as possibly unused. Some arguments are unused but
- * have to be retained to preserve a function signature
- * that must match that of another function.
- * Some arguments are only used in *some* code paths (e.g. MPI)
- */
-
-#ifndef tmpi_unused
-#ifdef __GNUC__
-/* GCC, clang, and some ICC pretending to be GCC */
-#  define tmpi_unused __attribute__ ((unused))
-#elif (defined(__INTEL_COMPILER) || defined(__ECC)) && !defined(_MSC_VER)
-/* ICC on *nix */
-#  define tmpi_unused __attribute__ ((unused))
-#elif defined _MSC_VER
-/* MSVC */
-#  define tmpi_unused /*@unused@*/
-#elif defined(__xlC__)
-/* IBM */
-#  define tmpi_unused __attribute__ ((unused))
-#else
-#  define tmpi_unused
-#endif
-#endif
diff --git a/src/include/gromacs/external/thread_mpi/src/winthreads.h b/src/include/gromacs/external/thread_mpi/src/winthreads.h
deleted file mode 100644 (file)
index ba97d7e..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
-   This source code file is part of thread_mpi.
-   Written by Sander Pronk, Erik Lindahl, and possibly others.
-
-   Copyright (c) 2009, Sander Pronk, Erik Lindahl.
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions are met:
-   1) Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   2) Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   3) Neither the name of the copyright holders nor the
-   names of its contributors may be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY US ''AS IS'' AND ANY
-   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-   DISCLAIMED. IN NO EVENT SHALL WE BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   If you want to redistribute modifications, 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 should not
-   be called official thread_mpi. Details are found in the README & COPYING
-   files.
- */
-
-/* the types that were defined in include/thread_mpi/threads.h */
-
-
-struct tMPI_Thread
-{
-    HANDLE th;              /* the thread handle */
-    DWORD  id;              /* the thread ID */
-    int    started_by_tmpi; /* whether this thread was started by tmpi */
-};
-
-struct tMPI_Thread_key
-{
-    DWORD wkey;
-};
-
-struct tMPI_Mutex
-{
-    CRITICAL_SECTION cs;
-};
-
-struct tMPI_Thread_once
-{
-    int dum;
-};
-
-struct tMPI_Thread_cond
-{
-#if 0
-    /* this works since Windows Vista: */
-    CONDITION_VARIABLE cv;
-#else
-    /* this data structure and its algorithms are based on
-       'Strategies for Implementing POSIX Condition Variables on Win32'
-       by
-       Douglas C. Schmidt and Irfan Pyarali
-       Department of Computer Science
-       Washington University, St. Louis, Missouri
-       http://www.cs.wustl.edu/~schmidt/win32-cv-1.html */
-    int              Nwaiters; /* number of waiting threads */
-    CRITICAL_SECTION wtr_lock; /* lock for Nwaiters */
-    int              Nrelease; /* number of threads to release in broadcast/signal */
-    int              cycle;    /* cycle number so threads can't steal signals */
-    HANDLE           ev;       /* the event used to trigger WaitForSingleObject.
-                                  Is a manual reset event.  */
-#endif
-};
-
-struct tMPI_Thread_barrier
-{
-#if 0
-    /* use this once Vista is the oldest supported windows version: */
-    CRITICAL_SECTION   cs;    /*!< Lock for the barrier
-                                 contents          */
-    CONDITION_VARIABLE cv;    /*!< Condition to signal barrier
-                                 completion */
-#else
-    tMPI_Thread_mutex_t cs;   /*!< Lock for the barrier contents          */
-    tMPI_Thread_cond_t  cv;   /*!< Condition to signal barrier completion */
-#endif
-};
diff --git a/src/include/gromacs/external/tinyxml2/tinyxml2.h b/src/include/gromacs/external/tinyxml2/tinyxml2.h
deleted file mode 100755 (executable)
index a4769c8..0000000
+++ /dev/null
@@ -1,2130 +0,0 @@
-/*
-Original code by Lee Thomason (www.grinninglizard.com)
-
-This software is provided 'as-is', without any express or implied
-warranty. In no event will the authors be held liable for any
-damages arising from the use of this software.
-
-Permission is granted to anyone to use this software for any
-purpose, including commercial applications, and to alter it and
-redistribute it freely, subject to the following restrictions:
-
-1. The origin of this software must not be misrepresented; you must
-not claim that you wrote the original software. If you use this
-software in a product, an acknowledgment in the product documentation
-would be appreciated but is not required.
-
-2. Altered source versions must be plainly marked as such, and
-must not be misrepresented as being the original software.
-
-3. This notice may not be removed or altered from any source
-distribution.
-*/
-
-#ifndef TINYXML2_INCLUDED
-#define TINYXML2_INCLUDED
-
-#if defined(ANDROID_NDK) || defined(__BORLANDC__) || defined(__QNXNTO__)
-#   include <ctype.h>
-#   include <limits.h>
-#   include <stdio.h>
-#   include <stdlib.h>
-#   include <string.h>
-#   include <stdarg.h>
-#else
-#   include <cctype>
-#   include <climits>
-#   include <cstdio>
-#   include <cstdlib>
-#   include <cstring>
-#   include <cstdarg>
-#endif
-
-/*
-   TODO: intern strings instead of allocation.
-*/
-/*
-       gcc:
-        g++ -Wall -DDEBUG tinyxml2.cpp xmltest.cpp -o gccxmltest.exe
-
-    Formatting, Artistic Style:
-        AStyle.exe --style=1tbs --indent-switches --break-closing-brackets --indent-preprocessor tinyxml2.cpp tinyxml2.h
-*/
-
-#if defined( _DEBUG ) || defined( DEBUG ) || defined (__DEBUG__)
-#   ifndef DEBUG
-#       define DEBUG
-#   endif
-#endif
-
-#ifdef _MSC_VER
-#   pragma warning(push)
-#   pragma warning(disable: 4251)
-#endif
-
-#ifdef _WIN32
-#   ifdef TINYXML2_EXPORT
-#       define TINYXML2_LIB __declspec(dllexport)
-#   elif defined(TINYXML2_IMPORT)
-#       define TINYXML2_LIB __declspec(dllimport)
-#   else
-#       define TINYXML2_LIB
-#   endif
-#else
-#   define TINYXML2_LIB
-#endif
-
-
-#if defined(DEBUG)
-#   if defined(_MSC_VER)
-#       // "(void)0," is for suppressing C4127 warning in "assert(false)", "assert(true)" and the like
-#       define TIXMLASSERT( x )           if ( !((void)0,(x))) { __debugbreak(); } //if ( !(x)) WinDebugBreak()
-#   elif defined (ANDROID_NDK)
-#       include <android/log.h>
-#       define TIXMLASSERT( x )           if ( !(x)) { __android_log_assert( "assert", "grinliz", "ASSERT in '%s' at %d.", __FILE__, __LINE__ ); }
-#   else
-#       include <assert.h>
-#       define TIXMLASSERT                assert
-#   endif
-#   else
-#       define TIXMLASSERT( x )           {}
-#endif
-
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1400 ) && (!defined WINCE)
-// Microsoft visual studio, version 2005 and higher.
-/*int _snprintf_s(
-   char *buffer,
-   size_t sizeOfBuffer,
-   size_t count,
-   const char *format [,
-         argument] ...
-);*/
-inline int TIXML_SNPRINTF( char* buffer, size_t size, const char* format, ... )
-{
-    va_list va;
-    va_start( va, format );
-    int result = vsnprintf_s( buffer, size, _TRUNCATE, format, va );
-    va_end( va );
-    return result;
-}
-#define TIXML_SSCANF   sscanf_s
-#elif defined WINCE
-#define TIXML_SNPRINTF _snprintf
-#define TIXML_SSCANF   sscanf
-#else
-// GCC version 3 and higher
-//#warning( "Using sn* functions." )
-#define TIXML_SNPRINTF snprintf
-#define TIXML_SSCANF   sscanf
-#endif
-
-/* Versioning, past 1.0.14:
-       http://semver.org/
-*/
-static const int TIXML2_MAJOR_VERSION = 3;
-static const int TIXML2_MINOR_VERSION = 0;
-static const int TIXML2_PATCH_VERSION = 0;
-
-namespace tinyxml2
-{
-class XMLDocument;
-class XMLElement;
-class XMLAttribute;
-class XMLComment;
-class XMLText;
-class XMLDeclaration;
-class XMLUnknown;
-class XMLPrinter;
-
-/*
-       A class that wraps strings. Normally stores the start and end
-       pointers into the XML file itself, and will apply normalization
-       and entity translation if actually read. Can also store (and memory
-       manage) a traditional char[]
-*/
-class StrPair
-{
-public:
-    enum {
-        NEEDS_ENTITY_PROCESSING                        = 0x01,
-        NEEDS_NEWLINE_NORMALIZATION            = 0x02,
-        COLLAPSE_WHITESPACE                    = 0x04,
-
-        TEXT_ELEMENT                           = NEEDS_ENTITY_PROCESSING | NEEDS_NEWLINE_NORMALIZATION,
-        TEXT_ELEMENT_LEAVE_ENTITIES            = NEEDS_NEWLINE_NORMALIZATION,
-        ATTRIBUTE_NAME                         = 0,
-        ATTRIBUTE_VALUE                                = NEEDS_ENTITY_PROCESSING | NEEDS_NEWLINE_NORMALIZATION,
-        ATTRIBUTE_VALUE_LEAVE_ENTITIES         = NEEDS_NEWLINE_NORMALIZATION,
-        COMMENT                                        = NEEDS_NEWLINE_NORMALIZATION
-    };
-
-    StrPair() : _flags( 0 ), _start( 0 ), _end( 0 ) {}
-    ~StrPair();
-
-    void Set( char* start, char* end, int flags ) {
-        Reset();
-        _start  = start;
-        _end    = end;
-        _flags  = flags | NEEDS_FLUSH;
-    }
-
-    const char* GetStr();
-
-    bool Empty() const {
-        return _start == _end;
-    }
-
-    void SetInternedStr( const char* str ) {
-        Reset();
-        _start = const_cast<char*>(str);
-    }
-
-    void SetStr( const char* str, int flags=0 );
-
-    char* ParseText( char* in, const char* endTag, int strFlags );
-    char* ParseName( char* in );
-
-    void TransferTo( StrPair* other );
-
-private:
-    void Reset();
-    void CollapseWhitespace();
-
-    enum {
-        NEEDS_FLUSH = 0x100,
-        NEEDS_DELETE = 0x200
-    };
-
-    // After parsing, if *_end != 0, it can be set to zero.
-    int     _flags;
-    char*   _start;
-    char*   _end;
-
-    StrPair( const StrPair& other );   // not supported
-    void operator=( StrPair& other );  // not supported, use TransferTo()
-};
-
-
-/*
-       A dynamic array of Plain Old Data. Doesn't support constructors, etc.
-       Has a small initial memory pool, so that low or no usage will not
-       cause a call to new/delete
-*/
-template <class T, int INIT>
-class DynArray
-{
-public:
-    DynArray() {
-        _mem = _pool;
-        _allocated = INIT;
-        _size = 0;
-    }
-
-    ~DynArray() {
-        if ( _mem != _pool ) {
-            delete [] _mem;
-        }
-    }
-
-    void Clear() {
-        _size = 0;
-    }
-
-    void Push( T t ) {
-        TIXMLASSERT( _size < INT_MAX );
-        EnsureCapacity( _size+1 );
-        _mem[_size++] = t;
-    }
-
-    T* PushArr( int count ) {
-        TIXMLASSERT( count >= 0 );
-        TIXMLASSERT( _size <= INT_MAX - count );
-        EnsureCapacity( _size+count );
-        T* ret = &_mem[_size];
-        _size += count;
-        return ret;
-    }
-
-    T Pop() {
-        TIXMLASSERT( _size > 0 );
-        return _mem[--_size];
-    }
-
-    void PopArr( int count ) {
-        TIXMLASSERT( _size >= count );
-        _size -= count;
-    }
-
-    bool Empty() const                                 {
-        return _size == 0;
-    }
-
-    T& operator[](int i)                               {
-        TIXMLASSERT( i>= 0 && i < _size );
-        return _mem[i];
-    }
-
-    const T& operator[](int i) const   {
-        TIXMLASSERT( i>= 0 && i < _size );
-        return _mem[i];
-    }
-
-    const T& PeekTop() const            {
-        TIXMLASSERT( _size > 0 );
-        return _mem[ _size - 1];
-    }
-
-    int Size() const                                   {
-        TIXMLASSERT( _size >= 0 );
-        return _size;
-    }
-
-    int Capacity() const                               {
-        return _allocated;
-    }
-
-    const T* Mem() const                               {
-        return _mem;
-    }
-
-    T* Mem()                                                   {
-        return _mem;
-    }
-
-private:
-    DynArray( const DynArray& ); // not supported
-    void operator=( const DynArray& ); // not supported
-
-    void EnsureCapacity( int cap ) {
-        TIXMLASSERT( cap > 0 );
-        if ( cap > _allocated ) {
-            TIXMLASSERT( cap <= INT_MAX / 2 );
-            int newAllocated = cap * 2;
-            T* newMem = new T[newAllocated];
-            memcpy( newMem, _mem, sizeof(T)*_size );   // warning: not using constructors, only works for PODs
-            if ( _mem != _pool ) {
-                delete [] _mem;
-            }
-            _mem = newMem;
-            _allocated = newAllocated;
-        }
-    }
-
-    T*  _mem;
-    T   _pool[INIT];
-    int _allocated;            // objects allocated
-    int _size;                 // number objects in use
-};
-
-
-/*
-       Parent virtual class of a pool for fast allocation
-       and deallocation of objects.
-*/
-class MemPool
-{
-public:
-    MemPool() {}
-    virtual ~MemPool() {}
-
-    virtual int ItemSize() const = 0;
-    virtual void* Alloc() = 0;
-    virtual void Free( void* ) = 0;
-    virtual void SetTracked() = 0;
-    virtual void Clear() = 0;
-};
-
-
-/*
-       Template child class to create pools of the correct type.
-*/
-template< int SIZE >
-class MemPoolT : public MemPool
-{
-public:
-    MemPoolT() : _root(0), _currentAllocs(0), _nAllocs(0), _maxAllocs(0), _nUntracked(0)       {}
-    ~MemPoolT() {
-        Clear();
-    }
-    
-    void Clear() {
-        // Delete the blocks.
-        while( !_blockPtrs.Empty()) {
-            Block* b  = _blockPtrs.Pop();
-            delete b;
-        }
-        _root = 0;
-        _currentAllocs = 0;
-        _nAllocs = 0;
-        _maxAllocs = 0;
-        _nUntracked = 0;
-    }
-
-    virtual int ItemSize() const       {
-        return SIZE;
-    }
-    int CurrentAllocs() const          {
-        return _currentAllocs;
-    }
-
-    virtual void* Alloc() {
-        if ( !_root ) {
-            // Need a new block.
-            Block* block = new Block();
-            _blockPtrs.Push( block );
-
-            for( int i=0; i<COUNT-1; ++i ) {
-                block->chunk[i].next = &block->chunk[i+1];
-            }
-            block->chunk[COUNT-1].next = 0;
-            _root = block->chunk;
-        }
-        void* result = _root;
-        _root = _root->next;
-
-        ++_currentAllocs;
-        if ( _currentAllocs > _maxAllocs ) {
-            _maxAllocs = _currentAllocs;
-        }
-        _nAllocs++;
-        _nUntracked++;
-        return result;
-    }
-    
-    virtual void Free( void* mem ) {
-        if ( !mem ) {
-            return;
-        }
-        --_currentAllocs;
-        Chunk* chunk = static_cast<Chunk*>( mem );
-#ifdef DEBUG
-        memset( chunk, 0xfe, sizeof(Chunk) );
-#endif
-        chunk->next = _root;
-        _root = chunk;
-    }
-    void Trace( const char* name ) {
-        printf( "Mempool %s watermark=%d [%dk] current=%d size=%d nAlloc=%d blocks=%d\n",
-                name, _maxAllocs, _maxAllocs*SIZE/1024, _currentAllocs, SIZE, _nAllocs, _blockPtrs.Size() );
-    }
-
-    void SetTracked() {
-        _nUntracked--;
-    }
-
-    int Untracked() const {
-        return _nUntracked;
-    }
-
-       // This number is perf sensitive. 4k seems like a good tradeoff on my machine.
-       // The test file is large, 170k.
-       // Release:             VS2010 gcc(no opt)
-       //              1k:             4000
-       //              2k:             4000
-       //              4k:             3900    21000
-       //              16k:    5200
-       //              32k:    4300
-       //              64k:    4000    21000
-    enum { COUNT = (4*1024)/SIZE }; // Some compilers do not accept to use COUNT in private part if COUNT is private
-
-private:
-    MemPoolT( const MemPoolT& ); // not supported
-    void operator=( const MemPoolT& ); // not supported
-
-    union Chunk {
-        Chunk*  next;
-        char    mem[SIZE];
-    };
-    struct Block {
-        Chunk chunk[COUNT];
-    };
-    DynArray< Block*, 10 > _blockPtrs;
-    Chunk* _root;
-
-    int _currentAllocs;
-    int _nAllocs;
-    int _maxAllocs;
-    int _nUntracked;
-};
-
-
-
-/**
-       Implements the interface to the "Visitor pattern" (see the Accept() method.)
-       If you call the Accept() method, it requires being passed a XMLVisitor
-       class to handle callbacks. For nodes that contain other nodes (Document, Element)
-       you will get called with a VisitEnter/VisitExit pair. Nodes that are always leafs
-       are simply called with Visit().
-
-       If you return 'true' from a Visit method, recursive parsing will continue. If you return
-       false, <b>no children of this node or its siblings</b> will be visited.
-
-       All flavors of Visit methods have a default implementation that returns 'true' (continue
-       visiting). You need to only override methods that are interesting to you.
-
-       Generally Accept() is called on the XMLDocument, although all nodes support visiting.
-
-       You should never change the document from a callback.
-
-       @sa XMLNode::Accept()
-*/
-class TINYXML2_LIB XMLVisitor
-{
-public:
-    virtual ~XMLVisitor() {}
-
-    /// Visit a document.
-    virtual bool VisitEnter( const XMLDocument& /*doc*/ )                      {
-        return true;
-    }
-    /// Visit a document.
-    virtual bool VisitExit( const XMLDocument& /*doc*/ )                       {
-        return true;
-    }
-
-    /// Visit an element.
-    virtual bool VisitEnter( const XMLElement& /*element*/, const XMLAttribute* /*firstAttribute*/ )   {
-        return true;
-    }
-    /// Visit an element.
-    virtual bool VisitExit( const XMLElement& /*element*/ )                    {
-        return true;
-    }
-
-    /// Visit a declaration.
-    virtual bool Visit( const XMLDeclaration& /*declaration*/ )                {
-        return true;
-    }
-    /// Visit a text node.
-    virtual bool Visit( const XMLText& /*text*/ )                                      {
-        return true;
-    }
-    /// Visit a comment node.
-    virtual bool Visit( const XMLComment& /*comment*/ )                                {
-        return true;
-    }
-    /// Visit an unknown node.
-    virtual bool Visit( const XMLUnknown& /*unknown*/ )                                {
-        return true;
-    }
-};
-
-// WARNING: must match XMLDocument::_errorNames[]
-enum XMLError {
-    XML_SUCCESS = 0,
-    XML_NO_ERROR = 0,
-    XML_NO_ATTRIBUTE,
-    XML_WRONG_ATTRIBUTE_TYPE,
-    XML_ERROR_FILE_NOT_FOUND,
-    XML_ERROR_FILE_COULD_NOT_BE_OPENED,
-    XML_ERROR_FILE_READ_ERROR,
-    XML_ERROR_ELEMENT_MISMATCH,
-    XML_ERROR_PARSING_ELEMENT,
-    XML_ERROR_PARSING_ATTRIBUTE,
-    XML_ERROR_IDENTIFYING_TAG,
-    XML_ERROR_PARSING_TEXT,
-    XML_ERROR_PARSING_CDATA,
-    XML_ERROR_PARSING_COMMENT,
-    XML_ERROR_PARSING_DECLARATION,
-    XML_ERROR_PARSING_UNKNOWN,
-    XML_ERROR_EMPTY_DOCUMENT,
-    XML_ERROR_MISMATCHED_ELEMENT,
-    XML_ERROR_PARSING,
-    XML_CAN_NOT_CONVERT_TEXT,
-    XML_NO_TEXT_NODE,
-
-       XML_ERROR_COUNT
-};
-
-
-/*
-       Utility functionality.
-*/
-class XMLUtil
-{
-public:
-    static const char* SkipWhiteSpace( const char* p ) {
-        TIXMLASSERT( p );
-        while( IsWhiteSpace(*p) ) {
-            ++p;
-        }
-        TIXMLASSERT( p );
-        return p;
-    }
-    static char* SkipWhiteSpace( char* p )                             {
-        return const_cast<char*>( SkipWhiteSpace( const_cast<const char*>(p) ) );
-    }
-
-    // Anything in the high order range of UTF-8 is assumed to not be whitespace. This isn't
-    // correct, but simple, and usually works.
-    static bool IsWhiteSpace( char p )                                 {
-        return !IsUTF8Continuation(p) && isspace( static_cast<unsigned char>(p) );
-    }
-    
-    inline static bool IsNameStartChar( unsigned char ch ) {
-        if ( ch >= 128 ) {
-            // This is a heuristic guess in attempt to not implement Unicode-aware isalpha()
-            return true;
-        }
-        if ( isalpha( ch ) ) {
-            return true;
-        }
-        return ch == ':' || ch == '_';
-    }
-    
-    inline static bool IsNameChar( unsigned char ch ) {
-        return IsNameStartChar( ch )
-               || isdigit( ch )
-               || ch == '.'
-               || ch == '-';
-    }
-
-    inline static bool StringEqual( const char* p, const char* q, int nChar=INT_MAX )  {
-        if ( p == q ) {
-            return true;
-        }
-        int n = 0;
-        while( *p && *q && *p == *q && n<nChar ) {
-            ++p;
-            ++q;
-            ++n;
-        }
-        if ( (n == nChar) || ( *p == 0 && *q == 0 ) ) {
-            return true;
-        }
-        return false;
-    }
-    
-    inline static bool IsUTF8Continuation( const char p ) {
-        return ( p & 0x80 ) != 0;
-    }
-
-    static const char* ReadBOM( const char* p, bool* hasBOM );
-    // p is the starting location,
-    // the UTF-8 value of the entity will be placed in value, and length filled in.
-    static const char* GetCharacterRef( const char* p, char* value, int* length );
-    static void ConvertUTF32ToUTF8( unsigned long input, char* output, int* length );
-
-    // converts primitive types to strings
-    static void ToStr( int v, char* buffer, int bufferSize );
-    static void ToStr( unsigned v, char* buffer, int bufferSize );
-    static void ToStr( bool v, char* buffer, int bufferSize );
-    static void ToStr( float v, char* buffer, int bufferSize );
-    static void ToStr( double v, char* buffer, int bufferSize );
-
-    // converts strings to primitive types
-    static bool        ToInt( const char* str, int* value );
-    static bool ToUnsigned( const char* str, unsigned* value );
-    static bool        ToBool( const char* str, bool* value );
-    static bool        ToFloat( const char* str, float* value );
-    static bool ToDouble( const char* str, double* value );
-};
-
-
-/** XMLNode is a base class for every object that is in the
-       XML Document Object Model (DOM), except XMLAttributes.
-       Nodes have siblings, a parent, and children which can
-       be navigated. A node is always in a XMLDocument.
-       The type of a XMLNode can be queried, and it can
-       be cast to its more defined type.
-
-       A XMLDocument allocates memory for all its Nodes.
-       When the XMLDocument gets deleted, all its Nodes
-       will also be deleted.
-
-       @verbatim
-       A Document can contain: Element (container or leaf)
-                                                       Comment (leaf)
-                                                       Unknown (leaf)
-                                                       Declaration( leaf )
-
-       An Element can contain: Element (container or leaf)
-                                                       Text    (leaf)
-                                                       Attributes (not on tree)
-                                                       Comment (leaf)
-                                                       Unknown (leaf)
-
-       @endverbatim
-*/
-class TINYXML2_LIB XMLNode
-{
-    friend class XMLDocument;
-    friend class XMLElement;
-public:
-
-    /// Get the XMLDocument that owns this XMLNode.
-    const XMLDocument* GetDocument() const     {
-        return _document;
-    }
-    /// Get the XMLDocument that owns this XMLNode.
-    XMLDocument* GetDocument()                         {
-        return _document;
-    }
-
-    /// Safely cast to an Element, or null.
-    virtual XMLElement*                ToElement()             {
-        return 0;
-    }
-    /// Safely cast to Text, or null.
-    virtual XMLText*           ToText()                {
-        return 0;
-    }
-    /// Safely cast to a Comment, or null.
-    virtual XMLComment*                ToComment()             {
-        return 0;
-    }
-    /// Safely cast to a Document, or null.
-    virtual XMLDocument*       ToDocument()    {
-        return 0;
-    }
-    /// Safely cast to a Declaration, or null.
-    virtual XMLDeclaration*    ToDeclaration() {
-        return 0;
-    }
-    /// Safely cast to an Unknown, or null.
-    virtual XMLUnknown*                ToUnknown()             {
-        return 0;
-    }
-
-    virtual const XMLElement*          ToElement() const               {
-        return 0;
-    }
-    virtual const XMLText*                     ToText() const                  {
-        return 0;
-    }
-    virtual const XMLComment*          ToComment() const               {
-        return 0;
-    }
-    virtual const XMLDocument*         ToDocument() const              {
-        return 0;
-    }
-    virtual const XMLDeclaration*      ToDeclaration() const   {
-        return 0;
-    }
-    virtual const XMLUnknown*          ToUnknown() const               {
-        return 0;
-    }
-
-    /** The meaning of 'value' changes for the specific type.
-       @verbatim
-       Document:       empty
-       Element:        name of the element
-       Comment:        the comment text
-       Unknown:        the tag contents
-       Text:           the text string
-       @endverbatim
-    */
-    const char* Value() const;
-
-    /** Set the Value of an XML node.
-       @sa Value()
-    */
-    void SetValue( const char* val, bool staticMem=false );
-
-    /// Get the parent of this node on the DOM.
-    const XMLNode*     Parent() const                  {
-        return _parent;
-    }
-
-    XMLNode* Parent()                                          {
-        return _parent;
-    }
-
-    /// Returns true if this node has no children.
-    bool NoChildren() const                                    {
-        return !_firstChild;
-    }
-
-    /// Get the first child node, or null if none exists.
-    const XMLNode*  FirstChild() const         {
-        return _firstChild;
-    }
-
-    XMLNode*           FirstChild()                    {
-        return _firstChild;
-    }
-
-    /** Get the first child element, or optionally the first child
-        element with the specified name.
-    */
-    const XMLElement* FirstChildElement( const char* value=0 ) const;
-
-    XMLElement* FirstChildElement( const char* value=0 )       {
-        return const_cast<XMLElement*>(const_cast<const XMLNode*>(this)->FirstChildElement( value ));
-    }
-
-    /// Get the last child node, or null if none exists.
-    const XMLNode*     LastChild() const                                               {
-        return _lastChild;
-    }
-
-    XMLNode*           LastChild()                                                             {
-        return const_cast<XMLNode*>(const_cast<const XMLNode*>(this)->LastChild() );
-    }
-
-    /** Get the last child element or optionally the last child
-        element with the specified name.
-    */
-    const XMLElement* LastChildElement( const char* value=0 ) const;
-
-    XMLElement* LastChildElement( const char* value=0 )        {
-        return const_cast<XMLElement*>(const_cast<const XMLNode*>(this)->LastChildElement(value) );
-    }
-
-    /// Get the previous (left) sibling node of this node.
-    const XMLNode*     PreviousSibling() const                                 {
-        return _prev;
-    }
-
-    XMLNode*   PreviousSibling()                                                       {
-        return _prev;
-    }
-
-    /// Get the previous (left) sibling element of this node, with an optionally supplied name.
-    const XMLElement*  PreviousSiblingElement( const char* value=0 ) const ;
-
-    XMLElement*        PreviousSiblingElement( const char* value=0 ) {
-        return const_cast<XMLElement*>(const_cast<const XMLNode*>(this)->PreviousSiblingElement( value ) );
-    }
-
-    /// Get the next (right) sibling node of this node.
-    const XMLNode*     NextSibling() const                                             {
-        return _next;
-    }
-
-    XMLNode*   NextSibling()                                                           {
-        return _next;
-    }
-
-    /// Get the next (right) sibling element of this node, with an optionally supplied name.
-    const XMLElement*  NextSiblingElement( const char* value=0 ) const;
-
-    XMLElement*        NextSiblingElement( const char* value=0 )       {
-        return const_cast<XMLElement*>(const_cast<const XMLNode*>(this)->NextSiblingElement( value ) );
-    }
-
-    /**
-       Add a child node as the last (right) child.
-               If the child node is already part of the document,
-               it is moved from its old location to the new location.
-               Returns the addThis argument or 0 if the node does not
-               belong to the same document.
-    */
-    XMLNode* InsertEndChild( XMLNode* addThis );
-
-    XMLNode* LinkEndChild( XMLNode* addThis )  {
-        return InsertEndChild( addThis );
-    }
-    /**
-       Add a child node as the first (left) child.
-               If the child node is already part of the document,
-               it is moved from its old location to the new location.
-               Returns the addThis argument or 0 if the node does not
-               belong to the same document.
-    */
-    XMLNode* InsertFirstChild( XMLNode* addThis );
-    /**
-       Add a node after the specified child node.
-               If the child node is already part of the document,
-               it is moved from its old location to the new location.
-               Returns the addThis argument or 0 if the afterThis node
-               is not a child of this node, or if the node does not
-               belong to the same document.
-    */
-    XMLNode* InsertAfterChild( XMLNode* afterThis, XMLNode* addThis );
-
-    /**
-       Delete all the children of this node.
-    */
-    void DeleteChildren();
-
-    /**
-       Delete a child of this node.
-    */
-    void DeleteChild( XMLNode* node );
-
-    /**
-       Make a copy of this node, but not its children.
-       You may pass in a Document pointer that will be
-       the owner of the new Node. If the 'document' is
-       null, then the node returned will be allocated
-       from the current Document. (this->GetDocument())
-
-       Note: if called on a XMLDocument, this will return null.
-    */
-    virtual XMLNode* ShallowClone( XMLDocument* document ) const = 0;
-
-    /**
-       Test if 2 nodes are the same, but don't test children.
-       The 2 nodes do not need to be in the same Document.
-
-       Note: if called on a XMLDocument, this will return false.
-    */
-    virtual bool ShallowEqual( const XMLNode* compare ) const = 0;
-
-    /** Accept a hierarchical visit of the nodes in the TinyXML-2 DOM. Every node in the
-       XML tree will be conditionally visited and the host will be called back
-       via the XMLVisitor interface.
-
-       This is essentially a SAX interface for TinyXML-2. (Note however it doesn't re-parse
-       the XML for the callbacks, so the performance of TinyXML-2 is unchanged by using this
-       interface versus any other.)
-
-       The interface has been based on ideas from:
-
-       - http://www.saxproject.org/
-       - http://c2.com/cgi/wiki?HierarchicalVisitorPattern
-
-       Which are both good references for "visiting".
-
-       An example of using Accept():
-       @verbatim
-       XMLPrinter printer;
-       tinyxmlDoc.Accept( &printer );
-       const char* xmlcstr = printer.CStr();
-       @endverbatim
-    */
-    virtual bool Accept( XMLVisitor* visitor ) const = 0;
-
-    // internal
-    virtual char* ParseDeep( char*, StrPair* );
-
-protected:
-    XMLNode( XMLDocument* );
-    virtual ~XMLNode();
-
-    XMLDocument*       _document;
-    XMLNode*           _parent;
-    mutable StrPair    _value;
-
-    XMLNode*           _firstChild;
-    XMLNode*           _lastChild;
-
-    XMLNode*           _prev;
-    XMLNode*           _next;
-
-private:
-    MemPool*           _memPool;
-    void Unlink( XMLNode* child );
-    static void DeleteNode( XMLNode* node );
-    void InsertChildPreamble( XMLNode* insertThis ) const;
-
-    XMLNode( const XMLNode& ); // not supported
-    XMLNode& operator=( const XMLNode& );      // not supported
-};
-
-
-/** XML text.
-
-       Note that a text node can have child element nodes, for example:
-       @verbatim
-       <root>This is <b>bold</b></root>
-       @endverbatim
-
-       A text node can have 2 ways to output the next. "normal" output
-       and CDATA. It will default to the mode it was parsed from the XML file and
-       you generally want to leave it alone, but you can change the output mode with
-       SetCData() and query it with CData().
-*/
-class TINYXML2_LIB XMLText : public XMLNode
-{
-    friend class XMLBase;
-    friend class XMLDocument;
-public:
-    virtual bool Accept( XMLVisitor* visitor ) const;
-
-    virtual XMLText* ToText()                  {
-        return this;
-    }
-    virtual const XMLText* ToText() const      {
-        return this;
-    }
-
-    /// Declare whether this should be CDATA or standard text.
-    void SetCData( bool isCData )                      {
-        _isCData = isCData;
-    }
-    /// Returns true if this is a CDATA text element.
-    bool CData() const                                         {
-        return _isCData;
-    }
-
-    char* ParseDeep( char*, StrPair* endTag );
-    virtual XMLNode* ShallowClone( XMLDocument* document ) const;
-    virtual bool ShallowEqual( const XMLNode* compare ) const;
-
-protected:
-    XMLText( XMLDocument* doc )        : XMLNode( doc ), _isCData( false )     {}
-    virtual ~XMLText()                                                                                         {}
-
-private:
-    bool _isCData;
-
-    XMLText( const XMLText& ); // not supported
-    XMLText& operator=( const XMLText& );      // not supported
-};
-
-
-/** An XML Comment. */
-class TINYXML2_LIB XMLComment : public XMLNode
-{
-    friend class XMLDocument;
-public:
-    virtual XMLComment*        ToComment()                                     {
-        return this;
-    }
-    virtual const XMLComment* ToComment() const                {
-        return this;
-    }
-
-    virtual bool Accept( XMLVisitor* visitor ) const;
-
-    char* ParseDeep( char*, StrPair* endTag );
-    virtual XMLNode* ShallowClone( XMLDocument* document ) const;
-    virtual bool ShallowEqual( const XMLNode* compare ) const;
-
-protected:
-    XMLComment( XMLDocument* doc );
-    virtual ~XMLComment();
-
-private:
-    XMLComment( const XMLComment& );   // not supported
-    XMLComment& operator=( const XMLComment& );        // not supported
-};
-
-
-/** In correct XML the declaration is the first entry in the file.
-       @verbatim
-               <?xml version="1.0" standalone="yes"?>
-       @endverbatim
-
-       TinyXML-2 will happily read or write files without a declaration,
-       however.
-
-       The text of the declaration isn't interpreted. It is parsed
-       and written as a string.
-*/
-class TINYXML2_LIB XMLDeclaration : public XMLNode
-{
-    friend class XMLDocument;
-public:
-    virtual XMLDeclaration*    ToDeclaration()                                 {
-        return this;
-    }
-    virtual const XMLDeclaration* ToDeclaration() const                {
-        return this;
-    }
-
-    virtual bool Accept( XMLVisitor* visitor ) const;
-
-    char* ParseDeep( char*, StrPair* endTag );
-    virtual XMLNode* ShallowClone( XMLDocument* document ) const;
-    virtual bool ShallowEqual( const XMLNode* compare ) const;
-
-protected:
-    XMLDeclaration( XMLDocument* doc );
-    virtual ~XMLDeclaration();
-
-private:
-    XMLDeclaration( const XMLDeclaration& );   // not supported
-    XMLDeclaration& operator=( const XMLDeclaration& );        // not supported
-};
-
-
-/** Any tag that TinyXML-2 doesn't recognize is saved as an
-       unknown. It is a tag of text, but should not be modified.
-       It will be written back to the XML, unchanged, when the file
-       is saved.
-
-       DTD tags get thrown into XMLUnknowns.
-*/
-class TINYXML2_LIB XMLUnknown : public XMLNode
-{
-    friend class XMLDocument;
-public:
-    virtual XMLUnknown*        ToUnknown()                                     {
-        return this;
-    }
-    virtual const XMLUnknown* ToUnknown() const                {
-        return this;
-    }
-
-    virtual bool Accept( XMLVisitor* visitor ) const;
-
-    char* ParseDeep( char*, StrPair* endTag );
-    virtual XMLNode* ShallowClone( XMLDocument* document ) const;
-    virtual bool ShallowEqual( const XMLNode* compare ) const;
-
-protected:
-    XMLUnknown( XMLDocument* doc );
-    virtual ~XMLUnknown();
-
-private:
-    XMLUnknown( const XMLUnknown& );   // not supported
-    XMLUnknown& operator=( const XMLUnknown& );        // not supported
-};
-
-
-
-/** An attribute is a name-value pair. Elements have an arbitrary
-       number of attributes, each with a unique name.
-
-       @note The attributes are not XMLNodes. You may only query the
-       Next() attribute in a list.
-*/
-class TINYXML2_LIB XMLAttribute
-{
-    friend class XMLElement;
-public:
-    /// The name of the attribute.
-    const char* Name() const;
-
-    /// The value of the attribute.
-    const char* Value() const;
-
-    /// The next attribute in the list.
-    const XMLAttribute* Next() const {
-        return _next;
-    }
-
-    /** IntValue interprets the attribute as an integer, and returns the value.
-        If the value isn't an integer, 0 will be returned. There is no error checking;
-       use QueryIntValue() if you need error checking.
-    */
-    int                 IntValue() const                               {
-        int i=0;
-        QueryIntValue( &i );
-        return i;
-    }
-    /// Query as an unsigned integer. See IntValue()
-    unsigned UnsignedValue() const                     {
-        unsigned i=0;
-        QueryUnsignedValue( &i );
-        return i;
-    }
-    /// Query as a boolean. See IntValue()
-    bool        BoolValue() const                              {
-        bool b=false;
-        QueryBoolValue( &b );
-        return b;
-    }
-    /// Query as a double. See IntValue()
-    double      DoubleValue() const                    {
-        double d=0;
-        QueryDoubleValue( &d );
-        return d;
-    }
-    /// Query as a float. See IntValue()
-    float       FloatValue() const                             {
-        float f=0;
-        QueryFloatValue( &f );
-        return f;
-    }
-
-    /** QueryIntValue interprets the attribute as an integer, and returns the value
-       in the provided parameter. The function will return XML_NO_ERROR on success,
-       and XML_WRONG_ATTRIBUTE_TYPE if the conversion is not successful.
-    */
-    XMLError QueryIntValue( int* value ) const;
-    /// See QueryIntValue
-    XMLError QueryUnsignedValue( unsigned int* value ) const;
-    /// See QueryIntValue
-    XMLError QueryBoolValue( bool* value ) const;
-    /// See QueryIntValue
-    XMLError QueryDoubleValue( double* value ) const;
-    /// See QueryIntValue
-    XMLError QueryFloatValue( float* value ) const;
-
-    /// Set the attribute to a string value.
-    void SetAttribute( const char* value );
-    /// Set the attribute to value.
-    void SetAttribute( int value );
-    /// Set the attribute to value.
-    void SetAttribute( unsigned value );
-    /// Set the attribute to value.
-    void SetAttribute( bool value );
-    /// Set the attribute to value.
-    void SetAttribute( double value );
-    /// Set the attribute to value.
-    void SetAttribute( float value );
-
-private:
-    enum { BUF_SIZE = 200 };
-
-    XMLAttribute() : _next( 0 ), _memPool( 0 ) {}
-    virtual ~XMLAttribute()    {}
-
-    XMLAttribute( const XMLAttribute& );       // not supported
-    void operator=( const XMLAttribute& );     // not supported
-    void SetName( const char* name );
-
-    char* ParseDeep( char* p, bool processEntities );
-
-    mutable StrPair _name;
-    mutable StrPair _value;
-    XMLAttribute*   _next;
-    MemPool*        _memPool;
-};
-
-
-/** The element is a container class. It has a value, the element name,
-       and can contain other elements, text, comments, and unknowns.
-       Elements also contain an arbitrary number of attributes.
-*/
-class TINYXML2_LIB XMLElement : public XMLNode
-{
-    friend class XMLBase;
-    friend class XMLDocument;
-public:
-    /// Get the name of an element (which is the Value() of the node.)
-    const char* Name() const           {
-        return Value();
-    }
-    /// Set the name of the element.
-    void SetName( const char* str, bool staticMem=false )      {
-        SetValue( str, staticMem );
-    }
-
-    virtual XMLElement* ToElement()                            {
-        return this;
-    }
-    virtual const XMLElement* ToElement() const {
-        return this;
-    }
-    virtual bool Accept( XMLVisitor* visitor ) const;
-
-    /** Given an attribute name, Attribute() returns the value
-       for the attribute of that name, or null if none
-       exists. For example:
-
-       @verbatim
-       const char* value = ele->Attribute( "foo" );
-       @endverbatim
-
-       The 'value' parameter is normally null. However, if specified,
-       the attribute will only be returned if the 'name' and 'value'
-       match. This allow you to write code:
-
-       @verbatim
-       if ( ele->Attribute( "foo", "bar" ) ) callFooIsBar();
-       @endverbatim
-
-       rather than:
-       @verbatim
-       if ( ele->Attribute( "foo" ) ) {
-               if ( strcmp( ele->Attribute( "foo" ), "bar" ) == 0 ) callFooIsBar();
-       }
-       @endverbatim
-    */
-    const char* Attribute( const char* name, const char* value=0 ) const;
-
-    /** Given an attribute name, IntAttribute() returns the value
-       of the attribute interpreted as an integer. 0 will be
-       returned if there is an error. For a method with error
-       checking, see QueryIntAttribute()
-    */
-    int                 IntAttribute( const char* name ) const         {
-        int i=0;
-        QueryIntAttribute( name, &i );
-        return i;
-    }
-    /// See IntAttribute()
-    unsigned UnsignedAttribute( const char* name ) const {
-        unsigned i=0;
-        QueryUnsignedAttribute( name, &i );
-        return i;
-    }
-    /// See IntAttribute()
-    bool        BoolAttribute( const char* name ) const        {
-        bool b=false;
-        QueryBoolAttribute( name, &b );
-        return b;
-    }
-    /// See IntAttribute()
-    double      DoubleAttribute( const char* name ) const      {
-        double d=0;
-        QueryDoubleAttribute( name, &d );
-        return d;
-    }
-    /// See IntAttribute()
-    float       FloatAttribute( const char* name ) const       {
-        float f=0;
-        QueryFloatAttribute( name, &f );
-        return f;
-    }
-
-    /** Given an attribute name, QueryIntAttribute() returns
-       XML_NO_ERROR, XML_WRONG_ATTRIBUTE_TYPE if the conversion
-       can't be performed, or XML_NO_ATTRIBUTE if the attribute
-       doesn't exist. If successful, the result of the conversion
-       will be written to 'value'. If not successful, nothing will
-       be written to 'value'. This allows you to provide default
-       value:
-
-       @verbatim
-       int value = 10;
-       QueryIntAttribute( "foo", &value );             // if "foo" isn't found, value will still be 10
-       @endverbatim
-    */
-    XMLError QueryIntAttribute( const char* name, int* value ) const                           {
-        const XMLAttribute* a = FindAttribute( name );
-        if ( !a ) {
-            return XML_NO_ATTRIBUTE;
-        }
-        return a->QueryIntValue( value );
-    }
-    /// See QueryIntAttribute()
-    XMLError QueryUnsignedAttribute( const char* name, unsigned int* value ) const     {
-        const XMLAttribute* a = FindAttribute( name );
-        if ( !a ) {
-            return XML_NO_ATTRIBUTE;
-        }
-        return a->QueryUnsignedValue( value );
-    }
-    /// See QueryIntAttribute()
-    XMLError QueryBoolAttribute( const char* name, bool* value ) const                         {
-        const XMLAttribute* a = FindAttribute( name );
-        if ( !a ) {
-            return XML_NO_ATTRIBUTE;
-        }
-        return a->QueryBoolValue( value );
-    }
-    /// See QueryIntAttribute()
-    XMLError QueryDoubleAttribute( const char* name, double* value ) const                     {
-        const XMLAttribute* a = FindAttribute( name );
-        if ( !a ) {
-            return XML_NO_ATTRIBUTE;
-        }
-        return a->QueryDoubleValue( value );
-    }
-    /// See QueryIntAttribute()
-    XMLError QueryFloatAttribute( const char* name, float* value ) const                       {
-        const XMLAttribute* a = FindAttribute( name );
-        if ( !a ) {
-            return XML_NO_ATTRIBUTE;
-        }
-        return a->QueryFloatValue( value );
-    }
-
-       
-    /** Given an attribute name, QueryAttribute() returns
-       XML_NO_ERROR, XML_WRONG_ATTRIBUTE_TYPE if the conversion
-       can't be performed, or XML_NO_ATTRIBUTE if the attribute
-       doesn't exist. It is overloaded for the primitive types,
-               and is a generally more convenient replacement of
-               QueryIntAttribute() and related functions.
-               
-               If successful, the result of the conversion
-       will be written to 'value'. If not successful, nothing will
-       be written to 'value'. This allows you to provide default
-       value:
-
-       @verbatim
-       int value = 10;
-       QueryAttribute( "foo", &value );                // if "foo" isn't found, value will still be 10
-       @endverbatim
-    */
-       int QueryAttribute( const char* name, int* value ) const {
-               return QueryIntAttribute( name, value );
-       }
-
-       int QueryAttribute( const char* name, unsigned int* value ) const {
-               return QueryUnsignedAttribute( name, value );
-       }
-
-       int QueryAttribute( const char* name, bool* value ) const {
-               return QueryBoolAttribute( name, value );
-       }
-
-       int QueryAttribute( const char* name, double* value ) const {
-               return QueryDoubleAttribute( name, value );
-       }
-
-       int QueryAttribute( const char* name, float* value ) const {
-               return QueryFloatAttribute( name, value );
-       }
-
-       /// Sets the named attribute to value.
-    void SetAttribute( const char* name, const char* value )   {
-        XMLAttribute* a = FindOrCreateAttribute( name );
-        a->SetAttribute( value );
-    }
-    /// Sets the named attribute to value.
-    void SetAttribute( const char* name, int value )                   {
-        XMLAttribute* a = FindOrCreateAttribute( name );
-        a->SetAttribute( value );
-    }
-    /// Sets the named attribute to value.
-    void SetAttribute( const char* name, unsigned value )              {
-        XMLAttribute* a = FindOrCreateAttribute( name );
-        a->SetAttribute( value );
-    }
-    /// Sets the named attribute to value.
-    void SetAttribute( const char* name, bool value )                  {
-        XMLAttribute* a = FindOrCreateAttribute( name );
-        a->SetAttribute( value );
-    }
-    /// Sets the named attribute to value.
-    void SetAttribute( const char* name, double value )                {
-        XMLAttribute* a = FindOrCreateAttribute( name );
-        a->SetAttribute( value );
-    }
-    /// Sets the named attribute to value.
-    void SetAttribute( const char* name, float value )         {
-        XMLAttribute* a = FindOrCreateAttribute( name );
-        a->SetAttribute( value );
-    }
-
-    /**
-       Delete an attribute.
-    */
-    void DeleteAttribute( const char* name );
-
-    /// Return the first attribute in the list.
-    const XMLAttribute* FirstAttribute() const {
-        return _rootAttribute;
-    }
-    /// Query a specific attribute in the list.
-    const XMLAttribute* FindAttribute( const char* name ) const;
-
-    /** Convenience function for easy access to the text inside an element. Although easy
-       and concise, GetText() is limited compared to getting the XMLText child
-       and accessing it directly.
-
-       If the first child of 'this' is a XMLText, the GetText()
-       returns the character string of the Text node, else null is returned.
-
-       This is a convenient method for getting the text of simple contained text:
-       @verbatim
-       <foo>This is text</foo>
-               const char* str = fooElement->GetText();
-       @endverbatim
-
-       'str' will be a pointer to "This is text".
-
-       Note that this function can be misleading. If the element foo was created from
-       this XML:
-       @verbatim
-               <foo><b>This is text</b></foo>
-       @endverbatim
-
-       then the value of str would be null. The first child node isn't a text node, it is
-       another element. From this XML:
-       @verbatim
-               <foo>This is <b>text</b></foo>
-       @endverbatim
-       GetText() will return "This is ".
-    */
-    const char* GetText() const;
-
-    /** Convenience function for easy access to the text inside an element. Although easy
-       and concise, SetText() is limited compared to creating an XMLText child
-       and mutating it directly.
-
-       If the first child of 'this' is a XMLText, SetText() sets its value to
-               the given string, otherwise it will create a first child that is an XMLText.
-
-       This is a convenient method for setting the text of simple contained text:
-       @verbatim
-       <foo>This is text</foo>
-               fooElement->SetText( "Hullaballoo!" );
-       <foo>Hullaballoo!</foo>
-               @endverbatim
-
-       Note that this function can be misleading. If the element foo was created from
-       this XML:
-       @verbatim
-               <foo><b>This is text</b></foo>
-       @endverbatim
-
-       then it will not change "This is text", but rather prefix it with a text element:
-       @verbatim
-               <foo>Hullaballoo!<b>This is text</b></foo>
-       @endverbatim
-               
-               For this XML:
-       @verbatim
-               <foo />
-       @endverbatim
-       SetText() will generate
-       @verbatim
-               <foo>Hullaballoo!</foo>
-       @endverbatim
-    */
-       void SetText( const char* inText );
-    /// Convenience method for setting text inside and element. See SetText() for important limitations.
-    void SetText( int value );
-    /// Convenience method for setting text inside and element. See SetText() for important limitations.
-    void SetText( unsigned value );  
-    /// Convenience method for setting text inside and element. See SetText() for important limitations.
-    void SetText( bool value );  
-    /// Convenience method for setting text inside and element. See SetText() for important limitations.
-    void SetText( double value );  
-    /// Convenience method for setting text inside and element. See SetText() for important limitations.
-    void SetText( float value );  
-
-    /**
-       Convenience method to query the value of a child text node. This is probably best
-       shown by example. Given you have a document is this form:
-       @verbatim
-               <point>
-                       <x>1</x>
-                       <y>1.4</y>
-               </point>
-       @endverbatim
-
-       The QueryIntText() and similar functions provide a safe and easier way to get to the
-       "value" of x and y.
-
-       @verbatim
-               int x = 0;
-               float y = 0;    // types of x and y are contrived for example
-               const XMLElement* xElement = pointElement->FirstChildElement( "x" );
-               const XMLElement* yElement = pointElement->FirstChildElement( "y" );
-               xElement->QueryIntText( &x );
-               yElement->QueryFloatText( &y );
-       @endverbatim
-
-       @returns XML_SUCCESS (0) on success, XML_CAN_NOT_CONVERT_TEXT if the text cannot be converted
-                        to the requested type, and XML_NO_TEXT_NODE if there is no child text to query.
-
-    */
-    XMLError QueryIntText( int* ival ) const;
-    /// See QueryIntText()
-    XMLError QueryUnsignedText( unsigned* uval ) const;
-    /// See QueryIntText()
-    XMLError QueryBoolText( bool* bval ) const;
-    /// See QueryIntText()
-    XMLError QueryDoubleText( double* dval ) const;
-    /// See QueryIntText()
-    XMLError QueryFloatText( float* fval ) const;
-
-    // internal:
-    enum {
-        OPEN,          // <foo>
-        CLOSED,                // <foo/>
-        CLOSING                // </foo>
-    };
-    int ClosingType() const {
-        return _closingType;
-    }
-    char* ParseDeep( char* p, StrPair* endTag );
-    virtual XMLNode* ShallowClone( XMLDocument* document ) const;
-    virtual bool ShallowEqual( const XMLNode* compare ) const;
-
-private:
-    XMLElement( XMLDocument* doc );
-    virtual ~XMLElement();
-    XMLElement( const XMLElement& );   // not supported
-    void operator=( const XMLElement& );       // not supported
-
-    XMLAttribute* FindAttribute( const char* name ) {
-        return const_cast<XMLAttribute*>(const_cast<const XMLElement*>(this)->FindAttribute( name ));
-    }
-    XMLAttribute* FindOrCreateAttribute( const char* name );
-    //void LinkAttribute( XMLAttribute* attrib );
-    char* ParseAttributes( char* p );
-    static void DeleteAttribute( XMLAttribute* attribute );
-
-    enum { BUF_SIZE = 200 };
-    int _closingType;
-    // The attribute list is ordered; there is no 'lastAttribute'
-    // because the list needs to be scanned for dupes before adding
-    // a new attribute.
-    XMLAttribute* _rootAttribute;
-};
-
-
-enum Whitespace {
-    PRESERVE_WHITESPACE,
-    COLLAPSE_WHITESPACE
-};
-
-
-/** A Document binds together all the functionality.
-       It can be saved, loaded, and printed to the screen.
-       All Nodes are connected and allocated to a Document.
-       If the Document is deleted, all its Nodes are also deleted.
-*/
-class TINYXML2_LIB XMLDocument : public XMLNode
-{
-    friend class XMLElement;
-public:
-    /// constructor
-    XMLDocument( bool processEntities = true, Whitespace = PRESERVE_WHITESPACE );
-    ~XMLDocument();
-
-    virtual XMLDocument* ToDocument()                          {
-        return this;
-    }
-    virtual const XMLDocument* ToDocument() const      {
-        return this;
-    }
-
-    /**
-       Parse an XML file from a character string.
-       Returns XML_NO_ERROR (0) on success, or
-       an errorID.
-
-       You may optionally pass in the 'nBytes', which is
-       the number of bytes which will be parsed. If not
-       specified, TinyXML-2 will assume 'xml' points to a
-       null terminated string.
-    */
-    XMLError Parse( const char* xml, size_t nBytes=(size_t)(-1) );
-
-    /**
-       Load an XML file from disk.
-       Returns XML_NO_ERROR (0) on success, or
-       an errorID.
-    */
-    XMLError LoadFile( const char* filename );
-
-    /**
-       Load an XML file from disk. You are responsible
-       for providing and closing the FILE*. 
-     
-        NOTE: The file should be opened as binary ("rb")
-        not text in order for TinyXML-2 to correctly
-        do newline normalization.
-
-       Returns XML_NO_ERROR (0) on success, or
-       an errorID.
-    */
-    XMLError LoadFile( FILE* );
-
-    /**
-       Save the XML file to disk.
-       Returns XML_NO_ERROR (0) on success, or
-       an errorID.
-    */
-    XMLError SaveFile( const char* filename, bool compact = false );
-
-    /**
-       Save the XML file to disk. You are responsible
-       for providing and closing the FILE*.
-
-       Returns XML_NO_ERROR (0) on success, or
-       an errorID.
-    */
-    XMLError SaveFile( FILE* fp, bool compact = false );
-
-    bool ProcessEntities() const               {
-        return _processEntities;
-    }
-    Whitespace WhitespaceMode() const  {
-        return _whitespace;
-    }
-
-    /**
-       Returns true if this document has a leading Byte Order Mark of UTF8.
-    */
-    bool HasBOM() const {
-        return _writeBOM;
-    }
-    /** Sets whether to write the BOM when writing the file.
-    */
-    void SetBOM( bool useBOM ) {
-        _writeBOM = useBOM;
-    }
-
-    /** Return the root element of DOM. Equivalent to FirstChildElement().
-        To get the first node, use FirstChild().
-    */
-    XMLElement* RootElement()                          {
-        return FirstChildElement();
-    }
-    const XMLElement* RootElement() const      {
-        return FirstChildElement();
-    }
-
-    /** Print the Document. If the Printer is not provided, it will
-        print to stdout. If you provide Printer, this can print to a file:
-       @verbatim
-       XMLPrinter printer( fp );
-       doc.Print( &printer );
-       @endverbatim
-
-       Or you can use a printer to print to memory:
-       @verbatim
-       XMLPrinter printer;
-       doc.Print( &printer );
-       // printer.CStr() has a const char* to the XML
-       @endverbatim
-    */
-    void Print( XMLPrinter* streamer=0 ) const;
-    virtual bool Accept( XMLVisitor* visitor ) const;
-
-    /**
-       Create a new Element associated with
-       this Document. The memory for the Element
-       is managed by the Document.
-    */
-    XMLElement* NewElement( const char* name );
-    /**
-       Create a new Comment associated with
-       this Document. The memory for the Comment
-       is managed by the Document.
-    */
-    XMLComment* NewComment( const char* comment );
-    /**
-       Create a new Text associated with
-       this Document. The memory for the Text
-       is managed by the Document.
-    */
-    XMLText* NewText( const char* text );
-    /**
-       Create a new Declaration associated with
-       this Document. The memory for the object
-       is managed by the Document.
-
-       If the 'text' param is null, the standard
-       declaration is used.:
-       @verbatim
-               <?xml version="1.0" encoding="UTF-8"?>
-       @endverbatim
-    */
-    XMLDeclaration* NewDeclaration( const char* text=0 );
-    /**
-       Create a new Unknown associated with
-       this Document. The memory for the object
-       is managed by the Document.
-    */
-    XMLUnknown* NewUnknown( const char* text );
-
-    /**
-       Delete a node associated with this document.
-       It will be unlinked from the DOM.
-    */
-    void DeleteNode( XMLNode* node );
-
-    void SetError( XMLError error, const char* str1, const char* str2 );
-
-    /// Return true if there was an error parsing the document.
-    bool Error() const {
-        return _errorID != XML_NO_ERROR;
-    }
-    /// Return the errorID.
-    XMLError  ErrorID() const {
-        return _errorID;
-    }
-       const char* ErrorName() const;
-
-    /// Return a possibly helpful diagnostic location or string.
-    const char* GetErrorStr1() const {
-        return _errorStr1;
-    }
-    /// Return a possibly helpful secondary diagnostic location or string.
-    const char* GetErrorStr2() const {
-        return _errorStr2;
-    }
-    /// If there is an error, print it to stdout.
-    void PrintError() const;
-    
-    /// Clear the document, resetting it to the initial state.
-    void Clear();
-
-    // internal
-    char* Identify( char* p, XMLNode** node );
-
-    virtual XMLNode* ShallowClone( XMLDocument* /*document*/ ) const   {
-        return 0;
-    }
-    virtual bool ShallowEqual( const XMLNode* /*compare*/ ) const      {
-        return false;
-    }
-
-private:
-    XMLDocument( const XMLDocument& ); // not supported
-    void operator=( const XMLDocument& );      // not supported
-
-    bool        _writeBOM;
-    bool        _processEntities;
-    XMLError    _errorID;
-    Whitespace  _whitespace;
-    const char* _errorStr1;
-    const char* _errorStr2;
-    char*       _charBuffer;
-
-    MemPoolT< sizeof(XMLElement) >      _elementPool;
-    MemPoolT< sizeof(XMLAttribute) > _attributePool;
-    MemPoolT< sizeof(XMLText) >                 _textPool;
-    MemPoolT< sizeof(XMLComment) >      _commentPool;
-
-       static const char* _errorNames[XML_ERROR_COUNT];
-
-    void Parse();
-};
-
-
-/**
-       A XMLHandle is a class that wraps a node pointer with null checks; this is
-       an incredibly useful thing. Note that XMLHandle is not part of the TinyXML-2
-       DOM structure. It is a separate utility class.
-
-       Take an example:
-       @verbatim
-       <Document>
-               <Element attributeA = "valueA">
-                       <Child attributeB = "value1" />
-                       <Child attributeB = "value2" />
-               </Element>
-       </Document>
-       @endverbatim
-
-       Assuming you want the value of "attributeB" in the 2nd "Child" element, it's very
-       easy to write a *lot* of code that looks like:
-
-       @verbatim
-       XMLElement* root = document.FirstChildElement( "Document" );
-       if ( root )
-       {
-               XMLElement* element = root->FirstChildElement( "Element" );
-               if ( element )
-               {
-                       XMLElement* child = element->FirstChildElement( "Child" );
-                       if ( child )
-                       {
-                               XMLElement* child2 = child->NextSiblingElement( "Child" );
-                               if ( child2 )
-                               {
-                                       // Finally do something useful.
-       @endverbatim
-
-       And that doesn't even cover "else" cases. XMLHandle addresses the verbosity
-       of such code. A XMLHandle checks for null pointers so it is perfectly safe
-       and correct to use:
-
-       @verbatim
-       XMLHandle docHandle( &document );
-       XMLElement* child2 = docHandle.FirstChildElement( "Document" ).FirstChildElement( "Element" ).FirstChildElement().NextSiblingElement();
-       if ( child2 )
-       {
-               // do something useful
-       @endverbatim
-
-       Which is MUCH more concise and useful.
-
-       It is also safe to copy handles - internally they are nothing more than node pointers.
-       @verbatim
-       XMLHandle handleCopy = handle;
-       @endverbatim
-
-       See also XMLConstHandle, which is the same as XMLHandle, but operates on const objects.
-*/
-class TINYXML2_LIB XMLHandle
-{
-public:
-    /// Create a handle from any node (at any depth of the tree.) This can be a null pointer.
-    XMLHandle( XMLNode* node )                                                                                         {
-        _node = node;
-    }
-    /// Create a handle from a node.
-    XMLHandle( XMLNode& node )                                                                                         {
-        _node = &node;
-    }
-    /// Copy constructor
-    XMLHandle( const XMLHandle& ref )                                                                          {
-        _node = ref._node;
-    }
-    /// Assignment
-    XMLHandle& operator=( const XMLHandle& ref )                                                       {
-        _node = ref._node;
-        return *this;
-    }
-
-    /// Get the first child of this handle.
-    XMLHandle FirstChild()                                                                                                     {
-        return XMLHandle( _node ? _node->FirstChild() : 0 );
-    }
-    /// Get the first child element of this handle.
-    XMLHandle FirstChildElement( const char* value=0 )                                         {
-        return XMLHandle( _node ? _node->FirstChildElement( value ) : 0 );
-    }
-    /// Get the last child of this handle.
-    XMLHandle LastChild()                                                                                                      {
-        return XMLHandle( _node ? _node->LastChild() : 0 );
-    }
-    /// Get the last child element of this handle.
-    XMLHandle LastChildElement( const char* _value=0 )                                         {
-        return XMLHandle( _node ? _node->LastChildElement( _value ) : 0 );
-    }
-    /// Get the previous sibling of this handle.
-    XMLHandle PreviousSibling()                                                                                                {
-        return XMLHandle( _node ? _node->PreviousSibling() : 0 );
-    }
-    /// Get the previous sibling element of this handle.
-    XMLHandle PreviousSiblingElement( const char* _value=0 )                           {
-        return XMLHandle( _node ? _node->PreviousSiblingElement( _value ) : 0 );
-    }
-    /// Get the next sibling of this handle.
-    XMLHandle NextSibling()                                                                                                    {
-        return XMLHandle( _node ? _node->NextSibling() : 0 );
-    }
-    /// Get the next sibling element of this handle.
-    XMLHandle NextSiblingElement( const char* _value=0 )                                       {
-        return XMLHandle( _node ? _node->NextSiblingElement( _value ) : 0 );
-    }
-
-    /// Safe cast to XMLNode. This can return null.
-    XMLNode* ToNode()                                                  {
-        return _node;
-    }
-    /// Safe cast to XMLElement. This can return null.
-    XMLElement* ToElement()                                    {
-        return ( ( _node == 0 ) ? 0 : _node->ToElement() );
-    }
-    /// Safe cast to XMLText. This can return null.
-    XMLText* ToText()                                                  {
-        return ( ( _node == 0 ) ? 0 : _node->ToText() );
-    }
-    /// Safe cast to XMLUnknown. This can return null.
-    XMLUnknown* ToUnknown()                                    {
-        return ( ( _node == 0 ) ? 0 : _node->ToUnknown() );
-    }
-    /// Safe cast to XMLDeclaration. This can return null.
-    XMLDeclaration* ToDeclaration()                    {
-        return ( ( _node == 0 ) ? 0 : _node->ToDeclaration() );
-    }
-
-private:
-    XMLNode* _node;
-};
-
-
-/**
-       A variant of the XMLHandle class for working with const XMLNodes and Documents. It is the
-       same in all regards, except for the 'const' qualifiers. See XMLHandle for API.
-*/
-class TINYXML2_LIB XMLConstHandle
-{
-public:
-    XMLConstHandle( const XMLNode* node )                                                                                      {
-        _node = node;
-    }
-    XMLConstHandle( const XMLNode& node )                                                                                      {
-        _node = &node;
-    }
-    XMLConstHandle( const XMLConstHandle& ref )                                                                                {
-        _node = ref._node;
-    }
-
-    XMLConstHandle& operator=( const XMLConstHandle& ref )                                                     {
-        _node = ref._node;
-        return *this;
-    }
-
-    const XMLConstHandle FirstChild() const                                                                                    {
-        return XMLConstHandle( _node ? _node->FirstChild() : 0 );
-    }
-    const XMLConstHandle FirstChildElement( const char* value=0 ) const                                {
-        return XMLConstHandle( _node ? _node->FirstChildElement( value ) : 0 );
-    }
-    const XMLConstHandle LastChild()   const                                                                           {
-        return XMLConstHandle( _node ? _node->LastChild() : 0 );
-    }
-    const XMLConstHandle LastChildElement( const char* _value=0 ) const                                {
-        return XMLConstHandle( _node ? _node->LastChildElement( _value ) : 0 );
-    }
-    const XMLConstHandle PreviousSibling() const                                                                       {
-        return XMLConstHandle( _node ? _node->PreviousSibling() : 0 );
-    }
-    const XMLConstHandle PreviousSiblingElement( const char* _value=0 ) const          {
-        return XMLConstHandle( _node ? _node->PreviousSiblingElement( _value ) : 0 );
-    }
-    const XMLConstHandle NextSibling() const                                                                           {
-        return XMLConstHandle( _node ? _node->NextSibling() : 0 );
-    }
-    const XMLConstHandle NextSiblingElement( const char* _value=0 ) const                      {
-        return XMLConstHandle( _node ? _node->NextSiblingElement( _value ) : 0 );
-    }
-
-
-    const XMLNode* ToNode() const                              {
-        return _node;
-    }
-    const XMLElement* ToElement() const                        {
-        return ( ( _node == 0 ) ? 0 : _node->ToElement() );
-    }
-    const XMLText* ToText() const                              {
-        return ( ( _node == 0 ) ? 0 : _node->ToText() );
-    }
-    const XMLUnknown* ToUnknown() const                        {
-        return ( ( _node == 0 ) ? 0 : _node->ToUnknown() );
-    }
-    const XMLDeclaration* ToDeclaration() const        {
-        return ( ( _node == 0 ) ? 0 : _node->ToDeclaration() );
-    }
-
-private:
-    const XMLNode* _node;
-};
-
-
-/**
-       Printing functionality. The XMLPrinter gives you more
-       options than the XMLDocument::Print() method.
-
-       It can:
-       -# Print to memory.
-       -# Print to a file you provide.
-       -# Print XML without a XMLDocument.
-
-       Print to Memory
-
-       @verbatim
-       XMLPrinter printer;
-       doc.Print( &printer );
-       SomeFunction( printer.CStr() );
-       @endverbatim
-
-       Print to a File
-
-       You provide the file pointer.
-       @verbatim
-       XMLPrinter printer( fp );
-       doc.Print( &printer );
-       @endverbatim
-
-       Print without a XMLDocument
-
-       When loading, an XML parser is very useful. However, sometimes
-       when saving, it just gets in the way. The code is often set up
-       for streaming, and constructing the DOM is just overhead.
-
-       The Printer supports the streaming case. The following code
-       prints out a trivially simple XML file without ever creating
-       an XML document.
-
-       @verbatim
-       XMLPrinter printer( fp );
-       printer.OpenElement( "foo" );
-       printer.PushAttribute( "foo", "bar" );
-       printer.CloseElement();
-       @endverbatim
-*/
-class TINYXML2_LIB XMLPrinter : public XMLVisitor
-{
-public:
-    /** Construct the printer. If the FILE* is specified,
-       this will print to the FILE. Else it will print
-       to memory, and the result is available in CStr().
-       If 'compact' is set to true, then output is created
-       with only required whitespace and newlines.
-    */
-    XMLPrinter( FILE* file=0, bool compact = false, int depth = 0 );
-    virtual ~XMLPrinter()      {}
-
-    /** If streaming, write the BOM and declaration. */
-    void PushHeader( bool writeBOM, bool writeDeclaration );
-    /** If streaming, start writing an element.
-        The element must be closed with CloseElement()
-    */
-    void OpenElement( const char* name, bool compactMode=false );
-    /// If streaming, add an attribute to an open element.
-    void PushAttribute( const char* name, const char* value );
-    void PushAttribute( const char* name, int value );
-    void PushAttribute( const char* name, unsigned value );
-    void PushAttribute( const char* name, bool value );
-    void PushAttribute( const char* name, double value );
-    /// If streaming, close the Element.
-    virtual void CloseElement( bool compactMode=false );
-
-    /// Add a text node.
-    void PushText( const char* text, bool cdata=false );
-    /// Add a text node from an integer.
-    void PushText( int value );
-    /// Add a text node from an unsigned.
-    void PushText( unsigned value );
-    /// Add a text node from a bool.
-    void PushText( bool value );
-    /// Add a text node from a float.
-    void PushText( float value );
-    /// Add a text node from a double.
-    void PushText( double value );
-
-    /// Add a comment
-    void PushComment( const char* comment );
-
-    void PushDeclaration( const char* value );
-    void PushUnknown( const char* value );
-
-    virtual bool VisitEnter( const XMLDocument& /*doc*/ );
-    virtual bool VisitExit( const XMLDocument& /*doc*/ )                       {
-        return true;
-    }
-
-    virtual bool VisitEnter( const XMLElement& element, const XMLAttribute* attribute );
-    virtual bool VisitExit( const XMLElement& element );
-
-    virtual bool Visit( const XMLText& text );
-    virtual bool Visit( const XMLComment& comment );
-    virtual bool Visit( const XMLDeclaration& declaration );
-    virtual bool Visit( const XMLUnknown& unknown );
-
-    /**
-       If in print to memory mode, return a pointer to
-       the XML file in memory.
-    */
-    const char* CStr() const {
-        return _buffer.Mem();
-    }
-    /**
-       If in print to memory mode, return the size
-       of the XML file in memory. (Note the size returned
-       includes the terminating null.)
-    */
-    int CStrSize() const {
-        return _buffer.Size();
-    }
-    /**
-       If in print to memory mode, reset the buffer to the
-       beginning.
-    */
-    void ClearBuffer() {
-        _buffer.Clear();
-        _buffer.Push(0);
-    }
-
-protected:
-       virtual bool CompactMode( const XMLElement& )   { return _compactMode; }
-
-       /** Prints out the space before an element. You may override to change
-           the space and tabs used. A PrintSpace() override should call Print().
-       */
-    virtual void PrintSpace( int depth );
-    void Print( const char* format, ... );
-
-    void SealElementIfJustOpened();
-    bool _elementJustOpened;
-    DynArray< const char*, 10 > _stack;
-
-private:
-    void PrintString( const char*, bool restrictedEntitySet ); // prints out, after detecting entities.
-
-    bool _firstElement;
-    FILE* _fp;
-    int _depth;
-    int _textDepth;
-    bool _processEntities;
-       bool _compactMode;
-
-    enum {
-        ENTITY_RANGE = 64,
-        BUF_SIZE = 200
-    };
-    bool _entityFlag[ENTITY_RANGE];
-    bool _restrictedEntityFlag[ENTITY_RANGE];
-
-    DynArray< char, 20 > _buffer;
-};
-
-
-}      // tinyxml2
-
-#if defined(_MSC_VER)
-#   pragma warning(pop)
-#endif
-
-#endif // TINYXML2_INCLUDED
diff --git a/src/include/gromacs/external/tng_io/external/zlib/crc32.h b/src/include/gromacs/external/tng_io/external/zlib/crc32.h
deleted file mode 100644 (file)
index 9e0c778..0000000
+++ /dev/null
@@ -1,441 +0,0 @@
-/* crc32.h -- tables for rapid CRC calculation
- * Generated automatically by crc32.c
- */
-
-local const z_crc_t FAR crc_table[TBLS][256] =
-{
-  {
-    0x00000000UL, 0x77073096UL, 0xee0e612cUL, 0x990951baUL, 0x076dc419UL,
-    0x706af48fUL, 0xe963a535UL, 0x9e6495a3UL, 0x0edb8832UL, 0x79dcb8a4UL,
-    0xe0d5e91eUL, 0x97d2d988UL, 0x09b64c2bUL, 0x7eb17cbdUL, 0xe7b82d07UL,
-    0x90bf1d91UL, 0x1db71064UL, 0x6ab020f2UL, 0xf3b97148UL, 0x84be41deUL,
-    0x1adad47dUL, 0x6ddde4ebUL, 0xf4d4b551UL, 0x83d385c7UL, 0x136c9856UL,
-    0x646ba8c0UL, 0xfd62f97aUL, 0x8a65c9ecUL, 0x14015c4fUL, 0x63066cd9UL,
-    0xfa0f3d63UL, 0x8d080df5UL, 0x3b6e20c8UL, 0x4c69105eUL, 0xd56041e4UL,
-    0xa2677172UL, 0x3c03e4d1UL, 0x4b04d447UL, 0xd20d85fdUL, 0xa50ab56bUL,
-    0x35b5a8faUL, 0x42b2986cUL, 0xdbbbc9d6UL, 0xacbcf940UL, 0x32d86ce3UL,
-    0x45df5c75UL, 0xdcd60dcfUL, 0xabd13d59UL, 0x26d930acUL, 0x51de003aUL,
-    0xc8d75180UL, 0xbfd06116UL, 0x21b4f4b5UL, 0x56b3c423UL, 0xcfba9599UL,
-    0xb8bda50fUL, 0x2802b89eUL, 0x5f058808UL, 0xc60cd9b2UL, 0xb10be924UL,
-    0x2f6f7c87UL, 0x58684c11UL, 0xc1611dabUL, 0xb6662d3dUL, 0x76dc4190UL,
-    0x01db7106UL, 0x98d220bcUL, 0xefd5102aUL, 0x71b18589UL, 0x06b6b51fUL,
-    0x9fbfe4a5UL, 0xe8b8d433UL, 0x7807c9a2UL, 0x0f00f934UL, 0x9609a88eUL,
-    0xe10e9818UL, 0x7f6a0dbbUL, 0x086d3d2dUL, 0x91646c97UL, 0xe6635c01UL,
-    0x6b6b51f4UL, 0x1c6c6162UL, 0x856530d8UL, 0xf262004eUL, 0x6c0695edUL,
-    0x1b01a57bUL, 0x8208f4c1UL, 0xf50fc457UL, 0x65b0d9c6UL, 0x12b7e950UL,
-    0x8bbeb8eaUL, 0xfcb9887cUL, 0x62dd1ddfUL, 0x15da2d49UL, 0x8cd37cf3UL,
-    0xfbd44c65UL, 0x4db26158UL, 0x3ab551ceUL, 0xa3bc0074UL, 0xd4bb30e2UL,
-    0x4adfa541UL, 0x3dd895d7UL, 0xa4d1c46dUL, 0xd3d6f4fbUL, 0x4369e96aUL,
-    0x346ed9fcUL, 0xad678846UL, 0xda60b8d0UL, 0x44042d73UL, 0x33031de5UL,
-    0xaa0a4c5fUL, 0xdd0d7cc9UL, 0x5005713cUL, 0x270241aaUL, 0xbe0b1010UL,
-    0xc90c2086UL, 0x5768b525UL, 0x206f85b3UL, 0xb966d409UL, 0xce61e49fUL,
-    0x5edef90eUL, 0x29d9c998UL, 0xb0d09822UL, 0xc7d7a8b4UL, 0x59b33d17UL,
-    0x2eb40d81UL, 0xb7bd5c3bUL, 0xc0ba6cadUL, 0xedb88320UL, 0x9abfb3b6UL,
-    0x03b6e20cUL, 0x74b1d29aUL, 0xead54739UL, 0x9dd277afUL, 0x04db2615UL,
-    0x73dc1683UL, 0xe3630b12UL, 0x94643b84UL, 0x0d6d6a3eUL, 0x7a6a5aa8UL,
-    0xe40ecf0bUL, 0x9309ff9dUL, 0x0a00ae27UL, 0x7d079eb1UL, 0xf00f9344UL,
-    0x8708a3d2UL, 0x1e01f268UL, 0x6906c2feUL, 0xf762575dUL, 0x806567cbUL,
-    0x196c3671UL, 0x6e6b06e7UL, 0xfed41b76UL, 0x89d32be0UL, 0x10da7a5aUL,
-    0x67dd4accUL, 0xf9b9df6fUL, 0x8ebeeff9UL, 0x17b7be43UL, 0x60b08ed5UL,
-    0xd6d6a3e8UL, 0xa1d1937eUL, 0x38d8c2c4UL, 0x4fdff252UL, 0xd1bb67f1UL,
-    0xa6bc5767UL, 0x3fb506ddUL, 0x48b2364bUL, 0xd80d2bdaUL, 0xaf0a1b4cUL,
-    0x36034af6UL, 0x41047a60UL, 0xdf60efc3UL, 0xa867df55UL, 0x316e8eefUL,
-    0x4669be79UL, 0xcb61b38cUL, 0xbc66831aUL, 0x256fd2a0UL, 0x5268e236UL,
-    0xcc0c7795UL, 0xbb0b4703UL, 0x220216b9UL, 0x5505262fUL, 0xc5ba3bbeUL,
-    0xb2bd0b28UL, 0x2bb45a92UL, 0x5cb36a04UL, 0xc2d7ffa7UL, 0xb5d0cf31UL,
-    0x2cd99e8bUL, 0x5bdeae1dUL, 0x9b64c2b0UL, 0xec63f226UL, 0x756aa39cUL,
-    0x026d930aUL, 0x9c0906a9UL, 0xeb0e363fUL, 0x72076785UL, 0x05005713UL,
-    0x95bf4a82UL, 0xe2b87a14UL, 0x7bb12baeUL, 0x0cb61b38UL, 0x92d28e9bUL,
-    0xe5d5be0dUL, 0x7cdcefb7UL, 0x0bdbdf21UL, 0x86d3d2d4UL, 0xf1d4e242UL,
-    0x68ddb3f8UL, 0x1fda836eUL, 0x81be16cdUL, 0xf6b9265bUL, 0x6fb077e1UL,
-    0x18b74777UL, 0x88085ae6UL, 0xff0f6a70UL, 0x66063bcaUL, 0x11010b5cUL,
-    0x8f659effUL, 0xf862ae69UL, 0x616bffd3UL, 0x166ccf45UL, 0xa00ae278UL,
-    0xd70dd2eeUL, 0x4e048354UL, 0x3903b3c2UL, 0xa7672661UL, 0xd06016f7UL,
-    0x4969474dUL, 0x3e6e77dbUL, 0xaed16a4aUL, 0xd9d65adcUL, 0x40df0b66UL,
-    0x37d83bf0UL, 0xa9bcae53UL, 0xdebb9ec5UL, 0x47b2cf7fUL, 0x30b5ffe9UL,
-    0xbdbdf21cUL, 0xcabac28aUL, 0x53b39330UL, 0x24b4a3a6UL, 0xbad03605UL,
-    0xcdd70693UL, 0x54de5729UL, 0x23d967bfUL, 0xb3667a2eUL, 0xc4614ab8UL,
-    0x5d681b02UL, 0x2a6f2b94UL, 0xb40bbe37UL, 0xc30c8ea1UL, 0x5a05df1bUL,
-    0x2d02ef8dUL
-#ifdef BYFOUR
-  },
-  {
-    0x00000000UL, 0x191b3141UL, 0x32366282UL, 0x2b2d53c3UL, 0x646cc504UL,
-    0x7d77f445UL, 0x565aa786UL, 0x4f4196c7UL, 0xc8d98a08UL, 0xd1c2bb49UL,
-    0xfaefe88aUL, 0xe3f4d9cbUL, 0xacb54f0cUL, 0xb5ae7e4dUL, 0x9e832d8eUL,
-    0x87981ccfUL, 0x4ac21251UL, 0x53d92310UL, 0x78f470d3UL, 0x61ef4192UL,
-    0x2eaed755UL, 0x37b5e614UL, 0x1c98b5d7UL, 0x05838496UL, 0x821b9859UL,
-    0x9b00a918UL, 0xb02dfadbUL, 0xa936cb9aUL, 0xe6775d5dUL, 0xff6c6c1cUL,
-    0xd4413fdfUL, 0xcd5a0e9eUL, 0x958424a2UL, 0x8c9f15e3UL, 0xa7b24620UL,
-    0xbea97761UL, 0xf1e8e1a6UL, 0xe8f3d0e7UL, 0xc3de8324UL, 0xdac5b265UL,
-    0x5d5daeaaUL, 0x44469febUL, 0x6f6bcc28UL, 0x7670fd69UL, 0x39316baeUL,
-    0x202a5aefUL, 0x0b07092cUL, 0x121c386dUL, 0xdf4636f3UL, 0xc65d07b2UL,
-    0xed705471UL, 0xf46b6530UL, 0xbb2af3f7UL, 0xa231c2b6UL, 0x891c9175UL,
-    0x9007a034UL, 0x179fbcfbUL, 0x0e848dbaUL, 0x25a9de79UL, 0x3cb2ef38UL,
-    0x73f379ffUL, 0x6ae848beUL, 0x41c51b7dUL, 0x58de2a3cUL, 0xf0794f05UL,
-    0xe9627e44UL, 0xc24f2d87UL, 0xdb541cc6UL, 0x94158a01UL, 0x8d0ebb40UL,
-    0xa623e883UL, 0xbf38d9c2UL, 0x38a0c50dUL, 0x21bbf44cUL, 0x0a96a78fUL,
-    0x138d96ceUL, 0x5ccc0009UL, 0x45d73148UL, 0x6efa628bUL, 0x77e153caUL,
-    0xbabb5d54UL, 0xa3a06c15UL, 0x888d3fd6UL, 0x91960e97UL, 0xded79850UL,
-    0xc7cca911UL, 0xece1fad2UL, 0xf5facb93UL, 0x7262d75cUL, 0x6b79e61dUL,
-    0x4054b5deUL, 0x594f849fUL, 0x160e1258UL, 0x0f152319UL, 0x243870daUL,
-    0x3d23419bUL, 0x65fd6ba7UL, 0x7ce65ae6UL, 0x57cb0925UL, 0x4ed03864UL,
-    0x0191aea3UL, 0x188a9fe2UL, 0x33a7cc21UL, 0x2abcfd60UL, 0xad24e1afUL,
-    0xb43fd0eeUL, 0x9f12832dUL, 0x8609b26cUL, 0xc94824abUL, 0xd05315eaUL,
-    0xfb7e4629UL, 0xe2657768UL, 0x2f3f79f6UL, 0x362448b7UL, 0x1d091b74UL,
-    0x04122a35UL, 0x4b53bcf2UL, 0x52488db3UL, 0x7965de70UL, 0x607eef31UL,
-    0xe7e6f3feUL, 0xfefdc2bfUL, 0xd5d0917cUL, 0xcccba03dUL, 0x838a36faUL,
-    0x9a9107bbUL, 0xb1bc5478UL, 0xa8a76539UL, 0x3b83984bUL, 0x2298a90aUL,
-    0x09b5fac9UL, 0x10aecb88UL, 0x5fef5d4fUL, 0x46f46c0eUL, 0x6dd93fcdUL,
-    0x74c20e8cUL, 0xf35a1243UL, 0xea412302UL, 0xc16c70c1UL, 0xd8774180UL,
-    0x9736d747UL, 0x8e2de606UL, 0xa500b5c5UL, 0xbc1b8484UL, 0x71418a1aUL,
-    0x685abb5bUL, 0x4377e898UL, 0x5a6cd9d9UL, 0x152d4f1eUL, 0x0c367e5fUL,
-    0x271b2d9cUL, 0x3e001cddUL, 0xb9980012UL, 0xa0833153UL, 0x8bae6290UL,
-    0x92b553d1UL, 0xddf4c516UL, 0xc4eff457UL, 0xefc2a794UL, 0xf6d996d5UL,
-    0xae07bce9UL, 0xb71c8da8UL, 0x9c31de6bUL, 0x852aef2aUL, 0xca6b79edUL,
-    0xd37048acUL, 0xf85d1b6fUL, 0xe1462a2eUL, 0x66de36e1UL, 0x7fc507a0UL,
-    0x54e85463UL, 0x4df36522UL, 0x02b2f3e5UL, 0x1ba9c2a4UL, 0x30849167UL,
-    0x299fa026UL, 0xe4c5aeb8UL, 0xfdde9ff9UL, 0xd6f3cc3aUL, 0xcfe8fd7bUL,
-    0x80a96bbcUL, 0x99b25afdUL, 0xb29f093eUL, 0xab84387fUL, 0x2c1c24b0UL,
-    0x350715f1UL, 0x1e2a4632UL, 0x07317773UL, 0x4870e1b4UL, 0x516bd0f5UL,
-    0x7a468336UL, 0x635db277UL, 0xcbfad74eUL, 0xd2e1e60fUL, 0xf9ccb5ccUL,
-    0xe0d7848dUL, 0xaf96124aUL, 0xb68d230bUL, 0x9da070c8UL, 0x84bb4189UL,
-    0x03235d46UL, 0x1a386c07UL, 0x31153fc4UL, 0x280e0e85UL, 0x674f9842UL,
-    0x7e54a903UL, 0x5579fac0UL, 0x4c62cb81UL, 0x8138c51fUL, 0x9823f45eUL,
-    0xb30ea79dUL, 0xaa1596dcUL, 0xe554001bUL, 0xfc4f315aUL, 0xd7626299UL,
-    0xce7953d8UL, 0x49e14f17UL, 0x50fa7e56UL, 0x7bd72d95UL, 0x62cc1cd4UL,
-    0x2d8d8a13UL, 0x3496bb52UL, 0x1fbbe891UL, 0x06a0d9d0UL, 0x5e7ef3ecUL,
-    0x4765c2adUL, 0x6c48916eUL, 0x7553a02fUL, 0x3a1236e8UL, 0x230907a9UL,
-    0x0824546aUL, 0x113f652bUL, 0x96a779e4UL, 0x8fbc48a5UL, 0xa4911b66UL,
-    0xbd8a2a27UL, 0xf2cbbce0UL, 0xebd08da1UL, 0xc0fdde62UL, 0xd9e6ef23UL,
-    0x14bce1bdUL, 0x0da7d0fcUL, 0x268a833fUL, 0x3f91b27eUL, 0x70d024b9UL,
-    0x69cb15f8UL, 0x42e6463bUL, 0x5bfd777aUL, 0xdc656bb5UL, 0xc57e5af4UL,
-    0xee530937UL, 0xf7483876UL, 0xb809aeb1UL, 0xa1129ff0UL, 0x8a3fcc33UL,
-    0x9324fd72UL
-  },
-  {
-    0x00000000UL, 0x01c26a37UL, 0x0384d46eUL, 0x0246be59UL, 0x0709a8dcUL,
-    0x06cbc2ebUL, 0x048d7cb2UL, 0x054f1685UL, 0x0e1351b8UL, 0x0fd13b8fUL,
-    0x0d9785d6UL, 0x0c55efe1UL, 0x091af964UL, 0x08d89353UL, 0x0a9e2d0aUL,
-    0x0b5c473dUL, 0x1c26a370UL, 0x1de4c947UL, 0x1fa2771eUL, 0x1e601d29UL,
-    0x1b2f0bacUL, 0x1aed619bUL, 0x18abdfc2UL, 0x1969b5f5UL, 0x1235f2c8UL,
-    0x13f798ffUL, 0x11b126a6UL, 0x10734c91UL, 0x153c5a14UL, 0x14fe3023UL,
-    0x16b88e7aUL, 0x177ae44dUL, 0x384d46e0UL, 0x398f2cd7UL, 0x3bc9928eUL,
-    0x3a0bf8b9UL, 0x3f44ee3cUL, 0x3e86840bUL, 0x3cc03a52UL, 0x3d025065UL,
-    0x365e1758UL, 0x379c7d6fUL, 0x35dac336UL, 0x3418a901UL, 0x3157bf84UL,
-    0x3095d5b3UL, 0x32d36beaUL, 0x331101ddUL, 0x246be590UL, 0x25a98fa7UL,
-    0x27ef31feUL, 0x262d5bc9UL, 0x23624d4cUL, 0x22a0277bUL, 0x20e69922UL,
-    0x2124f315UL, 0x2a78b428UL, 0x2bbade1fUL, 0x29fc6046UL, 0x283e0a71UL,
-    0x2d711cf4UL, 0x2cb376c3UL, 0x2ef5c89aUL, 0x2f37a2adUL, 0x709a8dc0UL,
-    0x7158e7f7UL, 0x731e59aeUL, 0x72dc3399UL, 0x7793251cUL, 0x76514f2bUL,
-    0x7417f172UL, 0x75d59b45UL, 0x7e89dc78UL, 0x7f4bb64fUL, 0x7d0d0816UL,
-    0x7ccf6221UL, 0x798074a4UL, 0x78421e93UL, 0x7a04a0caUL, 0x7bc6cafdUL,
-    0x6cbc2eb0UL, 0x6d7e4487UL, 0x6f38fadeUL, 0x6efa90e9UL, 0x6bb5866cUL,
-    0x6a77ec5bUL, 0x68315202UL, 0x69f33835UL, 0x62af7f08UL, 0x636d153fUL,
-    0x612bab66UL, 0x60e9c151UL, 0x65a6d7d4UL, 0x6464bde3UL, 0x662203baUL,
-    0x67e0698dUL, 0x48d7cb20UL, 0x4915a117UL, 0x4b531f4eUL, 0x4a917579UL,
-    0x4fde63fcUL, 0x4e1c09cbUL, 0x4c5ab792UL, 0x4d98dda5UL, 0x46c49a98UL,
-    0x4706f0afUL, 0x45404ef6UL, 0x448224c1UL, 0x41cd3244UL, 0x400f5873UL,
-    0x4249e62aUL, 0x438b8c1dUL, 0x54f16850UL, 0x55330267UL, 0x5775bc3eUL,
-    0x56b7d609UL, 0x53f8c08cUL, 0x523aaabbUL, 0x507c14e2UL, 0x51be7ed5UL,
-    0x5ae239e8UL, 0x5b2053dfUL, 0x5966ed86UL, 0x58a487b1UL, 0x5deb9134UL,
-    0x5c29fb03UL, 0x5e6f455aUL, 0x5fad2f6dUL, 0xe1351b80UL, 0xe0f771b7UL,
-    0xe2b1cfeeUL, 0xe373a5d9UL, 0xe63cb35cUL, 0xe7fed96bUL, 0xe5b86732UL,
-    0xe47a0d05UL, 0xef264a38UL, 0xeee4200fUL, 0xeca29e56UL, 0xed60f461UL,
-    0xe82fe2e4UL, 0xe9ed88d3UL, 0xebab368aUL, 0xea695cbdUL, 0xfd13b8f0UL,
-    0xfcd1d2c7UL, 0xfe976c9eUL, 0xff5506a9UL, 0xfa1a102cUL, 0xfbd87a1bUL,
-    0xf99ec442UL, 0xf85cae75UL, 0xf300e948UL, 0xf2c2837fUL, 0xf0843d26UL,
-    0xf1465711UL, 0xf4094194UL, 0xf5cb2ba3UL, 0xf78d95faUL, 0xf64fffcdUL,
-    0xd9785d60UL, 0xd8ba3757UL, 0xdafc890eUL, 0xdb3ee339UL, 0xde71f5bcUL,
-    0xdfb39f8bUL, 0xddf521d2UL, 0xdc374be5UL, 0xd76b0cd8UL, 0xd6a966efUL,
-    0xd4efd8b6UL, 0xd52db281UL, 0xd062a404UL, 0xd1a0ce33UL, 0xd3e6706aUL,
-    0xd2241a5dUL, 0xc55efe10UL, 0xc49c9427UL, 0xc6da2a7eUL, 0xc7184049UL,
-    0xc25756ccUL, 0xc3953cfbUL, 0xc1d382a2UL, 0xc011e895UL, 0xcb4dafa8UL,
-    0xca8fc59fUL, 0xc8c97bc6UL, 0xc90b11f1UL, 0xcc440774UL, 0xcd866d43UL,
-    0xcfc0d31aUL, 0xce02b92dUL, 0x91af9640UL, 0x906dfc77UL, 0x922b422eUL,
-    0x93e92819UL, 0x96a63e9cUL, 0x976454abUL, 0x9522eaf2UL, 0x94e080c5UL,
-    0x9fbcc7f8UL, 0x9e7eadcfUL, 0x9c381396UL, 0x9dfa79a1UL, 0x98b56f24UL,
-    0x99770513UL, 0x9b31bb4aUL, 0x9af3d17dUL, 0x8d893530UL, 0x8c4b5f07UL,
-    0x8e0de15eUL, 0x8fcf8b69UL, 0x8a809decUL, 0x8b42f7dbUL, 0x89044982UL,
-    0x88c623b5UL, 0x839a6488UL, 0x82580ebfUL, 0x801eb0e6UL, 0x81dcdad1UL,
-    0x8493cc54UL, 0x8551a663UL, 0x8717183aUL, 0x86d5720dUL, 0xa9e2d0a0UL,
-    0xa820ba97UL, 0xaa6604ceUL, 0xaba46ef9UL, 0xaeeb787cUL, 0xaf29124bUL,
-    0xad6fac12UL, 0xacadc625UL, 0xa7f18118UL, 0xa633eb2fUL, 0xa4755576UL,
-    0xa5b73f41UL, 0xa0f829c4UL, 0xa13a43f3UL, 0xa37cfdaaUL, 0xa2be979dUL,
-    0xb5c473d0UL, 0xb40619e7UL, 0xb640a7beUL, 0xb782cd89UL, 0xb2cddb0cUL,
-    0xb30fb13bUL, 0xb1490f62UL, 0xb08b6555UL, 0xbbd72268UL, 0xba15485fUL,
-    0xb853f606UL, 0xb9919c31UL, 0xbcde8ab4UL, 0xbd1ce083UL, 0xbf5a5edaUL,
-    0xbe9834edUL
-  },
-  {
-    0x00000000UL, 0xb8bc6765UL, 0xaa09c88bUL, 0x12b5afeeUL, 0x8f629757UL,
-    0x37def032UL, 0x256b5fdcUL, 0x9dd738b9UL, 0xc5b428efUL, 0x7d084f8aUL,
-    0x6fbde064UL, 0xd7018701UL, 0x4ad6bfb8UL, 0xf26ad8ddUL, 0xe0df7733UL,
-    0x58631056UL, 0x5019579fUL, 0xe8a530faUL, 0xfa109f14UL, 0x42acf871UL,
-    0xdf7bc0c8UL, 0x67c7a7adUL, 0x75720843UL, 0xcdce6f26UL, 0x95ad7f70UL,
-    0x2d111815UL, 0x3fa4b7fbUL, 0x8718d09eUL, 0x1acfe827UL, 0xa2738f42UL,
-    0xb0c620acUL, 0x087a47c9UL, 0xa032af3eUL, 0x188ec85bUL, 0x0a3b67b5UL,
-    0xb28700d0UL, 0x2f503869UL, 0x97ec5f0cUL, 0x8559f0e2UL, 0x3de59787UL,
-    0x658687d1UL, 0xdd3ae0b4UL, 0xcf8f4f5aUL, 0x7733283fUL, 0xeae41086UL,
-    0x525877e3UL, 0x40edd80dUL, 0xf851bf68UL, 0xf02bf8a1UL, 0x48979fc4UL,
-    0x5a22302aUL, 0xe29e574fUL, 0x7f496ff6UL, 0xc7f50893UL, 0xd540a77dUL,
-    0x6dfcc018UL, 0x359fd04eUL, 0x8d23b72bUL, 0x9f9618c5UL, 0x272a7fa0UL,
-    0xbafd4719UL, 0x0241207cUL, 0x10f48f92UL, 0xa848e8f7UL, 0x9b14583dUL,
-    0x23a83f58UL, 0x311d90b6UL, 0x89a1f7d3UL, 0x1476cf6aUL, 0xaccaa80fUL,
-    0xbe7f07e1UL, 0x06c36084UL, 0x5ea070d2UL, 0xe61c17b7UL, 0xf4a9b859UL,
-    0x4c15df3cUL, 0xd1c2e785UL, 0x697e80e0UL, 0x7bcb2f0eUL, 0xc377486bUL,
-    0xcb0d0fa2UL, 0x73b168c7UL, 0x6104c729UL, 0xd9b8a04cUL, 0x446f98f5UL,
-    0xfcd3ff90UL, 0xee66507eUL, 0x56da371bUL, 0x0eb9274dUL, 0xb6054028UL,
-    0xa4b0efc6UL, 0x1c0c88a3UL, 0x81dbb01aUL, 0x3967d77fUL, 0x2bd27891UL,
-    0x936e1ff4UL, 0x3b26f703UL, 0x839a9066UL, 0x912f3f88UL, 0x299358edUL,
-    0xb4446054UL, 0x0cf80731UL, 0x1e4da8dfUL, 0xa6f1cfbaUL, 0xfe92dfecUL,
-    0x462eb889UL, 0x549b1767UL, 0xec277002UL, 0x71f048bbUL, 0xc94c2fdeUL,
-    0xdbf98030UL, 0x6345e755UL, 0x6b3fa09cUL, 0xd383c7f9UL, 0xc1366817UL,
-    0x798a0f72UL, 0xe45d37cbUL, 0x5ce150aeUL, 0x4e54ff40UL, 0xf6e89825UL,
-    0xae8b8873UL, 0x1637ef16UL, 0x048240f8UL, 0xbc3e279dUL, 0x21e91f24UL,
-    0x99557841UL, 0x8be0d7afUL, 0x335cb0caUL, 0xed59b63bUL, 0x55e5d15eUL,
-    0x47507eb0UL, 0xffec19d5UL, 0x623b216cUL, 0xda874609UL, 0xc832e9e7UL,
-    0x708e8e82UL, 0x28ed9ed4UL, 0x9051f9b1UL, 0x82e4565fUL, 0x3a58313aUL,
-    0xa78f0983UL, 0x1f336ee6UL, 0x0d86c108UL, 0xb53aa66dUL, 0xbd40e1a4UL,
-    0x05fc86c1UL, 0x1749292fUL, 0xaff54e4aUL, 0x322276f3UL, 0x8a9e1196UL,
-    0x982bbe78UL, 0x2097d91dUL, 0x78f4c94bUL, 0xc048ae2eUL, 0xd2fd01c0UL,
-    0x6a4166a5UL, 0xf7965e1cUL, 0x4f2a3979UL, 0x5d9f9697UL, 0xe523f1f2UL,
-    0x4d6b1905UL, 0xf5d77e60UL, 0xe762d18eUL, 0x5fdeb6ebUL, 0xc2098e52UL,
-    0x7ab5e937UL, 0x680046d9UL, 0xd0bc21bcUL, 0x88df31eaUL, 0x3063568fUL,
-    0x22d6f961UL, 0x9a6a9e04UL, 0x07bda6bdUL, 0xbf01c1d8UL, 0xadb46e36UL,
-    0x15080953UL, 0x1d724e9aUL, 0xa5ce29ffUL, 0xb77b8611UL, 0x0fc7e174UL,
-    0x9210d9cdUL, 0x2aacbea8UL, 0x38191146UL, 0x80a57623UL, 0xd8c66675UL,
-    0x607a0110UL, 0x72cfaefeUL, 0xca73c99bUL, 0x57a4f122UL, 0xef189647UL,
-    0xfdad39a9UL, 0x45115eccUL, 0x764dee06UL, 0xcef18963UL, 0xdc44268dUL,
-    0x64f841e8UL, 0xf92f7951UL, 0x41931e34UL, 0x5326b1daUL, 0xeb9ad6bfUL,
-    0xb3f9c6e9UL, 0x0b45a18cUL, 0x19f00e62UL, 0xa14c6907UL, 0x3c9b51beUL,
-    0x842736dbUL, 0x96929935UL, 0x2e2efe50UL, 0x2654b999UL, 0x9ee8defcUL,
-    0x8c5d7112UL, 0x34e11677UL, 0xa9362eceUL, 0x118a49abUL, 0x033fe645UL,
-    0xbb838120UL, 0xe3e09176UL, 0x5b5cf613UL, 0x49e959fdUL, 0xf1553e98UL,
-    0x6c820621UL, 0xd43e6144UL, 0xc68bceaaUL, 0x7e37a9cfUL, 0xd67f4138UL,
-    0x6ec3265dUL, 0x7c7689b3UL, 0xc4caeed6UL, 0x591dd66fUL, 0xe1a1b10aUL,
-    0xf3141ee4UL, 0x4ba87981UL, 0x13cb69d7UL, 0xab770eb2UL, 0xb9c2a15cUL,
-    0x017ec639UL, 0x9ca9fe80UL, 0x241599e5UL, 0x36a0360bUL, 0x8e1c516eUL,
-    0x866616a7UL, 0x3eda71c2UL, 0x2c6fde2cUL, 0x94d3b949UL, 0x090481f0UL,
-    0xb1b8e695UL, 0xa30d497bUL, 0x1bb12e1eUL, 0x43d23e48UL, 0xfb6e592dUL,
-    0xe9dbf6c3UL, 0x516791a6UL, 0xccb0a91fUL, 0x740cce7aUL, 0x66b96194UL,
-    0xde0506f1UL
-  },
-  {
-    0x00000000UL, 0x96300777UL, 0x2c610eeeUL, 0xba510999UL, 0x19c46d07UL,
-    0x8ff46a70UL, 0x35a563e9UL, 0xa395649eUL, 0x3288db0eUL, 0xa4b8dc79UL,
-    0x1ee9d5e0UL, 0x88d9d297UL, 0x2b4cb609UL, 0xbd7cb17eUL, 0x072db8e7UL,
-    0x911dbf90UL, 0x6410b71dUL, 0xf220b06aUL, 0x4871b9f3UL, 0xde41be84UL,
-    0x7dd4da1aUL, 0xebe4dd6dUL, 0x51b5d4f4UL, 0xc785d383UL, 0x56986c13UL,
-    0xc0a86b64UL, 0x7af962fdUL, 0xecc9658aUL, 0x4f5c0114UL, 0xd96c0663UL,
-    0x633d0ffaUL, 0xf50d088dUL, 0xc8206e3bUL, 0x5e10694cUL, 0xe44160d5UL,
-    0x727167a2UL, 0xd1e4033cUL, 0x47d4044bUL, 0xfd850dd2UL, 0x6bb50aa5UL,
-    0xfaa8b535UL, 0x6c98b242UL, 0xd6c9bbdbUL, 0x40f9bcacUL, 0xe36cd832UL,
-    0x755cdf45UL, 0xcf0dd6dcUL, 0x593dd1abUL, 0xac30d926UL, 0x3a00de51UL,
-    0x8051d7c8UL, 0x1661d0bfUL, 0xb5f4b421UL, 0x23c4b356UL, 0x9995bacfUL,
-    0x0fa5bdb8UL, 0x9eb80228UL, 0x0888055fUL, 0xb2d90cc6UL, 0x24e90bb1UL,
-    0x877c6f2fUL, 0x114c6858UL, 0xab1d61c1UL, 0x3d2d66b6UL, 0x9041dc76UL,
-    0x0671db01UL, 0xbc20d298UL, 0x2a10d5efUL, 0x8985b171UL, 0x1fb5b606UL,
-    0xa5e4bf9fUL, 0x33d4b8e8UL, 0xa2c90778UL, 0x34f9000fUL, 0x8ea80996UL,
-    0x18980ee1UL, 0xbb0d6a7fUL, 0x2d3d6d08UL, 0x976c6491UL, 0x015c63e6UL,
-    0xf4516b6bUL, 0x62616c1cUL, 0xd8306585UL, 0x4e0062f2UL, 0xed95066cUL,
-    0x7ba5011bUL, 0xc1f40882UL, 0x57c40ff5UL, 0xc6d9b065UL, 0x50e9b712UL,
-    0xeab8be8bUL, 0x7c88b9fcUL, 0xdf1ddd62UL, 0x492dda15UL, 0xf37cd38cUL,
-    0x654cd4fbUL, 0x5861b24dUL, 0xce51b53aUL, 0x7400bca3UL, 0xe230bbd4UL,
-    0x41a5df4aUL, 0xd795d83dUL, 0x6dc4d1a4UL, 0xfbf4d6d3UL, 0x6ae96943UL,
-    0xfcd96e34UL, 0x468867adUL, 0xd0b860daUL, 0x732d0444UL, 0xe51d0333UL,
-    0x5f4c0aaaUL, 0xc97c0dddUL, 0x3c710550UL, 0xaa410227UL, 0x10100bbeUL,
-    0x86200cc9UL, 0x25b56857UL, 0xb3856f20UL, 0x09d466b9UL, 0x9fe461ceUL,
-    0x0ef9de5eUL, 0x98c9d929UL, 0x2298d0b0UL, 0xb4a8d7c7UL, 0x173db359UL,
-    0x810db42eUL, 0x3b5cbdb7UL, 0xad6cbac0UL, 0x2083b8edUL, 0xb6b3bf9aUL,
-    0x0ce2b603UL, 0x9ad2b174UL, 0x3947d5eaUL, 0xaf77d29dUL, 0x1526db04UL,
-    0x8316dc73UL, 0x120b63e3UL, 0x843b6494UL, 0x3e6a6d0dUL, 0xa85a6a7aUL,
-    0x0bcf0ee4UL, 0x9dff0993UL, 0x27ae000aUL, 0xb19e077dUL, 0x44930ff0UL,
-    0xd2a30887UL, 0x68f2011eUL, 0xfec20669UL, 0x5d5762f7UL, 0xcb676580UL,
-    0x71366c19UL, 0xe7066b6eUL, 0x761bd4feUL, 0xe02bd389UL, 0x5a7ada10UL,
-    0xcc4add67UL, 0x6fdfb9f9UL, 0xf9efbe8eUL, 0x43beb717UL, 0xd58eb060UL,
-    0xe8a3d6d6UL, 0x7e93d1a1UL, 0xc4c2d838UL, 0x52f2df4fUL, 0xf167bbd1UL,
-    0x6757bca6UL, 0xdd06b53fUL, 0x4b36b248UL, 0xda2b0dd8UL, 0x4c1b0aafUL,
-    0xf64a0336UL, 0x607a0441UL, 0xc3ef60dfUL, 0x55df67a8UL, 0xef8e6e31UL,
-    0x79be6946UL, 0x8cb361cbUL, 0x1a8366bcUL, 0xa0d26f25UL, 0x36e26852UL,
-    0x95770cccUL, 0x03470bbbUL, 0xb9160222UL, 0x2f260555UL, 0xbe3bbac5UL,
-    0x280bbdb2UL, 0x925ab42bUL, 0x046ab35cUL, 0xa7ffd7c2UL, 0x31cfd0b5UL,
-    0x8b9ed92cUL, 0x1daede5bUL, 0xb0c2649bUL, 0x26f263ecUL, 0x9ca36a75UL,
-    0x0a936d02UL, 0xa906099cUL, 0x3f360eebUL, 0x85670772UL, 0x13570005UL,
-    0x824abf95UL, 0x147ab8e2UL, 0xae2bb17bUL, 0x381bb60cUL, 0x9b8ed292UL,
-    0x0dbed5e5UL, 0xb7efdc7cUL, 0x21dfdb0bUL, 0xd4d2d386UL, 0x42e2d4f1UL,
-    0xf8b3dd68UL, 0x6e83da1fUL, 0xcd16be81UL, 0x5b26b9f6UL, 0xe177b06fUL,
-    0x7747b718UL, 0xe65a0888UL, 0x706a0fffUL, 0xca3b0666UL, 0x5c0b0111UL,
-    0xff9e658fUL, 0x69ae62f8UL, 0xd3ff6b61UL, 0x45cf6c16UL, 0x78e20aa0UL,
-    0xeed20dd7UL, 0x5483044eUL, 0xc2b30339UL, 0x612667a7UL, 0xf71660d0UL,
-    0x4d476949UL, 0xdb776e3eUL, 0x4a6ad1aeUL, 0xdc5ad6d9UL, 0x660bdf40UL,
-    0xf03bd837UL, 0x53aebca9UL, 0xc59ebbdeUL, 0x7fcfb247UL, 0xe9ffb530UL,
-    0x1cf2bdbdUL, 0x8ac2bacaUL, 0x3093b353UL, 0xa6a3b424UL, 0x0536d0baUL,
-    0x9306d7cdUL, 0x2957de54UL, 0xbf67d923UL, 0x2e7a66b3UL, 0xb84a61c4UL,
-    0x021b685dUL, 0x942b6f2aUL, 0x37be0bb4UL, 0xa18e0cc3UL, 0x1bdf055aUL,
-    0x8def022dUL
-  },
-  {
-    0x00000000UL, 0x41311b19UL, 0x82623632UL, 0xc3532d2bUL, 0x04c56c64UL,
-    0x45f4777dUL, 0x86a75a56UL, 0xc796414fUL, 0x088ad9c8UL, 0x49bbc2d1UL,
-    0x8ae8effaUL, 0xcbd9f4e3UL, 0x0c4fb5acUL, 0x4d7eaeb5UL, 0x8e2d839eUL,
-    0xcf1c9887UL, 0x5112c24aUL, 0x1023d953UL, 0xd370f478UL, 0x9241ef61UL,
-    0x55d7ae2eUL, 0x14e6b537UL, 0xd7b5981cUL, 0x96848305UL, 0x59981b82UL,
-    0x18a9009bUL, 0xdbfa2db0UL, 0x9acb36a9UL, 0x5d5d77e6UL, 0x1c6c6cffUL,
-    0xdf3f41d4UL, 0x9e0e5acdUL, 0xa2248495UL, 0xe3159f8cUL, 0x2046b2a7UL,
-    0x6177a9beUL, 0xa6e1e8f1UL, 0xe7d0f3e8UL, 0x2483dec3UL, 0x65b2c5daUL,
-    0xaaae5d5dUL, 0xeb9f4644UL, 0x28cc6b6fUL, 0x69fd7076UL, 0xae6b3139UL,
-    0xef5a2a20UL, 0x2c09070bUL, 0x6d381c12UL, 0xf33646dfUL, 0xb2075dc6UL,
-    0x715470edUL, 0x30656bf4UL, 0xf7f32abbUL, 0xb6c231a2UL, 0x75911c89UL,
-    0x34a00790UL, 0xfbbc9f17UL, 0xba8d840eUL, 0x79dea925UL, 0x38efb23cUL,
-    0xff79f373UL, 0xbe48e86aUL, 0x7d1bc541UL, 0x3c2ade58UL, 0x054f79f0UL,
-    0x447e62e9UL, 0x872d4fc2UL, 0xc61c54dbUL, 0x018a1594UL, 0x40bb0e8dUL,
-    0x83e823a6UL, 0xc2d938bfUL, 0x0dc5a038UL, 0x4cf4bb21UL, 0x8fa7960aUL,
-    0xce968d13UL, 0x0900cc5cUL, 0x4831d745UL, 0x8b62fa6eUL, 0xca53e177UL,
-    0x545dbbbaUL, 0x156ca0a3UL, 0xd63f8d88UL, 0x970e9691UL, 0x5098d7deUL,
-    0x11a9ccc7UL, 0xd2fae1ecUL, 0x93cbfaf5UL, 0x5cd76272UL, 0x1de6796bUL,
-    0xdeb55440UL, 0x9f844f59UL, 0x58120e16UL, 0x1923150fUL, 0xda703824UL,
-    0x9b41233dUL, 0xa76bfd65UL, 0xe65ae67cUL, 0x2509cb57UL, 0x6438d04eUL,
-    0xa3ae9101UL, 0xe29f8a18UL, 0x21cca733UL, 0x60fdbc2aUL, 0xafe124adUL,
-    0xeed03fb4UL, 0x2d83129fUL, 0x6cb20986UL, 0xab2448c9UL, 0xea1553d0UL,
-    0x29467efbUL, 0x687765e2UL, 0xf6793f2fUL, 0xb7482436UL, 0x741b091dUL,
-    0x352a1204UL, 0xf2bc534bUL, 0xb38d4852UL, 0x70de6579UL, 0x31ef7e60UL,
-    0xfef3e6e7UL, 0xbfc2fdfeUL, 0x7c91d0d5UL, 0x3da0cbccUL, 0xfa368a83UL,
-    0xbb07919aUL, 0x7854bcb1UL, 0x3965a7a8UL, 0x4b98833bUL, 0x0aa99822UL,
-    0xc9fab509UL, 0x88cbae10UL, 0x4f5def5fUL, 0x0e6cf446UL, 0xcd3fd96dUL,
-    0x8c0ec274UL, 0x43125af3UL, 0x022341eaUL, 0xc1706cc1UL, 0x804177d8UL,
-    0x47d73697UL, 0x06e62d8eUL, 0xc5b500a5UL, 0x84841bbcUL, 0x1a8a4171UL,
-    0x5bbb5a68UL, 0x98e87743UL, 0xd9d96c5aUL, 0x1e4f2d15UL, 0x5f7e360cUL,
-    0x9c2d1b27UL, 0xdd1c003eUL, 0x120098b9UL, 0x533183a0UL, 0x9062ae8bUL,
-    0xd153b592UL, 0x16c5f4ddUL, 0x57f4efc4UL, 0x94a7c2efUL, 0xd596d9f6UL,
-    0xe9bc07aeUL, 0xa88d1cb7UL, 0x6bde319cUL, 0x2aef2a85UL, 0xed796bcaUL,
-    0xac4870d3UL, 0x6f1b5df8UL, 0x2e2a46e1UL, 0xe136de66UL, 0xa007c57fUL,
-    0x6354e854UL, 0x2265f34dUL, 0xe5f3b202UL, 0xa4c2a91bUL, 0x67918430UL,
-    0x26a09f29UL, 0xb8aec5e4UL, 0xf99fdefdUL, 0x3accf3d6UL, 0x7bfde8cfUL,
-    0xbc6ba980UL, 0xfd5ab299UL, 0x3e099fb2UL, 0x7f3884abUL, 0xb0241c2cUL,
-    0xf1150735UL, 0x32462a1eUL, 0x73773107UL, 0xb4e17048UL, 0xf5d06b51UL,
-    0x3683467aUL, 0x77b25d63UL, 0x4ed7facbUL, 0x0fe6e1d2UL, 0xccb5ccf9UL,
-    0x8d84d7e0UL, 0x4a1296afUL, 0x0b238db6UL, 0xc870a09dUL, 0x8941bb84UL,
-    0x465d2303UL, 0x076c381aUL, 0xc43f1531UL, 0x850e0e28UL, 0x42984f67UL,
-    0x03a9547eUL, 0xc0fa7955UL, 0x81cb624cUL, 0x1fc53881UL, 0x5ef42398UL,
-    0x9da70eb3UL, 0xdc9615aaUL, 0x1b0054e5UL, 0x5a314ffcUL, 0x996262d7UL,
-    0xd85379ceUL, 0x174fe149UL, 0x567efa50UL, 0x952dd77bUL, 0xd41ccc62UL,
-    0x138a8d2dUL, 0x52bb9634UL, 0x91e8bb1fUL, 0xd0d9a006UL, 0xecf37e5eUL,
-    0xadc26547UL, 0x6e91486cUL, 0x2fa05375UL, 0xe836123aUL, 0xa9070923UL,
-    0x6a542408UL, 0x2b653f11UL, 0xe479a796UL, 0xa548bc8fUL, 0x661b91a4UL,
-    0x272a8abdUL, 0xe0bccbf2UL, 0xa18dd0ebUL, 0x62defdc0UL, 0x23efe6d9UL,
-    0xbde1bc14UL, 0xfcd0a70dUL, 0x3f838a26UL, 0x7eb2913fUL, 0xb924d070UL,
-    0xf815cb69UL, 0x3b46e642UL, 0x7a77fd5bUL, 0xb56b65dcUL, 0xf45a7ec5UL,
-    0x370953eeUL, 0x763848f7UL, 0xb1ae09b8UL, 0xf09f12a1UL, 0x33cc3f8aUL,
-    0x72fd2493UL
-  },
-  {
-    0x00000000UL, 0x376ac201UL, 0x6ed48403UL, 0x59be4602UL, 0xdca80907UL,
-    0xebc2cb06UL, 0xb27c8d04UL, 0x85164f05UL, 0xb851130eUL, 0x8f3bd10fUL,
-    0xd685970dUL, 0xe1ef550cUL, 0x64f91a09UL, 0x5393d808UL, 0x0a2d9e0aUL,
-    0x3d475c0bUL, 0x70a3261cUL, 0x47c9e41dUL, 0x1e77a21fUL, 0x291d601eUL,
-    0xac0b2f1bUL, 0x9b61ed1aUL, 0xc2dfab18UL, 0xf5b56919UL, 0xc8f23512UL,
-    0xff98f713UL, 0xa626b111UL, 0x914c7310UL, 0x145a3c15UL, 0x2330fe14UL,
-    0x7a8eb816UL, 0x4de47a17UL, 0xe0464d38UL, 0xd72c8f39UL, 0x8e92c93bUL,
-    0xb9f80b3aUL, 0x3cee443fUL, 0x0b84863eUL, 0x523ac03cUL, 0x6550023dUL,
-    0x58175e36UL, 0x6f7d9c37UL, 0x36c3da35UL, 0x01a91834UL, 0x84bf5731UL,
-    0xb3d59530UL, 0xea6bd332UL, 0xdd011133UL, 0x90e56b24UL, 0xa78fa925UL,
-    0xfe31ef27UL, 0xc95b2d26UL, 0x4c4d6223UL, 0x7b27a022UL, 0x2299e620UL,
-    0x15f32421UL, 0x28b4782aUL, 0x1fdeba2bUL, 0x4660fc29UL, 0x710a3e28UL,
-    0xf41c712dUL, 0xc376b32cUL, 0x9ac8f52eUL, 0xada2372fUL, 0xc08d9a70UL,
-    0xf7e75871UL, 0xae591e73UL, 0x9933dc72UL, 0x1c259377UL, 0x2b4f5176UL,
-    0x72f11774UL, 0x459bd575UL, 0x78dc897eUL, 0x4fb64b7fUL, 0x16080d7dUL,
-    0x2162cf7cUL, 0xa4748079UL, 0x931e4278UL, 0xcaa0047aUL, 0xfdcac67bUL,
-    0xb02ebc6cUL, 0x87447e6dUL, 0xdefa386fUL, 0xe990fa6eUL, 0x6c86b56bUL,
-    0x5bec776aUL, 0x02523168UL, 0x3538f369UL, 0x087faf62UL, 0x3f156d63UL,
-    0x66ab2b61UL, 0x51c1e960UL, 0xd4d7a665UL, 0xe3bd6464UL, 0xba032266UL,
-    0x8d69e067UL, 0x20cbd748UL, 0x17a11549UL, 0x4e1f534bUL, 0x7975914aUL,
-    0xfc63de4fUL, 0xcb091c4eUL, 0x92b75a4cUL, 0xa5dd984dUL, 0x989ac446UL,
-    0xaff00647UL, 0xf64e4045UL, 0xc1248244UL, 0x4432cd41UL, 0x73580f40UL,
-    0x2ae64942UL, 0x1d8c8b43UL, 0x5068f154UL, 0x67023355UL, 0x3ebc7557UL,
-    0x09d6b756UL, 0x8cc0f853UL, 0xbbaa3a52UL, 0xe2147c50UL, 0xd57ebe51UL,
-    0xe839e25aUL, 0xdf53205bUL, 0x86ed6659UL, 0xb187a458UL, 0x3491eb5dUL,
-    0x03fb295cUL, 0x5a456f5eUL, 0x6d2fad5fUL, 0x801b35e1UL, 0xb771f7e0UL,
-    0xeecfb1e2UL, 0xd9a573e3UL, 0x5cb33ce6UL, 0x6bd9fee7UL, 0x3267b8e5UL,
-    0x050d7ae4UL, 0x384a26efUL, 0x0f20e4eeUL, 0x569ea2ecUL, 0x61f460edUL,
-    0xe4e22fe8UL, 0xd388ede9UL, 0x8a36abebUL, 0xbd5c69eaUL, 0xf0b813fdUL,
-    0xc7d2d1fcUL, 0x9e6c97feUL, 0xa90655ffUL, 0x2c101afaUL, 0x1b7ad8fbUL,
-    0x42c49ef9UL, 0x75ae5cf8UL, 0x48e900f3UL, 0x7f83c2f2UL, 0x263d84f0UL,
-    0x115746f1UL, 0x944109f4UL, 0xa32bcbf5UL, 0xfa958df7UL, 0xcdff4ff6UL,
-    0x605d78d9UL, 0x5737bad8UL, 0x0e89fcdaUL, 0x39e33edbUL, 0xbcf571deUL,
-    0x8b9fb3dfUL, 0xd221f5ddUL, 0xe54b37dcUL, 0xd80c6bd7UL, 0xef66a9d6UL,
-    0xb6d8efd4UL, 0x81b22dd5UL, 0x04a462d0UL, 0x33cea0d1UL, 0x6a70e6d3UL,
-    0x5d1a24d2UL, 0x10fe5ec5UL, 0x27949cc4UL, 0x7e2adac6UL, 0x494018c7UL,
-    0xcc5657c2UL, 0xfb3c95c3UL, 0xa282d3c1UL, 0x95e811c0UL, 0xa8af4dcbUL,
-    0x9fc58fcaUL, 0xc67bc9c8UL, 0xf1110bc9UL, 0x740744ccUL, 0x436d86cdUL,
-    0x1ad3c0cfUL, 0x2db902ceUL, 0x4096af91UL, 0x77fc6d90UL, 0x2e422b92UL,
-    0x1928e993UL, 0x9c3ea696UL, 0xab546497UL, 0xf2ea2295UL, 0xc580e094UL,
-    0xf8c7bc9fUL, 0xcfad7e9eUL, 0x9613389cUL, 0xa179fa9dUL, 0x246fb598UL,
-    0x13057799UL, 0x4abb319bUL, 0x7dd1f39aUL, 0x3035898dUL, 0x075f4b8cUL,
-    0x5ee10d8eUL, 0x698bcf8fUL, 0xec9d808aUL, 0xdbf7428bUL, 0x82490489UL,
-    0xb523c688UL, 0x88649a83UL, 0xbf0e5882UL, 0xe6b01e80UL, 0xd1dadc81UL,
-    0x54cc9384UL, 0x63a65185UL, 0x3a181787UL, 0x0d72d586UL, 0xa0d0e2a9UL,
-    0x97ba20a8UL, 0xce0466aaUL, 0xf96ea4abUL, 0x7c78ebaeUL, 0x4b1229afUL,
-    0x12ac6fadUL, 0x25c6adacUL, 0x1881f1a7UL, 0x2feb33a6UL, 0x765575a4UL,
-    0x413fb7a5UL, 0xc429f8a0UL, 0xf3433aa1UL, 0xaafd7ca3UL, 0x9d97bea2UL,
-    0xd073c4b5UL, 0xe71906b4UL, 0xbea740b6UL, 0x89cd82b7UL, 0x0cdbcdb2UL,
-    0x3bb10fb3UL, 0x620f49b1UL, 0x55658bb0UL, 0x6822d7bbUL, 0x5f4815baUL,
-    0x06f653b8UL, 0x319c91b9UL, 0xb48adebcUL, 0x83e01cbdUL, 0xda5e5abfUL,
-    0xed3498beUL
-  },
-  {
-    0x00000000UL, 0x6567bcb8UL, 0x8bc809aaUL, 0xeeafb512UL, 0x5797628fUL,
-    0x32f0de37UL, 0xdc5f6b25UL, 0xb938d79dUL, 0xef28b4c5UL, 0x8a4f087dUL,
-    0x64e0bd6fUL, 0x018701d7UL, 0xb8bfd64aUL, 0xddd86af2UL, 0x3377dfe0UL,
-    0x56106358UL, 0x9f571950UL, 0xfa30a5e8UL, 0x149f10faUL, 0x71f8ac42UL,
-    0xc8c07bdfUL, 0xada7c767UL, 0x43087275UL, 0x266fcecdUL, 0x707fad95UL,
-    0x1518112dUL, 0xfbb7a43fUL, 0x9ed01887UL, 0x27e8cf1aUL, 0x428f73a2UL,
-    0xac20c6b0UL, 0xc9477a08UL, 0x3eaf32a0UL, 0x5bc88e18UL, 0xb5673b0aUL,
-    0xd00087b2UL, 0x6938502fUL, 0x0c5fec97UL, 0xe2f05985UL, 0x8797e53dUL,
-    0xd1878665UL, 0xb4e03addUL, 0x5a4f8fcfUL, 0x3f283377UL, 0x8610e4eaUL,
-    0xe3775852UL, 0x0dd8ed40UL, 0x68bf51f8UL, 0xa1f82bf0UL, 0xc49f9748UL,
-    0x2a30225aUL, 0x4f579ee2UL, 0xf66f497fUL, 0x9308f5c7UL, 0x7da740d5UL,
-    0x18c0fc6dUL, 0x4ed09f35UL, 0x2bb7238dUL, 0xc518969fUL, 0xa07f2a27UL,
-    0x1947fdbaUL, 0x7c204102UL, 0x928ff410UL, 0xf7e848a8UL, 0x3d58149bUL,
-    0x583fa823UL, 0xb6901d31UL, 0xd3f7a189UL, 0x6acf7614UL, 0x0fa8caacUL,
-    0xe1077fbeUL, 0x8460c306UL, 0xd270a05eUL, 0xb7171ce6UL, 0x59b8a9f4UL,
-    0x3cdf154cUL, 0x85e7c2d1UL, 0xe0807e69UL, 0x0e2fcb7bUL, 0x6b4877c3UL,
-    0xa20f0dcbUL, 0xc768b173UL, 0x29c70461UL, 0x4ca0b8d9UL, 0xf5986f44UL,
-    0x90ffd3fcUL, 0x7e5066eeUL, 0x1b37da56UL, 0x4d27b90eUL, 0x284005b6UL,
-    0xc6efb0a4UL, 0xa3880c1cUL, 0x1ab0db81UL, 0x7fd76739UL, 0x9178d22bUL,
-    0xf41f6e93UL, 0x03f7263bUL, 0x66909a83UL, 0x883f2f91UL, 0xed589329UL,
-    0x546044b4UL, 0x3107f80cUL, 0xdfa84d1eUL, 0xbacff1a6UL, 0xecdf92feUL,
-    0x89b82e46UL, 0x67179b54UL, 0x027027ecUL, 0xbb48f071UL, 0xde2f4cc9UL,
-    0x3080f9dbUL, 0x55e74563UL, 0x9ca03f6bUL, 0xf9c783d3UL, 0x176836c1UL,
-    0x720f8a79UL, 0xcb375de4UL, 0xae50e15cUL, 0x40ff544eUL, 0x2598e8f6UL,
-    0x73888baeUL, 0x16ef3716UL, 0xf8408204UL, 0x9d273ebcUL, 0x241fe921UL,
-    0x41785599UL, 0xafd7e08bUL, 0xcab05c33UL, 0x3bb659edUL, 0x5ed1e555UL,
-    0xb07e5047UL, 0xd519ecffUL, 0x6c213b62UL, 0x094687daUL, 0xe7e932c8UL,
-    0x828e8e70UL, 0xd49eed28UL, 0xb1f95190UL, 0x5f56e482UL, 0x3a31583aUL,
-    0x83098fa7UL, 0xe66e331fUL, 0x08c1860dUL, 0x6da63ab5UL, 0xa4e140bdUL,
-    0xc186fc05UL, 0x2f294917UL, 0x4a4ef5afUL, 0xf3762232UL, 0x96119e8aUL,
-    0x78be2b98UL, 0x1dd99720UL, 0x4bc9f478UL, 0x2eae48c0UL, 0xc001fdd2UL,
-    0xa566416aUL, 0x1c5e96f7UL, 0x79392a4fUL, 0x97969f5dUL, 0xf2f123e5UL,
-    0x05196b4dUL, 0x607ed7f5UL, 0x8ed162e7UL, 0xebb6de5fUL, 0x528e09c2UL,
-    0x37e9b57aUL, 0xd9460068UL, 0xbc21bcd0UL, 0xea31df88UL, 0x8f566330UL,
-    0x61f9d622UL, 0x049e6a9aUL, 0xbda6bd07UL, 0xd8c101bfUL, 0x366eb4adUL,
-    0x53090815UL, 0x9a4e721dUL, 0xff29cea5UL, 0x11867bb7UL, 0x74e1c70fUL,
-    0xcdd91092UL, 0xa8beac2aUL, 0x46111938UL, 0x2376a580UL, 0x7566c6d8UL,
-    0x10017a60UL, 0xfeaecf72UL, 0x9bc973caUL, 0x22f1a457UL, 0x479618efUL,
-    0xa939adfdUL, 0xcc5e1145UL, 0x06ee4d76UL, 0x6389f1ceUL, 0x8d2644dcUL,
-    0xe841f864UL, 0x51792ff9UL, 0x341e9341UL, 0xdab12653UL, 0xbfd69aebUL,
-    0xe9c6f9b3UL, 0x8ca1450bUL, 0x620ef019UL, 0x07694ca1UL, 0xbe519b3cUL,
-    0xdb362784UL, 0x35999296UL, 0x50fe2e2eUL, 0x99b95426UL, 0xfcdee89eUL,
-    0x12715d8cUL, 0x7716e134UL, 0xce2e36a9UL, 0xab498a11UL, 0x45e63f03UL,
-    0x208183bbUL, 0x7691e0e3UL, 0x13f65c5bUL, 0xfd59e949UL, 0x983e55f1UL,
-    0x2106826cUL, 0x44613ed4UL, 0xaace8bc6UL, 0xcfa9377eUL, 0x38417fd6UL,
-    0x5d26c36eUL, 0xb389767cUL, 0xd6eecac4UL, 0x6fd61d59UL, 0x0ab1a1e1UL,
-    0xe41e14f3UL, 0x8179a84bUL, 0xd769cb13UL, 0xb20e77abUL, 0x5ca1c2b9UL,
-    0x39c67e01UL, 0x80fea99cUL, 0xe5991524UL, 0x0b36a036UL, 0x6e511c8eUL,
-    0xa7166686UL, 0xc271da3eUL, 0x2cde6f2cUL, 0x49b9d394UL, 0xf0810409UL,
-    0x95e6b8b1UL, 0x7b490da3UL, 0x1e2eb11bUL, 0x483ed243UL, 0x2d596efbUL,
-    0xc3f6dbe9UL, 0xa6916751UL, 0x1fa9b0ccUL, 0x7ace0c74UL, 0x9461b966UL,
-    0xf10605deUL
-#endif
-  }
-};
diff --git a/src/include/gromacs/external/tng_io/external/zlib/deflate.h b/src/include/gromacs/external/tng_io/external/zlib/deflate.h
deleted file mode 100644 (file)
index ce0299e..0000000
+++ /dev/null
@@ -1,346 +0,0 @@
-/* deflate.h -- internal compression state
- * Copyright (C) 1995-2012 Jean-loup Gailly
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-/* @(#) $Id$ */
-
-#ifndef DEFLATE_H
-#define DEFLATE_H
-
-#include "zutil.h"
-
-/* define NO_GZIP when compiling if you want to disable gzip header and
-   trailer creation by deflate().  NO_GZIP would be used to avoid linking in
-   the crc code when it is not needed.  For shared libraries, gzip encoding
-   should be left enabled. */
-#ifndef NO_GZIP
-#  define GZIP
-#endif
-
-/* ===========================================================================
- * Internal compression state.
- */
-
-#define LENGTH_CODES 29
-/* number of length codes, not counting the special END_BLOCK code */
-
-#define LITERALS  256
-/* number of literal bytes 0..255 */
-
-#define L_CODES (LITERALS+1+LENGTH_CODES)
-/* number of Literal or Length codes, including the END_BLOCK code */
-
-#define D_CODES   30
-/* number of distance codes */
-
-#define BL_CODES  19
-/* number of codes used to transfer the bit lengths */
-
-#define HEAP_SIZE (2*L_CODES+1)
-/* maximum heap size */
-
-#define MAX_BITS 15
-/* All codes must not exceed MAX_BITS bits */
-
-#define Buf_size 16
-/* size of bit buffer in bi_buf */
-
-#define INIT_STATE    42
-#define EXTRA_STATE   69
-#define NAME_STATE    73
-#define COMMENT_STATE 91
-#define HCRC_STATE   103
-#define BUSY_STATE   113
-#define FINISH_STATE 666
-/* Stream status */
-
-
-/* Data structure describing a single value and its code string. */
-typedef struct ct_data_s {
-    union {
-        ush  freq;       /* frequency count */
-        ush  code;       /* bit string */
-    } fc;
-    union {
-        ush  dad;        /* father node in Huffman tree */
-        ush  len;        /* length of bit string */
-    } dl;
-} FAR ct_data;
-
-#define Freq fc.freq
-#define Code fc.code
-#define Dad  dl.dad
-#define Len  dl.len
-
-typedef struct static_tree_desc_s  static_tree_desc;
-
-typedef struct tree_desc_s {
-    ct_data *dyn_tree;           /* the dynamic tree */
-    int     max_code;            /* largest code with non zero frequency */
-    static_tree_desc *stat_desc; /* the corresponding static tree */
-} FAR tree_desc;
-
-typedef ush Pos;
-typedef Pos FAR Posf;
-typedef unsigned IPos;
-
-/* A Pos is an index in the character window. We use short instead of int to
- * save space in the various tables. IPos is used only for parameter passing.
- */
-
-typedef struct internal_state {
-    z_streamp strm;      /* pointer back to this zlib stream */
-    int   status;        /* as the name implies */
-    Bytef *pending_buf;  /* output still pending */
-    ulg   pending_buf_size; /* size of pending_buf */
-    Bytef *pending_out;  /* next pending byte to output to the stream */
-    uInt   pending;      /* nb of bytes in the pending buffer */
-    int   wrap;          /* bit 0 true for zlib, bit 1 true for gzip */
-    gz_headerp  gzhead;  /* gzip header information to write */
-    uInt   gzindex;      /* where in extra, name, or comment */
-    Byte  method;        /* can only be DEFLATED */
-    int   last_flush;    /* value of flush param for previous deflate call */
-
-                /* used by deflate.c: */
-
-    uInt  w_size;        /* LZ77 window size (32K by default) */
-    uInt  w_bits;        /* log2(w_size)  (8..16) */
-    uInt  w_mask;        /* w_size - 1 */
-
-    Bytef *window;
-    /* Sliding window. Input bytes are read into the second half of the window,
-     * and move to the first half later to keep a dictionary of at least wSize
-     * bytes. With this organization, matches are limited to a distance of
-     * wSize-MAX_MATCH bytes, but this ensures that IO is always
-     * performed with a length multiple of the block size. Also, it limits
-     * the window size to 64K, which is quite useful on MSDOS.
-     * To do: use the user input buffer as sliding window.
-     */
-
-    ulg window_size;
-    /* Actual size of window: 2*wSize, except when the user input buffer
-     * is directly used as sliding window.
-     */
-
-    Posf *prev;
-    /* Link to older string with same hash index. To limit the size of this
-     * array to 64K, this link is maintained only for the last 32K strings.
-     * An index in this array is thus a window index modulo 32K.
-     */
-
-    Posf *head; /* Heads of the hash chains or NIL. */
-
-    uInt  ins_h;          /* hash index of string to be inserted */
-    uInt  hash_size;      /* number of elements in hash table */
-    uInt  hash_bits;      /* log2(hash_size) */
-    uInt  hash_mask;      /* hash_size-1 */
-
-    uInt  hash_shift;
-    /* Number of bits by which ins_h must be shifted at each input
-     * step. It must be such that after MIN_MATCH steps, the oldest
-     * byte no longer takes part in the hash key, that is:
-     *   hash_shift * MIN_MATCH >= hash_bits
-     */
-
-    long block_start;
-    /* Window position at the beginning of the current output block. Gets
-     * negative when the window is moved backwards.
-     */
-
-    uInt match_length;           /* length of best match */
-    IPos prev_match;             /* previous match */
-    int match_available;         /* set if previous match exists */
-    uInt strstart;               /* start of string to insert */
-    uInt match_start;            /* start of matching string */
-    uInt lookahead;              /* number of valid bytes ahead in window */
-
-    uInt prev_length;
-    /* Length of the best match at previous step. Matches not greater than this
-     * are discarded. This is used in the lazy match evaluation.
-     */
-
-    uInt max_chain_length;
-    /* To speed up deflation, hash chains are never searched beyond this
-     * length.  A higher limit improves compression ratio but degrades the
-     * speed.
-     */
-
-    uInt max_lazy_match;
-    /* Attempt to find a better match only when the current match is strictly
-     * smaller than this value. This mechanism is used only for compression
-     * levels >= 4.
-     */
-#   define max_insert_length  max_lazy_match
-    /* Insert new strings in the hash table only if the match length is not
-     * greater than this length. This saves time but degrades compression.
-     * max_insert_length is used only for compression levels <= 3.
-     */
-
-    int level;    /* compression level (1..9) */
-    int strategy; /* favor or force Huffman coding*/
-
-    uInt good_match;
-    /* Use a faster search when the previous match is longer than this */
-
-    int nice_match; /* Stop searching when current match exceeds this */
-
-                /* used by trees.c: */
-    /* Didn't use ct_data typedef below to suppress compiler warning */
-    struct ct_data_s dyn_ltree[HEAP_SIZE];   /* literal and length tree */
-    struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */
-    struct ct_data_s bl_tree[2*BL_CODES+1];  /* Huffman tree for bit lengths */
-
-    struct tree_desc_s l_desc;               /* desc. for literal tree */
-    struct tree_desc_s d_desc;               /* desc. for distance tree */
-    struct tree_desc_s bl_desc;              /* desc. for bit length tree */
-
-    ush bl_count[MAX_BITS+1];
-    /* number of codes at each bit length for an optimal tree */
-
-    int heap[2*L_CODES+1];      /* heap used to build the Huffman trees */
-    int heap_len;               /* number of elements in the heap */
-    int heap_max;               /* element of largest frequency */
-    /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.
-     * The same heap array is used to build all trees.
-     */
-
-    uch depth[2*L_CODES+1];
-    /* Depth of each subtree used as tie breaker for trees of equal frequency
-     */
-
-    uchf *l_buf;          /* buffer for literals or lengths */
-
-    uInt  lit_bufsize;
-    /* Size of match buffer for literals/lengths.  There are 4 reasons for
-     * limiting lit_bufsize to 64K:
-     *   - frequencies can be kept in 16 bit counters
-     *   - if compression is not successful for the first block, all input
-     *     data is still in the window so we can still emit a stored block even
-     *     when input comes from standard input.  (This can also be done for
-     *     all blocks if lit_bufsize is not greater than 32K.)
-     *   - if compression is not successful for a file smaller than 64K, we can
-     *     even emit a stored file instead of a stored block (saving 5 bytes).
-     *     This is applicable only for zip (not gzip or zlib).
-     *   - creating new Huffman trees less frequently may not provide fast
-     *     adaptation to changes in the input data statistics. (Take for
-     *     example a binary file with poorly compressible code followed by
-     *     a highly compressible string table.) Smaller buffer sizes give
-     *     fast adaptation but have of course the overhead of transmitting
-     *     trees more frequently.
-     *   - I can't count above 4
-     */
-
-    uInt last_lit;      /* running index in l_buf */
-
-    ushf *d_buf;
-    /* Buffer for distances. To simplify the code, d_buf and l_buf have
-     * the same number of elements. To use different lengths, an extra flag
-     * array would be necessary.
-     */
-
-    ulg opt_len;        /* bit length of current block with optimal trees */
-    ulg static_len;     /* bit length of current block with static trees */
-    uInt matches;       /* number of string matches in current block */
-    uInt insert;        /* bytes at end of window left to insert */
-
-#ifdef DEBUG
-    ulg compressed_len; /* total bit length of compressed file mod 2^32 */
-    ulg bits_sent;      /* bit length of compressed data sent mod 2^32 */
-#endif
-
-    ush bi_buf;
-    /* Output buffer. bits are inserted starting at the bottom (least
-     * significant bits).
-     */
-    int bi_valid;
-    /* Number of valid bits in bi_buf.  All bits above the last valid bit
-     * are always zero.
-     */
-
-    ulg high_water;
-    /* High water mark offset in window for initialized bytes -- bytes above
-     * this are set to zero in order to avoid memory check warnings when
-     * longest match routines access bytes past the input.  This is then
-     * updated to the new high water mark.
-     */
-
-} FAR deflate_state;
-
-/* Output a byte on the stream.
- * IN assertion: there is enough room in pending_buf.
- */
-#define put_byte(s, c) {s->pending_buf[s->pending++] = (c);}
-
-
-#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
-/* Minimum amount of lookahead, except at the end of the input file.
- * See deflate.c for comments about the MIN_MATCH+1.
- */
-
-#define MAX_DIST(s)  ((s)->w_size-MIN_LOOKAHEAD)
-/* In order to simplify the code, particularly on 16 bit machines, match
- * distances are limited to MAX_DIST instead of WSIZE.
- */
-
-#define WIN_INIT MAX_MATCH
-/* Number of bytes after end of data in window to initialize in order to avoid
-   memory checker errors from longest match routines */
-
-        /* in trees.c */
-void ZLIB_INTERNAL _tr_init OF((deflate_state *s));
-int ZLIB_INTERNAL _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc));
-void ZLIB_INTERNAL _tr_flush_block OF((deflate_state *s, charf *buf,
-                        ulg stored_len, int last));
-void ZLIB_INTERNAL _tr_flush_bits OF((deflate_state *s));
-void ZLIB_INTERNAL _tr_align OF((deflate_state *s));
-void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf,
-                        ulg stored_len, int last));
-
-#define d_code(dist) \
-   ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
-/* Mapping from a distance to a distance code. dist is the distance - 1 and
- * must not have side effects. _dist_code[256] and _dist_code[257] are never
- * used.
- */
-
-#ifndef DEBUG
-/* Inline versions of _tr_tally for speed: */
-
-#if defined(GEN_TREES_H) || !defined(STDC)
-  extern uch ZLIB_INTERNAL _length_code[];
-  extern uch ZLIB_INTERNAL _dist_code[];
-#else
-  extern const uch ZLIB_INTERNAL _length_code[];
-  extern const uch ZLIB_INTERNAL _dist_code[];
-#endif
-
-# define _tr_tally_lit(s, c, flush) \
-  { uch cc = (c); \
-    s->d_buf[s->last_lit] = 0; \
-    s->l_buf[s->last_lit++] = cc; \
-    s->dyn_ltree[cc].Freq++; \
-    flush = (s->last_lit == s->lit_bufsize-1); \
-   }
-# define _tr_tally_dist(s, distance, length, flush) \
-  { uch len = (length); \
-    ush dist = (distance); \
-    s->d_buf[s->last_lit] = dist; \
-    s->l_buf[s->last_lit++] = len; \
-    dist--; \
-    s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
-    s->dyn_dtree[d_code(dist)].Freq++; \
-    flush = (s->last_lit == s->lit_bufsize-1); \
-  }
-#else
-# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c)
-# define _tr_tally_dist(s, distance, length, flush) \
-              flush = _tr_tally(s, distance, length)
-#endif
-
-#endif /* DEFLATE_H */
diff --git a/src/include/gromacs/external/tng_io/external/zlib/inffast.h b/src/include/gromacs/external/tng_io/external/zlib/inffast.h
deleted file mode 100644 (file)
index e5c1aa4..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-/* inffast.h -- header to use inffast.c
- * Copyright (C) 1995-2003, 2010 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start));
diff --git a/src/include/gromacs/external/tng_io/external/zlib/inffixed.h b/src/include/gromacs/external/tng_io/external/zlib/inffixed.h
deleted file mode 100644 (file)
index d628327..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-    /* inffixed.h -- table for decoding fixed codes
-     * Generated automatically by makefixed().
-     */
-
-    /* WARNING: this file should *not* be used by applications.
-       It is part of the implementation of this library and is
-       subject to change. Applications should only use zlib.h.
-     */
-
-    static const code lenfix[512] = {
-        {96,7,0},{0,8,80},{0,8,16},{20,8,115},{18,7,31},{0,8,112},{0,8,48},
-        {0,9,192},{16,7,10},{0,8,96},{0,8,32},{0,9,160},{0,8,0},{0,8,128},
-        {0,8,64},{0,9,224},{16,7,6},{0,8,88},{0,8,24},{0,9,144},{19,7,59},
-        {0,8,120},{0,8,56},{0,9,208},{17,7,17},{0,8,104},{0,8,40},{0,9,176},
-        {0,8,8},{0,8,136},{0,8,72},{0,9,240},{16,7,4},{0,8,84},{0,8,20},
-        {21,8,227},{19,7,43},{0,8,116},{0,8,52},{0,9,200},{17,7,13},{0,8,100},
-        {0,8,36},{0,9,168},{0,8,4},{0,8,132},{0,8,68},{0,9,232},{16,7,8},
-        {0,8,92},{0,8,28},{0,9,152},{20,7,83},{0,8,124},{0,8,60},{0,9,216},
-        {18,7,23},{0,8,108},{0,8,44},{0,9,184},{0,8,12},{0,8,140},{0,8,76},
-        {0,9,248},{16,7,3},{0,8,82},{0,8,18},{21,8,163},{19,7,35},{0,8,114},
-        {0,8,50},{0,9,196},{17,7,11},{0,8,98},{0,8,34},{0,9,164},{0,8,2},
-        {0,8,130},{0,8,66},{0,9,228},{16,7,7},{0,8,90},{0,8,26},{0,9,148},
-        {20,7,67},{0,8,122},{0,8,58},{0,9,212},{18,7,19},{0,8,106},{0,8,42},
-        {0,9,180},{0,8,10},{0,8,138},{0,8,74},{0,9,244},{16,7,5},{0,8,86},
-        {0,8,22},{64,8,0},{19,7,51},{0,8,118},{0,8,54},{0,9,204},{17,7,15},
-        {0,8,102},{0,8,38},{0,9,172},{0,8,6},{0,8,134},{0,8,70},{0,9,236},
-        {16,7,9},{0,8,94},{0,8,30},{0,9,156},{20,7,99},{0,8,126},{0,8,62},
-        {0,9,220},{18,7,27},{0,8,110},{0,8,46},{0,9,188},{0,8,14},{0,8,142},
-        {0,8,78},{0,9,252},{96,7,0},{0,8,81},{0,8,17},{21,8,131},{18,7,31},
-        {0,8,113},{0,8,49},{0,9,194},{16,7,10},{0,8,97},{0,8,33},{0,9,162},
-        {0,8,1},{0,8,129},{0,8,65},{0,9,226},{16,7,6},{0,8,89},{0,8,25},
-        {0,9,146},{19,7,59},{0,8,121},{0,8,57},{0,9,210},{17,7,17},{0,8,105},
-        {0,8,41},{0,9,178},{0,8,9},{0,8,137},{0,8,73},{0,9,242},{16,7,4},
-        {0,8,85},{0,8,21},{16,8,258},{19,7,43},{0,8,117},{0,8,53},{0,9,202},
-        {17,7,13},{0,8,101},{0,8,37},{0,9,170},{0,8,5},{0,8,133},{0,8,69},
-        {0,9,234},{16,7,8},{0,8,93},{0,8,29},{0,9,154},{20,7,83},{0,8,125},
-        {0,8,61},{0,9,218},{18,7,23},{0,8,109},{0,8,45},{0,9,186},{0,8,13},
-        {0,8,141},{0,8,77},{0,9,250},{16,7,3},{0,8,83},{0,8,19},{21,8,195},
-        {19,7,35},{0,8,115},{0,8,51},{0,9,198},{17,7,11},{0,8,99},{0,8,35},
-        {0,9,166},{0,8,3},{0,8,131},{0,8,67},{0,9,230},{16,7,7},{0,8,91},
-        {0,8,27},{0,9,150},{20,7,67},{0,8,123},{0,8,59},{0,9,214},{18,7,19},
-        {0,8,107},{0,8,43},{0,9,182},{0,8,11},{0,8,139},{0,8,75},{0,9,246},
-        {16,7,5},{0,8,87},{0,8,23},{64,8,0},{19,7,51},{0,8,119},{0,8,55},
-        {0,9,206},{17,7,15},{0,8,103},{0,8,39},{0,9,174},{0,8,7},{0,8,135},
-        {0,8,71},{0,9,238},{16,7,9},{0,8,95},{0,8,31},{0,9,158},{20,7,99},
-        {0,8,127},{0,8,63},{0,9,222},{18,7,27},{0,8,111},{0,8,47},{0,9,190},
-        {0,8,15},{0,8,143},{0,8,79},{0,9,254},{96,7,0},{0,8,80},{0,8,16},
-        {20,8,115},{18,7,31},{0,8,112},{0,8,48},{0,9,193},{16,7,10},{0,8,96},
-        {0,8,32},{0,9,161},{0,8,0},{0,8,128},{0,8,64},{0,9,225},{16,7,6},
-        {0,8,88},{0,8,24},{0,9,145},{19,7,59},{0,8,120},{0,8,56},{0,9,209},
-        {17,7,17},{0,8,104},{0,8,40},{0,9,177},{0,8,8},{0,8,136},{0,8,72},
-        {0,9,241},{16,7,4},{0,8,84},{0,8,20},{21,8,227},{19,7,43},{0,8,116},
-        {0,8,52},{0,9,201},{17,7,13},{0,8,100},{0,8,36},{0,9,169},{0,8,4},
-        {0,8,132},{0,8,68},{0,9,233},{16,7,8},{0,8,92},{0,8,28},{0,9,153},
-        {20,7,83},{0,8,124},{0,8,60},{0,9,217},{18,7,23},{0,8,108},{0,8,44},
-        {0,9,185},{0,8,12},{0,8,140},{0,8,76},{0,9,249},{16,7,3},{0,8,82},
-        {0,8,18},{21,8,163},{19,7,35},{0,8,114},{0,8,50},{0,9,197},{17,7,11},
-        {0,8,98},{0,8,34},{0,9,165},{0,8,2},{0,8,130},{0,8,66},{0,9,229},
-        {16,7,7},{0,8,90},{0,8,26},{0,9,149},{20,7,67},{0,8,122},{0,8,58},
-        {0,9,213},{18,7,19},{0,8,106},{0,8,42},{0,9,181},{0,8,10},{0,8,138},
-        {0,8,74},{0,9,245},{16,7,5},{0,8,86},{0,8,22},{64,8,0},{19,7,51},
-        {0,8,118},{0,8,54},{0,9,205},{17,7,15},{0,8,102},{0,8,38},{0,9,173},
-        {0,8,6},{0,8,134},{0,8,70},{0,9,237},{16,7,9},{0,8,94},{0,8,30},
-        {0,9,157},{20,7,99},{0,8,126},{0,8,62},{0,9,221},{18,7,27},{0,8,110},
-        {0,8,46},{0,9,189},{0,8,14},{0,8,142},{0,8,78},{0,9,253},{96,7,0},
-        {0,8,81},{0,8,17},{21,8,131},{18,7,31},{0,8,113},{0,8,49},{0,9,195},
-        {16,7,10},{0,8,97},{0,8,33},{0,9,163},{0,8,1},{0,8,129},{0,8,65},
-        {0,9,227},{16,7,6},{0,8,89},{0,8,25},{0,9,147},{19,7,59},{0,8,121},
-        {0,8,57},{0,9,211},{17,7,17},{0,8,105},{0,8,41},{0,9,179},{0,8,9},
-        {0,8,137},{0,8,73},{0,9,243},{16,7,4},{0,8,85},{0,8,21},{16,8,258},
-        {19,7,43},{0,8,117},{0,8,53},{0,9,203},{17,7,13},{0,8,101},{0,8,37},
-        {0,9,171},{0,8,5},{0,8,133},{0,8,69},{0,9,235},{16,7,8},{0,8,93},
-        {0,8,29},{0,9,155},{20,7,83},{0,8,125},{0,8,61},{0,9,219},{18,7,23},
-        {0,8,109},{0,8,45},{0,9,187},{0,8,13},{0,8,141},{0,8,77},{0,9,251},
-        {16,7,3},{0,8,83},{0,8,19},{21,8,195},{19,7,35},{0,8,115},{0,8,51},
-        {0,9,199},{17,7,11},{0,8,99},{0,8,35},{0,9,167},{0,8,3},{0,8,131},
-        {0,8,67},{0,9,231},{16,7,7},{0,8,91},{0,8,27},{0,9,151},{20,7,67},
-        {0,8,123},{0,8,59},{0,9,215},{18,7,19},{0,8,107},{0,8,43},{0,9,183},
-        {0,8,11},{0,8,139},{0,8,75},{0,9,247},{16,7,5},{0,8,87},{0,8,23},
-        {64,8,0},{19,7,51},{0,8,119},{0,8,55},{0,9,207},{17,7,15},{0,8,103},
-        {0,8,39},{0,9,175},{0,8,7},{0,8,135},{0,8,71},{0,9,239},{16,7,9},
-        {0,8,95},{0,8,31},{0,9,159},{20,7,99},{0,8,127},{0,8,63},{0,9,223},
-        {18,7,27},{0,8,111},{0,8,47},{0,9,191},{0,8,15},{0,8,143},{0,8,79},
-        {0,9,255}
-    };
-
-    static const code distfix[32] = {
-        {16,5,1},{23,5,257},{19,5,17},{27,5,4097},{17,5,5},{25,5,1025},
-        {21,5,65},{29,5,16385},{16,5,3},{24,5,513},{20,5,33},{28,5,8193},
-        {18,5,9},{26,5,2049},{22,5,129},{64,5,0},{16,5,2},{23,5,385},
-        {19,5,25},{27,5,6145},{17,5,7},{25,5,1537},{21,5,97},{29,5,24577},
-        {16,5,4},{24,5,769},{20,5,49},{28,5,12289},{18,5,13},{26,5,3073},
-        {22,5,193},{64,5,0}
-    };
diff --git a/src/include/gromacs/external/tng_io/external/zlib/inflate.h b/src/include/gromacs/external/tng_io/external/zlib/inflate.h
deleted file mode 100644 (file)
index 95f4986..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-/* inflate.h -- internal inflate state definition
- * Copyright (C) 1995-2009 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-/* define NO_GZIP when compiling if you want to disable gzip header and
-   trailer decoding by inflate().  NO_GZIP would be used to avoid linking in
-   the crc code when it is not needed.  For shared libraries, gzip decoding
-   should be left enabled. */
-#ifndef NO_GZIP
-#  define GUNZIP
-#endif
-
-/* Possible inflate modes between inflate() calls */
-typedef enum {
-    HEAD,       /* i: waiting for magic header */
-    FLAGS,      /* i: waiting for method and flags (gzip) */
-    TIME,       /* i: waiting for modification time (gzip) */
-    OS,         /* i: waiting for extra flags and operating system (gzip) */
-    EXLEN,      /* i: waiting for extra length (gzip) */
-    EXTRA,      /* i: waiting for extra bytes (gzip) */
-    NAME,       /* i: waiting for end of file name (gzip) */
-    COMMENT,    /* i: waiting for end of comment (gzip) */
-    HCRC,       /* i: waiting for header crc (gzip) */
-    DICTID,     /* i: waiting for dictionary check value */
-    DICT,       /* waiting for inflateSetDictionary() call */
-        TYPE,       /* i: waiting for type bits, including last-flag bit */
-        TYPEDO,     /* i: same, but skip check to exit inflate on new block */
-        STORED,     /* i: waiting for stored size (length and complement) */
-        COPY_,      /* i/o: same as COPY below, but only first time in */
-        COPY,       /* i/o: waiting for input or output to copy stored block */
-        TABLE,      /* i: waiting for dynamic block table lengths */
-        LENLENS,    /* i: waiting for code length code lengths */
-        CODELENS,   /* i: waiting for length/lit and distance code lengths */
-            LEN_,       /* i: same as LEN below, but only first time in */
-            LEN,        /* i: waiting for length/lit/eob code */
-            LENEXT,     /* i: waiting for length extra bits */
-            DIST,       /* i: waiting for distance code */
-            DISTEXT,    /* i: waiting for distance extra bits */
-            MATCH,      /* o: waiting for output space to copy string */
-            LIT,        /* o: waiting for output space to write literal */
-    CHECK,      /* i: waiting for 32-bit check value */
-    LENGTH,     /* i: waiting for 32-bit length (gzip) */
-    DONE,       /* finished check, done -- remain here until reset */
-    BAD,        /* got a data error -- remain here until reset */
-    MEM,        /* got an inflate() memory error -- remain here until reset */
-    SYNC        /* looking for synchronization bytes to restart inflate() */
-} inflate_mode;
-
-/*
-    State transitions between above modes -
-
-    (most modes can go to BAD or MEM on error -- not shown for clarity)
-
-    Process header:
-        HEAD -> (gzip) or (zlib) or (raw)
-        (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME -> COMMENT ->
-                  HCRC -> TYPE
-        (zlib) -> DICTID or TYPE
-        DICTID -> DICT -> TYPE
-        (raw) -> TYPEDO
-    Read deflate blocks:
-            TYPE -> TYPEDO -> STORED or TABLE or LEN_ or CHECK
-            STORED -> COPY_ -> COPY -> TYPE
-            TABLE -> LENLENS -> CODELENS -> LEN_
-            LEN_ -> LEN
-    Read deflate codes in fixed or dynamic block:
-                LEN -> LENEXT or LIT or TYPE
-                LENEXT -> DIST -> DISTEXT -> MATCH -> LEN
-                LIT -> LEN
-    Process trailer:
-        CHECK -> LENGTH -> DONE
- */
-
-/* state maintained between inflate() calls.  Approximately 10K bytes. */
-struct inflate_state {
-    inflate_mode mode;          /* current inflate mode */
-    int last;                   /* true if processing last block */
-    int wrap;                   /* bit 0 true for zlib, bit 1 true for gzip */
-    int havedict;               /* true if dictionary provided */
-    int flags;                  /* gzip header method and flags (0 if zlib) */
-    unsigned dmax;              /* zlib header max distance (INFLATE_STRICT) */
-    unsigned long check;        /* protected copy of check value */
-    unsigned long total;        /* protected copy of output count */
-    gz_headerp head;            /* where to save gzip header information */
-        /* sliding window */
-    unsigned wbits;             /* log base 2 of requested window size */
-    unsigned wsize;             /* window size or zero if not using window */
-    unsigned whave;             /* valid bytes in the window */
-    unsigned wnext;             /* window write index */
-    unsigned char FAR *window;  /* allocated sliding window, if needed */
-        /* bit accumulator */
-    unsigned long hold;         /* input bit accumulator */
-    unsigned bits;              /* number of bits in "in" */
-        /* for string and stored block copying */
-    unsigned length;            /* literal or length of data to copy */
-    unsigned offset;            /* distance back to copy string from */
-        /* for table and code decoding */
-    unsigned extra;             /* extra bits needed */
-        /* fixed and dynamic code tables */
-    code const FAR *lencode;    /* starting table for length/literal codes */
-    code const FAR *distcode;   /* starting table for distance codes */
-    unsigned lenbits;           /* index bits for lencode */
-    unsigned distbits;          /* index bits for distcode */
-        /* dynamic table building */
-    unsigned ncode;             /* number of code length code lengths */
-    unsigned nlen;              /* number of length code lengths */
-    unsigned ndist;             /* number of distance code lengths */
-    unsigned have;              /* number of code lengths in lens[] */
-    code FAR *next;             /* next available space in codes[] */
-    unsigned short lens[320];   /* temporary storage for code lengths */
-    unsigned short work[288];   /* work area for code table building */
-    code codes[ENOUGH];         /* space for code tables */
-    int sane;                   /* if false, allow invalid distance too far */
-    int back;                   /* bits back of last unprocessed length/lit */
-    unsigned was;               /* initial length of match */
-};
diff --git a/src/include/gromacs/external/tng_io/external/zlib/inftrees.h b/src/include/gromacs/external/tng_io/external/zlib/inftrees.h
deleted file mode 100644 (file)
index baa53a0..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/* inftrees.h -- header to use inftrees.c
- * Copyright (C) 1995-2005, 2010 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-/* Structure for decoding tables.  Each entry provides either the
-   information needed to do the operation requested by the code that
-   indexed that table entry, or it provides a pointer to another
-   table that indexes more bits of the code.  op indicates whether
-   the entry is a pointer to another table, a literal, a length or
-   distance, an end-of-block, or an invalid code.  For a table
-   pointer, the low four bits of op is the number of index bits of
-   that table.  For a length or distance, the low four bits of op
-   is the number of extra bits to get after the code.  bits is
-   the number of bits in this code or part of the code to drop off
-   of the bit buffer.  val is the actual byte to output in the case
-   of a literal, the base length or distance, or the offset from
-   the current table to the next table.  Each entry is four bytes. */
-typedef struct {
-    unsigned char op;           /* operation, extra bits, table bits */
-    unsigned char bits;         /* bits in this part of the code */
-    unsigned short val;         /* offset in table or code value */
-} code;
-
-/* op values as set by inflate_table():
-    00000000 - literal
-    0000tttt - table link, tttt != 0 is the number of table index bits
-    0001eeee - length or distance, eeee is the number of extra bits
-    01100000 - end of block
-    01000000 - invalid code
- */
-
-/* Maximum size of the dynamic table.  The maximum number of code structures is
-   1444, which is the sum of 852 for literal/length codes and 592 for distance
-   codes.  These values were found by exhaustive searches using the program
-   examples/enough.c found in the zlib distribtution.  The arguments to that
-   program are the number of symbols, the initial root table size, and the
-   maximum bit length of a code.  "enough 286 9 15" for literal/length codes
-   returns returns 852, and "enough 30 6 15" for distance codes returns 592.
-   The initial root table size (9 or 6) is found in the fifth argument of the
-   inflate_table() calls in inflate.c and infback.c.  If the root table size is
-   changed, then these maximum sizes would be need to be recalculated and
-   updated. */
-#define ENOUGH_LENS 852
-#define ENOUGH_DISTS 592
-#define ENOUGH (ENOUGH_LENS+ENOUGH_DISTS)
-
-/* Type of code to build for inflate_table() */
-typedef enum {
-    CODES,
-    LENS,
-    DISTS
-} codetype;
-
-int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens,
-                             unsigned codes, code FAR * FAR *table,
-                             unsigned FAR *bits, unsigned short FAR *work));
diff --git a/src/include/gromacs/external/tng_io/external/zlib/trees.h b/src/include/gromacs/external/tng_io/external/zlib/trees.h
deleted file mode 100644 (file)
index d35639d..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-/* header created automatically with -DGEN_TREES_H */
-
-local const ct_data static_ltree[L_CODES+2] = {
-{{ 12},{  8}}, {{140},{  8}}, {{ 76},{  8}}, {{204},{  8}}, {{ 44},{  8}},
-{{172},{  8}}, {{108},{  8}}, {{236},{  8}}, {{ 28},{  8}}, {{156},{  8}},
-{{ 92},{  8}}, {{220},{  8}}, {{ 60},{  8}}, {{188},{  8}}, {{124},{  8}},
-{{252},{  8}}, {{  2},{  8}}, {{130},{  8}}, {{ 66},{  8}}, {{194},{  8}},
-{{ 34},{  8}}, {{162},{  8}}, {{ 98},{  8}}, {{226},{  8}}, {{ 18},{  8}},
-{{146},{  8}}, {{ 82},{  8}}, {{210},{  8}}, {{ 50},{  8}}, {{178},{  8}},
-{{114},{  8}}, {{242},{  8}}, {{ 10},{  8}}, {{138},{  8}}, {{ 74},{  8}},
-{{202},{  8}}, {{ 42},{  8}}, {{170},{  8}}, {{106},{  8}}, {{234},{  8}},
-{{ 26},{  8}}, {{154},{  8}}, {{ 90},{  8}}, {{218},{  8}}, {{ 58},{  8}},
-{{186},{  8}}, {{122},{  8}}, {{250},{  8}}, {{  6},{  8}}, {{134},{  8}},
-{{ 70},{  8}}, {{198},{  8}}, {{ 38},{  8}}, {{166},{  8}}, {{102},{  8}},
-{{230},{  8}}, {{ 22},{  8}}, {{150},{  8}}, {{ 86},{  8}}, {{214},{  8}},
-{{ 54},{  8}}, {{182},{  8}}, {{118},{  8}}, {{246},{  8}}, {{ 14},{  8}},
-{{142},{  8}}, {{ 78},{  8}}, {{206},{  8}}, {{ 46},{  8}}, {{174},{  8}},
-{{110},{  8}}, {{238},{  8}}, {{ 30},{  8}}, {{158},{  8}}, {{ 94},{  8}},
-{{222},{  8}}, {{ 62},{  8}}, {{190},{  8}}, {{126},{  8}}, {{254},{  8}},
-{{  1},{  8}}, {{129},{  8}}, {{ 65},{  8}}, {{193},{  8}}, {{ 33},{  8}},
-{{161},{  8}}, {{ 97},{  8}}, {{225},{  8}}, {{ 17},{  8}}, {{145},{  8}},
-{{ 81},{  8}}, {{209},{  8}}, {{ 49},{  8}}, {{177},{  8}}, {{113},{  8}},
-{{241},{  8}}, {{  9},{  8}}, {{137},{  8}}, {{ 73},{  8}}, {{201},{  8}},
-{{ 41},{  8}}, {{169},{  8}}, {{105},{  8}}, {{233},{  8}}, {{ 25},{  8}},
-{{153},{  8}}, {{ 89},{  8}}, {{217},{  8}}, {{ 57},{  8}}, {{185},{  8}},
-{{121},{  8}}, {{249},{  8}}, {{  5},{  8}}, {{133},{  8}}, {{ 69},{  8}},
-{{197},{  8}}, {{ 37},{  8}}, {{165},{  8}}, {{101},{  8}}, {{229},{  8}},
-{{ 21},{  8}}, {{149},{  8}}, {{ 85},{  8}}, {{213},{  8}}, {{ 53},{  8}},
-{{181},{  8}}, {{117},{  8}}, {{245},{  8}}, {{ 13},{  8}}, {{141},{  8}},
-{{ 77},{  8}}, {{205},{  8}}, {{ 45},{  8}}, {{173},{  8}}, {{109},{  8}},
-{{237},{  8}}, {{ 29},{  8}}, {{157},{  8}}, {{ 93},{  8}}, {{221},{  8}},
-{{ 61},{  8}}, {{189},{  8}}, {{125},{  8}}, {{253},{  8}}, {{ 19},{  9}},
-{{275},{  9}}, {{147},{  9}}, {{403},{  9}}, {{ 83},{  9}}, {{339},{  9}},
-{{211},{  9}}, {{467},{  9}}, {{ 51},{  9}}, {{307},{  9}}, {{179},{  9}},
-{{435},{  9}}, {{115},{  9}}, {{371},{  9}}, {{243},{  9}}, {{499},{  9}},
-{{ 11},{  9}}, {{267},{  9}}, {{139},{  9}}, {{395},{  9}}, {{ 75},{  9}},
-{{331},{  9}}, {{203},{  9}}, {{459},{  9}}, {{ 43},{  9}}, {{299},{  9}},
-{{171},{  9}}, {{427},{  9}}, {{107},{  9}}, {{363},{  9}}, {{235},{  9}},
-{{491},{  9}}, {{ 27},{  9}}, {{283},{  9}}, {{155},{  9}}, {{411},{  9}},
-{{ 91},{  9}}, {{347},{  9}}, {{219},{  9}}, {{475},{  9}}, {{ 59},{  9}},
-{{315},{  9}}, {{187},{  9}}, {{443},{  9}}, {{123},{  9}}, {{379},{  9}},
-{{251},{  9}}, {{507},{  9}}, {{  7},{  9}}, {{263},{  9}}, {{135},{  9}},
-{{391},{  9}}, {{ 71},{  9}}, {{327},{  9}}, {{199},{  9}}, {{455},{  9}},
-{{ 39},{  9}}, {{295},{  9}}, {{167},{  9}}, {{423},{  9}}, {{103},{  9}},
-{{359},{  9}}, {{231},{  9}}, {{487},{  9}}, {{ 23},{  9}}, {{279},{  9}},
-{{151},{  9}}, {{407},{  9}}, {{ 87},{  9}}, {{343},{  9}}, {{215},{  9}},
-{{471},{  9}}, {{ 55},{  9}}, {{311},{  9}}, {{183},{  9}}, {{439},{  9}},
-{{119},{  9}}, {{375},{  9}}, {{247},{  9}}, {{503},{  9}}, {{ 15},{  9}},
-{{271},{  9}}, {{143},{  9}}, {{399},{  9}}, {{ 79},{  9}}, {{335},{  9}},
-{{207},{  9}}, {{463},{  9}}, {{ 47},{  9}}, {{303},{  9}}, {{175},{  9}},
-{{431},{  9}}, {{111},{  9}}, {{367},{  9}}, {{239},{  9}}, {{495},{  9}},
-{{ 31},{  9}}, {{287},{  9}}, {{159},{  9}}, {{415},{  9}}, {{ 95},{  9}},
-{{351},{  9}}, {{223},{  9}}, {{479},{  9}}, {{ 63},{  9}}, {{319},{  9}},
-{{191},{  9}}, {{447},{  9}}, {{127},{  9}}, {{383},{  9}}, {{255},{  9}},
-{{511},{  9}}, {{  0},{  7}}, {{ 64},{  7}}, {{ 32},{  7}}, {{ 96},{  7}},
-{{ 16},{  7}}, {{ 80},{  7}}, {{ 48},{  7}}, {{112},{  7}}, {{  8},{  7}},
-{{ 72},{  7}}, {{ 40},{  7}}, {{104},{  7}}, {{ 24},{  7}}, {{ 88},{  7}},
-{{ 56},{  7}}, {{120},{  7}}, {{  4},{  7}}, {{ 68},{  7}}, {{ 36},{  7}},
-{{100},{  7}}, {{ 20},{  7}}, {{ 84},{  7}}, {{ 52},{  7}}, {{116},{  7}},
-{{  3},{  8}}, {{131},{  8}}, {{ 67},{  8}}, {{195},{  8}}, {{ 35},{  8}},
-{{163},{  8}}, {{ 99},{  8}}, {{227},{  8}}
-};
-
-local const ct_data static_dtree[D_CODES] = {
-{{ 0},{ 5}}, {{16},{ 5}}, {{ 8},{ 5}}, {{24},{ 5}}, {{ 4},{ 5}},
-{{20},{ 5}}, {{12},{ 5}}, {{28},{ 5}}, {{ 2},{ 5}}, {{18},{ 5}},
-{{10},{ 5}}, {{26},{ 5}}, {{ 6},{ 5}}, {{22},{ 5}}, {{14},{ 5}},
-{{30},{ 5}}, {{ 1},{ 5}}, {{17},{ 5}}, {{ 9},{ 5}}, {{25},{ 5}},
-{{ 5},{ 5}}, {{21},{ 5}}, {{13},{ 5}}, {{29},{ 5}}, {{ 3},{ 5}},
-{{19},{ 5}}, {{11},{ 5}}, {{27},{ 5}}, {{ 7},{ 5}}, {{23},{ 5}}
-};
-
-const uch ZLIB_INTERNAL _dist_code[DIST_CODE_LEN] = {
- 0,  1,  2,  3,  4,  4,  5,  5,  6,  6,  6,  6,  7,  7,  7,  7,  8,  8,  8,  8,
- 8,  8,  8,  8,  9,  9,  9,  9,  9,  9,  9,  9, 10, 10, 10, 10, 10, 10, 10, 10,
-10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
-11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
-12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13,
-13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
-13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
-14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
-14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
-14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15,
-15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
-15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
-15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,  0,  0, 16, 17,
-18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22,
-23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
-26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27,
-27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
-28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
-28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
-28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
-29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
-29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
-29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29
-};
-
-const uch ZLIB_INTERNAL _length_code[MAX_MATCH-MIN_MATCH+1]= {
- 0,  1,  2,  3,  4,  5,  6,  7,  8,  8,  9,  9, 10, 10, 11, 11, 12, 12, 12, 12,
-13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16,
-17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19,
-19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22,
-22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23,
-23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26,
-26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
-26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28
-};
-
-local const int base_length[LENGTH_CODES] = {
-0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56,
-64, 80, 96, 112, 128, 160, 192, 224, 0
-};
-
-local const int base_dist[D_CODES] = {
-    0,     1,     2,     3,     4,     6,     8,    12,    16,    24,
-   32,    48,    64,    96,   128,   192,   256,   384,   512,   768,
- 1024,  1536,  2048,  3072,  4096,  6144,  8192, 12288, 16384, 24576
-};
-
diff --git a/src/include/gromacs/external/tng_io/external/zlib/zconf.h b/src/include/gromacs/external/tng_io/external/zlib/zconf.h
deleted file mode 100644 (file)
index c90fb53..0000000
+++ /dev/null
@@ -1,367 +0,0 @@
-/* zconf.h -- configuration of the zlib compression library
- * Copyright (C) 1995-2013 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id$ */
-
-#ifndef ZCONF_H
-#define ZCONF_H
-
-#if defined(__MSDOS__) && !defined(MSDOS)
-#  define MSDOS
-#endif
-#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
-#  define OS2
-#endif
-#if defined(_WINDOWS) && !defined(WINDOWS)
-#  define WINDOWS
-#endif
-#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
-#  ifndef WIN32
-#    define WIN32
-#  endif
-#endif
-#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
-#  if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
-#    ifndef SYS16BIT
-#      define SYS16BIT
-#    endif
-#  endif
-#endif
-
-/*
- * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
- * than 64k bytes at a time (needed on systems with 16-bit int).
- */
-#ifdef SYS16BIT
-#  define MAXSEG_64K
-#endif
-#ifdef MSDOS
-#  define UNALIGNED_OK
-#endif
-
-#ifdef __STDC_VERSION__
-#  ifndef STDC
-#    define STDC
-#  endif
-#  if __STDC_VERSION__ >= 199901L
-#    ifndef STDC99
-#      define STDC99
-#    endif
-#  endif
-#endif
-#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
-#  define STDC
-#endif
-
-#if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */
-#  define STDC
-#endif
-
-#ifndef STDC
-#  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
-#    define const       /* note: need a more gentle solution here */
-#  endif
-#endif
-
-#if defined(ZLIB_CONST) && !defined(z_const)
-#  define z_const const
-#else
-#  define z_const
-#endif
-
-/* Some Mac compilers merge all .h files incorrectly: */
-#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
-#  define NO_DUMMY_DECL
-#endif
-
-/* Maximum value for memLevel in deflateInit2 */
-#ifndef MAX_MEM_LEVEL
-#  ifdef MAXSEG_64K
-#    define MAX_MEM_LEVEL 8
-#  else
-#    define MAX_MEM_LEVEL 9
-#  endif
-#endif
-
-/* Maximum value for windowBits in deflateInit2 and inflateInit2.
- * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
- * created by gzip. (Files created by minigzip can still be extracted by
- * gzip.)
- */
-#ifndef MAX_WBITS
-#  define MAX_WBITS   15 /* 32K LZ77 window */
-#endif
-
-/* The memory requirements for deflate are (in bytes):
-            (1 << (windowBits+2)) +  (1 << (memLevel+9))
- that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
- plus a few kilobytes for small objects. For example, if you want to reduce
- the default memory requirements from 256K to 128K, compile with
-     make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
- Of course this will generally degrade compression (there's no free lunch).
-
-   The memory requirements for inflate are (in bytes) 1 << windowBits
- that is, 32K for windowBits=15 (default value) plus a few kilobytes
- for small objects.
-*/
-
-                        /* Type declarations */
-
-#ifndef OF /* function prototypes */
-#  ifdef STDC
-#    define OF(args)  args
-#  else
-#    define OF(args)  ()
-#  endif
-#endif
-
-#ifndef Z_ARG /* function prototypes for stdarg */
-#  if defined(STDC) || defined(Z_HAVE_STDARG_H)
-#    define Z_ARG(args)  args
-#  else
-#    define Z_ARG(args)  ()
-#  endif
-#endif
-
-/* The following definitions for FAR are needed only for MSDOS mixed
- * model programming (small or medium model with some far allocations).
- * This was tested only with MSC; for other MSDOS compilers you may have
- * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
- * just define FAR to be empty.
- */
-#ifdef SYS16BIT
-#  if defined(M_I86SM) || defined(M_I86MM)
-     /* MSC small or medium model */
-#    define SMALL_MEDIUM
-#    ifdef _MSC_VER
-#      define FAR _far
-#    else
-#      define FAR far
-#    endif
-#  endif
-#  if (defined(__SMALL__) || defined(__MEDIUM__))
-     /* Turbo C small or medium model */
-#    define SMALL_MEDIUM
-#    ifdef __BORLANDC__
-#      define FAR _far
-#    else
-#      define FAR far
-#    endif
-#  endif
-#endif
-
-#if defined(WINDOWS) || defined(WIN32)
-   /* If building or using zlib as a DLL, define ZLIB_DLL.
-    * This is not mandatory, but it offers a little performance increase.
-    */
-#  ifdef ZLIB_DLL
-#    if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
-#      ifdef ZLIB_INTERNAL
-#        define ZEXTERN extern __declspec(dllexport)
-#      else
-#        define ZEXTERN extern __declspec(dllimport)
-#      endif
-#    endif
-#  endif  /* ZLIB_DLL */
-   /* If building or using zlib with the WINAPI/WINAPIV calling convention,
-    * define ZLIB_WINAPI.
-    * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
-    */
-#  ifdef ZLIB_WINAPI
-#    ifdef FAR
-#      undef FAR
-#    endif
-#    include <windows.h>
-     /* No need for _export, use ZLIB.DEF instead. */
-     /* For complete Windows compatibility, use WINAPI, not __stdcall. */
-#    define ZEXPORT WINAPI
-#    ifdef WIN32
-#      define ZEXPORTVA WINAPIV
-#    else
-#      define ZEXPORTVA FAR CDECL
-#    endif
-#  endif
-#endif
-
-#if defined (__BEOS__)
-#  ifdef ZLIB_DLL
-#    ifdef ZLIB_INTERNAL
-#      define ZEXPORT   __declspec(dllexport)
-#      define ZEXPORTVA __declspec(dllexport)
-#    else
-#      define ZEXPORT   __declspec(dllimport)
-#      define ZEXPORTVA __declspec(dllimport)
-#    endif
-#  endif
-#endif
-
-#ifndef ZEXTERN
-#  define ZEXTERN extern
-#endif
-#ifndef ZEXPORT
-#  define ZEXPORT
-#endif
-#ifndef ZEXPORTVA
-#  define ZEXPORTVA
-#endif
-
-#ifndef FAR
-#  define FAR
-#endif
-
-#if !defined(__MACTYPES__)
-typedef unsigned char  Byte;  /* 8 bits */
-#endif
-typedef unsigned int   uInt;  /* 16 bits or more */
-typedef unsigned long  uLong; /* 32 bits or more */
-
-#ifdef SMALL_MEDIUM
-   /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
-#  define Bytef Byte FAR
-#else
-   typedef Byte  FAR Bytef;
-#endif
-typedef char  FAR charf;
-typedef int   FAR intf;
-typedef uInt  FAR uIntf;
-typedef uLong FAR uLongf;
-
-#ifdef STDC
-   typedef void const *voidpc;
-   typedef void FAR   *voidpf;
-   typedef void       *voidp;
-#else
-   typedef Byte const *voidpc;
-   typedef Byte FAR   *voidpf;
-   typedef Byte       *voidp;
-#endif
-
-#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
-#  include <limits.h>
-#  if (UINT_MAX == 0xffffffffUL)
-#    define Z_U4 unsigned
-#  elif (ULONG_MAX == 0xffffffffUL)
-#    define Z_U4 unsigned long
-#  elif (USHRT_MAX == 0xffffffffUL)
-#    define Z_U4 unsigned short
-#  endif
-#endif
-
-#ifdef Z_U4
-   typedef Z_U4 z_crc_t;
-#else
-   typedef unsigned long z_crc_t;
-#endif
-
-#ifdef HAVE_UNISTD_H    /* may be set to #if 1 by ./configure */
-#  define Z_HAVE_UNISTD_H
-#endif
-
-#ifdef HAVE_STDARG_H    /* may be set to #if 1 by ./configure */
-#  define Z_HAVE_STDARG_H
-#endif
-
-#ifdef STDC
-#  ifndef Z_SOLO
-#    include <sys/types.h>      /* for off_t */
-#  endif
-#endif
-
-#if defined(STDC) || defined(Z_HAVE_STDARG_H)
-#  ifndef Z_SOLO
-#    include <stdarg.h>         /* for va_list */
-#  endif
-#endif
-
-#ifdef _WIN32
-#  ifndef Z_SOLO
-#    include <stddef.h>         /* for wchar_t */
-#  endif
-#endif
-
-/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
- * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
- * though the former does not conform to the LFS document), but considering
- * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
- * equivalently requesting no 64-bit operations
- */
-#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
-#  undef _LARGEFILE64_SOURCE
-#endif
-
-#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
-#  define Z_HAVE_UNISTD_H
-#endif
-#ifndef Z_SOLO
-#  if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
-#    include <unistd.h>         /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
-#    ifdef VMS
-#      include <unixio.h>       /* for off_t */
-#    endif
-#    ifndef z_off_t
-#      define z_off_t off_t
-#    endif
-#  endif
-#endif
-
-#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
-#  define Z_LFS64
-#endif
-
-#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
-#  define Z_LARGE64
-#endif
-
-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
-#  define Z_WANT64
-#endif
-
-#if !defined(SEEK_SET) && !defined(Z_SOLO)
-#  define SEEK_SET        0       /* Seek from beginning of file.  */
-#  define SEEK_CUR        1       /* Seek from current position.  */
-#  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
-#endif
-
-#ifndef z_off_t
-#  define z_off_t long
-#endif
-
-#if !defined(_WIN32) && defined(Z_LARGE64)
-#  define z_off64_t off64_t
-#else
-#  if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
-#    define z_off64_t __int64
-#  else
-#    define z_off64_t z_off_t
-#  endif
-#endif
-
-/* MVS linker does not support external names larger than 8 bytes */
-#if defined(__MVS__)
-  #pragma map(deflateInit_,"DEIN")
-  #pragma map(deflateInit2_,"DEIN2")
-  #pragma map(deflateEnd,"DEEND")
-  #pragma map(deflateBound,"DEBND")
-  #pragma map(inflateInit_,"ININ")
-  #pragma map(inflateInit2_,"ININ2")
-  #pragma map(inflateEnd,"INEND")
-  #pragma map(inflateSync,"INSY")
-  #pragma map(inflateSetDictionary,"INSEDI")
-  #pragma map(compressBound,"CMBND")
-  #pragma map(inflate_table,"INTABL")
-  #pragma map(inflate_fast,"INFA")
-  #pragma map(inflate_copyright,"INCOPY")
-#endif
-
-#endif /* ZCONF_H */
diff --git a/src/include/gromacs/external/tng_io/external/zlib/zlib.h b/src/include/gromacs/external/tng_io/external/zlib/zlib.h
deleted file mode 100644 (file)
index 565d0ed..0000000
+++ /dev/null
@@ -1,1769 +0,0 @@
-/* zlib.h -- interface of the 'zlib' general purpose compression library
-  version 1.2.8, April 28th, 2013
-
-  Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-  Jean-loup Gailly        Mark Adler
-  jloup@gzip.org          madler@alumni.caltech.edu
-
-
-  The data format used by the zlib library is described by RFCs (Request for
-  Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950
-  (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format).
-*/
-
-#ifndef ZLIB_H
-#define ZLIB_H
-
-#include "zconf.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define ZLIB_VERSION "1.2.8"
-#define ZLIB_VERNUM 0x1280
-#define ZLIB_VER_MAJOR 1
-#define ZLIB_VER_MINOR 2
-#define ZLIB_VER_REVISION 8
-#define ZLIB_VER_SUBREVISION 0
-
-/*
-    The 'zlib' compression library provides in-memory compression and
-  decompression functions, including integrity checks of the uncompressed data.
-  This version of the library supports only one compression method (deflation)
-  but other algorithms will be added later and will have the same stream
-  interface.
-
-    Compression can be done in a single step if the buffers are large enough,
-  or can be done by repeated calls of the compression function.  In the latter
-  case, the application must provide more input and/or consume the output
-  (providing more output space) before each call.
-
-    The compressed data format used by default by the in-memory functions is
-  the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped
-  around a deflate stream, which is itself documented in RFC 1951.
-
-    The library also supports reading and writing files in gzip (.gz) format
-  with an interface similar to that of stdio using the functions that start
-  with "gz".  The gzip format is different from the zlib format.  gzip is a
-  gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
-
-    This library can optionally read and write gzip streams in memory as well.
-
-    The zlib format was designed to be compact and fast for use in memory
-  and on communications channels.  The gzip format was designed for single-
-  file compression on file systems, has a larger header than zlib to maintain
-  directory information, and uses a different, slower check method than zlib.
-
-    The library does not install any signal handler.  The decoder checks
-  the consistency of the compressed data, so the library should never crash
-  even in case of corrupted input.
-*/
-
-typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
-typedef void   (*free_func)  OF((voidpf opaque, voidpf address));
-
-struct internal_state;
-
-typedef struct z_stream_s {
-    z_const Bytef *next_in;     /* next input byte */
-    uInt     avail_in;  /* number of bytes available at next_in */
-    uLong    total_in;  /* total number of input bytes read so far */
-
-    Bytef    *next_out; /* next output byte should be put there */
-    uInt     avail_out; /* remaining free space at next_out */
-    uLong    total_out; /* total number of bytes output so far */
-
-    z_const char *msg;  /* last error message, NULL if no error */
-    struct internal_state FAR *state; /* not visible by applications */
-
-    alloc_func zalloc;  /* used to allocate the internal state */
-    free_func  zfree;   /* used to free the internal state */
-    voidpf     opaque;  /* private data object passed to zalloc and zfree */
-
-    int     data_type;  /* best guess about the data type: binary or text */
-    uLong   adler;      /* adler32 value of the uncompressed data */
-    uLong   reserved;   /* reserved for future use */
-} z_stream;
-
-typedef z_stream FAR *z_streamp;
-
-/*
-     gzip header information passed to and from zlib routines.  See RFC 1952
-  for more details on the meanings of these fields.
-*/
-typedef struct gz_header_s {
-    int     text;       /* true if compressed data believed to be text */
-    uLong   time;       /* modification time */
-    int     xflags;     /* extra flags (not used when writing a gzip file) */
-    int     os;         /* operating system */
-    Bytef   *extra;     /* pointer to extra field or Z_NULL if none */
-    uInt    extra_len;  /* extra field length (valid if extra != Z_NULL) */
-    uInt    extra_max;  /* space at extra (only when reading header) */
-    Bytef   *name;      /* pointer to zero-terminated file name or Z_NULL */
-    uInt    name_max;   /* space at name (only when reading header) */
-    Bytef   *comment;   /* pointer to zero-terminated comment or Z_NULL */
-    uInt    comm_max;   /* space at comment (only when reading header) */
-    int     hcrc;       /* true if there was or will be a header crc */
-    int     done;       /* true when done reading gzip header (not used
-                           when writing a gzip file) */
-} gz_header;
-
-typedef gz_header FAR *gz_headerp;
-
-/*
-     The application must update next_in and avail_in when avail_in has dropped
-   to zero.  It must update next_out and avail_out when avail_out has dropped
-   to zero.  The application must initialize zalloc, zfree and opaque before
-   calling the init function.  All other fields are set by the compression
-   library and must not be updated by the application.
-
-     The opaque value provided by the application will be passed as the first
-   parameter for calls of zalloc and zfree.  This can be useful for custom
-   memory management.  The compression library attaches no meaning to the
-   opaque value.
-
-     zalloc must return Z_NULL if there is not enough memory for the object.
-   If zlib is used in a multi-threaded application, zalloc and zfree must be
-   thread safe.
-
-     On 16-bit systems, the functions zalloc and zfree must be able to allocate
-   exactly 65536 bytes, but will not be required to allocate more than this if
-   the symbol MAXSEG_64K is defined (see zconf.h).  WARNING: On MSDOS, pointers
-   returned by zalloc for objects of exactly 65536 bytes *must* have their
-   offset normalized to zero.  The default allocation function provided by this
-   library ensures this (see zutil.c).  To reduce memory requirements and avoid
-   any allocation of 64K objects, at the expense of compression ratio, compile
-   the library with -DMAX_WBITS=14 (see zconf.h).
-
-     The fields total_in and total_out can be used for statistics or progress
-   reports.  After compression, total_in holds the total size of the
-   uncompressed data and may be saved for use in the decompressor (particularly
-   if the decompressor wants to decompress everything in a single step).
-*/
-
-                        /* constants */
-
-#define Z_NO_FLUSH      0
-#define Z_PARTIAL_FLUSH 1
-#define Z_SYNC_FLUSH    2
-#define Z_FULL_FLUSH    3
-#define Z_FINISH        4
-#define Z_BLOCK         5
-#define Z_TREES         6
-/* Allowed flush values; see deflate() and inflate() below for details */
-
-#define Z_OK            0
-#define Z_STREAM_END    1
-#define Z_NEED_DICT     2
-#define Z_ERRNO        (-1)
-#define Z_STREAM_ERROR (-2)
-#define Z_DATA_ERROR   (-3)
-#define Z_MEM_ERROR    (-4)
-#define Z_BUF_ERROR    (-5)
-#define Z_VERSION_ERROR (-6)
-/* Return codes for the compression/decompression functions. Negative values
- * are errors, positive values are used for special but normal events.
- */
-
-#define Z_NO_COMPRESSION         0
-#define Z_BEST_SPEED             1
-#define Z_BEST_COMPRESSION       9
-#define Z_DEFAULT_COMPRESSION  (-1)
-/* compression levels */
-
-#define Z_FILTERED            1
-#define Z_HUFFMAN_ONLY        2
-#define Z_RLE                 3
-#define Z_FIXED               4
-#define Z_DEFAULT_STRATEGY    0
-/* compression strategy; see deflateInit2() below for details */
-
-#define Z_BINARY   0
-#define Z_TEXT     1
-#define Z_ASCII    Z_TEXT   /* for compatibility with 1.2.2 and earlier */
-#define Z_UNKNOWN  2
-/* Possible values of the data_type field (though see inflate()) */
-
-#define Z_DEFLATED   8
-/* The deflate compression method (the only one supported in this version) */
-
-#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
-
-#define zlib_version zlibVersion()
-/* for compatibility with versions < 1.0.2 */
-
-
-                        /* basic functions */
-
-ZEXTERN const char * ZEXPORT zlibVersion OF((void));
-/* The application can compare zlibVersion and ZLIB_VERSION for consistency.
-   If the first character differs, the library code actually used is not
-   compatible with the zlib.h header file used by the application.  This check
-   is automatically made by deflateInit and inflateInit.
- */
-
-/*
-ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
-
-     Initializes the internal stream state for compression.  The fields
-   zalloc, zfree and opaque must be initialized before by the caller.  If
-   zalloc and zfree are set to Z_NULL, deflateInit updates them to use default
-   allocation functions.
-
-     The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
-   1 gives best speed, 9 gives best compression, 0 gives no compression at all
-   (the input data is simply copied a block at a time).  Z_DEFAULT_COMPRESSION
-   requests a default compromise between speed and compression (currently
-   equivalent to level 6).
-
-     deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_STREAM_ERROR if level is not a valid compression level, or
-   Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible
-   with the version assumed by the caller (ZLIB_VERSION).  msg is set to null
-   if there is no error message.  deflateInit does not perform any compression:
-   this will be done by deflate().
-*/
-
-
-ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
-/*
-    deflate compresses as much data as possible, and stops when the input
-  buffer becomes empty or the output buffer becomes full.  It may introduce
-  some output latency (reading input without producing any output) except when
-  forced to flush.
-
-    The detailed semantics are as follows.  deflate performs one or both of the
-  following actions:
-
-  - Compress more input starting at next_in and update next_in and avail_in
-    accordingly.  If not all input can be processed (because there is not
-    enough room in the output buffer), next_in and avail_in are updated and
-    processing will resume at this point for the next call of deflate().
-
-  - Provide more output starting at next_out and update next_out and avail_out
-    accordingly.  This action is forced if the parameter flush is non zero.
-    Forcing flush frequently degrades the compression ratio, so this parameter
-    should be set only when necessary (in interactive applications).  Some
-    output may be provided even if flush is not set.
-
-    Before the call of deflate(), the application should ensure that at least
-  one of the actions is possible, by providing more input and/or consuming more
-  output, and updating avail_in or avail_out accordingly; avail_out should
-  never be zero before the call.  The application can consume the compressed
-  output when it wants, for example when the output buffer is full (avail_out
-  == 0), or after each call of deflate().  If deflate returns Z_OK and with
-  zero avail_out, it must be called again after making room in the output
-  buffer because there might be more output pending.
-
-    Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to
-  decide how much data to accumulate before producing output, in order to
-  maximize compression.
-
-    If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
-  flushed to the output buffer and the output is aligned on a byte boundary, so
-  that the decompressor can get all input data available so far.  (In
-  particular avail_in is zero after the call if enough output space has been
-  provided before the call.) Flushing may degrade compression for some
-  compression algorithms and so it should be used only when necessary.  This
-  completes the current deflate block and follows it with an empty stored block
-  that is three bits plus filler bits to the next byte, followed by four bytes
-  (00 00 ff ff).
-
-    If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the
-  output buffer, but the output is not aligned to a byte boundary.  All of the
-  input data so far will be available to the decompressor, as for Z_SYNC_FLUSH.
-  This completes the current deflate block and follows it with an empty fixed
-  codes block that is 10 bits long.  This assures that enough bytes are output
-  in order for the decompressor to finish the block before the empty fixed code
-  block.
-
-    If flush is set to Z_BLOCK, a deflate block is completed and emitted, as
-  for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to
-  seven bits of the current block are held to be written as the next byte after
-  the next deflate block is completed.  In this case, the decompressor may not
-  be provided enough bits at this point in order to complete decompression of
-  the data provided so far to the compressor.  It may need to wait for the next
-  block to be emitted.  This is for advanced applications that need to control
-  the emission of deflate blocks.
-
-    If flush is set to Z_FULL_FLUSH, all output is flushed as with
-  Z_SYNC_FLUSH, and the compression state is reset so that decompression can
-  restart from this point if previous compressed data has been damaged or if
-  random access is desired.  Using Z_FULL_FLUSH too often can seriously degrade
-  compression.
-
-    If deflate returns with avail_out == 0, this function must be called again
-  with the same value of the flush parameter and more output space (updated
-  avail_out), until the flush is complete (deflate returns with non-zero
-  avail_out).  In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that
-  avail_out is greater than six to avoid repeated flush markers due to
-  avail_out == 0 on return.
-
-    If the parameter flush is set to Z_FINISH, pending input is processed,
-  pending output is flushed and deflate returns with Z_STREAM_END if there was
-  enough output space; if deflate returns with Z_OK, this function must be
-  called again with Z_FINISH and more output space (updated avail_out) but no
-  more input data, until it returns with Z_STREAM_END or an error.  After
-  deflate has returned Z_STREAM_END, the only possible operations on the stream
-  are deflateReset or deflateEnd.
-
-    Z_FINISH can be used immediately after deflateInit if all the compression
-  is to be done in a single step.  In this case, avail_out must be at least the
-  value returned by deflateBound (see below).  Then deflate is guaranteed to
-  return Z_STREAM_END.  If not enough output space is provided, deflate will
-  not return Z_STREAM_END, and it must be called again as described above.
-
-    deflate() sets strm->adler to the adler32 checksum of all input read
-  so far (that is, total_in bytes).
-
-    deflate() may update strm->data_type if it can make a good guess about
-  the input data type (Z_BINARY or Z_TEXT).  In doubt, the data is considered
-  binary.  This field is only for information purposes and does not affect the
-  compression algorithm in any manner.
-
-    deflate() returns Z_OK if some progress has been made (more input
-  processed or more output produced), Z_STREAM_END if all input has been
-  consumed and all output has been produced (only when flush is set to
-  Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
-  if next_in or next_out was Z_NULL), Z_BUF_ERROR if no progress is possible
-  (for example avail_in or avail_out was zero).  Note that Z_BUF_ERROR is not
-  fatal, and deflate() can be called again with more input and more output
-  space to continue compressing.
-*/
-
-
-ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
-/*
-     All dynamically allocated data structures for this stream are freed.
-   This function discards any unprocessed input and does not flush any pending
-   output.
-
-     deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the
-   stream state was inconsistent, Z_DATA_ERROR if the stream was freed
-   prematurely (some input or output was discarded).  In the error case, msg
-   may be set but then points to a static string (which must not be
-   deallocated).
-*/
-
-
-/*
-ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
-
-     Initializes the internal stream state for decompression.  The fields
-   next_in, avail_in, zalloc, zfree and opaque must be initialized before by
-   the caller.  If next_in is not Z_NULL and avail_in is large enough (the
-   exact value depends on the compression method), inflateInit determines the
-   compression method from the zlib header and allocates all data structures
-   accordingly; otherwise the allocation will be deferred to the first call of
-   inflate.  If zalloc and zfree are set to Z_NULL, inflateInit updates them to
-   use default allocation functions.
-
-     inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
-   version assumed by the caller, or Z_STREAM_ERROR if the parameters are
-   invalid, such as a null pointer to the structure.  msg is set to null if
-   there is no error message.  inflateInit does not perform any decompression
-   apart from possibly reading the zlib header if present: actual decompression
-   will be done by inflate().  (So next_in and avail_in may be modified, but
-   next_out and avail_out are unused and unchanged.) The current implementation
-   of inflateInit() does not process any header information -- that is deferred
-   until inflate() is called.
-*/
-
-
-ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
-/*
-    inflate decompresses as much data as possible, and stops when the input
-  buffer becomes empty or the output buffer becomes full.  It may introduce
-  some output latency (reading input without producing any output) except when
-  forced to flush.
-
-  The detailed semantics are as follows.  inflate performs one or both of the
-  following actions:
-
-  - Decompress more input starting at next_in and update next_in and avail_in
-    accordingly.  If not all input can be processed (because there is not
-    enough room in the output buffer), next_in is updated and processing will
-    resume at this point for the next call of inflate().
-
-  - Provide more output starting at next_out and update next_out and avail_out
-    accordingly.  inflate() provides as much output as possible, until there is
-    no more input data or no more space in the output buffer (see below about
-    the flush parameter).
-
-    Before the call of inflate(), the application should ensure that at least
-  one of the actions is possible, by providing more input and/or consuming more
-  output, and updating the next_* and avail_* values accordingly.  The
-  application can consume the uncompressed output when it wants, for example
-  when the output buffer is full (avail_out == 0), or after each call of
-  inflate().  If inflate returns Z_OK and with zero avail_out, it must be
-  called again after making room in the output buffer because there might be
-  more output pending.
-
-    The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FINISH,
-  Z_BLOCK, or Z_TREES.  Z_SYNC_FLUSH requests that inflate() flush as much
-  output as possible to the output buffer.  Z_BLOCK requests that inflate()
-  stop if and when it gets to the next deflate block boundary.  When decoding
-  the zlib or gzip format, this will cause inflate() to return immediately
-  after the header and before the first block.  When doing a raw inflate,
-  inflate() will go ahead and process the first block, and will return when it
-  gets to the end of that block, or when it runs out of data.
-
-    The Z_BLOCK option assists in appending to or combining deflate streams.
-  Also to assist in this, on return inflate() will set strm->data_type to the
-  number of unused bits in the last byte taken from strm->next_in, plus 64 if
-  inflate() is currently decoding the last block in the deflate stream, plus
-  128 if inflate() returned immediately after decoding an end-of-block code or
-  decoding the complete header up to just before the first byte of the deflate
-  stream.  The end-of-block will not be indicated until all of the uncompressed
-  data from that block has been written to strm->next_out.  The number of
-  unused bits may in general be greater than seven, except when bit 7 of
-  data_type is set, in which case the number of unused bits will be less than
-  eight.  data_type is set as noted here every time inflate() returns for all
-  flush options, and so can be used to determine the amount of currently
-  consumed input in bits.
-
-    The Z_TREES option behaves as Z_BLOCK does, but it also returns when the
-  end of each deflate block header is reached, before any actual data in that
-  block is decoded.  This allows the caller to determine the length of the
-  deflate block header for later use in random access within a deflate block.
-  256 is added to the value of strm->data_type when inflate() returns
-  immediately after reaching the end of the deflate block header.
-
-    inflate() should normally be called until it returns Z_STREAM_END or an
-  error.  However if all decompression is to be performed in a single step (a
-  single call of inflate), the parameter flush should be set to Z_FINISH.  In
-  this case all pending input is processed and all pending output is flushed;
-  avail_out must be large enough to hold all of the uncompressed data for the
-  operation to complete.  (The size of the uncompressed data may have been
-  saved by the compressor for this purpose.) The use of Z_FINISH is not
-  required to perform an inflation in one step.  However it may be used to
-  inform inflate that a faster approach can be used for the single inflate()
-  call.  Z_FINISH also informs inflate to not maintain a sliding window if the
-  stream completes, which reduces inflate's memory footprint.  If the stream
-  does not complete, either because not all of the stream is provided or not
-  enough output space is provided, then a sliding window will be allocated and
-  inflate() can be called again to continue the operation as if Z_NO_FLUSH had
-  been used.
-
-     In this implementation, inflate() always flushes as much output as
-  possible to the output buffer, and always uses the faster approach on the
-  first call.  So the effects of the flush parameter in this implementation are
-  on the return value of inflate() as noted below, when inflate() returns early
-  when Z_BLOCK or Z_TREES is used, and when inflate() avoids the allocation of
-  memory for a sliding window when Z_FINISH is used.
-
-     If a preset dictionary is needed after this call (see inflateSetDictionary
-  below), inflate sets strm->adler to the Adler-32 checksum of the dictionary
-  chosen by the compressor and returns Z_NEED_DICT; otherwise it sets
-  strm->adler to the Adler-32 checksum of all output produced so far (that is,
-  total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described
-  below.  At the end of the stream, inflate() checks that its computed adler32
-  checksum is equal to that saved by the compressor and returns Z_STREAM_END
-  only if the checksum is correct.
-
-    inflate() can decompress and check either zlib-wrapped or gzip-wrapped
-  deflate data.  The header type is detected automatically, if requested when
-  initializing with inflateInit2().  Any information contained in the gzip
-  header is not retained, so applications that need that information should
-  instead use raw inflate, see inflateInit2() below, or inflateBack() and
-  perform their own processing of the gzip header and trailer.  When processing
-  gzip-wrapped deflate data, strm->adler32 is set to the CRC-32 of the output
-  producted so far.  The CRC-32 is checked against the gzip trailer.
-
-    inflate() returns Z_OK if some progress has been made (more input processed
-  or more output produced), Z_STREAM_END if the end of the compressed data has
-  been reached and all uncompressed output has been produced, Z_NEED_DICT if a
-  preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
-  corrupted (input stream not conforming to the zlib format or incorrect check
-  value), Z_STREAM_ERROR if the stream structure was inconsistent (for example
-  next_in or next_out was Z_NULL), Z_MEM_ERROR if there was not enough memory,
-  Z_BUF_ERROR if no progress is possible or if there was not enough room in the
-  output buffer when Z_FINISH is used.  Note that Z_BUF_ERROR is not fatal, and
-  inflate() can be called again with more input and more output space to
-  continue decompressing.  If Z_DATA_ERROR is returned, the application may
-  then call inflateSync() to look for a good compression block if a partial
-  recovery of the data is desired.
-*/
-
-
-ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
-/*
-     All dynamically allocated data structures for this stream are freed.
-   This function discards any unprocessed input and does not flush any pending
-   output.
-
-     inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
-   was inconsistent.  In the error case, msg may be set but then points to a
-   static string (which must not be deallocated).
-*/
-
-
-                        /* Advanced functions */
-
-/*
-    The following functions are needed only in some special applications.
-*/
-
-/*
-ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
-                                     int  level,
-                                     int  method,
-                                     int  windowBits,
-                                     int  memLevel,
-                                     int  strategy));
-
-     This is another version of deflateInit with more compression options.  The
-   fields next_in, zalloc, zfree and opaque must be initialized before by the
-   caller.
-
-     The method parameter is the compression method.  It must be Z_DEFLATED in
-   this version of the library.
-
-     The windowBits parameter is the base two logarithm of the window size
-   (the size of the history buffer).  It should be in the range 8..15 for this
-   version of the library.  Larger values of this parameter result in better
-   compression at the expense of memory usage.  The default value is 15 if
-   deflateInit is used instead.
-
-     windowBits can also be -8..-15 for raw deflate.  In this case, -windowBits
-   determines the window size.  deflate() will then generate raw deflate data
-   with no zlib header or trailer, and will not compute an adler32 check value.
-
-     windowBits can also be greater than 15 for optional gzip encoding.  Add
-   16 to windowBits to write a simple gzip header and trailer around the
-   compressed data instead of a zlib wrapper.  The gzip header will have no
-   file name, no extra data, no comment, no modification time (set to zero), no
-   header crc, and the operating system will be set to 255 (unknown).  If a
-   gzip stream is being written, strm->adler is a crc32 instead of an adler32.
-
-     The memLevel parameter specifies how much memory should be allocated
-   for the internal compression state.  memLevel=1 uses minimum memory but is
-   slow and reduces compression ratio; memLevel=9 uses maximum memory for
-   optimal speed.  The default value is 8.  See zconf.h for total memory usage
-   as a function of windowBits and memLevel.
-
-     The strategy parameter is used to tune the compression algorithm.  Use the
-   value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
-   filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no
-   string match), or Z_RLE to limit match distances to one (run-length
-   encoding).  Filtered data consists mostly of small values with a somewhat
-   random distribution.  In this case, the compression algorithm is tuned to
-   compress them better.  The effect of Z_FILTERED is to force more Huffman
-   coding and less string matching; it is somewhat intermediate between
-   Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY.  Z_RLE is designed to be almost as
-   fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data.  The
-   strategy parameter only affects the compression ratio but not the
-   correctness of the compressed output even if it is not set appropriately.
-   Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler
-   decoder for special applications.
-
-     deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid
-   method), or Z_VERSION_ERROR if the zlib library version (zlib_version) is
-   incompatible with the version assumed by the caller (ZLIB_VERSION).  msg is
-   set to null if there is no error message.  deflateInit2 does not perform any
-   compression: this will be done by deflate().
-*/
-
-ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
-                                             const Bytef *dictionary,
-                                             uInt  dictLength));
-/*
-     Initializes the compression dictionary from the given byte sequence
-   without producing any compressed output.  When using the zlib format, this
-   function must be called immediately after deflateInit, deflateInit2 or
-   deflateReset, and before any call of deflate.  When doing raw deflate, this
-   function must be called either before any call of deflate, or immediately
-   after the completion of a deflate block, i.e. after all input has been
-   consumed and all output has been delivered when using any of the flush
-   options Z_BLOCK, Z_PARTIAL_FLUSH, Z_SYNC_FLUSH, or Z_FULL_FLUSH.  The
-   compressor and decompressor must use exactly the same dictionary (see
-   inflateSetDictionary).
-
-     The dictionary should consist of strings (byte sequences) that are likely
-   to be encountered later in the data to be compressed, with the most commonly
-   used strings preferably put towards the end of the dictionary.  Using a
-   dictionary is most useful when the data to be compressed is short and can be
-   predicted with good accuracy; the data can then be compressed better than
-   with the default empty dictionary.
-
-     Depending on the size of the compression data structures selected by
-   deflateInit or deflateInit2, a part of the dictionary may in effect be
-   discarded, for example if the dictionary is larger than the window size
-   provided in deflateInit or deflateInit2.  Thus the strings most likely to be
-   useful should be put at the end of the dictionary, not at the front.  In
-   addition, the current implementation of deflate will use at most the window
-   size minus 262 bytes of the provided dictionary.
-
-     Upon return of this function, strm->adler is set to the adler32 value
-   of the dictionary; the decompressor may later use this value to determine
-   which dictionary has been used by the compressor.  (The adler32 value
-   applies to the whole dictionary even if only a subset of the dictionary is
-   actually used by the compressor.) If a raw deflate was requested, then the
-   adler32 value is not computed and strm->adler is not set.
-
-     deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
-   parameter is invalid (e.g.  dictionary being Z_NULL) or the stream state is
-   inconsistent (for example if deflate has already been called for this stream
-   or if not at a block boundary for raw deflate).  deflateSetDictionary does
-   not perform any compression: this will be done by deflate().
-*/
-
-ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
-                                    z_streamp source));
-/*
-     Sets the destination stream as a complete copy of the source stream.
-
-     This function can be useful when several compression strategies will be
-   tried, for example when there are several ways of pre-processing the input
-   data with a filter.  The streams that will be discarded should then be freed
-   by calling deflateEnd.  Note that deflateCopy duplicates the internal
-   compression state which can be quite large, so this strategy is slow and can
-   consume lots of memory.
-
-     deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
-   (such as zalloc being Z_NULL).  msg is left unchanged in both source and
-   destination.
-*/
-
-ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
-/*
-     This function is equivalent to deflateEnd followed by deflateInit,
-   but does not free and reallocate all the internal compression state.  The
-   stream will keep the same compression level and any other attributes that
-   may have been set by deflateInit2.
-
-     deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent (such as zalloc or state being Z_NULL).
-*/
-
-ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
-                                      int level,
-                                      int strategy));
-/*
-     Dynamically update the compression level and compression strategy.  The
-   interpretation of level and strategy is as in deflateInit2.  This can be
-   used to switch between compression and straight copy of the input data, or
-   to switch to a different kind of input data requiring a different strategy.
-   If the compression level is changed, the input available so far is
-   compressed with the old level (and may be flushed); the new level will take
-   effect only at the next call of deflate().
-
-     Before the call of deflateParams, the stream state must be set as for
-   a call of deflate(), since the currently available input may have to be
-   compressed and flushed.  In particular, strm->avail_out must be non-zero.
-
-     deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source
-   stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR if
-   strm->avail_out was zero.
-*/
-
-ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm,
-                                    int good_length,
-                                    int max_lazy,
-                                    int nice_length,
-                                    int max_chain));
-/*
-     Fine tune deflate's internal compression parameters.  This should only be
-   used by someone who understands the algorithm used by zlib's deflate for
-   searching for the best matching string, and even then only by the most
-   fanatic optimizer trying to squeeze out the last compressed bit for their
-   specific input data.  Read the deflate.c source code for the meaning of the
-   max_lazy, good_length, nice_length, and max_chain parameters.
-
-     deflateTune() can be called after deflateInit() or deflateInit2(), and
-   returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream.
- */
-
-ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm,
-                                       uLong sourceLen));
-/*
-     deflateBound() returns an upper bound on the compressed size after
-   deflation of sourceLen bytes.  It must be called after deflateInit() or
-   deflateInit2(), and after deflateSetHeader(), if used.  This would be used
-   to allocate an output buffer for deflation in a single pass, and so would be
-   called before deflate().  If that first deflate() call is provided the
-   sourceLen input bytes, an output buffer allocated to the size returned by
-   deflateBound(), and the flush value Z_FINISH, then deflate() is guaranteed
-   to return Z_STREAM_END.  Note that it is possible for the compressed size to
-   be larger than the value returned by deflateBound() if flush options other
-   than Z_FINISH or Z_NO_FLUSH are used.
-*/
-
-ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm,
-                                       unsigned *pending,
-                                       int *bits));
-/*
-     deflatePending() returns the number of bytes and bits of output that have
-   been generated, but not yet provided in the available output.  The bytes not
-   provided would be due to the available output space having being consumed.
-   The number of bits of output not provided are between 0 and 7, where they
-   await more bits to join them in order to fill out a full byte.  If pending
-   or bits are Z_NULL, then those values are not set.
-
-     deflatePending returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent.
- */
-
-ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
-                                     int bits,
-                                     int value));
-/*
-     deflatePrime() inserts bits in the deflate output stream.  The intent
-   is that this function is used to start off the deflate output with the bits
-   leftover from a previous deflate stream when appending to it.  As such, this
-   function can only be used for raw deflate, and must be used before the first
-   deflate() call after a deflateInit2() or deflateReset().  bits must be less
-   than or equal to 16, and that many of the least significant bits of value
-   will be inserted in the output.
-
-     deflatePrime returns Z_OK if success, Z_BUF_ERROR if there was not enough
-   room in the internal buffer to insert the bits, or Z_STREAM_ERROR if the
-   source stream state was inconsistent.
-*/
-
-ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,
-                                         gz_headerp head));
-/*
-     deflateSetHeader() provides gzip header information for when a gzip
-   stream is requested by deflateInit2().  deflateSetHeader() may be called
-   after deflateInit2() or deflateReset() and before the first call of
-   deflate().  The text, time, os, extra field, name, and comment information
-   in the provided gz_header structure are written to the gzip header (xflag is
-   ignored -- the extra flags are set according to the compression level).  The
-   caller must assure that, if not Z_NULL, name and comment are terminated with
-   a zero byte, and that if extra is not Z_NULL, that extra_len bytes are
-   available there.  If hcrc is true, a gzip header crc is included.  Note that
-   the current versions of the command-line version of gzip (up through version
-   1.3.x) do not support header crc's, and will report that it is a "multi-part
-   gzip file" and give up.
-
-     If deflateSetHeader is not used, the default gzip header has text false,
-   the time set to zero, and os set to 255, with no extra, name, or comment
-   fields.  The gzip header is returned to the default state by deflateReset().
-
-     deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent.
-*/
-
-/*
-ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
-                                     int  windowBits));
-
-     This is another version of inflateInit with an extra parameter.  The
-   fields next_in, avail_in, zalloc, zfree and opaque must be initialized
-   before by the caller.
-
-     The windowBits parameter is the base two logarithm of the maximum window
-   size (the size of the history buffer).  It should be in the range 8..15 for
-   this version of the library.  The default value is 15 if inflateInit is used
-   instead.  windowBits must be greater than or equal to the windowBits value
-   provided to deflateInit2() while compressing, or it must be equal to 15 if
-   deflateInit2() was not used.  If a compressed stream with a larger window
-   size is given as input, inflate() will return with the error code
-   Z_DATA_ERROR instead of trying to allocate a larger window.
-
-     windowBits can also be zero to request that inflate use the window size in
-   the zlib header of the compressed stream.
-
-     windowBits can also be -8..-15 for raw inflate.  In this case, -windowBits
-   determines the window size.  inflate() will then process raw deflate data,
-   not looking for a zlib or gzip header, not generating a check value, and not
-   looking for any check values for comparison at the end of the stream.  This
-   is for use with other formats that use the deflate compressed data format
-   such as zip.  Those formats provide their own check values.  If a custom
-   format is developed using the raw deflate format for compressed data, it is
-   recommended that a check value such as an adler32 or a crc32 be applied to
-   the uncompressed data as is done in the zlib, gzip, and zip formats.  For
-   most applications, the zlib format should be used as is.  Note that comments
-   above on the use in deflateInit2() applies to the magnitude of windowBits.
-
-     windowBits can also be greater than 15 for optional gzip decoding.  Add
-   32 to windowBits to enable zlib and gzip decoding with automatic header
-   detection, or add 16 to decode only the gzip format (the zlib format will
-   return a Z_DATA_ERROR).  If a gzip stream is being decoded, strm->adler is a
-   crc32 instead of an adler32.
-
-     inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
-   version assumed by the caller, or Z_STREAM_ERROR if the parameters are
-   invalid, such as a null pointer to the structure.  msg is set to null if
-   there is no error message.  inflateInit2 does not perform any decompression
-   apart from possibly reading the zlib header if present: actual decompression
-   will be done by inflate().  (So next_in and avail_in may be modified, but
-   next_out and avail_out are unused and unchanged.) The current implementation
-   of inflateInit2() does not process any header information -- that is
-   deferred until inflate() is called.
-*/
-
-ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
-                                             const Bytef *dictionary,
-                                             uInt  dictLength));
-/*
-     Initializes the decompression dictionary from the given uncompressed byte
-   sequence.  This function must be called immediately after a call of inflate,
-   if that call returned Z_NEED_DICT.  The dictionary chosen by the compressor
-   can be determined from the adler32 value returned by that call of inflate.
-   The compressor and decompressor must use exactly the same dictionary (see
-   deflateSetDictionary).  For raw inflate, this function can be called at any
-   time to set the dictionary.  If the provided dictionary is smaller than the
-   window and there is already data in the window, then the provided dictionary
-   will amend what's there.  The application must insure that the dictionary
-   that was used for compression is provided.
-
-     inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
-   parameter is invalid (e.g.  dictionary being Z_NULL) or the stream state is
-   inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
-   expected one (incorrect adler32 value).  inflateSetDictionary does not
-   perform any decompression: this will be done by subsequent calls of
-   inflate().
-*/
-
-ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm,
-                                             Bytef *dictionary,
-                                             uInt  *dictLength));
-/*
-     Returns the sliding dictionary being maintained by inflate.  dictLength is
-   set to the number of bytes in the dictionary, and that many bytes are copied
-   to dictionary.  dictionary must have enough space, where 32768 bytes is
-   always enough.  If inflateGetDictionary() is called with dictionary equal to
-   Z_NULL, then only the dictionary length is returned, and nothing is copied.
-   Similary, if dictLength is Z_NULL, then it is not set.
-
-     inflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the
-   stream state is inconsistent.
-*/
-
-ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
-/*
-     Skips invalid compressed data until a possible full flush point (see above
-   for the description of deflate with Z_FULL_FLUSH) can be found, or until all
-   available input is skipped.  No output is provided.
-
-     inflateSync searches for a 00 00 FF FF pattern in the compressed data.
-   All full flush points have this pattern, but not all occurrences of this
-   pattern are full flush points.
-
-     inflateSync returns Z_OK if a possible full flush point has been found,
-   Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush point
-   has been found, or Z_STREAM_ERROR if the stream structure was inconsistent.
-   In the success case, the application may save the current current value of
-   total_in which indicates where valid compressed data was found.  In the
-   error case, the application may repeatedly call inflateSync, providing more
-   input each time, until success or end of the input data.
-*/
-
-ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
-                                    z_streamp source));
-/*
-     Sets the destination stream as a complete copy of the source stream.
-
-     This function can be useful when randomly accessing a large stream.  The
-   first pass through the stream can periodically record the inflate state,
-   allowing restarting inflate at those points when randomly accessing the
-   stream.
-
-     inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
-   (such as zalloc being Z_NULL).  msg is left unchanged in both source and
-   destination.
-*/
-
-ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
-/*
-     This function is equivalent to inflateEnd followed by inflateInit,
-   but does not free and reallocate all the internal decompression state.  The
-   stream will keep attributes that may have been set by inflateInit2.
-
-     inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent (such as zalloc or state being Z_NULL).
-*/
-
-ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm,
-                                      int windowBits));
-/*
-     This function is the same as inflateReset, but it also permits changing
-   the wrap and window size requests.  The windowBits parameter is interpreted
-   the same as it is for inflateInit2.
-
-     inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent (such as zalloc or state being Z_NULL), or if
-   the windowBits parameter is invalid.
-*/
-
-ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm,
-                                     int bits,
-                                     int value));
-/*
-     This function inserts bits in the inflate input stream.  The intent is
-   that this function is used to start inflating at a bit position in the
-   middle of a byte.  The provided bits will be used before any bytes are used
-   from next_in.  This function should only be used with raw inflate, and
-   should be used before the first inflate() call after inflateInit2() or
-   inflateReset().  bits must be less than or equal to 16, and that many of the
-   least significant bits of value will be inserted in the input.
-
-     If bits is negative, then the input stream bit buffer is emptied.  Then
-   inflatePrime() can be called again to put bits in the buffer.  This is used
-   to clear out bits leftover after feeding inflate a block description prior
-   to feeding inflate codes.
-
-     inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent.
-*/
-
-ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm));
-/*
-     This function returns two values, one in the lower 16 bits of the return
-   value, and the other in the remaining upper bits, obtained by shifting the
-   return value down 16 bits.  If the upper value is -1 and the lower value is
-   zero, then inflate() is currently decoding information outside of a block.
-   If the upper value is -1 and the lower value is non-zero, then inflate is in
-   the middle of a stored block, with the lower value equaling the number of
-   bytes from the input remaining to copy.  If the upper value is not -1, then
-   it is the number of bits back from the current bit position in the input of
-   the code (literal or length/distance pair) currently being processed.  In
-   that case the lower value is the number of bytes already emitted for that
-   code.
-
-     A code is being processed if inflate is waiting for more input to complete
-   decoding of the code, or if it has completed decoding but is waiting for
-   more output space to write the literal or match data.
-
-     inflateMark() is used to mark locations in the input data for random
-   access, which may be at bit positions, and to note those cases where the
-   output of a code may span boundaries of random access blocks.  The current
-   location in the input stream can be determined from avail_in and data_type
-   as noted in the description for the Z_BLOCK flush parameter for inflate.
-
-     inflateMark returns the value noted above or -1 << 16 if the provided
-   source stream state was inconsistent.
-*/
-
-ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm,
-                                         gz_headerp head));
-/*
-     inflateGetHeader() requests that gzip header information be stored in the
-   provided gz_header structure.  inflateGetHeader() may be called after
-   inflateInit2() or inflateReset(), and before the first call of inflate().
-   As inflate() processes the gzip stream, head->done is zero until the header
-   is completed, at which time head->done is set to one.  If a zlib stream is
-   being decoded, then head->done is set to -1 to indicate that there will be
-   no gzip header information forthcoming.  Note that Z_BLOCK or Z_TREES can be
-   used to force inflate() to return immediately after header processing is
-   complete and before any actual data is decompressed.
-
-     The text, time, xflags, and os fields are filled in with the gzip header
-   contents.  hcrc is set to true if there is a header CRC.  (The header CRC
-   was valid if done is set to one.) If extra is not Z_NULL, then extra_max
-   contains the maximum number of bytes to write to extra.  Once done is true,
-   extra_len contains the actual extra field length, and extra contains the
-   extra field, or that field truncated if extra_max is less than extra_len.
-   If name is not Z_NULL, then up to name_max characters are written there,
-   terminated with a zero unless the length is greater than name_max.  If
-   comment is not Z_NULL, then up to comm_max characters are written there,
-   terminated with a zero unless the length is greater than comm_max.  When any
-   of extra, name, or comment are not Z_NULL and the respective field is not
-   present in the header, then that field is set to Z_NULL to signal its
-   absence.  This allows the use of deflateSetHeader() with the returned
-   structure to duplicate the header.  However if those fields are set to
-   allocated memory, then the application will need to save those pointers
-   elsewhere so that they can be eventually freed.
-
-     If inflateGetHeader is not used, then the header information is simply
-   discarded.  The header is always checked for validity, including the header
-   CRC if present.  inflateReset() will reset the process to discard the header
-   information.  The application would need to call inflateGetHeader() again to
-   retrieve the header from the next gzip stream.
-
-     inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent.
-*/
-
-/*
-ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
-                                        unsigned char FAR *window));
-
-     Initialize the internal stream state for decompression using inflateBack()
-   calls.  The fields zalloc, zfree and opaque in strm must be initialized
-   before the call.  If zalloc and zfree are Z_NULL, then the default library-
-   derived memory allocation routines are used.  windowBits is the base two
-   logarithm of the window size, in the range 8..15.  window is a caller
-   supplied buffer of that size.  Except for special applications where it is
-   assured that deflate was used with small window sizes, windowBits must be 15
-   and a 32K byte window must be supplied to be able to decompress general
-   deflate streams.
-
-     See inflateBack() for the usage of these routines.
-
-     inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of
-   the parameters are invalid, Z_MEM_ERROR if the internal state could not be
-   allocated, or Z_VERSION_ERROR if the version of the library does not match
-   the version of the header file.
-*/
-
-typedef unsigned (*in_func) OF((void FAR *,
-                                z_const unsigned char FAR * FAR *));
-typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
-
-ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
-                                    in_func in, void FAR *in_desc,
-                                    out_func out, void FAR *out_desc));
-/*
-     inflateBack() does a raw inflate with a single call using a call-back
-   interface for input and output.  This is potentially more efficient than
-   inflate() for file i/o applications, in that it avoids copying between the
-   output and the sliding window by simply making the window itself the output
-   buffer.  inflate() can be faster on modern CPUs when used with large
-   buffers.  inflateBack() trusts the application to not change the output
-   buffer passed by the output function, at least until inflateBack() returns.
-
-     inflateBackInit() must be called first to allocate the internal state
-   and to initialize the state with the user-provided window buffer.
-   inflateBack() may then be used multiple times to inflate a complete, raw
-   deflate stream with each call.  inflateBackEnd() is then called to free the
-   allocated state.
-
-     A raw deflate stream is one with no zlib or gzip header or trailer.
-   This routine would normally be used in a utility that reads zip or gzip
-   files and writes out uncompressed files.  The utility would decode the
-   header and process the trailer on its own, hence this routine expects only
-   the raw deflate stream to decompress.  This is different from the normal
-   behavior of inflate(), which expects either a zlib or gzip header and
-   trailer around the deflate stream.
-
-     inflateBack() uses two subroutines supplied by the caller that are then
-   called by inflateBack() for input and output.  inflateBack() calls those
-   routines until it reads a complete deflate stream and writes out all of the
-   uncompressed data, or until it encounters an error.  The function's
-   parameters and return types are defined above in the in_func and out_func
-   typedefs.  inflateBack() will call in(in_desc, &buf) which should return the
-   number of bytes of provided input, and a pointer to that input in buf.  If
-   there is no input available, in() must return zero--buf is ignored in that
-   case--and inflateBack() will return a buffer error.  inflateBack() will call
-   out(out_desc, buf, len) to write the uncompressed data buf[0..len-1].  out()
-   should return zero on success, or non-zero on failure.  If out() returns
-   non-zero, inflateBack() will return with an error.  Neither in() nor out()
-   are permitted to change the contents of the window provided to
-   inflateBackInit(), which is also the buffer that out() uses to write from.
-   The length written by out() will be at most the window size.  Any non-zero
-   amount of input may be provided by in().
-
-     For convenience, inflateBack() can be provided input on the first call by
-   setting strm->next_in and strm->avail_in.  If that input is exhausted, then
-   in() will be called.  Therefore strm->next_in must be initialized before
-   calling inflateBack().  If strm->next_in is Z_NULL, then in() will be called
-   immediately for input.  If strm->next_in is not Z_NULL, then strm->avail_in
-   must also be initialized, and then if strm->avail_in is not zero, input will
-   initially be taken from strm->next_in[0 ..  strm->avail_in - 1].
-
-     The in_desc and out_desc parameters of inflateBack() is passed as the
-   first parameter of in() and out() respectively when they are called.  These
-   descriptors can be optionally used to pass any information that the caller-
-   supplied in() and out() functions need to do their job.
-
-     On return, inflateBack() will set strm->next_in and strm->avail_in to
-   pass back any unused input that was provided by the last in() call.  The
-   return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR
-   if in() or out() returned an error, Z_DATA_ERROR if there was a format error
-   in the deflate stream (in which case strm->msg is set to indicate the nature
-   of the error), or Z_STREAM_ERROR if the stream was not properly initialized.
-   In the case of Z_BUF_ERROR, an input or output error can be distinguished
-   using strm->next_in which will be Z_NULL only if in() returned an error.  If
-   strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning
-   non-zero.  (in() will always be called before out(), so strm->next_in is
-   assured to be defined if out() returns non-zero.) Note that inflateBack()
-   cannot return Z_OK.
-*/
-
-ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm));
-/*
-     All memory allocated by inflateBackInit() is freed.
-
-     inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream
-   state was inconsistent.
-*/
-
-/* Declaration not used by TNG is not available */
-/*ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));*/
-/* Return flags indicating compile-time options.
-
-    Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other:
-     1.0: size of uInt
-     3.2: size of uLong
-     5.4: size of voidpf (pointer)
-     7.6: size of z_off_t
-
-    Compiler, assembler, and debug options:
-     8: DEBUG
-     9: ASMV or ASMINF -- use ASM code
-     10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention
-     11: 0 (reserved)
-
-    One-time table building (smaller code, but not thread-safe if true):
-     12: BUILDFIXED -- build static block decoding tables when needed
-     13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed
-     14,15: 0 (reserved)
-
-    Library content (indicates missing functionality):
-     16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking
-                          deflate code when not needed)
-     17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect
-                    and decode gzip streams (to avoid linking crc code)
-     18-19: 0 (reserved)
-
-    Operation variations (changes in library functionality):
-     20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate
-     21: FASTEST -- deflate algorithm with only one, lowest compression level
-     22,23: 0 (reserved)
-
-    The sprintf variant used by gzprintf (zero is best):
-     24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format
-     25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure!
-     26: 0 = returns value, 1 = void -- 1 means inferred string length returned
-
-    Remainder:
-     27-31: 0 (reserved)
- */
-
-#ifndef Z_SOLO
-
-                        /* utility functions */
-
-/*
-     The following utility functions are implemented on top of the basic
-   stream-oriented functions.  To simplify the interface, some default options
-   are assumed (compression level and memory usage, standard memory allocation
-   functions).  The source code of these utility functions can be modified if
-   you need special options.
-*/
-
-ZEXTERN int ZEXPORT compress OF((Bytef *dest,   uLongf *destLen,
-                                 const Bytef *source, uLong sourceLen));
-/*
-     Compresses the source buffer into the destination buffer.  sourceLen is
-   the byte length of the source buffer.  Upon entry, destLen is the total size
-   of the destination buffer, which must be at least the value returned by
-   compressBound(sourceLen).  Upon exit, destLen is the actual size of the
-   compressed buffer.
-
-     compress returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_BUF_ERROR if there was not enough room in the output
-   buffer.
-*/
-
-ZEXTERN int ZEXPORT compress2 OF((Bytef *dest,   uLongf *destLen,
-                                  const Bytef *source, uLong sourceLen,
-                                  int level));
-/*
-     Compresses the source buffer into the destination buffer.  The level
-   parameter has the same meaning as in deflateInit.  sourceLen is the byte
-   length of the source buffer.  Upon entry, destLen is the total size of the
-   destination buffer, which must be at least the value returned by
-   compressBound(sourceLen).  Upon exit, destLen is the actual size of the
-   compressed buffer.
-
-     compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_BUF_ERROR if there was not enough room in the output buffer,
-   Z_STREAM_ERROR if the level parameter is invalid.
-*/
-
-ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen));
-/*
-     compressBound() returns an upper bound on the compressed size after
-   compress() or compress2() on sourceLen bytes.  It would be used before a
-   compress() or compress2() call to allocate the destination buffer.
-*/
-
-ZEXTERN int ZEXPORT uncompress OF((Bytef *dest,   uLongf *destLen,
-                                   const Bytef *source, uLong sourceLen));
-/*
-     Decompresses the source buffer into the destination buffer.  sourceLen is
-   the byte length of the source buffer.  Upon entry, destLen is the total size
-   of the destination buffer, which must be large enough to hold the entire
-   uncompressed data.  (The size of the uncompressed data must have been saved
-   previously by the compressor and transmitted to the decompressor by some
-   mechanism outside the scope of this compression library.) Upon exit, destLen
-   is the actual size of the uncompressed buffer.
-
-     uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_BUF_ERROR if there was not enough room in the output
-   buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete.  In
-   the case where there is not enough room, uncompress() will fill the output
-   buffer with the uncompressed data up to that point.
-*/
-
-                        /* gzip file access functions */
-
-/*
-     This library supports reading and writing files in gzip (.gz) format with
-   an interface similar to that of stdio, using the functions that start with
-   "gz".  The gzip format is different from the zlib format.  gzip is a gzip
-   wrapper, documented in RFC 1952, wrapped around a deflate stream.
-*/
-
-typedef struct gzFile_s *gzFile;    /* semi-opaque gzip file descriptor */
-
-/*
-ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
-
-     Opens a gzip (.gz) file for reading or writing.  The mode parameter is as
-   in fopen ("rb" or "wb") but can also include a compression level ("wb9") or
-   a strategy: 'f' for filtered data as in "wb6f", 'h' for Huffman-only
-   compression as in "wb1h", 'R' for run-length encoding as in "wb1R", or 'F'
-   for fixed code compression as in "wb9F".  (See the description of
-   deflateInit2 for more information about the strategy parameter.)  'T' will
-   request transparent writing or appending with no compression and not using
-   the gzip format.
-
-     "a" can be used instead of "w" to request that the gzip stream that will
-   be written be appended to the file.  "+" will result in an error, since
-   reading and writing to the same gzip file is not supported.  The addition of
-   "x" when writing will create the file exclusively, which fails if the file
-   already exists.  On systems that support it, the addition of "e" when
-   reading or writing will set the flag to close the file on an execve() call.
-
-     These functions, as well as gzip, will read and decode a sequence of gzip
-   streams in a file.  The append function of gzopen() can be used to create
-   such a file.  (Also see gzflush() for another way to do this.)  When
-   appending, gzopen does not test whether the file begins with a gzip stream,
-   nor does it look for the end of the gzip streams to begin appending.  gzopen
-   will simply append a gzip stream to the existing file.
-
-     gzopen can be used to read a file which is not in gzip format; in this
-   case gzread will directly read from the file without decompression.  When
-   reading, this will be detected automatically by looking for the magic two-
-   byte gzip header.
-
-     gzopen returns NULL if the file could not be opened, if there was
-   insufficient memory to allocate the gzFile state, or if an invalid mode was
-   specified (an 'r', 'w', or 'a' was not provided, or '+' was provided).
-   errno can be checked to determine if the reason gzopen failed was that the
-   file could not be opened.
-*/
-
-ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
-/*
-     gzdopen associates a gzFile with the file descriptor fd.  File descriptors
-   are obtained from calls like open, dup, creat, pipe or fileno (if the file
-   has been previously opened with fopen).  The mode parameter is as in gzopen.
-
-     The next call of gzclose on the returned gzFile will also close the file
-   descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor
-   fd.  If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd,
-   mode);.  The duplicated descriptor should be saved to avoid a leak, since
-   gzdopen does not close fd if it fails.  If you are using fileno() to get the
-   file descriptor from a FILE *, then you will have to use dup() to avoid
-   double-close()ing the file descriptor.  Both gzclose() and fclose() will
-   close the associated file descriptor, so they need to have different file
-   descriptors.
-
-     gzdopen returns NULL if there was insufficient memory to allocate the
-   gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not
-   provided, or '+' was provided), or if fd is -1.  The file descriptor is not
-   used until the next gz* read, write, seek, or close operation, so gzdopen
-   will not detect if fd is invalid (unless fd is -1).
-*/
-
-ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size));
-/*
-     Set the internal buffer size used by this library's functions.  The
-   default buffer size is 8192 bytes.  This function must be called after
-   gzopen() or gzdopen(), and before any other calls that read or write the
-   file.  The buffer memory allocation is always deferred to the first read or
-   write.  Two buffers are allocated, either both of the specified size when
-   writing, or one of the specified size and the other twice that size when
-   reading.  A larger buffer size of, for example, 64K or 128K bytes will
-   noticeably increase the speed of decompression (reading).
-
-     The new buffer size also affects the maximum length for gzprintf().
-
-     gzbuffer() returns 0 on success, or -1 on failure, such as being called
-   too late.
-*/
-
-ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
-/*
-     Dynamically update the compression level or strategy.  See the description
-   of deflateInit2 for the meaning of these parameters.
-
-     gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not
-   opened for writing.
-*/
-
-ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
-/*
-     Reads the given number of uncompressed bytes from the compressed file.  If
-   the input file is not in gzip format, gzread copies the given number of
-   bytes into the buffer directly from the file.
-
-     After reaching the end of a gzip stream in the input, gzread will continue
-   to read, looking for another gzip stream.  Any number of gzip streams may be
-   concatenated in the input file, and will all be decompressed by gzread().
-   If something other than a gzip stream is encountered after a gzip stream,
-   that remaining trailing garbage is ignored (and no error is returned).
-
-     gzread can be used to read a gzip file that is being concurrently written.
-   Upon reaching the end of the input, gzread will return with the available
-   data.  If the error code returned by gzerror is Z_OK or Z_BUF_ERROR, then
-   gzclearerr can be used to clear the end of file indicator in order to permit
-   gzread to be tried again.  Z_OK indicates that a gzip stream was completed
-   on the last gzread.  Z_BUF_ERROR indicates that the input file ended in the
-   middle of a gzip stream.  Note that gzread does not return -1 in the event
-   of an incomplete gzip stream.  This error is deferred until gzclose(), which
-   will return Z_BUF_ERROR if the last gzread ended in the middle of a gzip
-   stream.  Alternatively, gzerror can be used before gzclose to detect this
-   case.
-
-     gzread returns the number of uncompressed bytes actually read, less than
-   len for end of file, or -1 for error.
-*/
-
-ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
-                                voidpc buf, unsigned len));
-/*
-     Writes the given number of uncompressed bytes into the compressed file.
-   gzwrite returns the number of uncompressed bytes written or 0 in case of
-   error.
-*/
-
-ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...));
-/*
-     Converts, formats, and writes the arguments to the compressed file under
-   control of the format string, as in fprintf.  gzprintf returns the number of
-   uncompressed bytes actually written, or 0 in case of error.  The number of
-   uncompressed bytes written is limited to 8191, or one less than the buffer
-   size given to gzbuffer().  The caller should assure that this limit is not
-   exceeded.  If it is exceeded, then gzprintf() will return an error (0) with
-   nothing written.  In this case, there may also be a buffer overflow with
-   unpredictable consequences, which is possible only if zlib was compiled with
-   the insecure functions sprintf() or vsprintf() because the secure snprintf()
-   or vsnprintf() functions were not available.  This can be determined using
-   zlibCompileFlags().
-*/
-
-ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
-/*
-     Writes the given null-terminated string to the compressed file, excluding
-   the terminating null character.
-
-     gzputs returns the number of characters written, or -1 in case of error.
-*/
-
-ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
-/*
-     Reads bytes from the compressed file until len-1 characters are read, or a
-   newline character is read and transferred to buf, or an end-of-file
-   condition is encountered.  If any characters are read or if len == 1, the
-   string is terminated with a null character.  If no characters are read due
-   to an end-of-file or len < 1, then the buffer is left untouched.
-
-     gzgets returns buf which is a null-terminated string, or it returns NULL
-   for end-of-file or in case of error.  If there was an error, the contents at
-   buf are indeterminate.
-*/
-
-ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));
-/*
-     Writes c, converted to an unsigned char, into the compressed file.  gzputc
-   returns the value that was written, or -1 in case of error.
-*/
-
-ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
-/*
-     Reads one byte from the compressed file.  gzgetc returns this byte or -1
-   in case of end of file or error.  This is implemented as a macro for speed.
-   As such, it does not do all of the checking the other functions do.  I.e.
-   it does not check to see if file is NULL, nor whether the structure file
-   points to has been clobbered or not.
-*/
-
-ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));
-/*
-     Push one character back onto the stream to be read as the first character
-   on the next read.  At least one character of push-back is allowed.
-   gzungetc() returns the character pushed, or -1 on failure.  gzungetc() will
-   fail if c is -1, and may fail if a character has been pushed but not read
-   yet.  If gzungetc is used immediately after gzopen or gzdopen, at least the
-   output buffer size of pushed characters is allowed.  (See gzbuffer above.)
-   The pushed character will be discarded if the stream is repositioned with
-   gzseek() or gzrewind().
-*/
-
-ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
-/*
-     Flushes all pending output into the compressed file.  The parameter flush
-   is as in the deflate() function.  The return value is the zlib error number
-   (see function gzerror below).  gzflush is only permitted when writing.
-
-     If the flush parameter is Z_FINISH, the remaining data is written and the
-   gzip stream is completed in the output.  If gzwrite() is called again, a new
-   gzip stream will be started in the output.  gzread() is able to read such
-   concatented gzip streams.
-
-     gzflush should be called only when strictly necessary because it will
-   degrade compression if called too often.
-*/
-
-/*
-ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,
-                                   z_off_t offset, int whence));
-
-     Sets the starting position for the next gzread or gzwrite on the given
-   compressed file.  The offset represents a number of bytes in the
-   uncompressed data stream.  The whence parameter is defined as in lseek(2);
-   the value SEEK_END is not supported.
-
-     If the file is opened for reading, this function is emulated but can be
-   extremely slow.  If the file is opened for writing, only forward seeks are
-   supported; gzseek then compresses a sequence of zeroes up to the new
-   starting position.
-
-     gzseek returns the resulting offset location as measured in bytes from
-   the beginning of the uncompressed stream, or -1 in case of error, in
-   particular if the file is opened for writing and the new starting position
-   would be before the current position.
-*/
-
-ZEXTERN int ZEXPORT    gzrewind OF((gzFile file));
-/*
-     Rewinds the given file. This function is supported only for reading.
-
-     gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
-*/
-
-/*
-ZEXTERN z_off_t ZEXPORT    gztell OF((gzFile file));
-
-     Returns the starting position for the next gzread or gzwrite on the given
-   compressed file.  This position represents a number of bytes in the
-   uncompressed data stream, and is zero when starting, even if appending or
-   reading a gzip stream from the middle of a file using gzdopen().
-
-     gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
-*/
-
-/*
-ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file));
-
-     Returns the current offset in the file being read or written.  This offset
-   includes the count of bytes that precede the gzip stream, for example when
-   appending or when using gzdopen() for reading.  When reading, the offset
-   does not include as yet unused buffered input.  This information can be used
-   for a progress indicator.  On error, gzoffset() returns -1.
-*/
-
-ZEXTERN int ZEXPORT gzeof OF((gzFile file));
-/*
-     Returns true (1) if the end-of-file indicator has been set while reading,
-   false (0) otherwise.  Note that the end-of-file indicator is set only if the
-   read tried to go past the end of the input, but came up short.  Therefore,
-   just like feof(), gzeof() may return false even if there is no more data to
-   read, in the event that the last read request was for the exact number of
-   bytes remaining in the input file.  This will happen if the input file size
-   is an exact multiple of the buffer size.
-
-     If gzeof() returns true, then the read functions will return no more data,
-   unless the end-of-file indicator is reset by gzclearerr() and the input file
-   has grown since the previous end of file was detected.
-*/
-
-ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
-/*
-     Returns true (1) if file is being copied directly while reading, or false
-   (0) if file is a gzip stream being decompressed.
-
-     If the input file is empty, gzdirect() will return true, since the input
-   does not contain a gzip stream.
-
-     If gzdirect() is used immediately after gzopen() or gzdopen() it will
-   cause buffers to be allocated to allow reading the file to determine if it
-   is a gzip file.  Therefore if gzbuffer() is used, it should be called before
-   gzdirect().
-
-     When writing, gzdirect() returns true (1) if transparent writing was
-   requested ("wT" for the gzopen() mode), or false (0) otherwise.  (Note:
-   gzdirect() is not needed when writing.  Transparent writing must be
-   explicitly requested, so the application already knows the answer.  When
-   linking statically, using gzdirect() will include all of the zlib code for
-   gzip file reading and decompression, which may not be desired.)
-*/
-
-ZEXTERN int ZEXPORT    gzclose OF((gzFile file));
-/*
-     Flushes all pending output if necessary, closes the compressed file and
-   deallocates the (de)compression state.  Note that once file is closed, you
-   cannot call gzerror with file, since its structures have been deallocated.
-   gzclose must not be called more than once on the same file, just as free
-   must not be called more than once on the same allocation.
-
-     gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a
-   file operation error, Z_MEM_ERROR if out of memory, Z_BUF_ERROR if the
-   last read ended in the middle of a gzip stream, or Z_OK on success.
-*/
-
-ZEXTERN int ZEXPORT gzclose_r OF((gzFile file));
-ZEXTERN int ZEXPORT gzclose_w OF((gzFile file));
-/*
-     Same as gzclose(), but gzclose_r() is only for use when reading, and
-   gzclose_w() is only for use when writing or appending.  The advantage to
-   using these instead of gzclose() is that they avoid linking in zlib
-   compression or decompression code that is not used when only reading or only
-   writing respectively.  If gzclose() is used, then both compression and
-   decompression code will be included the application when linking to a static
-   zlib library.
-*/
-
-ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
-/*
-     Returns the error message for the last error which occurred on the given
-   compressed file.  errnum is set to zlib error number.  If an error occurred
-   in the file system and not in the compression library, errnum is set to
-   Z_ERRNO and the application may consult errno to get the exact error code.
-
-     The application must not modify the returned string.  Future calls to
-   this function may invalidate the previously returned string.  If file is
-   closed, then the string previously returned by gzerror will no longer be
-   available.
-
-     gzerror() should be used to distinguish errors from end-of-file for those
-   functions above that do not distinguish those cases in their return values.
-*/
-
-ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
-/*
-     Clears the error and end-of-file flags for file.  This is analogous to the
-   clearerr() function in stdio.  This is useful for continuing to read a gzip
-   file that is being written concurrently.
-*/
-
-#endif /* !Z_SOLO */
-
-                        /* checksum functions */
-
-/*
-     These functions are not related to compression but are exported
-   anyway because they might be useful in applications using the compression
-   library.
-*/
-
-ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
-/*
-     Update a running Adler-32 checksum with the bytes buf[0..len-1] and
-   return the updated checksum.  If buf is Z_NULL, this function returns the
-   required initial value for the checksum.
-
-     An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
-   much faster.
-
-   Usage example:
-
-     uLong adler = adler32(0L, Z_NULL, 0);
-
-     while (read_buffer(buffer, length) != EOF) {
-       adler = adler32(adler, buffer, length);
-     }
-     if (adler != original_adler) error();
-*/
-
-/*
-ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
-                                          z_off_t len2));
-
-     Combine two Adler-32 checksums into one.  For two sequences of bytes, seq1
-   and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for
-   each, adler1 and adler2.  adler32_combine() returns the Adler-32 checksum of
-   seq1 and seq2 concatenated, requiring only adler1, adler2, and len2.  Note
-   that the z_off_t type (like off_t) is a signed integer.  If len2 is
-   negative, the result has no meaning or utility.
-*/
-
-ZEXTERN uLong ZEXPORT crc32   OF((uLong crc, const Bytef *buf, uInt len));
-/*
-     Update a running CRC-32 with the bytes buf[0..len-1] and return the
-   updated CRC-32.  If buf is Z_NULL, this function returns the required
-   initial value for the crc.  Pre- and post-conditioning (one's complement) is
-   performed within this function so it shouldn't be done by the application.
-
-   Usage example:
-
-     uLong crc = crc32(0L, Z_NULL, 0);
-
-     while (read_buffer(buffer, length) != EOF) {
-       crc = crc32(crc, buffer, length);
-     }
-     if (crc != original_crc) error();
-*/
-
-/*
-ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
-
-     Combine two CRC-32 check values into one.  For two sequences of bytes,
-   seq1 and seq2 with lengths len1 and len2, CRC-32 check values were
-   calculated for each, crc1 and crc2.  crc32_combine() returns the CRC-32
-   check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and
-   len2.
-*/
-
-
-                        /* various hacks, don't look :) */
-
-/* deflateInit and inflateInit are macros to allow checking the zlib version
- * and the compiler's view of z_stream:
- */
-ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
-                                     const char *version, int stream_size));
-ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
-                                     const char *version, int stream_size));
-ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int  level, int  method,
-                                      int windowBits, int memLevel,
-                                      int strategy, const char *version,
-                                      int stream_size));
-ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int  windowBits,
-                                      const char *version, int stream_size));
-ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
-                                         unsigned char FAR *window,
-                                         const char *version,
-                                         int stream_size));
-#define deflateInit(strm, level) \
-        deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream))
-#define inflateInit(strm) \
-        inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream))
-#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
-        deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
-                      (strategy), ZLIB_VERSION, (int)sizeof(z_stream))
-#define inflateInit2(strm, windowBits) \
-        inflateInit2_((strm), (windowBits), ZLIB_VERSION, \
-                      (int)sizeof(z_stream))
-#define inflateBackInit(strm, windowBits, window) \
-        inflateBackInit_((strm), (windowBits), (window), \
-                      ZLIB_VERSION, (int)sizeof(z_stream))
-
-#ifndef Z_SOLO
-
-/* gzgetc() macro and its supporting function and exposed data structure.  Note
- * that the real internal state is much larger than the exposed structure.
- * This abbreviated structure exposes just enough for the gzgetc() macro.  The
- * user should not mess with these exposed elements, since their names or
- * behavior could change in the future, perhaps even capriciously.  They can
- * only be used by the gzgetc() macro.  You have been warned.
- */
-struct gzFile_s {
-    unsigned have;
-    unsigned char *next;
-    z_off64_t pos;
-};
-ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file));  /* backward compatibility */
-#ifdef Z_PREFIX_SET
-#  undef z_gzgetc
-#  define z_gzgetc(g) \
-          ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g))
-#else
-#  define gzgetc(g) \
-          ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g))
-#endif
-
-/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or
- * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if
- * both are true, the application gets the *64 functions, and the regular
- * functions are changed to 64 bits) -- in case these are set on systems
- * without large file support, _LFS64_LARGEFILE must also be true
- */
-#ifdef Z_LARGE64
-   ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
-   ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
-   ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
-   ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
-   ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t));
-   ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t));
-#endif
-
-#if !defined(ZLIB_INTERNAL) && defined(Z_WANT64)
-#  ifdef Z_PREFIX_SET
-#    define z_gzopen z_gzopen64
-#    define z_gzseek z_gzseek64
-#    define z_gztell z_gztell64
-#    define z_gzoffset z_gzoffset64
-#    define z_adler32_combine z_adler32_combine64
-#    define z_crc32_combine z_crc32_combine64
-#  else
-#    define gzopen gzopen64
-#    define gzseek gzseek64
-#    define gztell gztell64
-#    define gzoffset gzoffset64
-#    define adler32_combine adler32_combine64
-#    define crc32_combine crc32_combine64
-#  endif
-#  ifndef Z_LARGE64
-     ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
-     ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int));
-     ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile));
-     ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile));
-     ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
-     ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
-#  endif
-#else
-   ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *));
-   ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int));
-   ZEXTERN z_off_t ZEXPORT gztell OF((gzFile));
-   ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile));
-   ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
-   ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
-#endif
-
-#else /* Z_SOLO */
-
-   ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
-   ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
-
-#endif /* !Z_SOLO */
-
-/* hack for buggy compilers */
-#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
-    struct internal_state {int dummy;};
-#endif
-
-/* undocumented functions */
-ZEXTERN const char   * ZEXPORT zError           OF((int));
-ZEXTERN int            ZEXPORT inflateSyncPoint OF((z_streamp));
-ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table    OF((void));
-ZEXTERN int            ZEXPORT inflateUndermine OF((z_streamp, int));
-ZEXTERN int            ZEXPORT inflateResetKeep OF((z_streamp));
-ZEXTERN int            ZEXPORT deflateResetKeep OF((z_streamp));
-#if defined(_WIN32) && !defined(Z_SOLO)
-ZEXTERN gzFile         ZEXPORT gzopen_w OF((const wchar_t *path,
-                                            const char *mode));
-#endif
-#if defined(STDC) || defined(Z_HAVE_STDARG_H)
-#  ifndef Z_SOLO
-ZEXTERN int            ZEXPORTVA gzvprintf Z_ARG((gzFile file,
-                                                  const char *format,
-                                                  va_list va));
-#  endif
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ZLIB_H */
diff --git a/src/include/gromacs/external/tng_io/external/zlib/zutil.h b/src/include/gromacs/external/tng_io/external/zlib/zutil.h
deleted file mode 100644 (file)
index 24ab06b..0000000
+++ /dev/null
@@ -1,253 +0,0 @@
-/* zutil.h -- internal interface and configuration of the compression library
- * Copyright (C) 1995-2013 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-/* @(#) $Id$ */
-
-#ifndef ZUTIL_H
-#define ZUTIL_H
-
-#ifdef HAVE_HIDDEN
-#  define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
-#else
-#  define ZLIB_INTERNAL
-#endif
-
-#include "zlib.h"
-
-#if defined(STDC) && !defined(Z_SOLO)
-#  if !(defined(_WIN32_WCE) && defined(_MSC_VER))
-#    include <stddef.h>
-#  endif
-#  include <string.h>
-#  include <stdlib.h>
-#endif
-
-#ifdef Z_SOLO
-   typedef long ptrdiff_t;  /* guess -- will be caught if guess is wrong */
-#endif
-
-#ifndef local
-#  define local static
-#endif
-/* compile with -Dlocal if your debugger can't find static symbols */
-
-typedef unsigned char  uch;
-typedef uch FAR uchf;
-typedef unsigned short ush;
-typedef ush FAR ushf;
-typedef unsigned long  ulg;
-
-extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
-/* (size given to avoid silly warnings with Visual C++) */
-
-#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]
-
-#define ERR_RETURN(strm,err) \
-  return (strm->msg = ERR_MSG(err), (err))
-/* To be used only when the state is known to be valid */
-
-        /* common constants */
-
-#ifndef DEF_WBITS
-#  define DEF_WBITS MAX_WBITS
-#endif
-/* default windowBits for decompression. MAX_WBITS is for compression only */
-
-#if MAX_MEM_LEVEL >= 8
-#  define DEF_MEM_LEVEL 8
-#else
-#  define DEF_MEM_LEVEL  MAX_MEM_LEVEL
-#endif
-/* default memLevel */
-
-#define STORED_BLOCK 0
-#define STATIC_TREES 1
-#define DYN_TREES    2
-/* The three kinds of block type */
-
-#define MIN_MATCH  3
-#define MAX_MATCH  258
-/* The minimum and maximum match lengths */
-
-#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */
-
-        /* target dependencies */
-
-#if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32))
-#  define OS_CODE  0x00
-#  ifndef Z_SOLO
-#    if defined(__TURBOC__) || defined(__BORLANDC__)
-#      if (__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))
-         /* Allow compilation with ANSI keywords only enabled */
-         void _Cdecl farfree( void *block );
-         void *_Cdecl farmalloc( unsigned long nbytes );
-#      else
-#        include <alloc.h>
-#      endif
-#    else /* MSC or DJGPP */
-#      include <malloc.h>
-#    endif
-#  endif
-#endif
-
-#ifdef AMIGA
-#  define OS_CODE  0x01
-#endif
-
-#if defined(VAXC) || defined(VMS)
-#  define OS_CODE  0x02
-#  define F_OPEN(name, mode) \
-     fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512")
-#endif
-
-#if defined(ATARI) || defined(atarist)
-#  define OS_CODE  0x05
-#endif
-
-#ifdef OS2
-#  define OS_CODE  0x06
-#  if defined(M_I86) && !defined(Z_SOLO)
-#    include <malloc.h>
-#  endif
-#endif
-
-#if defined(MACOS) || defined(TARGET_OS_MAC)
-#  define OS_CODE  0x07
-#  ifndef Z_SOLO
-#    if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
-#      include <unix.h> /* for fdopen */
-#    else
-#      ifndef fdopen
-#        define fdopen(fd,mode) NULL /* No fdopen() */
-#      endif
-#    endif
-#  endif
-#endif
-
-#ifdef TOPS20
-#  define OS_CODE  0x0a
-#endif
-
-#ifdef WIN32
-#  ifndef __CYGWIN__  /* Cygwin is Unix, not Win32 */
-#    define OS_CODE  0x0b
-#  endif
-#endif
-
-#ifdef __50SERIES /* Prime/PRIMOS */
-#  define OS_CODE  0x0f
-#endif
-
-#if defined(_BEOS_) || defined(RISCOS)
-#  define fdopen(fd,mode) NULL /* No fdopen() */
-#endif
-
-#if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined __INTERIX
-#  if defined(_WIN32_WCE)
-#    define fdopen(fd,mode) NULL /* No fdopen() */
-#    ifndef _PTRDIFF_T_DEFINED
-       typedef int ptrdiff_t;
-#      define _PTRDIFF_T_DEFINED
-#    endif
-#  else
-#    define fdopen(fd,type)  _fdopen(fd,type)
-#  endif
-#endif
-
-#if defined(__BORLANDC__) && !defined(MSDOS)
-  #pragma warn -8004
-  #pragma warn -8008
-  #pragma warn -8066
-#endif
-
-/* provide prototypes for these when building zlib without LFS */
-#if !defined(_WIN32) && \
-    (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
-    ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
-    ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
-#endif
-
-        /* common defaults */
-
-#ifndef OS_CODE
-#  define OS_CODE  0x03  /* assume Unix */
-#endif
-
-#ifndef F_OPEN
-#  define F_OPEN(name, mode) fopen((name), (mode))
-#endif
-
-         /* functions */
-
-#if defined(pyr) || defined(Z_SOLO)
-#  define NO_MEMCPY
-#endif
-#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__)
- /* Use our own functions for small and medium model with MSC <= 5.0.
-  * You may have to use the same strategy for Borland C (untested).
-  * The __SC__ check is for Symantec.
-  */
-#  define NO_MEMCPY
-#endif
-#if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY)
-#  define HAVE_MEMCPY
-#endif
-#ifdef HAVE_MEMCPY
-#  ifdef SMALL_MEDIUM /* MSDOS small or medium model */
-#    define zmemcpy _fmemcpy
-#    define zmemcmp _fmemcmp
-#    define zmemzero(dest, len) _fmemset(dest, 0, len)
-#  else
-#    define zmemcpy memcpy
-#    define zmemcmp memcmp
-#    define zmemzero(dest, len) memset(dest, 0, len)
-#  endif
-#else
-   void ZLIB_INTERNAL zmemcpy OF((Bytef* dest, const Bytef* source, uInt len));
-   int ZLIB_INTERNAL zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len));
-   void ZLIB_INTERNAL zmemzero OF((Bytef* dest, uInt len));
-#endif
-
-/* Diagnostic functions */
-#ifdef DEBUG
-#  include <stdio.h>
-   extern int ZLIB_INTERNAL z_verbose;
-   extern void ZLIB_INTERNAL z_error OF((char *m));
-#  define Assert(cond,msg) {if(!(cond)) z_error(msg);}
-#  define Trace(x) {if (z_verbose>=0) fprintf x ;}
-#  define Tracev(x) {if (z_verbose>0) fprintf x ;}
-#  define Tracevv(x) {if (z_verbose>1) fprintf x ;}
-#  define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;}
-#  define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;}
-#else
-#  define Assert(cond,msg)
-#  define Trace(x)
-#  define Tracev(x)
-#  define Tracevv(x)
-#  define Tracec(c,x)
-#  define Tracecv(c,x)
-#endif
-
-#ifndef Z_SOLO
-   voidpf ZLIB_INTERNAL zcalloc OF((voidpf opaque, unsigned items,
-                                    unsigned size));
-   void ZLIB_INTERNAL zcfree  OF((voidpf opaque, voidpf ptr));
-#endif
-
-#define ZALLOC(strm, items, size) \
-           (*((strm)->zalloc))((strm)->opaque, (items), (size))
-#define ZFREE(strm, addr)  (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
-#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
-
-/* Reverse the bytes in a 32-bit value */
-#define ZSWAP32(q) ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \
-                    (((q) & 0xff00) << 8) + (((q) & 0xff) << 24))
-
-#endif /* ZUTIL_H */
diff --git a/src/include/gromacs/external/tng_io/include/compression/bwlzh.h b/src/include/gromacs/external/tng_io/include/compression/bwlzh.h
deleted file mode 100644 (file)
index ce08f69..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/* This code is part of the tng compression routines.
- *
- * Written by Daniel Spangberg
- * Copyright (c) 2010, 2013, The GROMACS development team.
- *
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the Revised BSD License.
- */
-
-
-#ifndef BWLZH_H
-#define BWLZH_H
-
-/* Compress the integers (positive, small integers are preferable)
-   using bwlzh compression.  The unsigned char *output should be
-   allocated to be able to hold worst case. You can obtain this length
-   conveniently by calling comp_get_buflen()
-*/
-void DECLSPECDLLEXPORT bwlzh_compress(unsigned int *vals, const int nvals,
-                 unsigned char *output, int *output_len);
-
-void DECLSPECDLLEXPORT bwlzh_compress_no_lz77(unsigned int *vals, const int nvals,
-                 unsigned char *output, int *output_len);
-
-int DECLSPECDLLEXPORT bwlzh_get_buflen(const int nvals);
-
-void DECLSPECDLLEXPORT bwlzh_decompress(unsigned char *input, const int nvals,
-                   unsigned int *vals);
-
-
-/* The routines below are mostly useful for testing, and for internal
-   use by the library. */
-
-void DECLSPECDLLEXPORT bwlzh_compress_verbose(unsigned int *vals, const int nvals,
-                         unsigned char *output, int *output_len);
-
-void DECLSPECDLLEXPORT bwlzh_compress_no_lz77_verbose(unsigned int *vals, const int nvals,
-                 unsigned char *output, int *output_len);
-
-void DECLSPECDLLEXPORT bwlzh_decompress_verbose(unsigned char *input, const int nvals,
-                           unsigned int *vals);
-
-/* Compress the integers (positive, small integers are preferable)
-   using huffman coding, with automatic selection of how to handle the
-   huffman dictionary.  The unsigned char *huffman should be allocated
-   to be able to hold worst case. You can obtain this length
-   conveniently by calling comp_huff_buflen()
-*/
-void Ptngc_comp_huff_compress(unsigned int *vals, const int nvals,
-                       unsigned char *huffman, int *huffman_len);
-
-int Ptngc_comp_huff_buflen(const int nvals);
-
-void Ptngc_comp_huff_decompress(unsigned char *huffman, const int huffman_len,
-                         unsigned int *vals);
-
-
-/* the value pointed to by chosen_algo should be
-   sent as -1 for autodetect. */
-void Ptngc_comp_huff_compress_verbose(unsigned int *vals, int nvals,
-                               unsigned char *huffman, int *huffman_len,
-                               int *huffdatalen,
-                               int *huffman_lengths,int *chosen_algo,
-                               const int isvals16);
-
-#define N_HUFFMAN_ALGO 3
-char *Ptngc_comp_get_huff_algo_name(const int algo);
-char *Ptngc_comp_get_algo_name(const int algo);
-
-
-#endif
diff --git a/src/include/gromacs/external/tng_io/include/compression/bwt.h b/src/include/gromacs/external/tng_io/include/compression/bwt.h
deleted file mode 100644 (file)
index fedfc3d..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/* This code is part of the tng compression routines.
- *
- * Written by Daniel Spangberg
- * Copyright (c) 2010, 2013, The GROMACS development team.
- *
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the Revised BSD License.
- */
-
-
-#ifndef BWT_H
-#define BWT_H
-
-void Ptngc_comp_to_bwt(unsigned int *vals, const int nvals,
-                unsigned int *output, int *index);
-
-void Ptngc_comp_from_bwt(unsigned int *input, const int nvals, int index,
-                  unsigned int *vals);
-
-void Ptngc_bwt_merge_sort_inner(int *indices, const int nvals, unsigned int *vals,
-                                const int start, const int end,
-                                unsigned int *nrepeat,
-                                int *workarray);
-
-#endif
diff --git a/src/include/gromacs/external/tng_io/include/compression/coder.h b/src/include/gromacs/external/tng_io/include/compression/coder.h
deleted file mode 100644 (file)
index d714c82..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/* This code is part of the tng compression routines.
- *
- * Written by Daniel Spangberg
- * Copyright (c) 2010, 2013, The GROMACS development team.
- *
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the Revised BSD License.
- */
-
-#ifndef CODER_H
-#define CODER_H
-
-#ifndef DECLSPECDLLEXPORT
-#ifdef USE_WINDOWS
-#define DECLSPECDLLEXPORT __declspec(dllexport)
-#else /* USE_WINDOWS */
-#define DECLSPECDLLEXPORT
-#endif /* USE_WINDOWS */
-#endif /* DECLSPECDLLEXPORT */
-
-struct coder
-{
-    unsigned int pack_temporary;
-    int pack_temporary_bits;
-    int stat_overflow;
-    int stat_numval;
-};
-
-struct coder DECLSPECDLLEXPORT *Ptngc_coder_init(void);
-void DECLSPECDLLEXPORT Ptngc_coder_deinit(struct coder *coder);
-unsigned char DECLSPECDLLEXPORT *Ptngc_pack_array(struct coder *coder,int *input, int *length, const int coding, const int coding_parameter, const int natoms, const int speed);
-int DECLSPECDLLEXPORT Ptngc_unpack_array(struct coder *coder,unsigned char *packed,int *output, const int length, const int coding, const int coding_parameter, const int natoms);
-unsigned char DECLSPECDLLEXPORT *Ptngc_pack_array_xtc2(struct coder *coder,int *input, int *length);
-int DECLSPECDLLEXPORT Ptngc_unpack_array_xtc2(struct coder *coder, unsigned char *packed, int *output, const int length);
-unsigned char DECLSPECDLLEXPORT *Ptngc_pack_array_xtc3(int *input, int *length, int natoms, int speed);
-int DECLSPECDLLEXPORT Ptngc_unpack_array_xtc3(unsigned char *packed,int *output, int length, int natoms);
-
-void DECLSPECDLLEXPORT Ptngc_out8bits(struct coder *coder, unsigned char **output);
-void DECLSPECDLLEXPORT Ptngc_pack_flush(struct coder *coder,unsigned char **output);
-void DECLSPECDLLEXPORT Ptngc_write_pattern(struct coder *coder,unsigned int pattern, int nbits, unsigned char **output);
-
-void DECLSPECDLLEXPORT Ptngc_writebits(struct coder *coder, unsigned int value, const int nbits, unsigned char **output_ptr);
-void DECLSPECDLLEXPORT Ptngc_write32bits(struct coder *coder,unsigned int value,int nbits, unsigned char **output_ptr);
-void DECLSPECDLLEXPORT Ptngc_writemanybits(struct coder *coder,unsigned char *value,int nbits, unsigned char **output_ptr);
-
-
-#endif
diff --git a/src/include/gromacs/external/tng_io/include/compression/dict.h b/src/include/gromacs/external/tng_io/include/compression/dict.h
deleted file mode 100644 (file)
index 26eed27..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/* This code is part of the tng compression routines.
- *
- * Written by Daniel Spangberg
- * Copyright (c) 2010, 2013, The GROMACS development team.
- *
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the Revised BSD License.
- */
-
-
-#ifndef DICT_H
-#define DICT_H
-
-void Ptngc_comp_canonical_dict(unsigned int *dict, int *ndict);
-
-void Ptngc_comp_make_dict_hist(unsigned int *vals, const int nvals,
-                        unsigned int *dict, int *ndict,
-                        unsigned int *hist);
-
-#endif
diff --git a/src/include/gromacs/external/tng_io/include/compression/fixpoint.h b/src/include/gromacs/external/tng_io/include/compression/fixpoint.h
deleted file mode 100644 (file)
index 7b6a667..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/* This code is part of the tng compression routines.
- *
- * Written by Daniel Spangberg
- * Copyright (c) 2010, 2013, The GROMACS development team.
- *
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the Revised BSD License.
- */
-
-#ifndef FIXPOINT_H
-#define FIXPOINT_H
-
-#include "../compression/my64bit.h"
-
-/* There are at least 32 bits available in a long. */
-typedef unsigned long fix_t;
-
-/* Positive double to 32 bit fixed point value */
-fix_t Ptngc_ud_to_fix_t(double d, const double max);
-
-/* double to signed 32 bit fixed point value */
-fix_t Ptngc_d_to_fix_t(double d, const double max);
-
-/* 32 bit fixed point value to positive double */
-double Ptngc_fix_t_to_ud(fix_t f, const double max);
-
-/* signed 32 bit fixed point value to double */
-double Ptngc_fix_t_to_d(fix_t f, const double max);
-
-/* Convert a floating point variable to two 32 bit integers with range
-   -2.1e9 to 2.1e9 and precision to somewhere around 1e-9. */
-void Ptngc_d_to_i32x2(double d, fix_t *hi, fix_t *lo);
-
-/* Convert two 32 bit integers to a floating point variable
-   -2.1e9 to 2.1e9 and precision to somewhere around 1e-9. */
-double Ptngc_i32x2_to_d(fix_t hi, fix_t lo);
-
-#endif
diff --git a/src/include/gromacs/external/tng_io/include/compression/huffman.h b/src/include/gromacs/external/tng_io/include/compression/huffman.h
deleted file mode 100644 (file)
index f2ce187..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/* This code is part of the tng compression routines.
- *
- * Written by Daniel Spangberg
- * Copyright (c) 2010, 2013, The GROMACS development team.
- *
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the Revised BSD License.
- */
-
-
-#ifndef HUFFMAN_H
-#define HUFFMAN_H
-
-void Ptngc_comp_conv_to_huffman(unsigned int *vals, const int nvals,
-                         unsigned int *dict, const int ndict,
-                         unsigned int *prob,
-                         unsigned char *huffman,
-                         int *huffman_len,
-                         unsigned char *huffman_dict,
-                         int *huffman_dictlen,
-                         unsigned int *huffman_dict_unpacked,
-                         int *huffman_dict_unpackedlen);
-
-void Ptngc_comp_conv_from_huffman(unsigned char *huffman,
-                           unsigned int *vals, const int nvals,
-                           const int ndict,
-                           unsigned char *huffman_dict,
-                           const int huffman_dictlen,
-                           unsigned int *huffman_dict_unpacked,
-                           const int huffman_dict_unpackedlen);
-
-#endif
diff --git a/src/include/gromacs/external/tng_io/include/compression/lz77.h b/src/include/gromacs/external/tng_io/include/compression/lz77.h
deleted file mode 100644 (file)
index d4a4beb..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/* This code is part of the tng compression routines.
- *
- * Written by Daniel Spangberg
- * Copyright (c) 2010, 2013, The GROMACS development team.
- *
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the Revised BSD License.
- */
-
-
-#ifndef LZ77_H
-#define LZ77_H
-
-void Ptngc_comp_to_lz77(unsigned int *vals, const int nvals,
-                 unsigned int *data, int *ndata,
-                 unsigned int *len, int *nlens,
-                 unsigned int *offsets, int *noffsets);
-
-void Ptngc_comp_from_lz77(unsigned int *data, const int ndata,
-                   unsigned int *len, const int nlens,
-                   unsigned int *offsets, const int noffsets,
-                   unsigned int *vals, const int nvals);
-
-#endif
diff --git a/src/include/gromacs/external/tng_io/include/compression/merge_sort.h b/src/include/gromacs/external/tng_io/include/compression/merge_sort.h
deleted file mode 100644 (file)
index f8aaeb7..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/* This code is part of the tng compression routines.
- *
- * Written by Daniel Spangberg
- * Copyright (c) 2010, 2013, The GROMACS development team.
- *
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the Revised BSD License.
- */
-
-
-#ifndef MERGE_SORT_H
-#define MERGE_SORT_H
-
-void Ptngc_merge_sort(void *base, const size_t nmemb, const size_t size,
-               int (*compar)(const void *v1,const void *v2,const void *private),
-               void *private);
-
-
-#endif
diff --git a/src/include/gromacs/external/tng_io/include/compression/mtf.h b/src/include/gromacs/external/tng_io/include/compression/mtf.h
deleted file mode 100644 (file)
index 3dc9ace..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/* This code is part of the tng compression routines.
- *
- * Written by Daniel Spangberg
- * Copyright (c) 2010, 2013, The GROMACS development team.
- *
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the Revised BSD License.
- */
-
-
-#ifndef MTF_H
-#define MTF_H
-
-void Ptngc_comp_conv_to_mtf(unsigned int *vals, const int nvals,
-                     unsigned int *dict, const int ndict,
-                     unsigned int *valsmtf);
-
-void Ptngc_comp_conv_from_mtf(unsigned int *valsmtf, const int nvals,
-                       unsigned int *dict, const int ndict,
-                       unsigned int *vals);
-
-void Ptngc_comp_conv_to_mtf_partial(unsigned int *vals, const int nvals,
-                             unsigned int *valsmtf);
-
-void Ptngc_comp_conv_from_mtf_partial(unsigned int *valsmtf, const int nvals,
-                               unsigned int *vals);
-
-void Ptngc_comp_conv_to_mtf_partial3(unsigned int *vals, const int nvals,
-                              unsigned char *valsmtf);
-
-void Ptngc_comp_conv_from_mtf_partial3(unsigned char *valsmtf, const int nvals,
-                                unsigned int *vals);
-
-#endif
diff --git a/src/include/gromacs/external/tng_io/include/compression/my64bit.h b/src/include/gromacs/external/tng_io/include/compression/my64bit.h
deleted file mode 100644 (file)
index c17a4a9..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/* This code is part of the tng compression routines.
- *
- * Written by Daniel Spangberg
- * Copyright (c) 2010, 2013, The GROMACS development team.
- *
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the Revised BSD License.
- */
-
-#ifndef MY64BIT_H
-#define MY64BIT_H
-
-#ifdef USE_STD_INTTYPES_H
-#include <inttypes.h>
-typedef int64_t my_int64_t;
-typedef uint64_t my_uint64_t;
-#define HAVE64BIT
-#else /* USE_STD_INTTYPES */
-/* The USE_WINDOWS symbol should be automatically defined in tng_compress.h */
-#include "../compression/tng_compress.h"
-#ifdef USE_WINDOWS
-typedef __int64 my_int64_t;
-typedef unsigned __int64 my_uint64_t;
-#define HAVE64BIT
-#else  /* USE_WINDOWS */
-/* Fall back to assume that we have unsigned long long */
-typedef unsigned long long my_uint64_t;
-#define HAVE64BIT
-#endif /* USE_WINDOWS */
-#endif /* USE_STD_INTTYPES */
-
-#endif
diff --git a/src/include/gromacs/external/tng_io/include/compression/rle.h b/src/include/gromacs/external/tng_io/include/compression/rle.h
deleted file mode 100644 (file)
index 3665dd0..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/* This code is part of the tng compression routines.
- *
- * Written by Daniel Spangberg
- * Copyright (c) 2010, 2013, The GROMACS development team.
- *
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the Revised BSD License.
- */
-
-
-#ifndef RLE_H
-#define RLE_H
-
-void Ptngc_comp_conv_to_rle(unsigned int *vals, const int nvals,
-                                   unsigned int *rle, int *nrle,
-                                   const int min_rle);
-
-void Ptngc_comp_conv_from_rle(unsigned int *rle,
-                                         unsigned int *vals, const int nvals);
-
-#endif
diff --git a/src/include/gromacs/external/tng_io/include/compression/tng_compress.h b/src/include/gromacs/external/tng_io/include/compression/tng_compress.h
deleted file mode 100644 (file)
index 0082ba3..0000000
+++ /dev/null
@@ -1,223 +0,0 @@
-/* This code is part of the tng compression routines.
- *
- * Written by Daniel Spangberg
- * Copyright (c) 2010, 2013, The GROMACS development team.
- *
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the Revised BSD License.
- */
-
-#ifndef TNG_COMPRESS_H
-#define TNG_COMPRESS_H
-
-#ifndef USE_WINDOWS
-#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
-#define USE_WINDOWS
-#endif /* win32... */
-#endif /* not defined USE_WINDOWS */
-
-#ifndef DECLSPECDLLEXPORT
-#ifdef USE_WINDOWS
-#define DECLSPECDLLEXPORT __declspec(dllexport)
-#else /* USE_WINDOWS */
-#define DECLSPECDLLEXPORT
-#endif /* USE_WINDOWS */
-#endif /* DECLSPECDLLEXPORT */
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* tng_compress_pos expects positions to have the order:
-   first xyz, then sorted in atom order
-   then all the frames repeated, i.e.:
-   nframes * [
-    natoms* [
-      x, y, z
-    ]
-   ]
-   desired_precision what to round the numbers to, i.e. integers will be created as:
-   round(pos[]/desired_precision).
-
-   algo should first be determined by calling
-   tng_compress_pos_find_algo
-
-   The compressed data is returned in a malloced pointer (so free can
-   be called to free the memory), the number of chars in the compressed
-   data is put into *nitems.
-
-   If too large values are input (compared to the precision), NULL is returned.
-*/
-
-char DECLSPECDLLEXPORT *tng_compress_pos(double *pos, const int natoms, const int nframes,
-                                        const double desired_precision,
-                                        const int speed, int *algo,
-                                        int *nitems);
-
-char DECLSPECDLLEXPORT *tng_compress_pos_float(float *pos, const int natoms, const int nframes,
-                                              const float desired_precision,
-                                              const int speed, int *algo,
-                                              int *nitems);
-
-char DECLSPECDLLEXPORT *tng_compress_pos_int(int *pos, const int natoms, const int nframes,
-                                            const unsigned long prec_hi, const unsigned long prec_lo,
-                                            int speed,int *algo,
-                                            int *nitems);
-
-/* The tng_compress_pos_find_algo works the same as tng_compress_pos, but
-   it performs benchmarking to find the algorithms with the best
-   compression ratio.
-   The search is controlled by giving speed:
-   speed=1:  Fast algorithms only. This excludes all BWLZH algorithms and
-             the XTC3 algorithm.
-   speed=2:  Same as 1 and also includes the XTC3 algorithm using base compression
-             only.
-   speed=3:  Same as 2 and also includes the XTC3 algorithm which will use BWLZH
-             compression when it seems likely to give better
-             compression. Also includes the interframe BWLZH algorithm for
-             coordinates and velocities.
-   speed=4:  Enable the inter frame BWLZH algorithm for the coordinates.
-             The one-to-one BWLZH algorithm is enabled for velocities.
-   speed=5:  Enable the LZ77 part of the BWLZH algorithm.
-   speed=6:  Enable the intra frame BWLZH algorithm for the coordinates. Always try
-             the BWLZH compression in the XTC3 algorithm.
-
-   Set speed=0 to allow tng_compression to set the default speed (which is currently 2).
-   For very good compression it makes sense to choose speed=4 or speed=5
-
-   The number of items required in the algorithm array can be found
-   by calling tng_compress_nalgo
-*/
-
-char DECLSPECDLLEXPORT *tng_compress_pos_find_algo(double *pos, const int natoms, const int nframes,
-                                                  const double desired_precision,
-                                                  const int speed,
-                                                  int *algo,
-                                                  int *nitems);
-
-char DECLSPECDLLEXPORT *tng_compress_pos_float_find_algo(float *pos, const int natoms, const int nframes,
-                                                        const float desired_precision,
-                                                        const int speed,
-                                                        int *algo,
-                                                        int *nitems);
-
-char DECLSPECDLLEXPORT *tng_compress_pos_int_find_algo(int *pos, const int natoms, const int nframes,
-                                                      const unsigned long prec_hi, const unsigned long prec_lo,
-                                                      const int speed, int *algo,
-                                                      int *nitems);
-
-/* This returns the number of integers required for the storage of the algorithm
-   with the best compression ratio. */
-int DECLSPECDLLEXPORT tng_compress_nalgo(void);
-
-/* The following two routines does the same as the compression of the
-   positions, but compresses velocities instead. The algorithm
-   selection for velocities is different, so the position and
-   velocities routines should not be mixed. */
-
-char DECLSPECDLLEXPORT *tng_compress_vel(double *vel, const int natoms, const int nframes,
-                                        const double desired_precision,
-                                        const int speed, int *algo,
-                                        int *nitems);
-
-char DECLSPECDLLEXPORT *tng_compress_vel_float(float *vel, const int natoms, const int nframes,
-                                              const float desired_precision,
-                                              const int speed, int *algo,
-                                              int *nitems);
-
-char DECLSPECDLLEXPORT *tng_compress_vel_int(int *vel, const int natoms, const int nframes,
-                                            const unsigned long prec_hi, const unsigned long prec_lo,
-                                            int speed, int *algo,
-                                            int *nitems);
-
-char DECLSPECDLLEXPORT *tng_compress_vel_find_algo(double *vel, const int natoms, const int nframes,
-                                                  const double desired_precision,
-                                                  const int speed,
-                                                  int *algo,
-                                                  int *nitems);
-
-char DECLSPECDLLEXPORT *tng_compress_vel_float_find_algo(float *vel, const int natoms, const int nframes,
-                                                        const float desired_precision,
-                                                        const int speed,
-                                                        int *algo,
-                                                        int *nitems);
-
-char DECLSPECDLLEXPORT *tng_compress_vel_int_find_algo(int *vel, const int natoms, const int nframes,
-                                                      const unsigned long prec_hi, const unsigned long prec_lo,
-                                                      const int speed,
-                                                      int *algo,
-                                                      int *nitems);
-
-/* From a compressed block, obtain information about
-   whether it is a position or velocity block:
-   *vel=1 means velocity block, *vel=0 means position block.
-   It also gives info about the number of atoms,
-   frames, and the precision used to compress the block, and the algorithms used to
-   compress the block. The return value=0 if the block looks like a tng compressed block,
-   and 1 otherwise. If the return value is 1 no information is returned. */
-int DECLSPECDLLEXPORT tng_compress_inquire(char *data,int *vel, int *natoms,
-                                          int *nframes, double *precision,
-                                          int *algo);
-
-/* Uncompresses any tng compress block, positions or velocities. It determines whether it is positions or velocities from the data buffer. The return value is 0 if ok, and 1 if not.
-*/
-int DECLSPECDLLEXPORT tng_compress_uncompress(char *data,double *posvel);
-
-int DECLSPECDLLEXPORT tng_compress_uncompress_float(char *data,float *posvel);
-
-int DECLSPECDLLEXPORT tng_compress_uncompress_int(char *data,int *posvel, unsigned long *prec_hi, unsigned long *prec_lo);
-
-/* This converts a block of integers, as obtained from tng_compress_uncompress_int, to floating point values
-   either double precision or single precision. */
-void DECLSPECDLLEXPORT tng_compress_int_to_double(int *posvel_int, const unsigned long prec_hi, const unsigned long prec_lo,
-                                                 const int natoms, const int nframes,
-                                                 double *posvel_double);
-
-void DECLSPECDLLEXPORT tng_compress_int_to_float(int *posvel_int, const unsigned long prec_hi, const unsigned long prec_lo,
-                                                const int natoms, const int nframes,
-                                                float *posvel_float);
-
-
-/* Compression algorithms (matching the original trajng
-   assignments) The compression backends require that some of the
-   algorithms must have the same value. */
-
-#define TNG_COMPRESS_ALGO_STOPBIT 1
-#define TNG_COMPRESS_ALGO_TRIPLET 2
-#define TNG_COMPRESS_ALGO_BWLZH1  8
-#define TNG_COMPRESS_ALGO_BWLZH2  9
-
-#define TNG_COMPRESS_ALGO_POS_STOPBIT_INTER     TNG_COMPRESS_ALGO_STOPBIT
-#define TNG_COMPRESS_ALGO_POS_TRIPLET_INTER     TNG_COMPRESS_ALGO_TRIPLET
-#define TNG_COMPRESS_ALGO_POS_TRIPLET_INTRA     3
-#define TNG_COMPRESS_ALGO_POS_XTC2              5
-#define TNG_COMPRESS_ALGO_POS_TRIPLET_ONETOONE  7
-#define TNG_COMPRESS_ALGO_POS_BWLZH_INTER       TNG_COMPRESS_ALGO_BWLZH1
-#define TNG_COMPRESS_ALGO_POS_BWLZH_INTRA       TNG_COMPRESS_ALGO_BWLZH2
-#define TNG_COMPRESS_ALGO_POS_XTC3              10
-#define TNG_COMPRESS_ALGO_VEL_STOPBIT_ONETOONE  TNG_COMPRESS_ALGO_STOPBIT
-#define TNG_COMPRESS_ALGO_VEL_TRIPLET_INTER     TNG_COMPRESS_ALGO_TRIPLET
-#define TNG_COMPRESS_ALGO_VEL_TRIPLET_ONETOONE  3
-#define TNG_COMPRESS_ALGO_VEL_STOPBIT_INTER     6
-#define TNG_COMPRESS_ALGO_VEL_BWLZH_INTER       TNG_COMPRESS_ALGO_BWLZH1
-#define TNG_COMPRESS_ALGO_VEL_BWLZH_ONETOONE    TNG_COMPRESS_ALGO_BWLZH2
-#define TNG_COMPRESS_ALGO_MAX 11
-
-
-
-/* Obtain strings describing the actual algorithms. These point to static memory, so should
-   not be freed. */
-char DECLSPECDLLEXPORT *tng_compress_initial_pos_algo(int *algo);
-char DECLSPECDLLEXPORT *tng_compress_pos_algo(int *algo);
-char DECLSPECDLLEXPORT *tng_compress_initial_vel_algo(int *algo);
-char DECLSPECDLLEXPORT *tng_compress_vel_algo(int *algo);
-
-
-
-#ifdef __cplusplus
- }
-#endif
-
-
-#endif
diff --git a/src/include/gromacs/external/tng_io/include/compression/vals16.h b/src/include/gromacs/external/tng_io/include/compression/vals16.h
deleted file mode 100644 (file)
index ba1b8fb..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/* This code is part of the tng compression routines.
- *
- * Written by Daniel Spangberg
- * Copyright (c) 2010, 2013, The GROMACS development team.
- *
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the Revised BSD License.
- */
-
-
-#ifndef VALS16_H
-#define VALS16_H
-
-void Ptngc_comp_conv_to_vals16(unsigned int *vals, const int nvals,
-                               unsigned int *vals16, int *nvals16);
-
-void Ptngc_comp_conv_from_vals16(unsigned int *vals16, const int nvals16,
-                                 unsigned int *vals, int *nvals);
-
-#endif
diff --git a/src/include/gromacs/external/tng_io/include/compression/warnmalloc.h b/src/include/gromacs/external/tng_io/include/compression/warnmalloc.h
deleted file mode 100644 (file)
index aa63111..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/* This code is part of the tng compression routines.
- *
- * Written by Daniel Spangberg
- * Copyright (c) 2010, 2013, The GROMACS development team.
- *
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the Revised BSD License.
- */
-
-
-#ifndef WARNMALLOC_H
-#define WARNMALLOC_H
-
-#include "../compression/tng_compress.h"
-
-void DECLSPECDLLEXPORT *Ptngc_warnmalloc_x(const size_t size, char *file, const int line);
-
-#define warnmalloc(size) Ptngc_warnmalloc_x(size,__FILE__,__LINE__)
-
-void DECLSPECDLLEXPORT *Ptngc_warnrealloc_x(void *old, const size_t size, char *file, const int line);
-
-#define warnrealloc(old,size) Ptngc_warnrealloc_x(old,size,__FILE__,__LINE__)
-
-
-#endif
diff --git a/src/include/gromacs/external/tng_io/include/compression/widemuldiv.h b/src/include/gromacs/external/tng_io/include/compression/widemuldiv.h
deleted file mode 100644 (file)
index dfa905b..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/* This code is part of the tng compression routines.
- *
- * Written by Daniel Spangberg
- * Copyright (c) 2010, 2013, The GROMACS development team.
- *
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the Revised BSD License.
- */
-
-
-#ifndef WIDEMULDIV_H
-#define WIDEMULDIV_H
-
-/* Add a unsigned int to a largeint. */
-void Ptngc_largeint_add(const unsigned int v1, unsigned int *largeint, const int n);
-
-/* Multiply v1 with largeint_in and return result in largeint_out */
-void Ptngc_largeint_mul(const unsigned int v1, unsigned int *largeint_in, unsigned int *largeint_out, const int n);
-
-/* Return the remainder from dividing largeint_in with v1. Result of the division is returned in largeint_out */
-unsigned int Ptngc_largeint_div(const unsigned int v1, unsigned int *largeint_in, unsigned int *largeint_out, const int n);
-
-#endif
diff --git a/src/include/gromacs/external/tng_io/include/tng/md5.h b/src/include/gromacs/external/tng_io/include/tng/md5.h
deleted file mode 100644 (file)
index 80fbf6c..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-
-/* This file has been modified in the TNG library distribution. Modifications
- * are marked below. */
-
-/*
-  Copyright (C) 1999, 2002 Aladdin Enterprises.  All rights reserved.
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-  L. Peter Deutsch
-  ghost@aladdin.com
-
- */
-/*
-  Independent implementation of MD5 (RFC 1321).
-
-  This code implements the MD5 Algorithm defined in RFC 1321, whose
-  text is available at
-       http://www.ietf.org/rfc/rfc1321.txt
-  The code is derived from the text of the RFC, including the test suite
-  (section A.5) but excluding the rest of Appendix A.  It does not include
-  any code or documentation that is identified in the RFC as being
-  copyrighted.
-
-  The original and principal author of md5.h is L. Peter Deutsch
-  <ghost@aladdin.com>.  Other authors are noted in the change history
-  that follows (in reverse chronological order):
-
-  2002-04-13 lpd Removed support for non-ANSI compilers; removed
-       references to Ghostscript; clarified derivation from RFC 1321;
-       now handles byte order either statically or dynamically.
-  1999-11-04 lpd Edited comments slightly for automatic TOC extraction.
-  1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5);
-       added conditionalization for C++ compilation from Martin
-       Purschke <purschke@bnl.gov>.
-  1999-05-03 lpd Original version.
- */
-
-#ifndef md5_INCLUDED
-#  define md5_INCLUDED
-
-
-/*
- * This package supports both compile-time and run-time determination of CPU
- * byte order.  If ARCH_IS_BIG_ENDIAN is defined as 0, the code will be
- * compiled to run only on little-endian CPUs; if ARCH_IS_BIG_ENDIAN is
- * defined as non-zero, the code will be compiled to run only on big-endian
- * CPUs; if ARCH_IS_BIG_ENDIAN is not defined, the code will be compiled to
- * run on either big- or little-endian CPUs, but will run slightly less
- * efficiently on either one than if ARCH_IS_BIG_ENDIAN is defined.
- */
-
-typedef unsigned char md5_byte_t; /* 8-bit byte */
-typedef unsigned int md5_word_t; /* 32-bit word */
-
-/* Define the state of the MD5 Algorithm. */
-typedef struct md5_state_s {
-    md5_word_t count[2];       /* message length in bits, lsw first */
-    md5_word_t abcd[4];                /* digest buffer */
-    md5_byte_t buf[64];                /* accumulate block */
-} md5_state_t;
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/* The USE_WINDOWS define below was added in TNG library distribution of this
- * file in order to compile properly in MSVC */
-#ifndef USE_WINDOWS
-#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
-#define USE_WINDOWS
-#endif /* win32... */
-#endif /* not defined USE_WINDOWS */
-
-/* The DECLSPECDLLEXPORT define below was added in the TNG library distribution
- * of this file. It is also used in the function declarations. */
-#ifndef DECLSPECDLLEXPORT
-#ifdef USE_WINDOWS
-#define DECLSPECDLLEXPORT __declspec(dllexport)
-#else /* USE_WINDOWS */
-#define DECLSPECDLLEXPORT
-#endif /* USE_WINDOWS */
-#endif /* DECLSPECDLLEXPORT */
-
-/* Initialize the algorithm. */
-void DECLSPECDLLEXPORT md5_init(md5_state_t *pms);
-
-/* Append a string to the message. */
-void DECLSPECDLLEXPORT md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes);
-
-/* Finish the message and return the digest. */
-void DECLSPECDLLEXPORT md5_finish(md5_state_t *pms, md5_byte_t digest[16]);
-
-#ifdef __cplusplus
-}  /* end extern "C" */
-#endif
-
-#endif /* md5_INCLUDED */
diff --git a/src/include/gromacs/external/tng_io/include/tng/tng_io.h b/src/include/gromacs/external/tng_io/include/tng/tng_io.h
deleted file mode 100644 (file)
index 167cca6..0000000
+++ /dev/null
@@ -1,4961 +0,0 @@
-/* This code is part of the tng binary trajectory format.
- *
- * Written by Magnus Lundborg
- * Copyright (c) 2012-2017, The GROMACS development team.
- * Check out http://www.gromacs.org for more information.
- *
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the Revised BSD License.
- */
-
-/** @file tng_io.h
- *  @brief API for input and output of tng trajectory files
- *  @mainpage TNG: A flexible binary trajectory format
- *  @section intro_sec Introduction
- *
- * The TNG format is developed as part of the ScalaLife EU project.
- * It is flexible by design to allow parallel writing, custom data blocks,
- * different output frequencies and different compression algorithms.
- *
- * Each block can contain MD5 hashes to verify data integrity and the file
- * can be signed by the user to ensure that the origin is correct.
- *
- * The intention is that the API and ABI should be stable, but it is
- * still possible that future changes might make that impossible, in which
- * case that will be clarified.
- *
- * The API and all examples are released without any warranties. Use them at
- * your own risk.
- *
- * @section authors_sec Authors
- *
- * The TNG trajectory format is developed by:
- *
- * Magnus Lundborg magnus.lundborg@scilifelab.se
- *
- * Daniel Spångberg daniels@mkem.uu.se
- *
- * Rossen Apostolov rossen@kth.se
- *
- * The API is implemented mainly by:
- *
- * Magnus Lundborg
- *
- * @section License
- *
- * Copyright (c) 2012, The GROMACS development team.
- * check out http://www.gromacs.org for more information.
- *
- * The TNG API is released under the Revised BSD License and is free to
- * redistribute according to that license.
- *
- * A license file (named COPYING) should be included with each copy of the API.
- *
- * @section install_sec Installation
- *
- * \code
- * mkdir build
- *
- * cd build
- *
- * cmake ..
- *
- * make
- *
- * make install
- * \endcode
- * Test by running:
- * \code
- * bin/tests/tng_testing
- * \endcode
- *
- * @section change_sec Change Log
- *
- * See git log for full revision history.
- *
- * Revisions
- * 
- * v. 1.8 - Added GROMACS energy block IDs.
- *        - Rewritten build system for the main library.
- *        - Added block ID for atom (or generic particle) mass.
- *        - Fixed bugs, such as:
- *           - Do not switch endianness when reading and writing TNG compressed data.
- *           - Update pointers to residues in the chain when writing multiple chains in one molecule.
- *           - Update frame set pointers when appending to file.
- *
- * v. 1.7 - Fifth stable release of the API
- *
- *        - Added function tng_util_num_frames_with_data_of_block_id_get().
- *        - Merged some functions and data structures
- *          to make less difference between data blocks.
- *        - Bugs fixed
- *
- * v. 1.6 - Fourth stable release of the API.
- *
- *        - Removed OpenMP option when building.
- *        - Functionality for migrating data blocks.
- *        - Improved handling of molecules.
- *        - Improved installation of TNG documentation.
- *        - Enhancements to CMake usage.
- *        - Required CMake version raised to 2.8.8.
- *        - Bugs fixed.
- *
- * v. 1.5 - Third stable release of the API.
- *
- *        - Fortran wrapper split into separate file
- *        - Added more block IDs.
- *        - Some new functions and utility functions added.
- *        - Improved compression precision settings.
- *        - Improved tests.
- *        - Make appending to file work better.
- *        - Modified CMake settings
- *        - Bugs fixed
- *
- * v. 1.4 - Changed from LGPL to the Revised BSD License.
- *
- *        - More flexible support for digital signatures in header.
- *        - Block ID numbers changed.
- *
- * v. 1.3 - Second stable release of the API.
- *
- *      - Added multiplication factor for coordinate units to general info.
- *      - Added time stamps and time per frame in frame sets.
- *      - High-level API functions added (not for managing molecules yet)
- *      - Added functions for reading data blocks into 1D arrays.
- *      - TNG compression added.
- *      - C++ interface added.
- *      - Avoid memory allocation if no data is submitted when adding data
- *        blocks.
- *      - Added function tng_num_frames_per_frame_set_set
- *      - Added data block IDs for charges, b-factors and occupancy.
- *      - GZIP compression added.
- *      - Fixed bug when updating MD5 hashes of data blocks.
- *      - Fixed bug in chain_name_of_particle_get(...)
- *      - Update frame set pointers properly.
- *      - Moved fortran wrapper from header file to source file.
- *      - Write sparse data in mdrun examples.
- *      - Fixed bugs related to reading and writing sparse data.
- *      - Fixed memory leak for non-trajectory particle data blocks.
- *      - Fixed bug when writing data blocks.
- *      - Fixed wrong values in dependency constants
- *      - Write box shape, partial charges and annotation data in tng_testing
- *      - Bug fixes in tng_testing (frame sets not written before)
- *
- * v. 1.0 - First stable release of the API.
- *
- *
- * @section examples_sec Examples
- *
- * There are some examples of how to use the library located in src/tests/
- *
- * @subsection tng_subsec TNG files
- *
- * The build directory contains an example_files directory, which in turn
- * contains a very short example of a TNG file containing a few water molecules,
- * a box shape description and positions in 10 frames.
- *
- * It is also possible to run the bin/examples/md_openmp_util
- * (see src/tests/md_openmp_util.c)
- * testing program, which will save MD simulations output to a new file
- * (saved in the example_files directory).
- *
- * These files can be read using the bin/examples/tng_io_read_pos_util
- * program.
- *
- * @subsection c_subsec C
- *
- * Example writing data to a TNG file (just an excerpt):
- * \code
- *     for ( step = 1; step < step_num; step++ )
- *     {
- *         compute ( np, nd, pos, vel, mass, force, &potential, &kinetic );
- *
- *         if(step % step_save == 0)
- *         {
- *             // Write positions, velocities and forces
- *             if(tng_util_pos_write(traj, step, pos) != TNG_SUCCESS)
- *             {
- *                 printf("Error adding data. %s: %d\n", __FILE__, __LINE__);
- *                 break;
- *             }
- *             if(tng_util_vel_write(traj, step, vel) != TNG_SUCCESS)
- *             {
- *                 printf("Error adding data. %s: %d\n", __FILE__, __LINE__);
- *                 break;
- *             }
- *             if(tng_util_force_write(traj, step, force) != TNG_SUCCESS)
- *             {
- *                 printf("Error adding data. %s: %d\n", __FILE__, __LINE__);
- *                 break;
- *             }
- *         }
- *         update ( np, nd, pos, vel, force, acc, mass, dt );
- *     }
- * \endcode
- *
- * Example reading positions from a TNG file:
- * \code
- * #include <stdlib.h>
- * #include <stdio.h>
- * #include "tng/tng_io.h"
- *
- * int main(int argc, char **argv)
- * {
- *     tng_trajectory_t traj;
- *     // Assume that the data is stored as floats. The data is placed in 1-D
- *     // arrays
- *     float *positions = 0, *box_shape = 0;
- *     int64_t n_particles, n_frames, tot_n_frames, stride_length, i, j;
- *     // Set a default frame range
- *     int64_t first_frame = 0, last_frame = 5000;
- *     int k;
- *
- *     // A reference must be passed to allocate memory
- *     tng_util_trajectory_open(argv[1], 'r', &traj);
- *
- *     if(tng_num_frames_get(traj, &tot_n_frames) != TNG_SUCCESS)
- *     {
- *         printf("Cannot determine the number of frames in the file\n");
- *         tng_util_trajectory_close(&traj);
- *         exit(1);
- *     }
- *
- *     if(tng_num_particles_get(traj, &n_particles) != TNG_SUCCESS)
- *     {
- *         printf("Cannot determine the number of particles in the file\n");
- *         tng_util_trajectory_close(&traj);
- *         exit(1);
- *     }
- *
- *     printf("%"PRId64" frames in file\n", tot_n_frames);
- *
- *     if(last_frame > tot_n_frames - 1)
- *     {
- *         last_frame = tot_n_frames - 1;
- *     }
- *
- *     if(tng_util_box_shape_read(traj, &box_shape, &stride_length) ==
- *         TNG_SUCCESS)
- *     {
- *         printf("Simulation box shape: ");
- *         for(i=0; i < 9; i++)
- *         {
- *             printf("%f ", box_shape[i]);
- *         }
- *         printf("\n");
- *     }
- *     else
- *     {
- *         printf("Simulation box shape not set in the file (or could not be read)\n");
- *     }
- *
- *     n_frames = last_frame - first_frame + 1;
- *
- *
- *     // Get the positions of all particles in the requested frame range.
- *     // The positions are stored in the positions array.
- *     // N.B. No proper error checks.
- *     if(tng_util_pos_read_range(traj, 0, last_frame, &positions, &stride_length)
- *        == TNG_SUCCESS)
- *     {
- *         // Print the positions of the wanted particle (zero based)
- *         for(i=0; i < n_frames; i += stride_length)
- *         {
- *             printf("\nFrame %"PRId64":\n", first_frame + i);
- *             for(j=0; j < n_particles; j++)
- *             {
- *                 printf("Atom nr: %"PRId64"", j);
- *                 for(k=0; k < 3; k++)
- *                 {
- *                     printf("\t%f", positions[i/stride_length*n_particles*
- *                                              3+j*3+k]);
- *                 }
- *                 printf("\n");
- *             }
- *         }
- *     }
- *     else
- *     {
- *         printf("Cannot read positions\n");
- *     }
- *
- *     // Free memory
- *     if(positions)
- *     {
- *         free(positions);
- *     }
- *     tng_util_trajectory_close(&traj);
- *
- *     return(0);
- * }
- *
- * \endcode
- *
- * @subsection fortran_subsec Fortran
- *
- * The TNG library can be used from Fortran. It requires cray pointers, which
- * are not part of the Fortran 77 standard, but available in most compilers.
- *
- * To compile the fortran example -DTNG_BUILD_FORTRAN=ON needs to be specified when
- * running cmake.
- *
- */
-
-#ifndef TNG_IO_H
-#define TNG_IO_H     1
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include "tng_io_fwd.h"
-
-#ifdef USE_STD_INTTYPES_H
-#include <inttypes.h>
-#else
-/* Visual Studio does not contain inttypes.h and stdint.h. Some defines and
- * typedefs are used from the GNU C Library */
-#ifdef _MSC_VER
-
-typedef __int32 int32_t;
-typedef unsigned __int32 uint32_t;
-typedef __int64 int64_t;
-typedef unsigned __int64 uint64_t;
-
-#else
-#include <stdint.h>
-#endif /* _MSC_VER */
-
-/* This is from inttypes.h  (GNU C Library) */
-/* The ISO C99 standard specifies that these macros must only be
-   defined if explicitly requested.  */
-#if !defined __cplusplus || defined __STDC_FORMAT_MACROS
-
-# if __WORDSIZE == 64
-#  define __PRI64_PREFIX        "l"
-#  define __PRIPTR_PREFIX       "l"
-# else
-#  define __PRI64_PREFIX        "ll"
-#  define __PRIPTR_PREFIX
-# endif
-
-/* From stdint.h (GNU C Library) */
-/* Macros for printing format specifiers. */
-/* Decimal notation.  */
-#ifndef PRId64
-# define PRId64         __PRI64_PREFIX "d"
-#endif
-
-#ifndef PRIu64
-# define PRIu64         __PRI64_PREFIX "u"
-#endif
-
-#ifndef PRIuPTR
-# define PRIuPTR         __PRIPTR_PREFIX "u"
-#endif
-
-#endif
-
-#endif /* USE_STD_INTTYPES_H */
-
-#ifndef USE_WINDOWS
-#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
-#define USE_WINDOWS
-#endif /* win32... */
-#endif /* not defined USE_WINDOWS */
-
-#ifndef DECLSPECDLLEXPORT
-#ifdef USE_WINDOWS
-#define DECLSPECDLLEXPORT __declspec(dllexport)
-#else /* USE_WINDOWS */
-#define DECLSPECDLLEXPORT
-#endif /* USE_WINDOWS */
-#endif /* DECLSPECDLLEXPORT */
-
-/** Flag to indicate frame dependent data. */
-#define TNG_FRAME_DEPENDENT 1
-/** Flag to indicate particle dependent data. */
-#define TNG_PARTICLE_DEPENDENT 2
-
-/** The maximum length of a date string */
-#define TNG_MAX_DATE_STR_LEN 24
-/** The length of an MD5 hash */
-#define TNG_MD5_HASH_LEN 16
-/** The maximum allowed length of a string */
-#define TNG_MAX_STR_LEN 1024
-
-#ifndef NDEBUG
-#define TNG_ASSERT(cnd, msg) if(!(cnd)) {printf("%s\n", msg); assert(cnd);}
-#else
-#define TNG_ASSERT(cnd, msg) (void)0;
-#endif
-
-/** Flag to specify the endianness of a TNG file */
-typedef enum {TNG_BIG_ENDIAN,
-              TNG_LITTLE_ENDIAN} tng_file_endianness;
-
-/** Flag to specify the endianness of 32 bit values of the current architecture. */
-typedef enum {TNG_BIG_ENDIAN_32,
-              TNG_LITTLE_ENDIAN_32,
-              TNG_BYTE_PAIR_SWAP_32} tng_endianness_32;
-
-/** Flag to specify the endianness of 64 bit values of the current architecture. */
-typedef enum {TNG_BIG_ENDIAN_64,
-              TNG_LITTLE_ENDIAN_64,
-              TNG_QUAD_SWAP_64,
-              TNG_BYTE_PAIR_SWAP_64,
-              TNG_BYTE_SWAP_64} tng_endianness_64;
-
-/** Compression mode is specified in each data block */
-typedef enum {TNG_UNCOMPRESSED,
-              TNG_XTC_COMPRESSION,
-              TNG_TNG_COMPRESSION,
-              TNG_GZIP_COMPRESSION} tng_compression;
-
-/** Hash types */
-typedef enum {TNG_NO_HASH,
-              TNG_MD5,
-              TNG_SHA256} tng_hash_type;
-
-/** Non trajectory blocks come before the first frame set block */
-typedef enum {TNG_NON_TRAJECTORY_BLOCK, TNG_TRAJECTORY_BLOCK} tng_block_type;
-
-/** @defgroup def1 Standard non-trajectory blocks
- *  Block IDs of standard non-trajectory blocks.
- * @{
- */
-#define TNG_GENERAL_INFO                0x0000000000000000LL
-#define TNG_MOLECULES                   0x0000000000000001LL
-#define TNG_TRAJECTORY_FRAME_SET        0x0000000000000002LL
-#define TNG_PARTICLE_MAPPING            0x0000000000000003LL
-/** @} */
-
-/** @defgroup def2 Standard trajectory blocks
- * Block IDs of standard trajectory blocks. Box shape and partial charges can
- * be either trajectory blocks or non-trajectory blocks
- * @{
- */
-#define TNG_TRAJ_BOX_SHAPE              0x0000000010000000LL
-#define TNG_TRAJ_POSITIONS              0x0000000010000001LL
-#define TNG_TRAJ_VELOCITIES             0x0000000010000002LL
-#define TNG_TRAJ_FORCES                 0x0000000010000003LL
-#define TNG_TRAJ_PARTIAL_CHARGES        0x0000000010000004LL
-#define TNG_TRAJ_FORMAL_CHARGES         0x0000000010000005LL
-#define TNG_TRAJ_B_FACTORS              0x0000000010000006LL
-#define TNG_TRAJ_ANISOTROPIC_B_FACTORS  0x0000000010000007LL
-#define TNG_TRAJ_OCCUPANCY              0x0000000010000008LL
-#define TNG_TRAJ_GENERAL_COMMENTS       0x0000000010000009LL
-#define TNG_TRAJ_MASSES                 0x0000000010000010LL
-/** @} */
-
-
-/** @defgroup def3 GROMACS data block IDs
- *  Block IDs of data blocks specific to GROMACS.
- * @{
- */
-#define TNG_GMX_LAMBDA                  0x1000000010000000LL
-#define TNG_GMX_ENERGY_ANGLE            0x1000000010000001LL
-#define TNG_GMX_ENERGY_RYCKAERT_BELL    0x1000000010000002LL
-#define TNG_GMX_ENERGY_LJ_14            0x1000000010000003LL
-#define TNG_GMX_ENERGY_COULOMB_14       0x1000000010000004LL
-#define TNG_GMX_ENERGY_LJ_(SR)          0x1000000010000005LL
-#define TNG_GMX_ENERGY_COULOMB_(SR)     0x1000000010000006LL
-#define TNG_GMX_ENERGY_COUL_RECIP       0x1000000010000007LL
-#define TNG_GMX_ENERGY_POTENTIAL        0x1000000010000008LL
-#define TNG_GMX_ENERGY_KINETIC_EN       0x1000000010000009LL
-#define TNG_GMX_ENERGY_TOTAL_ENERGY     0x1000000010000010LL
-#define TNG_GMX_ENERGY_TEMPERATURE      0x1000000010000011LL
-#define TNG_GMX_ENERGY_PRESSURE         0x1000000010000012LL
-#define TNG_GMX_ENERGY_CONSTR_RMSD      0x1000000010000013LL
-#define TNG_GMX_ENERGY_CONSTR2_RMSD     0x1000000010000014LL
-#define TNG_GMX_ENERGY_BOX_X            0x1000000010000015LL
-#define TNG_GMX_ENERGY_BOX_Y            0x1000000010000016LL
-#define TNG_GMX_ENERGY_BOX_Z            0x1000000010000017LL
-#define TNG_GMX_ENERGY_BOXXX            0x1000000010000018LL
-#define TNG_GMX_ENERGY_BOXYY            0x1000000010000019LL
-#define TNG_GMX_ENERGY_BOXZZ            0x1000000010000020LL
-#define TNG_GMX_ENERGY_BOXYX            0x1000000010000021LL
-#define TNG_GMX_ENERGY_BOXZX            0x1000000010000022LL
-#define TNG_GMX_ENERGY_BOXZY            0x1000000010000023LL
-#define TNG_GMX_ENERGY_BOXVELXX         0x1000000010000024LL
-#define TNG_GMX_ENERGY_BOXVELYY         0x1000000010000025LL
-#define TNG_GMX_ENERGY_BOXVELZZ         0x1000000010000026LL
-#define TNG_GMX_ENERGY_BOXVELYX         0x1000000010000027LL
-#define TNG_GMX_ENERGY_BOXVELZX         0x1000000010000028LL
-#define TNG_GMX_ENERGY_BOXVELZY         0x1000000010000029LL
-#define TNG_GMX_ENERGY_VOLUME           0x1000000010000030LL
-#define TNG_GMX_ENERGY_DENSITY          0x1000000010000031LL
-#define TNG_GMX_ENERGY_PV               0x1000000010000032LL
-#define TNG_GMX_ENERGY_ENTHALPY         0x1000000010000033LL
-#define TNG_GMX_ENERGY_VIR_XX           0x1000000010000034LL
-#define TNG_GMX_ENERGY_VIR_XY           0x1000000010000035LL
-#define TNG_GMX_ENERGY_VIR_XZ           0x1000000010000036LL
-#define TNG_GMX_ENERGY_VIR_YX           0x1000000010000037LL
-#define TNG_GMX_ENERGY_VIR_YY           0x1000000010000038LL
-#define TNG_GMX_ENERGY_VIR_YZ           0x1000000010000039LL
-#define TNG_GMX_ENERGY_VIR_ZX           0x1000000010000040LL
-#define TNG_GMX_ENERGY_VIR_ZY           0x1000000010000041LL
-#define TNG_GMX_ENERGY_VIR_ZZ           0x1000000010000042LL
-#define TNG_GMX_ENERGY_SHAKEVIR_XX      0x1000000010000043LL
-#define TNG_GMX_ENERGY_SHAKEVIR_XY      0x1000000010000044LL
-#define TNG_GMX_ENERGY_SHAKEVIR_XZ      0x1000000010000045LL
-#define TNG_GMX_ENERGY_SHAKEVIR_YX      0x1000000010000046LL
-#define TNG_GMX_ENERGY_SHAKEVIR_YY      0x1000000010000047LL
-#define TNG_GMX_ENERGY_SHAKEVIR_YZ      0x1000000010000048LL
-#define TNG_GMX_ENERGY_SHAKEVIR_ZX      0x1000000010000049LL
-#define TNG_GMX_ENERGY_SHAKEVIR_ZY      0x1000000010000050LL
-#define TNG_GMX_ENERGY_SHAKEVIR_ZZ      0x1000000010000051LL
-#define TNG_GMX_ENERGY_FORCEVIR_XX      0x1000000010000052LL
-#define TNG_GMX_ENERGY_FORCEVIR_XY      0x1000000010000053LL
-#define TNG_GMX_ENERGY_FORCEVIR_XZ      0x1000000010000054LL
-#define TNG_GMX_ENERGY_FORCEVIR_YX      0x1000000010000055LL
-#define TNG_GMX_ENERGY_FORCEVIR_YY      0x1000000010000056LL
-#define TNG_GMX_ENERGY_FORCEVIR_YZ      0x1000000010000057LL
-#define TNG_GMX_ENERGY_FORCEVIR_ZX      0x1000000010000058LL
-#define TNG_GMX_ENERGY_FORCEVIR_ZY      0x1000000010000059LL
-#define TNG_GMX_ENERGY_FORCEVIR_ZZ      0x1000000010000060LL
-#define TNG_GMX_ENERGY_PRES_XX          0x1000000010000061LL
-#define TNG_GMX_ENERGY_PRES_XY          0x1000000010000062LL
-#define TNG_GMX_ENERGY_PRES_XZ          0x1000000010000063LL
-#define TNG_GMX_ENERGY_PRES_YX          0x1000000010000064LL
-#define TNG_GMX_ENERGY_PRES_YY          0x1000000010000065LL
-#define TNG_GMX_ENERGY_PRES_YZ          0x1000000010000066LL
-#define TNG_GMX_ENERGY_PRES_ZX          0x1000000010000067LL
-#define TNG_GMX_ENERGY_PRES_ZY          0x1000000010000068LL
-#define TNG_GMX_ENERGY_PRES_ZZ          0x1000000010000069LL
-#define TNG_GMX_ENERGY_SURFXSURFTEN     0x1000000010000070LL
-#define TNG_GMX_ENERGY_MUX              0x1000000010000071LL
-#define TNG_GMX_ENERGY_MUY              0x1000000010000072LL
-#define TNG_GMX_ENERGY_MUZ              0x1000000010000073LL
-#define TNG_GMX_ENERGY_VCOS             0x1000000010000074LL
-#define TNG_GMX_ENERGY_VISC             0x1000000010000075LL
-#define TNG_GMX_ENERGY_BAROSTAT         0x1000000010000076LL
-#define TNG_GMX_ENERGY_T_SYSTEM         0x1000000010000077LL
-#define TNG_GMX_ENERGY_LAMB_SYSTEM      0x1000000010000078LL
-#define TNG_GMX_SELECTION_GROUP_NAMES   0x1000000010000079LL
-#define TNG_GMX_ATOM_SELECTION_GROUP    0x1000000010000080LL
-/** @} */
-
-/** Flag to specify if a data block contains data related to particles or not.*/
-typedef enum {TNG_NON_PARTICLE_BLOCK_DATA,
-              TNG_PARTICLE_BLOCK_DATA} tng_particle_dependency;
-
-
-typedef enum {TNG_FALSE, TNG_TRUE} tng_bool;
-
-/** Flag to specify if the number of atoms change throughout the trajectory or
- *  if it is constant. */
-typedef enum {TNG_CONSTANT_N_ATOMS, TNG_VARIABLE_N_ATOMS}
-             tng_variable_n_atoms_flag;
-
-/** Return values of API functions. TNG_SUCCESS means that the operation
- *  was successful. TNG_FAILURE means that the operation failed for some
- *  reason, but it is possible to try to continue anyhow. TNG_CRITICAL
- *  means that the error is irrecoverable. */
-typedef enum {TNG_SUCCESS, TNG_FAILURE, TNG_CRITICAL} tng_function_status;
-
-/** If tng_hash_mode == TNG_USE_HASH md5 hashes will be written to output files
- *  and when reading a file the md5 hashes of the contents will be compared to
- *  those in the file (for each block) in order to ensure data integrity */
-typedef enum {TNG_SKIP_HASH, TNG_USE_HASH} tng_hash_mode;
-
-/** Possible formats of data block contents */
-typedef enum {TNG_CHAR_DATA,
-              TNG_INT_DATA,
-              TNG_FLOAT_DATA,
-              TNG_DOUBLE_DATA} tng_data_type;
-
-
-struct tng_trajectory;
-struct tng_molecule;
-struct tng_chain;
-struct tng_residue;
-struct tng_atom;
-struct tng_bond;
-struct tng_gen_block;
-struct tng_particle_mapping;
-struct tng_trajectory_frame_set;
-struct tng_particle_data;
-struct tng_non_particle_data;
-
-/** Data can be either double, float, int or a string */
-union data_values {
-    double d;
-    float f;
-    int64_t i;
-    char *c;
-};
-
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/** @defgroup group1 Low-level API
- *  These functions give detailed control of the TNG data management. Most
- *  things can be done using the more convenient high-level API functions
- *  instead.
- *  @{
- */
-
-/**
- * @brief Get the major version of the TNG library.
- * @param tng_data is a trajectory data container, it does not have
- * to be initialized beforehand.
- * @param version is pointing to a value set to the major version of
- * the library.
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_version_major
-                (const tng_trajectory_t tng_data,
-                 int *version);
-
-/**
- * @brief Get the minor version of the TNG library.
- * @param tng_data is a trajectory data container, it does not have
- * to be initialized beforehand.
- * @param version is pointing to a value set to the minor version of
- * the library.
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_version_minor
-                (const tng_trajectory_t tng_data,
-                 int *version);
-
-/**
- * @brief Get the patch level of the TNG library.
- * @param tng_data is a trajectory data container, it does not have
- * to be initialized beforehand.
- * @param patch_level is the string to fill with the full version,
- * memory must be allocated before.
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_version_patchlevel
-                (const tng_trajectory_t tng_data,
-                 int *patch_level);
-
-/**
- * @brief Get the full version string of the TNG library.
- * @param tng_data is a trajectory data container, it does not have
- * to be initialized beforehand.
- * @param version is pointing to a value set to the major version of
- * the library.
- * @param max_len maximum char length of the string, i.e. how much memory has
- * been reserved for version. This includes \0 terminating character.
- * @pre \code version != 0 \endcode The pointer to the name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_version
-                (const tng_trajectory_t tng_data,
-                 char *version,
-                 const int max_len);
-
-/**
- * @brief Setup a trajectory data container.
- * @param tng_data_p a pointer to memory to initialise as a trajectory.
- * @pre tng_data_p must not be pointing at a reserved memory block.
- * @details Memory is allocated during initialisation.
- * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
- * error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_trajectory_init
-                (tng_trajectory_t *tng_data_p);
-
-/**
- * @brief Clean up a trajectory data container.
- * @param tng_data_p a pointer to the trajectory data to destroy.
- * @details All allocated memory in the data structure is freed, as well as
- * tng_data_p itself.
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_trajectory_destroy
-                (tng_trajectory_t *tng_data_p);
-
-/**
- * @brief Copy a trajectory data container (dest is setup as well).
- * @details This initialises dest and copies only what is absolute necessary for
- * parallel i/o. This can be used inside pragma omp for setting up a thread
- * local copy of src. It can be freed (using tng_trajectory_destroy) at the
- * end of the parallel block.
- * @param src the original trajectory.
- * @param dest_p a pointer to memory to initialise as a trajectory.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre tng_data_p must not be pointing at a reserved memory block.
- * @details Memory is allocated during initialisation.
- * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
- * error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_trajectory_init_from_src
-                (const tng_trajectory_t src, tng_trajectory_t *dest_p);
-
-/**
- * @brief Get the name of the input file.
- * @param tng_data the trajectory of which to get the input file name.
- * @param file_name the string to fill with the name of the input file,
- * memory must be allocated before.
- * @param max_len maximum char length of the string, i.e. how much memory has
- * been reserved for file_name. This includes \0 terminating character.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code file_name != 0 \endcode The pointer to the file name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred (source string longer than destination string).
- */
-tng_function_status DECLSPECDLLEXPORT tng_input_file_get
-                (const tng_trajectory_t tng_data,
-                 char *file_name, const int max_len);
-
-/**
- * @brief Set the name of the input file.
- * @param tng_data the trajectory of which to set the input file name.
- * @param file_name the name of the input file.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code file_name != 0 \endcode The pointer to the file name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
- * error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_input_file_set
-                (const tng_trajectory_t tng_data,
-                 const char *file_name);
-
-/**
- * @brief Get the name of the output file.
- * @param tng_data the trajectory of which to get the input file name.
- * @param file_name the string to fill with the name of the output file,
- * memory must be allocated before.
- * @param max_len maximum char length of the string, i.e. how much memory has
- * been reserved for file_name. This includes \0 terminating character.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code file_name != 0 \endcode The pointer to the file name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred (source string longer than destination string).
- */
-tng_function_status DECLSPECDLLEXPORT tng_output_file_get
-                (const tng_trajectory_t tng_data,
-                 char *file_name, const int max_len);
-
-/**
- * @brief Set the name of the output file.
- * @param tng_data the trajectory of which to set the output file name.
- * @param file_name the name of the output file.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code file_name != 0 \endcode The pointer to the file name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
- * error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_output_file_set
-                (const tng_trajectory_t tng_data,
-                 const char *file_name);
-
-/**
- * @brief Set the name of the output file for appending. The output file
- * will not be overwritten.
- * @param tng_data the trajectory of which to set the output file name.
- * @param file_name the name of the output file to append to.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code file_name != 0 \endcode The pointer to the file name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
- * error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_output_append_file_set
-                (const tng_trajectory_t tng_data,
-                 const char *file_name);
-
-/**
- * @brief Get the endianness of the output file.
- * @param tng_data the trajectory of which to get the endianness of the current
- * output file.
- * @param endianness will contain the enumeration of the endianness.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code endianness != 0 \endcode The pointer to the endianness container
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful or TNG_FAILURE (1) if the endianness
- * could not be retrieved.
- */
-tng_function_status DECLSPECDLLEXPORT tng_output_file_endianness_get
-                (const tng_trajectory_t tng_data, tng_file_endianness *endianness);
-
-/**
- * @brief Set the endianness of the output file.
- * @param tng_data the trajectory of which to set the endianness of the current
- * output file.
- * @param endianness the enumeration of the endianness, can be either
- * TNG_BIG_ENDIAN (0) or TNG_LITTLE_ENDIAN (1).
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @details The endianness cannot be changed after file output has started.
- * @return TNG_SUCCESS (0) if successful or TNG_FAILURE (1) if the endianness
- * could not be set.
- */
-tng_function_status DECLSPECDLLEXPORT tng_output_file_endianness_set
-                (const tng_trajectory_t tng_data,
-                 const tng_file_endianness endianness);
-
-/**
- * @brief Get the name of the program used when creating the trajectory.
- * @param tng_data the trajectory of which to get the program name.
- * @param name the string to fill with the name of the program,
- * memory must be allocated before.
- * @param max_len maximum char length of the string, i.e. how much memory has
- * been reserved for name. This includes \0 terminating character.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code name != 0 \endcode The pointer to the name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred (source string longer than destination string).
- */
-tng_function_status DECLSPECDLLEXPORT tng_first_program_name_get
-                (const tng_trajectory_t tng_data,
-                 char *name, const int max_len);
-
-/**
- * @brief Set the name of the program used when creating the trajectory.
- * @param tng_data the trajectory of which to set the program name.
- * @param new_name is a string containing the wanted name.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code new_name != 0 \endcode The pointer to the new_name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
- * error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_first_program_name_set
-                (const tng_trajectory_t tng_data,
-                 const char *new_name);
-
-/**
- * @brief Get the name of the program used when last modifying the trajectory.
- * @param tng_data the trajectory of which to get the program name.
- * @param name the string to fill with the name of the program,
- * memory must be allocated before.
- * @param max_len maximum char length of the string, i.e. how much memory has
- * been reserved for name. This includes \0 terminating character.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code name != 0 \endcode The pointer to the name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred (source string longer than destination string).
- */
-tng_function_status DECLSPECDLLEXPORT tng_last_program_name_get
-                (const tng_trajectory_t tng_data,
-                 char *name, const int max_len);
-
-/**
- * @brief Set the name of the program used when last modifying the trajectory.
- * @param tng_data the trajectory of which to set the program name.
- * @param new_name is a string containing the wanted name.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code new_name != 0 \endcode The pointer to the new_name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
- * error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_last_program_name_set
-                (const tng_trajectory_t tng_data,
-                 const char *new_name);
-
-/**
- * @brief Get the name of the user who created the trajectory.
- * @param tng_data the trajectory of which to get the user name.
- * @param name the string to fill with the name of the user,
- * memory must be allocated before.
- * @param max_len maximum char length of the string, i.e. how much memory has
- * been reserved for name. This includes \0 terminating character.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code name != 0 \endcode The pointer to the name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred (source string longer than destination string).
- */
-tng_function_status DECLSPECDLLEXPORT tng_first_user_name_get
-                (const tng_trajectory_t tng_data,
-                 char *name, const int max_len);
-
-/**
- * @brief Set the name of the user who created the trajectory.
- * @param tng_data the trajectory of which to set the user name.
- * @param new_name is a string containing the wanted name.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code new_name != 0 \endcode The pointer to the new_name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
- * error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_first_user_name_set
-                (const tng_trajectory_t tng_data,
-                 const char *new_name);
-
-/**
- * @brief Get the name of the user who last modified the trajectory.
- * @param tng_data the trajectory of which to get the user name.
- * @param name the string to fill with the name of the user,
- * memory must be allocated before.
- * @param max_len maximum char length of the string, i.e. how much memory has
- * been reserved for name. This includes \0 terminating character.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code name != 0 \endcode The pointer to the name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred (source string longer than destination string).
- */
-tng_function_status DECLSPECDLLEXPORT tng_last_user_name_get
-                (const tng_trajectory_t tng_data,
-                 char *name, const int max_len);
-
-/**
- * @brief Set the name of the user who last modified the trajectory.
- * @param tng_data the trajectory of which to set the user name.
- * @param new_name is a string containing the wanted name.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code new_name != 0 \endcode The pointer to the new_name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
- * error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_last_user_name_set
-                (const tng_trajectory_t tng_data,
-                 const char *new_name);
-
-/**
- * @brief Get the name of the computer used when creating the trajectory.
- * @param tng_data the trajectory of which to get the computer name.
- * @param name the string to fill with the name of the computer,
- * memory must be allocated before.
- * @param max_len maximum char length of the string, i.e. how much memory has
- * been reserved for name. This includes \0 terminating character.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code name != 0 \endcode The pointer to the name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred (source string longer than destination string).
- */
-tng_function_status DECLSPECDLLEXPORT tng_first_computer_name_get
-                (const tng_trajectory_t tng_data,
-                 char *name, const int max_len);
-
-/**
- * @brief Set the name of the computer used when creating the trajectory.
- * @param tng_data the trajectory of which to set the computer name.
- * @param new_name is a string containing the wanted name.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code new_name != 0 \endcode The pointer to the new_name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
- * error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_first_computer_name_set
-                (const tng_trajectory_t tng_data,
-                 const char *new_name);
-
-/**
- * @brief Get the name of the computer used when last modifying the trajectory.
- * @param tng_data the trajectory of which to get the computer name.
- * @param name the string to fill with the name of the computer,
- * memory must be allocated before.
- * @param max_len maximum char length of the string, i.e. how much memory has
- * been reserved for name. This includes \0 terminating character.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code name != 0 \endcode The pointer to the name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred (source string longer than destination string).
- */
-tng_function_status DECLSPECDLLEXPORT tng_last_computer_name_get
-                (const tng_trajectory_t tng_data,
-                 char *name, const int max_len);
-
-/**
- * @brief Set the name of the computer used when last modifying the trajectory.
- * @param tng_data the trajectory of which to set the computer name.
- * @param new_name is a string containing the wanted name.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code new_name != 0 \endcode The pointer to the new_name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
- * error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_last_computer_name_set
-                (const tng_trajectory_t tng_data,
-                 const char *new_name);
-
-/**
- * @brief Get the pgp_signature of the user creating the trajectory.
- * @param tng_data the trajectory of which to get the computer name.
- * @param signature the string to fill with the signature,
- * memory must be allocated before.
- * @param max_len maximum char length of the string, i.e. how much memory has
- * been reserved for name. This includes \0 terminating character.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code signature != 0 \endcode The pointer to the signature
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred (source string longer than destination string).
- */
-tng_function_status DECLSPECDLLEXPORT tng_first_signature_get
-                (const tng_trajectory_t tng_data,
-                 char *signature, const int max_len);
-
-/**
- * @brief Set the pgp_signature of the user creating the trajectory.
- * @param tng_data the trajectory of which to set the computer name.
- * @param signature is a string containing the pgp_signature.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code signature != 0 \endcode The pointer to the signature
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
- * error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_first_signature_set
-                (const tng_trajectory_t tng_data,
-                 const char *signature);
-
-/**
- * @brief Get the pgp_signature of the user last modifying the trajectory.
- * @param tng_data the trajectory of which to get the computer name.
- * @param signature the string to fill with the signature,
- * memory must be allocated before.
- * @param max_len maximum char length of the string, i.e. how much memory has
- * been reserved for name. This includes \0 terminating character.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code signature != 0 \endcode The pointer to the signature
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred (source string longer than destination string).
- */
-tng_function_status DECLSPECDLLEXPORT tng_last_signature_get
-                (const tng_trajectory_t tng_data,
-                 char *signature, const int max_len);
-
-/**
- * @brief Set the pgp_signature of the user last modifying the trajectory.
- * @param tng_data the trajectory of which to set the computer name.
- * @param signature is a string containing the pgp_signature.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code signature != 0 \endcode The pointer to the signature
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
- * error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_last_signature_set
-                (const tng_trajectory_t tng_data,
-                 const char *signature);
-
-/**
- * @brief Get the name of the forcefield used in the trajectory.
- * @param tng_data the trajectory of which to get the forcefield name.
- * @param name the string to fill with the name of the forcefield,
- * memory must be allocated before.
- * @param max_len maximum char length of the string, i.e. how much memory has
- * been reserved for name. This includes \0 terminating character.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code name != 0 \endcode The pointer to the name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred (source string longer than destination string).
- */
-tng_function_status DECLSPECDLLEXPORT tng_forcefield_name_get
-                (const tng_trajectory_t tng_data,
-                 char *name, const int max_len);
-
-/**
- * @brief Set the name of the forcefield used in the trajectory.
- * @param tng_data the trajectory of which to set the forcefield name.
- * @param new_name is a string containing the wanted name.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code new_name != 0 \endcode The pointer to the new_name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
- * error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_forcefield_name_set
-                (const tng_trajectory_t tng_data,
-                 const char *new_name);
-
-/**
- * @brief Get the medium stride length of the trajectory.
- * @param tng_data is the trajectory from which to get the stride length.
- * @param len is pointing to a value set to the stride length.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code len != 0 \endcode The pointer to len must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_medium_stride_length_get
-                (const tng_trajectory_t tng_data,
-                 int64_t *len);
-
-/**
- * @brief Set the medium stride length of the trajectory.
- * @param tng_data is the trajectory of which to set the stride length.
- * @param len is the wanted medium stride length.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred.
- */
-tng_function_status DECLSPECDLLEXPORT tng_medium_stride_length_set
-                (const tng_trajectory_t tng_data,
-                 const int64_t len);
-
-/**
- * @brief Get the long stride length of the trajectory.
- * @param tng_data is the trajectory from which to get the stride length.
- * @param len is pointing to a value set to the stride length.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code len != 0 \endcode The pointer to len must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_long_stride_length_get
-                (const tng_trajectory_t tng_data,
-                 int64_t *len);
-
-/**
- * @brief Set the long stride length of the trajectory.
- * @param tng_data is the trajectory of which to set the stride length.
- * @param len is the wanted long stride length.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred.
- */
-tng_function_status DECLSPECDLLEXPORT tng_long_stride_length_set
-                (const tng_trajectory_t tng_data,
-                 const int64_t len);
-
-/**
- * @brief Get the current time per frame of the trajectory.
- * @param tng_data is the trajectory from which to get the time per frame.
- * @param time is pointing to a value set to the time per frame.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code time != 0 \endcode The pointer to time must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_time_per_frame_get
-                (const tng_trajectory_t tng_data,
-                 double *time);
-
-/**
- * @brief Set the time per frame of the trajectory.
- * @param tng_data is the trajectory of which to set the time per frame.
- * @param time is the new time per frame.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code time > 0 \endcode The time per frame must be >= 0.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred.
- */
-tng_function_status DECLSPECDLLEXPORT tng_time_per_frame_set
-                (const tng_trajectory_t tng_data,
-                 const double time);
-
-/**
- * @brief Get the length of the input file.
- * @param tng_data is the trajectory from which to get the input file length.
- * @param len is pointing to a value set to the file length.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code len != 0 \endcode The pointer to len must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_input_file_len_get
-                (const tng_trajectory_t tng_data,
-                 int64_t *len);
-
-/**
- * @brief Get the number of frames in the trajectory
- * @param tng_data is the trajectory of which to get the number of frames.
- * @param n is pointing to a value set to the number of frames.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code tng_data->input_file != 0 \endcode An input file must be open
- * to find the next frame set.
- * @pre \code n != 0 \endcode The pointer to n must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred (could not find last frame set).
- */
-tng_function_status DECLSPECDLLEXPORT tng_num_frames_get
-                (const tng_trajectory_t tng_data,
-                 int64_t *n);
-
-/**
- * @brief Get the precision of lossy compression.
- * @param tng_data is the trajectory of which to get the compression precision.
- * @param precision will be pointing to the retrieved compression precision.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @details A compression precision of 0.001 (the default) means that the
- * compressed values are accurate to the third decimal. This function does
- * not check actual precision of compressed data, but just returns what has
- * previously been set using tng_compression_precision_set().
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_compression_precision_get
-                (const tng_trajectory_t tng_data,
-                 double *precision);
-
-/**
- * @brief Set the precision of lossy compression.
- * @param tng_data is the trajectory of which to set the compression precision.
- * @param precision is the new compression precision.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @details A compression precision of 0.001 (the default) means that the
- * compressed values are accurate to the third decimal.
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_compression_precision_set
-                (const tng_trajectory_t tng_data,
-                 const double precision);
-
-/**
- * @brief Set the number of particles, in the case no molecular system is used.
- * @param tng_data is the trajectory of which to get the number of particles.
- * @param n is the number of particles to use.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @details When creating a molecular system the number of particles are set
- * automatically. This should only be used when there is no molecular system
- * specified or if the number of atoms needs to be overridden for some reason.
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_implicit_num_particles_set
-                (const tng_trajectory_t tng_data,
-                 const int64_t n);
-
-/**
- * @brief Get the current number of particles.
- * @param tng_data is the trajectory from which to get the number of particles.
- * @param n is pointing to a value set to the number of particles.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code n != 0 \endcode The pointer to n must not be a NULL pointer.
- * @details If variable number of particles are used this function will return
- * the number of particles in the current frame set.
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_num_particles_get
-                (const tng_trajectory_t tng_data,
-                 int64_t *n);
-
-/**
- * @brief Get if the number of particle can be varied during the simulation.
- * @param tng_data is the trajectory from which to get the number of particles.
- * @param variable is pointing to a value set to TNG_CONSTANT_N_ATOMS if the
- * number of particles cannot change or TNG_VARIABLE_N_ATOMS if the number of
- * particles can change.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code variable != 0 \endcode The pointer to variable must not be
- * a NULL pointer.
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_num_particles_variable_get
-                (const tng_trajectory_t tng_data,
-                 char *variable);
-
-/**
- * @brief Get the number of molecule types (length of tng_data->molecules).
- * @param tng_data is the trajectory from which to get the number of molecules.
- * @param n is pointing to a value set to the number of molecule types.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code n != 0 \endcode The pointer to n must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_num_molecule_types_get
-                (const tng_trajectory_t tng_data,
-                 int64_t *n);
-
-/**
- * @brief Get the current total number of molecules.
- * @param tng_data is the trajectory from which to get the number of molecules.
- * @param n is pointing to a value set to the number of molecules.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code n != 0 \endcode The pointer to n must not be a NULL pointer.
- * @details If variable number of particles are used this function will return
- * the total number of molecules in the current frame set.
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_num_molecules_get
-                (const tng_trajectory_t tng_data,
-                 int64_t *n);
-
-/** @brief Get the list of the count of each molecule.
- * @param tng_data is the trajectory from which to get the molecule count list.
- * @param mol_cnt_list is a list of the count of each molecule in the
- * mol system. This is a pointer to the list in the TNG container, which
- * means that it should be handled carefully, e.g. not freed.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @return TNG_SUCCESS (0) if successful or TNG_FAILURE(1) if the list of
- * molecule counts was not valid.
- */
-tng_function_status DECLSPECDLLEXPORT tng_molecule_cnt_list_get
-                (const tng_trajectory_t tng_data,
-                 int64_t **mol_cnt_list);
-
-/**
- * @brief Get the exponent used for distances in the trajectory.
- * @param tng_data is the trajectory from which to get the information.
- * @param exp is pointing to a value set to the distance unit exponent.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code exp != 0 \endcode The pointer to exp must not be a NULL pointer.
- * @details Example: If the distances are specified in nm (default) exp is -9.
- * If the distances are specified in Å exp is -10.
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_distance_unit_exponential_get
-                (const tng_trajectory_t tng_data,
-                 int64_t *exp);
-
-/**
- * @brief Set the exponent used for distances in the trajectory.
- * @param tng_data is the trajectory of which to set the unit exponent.
- * @param exp is the distance unit exponent to use.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @details Example: If the distances are specified in nm (default) exp is -9.
- * If the distances are specified in Å exp is -10.
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_distance_unit_exponential_set
-                (const tng_trajectory_t tng_data,
-                 const int64_t exp);
-
-/**
- * @brief Get the number of frames per frame set.
- * @param tng_data is the trajectory from which to get the number of frames
- * per frame set.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code n != 0 \endcode The pointer to n must not be a NULL pointer.
- * @param n is pointing to a value set to the number of frames per frame set.
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_num_frames_per_frame_set_get
-                (const tng_trajectory_t tng_data,
-                 int64_t *n);
-
-/**
- * @brief Set the number of frames per frame set.
- * @param tng_data is the trajectory of which to set the number of frames
- * per frame set.
- * @param n is the number of frames per frame set.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @details This does not affect already existing frame sets. For
- * consistency the number of frames per frame set should be set
- * betfore creating any frame sets.
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_num_frames_per_frame_set_set
-                (const tng_trajectory_t tng_data,
-                 const int64_t n);
-
-/**
- * @brief Get the number of frame sets.
- * @details This updates tng_data->n_trajectory_frame_sets before returning it.
- * @param tng_data is the trajectory from which to get the number of frame sets.
- * @param n is pointing to a value set to the number of frame sets.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code n != 0 \endcode The pointer to n must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_num_frame_sets_get
-                (const tng_trajectory_t tng_data,
-                 int64_t *n);
-
-/**
- * @brief Get the current trajectory frame set.
- * @param tng_data is the trajectory from which to get the frame set.
- * @param frame_set_p will be set to point at the memory position of
- * the found frame set.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_current_frame_set_get
-                (const tng_trajectory_t tng_data,
-                 tng_trajectory_frame_set_t *frame_set_p);
-
-/**
- * @brief Find the requested frame set number.
- * @param tng_data is the trajectory from which to get the frame set.
- * @param nr is the frame set number to search for.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code nr >= 0 \endcode The frame set number (nr) must be >= 0.
- * @details tng_data->current_trajectory_frame_set will contain the
- * found trajectory if successful.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_frame_set_nr_find
-                (const tng_trajectory_t tng_data,
-                 const int64_t nr);
-
-/**
- * @brief Find the frame set containing a specific frame.
- * @param tng_data is the trajectory from which to get the frame set.
- * @param frame is the frame number to search for.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code frame >= 0 \endcode The frame number must be >= 0.
- * @details tng_data->current_trajectory_frame_set will contain the
- * found trajectory if successful.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_frame_set_of_frame_find
-                (const tng_trajectory_t tng_data,
-                 const int64_t frame);
-
-/**
- * @brief Get the file position of the next frame set in the input file.
- * @param tng_data is a trajectory data container.
- * @param frame_set is the frame set of which to get the position of the
- * following frame set.
- * @param pos is pointing to a value set to the file position.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code pos != 0 \endcode The pointer to pos must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_frame_set_next_frame_set_file_pos_get
-                (const tng_trajectory_t tng_data,
-                 const tng_trajectory_frame_set_t frame_set,
-                 int64_t *pos);
-
-/**
- * @brief Get the file position of the previous frame set in the input file.
- * @param tng_data is a trajectory data container.
- * @param frame_set is the frame set of which to get the position of the
- * previous frame set.
- * @param pos is pointing to a value set to the file position.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code pos != 0 \endcode The pointer to pos must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_frame_set_prev_frame_set_file_pos_get
-                (const tng_trajectory_t tng_data,
-                 const tng_trajectory_frame_set_t frame_set,
-                 int64_t *pos);
-
-/**
- * @brief Get the first and last frames of the frame set.
- * @param tng_data is a trajectory data container.
- * @param frame_set is the frame set of which to get the frame range.
- * @param first_frame is set to the first frame of the frame set.
- * @param last_frame is set to the last frame of the frame set.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code first_frame != 0 \endcode The pointer to first_frame must
- * not be a NULL pointer.
- * @pre \code last_frame != 0 \endcode The pointer to last_frame must
- * not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_frame_set_frame_range_get
-                (const tng_trajectory_t tng_data,
-                 const tng_trajectory_frame_set_t frame_set,
-                 int64_t *first_frame,
-                 int64_t *last_frame);
-
-/**
- * @brief Allocate memory for and setup a molecule container.
- * @param tng_data is a trajectory data container.
- * @param molecule_p is a pointer to molecule to allocate and initialise.
- * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
- * error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_molecule_alloc(const tng_trajectory_t tng_data,
-                                                         tng_molecule_t *molecule_p);
-
-/**
- * @brief Clean up a molecule container and free its allocated memory.
- * @param tng_data is a trajectory data container.
- * @param molecule_p is the molecule to destroy.
- * @details All allocated memory in the data structure is freed and also the memory
- * of the molecule itself.
- * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
- * error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_molecule_free(const tng_trajectory_t tng_data,
-                                                        tng_molecule_t *molecule_p);
-
-/**
- * @brief Setup a molecule container.
- * @param tng_data is a trajectory data container.
- * @param molecule is the molecule to initialise. Memory must be preallocated.
- * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
- * error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_molecule_init
-                (const tng_trajectory_t tng_data,
-                 const tng_molecule_t molecule);
-
-/**
- * @brief Clean up a molecule container.
- * @param tng_data is a trajectory data container.
- * @param molecule is the molecule to destroy.
- * @details All allocated memory in the data structure is freed, but not the
- * memory of molecule itself.
- * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
- * error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_molecule_destroy
-                (const tng_trajectory_t tng_data,
-                 const tng_molecule_t molecule);
-
-/**
- * @brief Add a molecule to the trajectory.
- * @param tng_data is the trajectory data container containing the block..
- * @param name is a pointer to the string containing the name of the new molecule.
- * @param molecule is a pointer to the newly created molecule.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code name != 0 \endcode The pointer to the name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if the ID could
- * not be set properly or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_molecule_add
-                (const tng_trajectory_t tng_data,
-                 const char *name,
-                 tng_molecule_t *molecule);
-
-/**
- * @brief Add a molecule with a specific ID to the trajectory.
- * @param tng_data is the trajectory data container containing the block..
- * @param name is a pointer to the string containing the name of the new molecule.
- * @param id is the ID of the created molecule.
- * @param molecule is a pointer to the newly created molecule.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code name != 0 \endcode The pointer to the name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if the ID could
- * not be set properly or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_molecule_w_id_add
-                (const tng_trajectory_t tng_data,
-                 const char *name,
-                 const int64_t id,
-                 tng_molecule_t *molecule);
-
-/**
- * @brief Add an existing molecule (from a molecule container) to the trajectory.
- * @param tng_data is the trajectory data container containing the block..
- * @param molecule is a pointer to the molecule to add to the trajectory and will
- * afterwards point to the molecule in the trajectory.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_molecule_existing_add
-                (const tng_trajectory_t tng_data,
-                 tng_molecule_t *molecule);
-
-/**
- * @brief Get the name of a molecule.
- * @param tng_data the trajectory containing the molecule.
- * @param molecule the molecule of which to get the name.
- * @param name the string to fill with the name of the molecule,
- * memory must be allocated before.
- * @param max_len maximum char length of the string, i.e. how much memory has
- * been reserved for name. This includes \0 terminating character.
- * @pre \code molecule != 0 \endcode The molecule must not be NULL.
- * @pre \code name != 0 \endcode The pointer to the name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred (source string longer than destination string).
- */
-tng_function_status DECLSPECDLLEXPORT tng_molecule_name_get
-                (const tng_trajectory_t tng_data,
-                 const tng_molecule_t molecule,
-                 char *name,
-                 const int max_len);
-
-/**
- * @brief Set the name of a molecule.
- * @param tng_data is the trajectory data container containing the molecule..
- * @param molecule is the molecule to rename.
- * @param new_name is a string containing the wanted name.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code new_name != 0 \endcode The pointer to the name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
- * error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_molecule_name_set
-                (const tng_trajectory_t tng_data,
-                 const tng_molecule_t molecule,
-                 const char *new_name);
-
-/**
- * @brief Get the count of a molecule.
- * @param tng_data is the trajectory data container containing the molecule..
- * @param molecule is the molecule of which to get the count.
- * @param cnt is a pointer to the variable to be populated with the count.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code cnt != 0 \endcode The pointer to the molecule count
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_molecule_cnt_get
-                (const tng_trajectory_t tng_data,
-                 const tng_molecule_t molecule,
-                 int64_t *cnt);
-
-/**
- * @brief Set the count of a molecule.
- * @param tng_data is the trajectory data container containing the molecule..
- * @param molecule is the molecule of which to set the count.
- * @param cnt is the number of instances of this molecule.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_molecule_cnt_set
-                (const tng_trajectory_t tng_data,
-                 const tng_molecule_t molecule,
-                 const int64_t cnt);
-
-/**
- * @brief Find a molecule.
- * @param tng_data is the trajectory data container containing the molecule.
- * @param name is a string containing the name of the molecule. If name is empty
- * only id will be used for finding the molecule.
- * @param id is the id of the molecule to look for. If id is -1 only the name of
- * the molecule will be used for finding the molecule.
- * @param molecule is a pointer to the molecule if it was found - otherwise 0.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code name != 0 \endcode The pointer to the name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if the molecule is found or TNG_FAILURE (1) if the
- * molecule is not found.
- * @details If name is an empty string and id == -1 the first residue will
- * be found.
- */
-tng_function_status DECLSPECDLLEXPORT tng_molecule_find
-                (const tng_trajectory_t tng_data,
-                 const char *name,
-                 const int64_t id,
-                 tng_molecule_t *molecule);
-
-/**
- * @brief Retrieve the molecule with specified index in the list of molecules.
- * @param tng_data is the trajectory data container containing the molecule.
- * @param index is the index (in tng_data->molecules) of the molecule to return
- * @param molecule is a pointer to the molecule if it was found - otherwise 0.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code molecule != 0 \endcode molecule must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if the molecule is found or TNG_FAILURE (1) if the
- * molecule is not found.
- */
-tng_function_status DECLSPECDLLEXPORT tng_molecule_of_index_get
-                (const tng_trajectory_t tng_data,
-                 const int64_t index,
-                 tng_molecule_t *molecule);
-
-/**
- * @brief Copy all molecules and the molecule counts from one TNG trajectory
- * to another.
- * @param tng_data_src is the source trajectory containing the molecular
- * system to copy.
- * @param tng_data_dest is the destination trajectory.
- * @pre \code tng_data_src != 0 \endcode The trajectory container (tng_data_src)
- * must be initialised before using it.
- * @pre \code tng_data_dest != 0 \endcode The trajectory container (tng_data_dest)
- * must be initialised before using it.
- * @details The molecular system in tng_data_dest will be overwritten.
- * @return TNG_SUCCESS(0) if the copying is successful, TNG_FAILURE if a minor
- * error has occured or TNG_CRITICAL(2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_molecule_system_copy(const tng_trajectory_t tng_data_src,
-                                                               const tng_trajectory_t tng_data_dest);
-
-/**
- * @brief Get the number of chains in a molecule.
- * @param tng_data is the trajectory containing the molecule.
- * @param molecule is the molecule of which to get the number of chains.
- * @param n is pointing to a value set to the number of chains.
- * @pre \code molecule != 0 \endcode The molecule must not be NULL.
- * @pre \code n != 0 \endcode The pointer to n must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_molecule_num_chains_get
-                (const tng_trajectory_t tng_data,
-                 const tng_molecule_t molecule,
-                 int64_t *n);
-
-/**
- * @brief Retrieve the chain of a molecule with specified index in the list
- * of chains.
- * @param tng_data is the trajectory data container containing the molecule.
- * @param index is the index (in molecule->chains) of the chain to return
- * @param molecule is the molecule from which to get the chain.
- * @param chain is a pointer to the chain if it was found - otherwise 0.
- * @pre \code molecule != 0 \endcode molecule must not be a NULL pointer.
- * @pre \code chain != 0 \endcode chain must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if the chain is found or TNG_FAILURE (1) if the
- * chain is not found.
- */
-tng_function_status DECLSPECDLLEXPORT tng_molecule_chain_of_index_get
-                (const tng_trajectory_t tng_data,
-                 const tng_molecule_t molecule,
-                 const int64_t index,
-                 tng_chain_t *chain);
-
-/**
- * @brief Get the number of residues in a molecule.
- * @param tng_data is the trajectory containing the molecule.
- * @param molecule is the molecule of which to get the number residues.
- * @param n is pointing to a value set to the number of residues.
- * @pre \code molecule != 0 \endcode The molecule must not be NULL.
- * @pre \code n != 0 \endcode The pointer to n must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_molecule_num_residues_get
-                (const tng_trajectory_t tng_data,
-                 const tng_molecule_t molecule,
-                 int64_t *n);
-
-/**
- * @brief Retrieve the residue of a molecule with specified index in the list
- * of chains.
- * @param tng_data is the trajectory data container containing the molecule.
- * @param index is the index (in molecule->residues) of the residue to return
- * @param molecule is the molecule from which to get the residue.
- * @param residue is a pointer to the residue if it was found - otherwise 0.
- * @pre \code molecule != 0 \endcode molecule must not be a NULL pointer.
- * @pre \code residue != 0 \endcode residue must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if the residue is found or TNG_FAILURE (1) if the
- * residue is not found.
- */
-tng_function_status DECLSPECDLLEXPORT tng_molecule_residue_of_index_get
-                (const tng_trajectory_t tng_data,
-                 const tng_molecule_t molecule,
-                 const int64_t index,
-                 tng_residue_t *residue);
-
-/**
- * @brief Get the number of atoms in a molecule.
- * @param tng_data is the trajectory containing the molecule.
- * @param molecule is the molecule of which to get the number of atoms.
- * @param n is pointing to a value set to the number of atoms.
- * @pre \code molecule != 0 \endcode The molecule must not be NULL.
- * @pre \code n != 0 \endcode The pointer to n must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_molecule_num_atoms_get
-                (const tng_trajectory_t tng_data,
-                 const tng_molecule_t molecule,
-                 int64_t *n);
-
-/**
- * @brief Retrieve the atom of a molecule with specified index in the list
- * of atoms.
- * @param tng_data is the trajectory data container containing the molecule.
- * @param index is the index (in molecule->atoms) of the atom to return
- * @param molecule is the molecule from which to get the atom.
- * @param atom is a pointer to the atom if it was found - otherwise 0.
- * @pre \code molecule != 0 \endcode molecule must not be a NULL pointer.
- * @pre \code atom != 0 \endcode atom must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if the atom is found or TNG_FAILURE (1) if the
- * atom is not found.
- */
-tng_function_status DECLSPECDLLEXPORT tng_molecule_atom_of_index_get
-                (const tng_trajectory_t tng_data,
-                 const tng_molecule_t molecule,
-                 const int64_t index,
-                 tng_atom_t *atom);
-
-/**
- * @brief Find a chain in a molecule.
- * @param tng_data is the trajectory data container containing the molecule.
- * @param molecule is the molecule in which to search for the chain.
- * @param name is a string containing the name of the chain. If name is empty
- * only id will be used for finding the chain.
- * @param id is the id of the chain to look for. If id is -1 only the name of
- * the chain will be used for finding the chain.
- * @param chain is a pointer to the chain if it was found - otherwise 0.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code name != 0 \endcode The pointer to the name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if the chain is found or TNG_FAILURE (1) if the
- * chain is not found.
- * @details If name is an empty string and id == -1 the first residue will
- * be found.
- */
-tng_function_status DECLSPECDLLEXPORT tng_molecule_chain_find
-                (const tng_trajectory_t tng_data,
-                 const tng_molecule_t molecule,
-                 const char *name,
-                 const int64_t id,
-                 tng_chain_t *chain);
-
-/**
- * @brief Add a chain to a molecule.
- * @param tng_data is the trajectory data container containing the molecule..
- * @param molecule is the molecule to add a chain to.
- * @param name is a string containing the name of the chain.
- * @param chain is a pointer to the newly created chain.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code name != 0 \endcode The pointer to the name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if the ID could
- * not be set properly or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_molecule_chain_add
-                (const tng_trajectory_t tng_data,
-                 const tng_molecule_t molecule,
-                 const char *name,
-                 tng_chain_t *chain);
-
-/**
- * @brief Add a chain with a specific id to a molecule.
- * @param tng_data is the trajectory data container containing the molecule..
- * @param molecule is the molecule to add a chain to.
- * @param name is a string containing the name of the chain.
- * @param id is the ID of the created chain.
- * @param chain is a pointer to the newly created chain.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code name != 0 \endcode The pointer to the name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if the ID could
- * not be set properly or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_molecule_chain_w_id_add
-                (const tng_trajectory_t tng_data,
-                 const tng_molecule_t molecule,
-                 const char *name,
-                 const int64_t id,
-                 tng_chain_t *chain);
-
-/**
- * @brief Add a bond between two atoms to a molecule.
- * @param tng_data is the trajectory data container containing the molecule.
- * @param molecule is the molecule containing the atoms to connect.
- * @param from_atom_id is the id of one of the two atoms in the bond.
- * @param to_atom_id is the id of the other atom in the bond.
- * @param bond is a pointer to the newly created bond.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (!) if a minor error
- * has occured or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_molecule_bond_add
-                (const tng_trajectory_t tng_data,
-                 const tng_molecule_t molecule,
-                 const int64_t from_atom_id,
-                 const int64_t to_atom_id,
-                 tng_bond_t *bond);
-
-/**
- * @brief Find an atom in a molecule.
- * @param tng_data is the trajectory data container containing the molecule.
- * @param molecule is the molecule in which to search for the atom.
- * @param name is a string containing the name of the atom. If name is an
- * empty string only id will be used for searching.
- * @param id is the id of the atom to find. If id == -1 the first atom
- * that matches the specified name will be found.
- * @param atom is a pointer to the atom if it was found - otherwise 0.
- * @pre \code name != 0 \endcode The pointer to the name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if the atom is found or TNG_FAILURE (1) if the
- * atom is not found.
- * @details If name is an empty string and id == -1 the first residue will
- * be found.
- */
-tng_function_status DECLSPECDLLEXPORT tng_molecule_atom_find
-                (const tng_trajectory_t tng_data,
-                 const tng_molecule_t molecule,
-                 const char *name,
-                 const int64_t id,
-                 tng_atom_t *atom);
-
-/**
- * @brief Get the name of a chain.
- * @param tng_data the trajectory containing the chain.
- * @param chain the chain of which to get the name.
- * @param name the string to fill with the name of the chain,
- * memory must be allocated before.
- * @param max_len maximum char length of the string, i.e. how much memory has
- * been reserved for name. This includes \0 terminating character.
- * @pre \code chain != 0 \endcode The chain must not be NULL.
- * @pre \code name != 0 \endcode The pointer to the name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred (source string longer than destination string).
- */
-tng_function_status DECLSPECDLLEXPORT tng_chain_name_get
-                (const tng_trajectory_t tng_data,
-                 const tng_chain_t chain,
-                 char *name,
-                 const int max_len);
-
-/**
- * @brief Set the name of a chain.
- * @param tng_data is the trajectory data container containing the atom..
- * @param chain is the chain to rename.
- * @param new_name is a string containing the wanted name.
- * @pre \code new_name != 0 \endcode The pointer to the name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
- * error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_chain_name_set
-                (const tng_trajectory_t tng_data,
-                 const tng_chain_t chain,
-                 const char *new_name);
-
-/**
- * @brief Get the number of residues in a molecule chain.
- * @param tng_data is the trajectory containing the chain.
- * @param chain is the chain of which to get the number of residues.
- * @param n is pointing to a value set to the number of residues.
- * @pre \code chain != 0 \endcode The chain must not be NULL.
- * @pre \code n != 0 \endcode The pointer to n must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_chain_num_residues_get
-                (const tng_trajectory_t tng_data,
-                 const tng_chain_t chain,
-                 int64_t *n);
-
-/**
- * @brief Retrieve the residue of a chain with specified index in the list
- * of residues.
- * @param tng_data is the trajectory data container containing the chain.
- * @param index is the index (in chain->residues) of the residue to return
- * @param chain is the chain from which to get the residue.
- * @param residue is a pointer to the residue if it was found - otherwise 0.
- * @pre \code chain != 0 \endcode chain must not be a NULL pointer.
- * @pre \code residue != 0 \endcode residue must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if the residue is found or TNG_FAILURE (1) if the
- * residue is not found.
- */
-tng_function_status DECLSPECDLLEXPORT tng_chain_residue_of_index_get
-                (const tng_trajectory_t tng_data,
-                 const tng_chain_t chain,
-                 const int64_t index,
-                 tng_residue_t *residue);
-
-/**
- * @brief Find a residue in a chain.
- * @param tng_data is the trajectory data container containing the chain.
- * @param chain is the chain in which to search for the residue.
- * @param name is a string containing the name of the residue.  If name is an
- * empty string only id will be used for searching.
- * @param id is the id of the residue to find. If id == -1 the first residue
- * that matches the specified name will be found.
- * @param residue is a pointer to the residue if it was found - otherwise 0.
- * @pre \code name != 0 \endcode The pointer to the name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if the residue is found or TNG_FAILURE (1) if the
- * residue is not found.
- * @details If name is an empty string and id == -1 the first residue will
- * be found.
- */
-tng_function_status DECLSPECDLLEXPORT tng_chain_residue_find
-                (const tng_trajectory_t tng_data,
-                 const tng_chain_t chain,
-                 const char *name,
-                 const int64_t id,
-                 tng_residue_t *residue);
-
-/**
- * @brief Add a residue to a chain.
- * @param tng_data is the trajectory data container containing the chain..
- * @param chain is the chain to add a residue to.
- * @param name is a string containing the name of the residue.
- * @param residue is a pointer to the newly created residue.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code name != 0 \endcode The pointer to the name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if the ID could
- * not be set properly or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_chain_residue_add
-                (const tng_trajectory_t tng_data,
-                 const tng_chain_t chain,
-                 const char *name,
-                 tng_residue_t *residue);
-
-/**
- * @brief Add a residue with a specific ID to a chain.
- * @param tng_data is the trajectory data container containing the chain..
- * @param chain is the chain to add a residue to.
- * @param name is a string containing the name of the residue.
- * @param id is the ID of the created residue.
- * @param residue is a pointer to the newly created residue.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code name != 0 \endcode The pointer to the name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if the ID could
- * not be set properly or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_chain_residue_w_id_add
-                (const tng_trajectory_t tng_data,
-                 const tng_chain_t chain,
-                 const char *name,
-                 const int64_t id,
-                 tng_residue_t *residue);
-
-/**
- * @brief Get the name of a residue.
- * @param tng_data the trajectory containing the residue.
- * @param residue the residue of which to get the name.
- * @param name the string to fill with the name of the residue,
- * memory must be allocated before.
- * @param max_len maximum char length of the string, i.e. how much memory has
- * been reserved for name. This includes \0 terminating character.
- * @pre \code residue != 0 \endcode The residue must not be NULL.
- * @pre \code name != 0 \endcode The pointer to the name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred (source string longer than destination string).
- */
-tng_function_status DECLSPECDLLEXPORT tng_residue_name_get
-                (const tng_trajectory_t tng_data,
-                 const tng_residue_t residue,
-                 char *name,
-                 const int max_len);
-
-/**
- * @brief Set the name of a residue.
- * @param tng_data is the trajectory data container containing the residue.
- * @param residue is the residue to rename.
- * @param new_name is a string containing the wanted name.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code new_name != 0 \endcode The new name to set (new_name) must
- * not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
- * error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_residue_name_set
-                (const tng_trajectory_t tng_data,
-                 const tng_residue_t residue,
-                 const char *new_name);
-
-/**
- * @brief Get the number of atoms in a residue.
- * @param tng_data is the trajectory containing the residue.
- * @param residue is the residue of which to get the number atoms.
- * @param n is pointing to a value set to the number of atoms.
- * @pre \code residue != 0 \endcode The residue must not be NULL.
- * @pre \code n != 0 \endcode The pointer to n must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_residue_num_atoms_get
-                (const tng_trajectory_t tng_data,
-                 const tng_residue_t residue,
-                 int64_t *n);
-
-/**
- * @brief Retrieve the atom of a residue with specified index in the list
- * of atoms.
- * @param tng_data is the trajectory data container containing the residue.
- * @param index is the index (in residue->atoms) of the atom to return
- * @param residue is the residue from which to get the atom.
- * @param atom is a pointer to the atom if it was found - otherwise 0.
- * @pre \code residue != 0 \endcode residue must not be a NULL pointer.
- * @pre \code atom != 0 \endcode atom must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if the atom is found or TNG_FAILURE (1) if the
- * atom is not found.
- */
-tng_function_status DECLSPECDLLEXPORT tng_residue_atom_of_index_get
-                (const tng_trajectory_t tng_data,
-                 const tng_residue_t residue,
-                 const int64_t index,
-                 tng_atom_t *atom);
-
-/**
- * @brief Add an atom to a residue.
- * @param tng_data is the trajectory containing the residue.
- * @param residue is the residue to add an atom to.
- * @param atom_name is a string containing the name of the atom.
- * @param atom_type is a string containing the atom type of the atom.
- * @param atom is a pointer to the newly created atom.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code atom_name != 0 \endcode The pointer to the atom name string
- * must not be a NULL pointer.
- * @pre \code atom_type != 0 \endcode The pointer to the atom_type string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if the ID could
- * not be set properly or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_residue_atom_add
-                (const tng_trajectory_t tng_data,
-                 const tng_residue_t residue,
-                 const char *atom_name,
-                 const char *atom_type,
-                 tng_atom_t *atom);
-
-/**
- * @brief Add an atom with a specific ID to a residue.
- * @param tng_data is the trajectory containing the residue.
- * @param residue is the residue to add an atom to.
- * @param atom_name is a string containing the name of the atom.
- * @param atom_type is a string containing the atom type of the atom.
- * @param id is the ID of the created atom.
- * @param atom is a pointer to the newly created atom.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code atom_name != 0 \endcode The pointer to the atom name string
- * must not be a NULL pointer.
- * @pre \code atom_type != 0 \endcode The pointer to the atom_type string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if the ID could
- * not be set properly or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_residue_atom_w_id_add
-                (const tng_trajectory_t tng_data,
-                 const tng_residue_t residue,
-                 const char *atom_name,
-                 const char *atom_type,
-                 const int64_t id,
-                 tng_atom_t *atom);
-
-/**
- * @brief Get the residue of an atom.
- * @param tng_data the trajectory containing the atom.
- * @param atom the atom of which to get the name.
- * @param residue is set to the residue of the atom.
- * @pre \code atom != 0 \endcode The atom must not be NULL.
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_atom_residue_get
-                (const tng_trajectory_t tng_data,
-                 const tng_atom_t atom,
-                 tng_residue_t *residue);
-
-/**
- * @brief Get the name of an atom.
- * @param tng_data the trajectory containing the atom.
- * @param atom the atom of which to get the name.
- * @param name the string to fill with the name of the atom,
- * memory must be allocated before.
- * @param max_len maximum char length of the string, i.e. how much memory has
- * been reserved for name. This includes \0 terminating character.
- * @pre \code atom != 0 \endcode The atom must not be NULL.
- * @pre \code name != 0 \endcode The pointer to the name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred (source string longer than destination string).
- */
-tng_function_status DECLSPECDLLEXPORT tng_atom_name_get
-                (const tng_trajectory_t tng_data,
-                 const tng_atom_t atom,
-                 char *name,
-                 const int max_len);
-
-/**
- * @brief Set the name of an atom.
- * @param tng_data is the trajectory data container containing the atom.
- * @param atom is the atom to rename.
- * @param new_name is a string containing the wanted name.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code new_name != 0 \endcode The pointer to the name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
- * error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_atom_name_set
-                (const tng_trajectory_t tng_data,
-                 const tng_atom_t atom,
-                 const char *new_name);
-
-/**
- * @brief Get the type of an atom.
- * @param tng_data the trajectory containing the atom.
- * @param atom the atom of which to get the type.
- * @param type the string to fill with the type of the atom,
- * memory must be allocated before.
- * @param max_len maximum char length of the string, i.e. how much memory has
- * been reserved for type. This includes \0 terminating character.
- * @pre \code atom != 0 \endcode The atom must not be NULL.
- * @pre \code type != 0 \endcode The pointer to the type string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred (source string longer than destination string).
- */
-tng_function_status DECLSPECDLLEXPORT tng_atom_type_get
-                (const tng_trajectory_t tng_data,
-                 const tng_atom_t atom,
-                 char *type,
-                 const int max_len);
-
-/**
- * @brief Set the atom type of an atom.
- * @param tng_data is the trajectory data container containing the atom.
- * @param atom is the atom to change.
- * @param new_type is a string containing the atom type.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code new_type != 0 \endcode The pointer to the atom type string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
- * error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_atom_type_set
-                (const tng_trajectory_t tng_data,
-                 const tng_atom_t atom,
-                 const char *new_type);
-
-/**
- * @brief Get the molecule name of real particle number (number in mol system).
- * @param tng_data is the trajectory data container containing the atom.
- * @param nr is the real number of the particle in the molecular system.
- * @param name is a string, which is set to the name of the molecule. Memory
- * must be reserved beforehand.
- * @param max_len is the maximum length of name.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code name != 0 \endcode The pointer to the name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful or TNG_FAILURE (!) if a minor error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_molecule_name_of_particle_nr_get
-                (const tng_trajectory_t tng_data,
-                 const int64_t nr,
-                 char *name,
-                 const int max_len);
-
-/**
- * @brief Get the molecule id of real particle number (number in mol system).
- * @param tng_data is the trajectory data container containing the atom.
- * @param nr is the real number of the particle in the molecular system.
- * @param id is will be set to the id of the molecule.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code id != 0 \endcode The pointer to id must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful or TNG_FAILURE (!) if a minor error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_molecule_id_of_particle_nr_get
-                (const tng_trajectory_t tng_data,
-                 const int64_t nr,
-                 int64_t *id);
-
-/**
- * @brief Get the bonds of the current molecular system.
- * @param tng_data is the trajectory data container containing the molecular
- * system.
- * @param n_bonds is set to the number of bonds in the molecular system and
- * thereby also the lengths of the two lists: from_atoms and to_atoms.
- * @param from_atoms is a list (memory reserved by this function) of atoms
- * (number of atom in mol system) in bonds.
- * @param to_atoms is a list (memory reserved by this function) of atoms
- * (number of atom in mol system) in bonds.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code n_bonds != 0 \endcode The pointer to n_bonds must not be a
- * NULL pointer.
- * @pre \code from_atoms != 0 \endcode The pointer to from_atoms must not
- * be a NULL pointer.
- * @pre \code to_atoms != 0 \endcode The pointer to to_atoms must not
- * be a NULL pointer.
- * @details The two lists of atoms use the same index, i.e. from_atoms[0]
- * and to_atoms[0] are linked with a bond. Since memory is reserved in
- * this function it must be freed afterwards.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_molsystem_bonds_get
-                (const tng_trajectory_t tng_data,
-                 int64_t *n_bonds,
-                 int64_t **from_atoms,
-                 int64_t **to_atoms);
-
-/**
- * @brief Get the chain name of real particle number (number in mol system).
- * @param tng_data is the trajectory data container containing the atom.
- * @param nr is the real number of the particle in the molecular system.
- * @param name is a string, which is set to the name of the chain. Memory
- * must be reserved beforehand.
- * @param max_len is the maximum length of name.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code name != 0 \endcode The pointer to the name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful or TNG_FAILURE (!) if a minor error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_chain_name_of_particle_nr_get
-                (const tng_trajectory_t tng_data,
-                 const int64_t nr,
-                 char *name,
-                 const int max_len);
-
-/**
- * @brief Get the residue name of real particle number (number in mol system).
- * @param tng_data is the trajectory data container containing the atom.
- * @param nr is the real number of the particle in the molecular system.
- * @param name is a string, which is set to the name of the residue. Memory
- * must be reserved beforehand.
- * @param max_len is the maximum length of name.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code name != 0 \endcode The pointer to the name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful or TNG_FAILURE (!) if a minor error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_residue_name_of_particle_nr_get
-                (const tng_trajectory_t tng_data,
-                 const int64_t nr,
-                 char *name,
-                 const int max_len);
-
-/**
- * @brief Get the residue id (local to molecule) of real particle number
- * (number in mol system).
- * @param tng_data is the trajectory data container containing the atom.
- * @param nr is the real number of the particle in the molecular system.
- * @param id is a pointer to the variable, which will be set to the ID.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code id != 0 \endcode The pointer to id must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful or TNG_FAILURE (!) if a minor error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_residue_id_of_particle_nr_get
-                (const tng_trajectory_t tng_data,
-                 const int64_t nr,
-                 int64_t *id);
-
-/**
- * @brief Get the residue id (based on other molecules and molecule counts)
- * of real particle number (number in mol system).
- * @param tng_data is the trajectory data container containing the atom.
- * @param nr is the real number of the particle in the molecular system.
- * @param id is a pointer to the variable, which will be set to the ID.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code id != 0 \endcode The pointer to id must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful or TNG_FAILURE (!) if a minor error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_global_residue_id_of_particle_nr_get
-                (const tng_trajectory_t tng_data,
-                 const int64_t nr,
-                 int64_t *id);
-
-/**
- * @brief Get the atom name of real particle number (number in mol system).
- * @param tng_data is the trajectory data container containing the atom.
- * @param nr is the real number of the particle in the molecular system.
- * @param name is a string, which is set to the name of the atom. Memory
- * must be reserved beforehand.
- * @param max_len is the maximum length of name.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code name != 0 \endcode The pointer to the name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful or TNG_FAILURE (!) if a minor error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_atom_name_of_particle_nr_get
-                (const tng_trajectory_t tng_data,
-                 const int64_t nr,
-                 char *name,
-                 const int max_len);
-
-/**
- * @brief Get the atom type of real particle number (number in mol system).
- * @param tng_data is the trajectory data container containing the atom.
- * @param nr is the real number of the particle in the molecular system.
- * @param type is a string, which is set to the type of the atom. Memory
- * must be reserved beforehand.
- * @param max_len is the maximum length of type.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code type != 0 \endcode The pointer to the type string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful or TNG_FAILURE (!) if a minor error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_atom_type_of_particle_nr_get
-                (const tng_trajectory_t tng_data,
-                 const int64_t nr,
-                 char *type,
-                 const int max_len);
-
-/**
- * @brief Add a particle mapping table.
- * @details Each particle mapping table will be written as a separate block,
- * followed by the data blocks for the corresponding particles. In most cases
- * there is one particle mapping block for each thread writing the trajectory.
- * @param tng_data is the trajectory, with the frame set to which to add
- * the mapping block.
- * @details The mapping information is added to the currently active frame set
- * of tng_data
- * @param num_first_particle is the first particle number of this mapping
- * block.
- * @param n_particles is the number of particles in this mapping block.
- * @param mapping_table is a list of the real particle numbers (i.e. the numbers
- * used in the molecular system). The list is n_particles long.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @details mapping_table[0] is the real particle number of the first particle
- * in the following data blocks.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_particle_mapping_add
-                (const tng_trajectory_t tng_data,
-                 const int64_t num_first_particle,
-                 const int64_t n_particles,
-                 const int64_t *mapping_table);
-
-/**
- * @brief Remove all particle mappings (in memory) from the current frame set.
- * @details Clears the currently setup particle mappings of the current frame
- * set.
- * @param tng_data is the trajectory, with the frame set of which to clear
- * all particle mappings.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_frame_set_particle_mapping_free
-                (const tng_trajectory_t tng_data);
-
-/**
- * @brief Read the header blocks from the input_file of tng_data.
- * @details The trajectory blocks must be read separately and iteratively in chunks
- * to fit in memory.
- * @param tng_data is a trajectory data container.
- * @details tng_data->input_file_path specifies
- * which file to read from. If the file (input_file) is not open it will be
- * opened.
- * @param hash_mode is an option to decide whether to use the md5 hash or not.
- * If hash_mode == TNG_USE_HASH the written md5 hash in the file will be
- * compared to the md5 hash of the read contents to ensure valid data.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
- * error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_file_headers_read
-                (const tng_trajectory_t tng_data,
-                 const char hash_mode);
-
-/**
- * @brief Write the header blocks to the output_file of tng_data.
- * @details The trajectory blocks must be written separately and iteratively in chunks
- * to fit in memory.
- * @param tng_data is a trajectory data container.
- * @details tng_data->output_file_path
- * specifies which file to write to. If the file (output_file) is not open it
- * will be opened.
- * @param hash_mode is an option to decide whether to use the md5 hash or not.
- * If hash_mode == TNG_USE_HASH an md5 hash for each header block will be generated.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
- * error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_file_headers_write
-                (const tng_trajectory_t tng_data,
-                 const char hash_mode);
-
-/**
- * @brief Read one (the next) block (of any kind) from the input_file of tng_data.
- * @param tng_data is a trajectory data container.
- * @details tng_data->input_file_path specifies
- * which file to read from. If the file (input_file) is not open it will be
- * opened.
- * @param block_data is a pointer to the struct which will be populated with the
- * data.
- * @details If block_data->input_file_pos > 0 it is the position from where the
- * reading starts otherwise it starts from the current position.
- * @param hash_mode is an option to decide whether to use the md5 hash or not.
- * If hash_mode == TNG_USE_HASH the written md5 hash in the file will be
- * compared to the md5 hash of the read contents to ensure valid data.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code block != 0 \endcode The block container (block) must be
- * initialised before using it.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_block_read_next
-                (const tng_trajectory_t tng_data,
-                 const tng_gen_block_t block_data,
-                 const char hash_mode);
-
-/**
- * @brief Read one frame set, including all particle mapping blocks and data
- * blocks, starting from the current file position.
- * @param tng_data is a trajectory data container.
- * @param hash_mode is an option to decide whether to use the md5 hash or not.
- * If hash_mode == TNG_USE_HASH the written md5 hash in the file will be
- * compared to the md5 hash of the read contents to ensure valid data.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_frame_set_read
-                (const tng_trajectory_t tng_data,
-                 const char hash_mode);
-
-/**
- * @brief Read data from the current frame set from the input_file. Only read
- * particle mapping and data blocks matching the specified block_id.
- * @param tng_data is a trajectory data container.
- * @details  tng_data->input_file_path specifies
- * which file to read from. If the file (input_file) is not open it will be
- * opened.
- * @param hash_mode is an option to decide whether to use the md5 hash or not.
- * If hash_mode == TNG_USE_HASH the written md5 hash in the file will be
- * compared to the md5 hash of the read contents to ensure valid data.
- * @param block_id is the ID of the data block to read from file.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_frame_set_read_current_only_data_from_block_id
-                (const tng_trajectory_t tng_data,
-                 const char hash_mode,
-                 const int64_t block_id);
-
-/**
- * @brief Read one (the next) frame set, including particle mapping and related data blocks
- * from the input_file of tng_data.
- * @param tng_data is a trajectory data container.
- * @details  tng_data->input_file_path specifies
- * which file to read from. If the file (input_file) is not open it will be
- * opened.
- * @param hash_mode is an option to decide whether to use the md5 hash or not.
- * If hash_mode == TNG_USE_HASH the written md5 hash in the file will be
- * compared to the md5 hash of the read contents to ensure valid data.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_frame_set_read_next
-                (const tng_trajectory_t tng_data,
-                 const char hash_mode);
-
-/**
- * @brief Read one (the next) frame set, including particle mapping and data blocks with a
- * specific block id from the input_file of tng_data.
- * @param tng_data is a trajectory data container.
- * @details  tng_data->input_file_path specifies
- * which file to read from. If the file (input_file) is not open it will be
- * opened.
- * @param hash_mode is an option to decide whether to use the md5 hash or not.
- * If hash_mode == TNG_USE_HASH the written md5 hash in the file will be
- * compared to the md5 hash of the read contents to ensure valid data.
- * @param block_id is the ID number of the blocks that should be read from file.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_frame_set_read_next_only_data_from_block_id
-                (const tng_trajectory_t tng_data,
-                 const char hash_mode,
-                 const int64_t block_id);
-
-/**
- * @brief Write one frame set, including mapping and related data blocks
- * to the output_file of tng_data.
- * @param tng_data is a trajectory data container.
- * @details  tng_data->output_file_path specifies
- * which file to write to. If the file (output_file) is not open it will be
- * opened.
- * @param hash_mode is an option to decide whether to use the md5 hash or not.
- * If hash_mode == TNG_USE_HASH an md5 hash for each header block will be generated.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_frame_set_write
-                (const tng_trajectory_t tng_data,
-                 const char hash_mode);
-
-/**
- * @brief Write one frame set even if it does not have as many frames as
- * expected. The function also writes mapping and related data blocks
- * to the output_file of tng_data.
- * @param tng_data is a trajectory data container.
- * @details  tng_data->output_file_path specifies
- * which file to write to. If the file (output_file) is not open it will be
- * opened.
- * @param hash_mode is an option to decide whether to use the md5 hash or not.
- * If hash_mode == TNG_USE_HASH an md5 hash for each header block will be generated.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @details The number of frames in the frame set is set to the number of
- * frames of the data blocks before writing it to disk.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_frame_set_premature_write
-                (const tng_trajectory_t tng_data,
-                 const char hash_mode);
-
-/**
- * @brief Create and initialise a frame set.
- * @details Particle mappings are retained from previous frame set (if any).
- * To explicitly clear particle mappings use tng_frame_set_particle_mapping_free().
- * @param tng_data is the trajectory data container in which to add the frame
- * set.
- * @param first_frame is the first frame of the frame set.
- * @param n_frames is the number of frames in the frame set.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code first_frame >= 0 \endcode The first frame must not be negative.
- * @pre \code n_frames >= 0 \endcode The number of frames must not be negative.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_frame_set_new
-                (const tng_trajectory_t tng_data,
-                 const int64_t first_frame,
-                 const int64_t n_frames);
-
-/**
- * @brief Create and initialise a frame set with the time of the first frame
- * specified.
- * @param tng_data is the trajectory data container in which to add the frame
- * set.
- * @param first_frame is the first frame of the frame set.
- * @param n_frames is the number of frames in the frame set.
- * @param first_frame_time is the time stamp of the first frame (in seconds).
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code first_frame >= 0 \endcode The first frame must not be negative.
- * @pre \code n_frames >= 0 \endcode The number of frames must not be negative.
- * @pre \code first_frame_time >= 0 \endcode The time stamp of the first frame
- * must not be negative.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_frame_set_with_time_new
-                (const tng_trajectory_t tng_data,
-                 const int64_t first_frame,
-                 const int64_t n_frames,
-                 const double first_frame_time);
-
-/**
- * @brief Set the time stamp of the first frame of the current frame set.
- * @param tng_data is the trajectory containing the frame set.
- * @param first_frame_time is the time stamp of the first frame in the
- * frame set.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code first_frame_time >= 0 \endcode The time stamp of the first frame
- * must not be negative.
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_frame_set_first_frame_time_set
-                (const tng_trajectory_t tng_data,
-                 const double first_frame_time);
-
-/**
- * @brief Read the number of the first frame of the next frame set.
- * @param tng_data is the trajectory containing the frame set.
- * @param frame is set to the frame number of the first frame in the
- * next frame set.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code tng_data->input_file != 0 \endcode An input file must be open
- * to find the next frame set.
- * @pre \code frame != 0 \endcode The pointer to the frame must not be a NULL
- * pointer.
- * @return TNG_SUCCESS(0) if successful, TNG_FAILURE(1) if there is no next
- * frame set or TNG_CRITICAL(2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_first_frame_nr_of_next_frame_set_get
-                (const tng_trajectory_t tng_data,
-                 int64_t *frame);
-
-/**
- * @brief Add a non-particle dependent data block.
- * @param tng_data is the trajectory data container in which to add the data
- * block
- * @param id is the block ID of the block to add.
- * @param block_name is a descriptive name of the block to add
- * @param datatype is the datatype of the data in the block (e.g. int/float)
- * @param block_type_flag indicates if this is a non-trajectory block (added
- * directly to tng_data) or if it is a trajectory block (added to the
- * frame set)
- * @param n_frames is the number of frames of the data block (automatically
- * set to 1 if adding a non-trajectory data block)
- * @param n_values_per_frame is how many values a stored each frame (e.g. 9
- * for a box shape block)
- * @param stride_length is how many frames are between each entry in the
- * data block
- * @param codec_id is the ID of the codec to compress the data.
- * @param new_data is an array of data values to add.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code block_name != 0 \endcode The pointer to the block name must
- * not be a NULL pointer.
- * @pre \code n_values_per_frame > 0 \endcode n_values_per_frame must be
- * a positive integer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_data_block_add
-                (const tng_trajectory_t tng_data,
-                 const int64_t id,
-                 const char *block_name,
-                 const char datatype,
-                 const char block_type_flag,
-                 int64_t n_frames,
-                 const int64_t n_values_per_frame,
-                 int64_t stride_length,
-                 const int64_t codec_id,
-                 void *new_data);
-
-/**
- * @brief Add a particle dependent data block.
- * @param tng_data is the trajectory data container in which to add the data
- * block
- * @param id is the block ID of the block to add.
- * @param block_name is a descriptive name of the block to add
- * @param datatype is the datatype of the data in the block (e.g. int/float)
- * @param block_type_flag indicates if this is a non-trajectory block (added
- * directly to tng_data) or if it is a trajectory block (added to the
- * frame set)
- * @param n_frames is the number of frames of the data block (automatically
- * set to 1 if adding a non-trajectory data block)
- * @param n_values_per_frame is how many values a stored each frame (e.g. 9
- * for a box shape block)
- * @param stride_length is how many frames are between each entry in the
- * data block
- * @param num_first_particle is the number of the first particle stored
- * in this data block
- * @param n_particles is the number of particles stored in this data block
- * @param codec_id is the ID of the codec to compress the data.
- * @param new_data is an array of data values to add.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code block_name != 0 \endcode The pointer to the block name must
- * not be a NULL pointer.
- * @pre \code n_values_per_frame > 0 \endcode n_values_per_frame must be
- * a positive integer.
- * @pre \code num_first_particle >= 0 \endcode The number of the
- * first particle must be >= 0.
- * @pre \code n_particles >= 0 \endcode n_particles must be >= 0.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_particle_data_block_add
-                (const tng_trajectory_t tng_data,
-                 const int64_t id,
-                 const char *block_name,
-                 const char datatype,
-                 const char block_type_flag,
-                 int64_t n_frames,
-                 const int64_t n_values_per_frame,
-                 int64_t stride_length,
-                 const int64_t num_first_particle,
-                 const int64_t n_particles,
-                 const int64_t codec_id,
-                 void *new_data);
-
-/** @brief Get the name of a data block of a specific ID.
- * @param tng_data is the trajectory data container.
- * @param block_id is the ID of the data block of which to get the name.
- * @param name is a string, which is set to the name of the data block.
- * Memory must be reserved beforehand.
- * @param max_len is the maximum length of name.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code name != 0 \endcode The pointer to the name string
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if the data block is found, TNG_FAILURE (1)
- * if a minor error has occured or the data block is not found or
- * TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_data_block_name_get
-                (const tng_trajectory_t tng_data,
-                 const int64_t block_id,
-                 char *name,
-                 const int max_len);
-
-/** @brief Get the dependency of a data block of a specific ID.
- * @param tng_data is the trajectory data container.
- * @param block_id is the ID of the data block of which to get the name.
- * @param block_dependency is a pointer to the dependency of the data block.
- * If the block is frame dependent it will be set to TNG_FRAME_DEPENDENT,
- * if it is particle dependent it will be set to TNG_PARTICLE_DEPENDENT and
- * if it is both it will be set to TNG_FRAME_DEPENDENT & TNG_PARTICLE_DEPENDENT.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code block_dependency != 0 \endcode The pointer to the block dependency
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if the data block is found, TNG_FAILURE (1)
- * if a minor error has occured or the data block is not found or
- * TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_data_block_dependency_get
-                (const tng_trajectory_t tng_data,
-                 const int64_t block_id,
-                 int *block_dependency);
-
-/** @brief Get the number of values per frame of a data block of a specific ID.
- * @param tng_data is the trajectory data container.
- * @param block_id is the ID of the data block of which to get the name.
- * @param n_values_per_frame is a pointer set to the number of values per frame.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code n_values_per_frame != 0 \endcode The pointer to the number of values
- * per frame must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if the data block is found, TNG_FAILURE (1)
- * if a minor error has occured or the data block is not found or
- * TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_data_block_num_values_per_frame_get
-                (const tng_trajectory_t tng_data,
-                 const int64_t block_id,
-                 int64_t *n_values_per_frame);
-
-/**
- * @brief Write data of one trajectory frame to the output_file of tng_data.
- * @param tng_data is a trajectory data container. tng_data->output_file_path
- * specifies which file to write to. If the file (output_file) is not open it
- * will be opened.
- * @param frame_nr is the index number of the frame to write.
- * @param block_id is the ID of the data block to write the data to.
- * @param values is an array of data to write. The length of the array should
- * equal n_values_per_frame.
- * @param hash_mode is an option to decide whether to use the md5 hash or not.
- * If hash_mode == TNG_USE_HASH the written md5 hash in the file will be
- * compared to the md5 hash of the read contents to ensure valid data.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code frame_nr >= 0 \endcode The frame number to write must be >= 0.
- * @pre \code values != 0 \endcode The pointer to the values must not be a NULL
- * pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_frame_data_write
-                (const tng_trajectory_t tng_data,
-                 const int64_t frame_nr,
-                 const int64_t block_id,
-                 const void *values,
-                 const char hash_mode);
-
-/**
- * @brief Write particle data of one trajectory frame to the output_file of
- * tng_data.
- * @param tng_data is a trajectory data container. tng_data->output_file_path
- * specifies which file to write to. If the file (output_file) is not open it
- * will be opened.
- * @param frame_nr is the index number of the frame to write.
- * @param block_id is the ID of the data block to write the data to.
- * @param val_first_particle is the number of the first particle in the data
- * array.
- * @param val_n_particles is the number of particles in the data array.
- * @param values is a 1D-array of data to write. The length of the array should
- * equal n_particles * n_values_per_frame.
- * @param hash_mode is an option to decide whether to use the md5 hash or not.
- * If hash_mode == TNG_USE_HASH the written md5 hash in the file will be
- * compared to the md5 hash of the read contents to ensure valid data.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code frame_nr >= 0 \endcode The frame number to write must be >= 0.
- * @pre \code val_first_particle >= 0 \endcode The number of the
- * first particle must be >= 0.
- * @pre \code val_n_particles >= 0 \endcode The number of particles must be >= 0.
- * @pre \code values != 0 \endcode The pointer to the values must not be a NULL
- * pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_frame_particle_data_write
-                (const tng_trajectory_t tng_data,
-                 const int64_t frame_nr,
-                 const int64_t block_id,
-                 const int64_t val_first_particle,
-                 const int64_t val_n_particles,
-                 const void *values,
-                 const char hash_mode);
-
-/**
- * @brief Free data of an array of values (2D).
- * @param tng_data is a trajectory data container.
- * @param values is the 2D array to free and will be set to 0 afterwards.
- * @param n_frames is the number of frames in the data array.
- * @param n_values_per_frame is the number of values per frame in the data array.
- * @param type is the data type of the data in the array (e.g. int/float/char).
- * @details This function should not be used. The data_values union is obsolete.
- * This function also causes memory leaks, but its signature cannot be changed
- * without disturbing the API.
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_data_values_free
-                (const tng_trajectory_t tng_data,
-                 union data_values **values,
-                 const int64_t n_frames,
-                 const int64_t n_values_per_frame,
-                 const char type);
-
-/**
- * @brief Free data of an array of values (3D).
- * @param tng_data is a trajectory data container.
- * @param values is the array to free and will be set to 0 afterwards.
- * @param n_frames is the number of frames in the data array.
- * @param n_particles is the number of particles in the data array.
- * @param n_values_per_frame is the number of values per frame in the data array.
- * @param type is the data type of the data in the array (e.g. int/float/char).
- * @details This function should not be used. The data_values union is obsolete.
- * This function also causes memory leaks, but its signature cannot be changed
- * without disturbing the API.
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_particle_data_values_free
-                (const tng_trajectory_t tng_data,
-                 union data_values ***values,
-                 const int64_t n_frames,
-                 const int64_t n_particles,
-                 const int64_t n_values_per_frame,
-                 const char type);
-
-/**
- * @brief Retrieve non-particle data, from the last read frame set. Obsolete!
- * @param tng_data is a trajectory data container. tng_data->input_file_path specifies
- * which file to read from. If the file (input_file) is not open it will be
- * opened.
- * @param block_id is the id number of the particle data block to read.
- * @param values is a pointer to a 2-dimensional array (memory unallocated), which
- * will be filled with data. The array will be sized
- * (n_frames * n_values_per_frame).
- * Since ***values is allocated in this function it is the callers
- * responsibility to free the memory.
- * @param n_frames is set to the number of frames in the returned data. This is
- * needed to properly reach and/or free the data afterwards.
- * @param n_values_per_frame is set to the number of values per frame in the data.
- * This is needed to properly reach and/or free the data afterwards.
- * @param type is set to the data type of the data in the array.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code n_frames != 0 \endcode The pointer to the number of frames
- * must not be a NULL pointer.
- * @pre \code n_values_per_frame != 0 \endcode The pointer to the number of
- * values per frame must not be a NULL pointer.
- * @pre \code type != 0 \endcode The pointer to the data type must not
- * be a NULL pointer.
- * @details This function is obsolete and only retained for compatibility. Use
- * tng_data_vector_get() instead.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_data_get(const tng_trajectory_t tng_data,
-                                                   const int64_t block_id,
-                                                   union data_values ***values,
-                                                   int64_t *n_frames,
-                                                   int64_t *n_values_per_frame,
-                                                   char *type);
-
-/**
- * @brief Retrieve a vector (1D array) of non-particle data, from the last read frame set.
- * @param tng_data is a trajectory data container. tng_data->input_file_path specifies
- * which file to read from. If the file (input_file) is not open it will be
- * opened.
- * @param block_id is the id number of the particle data block to read.
- * @param values is a pointer to a 1-dimensional array (memory unallocated), which
- * will be filled with data. The length of the array will be
- * (n_frames_with_data (see stride_length) * n_values_per_frame).
- * Since **values is allocated in this function it is the callers
- * responsibility to free the memory.
- * @param n_frames is set to the number of particles in the returned data. This is
- * needed to properly reach and/or free the data afterwards.
- * @param stride_length is set to the stride length of the returned data.
- * @param n_values_per_frame is set to the number of values per frame in the data.
- * This is needed to properly reach and/or free the data afterwards.
- * @param type is set to the data type of the data in the array.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code n_frames != 0 \endcode The pointer to the number of frames
- * must not be a NULL pointer.
- * @pre \code stride_length != 0 \endcode The pointer to the stride length
- * must not be a NULL pointer.
- * @pre \code n_values_per_frame != 0 \endcode The pointer to the number of
- * values per frame must not be a NULL pointer.
- * @pre \code type != 0 \endcode The pointer to the data type must not
- * be a NULL pointer.
- * @details This does only work for numerical (int, float, double) data.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_data_vector_get
-                (const tng_trajectory_t tng_data,
-                 const int64_t block_id,
-                 void **values,
-                 int64_t *n_frames,
-                 int64_t *stride_length,
-                 int64_t *n_values_per_frame,
-                 char *type);
-
-/**
- * @brief Read and retrieve non-particle data, in a specific interval. Obsolete!
- * @param tng_data is a trajectory data container. tng_data->input_file_path specifies
- * which file to read from. If the file (input_file) is not open it will be
- * opened.
- * @param block_id is the id number of the particle data block to read.
- * @param start_frame_nr is the index number of the first frame to read.
- * @param end_frame_nr is the index number of the last frame to read.
- * @param hash_mode is an option to decide whether to use the md5 hash or not.
- * If hash_mode == TNG_USE_HASH the md5 hash in the file will be
- * compared to the md5 hash of the read contents to ensure valid data.
- * @param values is a pointer to a 2-dimensional array (memory unallocated), which
- * will be filled with data. The array will be sized
- * (n_frames * n_values_per_frame).
- * Since ***values is allocated in this function it is the callers
- * responsibility to free the memory.
- * @param n_values_per_frame is set to the number of values per frame in the data.
- * This is needed to properly reach and/or free the data afterwards.
- * @param type is set to the data type of the data in the array.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code start_frame_nr <= end_frame_nr \endcode The first frame must be before
- * the last frame.
- * @pre \code n_values_per_frame != 0 \endcode The pointer to the number of
- * values per frame must not be a NULL pointer.
- * @pre \code type != 0 \endcode The pointer to the data type must not
- * be a NULL pointer.
- * @details This function is obsolete and only retained for compatibility. Use
- * tng_data_vector_interval_get() instead.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_data_interval_get
-                (const tng_trajectory_t tng_data,
-                 const int64_t block_id,
-                 const int64_t start_frame_nr,
-                 const int64_t end_frame_nr,
-                 const char hash_mode,
-                 union data_values ***values,
-                 int64_t *n_values_per_frame,
-                 char *type);
-
-/**
- * @brief Read and retrieve a vector (1D array) of non-particle data,
- * in a specific interval.
- * @param tng_data is a trajectory data container. tng_data->input_file_path specifies
- * which file to read from. If the file (input_file) is not open it will be
- * opened.
- * @param block_id is the id number of the particle data block to read.
- * @param start_frame_nr is the index number of the first frame to read.
- * @param end_frame_nr is the index number of the last frame to read.
- * @param hash_mode is an option to decide whether to use the md5 hash or not.
- * If hash_mode == TNG_USE_HASH the md5 hash in the file will be
- * compared to the md5 hash of the read contents to ensure valid data.
- * @param values is a pointer to a 1-dimensional array (memory unallocated), which
- * will be filled with data. The length of the array will be
- * (n_frames_with_data (see stride_length) * n_values_per_frame).
- * Since **values is allocated in this function it is the callers
- * responsibility to free the memory.
- * @param stride_length is set to the stride length (writing interval) of
- * the data.
- * @param n_values_per_frame is set to the number of values per frame in the data.
- * This is needed to properly reach and/or free the data afterwards.
- * @param type is set to the data type of the data in the array.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code start_frame_nr <= end_frame_nr \endcode The first frame must be before
- * the last frame.
- * @pre \code stride_length != 0 \endcode The pointer to the stride length
- * must not be a NULL pointer.
- * @pre \code n_values_per_frame != 0 \endcode The pointer to the number of
- * values per frame must not be a NULL pointer.
- * @pre \code type != 0 \endcode The pointer to the data type must not
- * be a NULL pointer.
- * @details This does only work for numerical (int, float, double) data.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_data_vector_interval_get
-                (const tng_trajectory_t tng_data,
-                 const int64_t block_id,
-                 const int64_t start_frame_nr,
-                 const int64_t end_frame_nr,
-                 const char hash_mode,
-                 void **values,
-                 int64_t *stride_length,
-                 int64_t *n_values_per_frame,
-                 char *type);
-
-/**
- * @brief Retrieve particle data, from the last read frame set. Obsolete!
- * @details The particle dimension of the returned values array is translated
- * to real particle numbering, i.e. the numbering of the actual molecular
- * system.
- * @param tng_data is a trajectory data container. tng_data->input_file_path
- * specifies which file to read from. If the file (input_file) is not open it
- * will be opened.
- * @param block_id is the id number of the particle data block to read.
- * @param values is a pointer to a 3-dimensional array (memory unallocated), which
- * will be filled with data. The array will be sized
- * (n_frames * n_particles * n_values_per_frame).
- * Since ****values is allocated in this function it is the callers
- * responsibility to free the memory.
- * @param n_frames is set to the number of frames in the returned data. This is
- * needed to properly reach and/or free the data afterwards.
- * @param n_particles is set to the number of particles in the returned data. This is
- * needed to properly reach and/or free the data afterwards.
- * @param n_values_per_frame is set to the number of values per frame in the data.
- * This is needed to properly reach and/or free the data afterwards.
- * @param type is set to the data type of the data in the array.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code n_frames != 0 \endcode The pointer to the number of frames
- * must not be a NULL pointer.
- * @pre \code n_particles != 0 \endcode The pointer to the number of particles must
- * not be a NULL pointer.
- * @pre \code n_values_per_frame != 0 \endcode The pointer to the number of
- * values per frame must not be a NULL pointer.
- * @pre \code type != 0 \endcode The pointer to the data type must not
- * be a NULL pointer.
- * @details This function is obsolete and only retained for compatibility. Use
- * tng_particle_data_vector_get() instead.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_particle_data_get
-                (const tng_trajectory_t tng_data,
-                 const int64_t block_id,
-                 union data_values ****values,
-                 int64_t *n_frames,
-                 int64_t *n_particles,
-                 int64_t *n_values_per_frame,
-                 char *type);
-
-/**
- * @brief Retrieve a vector (1D array) of particle data, from the last read frame set.
- * @details The particle dimension of the returned values array is translated
- * to real particle numbering, i.e. the numbering of the actual molecular
- * system.
- * @param tng_data is a trajectory data container. tng_data->input_file_path
- * specifies which file to read from. If the file (input_file) is not open it
- * will be opened.
- * @param block_id is the id number of the particle data block to read.
- * @param values is a pointer to a 1-dimensional array (memory unallocated), which
- * will be filled with data. The length of the array will be
- * (n_frames_with_data (see stride_length) * n_particles * n_values_per_frame).
- * Since **values is allocated in this function it is the callers
- * responsibility to free the memory.
- * @param n_frames is set to the number of frames in the returned data. This is
- * needed to properly reach and/or free the data afterwards.
- * @param stride_length is set to the stride length of the returned data.
- * @param n_particles is set to the number of particles in the returned data. This is
- * needed to properly reach and/or free the data afterwards.
- * @param n_values_per_frame is set to the number of values per frame in the data.
- * This is needed to properly reach and/or free the data afterwards.
- * @param type is set to the data type of the data in the array.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code n_particles != 0 \endcode The pointer to the number of particles must
- * not be a NULL pointer.
- * @pre \code stride_length != 0 \endcode The pointer to the stride length
- * must not be a NULL pointer.
- * @pre \code n_values_per_frame != 0 \endcode The pointer to the number of
- * values per frame must not be a NULL pointer.
- * @pre \code type != 0 \endcode The pointer to the data type must not
- * be a NULL pointer.
- * @details This does only work for numerical (int, float, double) data.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_particle_data_vector_get
-                (const tng_trajectory_t tng_data,
-                 const int64_t block_id,
-                 void **values,
-                 int64_t *n_frames,
-                 int64_t *stride_length,
-                 int64_t *n_particles,
-                 int64_t *n_values_per_frame,
-                 char *type);
-
-/**
- * @brief Read and retrieve particle data, in a specific interval. Obsolete!
- * @details The particle dimension of the returned values array is translated
- * to real particle numbering, i.e. the numbering of the actual molecular
- * system.
- * @param tng_data is a trajectory data container. tng_data->input_file_path specifies
- * which file to read from. If the file (input_file) is not open it will be
- * opened.
- * @param block_id is the id number of the particle data block to read.
- * @param start_frame_nr is the index number of the first frame to read.
- * @param end_frame_nr is the index number of the last frame to read.
- * @param hash_mode is an option to decide whether to use the md5 hash or not.
- * If hash_mode == TNG_USE_HASH the md5 hash in the file will be
- * compared to the md5 hash of the read contents to ensure valid data.
- * @param values is a pointer to a 3-dimensional array (memory unallocated), which
- * will be filled with data. The array will be sized
- * (n_frames * n_particles * n_values_per_frame).
- * Since ****values is allocated in this function it is the callers
- * responsibility to free the memory.
- * @param n_particles is set to the number of particles in the returned data. This is
- * needed to properly reach and/or free the data afterwards.
- * @param n_values_per_frame is set to the number of values per frame in the data.
- * This is needed to properly reach and/or free the data afterwards.
- * @param type is set to the data type of the data in the array.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code n_frames != 0 \endcode The pointer to the number of frames
- * must not be a NULL pointer.
- * @pre \code start_frame_nr <= end_frame_nr \endcode The first frame must be before
- * the last frame.
- * @pre \code n_particles != 0 \endcode The pointer to the number of particles must
- * not be a NULL pointer.
- * @pre \code n_values_per_frame != 0 \endcode The pointer to the number of
- * values per frame must not be a NULL pointer.
- * @pre \code type != 0 \endcode The pointer to the data type must not
- * be a NULL pointer.
- * @details This function is obsolete and only retained for compatibility. Use
- * tng_particle_data_vector_interval_get() instead.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_particle_data_interval_get
-                (const tng_trajectory_t tng_data,
-                 const int64_t block_id,
-                 const int64_t start_frame_nr,
-                 const int64_t end_frame_nr,
-                 const char hash_mode,
-                 union data_values ****values,
-                 int64_t *n_particles,
-                 int64_t *n_values_per_frame,
-                 char *type);
-
-/**
- * @brief Read and retrieve a vector (1D array) particle data, in a
- * specific interval.
- * @details The particle dimension of the returned values array is translated
- * to real particle numbering, i.e. the numbering of the actual molecular
- * system.
- * @param tng_data is a trajectory data container. tng_data->input_file_path specifies
- * which file to read from. If the file (input_file) is not open it will be
- * opened.
- * @param block_id is the id number of the particle data block to read.
- * @param start_frame_nr is the index number of the first frame to read.
- * @param end_frame_nr is the index number of the last frame to read.
- * @param hash_mode is an option to decide whether to use the md5 hash or not.
- * If hash_mode == TNG_USE_HASH the md5 hash in the file will be
- * compared to the md5 hash of the read contents to ensure valid data.
- * @param values is a pointer to a 1-dimensional array (memory unallocated), which
- * will be filled with data. The length of the array will be
- * (n_frames_with_data (see stride_length) * n_particles * n_values_per_frame).
- * Since **values is allocated in this function it is the callers
- * responsibility to free the memory.
- * @param stride_length is set to the stride length (writing interval) of
- * the data.
- * @param n_particles is set to the number of particles in the returned data. This is
- * needed to properly reach and/or free the data afterwards.
- * @param n_values_per_frame is set to the number of values per frame in the data.
- * This is needed to properly reach and/or free the data afterwards.
- * @param type is set to the data type of the data in the array.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code start_frame_nr <= end_frame_nr \endcode The first frame must be before
- * the last frame.
- * @pre \code n_particles != 0 \endcode The pointer to the number of particles must
- * not be a NULL pointer.
- * @pre \code stride_length != 0 \endcode The pointer to the stride length
- * must not be a NULL pointer.
- * @pre \code n_values_per_frame != 0 \endcode The pointer to the number of
- * values per frame must not be a NULL pointer.
- * @pre \code type != 0 \endcode The pointer to the data type must not
- * be a NULL pointer.
- * @details This does only work for numerical (int, float, double) data.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_particle_data_vector_interval_get
-                (const tng_trajectory_t tng_data,
-                 const int64_t block_id,
-                 const int64_t start_frame_nr,
-                 const int64_t end_frame_nr,
-                 const char hash_mode,
-                 void **values,
-                 int64_t *n_particles,
-                 int64_t *stride_length,
-                 int64_t *n_values_per_frame,
-                 char *type);
-
-/**
- * @brief Get the stride length of a specific data (particle dependency does not matter)
- * block, either in the current frame set or of a specific frame.
- * @param tng_data is the trajectory data container.
- * @param block_id is the block ID of the data block, of which to retrieve the
- * stride length of the data.
- * @param frame is the frame from which to get the stride length. If frame is set to -1
- * no specific frame will be used, but instead the first frame, starting from the last read
- * frame set, containing the data block will be used.
- * @param stride_length is set to the value of the stride length of the data block.
- * @return  TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occurred or TNG_CRITICAL (2) if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_data_get_stride_length
-                (const tng_trajectory_t tng_data,
-                 const int64_t block_id,
-                 int64_t frame,
-                 int64_t *stride_length);
-
-/**
- * @brief Get the date and time of initial file creation in ISO format (string).
- * @param tng_data is a trajectory data container.
- * @param time is a pointer to the string in which the date will be stored. Memory
- * must be reserved beforehand.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code time != 0 \endcode The pointer to the time must not be a NULL
- * pointer.
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_time_get_str
-                (const tng_trajectory_t tng_data,
-                 char *time);
-/** @} */ /* end of group1 */
-
-/** @defgroup group2 High-level API
- *  These functions make it easier to access and output TNG data. They
- *  are recommended unless there is a special reason to use the more
- *  detailed functions available in the low-level API.
- *  @{
- */
-
-/**
- * @brief High-level function for opening and initializing a TNG trajectory.
- * @param filename is a string containing the name of the trajectory to open.
- * @param mode specifies the file mode of the trajectory. Can be set to 'r',
- * 'w' or 'a' for reading, writing or appending respectively.
- * @param tng_data_p is a pointer to the opened trajectory. This will be
- * allocated by the TNG library. The trajectory must be
- * closed by the user, whereby memory is freed.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code filename != 0 \endcode The pointer to the filename must not be a
- * NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_trajectory_open
-                (const char *filename,
-                 const char mode,
-                 tng_trajectory_t *tng_data_p);
-
-/**
- * @brief High-level function for closing a TNG trajectory.
- * @param tng_data_p is a pointer to the trajectory to close. The memory
- * will be freed after finalising the writing.
- * @return TNG_SUCCESS (0) if successful.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_trajectory_close
-                (tng_trajectory_t *tng_data_p);
-
-/**
- * @brief High-level function for getting the time (in seconds) of a frame.
- * @param tng_data is the trajectory containing the frame.
- * @param frame_nr is the frame number of which to get the time.
- * @param time is set to the time (in seconds) of the specified frame.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code time != 0 \endcode The pointer to the time must not be a
- * NULL pointer.
- * @return TNG_SUCCESS (0) if successful or TNG_FAILURE (1) if a
- * minor error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_time_of_frame_get
-                (const tng_trajectory_t tng_data,
-                 const int64_t frame_nr,
-                 double *time);
-
-/*
- * @brief High-level function for getting the molecules in the mol system.
- * @param tng_data is the trajectory containing the mol system.
- * @param n_mols is set to the number of molecules in the system.
- * @param molecule_cnt_list will be pointing to the list of counts of each molecule
- * in the mol system.
- * @param mols pointing to the list of molecules in the mol system.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code n_mols != 0 \endcode The pointer to the number of molecules must
- * not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful.
- */
-/*tng_function_status DECLSPECDLLEXPORT tng_util_trajectory_molecules_get
-                (const tng_trajectory_t tng_data,
-                 int64_t *n_mols,
-                 int64_t **molecule_cnt_list,
-                 tng_molecule_t *mols);
-*/
-/*
- * @brief High-level function for adding a molecule to the mol system.
- * @param tng_data is the trajectory containing the mol system.
- * @param name is the name of the molecule to add.
- * @param cnt is the count of the molecule.
- * @param mol is set to point to the newly created molecule.
- * @pre \code name != 0 \endcode The pointer to the name must not be a
- * NULL pointer.
- * @pre \code cnt >= 0 \endcode The requested count must be >= 0.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured or TNG_CRITICAL (2) if a major error has occured.
- */
-/*tng_function_status DECLSPECDLLEXPORT tng_util_trajectory_molecule_add
-                (const tng_trajectory_t tng_data,
-                 const char *name,
-                 const int64_t cnt,
-                 tng_molecule_t *mol);
-*/
-/*
-// tng_function_status DECLSPECDLLEXPORT tng_util_molecule_particles_get
-//                 (const tng_trajectory_t tng_data,
-//                  const tng_molecule_t mol,
-//                  int64_t *n_particles,
-//                  char ***names,
-//                  char ***types,
-//                  char ***res_names,
-//                  int64_t **res_ids,
-//                  char ***chain_names,
-//                  int64_t **chain_ids);
-//
-// tng_function_status DECLSPECDLLEXPORT tng_util_molecule_particles_set
-//                 (const tng_trajectory_t tng_data,
-//                  tng_molecule_t mol,
-//                  const int64_t n_particles,
-//                  const char **names,
-//                  const char **types,
-//                  const char **res_names,
-//                  const int64_t *res_ids,
-//                  const char **chain_names,
-//                  const int64_t *chain_ids);
-*/
-/**
- * @brief High-level function for reading the positions of all particles
- * from all frames.
- * @param tng_data is the trajectory to read from.
- * @param positions will be set to point at a 1-dimensional array of floats,
- * which will contain the positions. The data is stored sequentially in order
- * of frames. For each frame the positions (x, y and z coordinates) are stored.
- * The variable may point at already allocated memory or be a NULL pointer.
- * The memory must be freed afterwards.
- * @param stride_length will be set to the writing interval of the stored data.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code positions != 0 \endcode The pointer to the positions array
- * must not be a NULL pointer.
- * @pre \code stride_length != 0 \endcode The pointer to the stride length
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_pos_read
-                (const tng_trajectory_t tng_data,
-                 float **positions,
-                 int64_t *stride_length);
-
-/**
- * @brief High-level function for reading the velocities of all particles
- * from all frames.
- * @param tng_data is the trajectory to read from.
- * @param velocities will be set to point at a 1-dimensional array of floats,
- * which will contain the velocities. The data is stored sequentially in order
- * of frames. For each frame the velocities (in x, y and z) are stored. The
- * variable may point at already allocated memory or be a NULL pointer.
- * The memory must be freed afterwards.
- * @param stride_length will be set to the writing interval of the stored data.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code velocities != 0 \endcode The pointer to the velocities array
- * must not be a NULL pointer.
- * @pre \code stride_length != 0 \endcode The pointer to the stride length
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_vel_read
-                (const tng_trajectory_t tng_data,
-                 float **velocities,
-                 int64_t *stride_length);
-
-/**
- * @brief High-level function for reading the forces of all particles
- * from all frames.
- * @param tng_data is the trajectory to read from.
- * @param forces will be set to point at a 1-dimensional array of floats,
- * which will contain the forces. The data is stored sequentially in order
- * of frames. For each frame the forces (in x, y and z) are stored. The
- * variable may point at already allocated memory or be a NULL pointer.
- * The memory must be freed afterwards.
- * @param stride_length will be set to the writing interval of the stored data.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code forces != 0 \endcode The pointer to the forces array
- * must not be a NULL pointer.
- * @pre \code stride_length != 0 \endcode The pointer to the stride length
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_force_read
-                (const tng_trajectory_t tng_data,
-                 float **forces,
-                 int64_t *stride_length);
-
-/**
- * @brief High-level function for reading the box shape from all frames.
- * @param tng_data is the trajectory to read from.
- * @param box_shape will be set to point at a 1-dimensional array of floats,
- * which will contain the box shape. The data is stored sequentially in order
- * of frames. The variable may point at already allocated memory or be a NULL pointer.
- * If the box shape is not modified during the trajectory, but as general data,
- * that will be returned instead.
- * @param stride_length will be set to the writing interval of the stored data.
- * @details This function should only be used if number of values used to specify
- * the box shape is known (by default TNG uses 9 values) since it does not
- * return the number of values in the array. It is recommended to use
- * tng_data_vector_interval_get() instead.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code box_shape != 0 \endcode The pointer to the box_shape array
- * must not be a NULL pointer.
- * @pre \code stride_length != 0 \endcode The pointer to the stride length
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_read
-                (const tng_trajectory_t tng_data,
-                 float **box_shape,
-                 int64_t *stride_length);
-
-/**
- * @brief High-level function for reading the next frame of particle-dependent
- * data of a specific type.
- * @param tng_data is the trajectory to read from.
- * @param block_id is the ID number of the block containing the data of interest.
- * @param values will be set to point at a 1-dimensional array containing the
- * requested data. The variable may point at already allocated memory (which will
- * be reallocated with realloc()), or be a
- * NULL pointer. The calling code must free the memory afterwards.
- * @param data_type will be pointing to a character indicating the size of the
- * data of the returned values, e.g. TNG_INT_DATA, TNG_FLOAT_DATA or TNG_DOUBLE_DATA.
- * @param retrieved_frame_number will be pointing at the frame number of the
- * returned frame.
- * @param retrieved_time will be pointing at the time stamp of the returned
- * frame.
- * @details If no frame has been read before the first frame of the trajectory
- * is read.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code values != 0 \endcode The pointer to the values array
- * must not be a NULL pointer.
- * @pre \code data_type != 0 \endcode The pointer to the data type of the
- * returned data must not be a NULL pointer.
- * @pre \code retrieved_frame_number != 0 \endcode The pointer to the frame
- * number of the returned data must not be a NULL pointer.
- * @pre \code retrieved_time != 0 \endcode The pointer to the time of the
- * returned data must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_particle_data_next_frame_read
-                (const tng_trajectory_t tng_data,
-                 const int64_t block_id,
-                 void **values,
-                 char *data_type,
-                 int64_t *retrieved_frame_number,
-                 double *retrieved_time);
-
-/**
- * @brief High-level function for reading the next frame of non-particle-dependent
- * data of a specific type.
- * @param tng_data is the trajectory to read from.
- * @param block_id is the ID number of the block containing the data of interest.
- * @param values will be set to point at a 1-dimensional array containing the
- * requested data. The variable may point at already allocated memory or be a
- * NULL pointer. The memory must be freed afterwards.
- * @param data_type will be pointing to a character indicating the size of the
- * data of the returned values, e.g. TNG_INT_DATA, TNG_FLOAT_DATA or TNG_DOUBLE_DATA.
- * @param retrieved_frame_number will be pointing at the frame number of the
- * returned frame.
- * @param retrieved_time will be pointing at the time stamp of the returned
- * frame.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code values != 0 \endcode The pointer to the values array
- * must not be a NULL pointer.
- * @pre \code data_type != 0 \endcode The pointer to the data type of the
- * returned data must not be a NULL pointer.
- * @pre \code retrieved_frame_number != 0 \endcode The pointer to the frame
- * number of the returned data must not be a NULL pointer.
- * @pre \code retrieved_time != 0 \endcode The pointer to the time of the
- * returned data must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_non_particle_data_next_frame_read
-                (const tng_trajectory_t tng_data,
-                 const int64_t block_id,
-                 void **values,
-                 char *data_type,
-                 int64_t *retrieved_frame_number,
-                 double *retrieved_time);
-
-/**
- * @brief High-level function for reading the positions of all particles
- * from a specific range of frames.
- * @param tng_data is the trajectory to read from.
- * @param first_frame is the first frame to return position data from.
- * @param last_frame is the last frame to return position data from.
- * @param positions will be set to point at a 1-dimensional array of floats,
- * which will contain the positions. The data is stored sequentially in order
- * of frames. For each frame the positions (x, y and z coordinates) are stored.
- * The variable may point at already allocated memory or be a NULL pointer.
- * The memory must be freed afterwards.
- * @param stride_length will be set to the writing interval of the stored data.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code start_frame_nr <= end_frame_nr \endcode The first frame must be before
- * the last frame.
- * @pre \code positions != 0 \endcode The pointer to the positions array
- * must not be a NULL pointer.
- * @pre \code stride_length != 0 \endcode The pointer to the stride length
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_pos_read_range
-                (const tng_trajectory_t tng_data,
-                 const int64_t first_frame,
-                 const int64_t last_frame,
-                 float **positions,
-                 int64_t *stride_length);
-
-/**
- * @brief High-level function for reading the velocities of all particles
- * from a specific range of frames.
- * @param tng_data is the trajectory to read from.
- * @param first_frame is the first frame to return position data from.
- * @param last_frame is the last frame to return position data from.
- * @param velocities will be set to point at a 1-dimensional array of floats,
- * which will contain the velocities. The data is stored sequentially in order
- * of frames. For each frame the velocities (in x, y and z) are stored. The
- * variable may point at already allocated memory or be a NULL pointer.
- * The memory must be freed afterwards.
- * @param stride_length will be set to the writing interval of the stored data.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code start_frame_nr <= end_frame_nr \endcode The first frame must be before
- * the last frame.
- * @pre \code velocities != 0 \endcode The pointer to the velocities array
- * must not be a NULL pointer.
- * @pre \code stride_length != 0 \endcode The pointer to the stride length
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_vel_read_range
-                (const tng_trajectory_t tng_data,
-                 const int64_t first_frame,
-                 const int64_t last_frame,
-                 float **velocities,
-                 int64_t *stride_length);
-
-/**
- * @brief High-level function for reading the forces of all particles
- * from a specific range of frames.
- * @param tng_data is the trajectory to read from.
- * @param first_frame is the first frame to return position data from.
- * @param last_frame is the last frame to return position data from.
- * @param forces will be set to point at a 1-dimensional array of floats,
- * which will contain the forces. The data is stored sequentially in order
- * of frames. For each frame the forces (in x, y and z) are stored. The
- * variable may point at already allocated memory or be a NULL pointer.
- * The memory must be freed afterwards.
- * @param stride_length will be set to the writing interval of the stored data.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code start_frame_nr <= end_frame_nr \endcode The first frame must be before
- * the last frame.
- * @pre \code forces != 0 \endcode The pointer to the forces array
- * must not be a NULL pointer.
- * @pre \code stride_length != 0 \endcode The pointer to the stride length
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_force_read_range
-                (const tng_trajectory_t tng_data,
-                 const int64_t first_frame,
-                 const int64_t last_frame,
-                 float **forces,
-                 int64_t *stride_length);
-
-/**
- * @brief High-level function for reading the box shape
- * from a specific range of frames.
- * @param tng_data is the trajectory to read from.
- * @param first_frame is the first frame to return position data from.
- * @param last_frame is the last frame to return position data from.
- * @param box_shape will be set to point at a 1-dimensional array of floats,
- * which will contain the box shape. The data is stored sequentially in order
- * of frames.
- * If the box shape is not modified during the trajectory, but as general data,
- * that will be returned instead. The
- * variable may point at already allocated memory or be a NULL pointer.
- * The memory must be freed afterwards.
- * @param stride_length will be set to the writing interval of the stored data.
- * @details This function should only be used if number of values used to specify
- * the box shape is known (by default TNG uses 9 values) since it does not
- * return the number of values in the array. It is recommended to use
- * tng_data_vector_interval_get() instead.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code start_frame_nr <= end_frame_nr \endcode The first frame must be before
- * the last frame.
- * @pre \code box_shape != 0 \endcode The pointer to the box_shape array
- * must not be a NULL pointer.
- * @pre \code stride_length != 0 \endcode The pointer to the stride length
- * must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_read_range
-                (const tng_trajectory_t tng_data,
-                 const int64_t first_frame,
-                 const int64_t last_frame,
-                 float **box_shape,
-                 int64_t *stride_length);
-
-/**
- * @brief High-level function for setting the writing interval of data blocks.
- * @param tng_data is the trajectory to use.
- * @param i is the output interval, i.e. i == 10 means data written every 10th
- * frame.
- * @param n_values_per_frame is the number of values to store per frame. If the
- * data is particle dependent there will be n_values_per_frame stored per
- * particle each frame.
- * @param block_id is the ID of the block, of which to set the output interval.
- * @param block_name is a string that will be used as name of the block. Only
- * required if the block did not exist, i.e. a new block is created.
- * @param particle_dependency should be TNG_NON_PARTICLE_BLOCK_DATA (0) if the
- * data is not related to specific particles (e.g. box shape) or
- * TNG_PARTICLE_BLOCK_DATA (1) is it is related to specific particles (e.g.
- * positions). Only required if the block did not exist, i.e. a new block is
- * created.
- * @param compression is the compression routine to use when writing the data.
- * Only required if the block did not exist, i.e. a new block is created.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code i >= 0 \endcode The writing interval must be >= 0.
- * @details n_values_per_frame, block_name, particle_dependency and
- * compression are only used if the data block did not exist before calling
- * this function, in which case it is created.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_generic_write_interval_set
-                (const tng_trajectory_t tng_data,
-                 const int64_t i,
-                 const int64_t n_values_per_frame,
-                 const int64_t block_id,
-                 const char *block_name,
-                 const char particle_dependency,
-                 const char compression);
-
-/**
- * @brief High-level function for setting the writing interval of data blocks
- * containing double precision data.
- * @param tng_data is the trajectory to use.
- * @param i is the output interval, i.e. i == 10 means data written every 10th
- * frame.
- * @param n_values_per_frame is the number of values to store per frame. If the
- * data is particle dependent there will be n_values_per_frame stored per
- * particle each frame.
- * @param block_id is the ID of the block, of which to set the output interval.
- * @param block_name is a string that will be used as name of the block. Only
- * required if the block did not exist, i.e. a new block is created.
- * @param particle_dependency should be TNG_NON_PARTICLE_BLOCK_DATA (0) if the
- * data is not related to specific particles (e.g. box shape) or
- * TNG_PARTICLE_BLOCK_DATA (1) is it is related to specific particles (e.g.
- * positions). Only required if the block did not exist, i.e. a new block is
- * created.
- * @param compression is the compression routine to use when writing the data.
- * Only required if the block did not exist, i.e. a new block is created.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code i >= 0 \endcode The writing interval must be >= 0.
- * @details n_values_per_frame, block_name, particle_dependency and
- * compression are only used if the data block did not exist before calling
- * this function, in which case it is created.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_generic_write_interval_double_set
-                (const tng_trajectory_t tng_data,
-                 const int64_t i,
-                 const int64_t n_values_per_frame,
-                 const int64_t block_id,
-                 const char *block_name,
-                 const char particle_dependency,
-                 const char compression);
-
-/**
- * @brief High-level function for setting the writing interval of data blocks.
- * Obsolete! Use tng_util_generic_write_interval_set()
- * @param tng_data is the trajectory to use.
- * @param i is the output interval, i.e. i == 10 means data written every 10th
- * frame.
- * @param n_values_per_frame is the number of values to store per frame. If the
- * data is particle dependent there will be n_values_per_frame stored per
- * particle each frame.
- * @param block_id is the ID of the block, of which to set the output interval.
- * @param block_name is a string that will be used as name of the block. Only
- * required if the block did not exist, i.e. a new block is created.
- * @param particle_dependency should be TNG_NON_PARTICLE_BLOCK_DATA (0) if the
- * data is not related to specific particles (e.g. box shape) or
- * TNG_PARTICLE_BLOCK_DATA (1) is it is related to specific particles (e.g.
- * positions). Only required if the block did not exist, i.e. a new block is
- * created.
- * @param compression is the compression routine to use when writing the data.
- * Only required if the block did not exist, i.e. a new block is created.
- * @details n_values_per_frame, block_name, particle_dependency and
- * compression are only used if the data block did not exist before calling
- * this function, in which case it is created.
- * This function is replaced by the more correcly named
- * tng_util_generic_write_interval_set(), but is kept for compatibility.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_generic_write_frequency_set
-                (const tng_trajectory_t tng_data,
-                 const int64_t i,
-                 const int64_t n_values_per_frame,
-                 const int64_t block_id,
-                 const char *block_name,
-                 const char particle_dependency,
-                 const char compression);
-
-/**
- * @brief High-level function for setting the writing interval of position
- * data blocks.
- * @param tng_data is the trajectory to use.
- * @param i is the output interval, i.e. i == 10 means data written every 10th
- * frame.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code i >= 0 \endcode The writing interval must be >= 0.
- * @details This function uses tng_util_generic_write_interval_set() and will
- * create a positions data block if none exists.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_pos_write_interval_set
-                (const tng_trajectory_t tng_data,
-                 const int64_t i);
-
-/**
- * @brief High-level function for setting the writing interval of position
- * data blocks containing double precision data.
- * @param tng_data is the trajectory to use.
- * @param i is the output interval, i.e. i == 10 means data written every 10th
- * frame.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code i >= 0 \endcode The writing interval must be >= 0.
- * @details This function uses tng_util_generic_write_interval_set() and will
- * create a positions data block if none exists.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_pos_write_interval_double_set
-                (const tng_trajectory_t tng_data,
-                 const int64_t i);
-
-/**
- * @brief High-level function for setting the writing interval of position
- * data blocks. Obsolete! Use tng_util_pos_write_interval_set()
- * @param tng_data is the trajectory to use.
- * @param i is the output interval, i.e. i == 10 means data written every 10th
- * frame.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code i >= 0 \endcode The writing interval must be >= 0.
- * @details This function uses tng_util_generic_write_interval_set() and will
- * create a positions data block if none exists.
- * This function is replaced by the more correcly named
- * tng_util_pos_write_interval_set(), but is kept for compatibility.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_pos_write_frequency_set
-                (const tng_trajectory_t tng_data,
-                 const int64_t i);
-
-/**
- * @brief High-level function for setting the writing interval of velocity
- * data blocks.
- * @param tng_data is the trajectory to use.
- * @param i is the output interval, i.e. i == 10 means data written every 10th
- * frame.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code i >= 0 \endcode The writing interval must be >= 0.
- * @details This function uses tng_util_generic_write_interval_set() and will
- * create a velocities data block if none exists.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_vel_write_interval_set
-                (const tng_trajectory_t tng_data,
-                 const int64_t i);
-
-/**
- * @brief High-level function for setting the writing interval of velocity
- * data blocks containing double precision data.
- * @param tng_data is the trajectory to use.
- * @param i is the output interval, i.e. i == 10 means data written every 10th
- * frame.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code i >= 0 \endcode The writing interval must be >= 0.
- * @details This function uses tng_util_generic_write_interval_set() and will
- * create a velocities data block if none exists.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_vel_write_interval_double_set
-                (const tng_trajectory_t tng_data,
-                 const int64_t i);
-
-/**
- * @brief High-level function for setting the writing interval of velocity
- * data blocks. Obsolete! Use tng_util_vel_write_interval_set()
- * @param tng_data is the trajectory to use.
- * @param i is the output interval, i.e. i == 10 means data written every 10th
- * frame.
- * @details This function uses tng_util_generic_write_interval_set() and will
- * create a velocities data block if none exists.
- * This function is replaced by the more correcly named
- * tng_util_vel_write_interval_set(), but is kept for compatibility.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_vel_write_frequency_set
-                (const tng_trajectory_t tng_data,
-                 const int64_t i);
-
-/**
- * @brief High-level function for setting the writing interval of force
- * data blocks.
- * @param tng_data is the trajectory to use.
- * @param i is the output interval, i.e. i == 10 means data written every 10th
- * frame.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code i >= 0 \endcode The writing interval must be >= 0.
- * @details This function uses tng_util_generic_write_interval_set() and will
- * create a forces data block if none exists.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_force_write_interval_set
-                (const tng_trajectory_t tng_data,
-                 const int64_t i);
-
-/**
- * @brief High-level function for setting the writing interval of force
- * data blocks containing double precision data.
- * @param tng_data is the trajectory to use.
- * @param i is the output interval, i.e. i == 10 means data written every 10th
- * frame.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code i >= 0 \endcode The writing interval must be >= 0.
- * @details This function uses tng_util_generic_write_interval_set() and will
- * create a forces data block if none exists.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_force_write_interval_double_set
-                (const tng_trajectory_t tng_data,
-                 const int64_t i);
-
-/**
- * @brief High-level function for setting the writing interval of force
- * data blocks. Obsolete! Use tng_util_force_write_interval_set()
- * @param tng_data is the trajectory to use.
- * @param i is the output interval, i.e. i == 10 means data written every 10th
- * frame.
- * @details This function uses tng_util_generic_write_interval_set() and will
- * create a forces data block if none exists.
- * This function is replaced by the more correcly named
- * tng_util_force_write_interval_set(), but is kept for compatibility.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_force_write_frequency_set
-                (const tng_trajectory_t tng_data,
-                 const int64_t i);
-
-/**
- * @brief High-level function for setting the writing interval of box shape
- * data blocks.
- * @param tng_data is the trajectory to use.
- * @param i is the output interval, i.e. i == 10 means data written every 10th
- * frame.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code i >= 0 \endcode The writing interval must be >= 0.
- * @details This function uses tng_util_generic_write_interval_set() and will
- * create a box shape data block if none exists.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_write_interval_set
-                (const tng_trajectory_t tng_data,
-                 const int64_t i);
-
-/**
- * @brief High-level function for setting the writing interval of box shape
- * data blocks containing double precision data.
- * @param tng_data is the trajectory to use.
- * @param i is the output interval, i.e. i == 10 means data written every 10th
- * frame.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code i >= 0 \endcode The writing interval must be >= 0.
- * @details This function uses tng_util_generic_write_interval_set() and will
- * create a box shape data block if none exists.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_write_interval_double_set
-                (const tng_trajectory_t tng_data,
-                 const int64_t i);
-
-/**
- * @brief High-level function for setting the writing interval of velocity
- * data blocks. Obsolete! Use tng_util_box_shape_write_interval_set()
- * @param tng_data is the trajectory to use.
- * @param i is the output interval, i.e. i == 10 means data written every 10th
- * frame.
- * @details This function uses tng_util_generic_write_interval_set() and will
- * create a box shape data block if none exists.
- * This function is replaced by the more correcly named
- * tng_util_box_shape_write_interval_set(), but is kept for compatibility.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_write_frequency_set
-                (const tng_trajectory_t tng_data,
-                 const int64_t i);
-
-/**
- * @brief High-level function for writing data of one frame to a data block.
- * @param tng_data is the trajectory to use.
- * @param frame_nr is the frame number of the data. If frame_nr < 0 the
- * data is written as non-trajectory data.
- * @param values is a 1D array of data to add. The array should be of length
- * n_particles * n_values_per_frame if writing particle related data, otherwise
- * it should be n_values_per_frame.
- * @param n_values_per_frame is the number of values to store per frame. If the
- * data is particle dependent there will be n_values_per_frame stored per
- * particle each frame.
- * @param block_id is the ID of the block, of which to set the output interval.
- * @param block_name is a string that will be used as name of the block. Only
- * required if the block did not exist, i.e. a new block is created.
- * @param particle_dependency should be TNG_NON_PARTICLE_BLOCK_DATA (0) if the
- * data is not related to specific particles (e.g. box shape) or
- * TNG_PARTICLE_BLOCK_DATA (1) is it is related to specific particles (e.g.
- * positions). Only required if the block did not exist, i.e. a new block is
- * created.
- * @param compression is the compression routine to use when writing the data.
- * Only required if the block did not exist, i.e. a new block is created.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code values != 0 \endcode The pointer to the values array must not
- * be a NULL pointer.
- * @details n_values_per_frame, block_name, particle_dependency and
- * compression are only used if the data block did not exist before calling
- * this function, in which case it is created.
- * N.b. Data is written a whole block at a time. The data is not
- * actually written to disk until the frame set is finished or the TNG
- * trajectory is closed.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_generic_write
-                (const tng_trajectory_t tng_data,
-                 const int64_t frame_nr,
-                 const float *values,
-                 const int64_t n_values_per_frame,
-                 const int64_t block_id,
-                 const char *block_name,
-                 const char particle_dependency,
-                 const char compression);
-
-/**
- * @brief High-level function for writing data of one frame to a double precision
- * data block.
- * @param tng_data is the trajectory to use.
- * @param frame_nr is the frame number of the data. If frame_nr < 0 the
- * data is written as non-trajectory data.
- * @param values is a 1D array of data to add. The array should be of length
- * n_particles * n_values_per_frame if writing particle related data, otherwise
- * it should be n_values_per_frame.
- * @param n_values_per_frame is the number of values to store per frame. If the
- * data is particle dependent there will be n_values_per_frame stored per
- * particle each frame.
- * @param block_id is the ID of the block, of which to set the output interval.
- * @param block_name is a string that will be used as name of the block. Only
- * required if the block did not exist, i.e. a new block is created.
- * @param particle_dependency should be TNG_NON_PARTICLE_BLOCK_DATA (0) if the
- * data is not related to specific particles (e.g. box shape) or
- * TNG_PARTICLE_BLOCK_DATA (1) is it is related to specific particles (e.g.
- * positions). Only required if the block did not exist, i.e. a new block is
- * created.
- * @param compression is the compression routine to use when writing the data.
- * Only required if the block did not exist, i.e. a new block is created.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code values != 0 \endcode The pointer to the values array must not
- * be a NULL pointer.
- * @details n_values_per_frame, block_name, particle_dependency and
- * compression are only used if the data block did not exist before calling
- * this function, in which case it is created.
- * N.b. Data is written a whole block at a time. The data is not
- * actually written to disk until the frame set is finished or the TNG
- * trajectory is closed.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_generic_double_write
-                (const tng_trajectory_t tng_data,
-                 const int64_t frame_nr,
-                 const double *values,
-                 const int64_t n_values_per_frame,
-                 const int64_t block_id,
-                 const char *block_name,
-                 const char particle_dependency,
-                 const char compression);
-
-/**
- * @brief High-level function for adding data to positions data blocks.
- * @param tng_data is the trajectory to use.
- * @param frame_nr is the frame number of the data. If frame_nr < 0 the
- * data is written as non-trajectory data.
- * @param positions is a 1D array of data to add. The array should be of length
- * n_particles * 3.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code positions != 0 \endcode The pointer to the positions array must not
- * be a NULL pointer.
- * @details This function uses tng_util_generic_write() and will
- * create a positions data block if none exists. Positions are stored as three
- * values per frame and compressed using TNG compression.
- * N.b. Since compressed data is written a whole block at a time the data is not
- * actually written to disk until the frame set is finished or the TNG
- * trajectory is closed.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_pos_write
-                (const tng_trajectory_t tng_data,
-                 const int64_t frame_nr,
-                 const float *positions);
-
-/**
- * @brief High-level function for adding data to positions data blocks at double
- * precision.
- * @param tng_data is the trajectory to use.
- * @param frame_nr is the frame number of the data. If frame_nr < 0 the
- * data is written as non-trajectory data.
- * @param positions is a 1D array of data to add. The array should be of length
- * n_particles * 3.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code positions != 0 \endcode The pointer to the positions array must not
- * be a NULL pointer.
- * @details This function uses tng_util_generic_write() and will
- * create a positions data block if none exists. Positions are stored as three
- * values per frame and compressed using TNG compression.
- * N.b. Since compressed data is written a whole block at a time the data is not
- * actually written to disk until the frame set is finished or the TNG
- * trajectory is closed.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_pos_double_write
-                (const tng_trajectory_t tng_data,
-                 const int64_t frame_nr,
-                 const double *positions);
-
-/**
- * @brief High-level function for adding data to velocities data blocks.
- * @param tng_data is the trajectory to use.
- * @param frame_nr is the frame number of the data. If frame_nr < 0 the
- * data is written as non-trajectory data.
- * @param velocities is a 1D array of data to add. The array should be of length
- * n_particles * 3.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code velocities != 0 \endcode The pointer to the velocities array must not
- * be a NULL pointer.
- * @details This function uses tng_util_generic_write() and will
- * create a velocities data block if none exists. Velocities are stored as three
- * values per frame and compressed using TNG compression.
- * N.b. Since compressed data is written a whole block at a time the data is not
- * actually written to disk until the frame set is finished or the TNG
- * trajectory is closed.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_vel_write
-                (const tng_trajectory_t tng_data,
-                 const int64_t frame_nr,
-                 const float *velocities);
-
-/**
- * @brief High-level function for adding data to velocities data blocks at double
- * precision.
- * @param tng_data is the trajectory to use.
- * @param frame_nr is the frame number of the data. If frame_nr < 0 the
- * data is written as non-trajectory data.
- * @param velocities is a 1D array of data to add. The array should be of length
- * n_particles * 3.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code velocities != 0 \endcode The pointer to the velocities array must not
- * be a NULL pointer.
- * @details This function uses tng_util_generic_write() and will
- * create a velocities data block if none exists. Velocities are stored as three
- * values per frame and compressed using TNG compression.
- * N.b. Since compressed data is written a whole block at a time the data is not
- * actually written to disk until the frame set is finished or the TNG
- * trajectory is closed.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_vel_double_write
-                (const tng_trajectory_t tng_data,
-                 const int64_t frame_nr,
-                 const double *velocities);
-
-/**
- * @brief High-level function for adding data to forces data blocks.
- * @param tng_data is the trajectory to use.
- * @param frame_nr is the frame number of the data. If frame_nr < 0 the
- * data is written as non-trajectory data.
- * @param forces is a 1D array of data to add. The array should be of length
- * n_particles * 3.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code forces != 0 \endcode The pointer to the forces array must not
- * be a NULL pointer.
- * @details This function uses tng_util_generic_write() and will
- * create a forces data block if none exists. Forces are stored as three
- * values per frame and compressed using gzip compression.
- * N.b. Since compressed data is written a whole block at a time the data is not
- * actually written to disk until the frame set is finished or the TNG
- * trajectory is closed.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_force_write
-                (const tng_trajectory_t tng_data,
-                 const int64_t frame_nr,
-                 const float *forces);
-
-/**
- * @brief High-level function for adding data to forces data blocks at double
- * precision.
- * @param tng_data is the trajectory to use.
- * @param frame_nr is the frame number of the data. If frame_nr < 0 the
- * data is written as non-trajectory data.
- * @param forces is a 1D array of data to add. The array should be of length
- * n_particles * 3.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code forces != 0 \endcode The pointer to the forces array must not
- * be a NULL pointer.
- * @details This function uses tng_util_generic_write() and will
- * create a forces data block if none exists. Forces are stored as three
- * values per frame and compressed using gzip compression.
- * N.b. Since compressed data is written a whole block at a time the data is not
- * actually written to disk until the frame set is finished or the TNG
- * trajectory is closed.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_force_double_write
-                (const tng_trajectory_t tng_data,
-                 const int64_t frame_nr,
-                 const double *forces);
-
-/**
- * @brief High-level function for adding data to box shape data blocks.
- * @param tng_data is the trajectory to use.
- * @param frame_nr is the frame number of the data. If frame_nr < 0 the
- * data is written as non-trajectory data.
- * @param box_shape is a 1D array of data to add. The array should be of length 9.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code box_shape != 0 \endcode The pointer to the box_shape array must not
- * be a NULL pointer.
- * @details This function uses tng_util_generic_write() and will
- * create a box shape data block if none exists. Box shapes are stored as 9
- * values per frame and compressed using TNG compression.
- * N.b. Since compressed data is written a whole block at a time the data is not
- * actually written to disk until the frame set is finished or the TNG
- * trajectory is closed.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_write
-                (const tng_trajectory_t tng_data,
-                 const int64_t frame_nr,
-                 const float *box_shape);
-
-/**
- * @brief High-level function for adding data to box shape data blocks at double
- * precision.
- * @param tng_data is the trajectory to use.
- * @param frame_nr is the frame number of the data. If frame_nr < 0 the
- * data is written as non-trajectory data.
- * @param box_shape is a 1D array of data to add. The array should be of length 9.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code box_shape != 0 \endcode The pointer to the box_shape array must not
- * be a NULL pointer.
- * @details This function uses tng_util_generic_write() and will
- * create a box shape data block if none exists. Box shapes are stored as 9
- * values per frame and compressed using TNG compression.
- * N.b. Since compressed data is written a whole block at a time the data is not
- * actually written to disk until the frame set is finished or the TNG
- * trajectory is closed.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_double_write
-                (const tng_trajectory_t tng_data,
-                 const int64_t frame_nr,
-                 const double *box_shape);
-
-/**
- * @brief High-level function for writing data of one frame to a data block.
- * If the frame is at the beginning of a frame set the time stamp of the frame
- * set is set.
- * @param tng_data is the trajectory to use.
- * @param frame_nr is the frame number of the data.
- * @param time is the time stamp of the frame (in seconds).
- * @param values is a 1D array of data to add. The array should be of length
- * n_particles * n_values_per_frame if writing particle related data, otherwise
- * it should be n_values_per_frame.
- * @param n_values_per_frame is the number of values to store per frame. If the
- * data is particle dependent there will be n_values_per_frame stored per
- * particle each frame.
- * @param block_id is the ID of the block, of which to set the output interval.
- * @param block_name is a string that will be used as name of the block. Only
- * required if the block did not exist, i.e. a new block is created.
- * @param particle_dependency should be TNG_NON_PARTICLE_BLOCK_DATA (0) if the
- * data is not related to specific particles (e.g. box shape) or
- * TNG_PARTICLE_BLOCK_DATA (1) is it is related to specific particles (e.g.
- * positions). Only required if the block did not exist, i.e. a new block is
- * created.
- * @param compression is the compression routine to use when writing the data.
- * Only required if the block did not exist, i.e. a new block is created.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code frame_nr >= 0 \endcode The frame number to write must be >= 0.
- * @pre \code time >= 0 \endcode The time stamp must be >= 0.
- * @pre \code values != 0 \endcode The pointer to the values array must not
- * be a NULL pointer.
- * @details n_values_per_frame, block_name, particle_dependency and
- * compression are only used if the data block did not exist before calling
- * this function, in which case it is created.
- * N.b. Data is written a whole block at a time. The data is not
- * actually written to disk until the frame set is finished or the TNG
- * trajectory is closed.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_generic_with_time_write
-                (const tng_trajectory_t tng_data,
-                 const int64_t frame_nr,
-                 const double time,
-                 const float *values,
-                 const int64_t n_values_per_frame,
-                 const int64_t block_id,
-                 const char *block_name,
-                 const char particle_dependency,
-                 const char compression);
-
-/**
- * @brief High-level function for writing data of one frame to a double precision
- * data block. If the frame is at the beginning of a frame set the time stamp of
- * the frame set is set.
- * @param tng_data is the trajectory to use.
- * @param frame_nr is the frame number of the data.
- * @param time is the time stamp of the frame (in seconds).
- * @param values is a 1D array of data to add. The array should be of length
- * n_particles * n_values_per_frame if writing particle related data, otherwise
- * it should be n_values_per_frame.
- * @param n_values_per_frame is the number of values to store per frame. If the
- * data is particle dependent there will be n_values_per_frame stored per
- * particle each frame.
- * @param block_id is the ID of the block, of which to set the output interval.
- * @param block_name is a string that will be used as name of the block. Only
- * required if the block did not exist, i.e. a new block is created.
- * @param particle_dependency should be TNG_NON_PARTICLE_BLOCK_DATA (0) if the
- * data is not related to specific particles (e.g. box shape) or
- * TNG_PARTICLE_BLOCK_DATA (1) is it is related to specific particles (e.g.
- * positions). Only required if the block did not exist, i.e. a new block is
- * created.
- * @param compression is the compression routine to use when writing the data.
- * Only required if the block did not exist, i.e. a new block is created.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code frame_nr >= 0 \endcode The frame number to write must be >= 0.
- * @pre \code time >= 0 \endcode The time stamp must be >= 0.
- * @pre \code values != 0 \endcode The pointer to the values array must not
- * be a NULL pointer.
- * @details n_values_per_frame, block_name, particle_dependency and
- * compression are only used if the data block did not exist before calling
- * this function, in which case it is created.
- * N.b. Data is written a whole block at a time. The data is not
- * actually written to disk until the frame set is finished or the TNG
- * trajectory is closed.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_generic_with_time_double_write
-                (const tng_trajectory_t tng_data,
-                 const int64_t frame_nr,
-                 const double time,
-                 const double *values,
-                 const int64_t n_values_per_frame,
-                 const int64_t block_id,
-                 const char *block_name,
-                 const char particle_dependency,
-                 const char compression);
-
-/**
- * @brief High-level function for adding data to positions data blocks. If the
- * frame is at the beginning of a frame set the time stamp of the frame set
- * is set.
- * @param tng_data is the trajectory to use.
- * @param frame_nr is the frame number of the data.
- * @param time is the time stamp of the frame (in seconds).
- * @param positions is a 1D array of data to add. The array should be of length
- * n_particles * 3.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code frame_nr >= 0 \endcode The frame number to write must be >= 0.
- * @pre \code time >= 0 \endcode The time stamp must be >= 0.
- * @pre \code positions != 0 \endcode The pointer to the positions array must not
- * be a NULL pointer.
- * @details This function uses tng_util_generic_with_time_write() and will
- * create a positions data block if none exists. Positions are stored as three
- * values per frame and compressed using TNG compression.
- * N.b. Since compressed data is written a whole block at a time the data is not
- * actually written to disk until the frame set is finished or the TNG
- * trajectory is closed.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_pos_with_time_write
-                (const tng_trajectory_t tng_data,
-                 const int64_t frame_nr,
-                 const double time,
-                 const float *positions);
-
-/**
- * @brief High-level function for adding data to positions data blocks at double
- * precision. If the frame is at the beginning of a frame set the time stamp of
- * the frame set is set.
- * @param tng_data is the trajectory to use.
- * @param frame_nr is the frame number of the data.
- * @param time is the time stamp of the frame (in seconds).
- * @param positions is a 1D array of data to add. The array should be of length
- * n_particles * 3.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code frame_nr >= 0 \endcode The frame number to write must be >= 0.
- * @pre \code time >= 0 \endcode The time stamp must be >= 0.
- * @pre \code positions != 0 \endcode The pointer to the positions array must not
- * be a NULL pointer.
- * @details This function uses tng_util_generic_with_time_double_write() and will
- * create a positions data block if none exists. Positions are stored as three
- * values per frame and compressed using TNG compression.
- * N.b. Since compressed data is written a whole block at a time the data is not
- * actually written to disk until the frame set is finished or the TNG
- * trajectory is closed.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_pos_with_time_double_write
-                (const tng_trajectory_t tng_data,
-                 const int64_t frame_nr,
-                 const double time,
-                 const double *positions);
-
-/**
- * @brief High-level function for adding data to velocities data blocks. If the
- * frame is at the beginning of a frame set the time stamp of the frame set
- * is set.
- * @param tng_data is the trajectory to use.
- * @param frame_nr is the frame number of the data.
- * @param time is the time stamp of the frame (in seconds).
- * @param velocities is a 1D array of data to add. The array should be of length
- * n_particles * 3.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code frame_nr >= 0 \endcode The frame number to write must be >= 0.
- * @pre \code time >= 0 \endcode The time stamp must be >= 0.
- * @pre \code velocities != 0 \endcode The pointer to the velocities array must not
- * be a NULL pointer.
- * @details This function uses tng_util_generic_with_time_write() and will
- * create a velocities data block if none exists. Velocities are stored as three
- * values per frame and compressed using TNG compression.
- * N.b. Since compressed data is written a whole block at a time the data is not
- * actually written to disk until the frame set is finished or the TNG
- * trajectory is closed.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_vel_with_time_write
-                (const tng_trajectory_t tng_data,
-                 const int64_t frame_nr,
-                 const double time,
-                 const float *velocities);
-
-/**
- * @brief High-level function for adding data to velocities data blocks at
- * double precision. If the frame is at the beginning of a frame set the
- * time stamp of the frame set is set.
- * @param tng_data is the trajectory to use.
- * @param frame_nr is the frame number of the data.
- * @param time is the time stamp of the frame (in seconds).
- * @param velocities is a 1D array of data to add. The array should be of length
- * n_particles * 3.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code frame_nr >= 0 \endcode The frame number to write must be >= 0.
- * @pre \code time >= 0 \endcode The time stamp must be >= 0.
- * @pre \code velocities != 0 \endcode The pointer to the velocities array must not
- * be a NULL pointer.
- * @details This function uses tng_util_generic_with_time_double_write() and will
- * create a velocities data block if none exists. Velocities are stored as three
- * values per frame and compressed using TNG compression.
- * N.b. Since compressed data is written a whole block at a time the data is not
- * actually written to disk until the frame set is finished or the TNG
- * trajectory is closed.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_vel_with_time_double_write
-                (const tng_trajectory_t tng_data,
-                 const int64_t frame_nr,
-                 const double time,
-                 const double *velocities);
-
-/**
- * @brief High-level function for adding data to forces data blocks. If the
- * frame is at the beginning of a frame set the time stamp of the frame set
- * is set.
- * @param tng_data is the trajectory to use.
- * @param frame_nr is the frame number of the data.
- * @param time is the time stamp of the frame (in seconds).
- * @param forces is a 1D array of data to add. The array should be of length
- * n_particles * 3.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code frame_nr >= 0 \endcode The frame number to write must be >= 0.
- * @pre \code time >= 0 \endcode The time stamp must be >= 0.
- * @pre \code forces != 0 \endcode The pointer to the forces array must not
- * be a NULL pointer.
- * @details This function uses tng_util_generic_with_time_write() and will
- * create a forces data block if none exists. Forces are stored as three
- * values per frame and compressed using gzip compression.
- * N.b. Since compressed data is written a whole block at a time the data is not
- * actually written to disk until the frame set is finished or the TNG
- * trajectory is closed.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_force_with_time_write
-                (const tng_trajectory_t tng_data,
-                 const int64_t frame_nr,
-                 const double time,
-                 const float *forces);
-
-/**
- * @brief High-level function for adding data to forces data blocks at
- * double precision. If the frame is at the beginning of a frame set
- * the time stamp of the frame set is set.
- * @param tng_data is the trajectory to use.
- * @param frame_nr is the frame number of the data.
- * @param time is the time stamp of the frame (in seconds).
- * @param forces is a 1D array of data to add. The array should be of length
- * n_particles * 3.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code frame_nr >= 0 \endcode The frame number to write must be >= 0.
- * @pre \code time >= 0 \endcode The time stamp must be >= 0.
- * @pre \code forces != 0 \endcode The pointer to the forces array must not
- * be a NULL pointer.
- * @details This function uses tng_util_generic_with_time_double_write() and will
- * create a forces data block if none exists. Forces are stored as three
- * values per frame and compressed using gzip compression.
- * N.b. Since compressed data is written a whole block at a time the data is not
- * actually written to disk until the frame set is finished or the TNG
- * trajectory is closed.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_force_with_time_double_write
-                (const tng_trajectory_t tng_data,
-                 const int64_t frame_nr,
-                 const double time,
-                 const double *forces);
-
-/**
- * @brief High-level function for adding data to box shape data blocks. If the
- * frame is at the beginning of a frame set the time stamp of the frame set
- * is set.
- * @param tng_data is the trajectory to use.
- * @param frame_nr is the frame number of the data.
- * @param time is the time stamp of the frame (in seconds).
- * @param box_shape is a 1D array of data to add. The array should be of length 9.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code frame_nr >= 0 \endcode The frame number to write must be >= 0.
- * @pre \code time >= 0 \endcode The time stamp must be >= 0.
- * @pre \code box_shape != 0 \endcode The pointer to the box_shape array must not
- * be a NULL pointer.
- * @details This function uses tng_util_generic_with_time_write() and will
- * create a box shape data block if none exists. Box shapes are stored as 9
- * values per frame and compressed using TNG compression.
- * N.b. Since compressed data is written a whole block at a time the data is not
- * actually written to disk until the frame set is finished or the TNG
- * trajectory is closed.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_with_time_write
-                (const tng_trajectory_t tng_data,
-                 const int64_t frame_nr,
-                 const double time,
-                 const float *box_shape);
-
-/**
- * @brief High-level function for adding data to box shape data blocks at
- * double precision. If the frame is at the beginning of a frame set the
- * time stamp of the frame set is set.
- * @param tng_data is the trajectory to use.
- * @param frame_nr is the frame number of the data.
- * @param time is the time stamp of the frame (in seconds).
- * @param box_shape is a 1D array of data to add. The array should be of length 9.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code frame_nr >= 0 \endcode The frame number to write must be >= 0.
- * @pre \code time >= 0 \endcode The time stamp must be >= 0.
- * @pre \code box_shape != 0 \endcode The pointer to the box_shape array must not
- * be a NULL pointer.
- * @details This function uses tng_util_generic_with_time_double_write() and will
- * create a box shape data block if none exists. Box shapes are stored as 9
- * values per frame and compressed using TNG compression.
- * N.b. Since compressed data is written a whole block at a time the data is not
- * actually written to disk until the frame set is finished or the TNG
- * trajectory is closed.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_with_time_double_write
-                (const tng_trajectory_t tng_data,
-                 const int64_t frame_nr,
-                 const double time,
-                 const double *box_shape);
-
-/**
- * @brief High-level function for getting the compression method and
- * multiplication factor of the last read frame of a specific data block.
- * @param tng_data is the trajectory to use.
- * @param block_id is the ID number of the block containing the data of
- * interest.
- * @param codec_id will be set to the value of the codec_id of the
- * compression of the data block. See tng_compression for more details.
- * @param factor will be set to the multiplication factor applied to
- * the values before compression, in order to get integers from them.
- * factor is 1/precision.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code codec_id != 0 \endcode  The pointer to the returned codec id
- * must not be a NULL pointer.
- * @pre \code factor != 0 \endcode The pointer to the returned multiplication
- * factor must not be a NULL pointer.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as invalid mode) or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_frame_current_compression_get
-                (const tng_trajectory_t tng_data,
-                 const int64_t block_id,
-                 int64_t *codec_id,
-                 double  *factor);
-
-/** @brief High-level function for determining the next frame with data and what
- * data blocks have data for that frame. The search can be limited to certain
- * data blocks.
- * @param tng_data is the trajectory to use.
- * @param current_frame is the frame that was last read, from where to start
- * looking for data.
- * @param n_requested_data_block_ids is the number of data blocks listed in
- * requested_data_block_ids. If this is 0 all data blocks will be taken into
- * account.
- * @param requested_data_block_ids is an array of data blocks to look for.
- * @param next_frame will be set to the next frame with data.
- * @param n_data_blocks_in_next_frame is set to the number of data blocks with
- * data for next_frame.
- * @param data_block_ids_in_next_frame is set to an array (of length
- * n_data_blocks_in_next_frame) that lists the data block IDs with data for
- * next_frame. It must be pointing at NULL or previously allocated memory.
- * Memory for the array is reallocated by this function using realloc().
- * The memory must be freed by the client afterwards or
- * there will be a memory leak.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code next_frame != 0 \endcode The pointer to the next frame must not
- * be NULL.
- * @pre \code n_data_blocks_in_next_frame != 0 \endcode The pointer to
- * n_data_blocks_in_next_frame must not be NULL.
- * @pre \code *data_block_ids_in_next_frame != 0 \endcode The pointer to the
- * list of data block IDs must not be NULL.
- * @pre \code n_requested_data_block_ids == 0 || requested_data_block_ids != 0 \endcode
- * If the number of requested data blocks != 0 then the array of data block IDs must not be NULL.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_trajectory_next_frame_present_data_blocks_find
-                (const tng_trajectory_t tng_data,
-                 int64_t current_frame,
-                 const int64_t n_requested_data_block_ids,
-                 const int64_t *requested_data_block_ids,
-                 int64_t *next_frame,
-                 int64_t *n_data_blocks_in_next_frame,
-                 int64_t **data_block_ids_in_next_frame);
-
-/* @brief High-level function for getting all data block ids and their names
- * and stride lengths.
- * @param tng_data is the trajectory to use.
- * @param n_data_blocks is set to the number of data blocks in the trajectory.
- * @param data_block_ids is set to an array (of length
- * n_data_blocks) that lists the data block IDs in the trajectory.
- * It must be pointing at NULL or previously allocated memory.
- * Memory for the array is allocated by this function.
- * The memory must be freed by the client afterwards or
- * there will be a memory leak.
- * @param data_block_names is set to an array (of length
- * n_data_blocks) that contains the names of the data blocks.
- * It must be pointing at NULL or previously allocated memory.
- * Memory for the array is allocated by this function.
- * The memory must be freed by the client afterwards or
- * there will be a memory leak.
- * @param stride_lengths is set to an array (of length
- * n_data_blocks) that lists the stride lengths of the data blocks.
- * It must be pointing at NULL or previously allocated memory.
- * Memory for the array is allocated by this function.
- * The memory must be freed by the client afterwards or
- * there will be a memory leak.
- * @param n_values_per_frame is set to an array (of length
- * n_data_blocks) that lists the number of values per frame of the data blocks.
- * It must be pointing at NULL or previously allocated memory.
- * Memory for the array is allocated by this function.
- * The memory must be freed by the client afterwards or
- * there will be a memory leak.
- * @param block_types is set to an array (of length
- * n_data_blocks) that lists the block types of the data blocks.
- * It must be pointing at NULL or previously allocated memory.
- * Memory for the array is allocated by this function.
- * The memory must be freed by the client afterwards or
- * there will be a memory leak.
- * @param dependencies is set to an array (of length
- * n_data_blocks) that lists the dependencies of the data blocks.
- * It must be pointing at NULL or previously allocated memory.
- * Memory for the array is allocated by this function.
- * The memory must be freed by the client afterwards or
- * there will be a memory leak.
- * @param compressions is set to an array (of length
- * n_data_blocks) that lists the compressions of the data blocks.
- * It must be pointing at NULL or previously allocated memory.
- * Memory for the array is allocated by this function.
- * The memory must be freed by the client afterwards or
- * there will be a memory leak.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code n_data_blocks != 0 \endcode The pointer to
- * n_data_blocks must not be NULL.
- * @pre \code data_block_ids != 0 \endcode The pointer to the
- * list of data block IDs must not be NULL.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured or TNG_CRITICAL (2) if a major error
- * has occured.
- */
-/*
-tng_function_status DECLSPECDLLEXPORT tng_util_trajectory_all_data_block_types_get
-                (const tng_trajectory_t tng_data,
-                 int64_t *n_data_blocks,
-                 int64_t **data_block_ids,
-                 char ***data_block_names,
-                 int64_t **stride_lengths,
-                 int64_t **n_values_per_frame,
-                 char **block_types,
-                 char **dependencies,
-                 char **compressions);
-*/
-
-/** @brief Finds the frame set of the specified frame in order to prepare for writing
- * after it.
- * @param tng_data is the trajectory to use.
- * @param prev_frame is the frame after which to start appending.
- * @pre \code tng_data != 0 \endcode The trajectory container (tng_data)
- * must be initialised before using it.
- * @pre \code prev_frame >= 0 \endcode The previous frame must not be negative.
- * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
- * has occured (such as not finding the requested frame) or TNG_CRITICAL (2)
- * if a major error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_prepare_append_after_frame
-                (const tng_trajectory_t tng_data,
-                 const int64_t prev_frame);
-
-
-/** @brief Get the number of frames containing data of a specific type.
- * @param tng_data is the trajectory to use.
- * @param block_id is the id of the block of the data type.
- * @param n_frames is set to the number of frames containing data of
- * the requested data type.
- * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
- * error has occured.
- */
-tng_function_status DECLSPECDLLEXPORT tng_util_num_frames_with_data_of_block_id_get
-                (const tng_trajectory_t tng_data,
-                 const int64_t block_id,
-                 int64_t *n_frames);
-/** @} */ /* end of group2 */
-
-
-#ifdef __cplusplus
-}  /* end extern "C" */
-#endif
-
-#endif /* TNG_IO_H */
diff --git a/src/include/gromacs/external/tng_io/include/tng/tng_io.hpp b/src/include/gromacs/external/tng_io/include/tng/tng_io.hpp
deleted file mode 100644 (file)
index 12172e5..0000000
+++ /dev/null
@@ -1,1703 +0,0 @@
-/* This code is part of the tng binary trajectory format.
- *
- * Written by Anders Gärdenäs
- * Copyright (c) 2012-2013, The GROMACS development team.
- * Check out http://www.gromacs.org for more information.
- *
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the Revised BSD License.
- */
-
-#ifndef TNG_IO_HPP
-#define TNG_IO_HPP
-
-#include "tng_io.h"
-
-namespace Tng
-{
-class Trajectory;
-class Atom;
-class Residue;
-class Chain;
-class Molecule;
-typedef class Molecule * Molecule_t;
-
-
-class Trajectory {
-private:
-    tng_trajectory_t traj;
-    tng_function_status status;
-public:
-    /**
-    * @brief Add a molecule to the trajectory.
-    * @param name is a pointer to the string containing the name of the new molecule.
-    * @param molecule is a pointer to the newly created molecule.
-    * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
-    * error has occured.
-    */
-
-    tng_function_status addMolecule(const char *, Molecule_t);
-    tng_function_status addMoleculeWithId(const char *, int64_t id, Molecule_t);
-    tng_function_status findMolecule(const char *name, int64_t id, Molecule_t molecule);
-    friend class Atom;
-    friend class Residue;
-    friend class Chain;
-    friend class Molecule;
-
-    //! Normal constructor
-    Trajectory()
-    { status = tng_trajectory_init(&traj); }
-
-    //! Copy constructor
-    Trajectory(Trajectory * src)
-    { status = tng_trajectory_init_from_src(traj,&src->traj); }
-
-    //! Detructor
-    ~Trajectory()
-    { status = tng_trajectory_destroy(&traj); }
-
-    //! Status
-    tng_function_status getStatus()
-    { return status; }
-
-
-    /**
-    * @brief Get the name of the input file.
-    * @param file_name the string to fill with the name of the input file,
-    * memory must be allocated before.
-    * @param max_len maximum char length of the string, i.e. how much memory has
-    * been reserved for file_name. This includes \0 terminating character.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred (source string longer than destination string).
-    */
-    tng_function_status getInputFile (char *file_name, const int max_len)
-    {
-        return status = tng_input_file_get(traj, file_name,   max_len);
-    }
-
-    /**
-    * @brief Set the name of the input file.
-    * @param file_name the name of the input file.
-    * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
-    * error has occured.
-    */
-    tng_function_status setInputFile(const char *file_name)
-    {
-        return status = tng_input_file_set(traj, file_name);
-    }
-
-
-    /**
-    * @brief Get the name of the output file.
-    * @param file_name the string to fill with the name of the output file,
-    * memory must be allocated before.
-    * @param max_len maximum char length of the string, i.e. how much memory has
-    * been reserved for file_name. This includes \0 terminating character.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred (source string longer than destination string).
-    */
-    tng_function_status getOutputFile(char *file_name, const int max_len)
-    {
-        return status = tng_output_file_get(traj, file_name, max_len);
-    }
-
-
-    /**
-    * @brief Set the name of the output file.
-    * @param file_name the name of the output file.
-    * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
-    * error has occured.
-    */
-    tng_function_status setOutputFile(const char *file_name)
-    {
-        return status = tng_output_file_set(traj, file_name);
-    }
-
-    /**
-    * @brief Get the endianness of the output file.
-    * current output file.
-    * @param endianness will contain the enumeration of the endianness.
-    * @return TNG_SUCCESS (0) if successful or TNG_FAILURE (1) if the endianness
-    * could not be retrieved.
-    */
-    tng_function_status getOutputFileEndianness
-                    (tng_file_endianness *endianness)
-    {
-        return status = tng_output_file_endianness_get(traj, endianness);
-    }
-
-    /**
-    * @brief Set the endianness of the output file.
-    * @param endianness the enumeration of the endianness, can be either
-    * TNG_BIG_ENDIAN (0) or TNG_LITTLE_ENDIAN (1).
-    * @details The endianness cannot be changed after file output has started.
-    * @return TNG_SUCCESS (0) if successful or TNG_FAILURE (1) if the endianness
-    * could not be set.
-    */
-    tng_function_status setOutputFileEndianness
-                    (const tng_file_endianness endianness)
-    {
-        return status = tng_output_file_endianness_set(traj, endianness);
-    }
-
-    /**
-    * @brief Get the name of the program used when creating the trajectory.
-    * @param name the string to fill with the name of the program,
-    * memory must be allocated before.
-    * @param max_len maximum char length of the string, i.e. how much memory has
-    * been reserved for name. This includes \0 terminating character.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred (source string longer than destination string).
-    */
-    tng_function_status getFirstProgramName(char *name, const int max_len)
-    {
-        return status = tng_first_program_name_get(traj,name,max_len);
-    }
-
-
-    /**
-    * @brief Set the name of the program used when creating the trajectory..
-    * @param new_name is a string containing the wanted name.
-    * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
-    * error has occured.
-    */
-    tng_function_status setFirstProgramName(const char *new_name)
-    {
-        return status = tng_first_program_name_set(traj, new_name);
-    }
-
-
-    /**
-    * @brief Get the name of the program used when last modifying the trajectory.
-    * @param name the string to fill with the name of the program,
-    * memory must be allocated before.
-    * @param max_len maximum char length of the string, i.e. how much memory has
-    * been reserved for name. This includes \0 terminating character.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred (source string longer than destination string).
-    */
-    tng_function_status getLastProgramName(char *name, const int max_len)
-    {
-        return status = tng_last_program_name_get(traj, name, max_len);
-    }
-
-
-    /**
-    * @brief Set the name of the program used when last modifying the trajectory.
-    * @param new_name is a string containing the wanted name.
-    * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
-    * error has occured.
-    */
-    tng_function_status setLastProgramName(const char *new_name)
-    {
-        return status = tng_last_program_name_set(traj, new_name);
-    }
-
-
-    /**
-    * @brief Get the name of the user who created the trajectory.
-    * @param name the string to fill with the name of the user,
-    * memory must be allocated before.
-    * @param max_len maximum char length of the string, i.e. how much memory has
-    * been reserved for name. This includes \0 terminating character.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred (source string longer than destination string).
-    */
-    tng_function_status getFirstUserName(char *name, const int max_len)
-    {
-        return status = tng_first_user_name_get(traj,name, max_len);
-    }
-
-
-    /**
-    * @brief Set the name of the user who created the trajectory.
-    * @param new_name is a string containing the wanted name.
-    * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
-    * error has occured.
-    */
-    tng_function_status setFirstUserName(const char *new_name)
-    {
-        return status = tng_first_user_name_set(traj, new_name);
-    }
-
-
-    /**
-    * @brief Get the name of the user who last modified the trajectory.
-    * @param name the string to fill with the name of the user,
-    * memory must be allocated before.
-    * @param max_len maximum char length of the string, i.e. how much memory has
-    * been reserved for name. This includes \0 terminating character.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred (source string longer than destination string).
-    */
-    tng_function_status getLastUserName(char *name, const int max_len)
-    {
-        return status = tng_last_user_name_get(traj,name,max_len);
-    }
-
-
-    /**
-    * @brief Set the name of the user who last modified the trajectory.
-    * @param new_name is a string containing the wanted name.
-    * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
-    * error has occured.
-    */
-    tng_function_status setLastUserName(const char *new_name)
-    {
-        return status = tng_last_user_name_set(traj,new_name);
-    }
-
-
-
-    /**
-    * @brief Get the name of the computer used when creating the trajectory.
-    * @param name the string to fill with the name of the computer,
-    * memory must be allocated before.
-    * @param max_len maximum char length of the string, i.e. how much memory has
-    * been reserved for name. This includes \0 terminating character.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred (source string longer than destination string).
-    */
-    tng_function_status getFirstComputerName(char *name, const int max_len)
-    {
-        return status = tng_first_computer_name_get(traj, name, max_len);
-    }
-
-
-    /**
-    * @brief Set the name of the computer used when creating the trajectory.
-    * @param new_name is a string containing the wanted name.
-    * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
-    * error has occured.
-    */
-    tng_function_status setFirstComputerName(const char *new_name)
-    {
-        return status = tng_first_computer_name_set(traj, new_name);
-    }
-
-
-    /**
-    * @brief Get the name of the computer used when last modifying the trajectory.
-    * @param name the string to fill with the name of the computer,
-    * memory must be allocated before.
-    * @param max_len maximum char length of the string, i.e. how much memory has
-    * been reserved for name. This includes \0 terminating character.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred (source string longer than destination string).
-    */
-    tng_function_status getLastComputerName(char *name, const int max_len)
-    {
-        return status = tng_last_computer_name_get(traj,name,max_len);
-    }
-
-
-    /**
-    * @brief Set the name of the computer used when last modifying the trajectory.
-    * @param new_name is a string containing the wanted name.
-    * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
-    * error has occured.
-    */
-    tng_function_status setLastComputerName(const char *new_name)
-    {
-        return status = tng_last_computer_name_set(traj,new_name);
-    }
-
-
-    /**
-    * @brief Get the pgp_signature of the user creating the trajectory.
-    * @param signature the string to fill with the signature,
-    * memory must be allocated before.
-    * @param max_len maximum char length of the string, i.e. how much memory has
-    * been reserved for name. This includes \0 terminating character.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred (source string longer than destination string).
-    */
-    tng_function_status getFirstSignature(char *signature, const int max_len)
-    {
-        return status = tng_last_computer_name_get(traj, signature,max_len);
-    }
-
-
-    /**
-    * @brief Set the pgp_signature of the user creating the trajectory.
-    * @param signature is a string containing the pgp_signature.
-    * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
-    * error has occured.
-    */
-    tng_function_status setFirstSignature(const char *signature)
-    {
-        return status = tng_first_signature_set(traj, signature);
-    }
-
-
-    /**
-    * @brief Get the pgp_signature of the user last modifying the trajectory.
-    * @param signature the string to fill with the signature,
-    * memory must be allocated before.
-    * @param max_len maximum char length of the string, i.e. how much memory has
-    * been reserved for name. This includes \0 terminating character.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred (source string longer than destination string).
-    */
-    tng_function_status getLastSignature(char *signature, const int max_len)
-    {
-        return status = tng_first_signature_get(traj, signature, max_len);
-    }
-
-
-    /**
-    * @brief Set the pgp_signature of the user last modifying the trajectory.
-    * @param signature is a string containing the pgp_signature.
-    * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
-    * error has occured.
-    */
-    tng_function_status setLastSignature(const char *signature)
-    {
-        return status = tng_last_signature_set(traj, signature);
-    }
-
-
-    /**
-    * @brief Get the name of the forcefield used in the trajectory.
-    * @param name the string to fill with the name of the forcefield,
-    * memory must be allocated before.
-    * @param max_len maximum char length of the string, i.e. how much memory has
-    * been reserved for name. This includes \0 terminating character.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred (source string longer than destination string).
-    */
-    tng_function_status getForcefieldName(char *name, const int max_len)
-    {
-        return status = tng_last_signature_get(traj,name,max_len);
-    }
-
-
-    /**
-    * @brief Set the name of the forcefield used in the trajectory.
-    * @param new_name is a string containing the wanted name.
-    * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
-    * error has occured.
-    */
-    tng_function_status setForcefieldName(const char *new_name)
-    {
-        return status = tng_forcefield_name_set(traj, new_name);
-    }
-
-
-    /**
-    * @brief Get the medium stride length of the trajectory.
-    * @param len is pointing to a value set to the stride length.
-    * @return TNG_SUCCESS (0) if successful.
-    */
-    tng_function_status getMediumStrideLength(int64_t *len)
-    {
-        return status = tng_medium_stride_length_get(traj,len);
-    }
-
-
-    /**
-    * @brief Set the medium stride length of the trajectory.
-    * @param len is the wanted medium stride length.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred.
-    */
-    tng_function_status setMediumStrideLength(const int64_t len)
-    {
-        return status = tng_medium_stride_length_set(traj,len);
-    }
-
-
-    /**
-    * @brief Get the long stride length of the trajectory.
-    * @param len is pointing to a value set to the stride length.
-    * @return TNG_SUCCESS (0) if successful.
-    */
-    tng_function_status getLongStrideLength(int64_t *len)
-    {
-        return status = tng_long_stride_length_get(traj, len);
-    }
-
-
-    /**
-    * @brief Set the long stride length of the trajectory.
-    * @param len is the wanted long stride length.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred.
-    */
-    tng_function_status setLongStrideLength(const int64_t len)
-    {
-        return status = tng_long_stride_length_set(traj,len);
-    }
-
-
-    /**
-    * @brief Get the current time per frame of the trajectory.
-    * @param len is pointing to a value set to the time per frame.
-    * @return TNG_SUCCESS (0) if successful.
-    */
-    tng_function_status getTimePerFrame(double *time)
-    {
-        return status = tng_time_per_frame_get(traj, time);
-    }
-
-
-    /**
-    * @brief Set the time per frame of the trajectory.
-    * @param len is the new time per frame.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred.
-    */
-    tng_function_status setTimePerFrame(const double time)
-    {
-        return status = tng_time_per_frame_set(traj, time);
-    }
-
-
-    /**
-    * @brief Get the length of the input file.
-    * @param len is pointing to a value set to the file length.
-    * @return TNG_SUCCESS (0) if successful.
-    */
-    tng_function_status getInputFileLen(int64_t *len)
-    {
-        return status = tng_input_file_len_get(traj, len);
-    }
-
-
-    /**
-    * @brief Get the number of frames in the trajectory
-    * @param n is pointing to a value set to the number of frames.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred (could not find last frame set).
-    */
-    tng_function_status getNumFrames(int64_t *n)
-    {
-        return status = tng_num_frames_get(traj, n);
-    }
-
-    /**
-    * @brief Get the current number of particles.
-    * @param n is pointing to a value set to the number of particles.
-    * @details If variable number of particles are used this function will return
-    * the number of particles in the current frame set.
-    * @return TNG_SUCCESS (0) if successful.
-    */
-    tng_function_status getNumParticles(int64_t *n)
-    {
-        return status = tng_num_particles_get(traj, n);
-    }
-
-
-
-
-    /**
-    * @brief Get the current total number of molecules.
-    * @param n is pointing to a value set to the number of molecules.
-    * @details If variable number of particles are used this function will return
-    * the total number of molecules in the current frame set.
-    * @return TNG_SUCCESS (0) if successful.
-    */
-    tng_function_status getNumMolecules(int64_t *n)
-    {
-        return status = tng_num_molecules_get(traj,n);
-    }
-
-    /**
-    * @brief Get the exponential used for distances in the trajectory.
-    * @param exp is pointing to a value set to the distance unit exponential.
-    * @details Example: If the distances are specified in nm (default) exp is -9.
-    * If the distances are specified in Å exp is -10.
-    * @return TNG_SUCCESS (0) if successful.
-    */
-    tng_function_status getDistanceUnitExponential
-                    (int64_t *exp)
-    {
-        return status = tng_distance_unit_exponential_get(traj, exp);
-    }
-
-    /**
-    * @brief Set the exponential used for distances in the trajectory.
-    * @param exp is the distance unit exponential to use.
-    * @details Example: If the distances are specified in nm (default) exp is -9.
-    * If the distances are specified in Å exp is -10.
-    * @return TNG_SUCCESS (0) if successful.
-    */
-    tng_function_status setDistanceUnitExponential
-                    (int64_t exp)
-    {
-        return status = tng_distance_unit_exponential_set(traj, exp);
-    }
-
-
-    /**
-    * @brief Get the number of frames per frame set.
-    * per frame set.
-    * @param n is pointing to a value set to the number of frames per frame set.
-    * @return TNG_SUCCESS (0) if successful.
-    */
-    tng_function_status getNumFramesPerFrameSet(int64_t *n)
-    {
-        return status = tng_num_frames_per_frame_set_get(traj,n);
-    }
-
-    /**
-    * @brief Set the number of frames per frame set.
-    * @param n is the number of frames per frame set.
-    * @details This does not affect already existing frame sets. For
-    * consistency the number of frames per frame set should be set
-    * betfore creating any frame sets.
-    * @return TNG_SUCCESS (0) if successful.
-    */
-    tng_function_status setNumFramesPerFrameSet(const int64_t n)
-    {
-        return status = tng_num_frames_per_frame_set_set(traj,n);
-    }
-
-    /**
-    * @brief Get the number of frame sets.
-    * @param n is pointing to a value set to the number of frame sets.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred or TNG_CRITICAL (2) if a major error has occured.
-    */
-    tng_function_status getNumFrameSets(int64_t *n)
-    {
-        return status = tng_num_frame_sets_get(traj, n);
-    }
-
-
-    /**
-    * @brief Get the current trajectory frame set.
-    * @param frame_set_p will be set to point at the memory position of
-    * the found frame set.
-    * @return TNG_SUCCESS (0) if successful.
-    */
-    tng_function_status getCurrentFrameSet(tng_trajectory_frame_set_t *frame_set_p)
-    {
-        return status = tng_current_frame_set_get(traj, frame_set_p);
-    }
-
-
-    /**
-    * @brief Find the requested frame set number.
-    * @param nr is the frame set number to search for.
-    * @details tng_data->current_trajectory_frame_set will contain the
-    * found trajectory if successful.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred or TNG_CRITICAL (2) if a major error has occured.
-    */
-    tng_function_status findFrameSetNr(const int64_t nr)
-    {
-        return status = tng_frame_set_nr_find(traj,nr);
-    }
-
-
-    /**
-    * @brief Find the frame set containing a specific frame.
-    * @param frame is the frame number to search for.
-    * @details tng_data->current_trajectory_frame_set will contain the
-    * found trajectory if successful.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred or TNG_CRITICAL (2) if a major error has occured.
-    */
-    tng_function_status findFrameSetOfFrame(const int64_t frame)
-    {
-        return status = tng_frame_set_of_frame_find(traj, frame);
-    }
-
-
-    /**
-    * @brief Get the file position of the next frame set in the input file.
-    * @param frame_set is the frame set of which to get the position of the
-    * following frame set.
-    * @param pos is pointing to a value set to the file position.
-    * @return TNG_SUCCESS (0) if successful.
-    */
-    tng_function_status getNextFrameSetFilePos
-        (const tng_trajectory_frame_set_t frame_set,int64_t *pos)
-    {
-        return status = tng_frame_set_next_frame_set_file_pos_get(traj,frame_set,pos );
-    }
-
-    /**
-    * @brief Get the file position of the previous frame set in the input file.
-    * @param frame_set is the frame set of which to get the position of the
-    * previous frame set.
-    * @param pos is pointing to a value set to the file position.
-    * @return TNG_SUCCESS (0) if successful.
-    */
-    tng_function_status getPrevFrameSetFilePos
-        (const tng_trajectory_frame_set_t frame_set,int64_t *pos)
-    {
-        return status = tng_frame_set_prev_frame_set_file_pos_get(traj, frame_set, pos);
-    }
-
-
-    /**
-    * @brief Get the first and last frames of the frame set.
-    * @param frame_set is the frame set of which to get the frame range.
-    * @param first_frame is set to the first frame of the frame set.
-    * @param last_frame is set to the last frame of the frame set.
-    * @return TNG_SUCCESS (0) if successful.
-    */
-    tng_function_status getFrameSetFrameRange
-        (const tng_trajectory_frame_set_t frame_set,
-        int64_t *first_frame,
-        int64_t *last_frame)
-    {
-        return status = tng_frame_set_frame_range_get(traj,frame_set, first_frame, last_frame);
-    }
-
-
-    /**
-    * @brief Get the molecume name of real particle number (number in mol system).
-    * @param nr is the real number of the particle in the molecular system.
-    * @param name is a string, which is set to the name of the molecule. Memory
-    * must be reserved beforehand.
-    * @param max_len is the maximum length of name.
-    * @return TNG_SUCCESS (0) if successful or TNG_FAILURE (!) if a minor error
-    * has occured.
-    */
-    tng_function_status getMoleculeNameOfParticleNr
-        (const int64_t nr,char *name,int max_len)
-    {
-        return status = tng_molecule_name_of_particle_nr_get(traj,nr,name,max_len);
-    }
-
-
-    /**
-    * @brief Get the chain name of real particle number (number in mol system).
-    * @param nr is the real number of the particle in the molecular system.
-    * @param name is a string, which is set to the name of the chain. Memory
-    * must be reserved beforehand.
-    * @param max_len is the maximum length of name.
-    * @return TNG_SUCCESS (0) if successful or TNG_FAILURE (!) if a minor error
-    * has occured.
-    */
-    tng_function_status getChainNameOfParticleNr
-        (const int64_t nr,char *name,int max_len)
-    {
-        return status = tng_chain_name_of_particle_nr_get(traj, nr, name, max_len);
-    }
-
-
-    /**
-    * @brief Get the residue name of real particle number (number in mol system).
-    * @param nr is the real number of the particle in the molecular system.
-    * @param name is a string, which is set to the name of the residue. Memory
-    * must be reserved beforehand.
-    * @param max_len is the maximum length of name.
-    * @return TNG_SUCCESS (0) if successful or TNG_FAILURE (!) if a minor error
-    * has occured.
-    */
-    tng_function_status getResidueNameOfParticleNr
-        (const int64_t nr,char *name,int max_len)
-    {
-        return status = tng_residue_name_of_particle_nr_get(traj,nr,name,max_len);
-    }
-
-
-    /**
-    * @brief Get the atom name of real particle number (number in mol system).
-    * @param nr is the real number of the particle in the molecular system.
-    * @param name is a string, which is set to the name of the atom. Memory
-    * must be reserved beforehand.
-    * @param max_len is the maximum length of name.
-    * @return TNG_SUCCESS (0) if successful or TNG_FAILURE (!) if a minor error
-    * has occured.
-    */
-    tng_function_status getAtomNameOfParticleNr
-        (const int64_t nr,char *name,int max_len)
-    {
-        return status = tng_atom_name_of_particle_nr_get(traj, nr,name,max_len);
-    }
-
-
-    /**
-    * @brief Add a particle mapping table.
-    * @details Each particle mapping table will be written as a separate block,
-    * followed by the data blocks for the corresponding particles. In most cases
-    * there is one particle mapping block for each thread writing the trajectory.
-    * @details The mapping information is added to the currently active frame set
-    * of tng_data
-    * @param first_particle_number is the first particle number of this mapping
-    * block.
-    * @param n_particles is the number of particles in this mapping block.
-    * @param mapping_table is a list of the real particle numbers (i.e. the numbers
-    * used in the molecular system). The list is n_particles long.
-    * @details mapping_table[0] is the real particle number of the first particle
-    * in the following data blocks.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred or TNG_CRITICAL (2) if a major error has occured.
-    */
-    tng_function_status addParticleMapping
-        (const int64_t first_particle_number,
-        const int64_t n_particles,
-        const int64_t *mapping_table)
-    {
-        return status = tng_particle_mapping_add(traj,first_particle_number,n_particles,mapping_table );
-    }
-
-
-    /**
-    * @brief Read the header blocks from the input_file of tng_data.
-    * @details The trajectory blocks must be read separately and iteratively in chunks
-    * to fit in memory.
-    * @details tng_data->input_file_path specifies
-    * which file to read from. If the file (input_file) is not open it will be
-    * opened.
-    * @param hash_mode is an option to decide whether to use the md5 hash or not.
-    * If hash_mode == TNG_USE_HASH the written md5 hash in the file will be
-    * compared to the md5 hash of the read contents to ensure valid data.
-    * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
-    * error has occured.
-    */
-    tng_function_status readFileHeaders(const tng_hash_mode hash_mode)
-    {
-        return status = tng_file_headers_read(traj, hash_mode);
-    }
-
-
-    /**
-    * @brief Write the header blocks to the output_file of tng_data.
-    * @details The trajectory blocks must be written separately and iteratively in chunks
-    * to fit in memory.
-    * @details tng_data->output_file_path
-    * specifies which file to write to. If the file (output_file) is not open it
-    * will be opened.
-    * @param hash_mode is an option to decide whether to use the md5 hash or not.
-    * If hash_mode == TNG_USE_HASH an md5 hash for each header block will be generated.
-    * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
-    * error has occured.
-    */
-    tng_function_status writeFileHeaders(const tng_hash_mode hash_mode)
-    {
-        return status = tng_file_headers_write(traj, hash_mode);
-    }
-
-
-
-    /**
-    * @brief Read one (the next) block (of any kind) from the input_file of tng_data.
-    * which file to read from. If the file (input_file) is not open it will be
-    * opened.
-    * @param block_data is a pointer to the struct which will be populated with the
-    * data.
-    * @details If block_data->input_file_pos > 0 it is the position from where the
-    * reading starts otherwise it starts from the current position.
-    * @param hash_mode is an option to decide whether to use the md5 hash or not.
-    * If hash_mode == TNG_USE_HASH the written md5 hash in the file will be
-    * compared to the md5 hash of the read contents to ensure valid data.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred or TNG_CRITICAL (2) if a major error has occured.
-    */
-    tng_function_status readNextBlock(const tng_hash_mode hash_mode, tng_gen_block_t block_data)
-    {
-        return status = tng_block_read_next(traj,block_data, hash_mode);
-    }
-
-
-
-    /**
-    * @brief Read one (the next) frame set, including mapping and related data blocks
-    * from the input_file of tng_data.
-    * which file to read from. If the file (input_file) is not open it will be
-    * opened.
-    * @param hash_mode is an option to decide whether to use the md5 hash or not.
-    * If hash_mode == TNG_USE_HASH the written md5 hash in the file will be
-    * compared to the md5 hash of the read contents to ensure valid data.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred or TNG_CRITICAL (2) if a major error has occured.
-    */
-    tng_function_status readNextFrameSet(const tng_hash_mode hash_mode)
-    {
-        return status = tng_frame_set_read_next(traj, hash_mode);
-    }
-
-
-    /**
-    * @brief Write one frame set, including mapping and related data blocks
-    * to the output_file of tng_data.
-    * @details  tng_data->output_file_path specifies
-    * which file to write to. If the file (output_file) is not open it will be
-    * opened.
-    * @param hash_mode is an option to decide whether to use the md5 hash or not.
-    * If hash_mode == TNG_USE_HASH an md5 hash for each header block will be generated.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred or TNG_CRITICAL (2) if a major error has occured.
-    */
-    tng_function_status writeFrameSet(const tng_hash_mode hash_mode)
-    {
-        return status = tng_frame_set_write(traj, hash_mode);
-    }
-
-
-    /**
-    * @brief Create and initialise a frame set.
-    * @param first_frame is the first frame of the frame set.
-    * @param n_frames is the number of frames in the frame set.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred or TNG_CRITICAL (2) if a major error has occured.
-    */
-    tng_function_status newFrameSet(const int64_t first_frame,
-        const int64_t n_frames)
-    {
-        return status =  tng_frame_set_new(traj, first_frame, n_frames);
-    }
-
-
-    /**
-    * @brief Create and initialise a frame set with the time of the first frame
-    * specified.
-    * @param first_frame is the first frame of the frame set.
-    * @param n_frames is the number of frames in the frame set.
-    * @param first_frame_time is the time stamp of the first frame (in seconds).
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred or TNG_CRITICAL (2) if a major error has occured.
-    */
-    tng_function_status newFrameSetWithTime
-                (const int64_t first_frame,
-                 const int64_t n_frames,
-                 const double first_frame_time)
-    {
-        return status =  tng_frame_set_with_time_new(traj,
-                                                     first_frame, n_frames,
-                                                     first_frame_time);
-    }
-
-
-    /**
-    * @brief Set the time stamp of the first frame of the current frame set.
-    * @param first_frame_time is the time stamp of the first frame in the
-    * frame set.
-    * @return TNG_SUCCESS (0) if successful.
-    */
-    tng_function_status setTimeOfFirstFrameOfFrameSet
-                    (const double first_frame_time)
-    {
-        return status = tng_frame_set_first_frame_time_set(traj,
-                                                           first_frame_time);
-    }
-
-    /**
-    * @brief Add a non-particle dependent data block.
-    * @param id is the block ID of the block to add.
-    * @param block_name is a descriptive name of the block to add
-    * @param datatype is the datatype of the data in the block (e.g. int/float)
-    * @param block_type_flag indicates if this is a non-trajectory block (added
-    * directly to tng_data) or if it is a trajectory block (added to the
-    * frame set)
-    * @param n_frames is the number of frames of the data block (automatically
-    * set to 1 if adding a non-trajectory data block)
-    * @param n_values_per_frame is how many values a stored each frame (e.g. 9
-    * for a box shape block)
-    * @param stride_length is how many frames are between each entry in the
-    * data block
-    * @param codec_id is the ID of the codec to compress the data.
-    * @param new_data is an array of data values to add.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred or TNG_CRITICAL (2) if a major error has occured.
-    */
-    tng_function_status addDataBlock(const int64_t id,
-        const char *block_name,
-        const tng_data_type datatype,
-        const tng_block_type block_type_flag,
-        int64_t n_frames,
-        const int64_t n_values_per_frame,
-        const int64_t stride_length,
-        const int64_t codec_id,
-        void *new_data)
-    {
-        return status = tng_data_block_add(traj, id,block_name,
-            datatype,block_type_flag, n_frames,
-            n_values_per_frame, stride_length,
-            codec_id, new_data);
-    }
-
-
-    /**
-    * @brief Add a particle dependent data block.
-    * @param id is the block ID of the block to add.
-    * @param block_name is a descriptive name of the block to add
-    * @param datatype is the datatype of the data in the block (e.g. int/float)
-    * @param block_type_flag indicates if this is a non-trajectory block (added
-    * directly to tng_data) or if it is a trajectory block (added to the
-    * frame set)
-    * @param n_frames is the number of frames of the data block (automatically
-    * set to 1 if adding a non-trajectory data block)
-    * @param n_values_per_frame is how many values a stored each frame (e.g. 9
-    * for a box shape block)
-    * @param stride_length is how many frames are between each entry in the
-    * data block
-    * @param first_particle_number is the number of the first particle stored
-    * in this data block
-    * @param n_particles is the number of particles stored in this data block
-    * @param codec_id is the ID of the codec to compress the data.
-    * @param new_data is an array of data values to add.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred or TNG_CRITICAL (2) if a major error has occured.
-    */
-    tng_function_status addParticleDataBlock(const int64_t id,
-        const char *block_name,
-        const tng_data_type datatype,
-        const tng_block_type block_type_flag,
-        int64_t n_frames,
-        const int64_t n_values_per_frame,
-        const int64_t stride_length,
-        const int64_t first_particle_number,
-        const int64_t n_particles,
-        const int64_t codec_id,
-        void *new_data)
-    {
-        return status = tng_particle_data_block_add(traj,id,    block_name,
-            datatype, block_type_flag, n_frames,n_values_per_frame,
-            stride_length,first_particle_number,n_particles,
-            codec_id, new_data);
-    }
-
-
-    /**
-    * @brief Write data of one trajectory frame to the output_file of tng_data.
-    * @param frame_nr is the index number of the frame to write.
-    * @param block_id is the ID of the data block to write the data to.
-    * @param data is an array of data to write. The length of the array should
-    * equal n_values_per_frame.
-    * @param hash_mode is an option to decide whether to use the md5 hash or not.
-    * If hash_mode == TNG_USE_HASH the written md5 hash in the file will be
-    * compared to the md5 hash of the read contents to ensure valid data.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred or TNG_CRITICAL (2) if a major error has occured.
-    */
-    tng_function_status writeFrameData(const int64_t frame_nr,
-        const int64_t block_id,
-        const void *data,
-        const tng_hash_mode hash_mode)
-    {
-        return status = tng_frame_data_write(traj,frame_nr,block_id,data,hash_mode);
-    }
-
-
-    /**
-    * @brief Write particle data of one trajectory frame to the output_file of
-    * tng_data.
-    * @param frame_nr is the index number of the frame to write.
-    * @param block_id is the ID of the data block to write the data to.
-    * @param val_first_particle is the number of the first particle in the data
-    * array.
-    * @param val_n_particles is the number of particles in the data array.
-    * @param data is a 1D-array of data to write. The length of the array should
-    * equal n_particles * n_values_per_frame.
-    * @param hash_mode is an option to decide whether to use the md5 hash or not.
-    * If hash_mode == TNG_USE_HASH the written md5 hash in the file will be
-    * compared to the md5 hash of the read contents to ensure valid data.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred or TNG_CRITICAL (2) if a major error has occured.
-    */
-    tng_function_status writeFrameParticleData(const int64_t frame_nr,
-        const int64_t block_id,
-        const int64_t val_first_particle,
-        const int64_t val_n_particles,
-        const void *data,
-        const tng_hash_mode hash_mode)
-    {
-        return status = tng_frame_particle_data_write(traj,frame_nr,block_id,val_first_particle,val_n_particles,data,hash_mode);
-    }
-
-
-    /**
-    * @brief Free data is an array of values (2D).
-    * @param values is the 2D array to free and will be set to 0 afterwards.
-    * @param n_frames is the number of frames in the data array.
-    * @param n_values_per_frame is the number of values per frame in the data array.
-    * @param type is the data type of the data in the array (e.g. int/float/char).
-    * @return TNG_SUCCESS (0) if successful.
-    */
-    tng_function_status freeDataValues(union data_values **values,
-        const int64_t n_frames,
-        const int64_t n_values_per_frame,
-        const tng_data_type type)
-    {
-        return status = tng_data_values_free(traj, values, n_frames,n_values_per_frame,type);
-    }
-
-
-    /**
-    * @brief Free data is an array of values (3D).
-    * @param values is the array to free and will be set to 0 afterwards.
-    * @param n_frames is the number of frames in the data array.
-    * @param n_particles is the number of particles in the data array.
-    * @param n_values_per_frame is the number of values per frame in the data array.
-    * @param type is the data type of the data in the array (e.g. int/float/char).
-    * @return TNG_SUCCESS (0) if successful.
-    */
-    tng_function_status freeParticleDataValues(union data_values ***values,
-        const int64_t n_frames,
-        const int64_t n_particles,
-        const int64_t n_values_per_frame,
-        const tng_data_type type)
-    {
-        return status = tng_particle_data_values_free(traj, values,n_frames,n_particles,n_values_per_frame,type);
-    }
-
-
-    /**
-    * @brief Retrieve non-particle data, from the last read frame set. Obsolete!
-    * which file to read from. If the file (input_file) is not open it will be
-    * opened.
-    * @param block_id is the id number of the particle data block to read.
-    * @param values is a pointer to a 2-dimensional array (memory unallocated), which
-    * will be filled with data. The array will be sized
-    * (n_frames * n_values_per_frame).
-    * Since ***values is allocated in this function it is the callers
-    * responsibility to free the memory.
-    * @param n_frames is set to the number of particles in the returned data. This is
-    * needed to properly reach and/or free the data afterwards.
-    * @param n_values_per_frame is set to the number of values per frame in the data.
-    * This is needed to properly reach and/or free the data afterwards.
-    * @param type is set to the data type of the data in the array.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred or TNG_CRITICAL (2) if a major error has occured.
-    */
-    tng_function_status getData(const int64_t block_id,
-        union data_values ***values,
-        int64_t *n_frames,
-        int64_t *n_values_per_frame,
-        char *type)
-    {
-        return status = tng_data_get(traj, block_id, values, n_frames,
-                                     n_values_per_frame, type);
-    }
-
-    /**
-    * @brief Retrieve a vector (1D array) of non-particle data, from the last read frame set.
-    * @param block_id is the id number of the particle data block to read.
-    * @param values is a pointer to a 1-dimensional array (memory unallocated), which
-    * will be filled with data. The length of the array will be (n_frames * n_values_per_frame).
-    * Since **values is allocated in this function it is the callers
-    * responsibility to free the memory.
-    * @param n_frames is set to the number of particles in the returned data. This is
-    * needed to properly reach and/or free the data afterwards.
-    * @param stride_length is set to the stride length of the returned data.
-    * @param n_values_per_frame is set to the number of values per frame in the data.
-    * This is needed to properly reach and/or free the data afterwards.
-    * @param type is set to the data type of the data in the array.
-    * @details This does only work for numerical (int, float, double) data.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred or TNG_CRITICAL (2) if a major error has occured.
-    */
-    tng_function_status getDataVector
-                (const int64_t block_id,
-                 void **values,
-                 int64_t *n_frames,
-                 int64_t *stride_length,
-                 int64_t *n_values_per_frame,
-                 char *type)
-    {
-        return status = tng_data_vector_get(traj, block_id, values, n_frames,
-                                            stride_length, n_values_per_frame,
-                                            type);
-    }
-
-    /**
-    * @brief Read and retrieve non-particle data, in a specific interval. Obsolete!
-    * which file to read from. If the file (input_file) is not open it will be
-    * opened.
-    * @param block_id is the id number of the particle data block to read.
-    * @param start_frame_nr is the index number of the first frame to read.
-    * @param end_frame_nr is the index number of the last frame to read.
-    * @param hash_mode is an option to decide whether to use the md5 hash or not.
-    * If hash_mode == TNG_USE_HASH the md5 hash in the file will be
-    * compared to the md5 hash of the read contents to ensure valid data.
-    * @param values is a pointer to a 2-dimensional array (memory unallocated), which
-    * will be filled with data. The array will be sized
-    * (n_frames * n_values_per_frame).
-    * Since ***values is allocated in this function it is the callers
-    * responsibility to free the memory.
-    * @param n_values_per_frame is set to the number of values per frame in the data.
-    * This is needed to properly reach and/or free the data afterwards.
-    * @param type is set to the data type of the data in the array.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred or TNG_CRITICAL (2) if a major error has occured.
-    */
-    tng_function_status getDataInterval(const int64_t block_id,
-        const int64_t start_frame_nr,
-        const int64_t end_frame_nr,
-        const tng_hash_mode hash_mode,
-        union data_values ***values,
-        int64_t *n_values_per_frame,
-        char *type)
-    {
-        return status = tng_data_interval_get(traj, block_id, start_frame_nr,
-                                              end_frame_nr, hash_mode, values,
-                                              n_values_per_frame, type);
-    }
-
-
-    /**
-    * @brief Read and retrieve a vector (1D array) of non-particle data,
-    * in a specific interval.
-    * @param block_id is the id number of the particle data block to read.
-    * @param start_frame_nr is the index number of the first frame to read.
-    * @param end_frame_nr is the index number of the last frame to read.
-    * @param hash_mode is an option to decide whether to use the md5 hash or not.
-    * If hash_mode == TNG_USE_HASH the md5 hash in the file will be
-    * compared to the md5 hash of the read contents to ensure valid data.
-    * @param values is a pointer to a 1-dimensional array (memory unallocated), which
-    * will be filled with data. The length of the array will be (n_frames * n_values_per_frame).
-    * Since **values is allocated in this function it is the callers
-    * responsibility to free the memory.
-    * @param stride_length is set to the stride length (writing frequency) of
-    * the data.
-    * @param n_values_per_frame is set to the number of values per frame in the data.
-    * This is needed to properly reach and/or free the data afterwards.
-    * @param type is set to the data type of the data in the array.
-    * @details This does only work for numerical (int, float, double) data.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred or TNG_CRITICAL (2) if a major error has occured.
-    */
-    tng_function_status getDataVectorInterval
-                (const int64_t block_id,
-                 const int64_t start_frame_nr,
-                 const int64_t end_frame_nr,
-                 const char hash_mode,
-                 void **values,
-                 int64_t *stride_length,
-                 int64_t *n_values_per_frame,
-                 char *type)
-    {
-        return status = tng_data_vector_interval_get(traj, block_id,
-                                                     start_frame_nr,
-                                                     end_frame_nr,
-                                                     hash_mode, values,
-                                                     stride_length,
-                                                     n_values_per_frame,
-                                                     type);
-    }
-
-    /**
-    * @brief Retrieve particle data, from the last read frame set. Obsolete!
-    * @details The particle dimension of the returned values array is translated
-    * to real particle numbering, i.e. the numbering of the actual molecular
-    * system.
-    * specifies which file to read from. If the file (input_file) is not open it
-    * will be opened.
-    * @param block_id is the id number of the particle data block to read.
-    * @param values is a pointer to a 3-dimensional array (memory unallocated), which
-    * will be filled with data. The array will be sized
-    * (n_frames * n_particles * n_values_per_frame).
-    * Since ****values is allocated in this function it is the callers
-    * responsibility to free the memory.
-    * @param n_frames is set to the number of particles in the returned data. This is
-    * needed to properly reach and/or free the data afterwards.
-    * @param n_particles is set to the number of particles in the returned data. This is
-    * needed to properly reach and/or free the data afterwards.
-    * @param n_values_per_frame is set to the number of values per frame in the data.
-    * This is needed to properly reach and/or free the data afterwards.
-    * @param type is set to the data type of the data in the array.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred or TNG_CRITICAL (2) if a major error has occured.
-    */
-    tng_function_status getParticleData(const int64_t block_id,
-        union data_values ****values,
-        int64_t *n_frames,
-        int64_t *n_particles,
-        int64_t *n_values_per_frame,
-        char *type)
-    {
-        return status = (tng_particle_data_get(traj, block_id, values, n_frames,
-            n_particles, n_values_per_frame, type));
-    }
-
-
-    /**
-    * @brief Retrieve a vector (1D array) of particle data, from the last read frame set.
-    * @details The particle dimension of the returned values array is translated
-    * to real particle numbering, i.e. the numbering of the actual molecular
-    * system.
-    * @param block_id is the id number of the particle data block to read.
-    * @param values is a pointer to a 1-dimensional array (memory unallocated), which
-    * will be filled with data. The length of the array will be
-    * (n_frames * n_particles * n_values_per_frame).
-    * Since **values is allocated in this function it is the callers
-    * responsibility to free the memory.
-    * @param n_frames is set to the number of frames in the returned data. This is
-    * needed to properly reach and/or free the data afterwards.
-    * @param stride_length is set to the stride length of the returned data.
-    * @param n_particles is set to the number of particles in the returned data. This is
-    * needed to properly reach and/or free the data afterwards.
-    * @param n_values_per_frame is set to the number of values per frame in the data.
-    * This is needed to properly reach and/or free the data afterwards.
-    * @param type is set to the data type of the data in the array.
-    * @details This does only work for numerical (int, float, double) data.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred or TNG_CRITICAL (2) if a major error has occured.
-    */
-    tng_function_status getParticleDataVector
-                (const int64_t block_id,
-                 void **values,
-                 int64_t *n_frames,
-                 int64_t *stride_length,
-                 int64_t *n_particles,
-                 int64_t *n_values_per_frame,
-                 char *type)
-    {
-        return status = tng_particle_data_vector_get(traj, block_id,
-                                                     values, n_frames,
-                                                     stride_length,
-                                                     n_particles,
-                                                     n_values_per_frame, type);
-    }
-
-
-    /**
-    * @brief Read and retrieve particle data, in a specific interval. Obsolete!
-    * @details The particle dimension of the returned values array is translated
-    * to real particle numbering, i.e. the numbering of the actual molecular
-    * system.
-    * @param block_id is the id number of the particle data block to read.
-    * @param start_frame_nr is the index number of the first frame to read.
-    * @param end_frame_nr is the index number of the last frame to read.
-    * @param hash_mode is an option to decide whether to use the md5 hash or not.
-    * If hash_mode == TNG_USE_HASH the md5 hash in the file will be
-    * compared to the md5 hash of the read contents to ensure valid data.
-    * @param values is a pointer to a 3-dimensional array (memory unallocated), which
-    * will be filled with data. The array will be sized
-    * (n_frames * n_particles * n_values_per_frame).
-    * Since ****values is allocated in this function it is the callers
-    * responsibility to free the memory.
-    * @param n_particles is set to the number of particles in the returned data. This is
-    * needed to properly reach and/or free the data afterwards.
-    * @param n_values_per_frame is set to the number of values per frame in the data.
-    * This is needed to properly reach and/or free the data afterwards.
-    * @param type is set to the data type of the data in the array.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred or TNG_CRITICAL (2) if a major error has occured.
-    */
-    tng_function_status getParticleDataInterval(const int64_t block_id,
-        const int64_t start_frame_nr,
-        const int64_t end_frame_nr,
-        const tng_hash_mode hash_mode,
-        union data_values ****values,
-        int64_t *n_particles,
-        int64_t *n_values_per_frame,
-        char *type)
-    {
-        return status = (tng_particle_data_interval_get(traj, block_id, start_frame_nr,
-            end_frame_nr, hash_mode, values,
-            n_particles, n_values_per_frame,
-            type));
-    }
-
-
-    /**
-    * @brief Read and retrieve a vector (1D array) particle data, in a
-    * specific interval.
-    * @details The particle dimension of the returned values array is translated
-    * to real particle numbering, i.e. the numbering of the actual molecular
-    * system.
-    * @param block_id is the id number of the particle data block to read.
-    * @param start_frame_nr is the index number of the first frame to read.
-    * @param end_frame_nr is the index number of the last frame to read.
-    * @param hash_mode is an option to decide whether to use the md5 hash or not.
-    * If hash_mode == TNG_USE_HASH the md5 hash in the file will be
-    * compared to the md5 hash of the read contents to ensure valid data.
-    * @param values is a pointer to a 1-dimensional array (memory unallocated), which
-    * will be filled with data. The length of the array will be
-    * (n_frames * n_particles * n_values_per_frame).
-    * Since **values is allocated in this function it is the callers
-    * responsibility to free the memory.
-    * @param stride_length is set to the stride length (writing frequency) of
-    * the data.
-    * @param n_particles is set to the number of particles in the returned data. This is
-    * needed to properly reach and/or free the data afterwards.
-    * @param n_values_per_frame is set to the number of values per frame in the data.
-    * This is needed to properly reach and/or free the data afterwards.
-    * @param type is set to the data type of the data in the array.
-    * @details This does only work for numerical (int, float, double) data.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred or TNG_CRITICAL (2) if a major error has occured.
-    */
-    tng_function_status getParticleDataVectorInterval
-                (const int64_t block_id,
-                 const int64_t start_frame_nr,
-                 const int64_t end_frame_nr,
-                 const tng_hash_mode hash_mode,
-                 void **values,
-                 int64_t *n_particles,
-                 int64_t *stride_length,
-                 int64_t *n_values_per_frame,
-                 char *type)
-    {
-        return status = tng_particle_data_vector_interval_get(traj, block_id,
-                                                              start_frame_nr,
-                                                              end_frame_nr,
-                                                              hash_mode,
-                                                              values,
-                                                              n_particles,
-                                                              stride_length,
-                                                              n_values_per_frame,
-                                                              type);
-    }
-
-
-    /** @brief Get the date and time of initial file creation in ISO format (string).
-    *  @param time is a pointer to the string in which the date will be stored. Memory
-    must be reserved beforehand.
-    * @return TNG_SUCCESS (0) if successful.
-    */
-    tng_function_status getTimeStr(char *time)
-    {
-        return status = tng_time_get_str(traj, time);
-    }
-
-
-};
-
-
-
-
-
-class Molecule
-{
-private:
-
-    tng_molecule_t mol;
-    Trajectory * traj;
-    tng_function_status status;
-public:
-    tng_function_status addChain(const char *name, Chain *chain);
-    tng_function_status findChain(const char *name, int64_t id, Chain *chain);
-    friend class Trajectory;
-    //Constructor
-    Molecule(Trajectory * trajectory)
-    {
-        traj = trajectory;
-
-        //status = tng_molecule_init(traj->traj,mol);
-    }
-    /**
-     *@Dose nothing, use ~TngMolecule()
-    */
-    ~Molecule()
-    {
-        status = tng_molecule_destroy(traj->traj,mol);
-    }
-        //! Status
-    tng_function_status getStatus()
-    { return status; }
-
-
-    /**
-    * @brief Set the name of a molecule.
-    * @param new_name is a string containing the wanted name.
-    * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
-    * error has occured.
-    */
-    tng_function_status setName(const char *new_name)
-    {
-        return status = tng_molecule_name_set(traj->traj,mol,new_name);
-    }
-
-    /**
-    * @brief Get the count of a molecule.
-    * @param cnt is a pointer to the variable to be populated with the count.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred or TNG_CRITICAL (2) if a major error has occured.
-    */
-    tng_function_status getCnt(int64_t *cnt)
-    {
-        return status = tng_molecule_cnt_get(traj->traj,mol,cnt);
-    }
-
-    /**
-    * @brief Set the count of a molecule.
-    * @param cnt is the number of instances of this molecule.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if a minor error
-    * has occurred or TNG_CRITICAL (2) if a major error has occured.
-    */
-    tng_function_status setCnt(int64_t cnt)
-    {
-        return status = tng_molecule_cnt_set(traj->traj,mol,cnt);
-    }
-
-};
-
-    tng_function_status Trajectory::addMolecule(const char *name, Molecule_t molecule)
-{
-    return status = tng_molecule_add(traj,name, &molecule->mol);
-}
-
-    tng_function_status Trajectory::addMoleculeWithId
-                (const char *name,
-                 const int64_t id,
-                 Molecule_t molecule)
-{
-    return status = tng_molecule_w_id_add(traj, name, id, &molecule->mol);
-}
-
-/**
-* @brief Find a molecule.
-* @param tng_data is the trajectory data container containing the molecule.
-* @param name is a string containing the name of the molecule. If name is empty
-* only id will be used for finding the molecule.
-* @param id is the id of the molecule to look for. If id is -1 only the name of
-* the molecule will be used for finding the molecule.
-* @param molecule is a pointer to the molecule if it was found - otherwise 0.
-* @return TNG_SUCCESS (0) if the molecule is found or TNG_FAILURE (1) if the
-* molecule is not found.
-* @details If name is an empty string and id is -1 the first molecule will be
-* found.
-*/
-tng_function_status Trajectory::findMolecule
-                (const char *name,
-                int64_t id,
-                Molecule_t molecule)
-{
-    return status = tng_molecule_find(traj, name, id,
-                            &molecule->mol);
-}
-
-
-class Atom
-{
-private:
-    tng_atom_t atom;
-    Trajectory * traj;
-    tng_function_status status;
-public:
-    friend class Residue;
-    //constructor
-    Atom(Trajectory * trajectory)
-    {
-        traj = trajectory;
-    }
-    //deonstructor
-    /**
-     *@Dose nothing, use ~TngMolecule()
-    */
-        ~Atom()
-    {
-        //delete atom;
-    }
-            //! Status
-    tng_function_status getStatus()
-    { return status; }
-    /**
-    * @brief Set the name of an atom.
-    * @param new_name is a string containing the wanted name.
-    * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
-    * error has occured.
-    */
-    tng_function_status setName(const char *new_name)
-    {
-        return status = tng_atom_name_set(traj->traj, atom , new_name);
-    }
-
-    /**
-    * @param new_type is a string containing the atom type.
-    * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
-    * error has occured.
-    */
-    tng_function_status setType(const char *new_type)
-    {
-        return status = tng_atom_type_set(traj->traj, atom, new_type);
-    }
-};
-
-class Residue
-{
-    private:
-    tng_residue_t residue;
-    Trajectory * traj;
-    tng_function_status status;
-public:
-    friend class Chain;
-    //constructor
-    Residue(Trajectory  * trajectory)
-    {
-        traj = trajectory;
-    }
-    //deonstructor
-    /**
-     *@Dose nothing, use ~TngMolecule()
-    */
-        ~Residue()
-    {
-        //delete residue;
-    }
-    //! Status
-    tng_function_status getStatus()
-    { return status; }
-    /**
-    * @brief Set the name of a residue.
-    * @param residue is the residue to rename.
-    * @param new_name is a string containing the wanted name.
-    * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
-    * error has occured.
-    */
-    tng_function_status setName(const char *new_name)
-    {
-        return status = tng_residue_name_set(traj->traj, residue,new_name);
-    }
-
-    /**
-    * @brief Add an atom to a residue.
-    * @param atom_name is a string containing the name of the atom.
-    * @param atom_type is a string containing the atom type of the atom.
-    * @param atom is a pointer to the newly created atom.
-    * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
-    * error has occured.
-    */
-    tng_function_status addAtom(const char *atom_name,
-        const char *atom_type,
-        Atom * atom)
-    {
-        return status = tng_residue_atom_add(traj->traj, residue, atom_name,
-                                             atom_type, &atom->atom);
-    }
-
-
-    /**
-    * @brief Add an atom with a specific ID to a residue.
-    * @param atom_name is a string containing the name of the atom.
-    * @param atom_type is a string containing the atom type of the atom.
-    * @param id is the ID of the created atom.
-    * @param atom is a pointer to the newly created atom.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if the ID could
-    * not be set properly or TNG_CRITICAL (2) if a major error has occured.
-    */
-    tng_function_status addAtomWithId
-                (const char *atom_name,
-                 const char *atom_type,
-                 const int64_t id,
-                 Atom * atom)
-    {
-        return status = tng_residue_atom_w_id_add(traj->traj, residue,
-                                                  atom_name, atom_type,
-                                                  id, &atom->atom);
-    }
-
-};
-
-class Chain
-{
-    private:
-    tng_chain_t chain;
-    Trajectory * traj;
-    tng_function_status status;
-public:
-    friend class Molecule;
-    //constructor
-    Chain(Trajectory * trajectory)
-    {
-        traj = trajectory;
-    }
-    //deonstructor
-    /**
-     *@Dose nothing, use ~TngMolecule()
-    */
-        ~Chain()
-    {
-        //delete chain;
-    }
-    //! Status
-    tng_function_status getStatus()
-    { return status; }
-    /**
-    * @brief Set the name of a chain.
-    * @param new_name is a string containing the wanted name.
-    * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
-    * error has occured.
-    */
-    tng_function_status setName(const char *new_name)
-    {
-        return status  = tng_chain_name_set(traj->traj, chain, new_name);
-    }
-
-
-    /**
-    * @brief Find a residue in a chain.
-    * @param name is a string containing the name of the residue.
-    * @param id is the id of the residue to find. If id == -1 the first residue
-    * that matches the specified name will be found.
-    * @param residue is a pointer to the residue if it was found - otherwise 0.
-    * @return TNG_SUCCESS (0) if the residue is found or TNG_FAILURE (1) if the
-    * residue is not found.
-    * @details If name is an empty string the first residue will be found.
-    */
-    tng_function_status findResidue
-                (const char *name,
-                 int64_t id,
-                 Residue *residue)
-    {
-        return status = tng_chain_residue_find(traj->traj, chain, name,
-                                               id, &residue->residue);
-    }
-
-    /**
-    * @brief Add a residue to a chain.
-    * @param name is a string containing the name of the residue.
-    * @param residue is a pointer to the newly created residue.
-    * @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
-    * error has occured.
-    */
-    tng_function_status addResidue(const char *name,
-        Residue * residue)
-    {
-        return status = tng_chain_residue_add(traj->traj, chain,
-                                              name, &residue->residue);
-    }
-
-    /**
-    * @brief Add a residue with a specific ID to a chain.
-    * @param name is a string containing the name of the residue.
-    * @param id is the ID of the created residue.
-    * @param residue is a pointer to the newly created residue.
-    * @return TNG_SUCCESS (0) if successful, TNG_FAILURE (1) if the ID could
-    * not be set properly or TNG_CRITICAL (2) if a major error has occured.
-    */
-    tng_function_status addResidueWithId
-                (const char *name,
-                 const int64_t id,
-                 Residue * residue)
-    {
-        return status = tng_chain_residue_w_id_add(traj->traj, chain,
-                                                   name, id, &residue->residue);
-    }
-};
-
-/**
-* @brief Add a chain to a molecule.
-* @param name is a string containing the name of the chain.
-* @param chain s a pointer to the newly created chain.
-* @return TNG_SUCCESS (0) if successful or TNG_CRITICAL (2) if a major
-* error has occured.
-*/
-tng_function_status Molecule::addChain(const char *name, Chain *chain)
-{
-    return status = tng_molecule_chain_add(traj->traj,mol,name,&chain->chain);
-}
-
-/**
-* @brief Find a chain in a molecule.
-* @param name is a string containing the name of the chain. If name is empty
-* only id will be used for finding the chain.
-* @param id is the id of the chain to look for. If id is -1 only the name of
-* the chain will be used for finding the chain.
-* @param chain is a pointer to the chain if it was found - otherwise 0.
-* @return TNG_SUCCESS (0) if the chain is found or TNG_FAILURE (1) if the
-* chain is not found.
-* @details If name is an empty string and id is -1 the first chain will be
-* found.
-*/
-tng_function_status Molecule::findChain
-                (const char *name,
-                int64_t id,
-                Chain *chain)
-{
-    return status = tng_molecule_chain_find(traj->traj, mol, name, id,
-                                            &chain->chain);
-}
-
-}
-#endif
diff --git a/src/include/gromacs/external/tng_io/include/tng/tng_io_fwd.h b/src/include/gromacs/external/tng_io/include/tng/tng_io_fwd.h
deleted file mode 100644 (file)
index 68bcafd..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/* This code is part of the tng binary trajectory format.
- *
- * Written by Magnus Lundborg
- * Copyright (c) 2012-2013, The GROMACS development team.
- * Check out http://www.gromacs.org for more information.
- *
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the Revised BSD License.
- */
-
-#ifndef TNG_IO_FWD_H
-#define TNG_IO_FWD_H     1
-
-/** A pointer to the main trajectory data storage. */
-typedef struct tng_trajectory *tng_trajectory_t;
-/** A pointer to a molecule description. */
-typedef struct tng_molecule *tng_molecule_t;
-/** A pointer to a molecular chain description. */
-typedef struct tng_chain *tng_chain_t;
-/** A pointer to a molecular residue description. */
-typedef struct tng_residue *tng_residue_t;
-/** A pointer to a molecular atom description. */
-typedef struct tng_atom *tng_atom_t;
-/** A pointer to a bond between two atoms. */
-typedef struct tng_bond *tng_bond_t;
-/** A pointer to a structure containing data common to all trajectory blocks,
- *  such as header and contents. */
-typedef struct tng_gen_block *tng_gen_block_t;
-/** A pointer to particle mapping information. */
-typedef struct tng_particle_mapping *tng_particle_mapping_t;
-/** A pointer to a structure containing frame set information. */
-typedef struct tng_trajectory_frame_set *tng_trajectory_frame_set_t;
-/** A pointer to a data container. */
-typedef struct tng_data *tng_data_t;
-
-#endif
diff --git a/src/include/gromacs/external/tng_io/include/tng/version.h.in b/src/include/gromacs/external/tng_io/include/tng/version.h.in
deleted file mode 100644 (file)
index 662e68f..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef VERSION_CONFIG_H
-#define VERSION_CONFIG_H
-
-/* define the API version (integer) */
-#define TNG_API_VERSION @TNG_API_VERSION@
-
-/* define the major and minor versions
-   of the library */
-#define TNG_VERSION_MAJOR @TNG_MAJOR_VERSION@
-#define TNG_VERSION_MINOR @TNG_MINOR_VERSION@
-/* define the patchlevel of the library */
-#define TNG_VERSION_PATCHLEVEL @TNG_VERSION_PATCH_LEVEL@
-/* define the full version of the library (string) */
-#define TNG_VERSION "@TNG_IO_VERSION@"
-
-#endif
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test1.h b/src/include/gromacs/external/tng_io/src/tests/compression/test1.h
deleted file mode 100644 (file)
index b45abc4..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Initial coding. Intra frame triple algorithm. Cubic cell."
-#define FILENAME "test1.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 1
-#define SCALE 0.1
-#define PRECISION 0.01
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 3
-#define INITIALCODINGPARAMETER -1
-#define CODING 1
-#define CODINGPARAMETER 0
-#define VELCODING 0
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 10000
-#define INTMAX2 10000
-#define INTMAX3 10000
-#define NFRAMES 1000
-#define EXPECTED_FILESIZE 2776230.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test10.h b/src/include/gromacs/external/tng_io/src/tests/compression/test10.h
deleted file mode 100644 (file)
index d5135eb..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Coding. Triple intraframe algorithm. Cubic cell."
-#define FILENAME "test10.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 100
-#define SCALE 0.1
-#define PRECISION 0.01
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 5
-#define INITIALCODINGPARAMETER 0
-#define CODING 3
-#define CODINGPARAMETER -1
-#define VELCODING 0
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 10000
-#define INTMAX2 10000
-#define INTMAX3 10000
-#define NFRAMES 1000
-#define EXPECTED_FILESIZE 2728492.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test11.h b/src/include/gromacs/external/tng_io/src/tests/compression/test11.h
deleted file mode 100644 (file)
index 596d63c..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Coding. Triple one-to-one algorithm. Cubic cell."
-#define FILENAME "test11.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 100
-#define SCALE 0.1
-#define PRECISION 0.01
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 5
-#define INITIALCODINGPARAMETER 0
-#define CODING 7
-#define CODINGPARAMETER -1
-#define VELCODING 0
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 10000
-#define INTMAX2 10000
-#define INTMAX3 10000
-#define NFRAMES 1000
-#define EXPECTED_FILESIZE 4293415.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test12.h b/src/include/gromacs/external/tng_io/src/tests/compression/test12.h
deleted file mode 100644 (file)
index 43eb15d..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Coding. BWLZH interframe algorithm. Cubic cell."
-#define FILENAME "test12.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 100
-#define SCALE 0.1
-#define PRECISION 0.01
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 5
-#define INITIALCODINGPARAMETER 0
-#define CODING 8
-#define CODINGPARAMETER 0
-#define VELCODING 0
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 10000
-#define INTMAX2 10000
-#define INTMAX3 10000
-#define NFRAMES 1000
-#define EXPECTED_FILESIZE 894421.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test13.h b/src/include/gromacs/external/tng_io/src/tests/compression/test13.h
deleted file mode 100644 (file)
index 72aa99e..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Coding. BWLZH intraframe algorithm. Cubic cell."
-#define FILENAME "test13.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 100
-#define SCALE 0.1
-#define PRECISION 0.01
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 5
-#define INITIALCODINGPARAMETER 0
-#define CODING 9
-#define CODINGPARAMETER 0
-#define VELCODING 0
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 10000
-#define INTMAX2 10000
-#define INTMAX3 10000
-#define NFRAMES 1000
-#define EXPECTED_FILESIZE 840246.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test14.h b/src/include/gromacs/external/tng_io/src/tests/compression/test14.h
deleted file mode 100644 (file)
index 382c70e..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Coding. XTC3 algorithm. Cubic cell."
-#define FILENAME "test14.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 100
-#define SCALE 0.1
-#define PRECISION 0.01
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 5
-#define INITIALCODINGPARAMETER 0
-#define CODING 10 
-#define CODINGPARAMETER 0
-#define VELCODING 0
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 10000
-#define INTMAX2 10000
-#define INTMAX3 10000
-#define NFRAMES 1000
-#define EXPECTED_FILESIZE 1401016.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test15.h b/src/include/gromacs/external/tng_io/src/tests/compression/test15.h
deleted file mode 100644 (file)
index c593bf5..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Initial coding. Automatic selection of algorithms. Cubic cell."
-#define FILENAME "test15.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 1
-#define SCALE 0.1
-#define PRECISION 0.01
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING -1
-#define INITIALCODINGPARAMETER -1
-#define CODING 1
-#define CODINGPARAMETER 0
-#define VELCODING 0
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 10000
-#define INTMAX2 10000
-#define INTMAX3 10000
-#define NFRAMES 1000
-#define EXPECTED_FILESIZE 2776230.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test16.h b/src/include/gromacs/external/tng_io/src/tests/compression/test16.h
deleted file mode 100644 (file)
index a29c5e5..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#define TESTNAME "Coding. Automatic selection of algorithms. Cubic cell."
-#define FILENAME "test16.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 100
-#define SCALE 0.1
-#define PRECISION 0.01
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING -1
-#define INITIALCODINGPARAMETER -1
-#define CODING -1
-#define CODINGPARAMETER -1
-#define VELCODING 0
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 10000
-#define INTMAX2 10000
-#define INTMAX3 10000
-#define NFRAMES 1000
-#define SPEED 6
-#define EXPECTED_FILESIZE 838168.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test17.h b/src/include/gromacs/external/tng_io/src/tests/compression/test17.h
deleted file mode 100644 (file)
index 9787976..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#define TESTNAME "Initial coding of velocities. Stopbits one-to-one . Cubic cell."
-#define FILENAME "test17.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 1
-#define SCALE 0.1
-#define PRECISION 0.01
-#define WRITEVEL 1
-#define VELPRECISION 0.1
-#define INITIALCODING 5
-#define INITIALCODINGPARAMETER 0
-#define CODING 1
-#define CODINGPARAMETER 0
-#define INITIALVELCODING 1
-#define INITIALVELCODINGPARAMETER -1
-#define VELCODING 0
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 10000
-#define INTMAX2 10000
-#define INTMAX3 10000
-#define NFRAMES 1000
-#define EXPECTED_FILESIZE 7336171.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test18.h b/src/include/gromacs/external/tng_io/src/tests/compression/test18.h
deleted file mode 100644 (file)
index 5a329ad..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#define TESTNAME "Initial coding of velocities. Triplet one-to-one. Cubic cell."
-#define FILENAME "test18.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 1
-#define SCALE 0.1
-#define PRECISION 0.01
-#define WRITEVEL 1
-#define VELPRECISION 0.1
-#define INITIALCODING 5
-#define INITIALCODINGPARAMETER 0
-#define CODING 1
-#define CODINGPARAMETER 0
-#define INITIALVELCODING 3
-#define INITIALVELCODINGPARAMETER -1
-#define VELCODING 0
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 10000
-#define INTMAX2 10000
-#define INTMAX3 10000
-#define NFRAMES 1000
-#define EXPECTED_FILESIZE 7089695.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test19.h b/src/include/gromacs/external/tng_io/src/tests/compression/test19.h
deleted file mode 100644 (file)
index b298309..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#define TESTNAME "Initial coding of velocities. BWLZH one-to-one. Cubic cell."
-#define FILENAME "test19.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 1
-#define SCALE 0.1
-#define PRECISION 0.01
-#define WRITEVEL 1
-#define VELPRECISION 0.1
-#define INITIALCODING 5
-#define INITIALCODINGPARAMETER 0
-#define CODING 1
-#define CODINGPARAMETER 0
-#define INITIALVELCODING 9
-#define INITIALVELCODINGPARAMETER 0
-#define VELCODING 0
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 10000
-#define INTMAX2 10000
-#define INTMAX3 10000
-#define NFRAMES 50
-#define EXPECTED_FILESIZE 208809.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test2.h b/src/include/gromacs/external/tng_io/src/tests/compression/test2.h
deleted file mode 100644 (file)
index 0e2c3b0..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Initial coding. XTC2 algorithm. Cubic cell."
-#define FILENAME "test2.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 1
-#define SCALE 0.1
-#define PRECISION 0.01
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 5
-#define INITIALCODINGPARAMETER 0
-#define CODING 1
-#define CODINGPARAMETER 0
-#define VELCODING 0
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 10000
-#define INTMAX2 10000
-#define INTMAX3 10000
-#define NFRAMES 1000
-#define EXPECTED_FILESIZE 2796171.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test20.h b/src/include/gromacs/external/tng_io/src/tests/compression/test20.h
deleted file mode 100644 (file)
index 4a45135..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#define TESTNAME "Coding of velocities. Stopbit one-to-one. Cubic cell."
-#define FILENAME "test20.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 100
-#define SCALE 0.1
-#define PRECISION 0.01
-#define WRITEVEL 1
-#define VELPRECISION 0.1
-#define INITIALCODING 5
-#define INITIALCODINGPARAMETER 0
-#define CODING 5
-#define CODINGPARAMETER 0
-#define INITIALVELCODING 1
-#define INITIALVELCODINGPARAMETER -1
-#define VELCODING 1
-#define VELCODINGPARAMETER -1
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 10000
-#define INTMAX2 10000
-#define INTMAX3 10000
-#define NFRAMES 1000
-#define EXPECTED_FILESIZE 7237102.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test21.h b/src/include/gromacs/external/tng_io/src/tests/compression/test21.h
deleted file mode 100644 (file)
index 773c1da..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#define TESTNAME "Coding of velocities. Triplet inter. Cubic cell."
-#define FILENAME "test21.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 100
-#define SCALE 0.1
-#define PRECISION 0.01
-#define WRITEVEL 1
-#define VELPRECISION 0.1
-#define INITIALCODING 5
-#define INITIALCODINGPARAMETER 0
-#define CODING 5
-#define CODINGPARAMETER 0
-#define INITIALVELCODING 1
-#define INITIALVELCODINGPARAMETER -1
-#define VELCODING 2
-#define VELCODINGPARAMETER -1
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 10000
-#define INTMAX2 10000
-#define INTMAX3 10000
-#define NFRAMES 1000
-#define EXPECTED_FILESIZE 6214307.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test22.h b/src/include/gromacs/external/tng_io/src/tests/compression/test22.h
deleted file mode 100644 (file)
index 1d8cfa9..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#define TESTNAME "Coding of velocities. Triplet one-to-one. Cubic cell."
-#define FILENAME "test22.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 100
-#define SCALE 0.1
-#define PRECISION 0.01
-#define WRITEVEL 1
-#define VELPRECISION 0.1
-#define INITIALCODING 5
-#define INITIALCODINGPARAMETER 0
-#define CODING 5
-#define CODINGPARAMETER 0
-#define INITIALVELCODING 1
-#define INITIALVELCODINGPARAMETER -1
-#define VELCODING 3
-#define VELCODINGPARAMETER -1
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 10000
-#define INTMAX2 10000
-#define INTMAX3 10000
-#define NFRAMES 1000
-#define EXPECTED_FILESIZE 6988699.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test23.h b/src/include/gromacs/external/tng_io/src/tests/compression/test23.h
deleted file mode 100644 (file)
index 950f7ee..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#define TESTNAME "Coding of velocities. Stopbit interframe. Cubic cell."
-#define FILENAME "test23.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 100
-#define SCALE 0.1
-#define PRECISION 0.01
-#define WRITEVEL 1
-#define VELPRECISION 0.1
-#define INITIALCODING 5
-#define INITIALCODINGPARAMETER 0
-#define CODING 5
-#define CODINGPARAMETER 0
-#define INITIALVELCODING 1
-#define INITIALVELCODINGPARAMETER -1
-#define VELCODING 6
-#define VELCODINGPARAMETER -1
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 10000
-#define INTMAX2 10000
-#define INTMAX3 10000
-#define NFRAMES 1000
-#define EXPECTED_FILESIZE 6494602.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test24.h b/src/include/gromacs/external/tng_io/src/tests/compression/test24.h
deleted file mode 100644 (file)
index 4b20897..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#define TESTNAME "Coding of velocities. BWLZH interframe. Cubic cell."
-#define FILENAME "test24.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 25
-#define SCALE 0.1
-#define PRECISION 0.01
-#define WRITEVEL 1
-#define VELPRECISION 0.1
-#define INITIALCODING 5
-#define INITIALCODINGPARAMETER 0
-#define CODING 5
-#define CODINGPARAMETER 0
-#define INITIALVELCODING 1
-#define INITIALVELCODINGPARAMETER -1
-#define VELCODING 8
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 10000
-#define INTMAX2 10000
-#define INTMAX3 10000
-#define NFRAMES 50
-#define EXPECTED_FILESIZE 153520.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test25.h b/src/include/gromacs/external/tng_io/src/tests/compression/test25.h
deleted file mode 100644 (file)
index 37d777a..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#define TESTNAME "Coding of velocities. BWLZH one-to-one. Cubic cell."
-#define FILENAME "test25.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 25
-#define SCALE 0.1
-#define PRECISION 0.01
-#define WRITEVEL 1
-#define VELPRECISION 0.1
-#define INITIALCODING 5
-#define INITIALCODINGPARAMETER 0
-#define CODING 5
-#define CODINGPARAMETER 0
-#define INITIALVELCODING 1
-#define INITIALVELCODINGPARAMETER -1
-#define VELCODING 9
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 10000
-#define INTMAX2 10000
-#define INTMAX3 10000
-#define NFRAMES 50
-#define EXPECTED_FILESIZE 154753.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test26.h b/src/include/gromacs/external/tng_io/src/tests/compression/test26.h
deleted file mode 100644 (file)
index 2c3b304..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#define TESTNAME "XTC2 algorithm. Orthorhombic cell."
-#define FILENAME "test26.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 100
-#define SCALE 0.1
-#define PRECISION 0.01
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 5
-#define INITIALCODINGPARAMETER 0
-#define CODING 5
-#define CODINGPARAMETER 0
-#define INITIALVELCODING 1
-#define INITIALVELCODINGPARAMETER -1
-#define VELCODING 9
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 20000
-#define INTMAX2 10000
-#define INTMAX3 30000
-#define NFRAMES 1000
-#define EXPECTED_FILESIZE 2861948.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test27.h b/src/include/gromacs/external/tng_io/src/tests/compression/test27.h
deleted file mode 100644 (file)
index af7c9ff..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#define TESTNAME "XTC3 algorithm. Orthorhombic cell."
-#define FILENAME "test27.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 100
-#define SCALE 0.1
-#define PRECISION 0.01
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 10
-#define INITIALCODINGPARAMETER 0
-#define CODING 10
-#define CODINGPARAMETER 0
-#define INITIALVELCODING 1
-#define INITIALVELCODINGPARAMETER -1
-#define VELCODING 9
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 20000
-#define INTMAX2 10000
-#define INTMAX3 30000
-#define NFRAMES 200
-#define EXPECTED_FILESIZE 282600.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test28.h b/src/include/gromacs/external/tng_io/src/tests/compression/test28.h
deleted file mode 100644 (file)
index 99a70fc..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#define TESTNAME "Initial coding. Autoselect algorithm. Repetitive molecule. Cubic cell."
-#define FILENAME "test28.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 1
-#define SCALE 0.1
-#define REGULAR
-#define PRECISION 0.01
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING -1
-#define INITIALCODINGPARAMETER -1
-#define CODING 0
-#define CODINGPARAMETER 0
-#define INITIALVELCODING 0
-#define INITIALVELCODINGPARAMETER -1
-#define VELCODING 0
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 10000
-#define INTMAX2 10000
-#define INTMAX3 10000
-#define NFRAMES 1000
-#define EXPECTED_FILESIZE 1677619.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test29.h b/src/include/gromacs/external/tng_io/src/tests/compression/test29.h
deleted file mode 100644 (file)
index be6a8bf..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#define TESTNAME "Position coding. Autoselect algorithm. Repetitive molecule. Cubic cell."
-#define FILENAME "test29.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 100
-#define SCALE 0.1
-#define REGULAR
-#define PRECISION 0.01
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING -1
-#define INITIALCODINGPARAMETER -1
-#define CODING -1
-#define CODINGPARAMETER -1
-#define INITIALVELCODING 0
-#define INITIALVELCODINGPARAMETER -1
-#define VELCODING 0
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 10000
-#define INTMAX2 10000
-#define INTMAX3 10000
-#define NFRAMES 1000
-#define EXPECTED_FILESIZE 228148.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test3.h b/src/include/gromacs/external/tng_io/src/tests/compression/test3.h
deleted file mode 100644 (file)
index 768a208..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Initial coding. Triplet one-to-one algorithm. Cubic cell."
-#define FILENAME "test3.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 1
-#define SCALE 0.1
-#define PRECISION 0.01
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 7
-#define INITIALCODINGPARAMETER -1
-#define CODING 1
-#define CODINGPARAMETER 0
-#define VELCODING 0
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 10000
-#define INTMAX2 10000
-#define INTMAX3 10000
-#define NFRAMES 1000
-#define EXPECTED_FILESIZE 4356773.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test30.h b/src/include/gromacs/external/tng_io/src/tests/compression/test30.h
deleted file mode 100644 (file)
index b719c7b..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Initial coding. Intra frame triple algorithm. Large system. Cubic cell."
-#define FILENAME "test30.tng_compress"
-#define ALGOTEST
-#define NATOMS 5000000
-#define CHUNKY 1
-#define SCALE 1.
-#define PRECISION 1.
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 3
-#define INITIALCODINGPARAMETER -1
-#define CODING 1
-#define CODINGPARAMETER -1
-#define VELCODING 4
-#define VELCODINGPARAMETER 0
-#define INTMIN1 -536870911
-#define INTMIN2 -536870911
-#define INTMIN3 -536870911
-#define INTMAX1 536870911
-#define INTMAX2 536870911
-#define INTMAX3 536870911
-#define NFRAMES 10
-#define EXPECTED_FILESIZE 280198420.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test31.h b/src/include/gromacs/external/tng_io/src/tests/compression/test31.h
deleted file mode 100644 (file)
index c0763e8..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Initial coding. XTC2 algorithm. Large system. Cubic cell."
-#define FILENAME "test31.tng_compress"
-#define ALGOTEST
-#define NATOMS 5000000
-#define CHUNKY 1
-#define SCALE 1.
-#define PRECISION 1.
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 5
-#define INITIALCODINGPARAMETER 0
-#define CODING 1
-#define CODINGPARAMETER -1
-#define VELCODING 4
-#define VELCODINGPARAMETER 0
-#define INTMIN1 -536870911
-#define INTMIN2 -536870911
-#define INTMIN3 -536870911
-#define INTMAX1 536870911
-#define INTMAX2 536870911
-#define INTMAX3 536870911
-#define NFRAMES 10
-#define EXPECTED_FILESIZE 301463456.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test32.h b/src/include/gromacs/external/tng_io/src/tests/compression/test32.h
deleted file mode 100644 (file)
index 5f2e2f9..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Initial coding. XTC3 algorithm. Large system. Cubic cell."
-#define FILENAME "test32.tng_compress"
-#define ALGOTEST
-#define NATOMS 5000000
-#define CHUNKY 1
-#define SCALE 1.
-#define PRECISION 1.
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 10
-#define INITIALCODINGPARAMETER 0
-#define CODING 1
-#define CODINGPARAMETER -1
-#define VELCODING 4
-#define VELCODINGPARAMETER 0
-#define INTMIN1 -536870911
-#define INTMIN2 -536870911
-#define INTMIN3 -536870911
-#define INTMAX1 536870911
-#define INTMAX2 536870911
-#define INTMAX3 536870911
-#define NFRAMES 2
-#define EXPECTED_FILESIZE 31668187.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test33.h b/src/include/gromacs/external/tng_io/src/tests/compression/test33.h
deleted file mode 100644 (file)
index 3d08a65..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Initial coding. Intra frame BWLZH algorithm. Large system. Cubic cell."
-#define FILENAME "test33.tng_compress"
-#define ALGOTEST
-#define NATOMS 5000000
-#define CHUNKY 1
-#define SCALE 1.
-#define PRECISION 1.
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 9
-#define INITIALCODINGPARAMETER 0
-#define CODING 1
-#define CODINGPARAMETER -1
-#define VELCODING 4
-#define VELCODINGPARAMETER 0
-#define INTMIN1 -536870911
-#define INTMIN2 -536870911
-#define INTMIN3 -536870911
-#define INTMAX1 536870911
-#define INTMAX2 536870911
-#define INTMAX3 536870911
-#define NFRAMES 2
-#define EXPECTED_FILESIZE 7121047.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test34.h b/src/include/gromacs/external/tng_io/src/tests/compression/test34.h
deleted file mode 100644 (file)
index 4242c18..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Position coding. Stop bits algorithm. Large system. Cubic cell."
-#define FILENAME "test34.tng_compress"
-#define ALGOTEST
-#define NATOMS 5000000
-#define CHUNKY 2
-#define SCALE 1.
-#define PRECISION 1.
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 5
-#define INITIALCODINGPARAMETER 0
-#define CODING 1
-#define CODINGPARAMETER -1
-#define VELCODING 4
-#define VELCODINGPARAMETER 0
-#define INTMIN1 -536870911
-#define INTMIN2 -536870911
-#define INTMIN3 -536870911
-#define INTMAX1 536870911
-#define INTMAX2 536870911
-#define INTMAX3 536870911
-#define NFRAMES 10
-#define EXPECTED_FILESIZE 250247372.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test35.h b/src/include/gromacs/external/tng_io/src/tests/compression/test35.h
deleted file mode 100644 (file)
index 8f742b7..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Position coding. Inter frame triple algorithm. Large system. Cubic cell."
-#define FILENAME "test35.tng_compress"
-#define ALGOTEST
-#define NATOMS 5000000
-#define CHUNKY 2
-#define SCALE 1.
-#define PRECISION 1.
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 5
-#define INITIALCODINGPARAMETER 0
-#define CODING 2
-#define CODINGPARAMETER -1
-#define VELCODING 4
-#define VELCODINGPARAMETER 0
-#define INTMIN1 -536870911
-#define INTMIN2 -536870911
-#define INTMIN3 -536870911
-#define INTMAX1 536870911
-#define INTMAX2 536870911
-#define INTMAX3 536870911
-#define NFRAMES 10
-#define EXPECTED_FILESIZE 243598962.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test36.h b/src/include/gromacs/external/tng_io/src/tests/compression/test36.h
deleted file mode 100644 (file)
index fba6feb..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Position coding. Intra frame triple algorithm. Large system. Cubic cell."
-#define FILENAME "test36.tng_compress"
-#define ALGOTEST
-#define NATOMS 5000000
-#define CHUNKY 2
-#define SCALE 1.
-#define PRECISION 1.
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 5
-#define INITIALCODINGPARAMETER 0
-#define CODING 3
-#define CODINGPARAMETER -1
-#define VELCODING 4
-#define VELCODINGPARAMETER 0
-#define INTMIN1 -536870911
-#define INTMIN2 -536870911
-#define INTMIN3 -536870911
-#define INTMAX1 536870911
-#define INTMAX2 536870911
-#define INTMAX3 536870911
-#define NFRAMES 10
-#define EXPECTED_FILESIZE 290800607.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test37.h b/src/include/gromacs/external/tng_io/src/tests/compression/test37.h
deleted file mode 100644 (file)
index d2722bf..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Position coding. XTC2 algorithm. Large system. Cubic cell."
-#define FILENAME "test37.tng_compress"
-#define ALGOTEST
-#define NATOMS 5000000
-#define CHUNKY 2
-#define SCALE 1.
-#define PRECISION 1.
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 5
-#define INITIALCODINGPARAMETER 0
-#define CODING 5
-#define CODINGPARAMETER 0
-#define VELCODING 4
-#define VELCODINGPARAMETER 0
-#define INTMIN1 -536870911
-#define INTMIN2 -536870911
-#define INTMIN3 -536870911
-#define INTMAX1 536870911
-#define INTMAX2 536870911
-#define INTMAX3 536870911
-#define NFRAMES 10
-#define EXPECTED_FILESIZE 301463256.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test38.h b/src/include/gromacs/external/tng_io/src/tests/compression/test38.h
deleted file mode 100644 (file)
index 26a6740..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Position coding. XTC3 algorithm. Large system. Cubic cell."
-#define FILENAME "test38.tng_compress"
-#define ALGOTEST
-#define NATOMS 5000000
-#define CHUNKY 2
-#define SCALE 1.
-#define PRECISION 1.
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 10
-#define INITIALCODINGPARAMETER 0
-#define CODING 10
-#define CODINGPARAMETER 0
-#define VELCODING 4
-#define VELCODINGPARAMETER 0
-#define INTMIN1 -536870911
-#define INTMIN2 -536870911
-#define INTMIN3 -536870911
-#define INTMAX1 536870911
-#define INTMAX2 536870911
-#define INTMAX3 536870911
-#define NFRAMES 4
-#define EXPECTED_FILESIZE 63482016.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test39.h b/src/include/gromacs/external/tng_io/src/tests/compression/test39.h
deleted file mode 100644 (file)
index db09a18..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Position coding. Intra frame BWLZH algorithm. Large system. Cubic cell."
-#define FILENAME "test39.tng_compress"
-#define ALGOTEST
-#define NATOMS 5000000
-#define CHUNKY 2
-#define SCALE 1.
-#define PRECISION 1.
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 5
-#define INITIALCODINGPARAMETER 0
-#define CODING 9
-#define CODINGPARAMETER 0
-#define VELCODING 4
-#define VELCODINGPARAMETER 0
-#define INTMIN1 -536870911
-#define INTMIN2 -536870911
-#define INTMIN3 -536870911
-#define INTMAX1 536870911
-#define INTMAX2 536870911
-#define INTMAX3 536870911
-#define NFRAMES 4
-#define EXPECTED_FILESIZE 67631371.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test4.h b/src/include/gromacs/external/tng_io/src/tests/compression/test4.h
deleted file mode 100644 (file)
index 5254a07..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Initial coding. BWLZH intra algorithm. Cubic cell."
-#define FILENAME "test4.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 1
-#define SCALE 0.1
-#define PRECISION 0.01
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 9
-#define INITIALCODINGPARAMETER 0
-#define CODING 1
-#define CODINGPARAMETER 0
-#define VELCODING 0
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 10000
-#define INTMAX2 10000
-#define INTMAX3 10000
-#define NFRAMES 1000
-#define EXPECTED_FILESIZE 2572043.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test40.h b/src/include/gromacs/external/tng_io/src/tests/compression/test40.h
deleted file mode 100644 (file)
index c7511e5..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Position coding. Inter frame BWLZH algorithm. Large system. Cubic cell."
-#define FILENAME "test40.tng_compress"
-#define ALGOTEST
-#define NATOMS 5000000
-#define CHUNKY 2
-#define SCALE 1.
-#define PRECISION 1.
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 5
-#define INITIALCODINGPARAMETER 0
-#define CODING 8
-#define CODINGPARAMETER 0
-#define VELCODING 4
-#define VELCODINGPARAMETER 0
-#define INTMIN1 -536870911
-#define INTMIN2 -536870911
-#define INTMIN3 -536870911
-#define INTMAX1 536870911
-#define INTMAX2 536870911
-#define INTMAX3 536870911
-#define NFRAMES 4
-#define EXPECTED_FILESIZE 63822378.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test41.h b/src/include/gromacs/external/tng_io/src/tests/compression/test41.h
deleted file mode 100644 (file)
index dab390c..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Initial coding. Intra frame triple algorithm. High accuracy. Cubic cell."
-#define FILENAME "test41.tng_compress"
-#define ALGOTEST
-#define NATOMS 100000
-#define CHUNKY 1
-#define SCALE 0.5
-#define PRECISION 1e-8
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 3
-#define INITIALCODINGPARAMETER -1
-#define CODING 1
-#define CODINGPARAMETER -1
-#define VELCODING 4
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 1610612736
-#define INTMAX2 1610612736
-#define INTMAX3 1610612736
-#define NFRAMES 100
-#define EXPECTED_FILESIZE 53179342.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test42.h b/src/include/gromacs/external/tng_io/src/tests/compression/test42.h
deleted file mode 100644 (file)
index 4452924..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Initial coding. XTC2 algorithm. High accuracy. Cubic cell."
-#define FILENAME "test42.tng_compress"
-#define ALGOTEST
-#define NATOMS 100000
-#define CHUNKY 1
-#define SCALE 0.5
-#define PRECISION 1e-8
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 5
-#define INITIALCODINGPARAMETER 0
-#define CODING 1
-#define CODINGPARAMETER -1
-#define VELCODING 4
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 1610612736
-#define INTMAX2 1610612736
-#define INTMAX3 1610612736
-#define NFRAMES 100
-#define EXPECTED_FILESIZE 57283715.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test43.h b/src/include/gromacs/external/tng_io/src/tests/compression/test43.h
deleted file mode 100644 (file)
index 915d58e..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Initial coding. XTC3 algorithm. High accuracy. Cubic cell."
-#define FILENAME "test43.tng_compress"
-#define ALGOTEST
-#define NATOMS 100000
-#define CHUNKY 1
-#define SCALE 0.5
-#define PRECISION 1e-8
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 10
-#define INITIALCODINGPARAMETER 0
-#define CODING 1
-#define CODINGPARAMETER -1
-#define VELCODING 4
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 1610612736
-#define INTMAX2 1610612736
-#define INTMAX3 1610612736
-#define NFRAMES 10
-#define EXPECTED_FILESIZE 3783912.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test44.h b/src/include/gromacs/external/tng_io/src/tests/compression/test44.h
deleted file mode 100644 (file)
index f749cce..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Initial coding. Intra frame BWLZH algorithm. High accuracy. Cubic cell."
-#define FILENAME "test44.tng_compress"
-#define ALGOTEST
-#define NATOMS 100000
-#define CHUNKY 1
-#define SCALE 0.5
-#define PRECISION 1e-8
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 9
-#define INITIALCODINGPARAMETER 0
-#define CODING 1
-#define CODINGPARAMETER -1
-#define VELCODING 4
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 1610612736
-#define INTMAX2 1610612736
-#define INTMAX3 1610612736
-#define NFRAMES 10
-#define EXPECTED_FILESIZE 1436901.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test45.h b/src/include/gromacs/external/tng_io/src/tests/compression/test45.h
deleted file mode 100644 (file)
index e558083..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Position coding. Stop bits algorithm. High accuracy. Cubic cell."
-#define FILENAME "test45.tng_compress"
-#define ALGOTEST
-#define NATOMS 100000
-#define CHUNKY 10
-#define SCALE 0.5
-#define PRECISION 1e-8
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 3
-#define INITIALCODINGPARAMETER -1
-#define CODING 1
-#define CODINGPARAMETER -1
-#define VELCODING 4
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 1610612736
-#define INTMAX2 1610612736
-#define INTMAX3 1610612736
-#define NFRAMES 100
-#define EXPECTED_FILESIZE 36794379.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test46.h b/src/include/gromacs/external/tng_io/src/tests/compression/test46.h
deleted file mode 100644 (file)
index dde45ab..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Position coding. Inter frame triple algorithm. High accuracy. Cubic cell."
-#define FILENAME "test46.tng_compress"
-#define ALGOTEST
-#define NATOMS 100000
-#define CHUNKY 10
-#define SCALE 0.5
-#define PRECISION 1e-8
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 3
-#define INITIALCODINGPARAMETER -1
-#define CODING 2
-#define CODINGPARAMETER -1
-#define VELCODING 4
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 1610612736
-#define INTMAX2 1610612736
-#define INTMAX3 1610612736
-#define NFRAMES 100
-#define EXPECTED_FILESIZE 34508770.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test47.h b/src/include/gromacs/external/tng_io/src/tests/compression/test47.h
deleted file mode 100644 (file)
index a668946..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Position coding.  Intra frame triple algorithm. High accuracy. Cubic cell."
-#define FILENAME "test47.tng_compress"
-#define ALGOTEST
-#define NATOMS 100000
-#define CHUNKY 10
-#define SCALE 0.5
-#define PRECISION 1e-8
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 3
-#define INITIALCODINGPARAMETER -1
-#define CODING 3
-#define CODINGPARAMETER -1
-#define VELCODING 4
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 1610612736
-#define INTMAX2 1610612736
-#define INTMAX3 1610612736
-#define NFRAMES 100
-#define EXPECTED_FILESIZE 53174711.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test48.h b/src/include/gromacs/external/tng_io/src/tests/compression/test48.h
deleted file mode 100644 (file)
index 3b2be95..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Position coding. XTC2 algorithm. High accuracy. Cubic cell."
-#define FILENAME "test48.tng_compress"
-#define ALGOTEST
-#define NATOMS 100000
-#define CHUNKY 10
-#define SCALE 0.5
-#define PRECISION 1e-8
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 3
-#define INITIALCODINGPARAMETER -1
-#define CODING 5
-#define CODINGPARAMETER 0
-#define VELCODING 4
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 805306368
-#define INTMAX2 805306368
-#define INTMAX3 805306368
-#define NFRAMES 100
-#define EXPECTED_FILESIZE 55638414.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test49.h b/src/include/gromacs/external/tng_io/src/tests/compression/test49.h
deleted file mode 100644 (file)
index 6c618a0..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Position coding. XTC3 algorithm. High accuracy. Cubic cell."
-#define FILENAME "test49.tng_compress"
-#define ALGOTEST
-#define NATOMS 100000
-#define CHUNKY 10
-#define SCALE 0.5
-#define PRECISION 1e-8
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 3
-#define INITIALCODINGPARAMETER -1
-#define CODING 10
-#define CODINGPARAMETER 0
-#define VELCODING 4
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 805306368
-#define INTMAX2 805306368
-#define INTMAX3 805306368
-#define NFRAMES 20
-#define EXPECTED_FILESIZE 3585605.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test5.h b/src/include/gromacs/external/tng_io/src/tests/compression/test5.h
deleted file mode 100644 (file)
index 4c6a638..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Initial coding. XTC3 algorithm. Cubic cell."
-#define FILENAME "test5.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 1
-#define SCALE 0.1
-#define PRECISION 0.01
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 10
-#define INITIALCODINGPARAMETER 0
-#define CODING 1
-#define CODINGPARAMETER 0
-#define VELCODING 0
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 10000
-#define INTMAX2 10000
-#define INTMAX3 10000
-#define NFRAMES 1000
-#define EXPECTED_FILESIZE 3346179.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test50.h b/src/include/gromacs/external/tng_io/src/tests/compression/test50.h
deleted file mode 100644 (file)
index 130f1b9..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Position coding. Intra frame BWLZH algorithm. High accuracy. Cubic cell."
-#define FILENAME "test50.tng_compress"
-#define ALGOTEST
-#define NATOMS 100000
-#define CHUNKY 10
-#define SCALE 0.5
-#define PRECISION 1e-8
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 3
-#define INITIALCODINGPARAMETER -1
-#define CODING 9
-#define CODINGPARAMETER 0
-#define VELCODING 4
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 805306368
-#define INTMAX2 805306368
-#define INTMAX3 805306368
-#define NFRAMES 20
-#define EXPECTED_FILESIZE 3143379.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test51.h b/src/include/gromacs/external/tng_io/src/tests/compression/test51.h
deleted file mode 100644 (file)
index c3a57bf..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Position coding. Inter frame BWLZH algorithm. High accuracy. Cubic cell."
-#define FILENAME "test51.tng_compress"
-#define ALGOTEST
-#define NATOMS 100000
-#define CHUNKY 10
-#define SCALE 0.5
-#define PRECISION 1e-8
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 3
-#define INITIALCODINGPARAMETER -1
-#define CODING 8
-#define CODINGPARAMETER 0
-#define VELCODING 4
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 805306368
-#define INTMAX2 805306368
-#define INTMAX3 805306368
-#define NFRAMES 20
-#define EXPECTED_FILESIZE 2897696.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test52.h b/src/include/gromacs/external/tng_io/src/tests/compression/test52.h
deleted file mode 100644 (file)
index 97f37c7..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#define TESTNAME "Velocity coding. Stop bits algorithm. High accuracy. Cubic cell."
-#define FILENAME "test52.tng_compress"
-#define ALGOTEST
-#define NATOMS 100000
-#define CHUNKY 10
-#define SCALE 0.5
-#define PRECISION 1e-8
-#define WRITEVEL 1
-#define VELINTMUL 100000
-#define VELPRECISION 1e-8
-#define INITIALCODING 3
-#define INITIALCODINGPARAMETER -1
-#define CODING 5
-#define CODINGPARAMETER 0
-#define VELCODING 1
-#define VELCODINGPARAMETER -1
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 805306368
-#define INTMAX2 805306368
-#define INTMAX3 805306368
-#define NFRAMES 100
-#define EXPECTED_FILESIZE 173083705.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test53.h b/src/include/gromacs/external/tng_io/src/tests/compression/test53.h
deleted file mode 100644 (file)
index 583e0b2..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#define TESTNAME "Velocity coding. Triple algorithm. High accuracy. Cubic cell."
-#define FILENAME "test53.tng_compress"
-#define ALGOTEST
-#define NATOMS 100000
-#define CHUNKY 10
-#define SCALE 0.5
-#define PRECISION 1e-8
-#define WRITEVEL 1
-#define VELINTMUL 100000
-#define VELPRECISION 1e-8
-#define INITIALCODING 3
-#define INITIALCODINGPARAMETER -1
-#define CODING 5
-#define CODINGPARAMETER 0
-#define VELCODING 3
-#define VELCODINGPARAMETER -1
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 805306368
-#define INTMAX2 805306368
-#define INTMAX3 805306368
-#define NFRAMES 100
-#define EXPECTED_FILESIZE 168548573.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test54.h b/src/include/gromacs/external/tng_io/src/tests/compression/test54.h
deleted file mode 100644 (file)
index 50b051f..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#define TESTNAME "Velocity coding. Interframe triple algorithm. High accuracy. Cubic cell."
-#define FILENAME "test54.tng_compress"
-#define ALGOTEST
-#define NATOMS 100000
-#define CHUNKY 10
-#define SCALE 0.5
-#define PRECISION 1e-8
-#define WRITEVEL 1
-#define VELINTMUL 100000
-#define VELPRECISION 1e-8
-#define INITIALCODING 3
-#define INITIALCODINGPARAMETER -1
-#define CODING 5
-#define CODINGPARAMETER 0
-#define VELCODING 2
-#define VELCODINGPARAMETER -1
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 805306368
-#define INTMAX2 805306368
-#define INTMAX3 805306368
-#define NFRAMES 100
-#define EXPECTED_FILESIZE 161798573.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test55.h b/src/include/gromacs/external/tng_io/src/tests/compression/test55.h
deleted file mode 100644 (file)
index f8c98f9..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#define TESTNAME "Velocity coding. Interframe stop-bits algorithm. High accuracy. Cubic cell."
-#define FILENAME "test55.tng_compress"
-#define ALGOTEST
-#define NATOMS 100000
-#define CHUNKY 10
-#define SCALE 0.5
-#define PRECISION 1e-8
-#define WRITEVEL 1
-#define VELINTMUL 100000
-#define VELPRECISION 1e-8
-#define INITIALCODING 3
-#define INITIALCODINGPARAMETER -1
-#define CODING 5
-#define CODINGPARAMETER 0
-#define VELCODING 6
-#define VELCODINGPARAMETER -1
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 805306368
-#define INTMAX2 805306368
-#define INTMAX3 805306368
-#define NFRAMES 100
-#define EXPECTED_FILESIZE 166298533.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test56.h b/src/include/gromacs/external/tng_io/src/tests/compression/test56.h
deleted file mode 100644 (file)
index 7fb9b23..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#define TESTNAME "Velocity coding. Intraframe BWLZH algorithm. High accuracy. Cubic cell."
-#define FILENAME "test56.tng_compress"
-#define ALGOTEST
-#define NATOMS 100000
-#define CHUNKY 10
-#define SCALE 0.5
-#define PRECISION 1e-8
-#define WRITEVEL 1
-#define VELINTMUL 100000
-#define VELPRECISION 1e-8
-#define INITIALCODING 3
-#define INITIALCODINGPARAMETER -1
-#define CODING 5
-#define CODINGPARAMETER 0
-#define VELCODING 9
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 805306368
-#define INTMAX2 805306368
-#define INTMAX3 805306368
-#define NFRAMES 20
-#define EXPECTED_FILESIZE 23390767.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test57.h b/src/include/gromacs/external/tng_io/src/tests/compression/test57.h
deleted file mode 100644 (file)
index 5c626d8..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#define TESTNAME "Velocity coding. Interframe BWLZH algorithm. High accuracy. Cubic cell."
-#define FILENAME "test57.tng_compress"
-#define ALGOTEST
-#define NATOMS 100000
-#define CHUNKY 10
-#define SCALE 0.5
-#define PRECISION 1e-8
-#define WRITEVEL 1
-#define VELINTMUL 100000
-#define VELPRECISION 1e-8
-#define INITIALCODING 3
-#define INITIALCODINGPARAMETER -1
-#define CODING 5
-#define CODINGPARAMETER 0
-#define VELCODING 8
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 805306368
-#define INTMAX2 805306368
-#define INTMAX3 805306368
-#define NFRAMES 20
-#define EXPECTED_FILESIZE 13817974.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test58.h b/src/include/gromacs/external/tng_io/src/tests/compression/test58.h
deleted file mode 100644 (file)
index 9988106..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#define TESTNAME "Coding. Test float."
-#define FILENAME "test58.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 100
-#define SCALE 0.1
-#define PRECISION 0.01
-#define WRITEVEL 1
-#define VELPRECISION 0.1
-#define INITIALCODING 5
-#define INITIALCODINGPARAMETER 0
-#define CODING 5
-#define CODINGPARAMETER 0
-#define INITIALVELCODING 3
-#define INITIALVELCODINGPARAMETER -1
-#define VELCODING 3
-#define VELCODINGPARAMETER -1
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 10000
-#define INTMAX2 10000
-#define INTMAX3 10000
-#define NFRAMES 1000
-#define TEST_FLOAT
-#define EXPECTED_FILESIZE 6986313.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test59.h b/src/include/gromacs/external/tng_io/src/tests/compression/test59.h
deleted file mode 100644 (file)
index 9817976..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#define TESTNAME "Coding. Test write float, read double."
-#define FILENAME "test59.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 100
-#define SCALE 0.1
-#define PRECISION 0.01
-#define WRITEVEL 1
-#define VELPRECISION 0.1
-#define INITIALCODING 5
-#define INITIALCODINGPARAMETER 0
-#define CODING 5
-#define CODINGPARAMETER 0
-#define INITIALVELCODING 3
-#define INITIALVELCODINGPARAMETER -1
-#define VELCODING 3
-#define VELCODINGPARAMETER -1
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 10000
-#define INTMAX2 10000
-#define INTMAX3 10000
-#define NFRAMES 1000
-#ifdef GEN
-#define TEST_FLOAT
-#endif
-#define EXPECTED_FILESIZE 6986313.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test6.h b/src/include/gromacs/external/tng_io/src/tests/compression/test6.h
deleted file mode 100644 (file)
index ecbc443..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Coding. XTC2 algorithm. Cubic cell."
-#define FILENAME "test6.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 100
-#define SCALE 0.1
-#define PRECISION 0.01
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 5
-#define INITIALCODINGPARAMETER 0
-#define CODING 5
-#define CODINGPARAMETER 0
-#define VELCODING 0
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 10000
-#define INTMAX2 10000
-#define INTMAX3 10000
-#define NFRAMES 1000
-#define EXPECTED_FILESIZE 2736662.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test60.h b/src/include/gromacs/external/tng_io/src/tests/compression/test60.h
deleted file mode 100644 (file)
index cf94e3b..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#define TESTNAME "Coding. Test write double, read float."
-#define FILENAME "test60.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 100
-#define SCALE 0.1
-#define PRECISION 0.01
-#define WRITEVEL 1
-#define VELPRECISION 0.1
-#define INITIALCODING 5
-#define INITIALCODINGPARAMETER 0
-#define CODING 5
-#define CODINGPARAMETER 0
-#define INITIALVELCODING 3
-#define INITIALVELCODINGPARAMETER -1
-#define VELCODING 3
-#define VELCODINGPARAMETER -1
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 10000
-#define INTMAX2 10000
-#define INTMAX3 10000
-#define NFRAMES 1000
-#ifndef GEN
-#define TEST_FLOAT
-#endif
-#define EXPECTED_FILESIZE 6986313.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test61.h b/src/include/gromacs/external/tng_io/src/tests/compression/test61.h
deleted file mode 100644 (file)
index 373456d..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#define TESTNAME "Coding. Recompression test. Stage 1: Generate"
-#define FILENAME "test61.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 100
-#define SCALE 0.1
-#define PRECISION 0.01
-#define WRITEVEL 1
-#define VELPRECISION 0.1
-#define INITIALCODING 5
-#define INITIALCODINGPARAMETER 0
-#define CODING 5
-#define CODINGPARAMETER 0
-#define INITIALVELCODING 3
-#define INITIALVELCODINGPARAMETER -1
-#define VELCODING 3
-#define VELCODINGPARAMETER -1
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 10000
-#define INTMAX2 10000
-#define INTMAX3 10000
-#define NFRAMES 100
-#define EXPECTED_FILESIZE 698801.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test62.h b/src/include/gromacs/external/tng_io/src/tests/compression/test62.h
deleted file mode 100644 (file)
index c8a2b48..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#define TESTNAME "Coding. Recompression test. Stage 2: Recompress"
-#define FILENAME "test62.tng_compress"
-#define RECOMPRESS "test61.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 100
-#define SCALE 0.1
-#define PRECISION 0.01
-#define WRITEVEL 1
-#define VELPRECISION 0.1
-#define INITIALCODING 10
-#define INITIALCODINGPARAMETER 0
-#define CODING 10
-#define CODINGPARAMETER 0
-#define INITIALVELCODING 3
-#define INITIALVELCODINGPARAMETER 0
-#define VELCODING 8
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 10000
-#define INTMAX2 10000
-#define INTMAX3 10000
-#define NFRAMES 100
-#define EXPECTED_FILESIZE 151226.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test63.h b/src/include/gromacs/external/tng_io/src/tests/compression/test63.h
deleted file mode 100644 (file)
index 65a4768..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#define TESTNAME "Coding. Read int and convert to double."
-#define FILENAME "test63.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 100
-#define SCALE 0.1
-#define PRECISION 0.01
-#define WRITEVEL 1
-#define VELPRECISION 0.1
-#define INITIALCODING 5
-#define INITIALCODINGPARAMETER 0
-#define CODING 5
-#define CODINGPARAMETER 0
-#define INITIALVELCODING 3
-#define INITIALVELCODINGPARAMETER -1
-#define VELCODING 3
-#define VELCODINGPARAMETER -1
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 10000
-#define INTMAX2 10000
-#define INTMAX3 10000
-#define NFRAMES 100
-#define INTTODOUBLE
-#define EXPECTED_FILESIZE 698801.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test64.h b/src/include/gromacs/external/tng_io/src/tests/compression/test64.h
deleted file mode 100644 (file)
index 02f99b5..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#define TESTNAME "Coding. Read int and convert to float."
-#define FILENAME "test64.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 100
-#define SCALE 0.1
-#define PRECISION 0.01
-#define WRITEVEL 1
-#define VELPRECISION 0.1
-#define INITIALCODING 5
-#define INITIALCODINGPARAMETER 0
-#define CODING 5
-#define CODINGPARAMETER 0
-#define INITIALVELCODING 3
-#define INITIALVELCODINGPARAMETER -1
-#define VELCODING 3
-#define VELCODINGPARAMETER -1
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 10000
-#define INTMAX2 10000
-#define INTMAX3 10000
-#define NFRAMES 100
-#define INTTOFLOAT
-#define TEST_FLOAT
-#define EXPECTED_FILESIZE 698801.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test65.h b/src/include/gromacs/external/tng_io/src/tests/compression/test65.h
deleted file mode 100644 (file)
index c7136ee..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#define TESTNAME "Coding. Compress zeros test. positions intra frame triple"
-#define FILENAME "test65.tng_compress"
-#define ALGOTEST
-#define NATOMS 100
-#define CHUNKY 100
-#define SCALE 0.
-#define PRECISION 0.01
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 3
-#define INITIALCODINGPARAMETER -1
-#define CODING 3
-#define CODINGPARAMETER -1
-#define INITIALVELCODING 3
-#define INITIALVELCODINGPARAMETER -1
-#define VELCODING 3
-#define VELCODINGPARAMETER -1
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 0
-#define INTMAX2 0
-#define INTMAX3 0
-#define NFRAMES 100
-#define EXPECTED_FILESIZE 6315.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test66.h b/src/include/gromacs/external/tng_io/src/tests/compression/test66.h
deleted file mode 100644 (file)
index 95597c8..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#define TESTNAME "Coding. Compress zeros test. positions xtc2"
-#define FILENAME "test66.tng_compress"
-#define ALGOTEST
-#define NATOMS 100
-#define CHUNKY 100
-#define SCALE 0.
-#define PRECISION 0.01
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 5
-#define INITIALCODINGPARAMETER 0
-#define CODING 5
-#define CODINGPARAMETER 0
-#define INITIALVELCODING 3
-#define INITIALVELCODINGPARAMETER -1
-#define VELCODING 3
-#define VELCODINGPARAMETER -1
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 0
-#define INTMAX2 0
-#define INTMAX3 0
-#define NFRAMES 100
-#define EXPECTED_FILESIZE 4465.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test67.h b/src/include/gromacs/external/tng_io/src/tests/compression/test67.h
deleted file mode 100644 (file)
index ca8fe4b..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#define TESTNAME "Coding. Compress zeros test. positions triple one-to-one"
-#define FILENAME "test67.tng_compress"
-#define ALGOTEST
-#define NATOMS 100
-#define CHUNKY 100
-#define SCALE 0.
-#define PRECISION 0.01
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 7
-#define INITIALCODINGPARAMETER -1
-#define CODING 7
-#define CODINGPARAMETER -1
-#define INITIALVELCODING 3
-#define INITIALVELCODINGPARAMETER -1
-#define VELCODING 3
-#define VELCODINGPARAMETER -1
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 0
-#define INTMAX2 0
-#define INTMAX3 0
-#define NFRAMES 100
-#define EXPECTED_FILESIZE 6315.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test68.h b/src/include/gromacs/external/tng_io/src/tests/compression/test68.h
deleted file mode 100644 (file)
index 00d8032..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#define TESTNAME "Coding. Compress zeros test. positions BWLZH intra"
-#define FILENAME "test68.tng_compress"
-#define ALGOTEST
-#define NATOMS 100
-#define CHUNKY 100
-#define SCALE 0.
-#define PRECISION 0.01
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 9
-#define INITIALCODINGPARAMETER 0
-#define CODING 9
-#define CODINGPARAMETER 0
-#define INITIALVELCODING 3
-#define INITIALVELCODINGPARAMETER -1
-#define VELCODING 3
-#define VELCODINGPARAMETER -1
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 0
-#define INTMAX2 0
-#define INTMAX3 0
-#define NFRAMES 100
-#define EXPECTED_FILESIZE 321.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test69.h b/src/include/gromacs/external/tng_io/src/tests/compression/test69.h
deleted file mode 100644 (file)
index 7ee385d..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#define TESTNAME "Coding. Compress zeros test. positions xtc3"
-#define FILENAME "test69.tng_compress"
-#define ALGOTEST
-#define NATOMS 100
-#define CHUNKY 100
-#define SCALE 0.
-#define PRECISION 0.01
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 10
-#define INITIALCODINGPARAMETER 0
-#define CODING 10
-#define CODINGPARAMETER 0
-#define INITIALVELCODING 3
-#define INITIALVELCODINGPARAMETER -1
-#define VELCODING 3
-#define VELCODINGPARAMETER -1
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 0
-#define INTMAX2 0
-#define INTMAX3 0
-#define NFRAMES 100
-#define EXPECTED_FILESIZE 867.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test7.h b/src/include/gromacs/external/tng_io/src/tests/compression/test7.h
deleted file mode 100644 (file)
index d0e3532..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Coding. Stopbit interframe algorithm. Cubic cell."
-#define FILENAME "test7.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 100
-#define SCALE 0.1
-#define PRECISION 0.01
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 5
-#define INITIALCODINGPARAMETER 0
-#define CODING 1
-#define CODINGPARAMETER -1
-#define VELCODING 0
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 10000
-#define INTMAX2 10000
-#define INTMAX3 10000
-#define NFRAMES 1000
-#define EXPECTED_FILESIZE 2545049.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test70.h b/src/include/gromacs/external/tng_io/src/tests/compression/test70.h
deleted file mode 100644 (file)
index b3b4b25..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#define TESTNAME "Coding. Compress zeros test. positions stopbit interframe"
-#define FILENAME "test70.tng_compress"
-#define ALGOTEST
-#define NATOMS 100
-#define CHUNKY 100
-#define SCALE 0.
-#define PRECISION 0.01
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 3
-#define INITIALCODINGPARAMETER -1
-#define CODING 1
-#define CODINGPARAMETER -1
-#define INITIALVELCODING 3
-#define INITIALVELCODINGPARAMETER -1
-#define VELCODING 3
-#define VELCODINGPARAMETER -1
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 0
-#define INTMAX2 0
-#define INTMAX3 0
-#define NFRAMES 100
-#define EXPECTED_FILESIZE 7548.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test71.h b/src/include/gromacs/external/tng_io/src/tests/compression/test71.h
deleted file mode 100644 (file)
index c7d0673..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#define TESTNAME "Coding. Compress zeros test. positions triple interframe"
-#define FILENAME "test71.tng_compress"
-#define ALGOTEST
-#define NATOMS 100
-#define CHUNKY 100
-#define SCALE 0.
-#define PRECISION 0.01
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 3
-#define INITIALCODINGPARAMETER -1
-#define CODING 2
-#define CODINGPARAMETER -1
-#define INITIALVELCODING 3
-#define INITIALVELCODINGPARAMETER -1
-#define VELCODING 3
-#define VELCODINGPARAMETER -1
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 0
-#define INTMAX2 0
-#define INTMAX3 0
-#define NFRAMES 100
-#define EXPECTED_FILESIZE 6315.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test72.h b/src/include/gromacs/external/tng_io/src/tests/compression/test72.h
deleted file mode 100644 (file)
index 633bb50..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#define TESTNAME "Coding. Compress zeros test. positions BWLZH inter"
-#define FILENAME "test72.tng_compress"
-#define ALGOTEST
-#define NATOMS 100
-#define CHUNKY 100
-#define SCALE 0.
-#define PRECISION 0.01
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 3
-#define INITIALCODINGPARAMETER -1
-#define CODING 8
-#define CODINGPARAMETER 0
-#define INITIALVELCODING 3
-#define INITIALVELCODINGPARAMETER -1
-#define VELCODING 3
-#define VELCODINGPARAMETER -1
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 0
-#define INTMAX2 0
-#define INTMAX3 0
-#define NFRAMES 100
-#define EXPECTED_FILESIZE 257.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test73.h b/src/include/gromacs/external/tng_io/src/tests/compression/test73.h
deleted file mode 100644 (file)
index e64af34..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#define TESTNAME "Coding. Compress zeros test. velocities stopbits one-to-one"
-#define FILENAME "test73.tng_compress"
-#define ALGOTEST
-#define NATOMS 100
-#define CHUNKY 100
-#define SCALE 0.
-#define PRECISION 0.01
-#define WRITEVEL 1
-#define VELPRECISION 0.1
-#define INITIALCODING 3
-#define INITIALCODINGPARAMETER -1
-#define CODING 3
-#define CODINGPARAMETER -1
-#define INITIALVELCODING 1
-#define INITIALVELCODINGPARAMETER -1
-#define VELCODING 1
-#define VELCODINGPARAMETER -1
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 0
-#define INTMAX2 0
-#define INTMAX3 0
-#define NFRAMES 100
-#define EXPECTED_FILESIZE 13863.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test74.h b/src/include/gromacs/external/tng_io/src/tests/compression/test74.h
deleted file mode 100644 (file)
index 73ada23..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#define TESTNAME "Coding. Compress zeros test. velocities triplet one-to-one"
-#define FILENAME "test74.tng_compress"
-#define ALGOTEST
-#define NATOMS 100
-#define CHUNKY 100
-#define SCALE 0.
-#define PRECISION 0.01
-#define WRITEVEL 1
-#define VELPRECISION 0.1
-#define INITIALCODING 3
-#define INITIALCODINGPARAMETER -1
-#define CODING 3
-#define CODINGPARAMETER -1
-#define INITIALVELCODING 3
-#define INITIALVELCODINGPARAMETER -1
-#define VELCODING 3
-#define VELCODINGPARAMETER -1
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 0
-#define INTMAX2 0
-#define INTMAX3 0
-#define NFRAMES 100
-#define EXPECTED_FILESIZE 12622.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test75.h b/src/include/gromacs/external/tng_io/src/tests/compression/test75.h
deleted file mode 100644 (file)
index 4fc004b..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#define TESTNAME "Coding. Compress zeros test. velocities BWLZH one-to-one"
-#define FILENAME "test75.tng_compress"
-#define ALGOTEST
-#define NATOMS 100
-#define CHUNKY 100
-#define SCALE 0.
-#define PRECISION 0.01
-#define WRITEVEL 1
-#define VELPRECISION 0.1
-#define INITIALCODING 3
-#define INITIALCODINGPARAMETER -1
-#define CODING 3
-#define CODINGPARAMETER -1
-#define INITIALVELCODING 9
-#define INITIALVELCODINGPARAMETER 0
-#define VELCODING 9
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 0
-#define INTMAX2 0
-#define INTMAX3 0
-#define NFRAMES 100
-#define EXPECTED_FILESIZE 6628.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test76.h b/src/include/gromacs/external/tng_io/src/tests/compression/test76.h
deleted file mode 100644 (file)
index 4a51ecb..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#define TESTNAME "Coding. Compress zeros test. velocities triplet inter"
-#define FILENAME "test76.tng_compress"
-#define ALGOTEST
-#define NATOMS 100
-#define CHUNKY 100
-#define SCALE 0.
-#define PRECISION 0.01
-#define WRITEVEL 1
-#define VELPRECISION 0.1
-#define INITIALCODING 3
-#define INITIALCODINGPARAMETER -1
-#define CODING 3
-#define CODINGPARAMETER -1
-#define INITIALVELCODING 1
-#define INITIALVELCODINGPARAMETER -1
-#define VELCODING 2
-#define VELCODINGPARAMETER -1
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 0
-#define INTMAX2 0
-#define INTMAX3 0
-#define NFRAMES 100
-#define EXPECTED_FILESIZE 12630.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test77.h b/src/include/gromacs/external/tng_io/src/tests/compression/test77.h
deleted file mode 100644 (file)
index d9394d8..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#define TESTNAME "Coding. Compress zeros test. velocities stopbits inter"
-#define FILENAME "test77.tng_compress"
-#define ALGOTEST
-#define NATOMS 100
-#define CHUNKY 100
-#define SCALE 0.
-#define PRECISION 0.01
-#define WRITEVEL 1
-#define VELPRECISION 0.1
-#define INITIALCODING 3
-#define INITIALCODINGPARAMETER -1
-#define CODING 3
-#define CODINGPARAMETER -1
-#define INITIALVELCODING 1
-#define INITIALVELCODINGPARAMETER -1
-#define VELCODING 6
-#define VELCODINGPARAMETER -1
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 0
-#define INTMAX2 0
-#define INTMAX3 0
-#define NFRAMES 100
-#define EXPECTED_FILESIZE 13863.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test78.h b/src/include/gromacs/external/tng_io/src/tests/compression/test78.h
deleted file mode 100644 (file)
index f70592e..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#define TESTNAME "Coding. Compress zeros test. velocities BWLZH inter"
-#define FILENAME "test78.tng_compress"
-#define ALGOTEST
-#define NATOMS 100
-#define CHUNKY 100
-#define SCALE 0.
-#define PRECISION 0.01
-#define WRITEVEL 1
-#define VELPRECISION 0.1
-#define INITIALCODING 3
-#define INITIALCODINGPARAMETER -1
-#define CODING 3
-#define CODINGPARAMETER -1
-#define INITIALVELCODING 1
-#define INITIALVELCODINGPARAMETER -1
-#define VELCODING 8
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 0
-#define INTMAX2 0
-#define INTMAX3 0
-#define NFRAMES 100
-#define EXPECTED_FILESIZE 6572.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test8.h b/src/include/gromacs/external/tng_io/src/tests/compression/test8.h
deleted file mode 100644 (file)
index 2ce103c..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Coding. Stopbit interframe algorithm with intraframe compression as initial. Cubic cell."
-#define FILENAME "test8.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 100
-#define SCALE 0.1
-#define PRECISION 0.01
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 3
-#define INITIALCODINGPARAMETER -1
-#define CODING 1
-#define CODINGPARAMETER -1
-#define VELCODING 0
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 10000
-#define INTMAX2 10000
-#define INTMAX3 10000
-#define NFRAMES 1000
-#define EXPECTED_FILESIZE 2544876.
diff --git a/src/include/gromacs/external/tng_io/src/tests/compression/test9.h b/src/include/gromacs/external/tng_io/src/tests/compression/test9.h
deleted file mode 100644 (file)
index f0672e2..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#define TESTNAME "Coding. Triple interframe algorithm. Cubic cell."
-#define FILENAME "test9.tng_compress"
-#define ALGOTEST
-#define NATOMS 1000
-#define CHUNKY 100
-#define SCALE 0.1
-#define PRECISION 0.01
-#define WRITEVEL 0
-#define VELPRECISION 0.1
-#define INITIALCODING 5
-#define INITIALCODINGPARAMETER 0
-#define CODING 2
-#define CODINGPARAMETER -1 
-#define VELCODING 0
-#define VELCODINGPARAMETER 0
-#define INTMIN1 0
-#define INTMIN2 0
-#define INTMIN3 0
-#define INTMAX1 10000
-#define INTMAX2 10000
-#define INTMAX3 10000
-#define NFRAMES 1000
-#define EXPECTED_FILESIZE 2418212.
diff --git a/src/include/gromacs/external/vmd_molfile/molfile_plugin.h b/src/include/gromacs/external/vmd_molfile/molfile_plugin.h
deleted file mode 100644 (file)
index c81f391..0000000
+++ /dev/null
@@ -1,813 +0,0 @@
-/* -*- mode: c; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; c-file-style: "stroustrup"; -*-
- *
- * 
- * This file is part of Gromacs        Copyright (c) 1991-2008
- * David van der Spoel, Erik Lindahl, Berk Hess, University of Groningen.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the research papers on the package. Check out http://www.gromacs.org
- * 
- * And Hey:
- * Gnomes, ROck Monsters And Chili Sauce
- */
-
-/***************************************************************************
- *cr
- *cr            (C) Copyright 1995-2006 The Board of Trustees of the
- *cr                        University of Illinois
- *cr                         All Rights Reserved
- *cr
-
-Developed by:           Theoretical and Computational Biophysics Group
-                        University of Illinois at Urbana-Champaign
-                        http://www.ks.uiuc.edu/
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the Software), to deal with
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to
-do so, subject to the following conditions:
-
-Redistributions of source code must retain the above copyright notice,
-this list of conditions and the following disclaimers.
-
-Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimers in the documentation
-and/or other materials provided with the distribution.
-
-Neither the names of Theoretical and Computational Biophysics Group,
-University of Illinois at Urbana-Champaign, nor the names of its contributors
-may be used to endorse or promote products derived from this Software without
-specific prior written permission.
-
-THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS WITH THE SOFTWARE.
- ***************************************************************************/
-
-/***************************************************************************
- * RCS INFORMATION:
- *
- *      $RCSfile: molfile_plugin.h,v $
- *      $Author: saam $       $Locker:  $             $State: Exp $
- *      $Revision: 1.91 $       $Date: 2009/07/28 21:54:30 $
- *
- ***************************************************************************/
-
-/** @file 
- * API for C extensions to define a way to load structure, coordinate,
- * trajectory, and volumetric data files  
- */ 
-
-#ifndef MOL_FILE_PLUGIN_H
-#define MOL_FILE_PLUGIN_H
-
-#include "vmdplugin.h"
-
-/**
- * Define a common plugin type to be used when registering the plugin.
- */
-#define MOLFILE_PLUGIN_TYPE "mol file reader"
-
-/**
- * File converter plugins use the same API  but register under a different
- * type so that regular file readers can have priority.
- */
-#define MOLFILE_CONVERTER_PLUGIN_TYPE "mol file converter"
-
-/* File plugin symbolic constants for better code readability */
-#define MOLFILE_SUCCESS           0   /**< succeeded in reading file      */
-#define MOLFILE_EOF              (-1)   /**< end of file                    */
-#define MOLFILE_ERROR            (-1)   /**< error reading/opening a file   */
-#define MOLFILE_NOSTRUCTUREDATA  (-2)   /**< no structure data in this file */
-
-#define MOLFILE_NUMATOMS_UNKNOWN (-1)   /**< unknown number of atoms       */
-#define MOLFILE_NUMATOMS_NONE     0   /**< no atoms in this file type    */
-
-/**
- * Maximum string size macro
- */
-#define MOLFILE_BUFSIZ           81   /**< maximum chars in string data  */
-#define MOLFILE_BIGBUFSIZ        4096 /**< maximum chars in long strings */
-
-#define MOLFILE_MAXWAVEPERTS     25   /**< maximum number of wavefunctions
-                                       *   per timestep */
-
-#define MOLFILE_QM_STATUS_UNKNOWN  (-1)
-#define MOLFILE_QM_OPT_CONVERGED    0
-#define MOLFILE_QM_SCF_NOT_CONV     1
-#define MOLFILE_QM_OPT_NOT_CONV     2
-#define MOLFILE_QM_FILE_TRUNCATED   3
-
-
-/**
- * File level comments, origin information, and annotations.
- */
-typedef struct {
-  char database[81];   /**< database of origin, if any        */
-  char accession[81];  /**< database accession code, if any   */
-  char date[81];       /**< date/time stamp for this data     */
-  char title[81];      /**< brief title for this data         */
-  int remarklen;       /**< length of remarks string          */
-  char *remarks;       /**< free-form remarks about data      */
-} molfile_metadata_t;
-
-
-/* 
- * Struct for specifying atoms in a molecular structure.  The first 
- * six components are required, the rest are optional and their presence is 
- * indicating by setting the corresponding bit in optsflag.  When omitted,
- * the application (for read_structure) or plugin (for write_structure) 
- * must be able to supply default values if the missing parameters are 
- * part of its internal data structure.
- * Note that it is not possible to specify coordinates with this structure.
- * This is intentional; all coordinate I/O is done with the read_timestep and 
- * write_timestep functions. 
- */
-
-/**
- * Per-atom attributes and information.
- */
-typedef struct {
-  /* these fields absolutely must be set or initialized to empty */
-  char name[16];      /**< required atom name string             */
-  char type[16];      /**< required atom type string             */
-  char resname[8];    /**< required residue name string          */
-  int resid;          /**< required integer residue ID           */
-  char segid[8];      /**< required segment name string, or ""   */
-  char chain[2];      /**< required chain name, or ""            */
-
-  /* rest are optional; use optflags to specify what's present   */
-  char altloc[2];     /**< optional PDB alternate location code  */
-  char insertion[2];  /**< optional PDB insertion code           */
-  float occupancy;    /**< optional occupancy value              */
-  float bfactor;      /**< optional B-factor value               */
-  float mass;         /**< optional mass value                   */
-  float charge;       /**< optional charge value                 */
-  float radius;       /**< optional radius value                 */
-  int atomicnumber;   /**< optional element atomic number        */
-} molfile_atom_t;
-
-/*@{*/
-/** Plugin optional data field availability flag */
-#define MOLFILE_NOOPTIONS     0x0000 /**< no optional data                 */
-#define MOLFILE_INSERTION     0x0001 /**< insertion codes provided         */
-#define MOLFILE_OCCUPANCY     0x0002 /**< occupancy data provided          */
-#define MOLFILE_BFACTOR       0x0004 /**< B-factor data provided           */
-#define MOLFILE_MASS          0x0008 /**< Atomic mass provided             */
-#define MOLFILE_CHARGE        0x0010 /**< Atomic charge provided           */
-#define MOLFILE_RADIUS        0x0020 /**< Atomic VDW radius provided       */
-#define MOLFILE_ALTLOC        0x0040 /**< Multiple conformations present   */
-#define MOLFILE_ATOMICNUMBER  0x0080 /**< Atomic element number provided   */
-#define MOLFILE_BONDSSPECIAL  0x0100 /**< Only non-standard bonds provided */
-#define MOLFILE_BADOPTIONS    0xFFFFFFFF /**< Detect badly behaved plugins */
-                              
-/*@}*/
-
-/*@{*/
-/** Plugin optional data field availability flag */
-#define MOLFILE_QMTS_NOOPTIONS     0x0000 /**< no optional data               */
-#define MOLFILE_QMTS_GRADIENT      0x0001 /**< energy gradients provided      */
-#define MOLFILE_QMTS_SCFITER       0x0002
-/*@}*/
-
-#if vmdplugin_ABIVERSION > 10
-typedef struct molfile_timestep_metadata {
-  unsigned int count;                  /**< total # timesteps; -1 if unknown */
-  unsigned int avg_bytes_per_timestep; /** bytes per timestep                */
-  int has_velocities;                  /**< if timesteps have velocities     */
-} molfile_timestep_metadata_t;
-#endif
-
-#if vmdplugin_ABIVERSION > 11
-typedef struct molfile_qm_timestep_metadata {
-  unsigned int count;                  /**< total # timesteps; -1 if unknown */
-  unsigned int avg_bytes_per_timestep; /** bytes per timestep                */
-  int has_gradient;                    /**< if timestep contains gradient    */
-  int num_scfiter;                     /**< # scf iterations for this ts     */
-  int num_orbitals_per_wavef[MOLFILE_MAXWAVEPERTS]; /**< # orbitals for each wavefunction */
-  int has_orben_per_wavef[MOLFILE_MAXWAVEPERTS]; /**< orbital energy flags */
-  int has_occup_per_wavef[MOLFILE_MAXWAVEPERTS]; /**< orbital occupancy flags */
-  int num_wavef ;                      /**< # wavefunctions in this ts     */
-  int wavef_size;                      /**< size of one wavefunction 
-                                        *   (# of gaussian basis fctns)    */
-  int num_charge_sets;            /**< # of charge values per atom */
-} molfile_qm_timestep_metadata_t;
-#endif
-
-/*
- * Per-timestep atom coordinates and periodic cell information
- */ 
-typedef struct {
-  float *coords;        /**< coordinates of all atoms, arranged xyzxyzxyz   */
-#if vmdplugin_ABIVERSION > 10
-  float *velocities;    /**< space for velocities of all atoms; same layout */
-                        /**< NULL unless has_velocities is set              */
-#endif
-
-  /*@{*/   
-  /**
-   * Unit cell specification of the form A, B, C, alpha, beta, gamma.
-   * notes: A, B, C are side lengths of the unit cell
-   * alpha = angle between b and c
-   *  beta = angle between a and c
-   * gamma = angle between a and b
-   */ 
-  float A, B, C, alpha, beta, gamma; 
-  /*@}*/   
-
-#if vmdplugin_ABIVERSION > 10
-  double physical_time; /**< physical time point associated with this frame */
-#endif
-} molfile_timestep_t;
-
-
-/**
- * Metadata for volumetric datasets, read initially and used for subsequent
- * memory allocations and file loading.  
- */
-typedef struct {
-  char dataname[256];   /**< name of volumetric data set                    */
-  float origin[3];      /**< origin: origin of volume (x=0, y=0, z=0 corner */
-
-  /*
-   * x/y/z axis:
-   * These the three cell sides, providing both direction and length
-   * (not unit vectors) for the x, y, and z axes.  In the simplest
-   * case, these would be <size,0,0> <0,size,0> and <0,0,size) for 
-   * an orthogonal cubic volume set.  For other cell shapes these
-   * axes can be oriented non-orthogonally, and the parallelpiped
-   * may have different side lengths, not just a cube/rhombus.
-   */
-  float xaxis[3];       /**< direction (and length) for X axis              */ 
-  float yaxis[3];       /**< direction (and length) for Y axis              */
-  float zaxis[3];       /**< direction (and length) for Z axis              */
-
-  /*
-   * x/y/z size: 
-   * Number of grid cells along each axis.  This is _not_ the
-   * physical size of the box, this is the number of voxels in each
-   * direction, independent of the shape of the volume set. 
-   */
-  int xsize;            /**< number of grid cells along the X axis          */
-  int ysize;            /**< number of grid cells along the Y axis          */
-  int zsize;            /**< number of grid cells along the Z axis          */
-
-  int has_color;        /**< flag indicating presence of voxel color data   */
-} molfile_volumetric_t;
-
-
-#if vmdplugin_ABIVERSION > 9
-
-/**
- * Sizes of various QM-related data arrays which must be allocated by
- * the caller (VMD) so that the plugin can fill in the arrays with data.
- */
-typedef struct {
-  /* hessian data */
-  int nimag;                    /**< number of imaginary modes */
-  int nintcoords;               /**< number internal coordinates */
-  int ncart;                    /**< number cartesian coordinates */
-
-  /* orbital/basisset data */
-  int num_basis_funcs;          /**< number of uncontracted basis functions in basis array */
-  int num_basis_atoms;          /**< number of atoms in basis set */
-  int num_shells;               /**< total number of atomic shells */
-  int wavef_size;               /**< size of the wavefunction
-                                 *   i.e. size of secular eq. or
-                                 *   # of cartesian contracted
-                                 *   gaussian basis functions */
-
-  /* everything else */
-  int have_sysinfo;
-  int have_carthessian;         /**< hessian in cartesian coords available  */
-  int have_inthessian;          /**< hessian in internal coords available  */
-  int have_normalmodes;         /**< normal modes available  */
-} molfile_qm_metadata_t;
-
-
-/**
- * struct holding the data of hessian/normal mode runs
- * needed to calculate bond/angle/dihedral force constants
- * XXX: do we really need doubles here??
- */
-typedef struct {
-  double *carthessian;  /**< hessian matrix in cartesian coordinates (ncart)*(ncart)
-                         *   as a single array of doubles (row(1), ...,row(natoms)) */
-  int    *imag_modes;   /**< list(nimag) of imaginary modes */
-  double *inthessian;   /**< hessian matrix in internal coordinates
-                         *   (nintcoords*nintcoords) as a single array of
-                         *   doubles (row(1), ...,row(nintcoords)) */
-  float *wavenumbers;   /**< array(ncart) of wavenumbers of normal modes */
-  float *intensities;   /**< array(ncart) of intensities of normal modes */
-  float *normalmodes;   /**< matrix(ncart*ncart) of normal modes  */
-} molfile_qm_hessian_t;
-
-
-/**
- * struct holding the data for wavefunction/orbitals
- * needed to generate the volumetric orbital data
- */
-typedef struct {
-  int *num_shells_per_atom; /**< number of shells per atom */
-  int *num_prim_per_shell;  /**< number of shell primitives shell */
-
-  float *basis;             /**< contraction coeffients and exponents for
-                             *   the basis functions in the form
-                             *   { exp(1), c-coeff(1), exp(2), c-coeff(2), ....};
-                             *   size=2*num_basis_funcs */
-  int *atomic_number;       /**< atomic numbers (chem. element) of atoms in basis set */
-  int *angular_momentum;    /**< 3 ints per wave function coefficient do describe the 
-                             *   cartesian components of the angular momentum.
-                             *   E.g. S={0 0 0}, Px={1 0 0}, Dxy={1 1 0}, or Fyyz={0 2 1}. 
-                             */
-  int *shell_symmetry;      /**< symmetry type per shell in basis */
-} molfile_qm_basis_t;
-
-
-/**
- * QM run info. Parameters that stay unchanged during a single file.
- */ 
-typedef struct {
-  int nproc;             /**< number of processors used. XXX:? */
-  int memory;            /**< amount of memory used in Mbyte. XXX:? */ 
-  int runtype;           /**< flag indicating the calculation method. */
-  int scftype;           /**< SCF type: RHF, UHF, ROHF, GVB or MCSCF wfn. */
-  int status;            /**< indicates whether SCF and geometry optimization
-                          *   have converged properly. */
-  int num_electrons;     /**< number of electrons.    XXX: can be fractional in some DFT codes */
-  int totalcharge;       /**< total charge of system. XXX: can be fractional in some DFT codes */
-  int num_occupied_A;    /**< number of occupied alpha orbitals */
-  int num_occupied_B;    /**< number of occupied beta orbitals */
-
-  double *nuc_charge;    /**< array(natom) containing the nuclear charge of atom i */
-
-  char basis_string[MOLFILE_BUFSIZ];    /**< basis name as "nice" string. */
-  char runtitle[MOLFILE_BIGBUFSIZ];     /**< title of run.                */
-  char geometry[MOLFILE_BUFSIZ];        /**< type of provided geometry,   XXX: remove?
-                                         * e.g. UNIQUE, ZMT, CART, ...    */
-  char version_string[MOLFILE_BUFSIZ];  /**< QM code version information. */
-} molfile_qm_sysinfo_t;
-
-
-typedef struct {
-  int   type;               /**< CANONICAL, LOCALIZED, OTHER */
-  int   spin;               /**< 1 for alpha, -1 for beta */
-  int   excitation;         /**< 0 for ground state, 1,2,3,... for excited states */
-  int   multiplicity;       /**< spin multiplicity of the state, zero if unknown */
-  char info[MOLFILE_BUFSIZ]; /**< string for additional type info */
-
-  double energy;            /**< energy of the electronic state.
-                             *   i.e. HF-SCF energy, CI state energy,
-                             *   MCSCF energy, etc. */
-
-  float *wave_coeffs;       /**< expansion coefficients for wavefunction in the
-                             *   form {orbital1(c1),orbital1(c2),.....,orbitalM(cN)} */
-  float *orbital_energies;  /**< list of orbital energies for wavefunction */
-  float *occupancies;       /**< orbital occupancies */
-  int   *orbital_ids;       /**< orbital ID numbers; If NULL then VMD will
-                             *   assume 1,2,3,...num_orbs.     */
-} molfile_qm_wavefunction_t;
-
-
-/**
- * QM per trajectory timestep info
- */
-typedef struct {
-  molfile_qm_wavefunction_t *wave; /**< array of wavefunction objects */
-  float  *gradient;         /**< force on each atom (=gradient of energy) */
-
-  double *scfenergies;      /**< scfenergy per trajectory point. */
-  double *charges;          /**< per-atom charges */
-  int    *charge_types;     /**< type of each charge set */
-} molfile_qm_timestep_t;
-
-
-/**
- * QM wavefunctions, and related information 
- */
-typedef struct {
-  molfile_qm_hessian_t hess;            /* hessian info */
-  molfile_qm_basis_t   basis;           /* basis set info */
-  molfile_qm_sysinfo_t run;             /* system info  */
-} molfile_qm_t;
-
-
-/**
- *  Enumeration of all of the wavefunction types that can be read
- *  from QM file reader plugins.
- *
- * CANON    = canonical (i.e diagonalized) wavefunction
- * GEMINAL  = GVB-ROHF geminal pairs
- * MCSCFNAT = Multi-Configuration SCF natural orbitals
- * MCSCFOPT = Multi-Configuration SCF optimized orbitals
- * CINATUR  = Configuration-Interaction natural orbitals
- * BOYS     = Boys localization
- * RUEDEN   = Ruedenberg localization
- * PIPEK    = Pipek-Mezey population localization
- *
- * NBO related localizations:
- * --------------------------
- * NAO      = Natural Atomic Orbitals
- * PNAO     = pre-orthogonal NAOs
- * NBO      = Natural Bond Orbitals
- * PNBO     = pre-orthogonal NBOs
- * NHO      = Natural Hybrid Orbitals
- * PNHO     = pre-orthogonal NHOs
- * NLMO     = Natural Localized Molecular Orbitals
- * PNLMO    = pre-orthogonal NLMOs
- *
- * UNKNOWN  = Use this for any type not listed here
- *            You can use the string field for description
- */
-enum molfile_qm_wavefunc_type {
-  MOLFILE_WAVE_CANON,    MOLFILE_WAVE_GEMINAL,
-  MOLFILE_WAVE_MCSCFNAT, MOLFILE_WAVE_MCSCFOPT,
-  MOLFILE_WAVE_CINATUR,
-  MOLFILE_WAVE_PIPEK,  MOLFILE_WAVE_BOYS, MOLFILE_WAVE_RUEDEN,
-  MOLFILE_WAVE_NAO,    MOLFILE_WAVE_PNAO, MOLFILE_WAVE_NHO, 
-  MOLFILE_WAVE_PNHO,   MOLFILE_WAVE_NBO,  MOLFILE_WAVE_PNBO, 
-  MOLFILE_WAVE_PNLMO,  MOLFILE_WAVE_NLMO, MOLFILE_WAVE_MOAO, 
-  MOLFILE_WAVE_NATO,   MOLFILE_WAVE_UNKNOWN
-};
-
-enum molfile_qm_charge_type {
-  MOLFILE_QMCHARGE_MULLIKEN, MOLFILE_QMCHARGE_LOWDIN,
-  MOLFILE_QMCHARGE_ESP, MOLFILE_QMCHARGE_NPA,
-  MOLFILE_QMCHARGE_UNKNOWN
-};
-#endif
-
-
-/**
- *  Enumeration of all of the supported graphics objects that can be read
- *  from graphics file reader plugins.
- */
-enum molfile_graphics_type {
-  MOLFILE_POINT,  MOLFILE_TRIANGLE, MOLFILE_TRINORM, MOLFILE_NORMS, 
-  MOLFILE_LINE,   MOLFILE_CYLINDER, MOLFILE_CAPCYL,  MOLFILE_CONE,    
-  MOLFILE_SPHERE, MOLFILE_TEXT,     MOLFILE_COLOR,   MOLFILE_TRICOLOR
-};
-
-/**
- *  Individual graphics object/element data
- */ 
-typedef struct {
-  int type;             /* One of molfile_graphics_type */
-  int style;            /* A general style parameter    */
-  float size;           /* A general size parameter     */
-  float data[9];        /* All data for the element     */
-} molfile_graphics_t;
-
-
-/*
- * Types for raw graphics elements stored in files.  Data for each type
- * should be stored by the plugin as follows:
-
-type        data                                     style       size
-----        ----                                     -----       ----
-point       x, y, z                                              pixel size
-triangle    x1,y1,z1,x2,y2,z2,x3,y3,z3                 
-trinorm     x1,y1,z1,x2,y2,z2,x3,y3,z3                 
-            the next array element must be NORMS
-tricolor    x1,y1,z1,x2,y2,z2,x3,y3,z3                 
-            the next array elements must be NORMS
-            the following element must be COLOR, with three RGB triples
-norms       x1,y1,z1,x2,y2,z2,x3,y3,z3                 
-line        x1,y1,z1,x2,y2,z2                        0=solid     pixel width
-                                                     1=stippled
-cylinder    x1,y1,z1,x2,y2,z2                        resolution  radius
-capcyl      x1,y1,z1,x2,y2,z2                        resolution  radius
-sphere      x1,y1,z1                                 resolution  radius
-text        x, y, z, up to 24 bytes of text                      pixel size
-color       r, g, b
-*/
-
-
-/**
- * Main file reader API.  Any function in this struct may be NULL
- * if not implemented by the plugin; the application checks this to determine
- * what functionality is present in the plugin. 
- */ 
-typedef struct {
-  /**
-   * Required header 
-   */
-  vmdplugin_HEAD;
-
-  /**
-   * Filename extension for this file type.  May be NULL if no filename 
-   * extension exists and/or is known.  For file types that match several
-   * common extensions, list them in a comma separated list such as:
-   *  "pdb,ent,foo,bar,baz,ban"
-   * The comma separated list will be expanded when filename extension matching
-   * is performed.  If multiple plugins solicit the same filename extensions,
-   * the one that lists the extension earliest in its list is selected. In the 
-   * case of a "tie", the first one tried/checked "wins".
-   */
-  const char *filename_extension;
-
-  /**
-   * Try to open the file for reading.  Return an opaque handle, or NULL on
-   * failure. Set the number of atoms; if the number of atoms cannot be 
-   * determined, set natoms to MOLFILE_NUMATOMS_UNKNOWN. 
-   * Filetype should be the name under which this plugin was registered;
-   * this is provided so that plugins can provide the same function pointer
-   * to handle multiple file types.
-   */
-  void *(* open_file_read)(const char *filepath, const char *filetype, 
-      int *natoms);
-  
-  /**
-   * Read molecular structure from the given file handle.  atoms is allocated
-   * by the caller and points to space for natoms.
-   * On success, place atom information in the passed-in pointer.  
-   * optflags specifies which optional fields in the atoms will be set by
-   * the plugin.
-   */
-  int (*read_structure)(void *, int *optflags, molfile_atom_t *atoms);
-
-  /**
-   * Read bond information for the molecule.  On success the arrays from
-   * and to should point to the (one-based) indices of bonded atoms.
-   * Each unique bond should be specified only once, so file formats that list
-   * bonds twice will need post-processing before the results are returned to
-   * the caller.
-   * If the plugin provides bond information, but the file loaded doesn't 
-   * actually contain any bond info, the nbonds parameter should be
-   * set to 0 and from/to should be set to NULL to indicate that no bond
-   * information was actually present, and automatic bond search should be
-   * performed.  
-   *
-   * If the plugin provides bond order information, the bondorder array
-   * will contain the bond order for each from/to pair.  If not, the bondorder
-   * pointer should be set to NULL, in which case the caller will provide a 
-   * default bond order value of 1.0.
-   *
-   * If the plugin provides bond type information, the bondtype array
-   * will contain the bond type index for each from/to pair. These numbers
-   * are consecutive integers starting from 0.
-   * the bondtypenames list, contains the corresponding names, if available,
-   * as a NULL string terminated list. nbondtypes is provided for convenience
-   * and consistency checking.
-   *
-   * These arrays must be freed by the plugin in the close_file_read function.
-   * This function can be called only after read_structure().  
-   * Return MOLFILE_SUCCESS if no errors occur. 
-   */
-#if vmdplugin_ABIVERSION > 14
-  int (*read_bonds)(void *, int *nbonds, int **from, int **to, float **bondorder, 
-                    int **bondtype, int *nbondtypes, char ***bondtypename);
-#else
-  int (*read_bonds)(void *, int *nbonds, int **from, int **to, float **bondorder);
-#endif
-
-  /**
-   * XXX this function will be augmented and possibly superceded by a 
-   *     new QM-capable version named read_timestep(), when finished.
-   *
-   * Read the next timestep from the file.  Return MOLFILE_SUCCESS, or 
-   * MOLFILE_EOF on EOF.  If the molfile_timestep_t argument is NULL, then 
-   * the frame should be skipped.  Otherwise, the application must prepare 
-   * molfile_timestep_t by allocating space in coords for the corresponding 
-   * number of coordinates.  
-   * The natoms parameter exists because some coordinate file formats 
-   * (like CRD) cannot determine for themselves how many atoms are in a 
-   * timestep; the app must therefore obtain this information elsewhere
-   * and provide it to the plugin.
-   */
-  int (* read_next_timestep)(void *, int natoms, molfile_timestep_t *);
-
-  /**
-   * Close the file and release all data.  The handle cannot be reused.
-   */
-  void (* close_file_read)(void *);
-   
-  /**
-   * Open a coordinate file for writing using the given header information.
-   * Return an opaque handle, or NULL on failure.  The application must
-   * specify the number of atoms to be written. 
-   * filetype should be the name under which this plugin was registered.
-   */
-  void *(* open_file_write)(const char *filepath, const char *filetype, 
-      int natoms);
-  
-  /**
-   * Write structure information.  Return success.
-   */
-  int (* write_structure)(void *, int optflags, const molfile_atom_t *atoms);
-
-  /**
-   * Write a timestep to the coordinate file.  Return MOLFILE_SUCCESS if no
-   * errors occur.  If the file contains structure information in each 
-   * timestep (like a multi-entry PDB), it will have to cache the information 
-   * from the initial calls from write_structure.
-   */
-  int (* write_timestep)(void *, const molfile_timestep_t *);
-  
-  /**
-   * Close the file and release all data.  The handle cannot be reused.
-   */
-  void (* close_file_write)(void *);
-
-  /**
-   * Retrieve metadata pertaining to volumetric datasets in this file.
-   * Set nsets to the number of volumetric data sets, and set *metadata
-   * to point to an array of molfile_volumetric_t.  The array is owned by
-   * the plugin and should be freed by close_file_read().  The application
-   * may call this function any number of times.
-   */
-  int (* read_volumetric_metadata)(void *, int *nsets, 
-        molfile_volumetric_t **metadata);
-
-  /** 
-   * Read the specified volumetric data set into the space pointed to by 
-   * datablock.  The set is specified with a zero-based index.  The space 
-   * allocated for the datablock must be equal to
-   * xsize * ysize * zsize.  No space will be allocated for colorblock 
-   * unless has_color is nonzero; in that case, colorblock should be
-   * filled in with three RGB floats per datapoint.
-   */
-  int (* read_volumetric_data)(void *, int set, float *datablock, 
-        float *colorblock);
-
-  /**
-   * Read raw graphics data stored in this file.   Return the number of data
-   * elements and the data itself as an array of molfile_graphics_t in the 
-   * pointer provided by the application.  The plugin is responsible for 
-   * freeing the data when the file is closed.
-   */
-  int (* read_rawgraphics)(void *, int *nelem, const molfile_graphics_t **data);
-
-  /**
-   * Read molecule metadata such as what database (if any) this file/data
-   * came from, what the accession code for the database is, textual remarks
-   * and other notes pertaining to the contained structure/trajectory/volume
-   * and anything else that's informative at the whole file level.
-   */ 
-  int (* read_molecule_metadata)(void *, molfile_metadata_t **metadata);
-  
-  /**
-   * Write bond information for the molecule.  The arrays from
-   * and to point to the (one-based) indices of bonded atoms.
-   * Each unique bond will be specified only once by the caller. 
-   * File formats that list bonds twice will need to emit both the 
-   * from/to and to/from versions of each.
-   * This function must be called before write_structure().  
-   *
-   * Like the read_bonds() routine, the bondorder pointer is set to NULL
-   * if the caller doesn't have such information, in which case the 
-   * plugin should assume a bond order of 1.0 if the file format requires
-   * bond order information.
-   *
-   * Support for bond types follows the bondorder rules. bondtype is
-   * an integer array of the size nbonds that contains the bond type
-   * index (consecutive integers starting from 0) and bondtypenames
-   * contain the corresponding strings, in case the naming/numbering
-   * scheme is different from the index numbers.
-   * if the pointers are set to NULL, then this information is not available.
-   * bondtypenames can only be used of bondtypes is also given.
-   * Return MOLFILE_SUCCESS if no errors occur. 
-   */
-#if vmdplugin_ABIVERSION > 14
-  int (* write_bonds)(void *, int nbonds, int *from, int *to, float *bondorder, 
-                     int *bondtype, int nbondtypes, char **bondtypename);
-#else
-  int (* write_bonds)(void *, int nbonds, int *from, int *to, float *bondorder);
-#endif
-
-#if vmdplugin_ABIVERSION > 9
-  /**
-   * Write the specified volumetric data set into the space pointed to by 
-   * datablock.  The * allocated for the datablock must be equal to
-   * xsize * ysize * zsize.  No space will be allocated for colorblock 
-   * unless has_color is nonzero; in that case, colorblock should be
-   * filled in with three RGB floats per datapoint.
-   */
-  int (* write_volumetric_data)(void *, molfile_volumetric_t *metadata,
-                                float *datablock, float *colorblock);
-
-#if vmdplugin_ABIVERSION > 15
-  /** 
-   * Read in Angles, Dihedrals, Impropers, and Cross Terms and optionally types.
-   * (Cross terms pertain to the CHARMM/NAMD CMAP feature) 
-   */
-  int (* read_angles)(void *handle, int *numangles, int **angles, int **angletypes,
-                      int *numangletypes, char ***angletypenames, int *numdihedrals,
-                      int **dihedrals, int **dihedraltypes, int *numdihedraltypes,
-                      char ***dihedraltypenames, int *numimpropers, int **impropers,        
-                      int **impropertypes, int *numimpropertypes, char ***impropertypenames,
-                      int *numcterms, int **cterms, int *ctermcols, int *ctermrows);
-
-  /** 
-   * Write out Angles, Dihedrals, Impropers, and Cross Terms
-   * (Cross terms pertain to the CHARMM/NAMD CMAP feature) 
-   */
-  int (* write_angles)(void *handle, int numangles, const int *angles, const int *angletypes,
-                       int numangletypes, const char **angletypenames, int numdihedrals,
-                       const int *dihedrals, const int *dihedraltypes, int numdihedraltypes,
-                       const char **dihedraltypenames, int numimpropers, 
-                       const int *impropers, const int *impropertypes, int numimpropertypes,
-                       const char **impropertypenames, int numcterms,  const int *cterms, 
-                       int ctermcols, int ctermrows);
-#else
-  /** 
-   * Read in Angles, Dihedrals, Impropers, and Cross Terms
-   * Forces are in Kcal/mol
-   * (Cross terms pertain to the CHARMM/NAMD CMAP feature, forces are given
-   *  as a 2-D matrix)
-   */
-  int (* read_angles)(void *,
-                int *numangles,    int **angles,    double **angleforces,
-                int *numdihedrals, int **dihedrals, double **dihedralforces,
-                int *numimpropers, int **impropers, double **improperforces,
-                int *numcterms,    int **cterms, 
-                int *ctermcols,    int *ctermrows,  double **ctermforces);
-
-  /** 
-   * Write out Angles, Dihedrals, Impropers, and Cross Terms
-   * Forces are in Kcal/mol
-   * (Cross terms pertain to the CHARMM/NAMD CMAP feature, forces are given
-   *  as a 2-D matrix)
-   */
-  int (* write_angles)(void *,
-        int numangles,    const int *angles,    const double *angleforces,
-        int numdihedrals, const int *dihedrals, const double *dihedralforces,
-        int numimpropers, const int *impropers, const double *improperforces,
-        int numcterms,   const int *cterms,    
-        int ctermcols, int ctermrows, const double *ctermforces);
-#endif
-
-  /**
-   * Retrieve metadata pertaining to QM datasets in this file.
-   */
-  int (* read_qm_metadata)(void *, molfile_qm_metadata_t *metadata);
-
-  /**
-   * Read QM data
-   */
-  int (* read_qm_rundata)(void *, molfile_qm_t *qmdata);
-
-  /**
-   * Read the next timestep from the file.  Return MOLFILE_SUCCESS, or 
-   * MOLFILE_EOF on EOF.  If the molfile_timestep_t or molfile_qm_metadata_t
-   * arguments are NULL, then the coordinate or qm data should be skipped.  
-   * Otherwise, the application must prepare molfile_timestep_t and 
-   * molfile_qm_timestep_t by allocating space for the corresponding 
-   * number of coordinates, orbital wavefunction coefficients, etc.
-   * Since it is common for users to want to load only the final timestep 
-   * data from a QM run, the application may provide any combination of
-   * valid, or NULL pointers for the molfile_timestep_t and 
-   * molfile_qm_timestep_t parameters, depending on what information the
-   * user is interested in.
-   * The natoms and qm metadata parameters exist because some file formats 
-   * cannot determine for themselves how many atoms etc are in a 
-   * timestep; the app must therefore obtain this information elsewhere
-   * and provide it to the plugin.
-   */
-  int (* read_timestep)(void *, int natoms, molfile_timestep_t *,
-                        molfile_qm_metadata_t *, molfile_qm_timestep_t *);
-#endif
-
-#if vmdplugin_ABIVERSION > 10
-  int (* read_timestep_metadata)(void *, molfile_timestep_metadata_t *);
-#endif
-#if vmdplugin_ABIVERSION > 11
-  int (* read_qm_timestep_metadata)(void *, molfile_qm_timestep_metadata_t *);
-#endif
-
-#if vmdplugin_ABIVERSION > 13
-  /**
-   *  Console output, READ-ONLY function pointer.
-   *  Function pointer that plugins can use for printing to the host
-   *  application's text console.  This provides a clean way for plugins
-   *  to send message strings back to the calling application, giving the
-   *  caller the ability to prioritize, buffer, and redirect console messages
-   *  to an appropriate output channel, window, etc.  This enables the use of
-   *  graphical consoles like TkCon without losing console output from plugins.
-   *  If the function pointer is NULL, no console output service is provided
-   *  by the calling application, and the output should default to stdout
-   *  stream.  If the function pointer is non-NULL, all output will be
-   *  subsequently dealt with by the calling application.
-   *
-   *  XXX this should really be put into a separate block of
-   *      application-provided read-only function pointers for any
-   *      application-provided services
-   */
-  int (* cons_fputs)(const int, const char*);
-#endif
-
-} molfile_plugin_t;
-
-#endif
-
diff --git a/src/include/gromacs/external/vmd_molfile/vmddlopen.h b/src/include/gromacs/external/vmd_molfile/vmddlopen.h
deleted file mode 100644 (file)
index e18e65f..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-/* -*- mode: c; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; c-file-style: "stroustrup"; -*-
- *
- * 
- * This file is part of Gromacs        Copyright (c) 1991-2008
- * David van der Spoel, Erik Lindahl, Berk Hess, University of Groningen.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the research papers on the package. Check out http://www.gromacs.org
- * 
- * And Hey:
- * Gnomes, ROck Monsters And Chili Sauce
- */
-
-/***************************************************************************
- *cr
- *cr            (C) Copyright 1995-2009 The Board of Trustees of the
- *cr                        University of Illinois
- *cr                         All Rights Reserved
- *cr
-Developed by:           Theoretical and Computational Biophysics Group
-                        University of Illinois at Urbana-Champaign
-                        http://www.ks.uiuc.edu/
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the Software), to deal with
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to
-do so, subject to the following conditions:
-
-Redistributions of source code must retain the above copyright notice,
-this list of conditions and the following disclaimers.
-
-Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimers in the documentation
-and/or other materials provided with the distribution.
-
-Neither the names of Theoretical and Computational Biophysics Group,
-University of Illinois at Urbana-Champaign, nor the names of its contributors
-may be used to endorse or promote products derived from this Software without
-specific prior written permission.
-
-THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS WITH THE SOFTWARE.
- ***************************************************************************/
-
-/***************************************************************************
- * RCS INFORMATION:
- *
- *      $RCSfile: vmddlopen.h,v $
- *      $Author: johns $        $Locker:  $             $State: Exp $
- *      $Revision: 1.9 $      $Date: 2009/07/07 02:40:05 $
- *
- ***************************************************************************
- * DESCRIPTION:
- *   Routines for loading dynamic link libraries and shared object files
- *   on various platforms, abstracting from machine dependent APIs.
- *
- * LICENSE:
- *   UIUC Open Source License 
- *   http://www.ks.uiuc.edu/Research/vmd/plugins/pluginlicense.html
- *
- ***************************************************************************/
-
-/*
- * vmddlopen: thin multi-platform wrapper around dlopen/LoadLibrary
- */
-
-#ifndef VMD_DLOPEN__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Try to open the specified library.  All symbols must be resolved or the 
- * load will fail (RTLD_NOW).  
- */
-void *vmddlopen(const char *fname);
-
-/* Try to load the specified symbol using the given handle.  Returns NULL if 
- * the symbol cannot be loaded.
- */
-void *vmddlsym(void *h, const char *sym);
-
-/* Unload the library.  Return 0 on success, nonzero on error. 
- */
-int vmddlclose(void *h);
-
-/* Return last error from any of the above functions.  Not thread-safe on
- * Windows due to static buffer in our code. 
- */ 
-const char *vmddlerror(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
diff --git a/src/include/gromacs/external/vmd_molfile/vmdplugin.h b/src/include/gromacs/external/vmd_molfile/vmdplugin.h
deleted file mode 100644 (file)
index 62ec64b..0000000
+++ /dev/null
@@ -1,239 +0,0 @@
-/* -*- mode: c; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; c-file-style: "stroustrup"; -*-
- *
- * 
- * This file is part of Gromacs        Copyright (c) 1991-2008
- * David van der Spoel, Erik Lindahl, Berk Hess, University of Groningen.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the research papers on the package. Check out http://www.gromacs.org
- * 
- * And Hey:
- * Gnomes, ROck Monsters And Chili Sauce
- */
-
-/***************************************************************************
- *cr
- *cr            (C) Copyright 1995-2006 The Board of Trustees of the
- *cr                        University of Illinois
- *cr                         All Rights Reserved
- *cr
-Developed by:           Theoretical and Computational Biophysics Group
-                        University of Illinois at Urbana-Champaign
-                        http://www.ks.uiuc.edu/
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the Software), to deal with
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to
-do so, subject to the following conditions:
-
-Redistributions of source code must retain the above copyright notice,
-this list of conditions and the following disclaimers.
-
-Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimers in the documentation
-and/or other materials provided with the distribution.
-
-Neither the names of Theoretical and Computational Biophysics Group,
-University of Illinois at Urbana-Champaign, nor the names of its contributors
-may be used to endorse or promote products derived from this Software without
-specific prior written permission.
-
-THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS WITH THE SOFTWARE.
- ***************************************************************************/
-
-/***************************************************************************
- * RCS INFORMATION:
- *
- *      $RCSfile: vmdplugin.h,v $
- *      $Author: johns $       $Locker:  $             $State: Exp $
- *      $Revision: 1.32 $       $Date: 2009/02/24 05:12:35 $
- *
- ***************************************************************************/
-
-/** @file
- * This header must be included by every VMD plugin library.  It defines the
- * API for every plugin so that VMD can organize the plugins it finds.  
- */
-
-#ifndef VMD_PLUGIN_H
-#define VMD_PLUGIN_H
-
-
-/* 
- * Preprocessor tricks to make it easier for us to redefine the names of
- * functions when building static plugins.
- */
-#if !defined(VMDPLUGIN)
-/** 
-  * macro defining VMDPLUGIN if it hasn't already been set to the name of 
-  * a static plugin that is being compiled.  This is the catch-all case.
-  */
-#define VMDPLUGIN vmdplugin
-#endif
-/** concatenation macro, joins args x and y together as a single string */
-#define xcat(x, y) cat(x, y)
-/** concatenation macro, joins args x and y together as a single string */
-#define cat(x, y) x ## y 
-
-/*
- *  macros to correctly define plugin function names depending on whether 
- *  the plugin is being compiled for static linkage or dynamic loading. 
- *  When compiled for static linkage, each plugin needs to have unique
- *  function names for all of its entry points.  When compiled for dynamic
- *  loading, the plugins must name their entry points consistently so that
- *  the plugin loading mechanism can find the register, register_tcl, init,
- *  and fini routines via dlopen() or similar operating system interfaces.
- */
-/*@{*/
-/** Macro names entry points correctly for static linkage or dynamic loading */
-#define VMDPLUGIN_register     xcat(VMDPLUGIN, _register)
-#define VMDPLUGIN_register_tcl xcat(VMDPLUGIN, _register_tcl)
-#define VMDPLUGIN_init         xcat(VMDPLUGIN, _init)
-#define VMDPLUGIN_fini         xcat(VMDPLUGIN, _fini)
-/*@}*/
-
-
-/** "WIN32" is defined on both WIN32 and WIN64 platforms... */
-#if (defined(WIN32)) 
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-
-#if !defined(STATIC_PLUGIN)
-#if defined(VMDPLUGIN_EXPORTS)
-/** 
- *  Only define DllMain for plugins, not in VMD or in statically linked plugins
- *  VMDPLUGIN_EXPORTS is only defined when compiling dynamically loaded plugins
- */
-BOOL APIENTRY DllMain( HANDLE hModule,
-                       DWORD ul_reason_for_call,
-                       LPVOID lpReserved
-                     )
-{
-  return TRUE;
-}
-
-#define VMDPLUGIN_API __declspec(dllexport)
-#else
-#define VMDPLUGIN_API __declspec(dllimport)
-#endif /* VMDPLUGIN_EXPORTS */
-#else  /* ! STATIC_PLUGIN */
-#define VMDPLUGIN_API
-#endif /* ! STATIC_PLUGIN */
-#else
-/** If we're not compiling on Windows, then this macro is defined empty */
-#define VMDPLUGIN_API 
-#endif
-
-/** define plugin linkage correctly for both C and C++ based plugins */
-#ifdef __cplusplus
-#define VMDPLUGIN_EXTERN extern "C" VMDPLUGIN_API
-#else
-#define VMDPLUGIN_EXTERN extern VMDPLUGIN_API
-#endif  /* __cplusplus */
-
-/* 
- * Plugin API functions start here 
- */
-
-
-/** 
- * Init routine: called the first time the library is loaded by the 
- * application and before any other API functions are referenced.
- * Return 0 on success.
- */
-VMDPLUGIN_EXTERN int VMDPLUGIN_init(void);
-
-/**
- * Macro for creating a struct header used in all plugin structures.
- * 
- * This header should be placed at the top of every plugin API definition 
- * so that it can be treated as a subtype of the base plugin type.
- *
- * abiversion: Defines the ABI for the base plugin type (not for other plugins)
- * type: A string descriptor of the plugin type.
- * name: A name for the plugin.
- * author: A string identifier, possibly including newlines.
- * Major and minor version.  
- * is_reentrant: Whether this library can be run concurrently with itself.
- */
-#define vmdplugin_HEAD \
-  int abiversion; \
-  const char *type; \
-  const char *name; \
-  const char *prettyname; \
-  const char *author; \
-  int majorv; \
-  int minorv; \
-  int is_reentrant
-
-/** 
-  * Typedef for generic plugin header, individual plugins can
-  * make their own structures as long as the header info remains 
-  * the same as the generic plugin header, most easily done by 
-  * using the vmdplugin_HEAD macro.
-  */
-typedef struct {
-  vmdplugin_HEAD;
-} vmdplugin_t;
-
-/**
- * Use this macro to initialize the abiversion member of each plugin
- */
-#define vmdplugin_ABIVERSION  16
-
-/*@{*/
-/** Use this macro to indicate a plugin's thread-safety at registration time */
-#define VMDPLUGIN_THREADUNSAFE 0
-#define VMDPLUGIN_THREADSAFE   1
-/*@}*/
-
-/*@{*/
-/** Error return code for use in the plugin registration and init functions */
-#define VMDPLUGIN_SUCCESS      0
-#define VMDPLUGIN_ERROR       (-1)
-/*@}*/
-
-/** 
- * Function pointer typedef for register callback functions
- */
-typedef int (*vmdplugin_register_cb)(void *, vmdplugin_t *);
-
-/**
- * Allow the library to register plugins with the application.
- * The callback should be called using the passed-in void pointer, which
- * should not be interpreted in any way by the library.  Each vmdplugin_t
- * pointer passed to the application should point to statically-allocated
- * or heap-allocated memory and should never be later modified by the plugin.
- * Applications must be permitted to retain only a copy of the the plugin
- * pointer, without making any deep copy of the items in the struct.
- */
-VMDPLUGIN_EXTERN int VMDPLUGIN_register(void *, vmdplugin_register_cb);
-
-/**
- * Allow the library to register Tcl extensions.  
- * This API is optional; if found by dlopen, it will be called after first
- * calling init and register.  
- */
-VMDPLUGIN_EXTERN int VMDPLUGIN_register_tcl(void *, void *tcl_interp, 
-    vmdplugin_register_cb);
-
-/**
- * The Fini method is called when the application will no longer use 
- * any plugins in the library.  
- */
-VMDPLUGIN_EXTERN int VMDPLUGIN_fini(void);
-
-#endif   /* VMD_PLUGIN_H */
diff --git a/src/include/gromacs/fileio/confio.h b/src/include/gromacs/fileio/confio.h
deleted file mode 100644 (file)
index f75b238..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * 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,2015,2016,2017 by the GROMACS development team.
- * Copyright (c) 2018,2019,2020,2021, 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.
- */
-#ifndef GMX_FILEIO_CONFIO_H
-#define GMX_FILEIO_CONFIO_H
-
-#include "gromacs/math/vectypes.h"
-#include "gromacs/utility/basedefinitions.h"
-
-/* For reading coordinate files it is assumed that enough memory
- * has been allocated beforehand.
- */
-struct gmx_mtop_t;
-struct t_atoms;
-struct t_symtab;
-struct t_topology;
-enum class PbcType : int;
-
-void write_sto_conf_indexed(const char*    outfile,
-                            const char*    title,
-                            const t_atoms* atoms,
-                            const rvec     x[],
-                            const rvec*    v,
-                            PbcType        pbcType,
-                            const matrix   box,
-                            int            nindex,
-                            int            index[]);
-/* like write_sto_conf, but indexed */
-
-void write_sto_conf(const char*    outfile,
-                    const char*    title,
-                    const t_atoms* atoms,
-                    const rvec     x[],
-                    const rvec*    v,
-                    PbcType        pbcType,
-                    const matrix   box);
-/* write atoms, x, v (if .gro and not NULL) and box (if not NULL)
- * to an STO (.gro or .pdb) file */
-
-void write_sto_conf_mtop(const char*       outfile,
-                         const char*       title,
-                         const gmx_mtop_t& mtop,
-                         const rvec        x[],
-                         const rvec*       v,
-                         PbcType           pbcType,
-                         const matrix      box);
-/* As write_sto_conf, but uses a gmx_mtop_t struct */
-
-/*! \brief Read a configuration and, when available, a topology from a tpr or structure file.
- *
- * When reading from a tpr file, the complete topology is returned in \p mtop.
- * When reading from a structure file, only the atoms struct in \p mtop contains data.
- *
- * \param[in]     infile        Input file name
- * \param[out]    haveTopology  true when a topology was read and stored in mtop
- * \param[out]    mtop          The topology, either complete or only atom data
- * \param[out]    pbcType       Enum reporting the type of PBC
- * \param[in,out] x             Coordinates will be stored when *x!=NULL
- * \param[in,out] v             Velocities will be stored when *v!=NULL
- * \param[out]    box           Box dimensions
- */
-void readConfAndTopology(const char* infile,
-                         bool*       haveTopology,
-                         gmx_mtop_t* mtop,
-                         PbcType*    pbcType,
-                         rvec**      x,
-                         rvec**      v,
-                         matrix      box);
-
-/*! \brief Read a configuration from a structure file.
- *
- * This should eventually be superseded by TopologyInformation
- *
- * \param[in]     infile        Input file name
- * \param[out]    symtab        The symbol table
- * \param[out]    name          The title of the molecule, e.g. from pdb TITLE record
- * \param[out]    atoms         The global t_atoms struct
- * \param[out]    pbcType       Enum reporting the type of PBC
- * \param[in,out] x             Coordinates will be stored when *x!=NULL
- * \param[in,out] v             Velocities will be stored when *v!=NULL
- * \param[out]    box           Box dimensions
- */
-void readConfAndAtoms(const char* infile,
-                      t_symtab*   symtab,
-                      char**      name,
-                      t_atoms*    atoms,
-                      PbcType*    pbcType,
-                      rvec**      x,
-                      rvec**      v,
-                      matrix      box);
-
-/*! \brief Read a configuration and, when available, a topology from a tpr or structure file.
- *
- * Deprecated, superseded by readConfAndTopology().
- * When \p requireMasses = TRUE, this routine must return a topology with
- * mass data. Masses are either read from a tpr input file, or otherwise
- * looked up from the mass database, and when such lookup fails a fatal error
- * results.
- * When \p requireMasses = FALSE, masses will still be read from tpr input and
- * their presence is signaled with the \p haveMass flag in t_atoms of \p top.
- *
- * \param[in]     infile        Input file name
- * \param[out]    top           The topology, either complete or only atom data. Caller is
- *                              responsible for calling done_top().
- * \param[out]    pbcType       Enum reporting the type of PBC
- * \param[in,out] x             Coordinates will be stored when *x!=NULL
- * \param[in,out] v             Velocities will be stored when *v!=NULL
- * \param[out]    box           Box dimensions
- * \param[in]     requireMasses Require masses to be present, either from tpr or from the mass
- *                              database
- * \returns if a topology is available
- */
-gmx_bool read_tps_conf(const char*        infile,
-                       struct t_topology* top,
-                       PbcType*           pbcType,
-                       rvec**             x,
-                       rvec**             v,
-                       matrix             box,
-                       gmx_bool           requireMasses);
-
-#endif
diff --git a/src/include/gromacs/fileio/filetypes.h b/src/include/gromacs/fileio/filetypes.h
deleted file mode 100644 (file)
index 3a47da0..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * 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,2015,2019,2020 by the GROMACS development team.
- * Copyright (c) 2021, 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.
- */
-#ifndef GMX_FILEIO_FILETYPES_H
-#define GMX_FILEIO_FILETYPES_H
-
-#include "gromacs/utility/basedefinitions.h"
-
-/* this enum should correspond to the array deffile in filetypes.cpp */
-enum GromacsFileType
-{
-    efMDP,
-    efTRX,
-    efTRO,
-    efTRN,
-    efTRR,
-    efCOMPRESSED,
-    efXTC,
-    efTNG,
-    efEDR,
-    efSTX,
-    efSTO,
-    efGRO,
-    efG96,
-    efPDB,
-    efBRK,
-    efENT,
-    efESP,
-    efPQR,
-    efCPT,
-    efLOG,
-    efXVG,
-    efOUT,
-    efNDX,
-    efTOP,
-    efITP,
-    efTPS,
-    efTPR,
-    efTEX,
-    efRTP,
-    efATP,
-    efHDB,
-    efDAT,
-    efDLG,
-    efMAP,
-    efEPS,
-    efMAT,
-    efM2P,
-    efMTX,
-    efEDI,
-    efCUB,
-    efXPM,
-    efRND,
-    efCSV,
-    efQMI,
-    efNR
-};
-
-const char* ftp2ext(int ftp);
-/* Return extension for filetype */
-
-const char* ftp2ext_generic(int ftp);
-/* Return extension for filetype, and a generic name for generic types
-   (e.g. trx)*/
-
-const char* ftp2ext_with_dot(int ftp);
-/* Return extension for filetype with a leading dot */
-
-int ftp2generic_count(int ftp);
-/* Return the number of filetypes for a generic filetype */
-
-const int* ftp2generic_list(int ftp);
-/* Return the list of filetypes for a generic filetype */
-
-const char* ftp2desc(int ftp);
-/* Return description for file type */
-
-const char* ftp2defnm(int ftp);
-/* Return default file name for file type */
-
-const char* ftp2defopt(int ftp);
-/* Return default option name for file type */
-
-gmx_bool ftp_is_text(int ftp);
-gmx_bool ftp_is_xdr(int ftp);
-
-int fn2ftp(const char* fn);
-/* Return the filetype corrsponding to filename */
-
-#endif
diff --git a/src/include/gromacs/fileio/oenv.h b/src/include/gromacs/fileio/oenv.h
deleted file mode 100644 (file)
index 586a391..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * 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) 2012,2014,2015,2017,2019,2020, 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.
- */
-#ifndef GMX_FILEIO_OENV_H
-#define GMX_FILEIO_OENV_H
-
-#include <string>
-
-#include "gromacs/utility/basedefinitions.h"
-#include "gromacs/utility/real.h"
-
-struct gmx_output_env_t;
-
-/* output_env member functions */
-
-/* The output_env structure holds information about program name, cmd
-   line, default times, etc. along with verbosity levels for code
-   components that use this structure for regulating output.
-
-   There are still legacy functions for the program name, and the command
-   line, but the output_env versions are now preferred.*/
-
-namespace gmx
-{
-
-/*! \brief
- * Time values for TimeUnitManager and legacy oenv module.
- *
- * \inpublicapi
- */
-enum class TimeUnit : int
-{
-    Femtoseconds,
-    Picoseconds,
-    Nanoseconds,
-    Microseconds,
-    Milliseconds,
-    Seconds,
-    Count,
-    Default = Picoseconds
-};
-
-} // namespace gmx
-
-//! The xvg output format
-enum class XvgFormat : int
-{
-    // Select,
-    Xmgrace,
-    Xmgr,
-    None,
-    Count
-};
-
-void output_env_init_default(gmx_output_env_t** oenvp);
-/* initialize an output_env structure, with reasonable default settings.
-    (the time unit is set to time_ps, which means no conversion).  */
-
-void output_env_done(gmx_output_env_t* oenv);
-/* free memory allocated for an output_env structure. */
-
-
-int output_env_get_verbosity(const gmx_output_env_t* oenv);
-/* return the verbosity */
-
-int output_env_get_trajectory_io_verbosity(const gmx_output_env_t* oenv);
-/* return the verbosity for trajectory IO handling */
-
-std::string output_env_get_time_unit(const gmx_output_env_t* oenv);
-/* return time unit (e.g. ps or ns) */
-
-std::string output_env_get_time_label(const gmx_output_env_t* oenv);
-/* return time unit label (e.g. "Time (ps)") */
-
-std::string output_env_get_xvgr_tlabel(const gmx_output_env_t* oenv);
-/* return x-axis time label for xmgr */
-
-real output_env_get_time_factor(const gmx_output_env_t* oenv);
-/* return time conversion factor from ps (i.e. 1e-3 for ps->ns) */
-
-real output_env_get_time_invfactor(const gmx_output_env_t* oenv);
-/* return inverse time conversion factor to ps (i.e. 1e3 for ns->ps) */
-
-real output_env_conv_time(const gmx_output_env_t* oenv, real time);
-/* return converted time */
-
-void output_env_conv_times(const gmx_output_env_t* oenv, int n, real* time);
-/* convert array of times */
-
-gmx_bool output_env_get_view(const gmx_output_env_t* oenv);
-/* Return TRUE when user requested viewing of the file */
-
-XvgFormat output_env_get_xvg_format(const gmx_output_env_t* oenv);
-/* Returns enum (see above) for xvg output formatting */
-
-/*! \brief
- * Returns display name for the currently running program.
- */
-const char* output_env_get_program_display_name(const gmx_output_env_t* oenv);
-
-namespace gmx
-{
-class IProgramContext;
-} // namespace gmx
-
-void output_env_init(gmx_output_env_t**          oenvp,
-                     const gmx::IProgramContext& context,
-                     gmx::TimeUnit               tmu,
-                     gmx_bool                    view,
-                     XvgFormat                   xvgFormat,
-                     int                         verbosity);
-/* initialize an output_env structure, setting the command line,
-   the default time value a gmx_boolean view that is set to TRUE when the
-   user requests direct viewing of graphs,
-   the graph formatting type, the verbosity, and debug level */
-
-/*! \brief
- * Returns gmx::IProgramContext from an output_env structure.
- */
-const gmx::IProgramContext& output_env_get_program_context(const gmx_output_env_t* oenv);
-
-#endif
diff --git a/src/include/gromacs/fileio/pdbio.h b/src/include/gromacs/fileio/pdbio.h
deleted file mode 100644 (file)
index 87da7ea..0000000
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * 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,2015,2016,2017 by the GROMACS development team.
- * Copyright (c) 2018,2019,2020,2021, 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.
- */
-
-#ifndef GMX_FILEIO_PDBIO_H
-#define GMX_FILEIO_PDBIO_H
-
-#include <stdio.h>
-
-#include "gromacs/math/vectypes.h"
-#include "gromacs/topology/atoms.h"
-#include "gromacs/utility/basedefinitions.h"
-#include "gromacs/utility/real.h"
-
-class AtomProperties;
-struct t_atoms;
-struct t_symtab;
-struct t_topology;
-enum class PbcType : int;
-enum class PdbRecordType : int;
-
-typedef struct gmx_conect_t* gmx_conect;
-
-/* Write a PDB line with an ATOM or HETATM record directly to a file pointer.
- *
- * Returns the number of characters printed.
- */
-int gmx_fprintf_pdb_atomline(FILE*         fp,
-                             PdbRecordType record,
-                             int           atom_seq_number,
-                             const char*   atom_name,
-                             char          alternate_location,
-                             const char*   res_name,
-                             char          chain_id,
-                             int           res_seq_number,
-                             char          res_insertion_code,
-                             real          x,
-                             real          y,
-                             real          z,
-                             real          occupancy,
-                             real          b_factor,
-                             const char*   element);
-
-/* Enumerated value for indexing an uij entry (anisotropic temperature factors) */
-enum
-{
-    U11,
-    U22,
-    U33,
-    U12,
-    U13,
-    U23
-};
-
-void pdb_use_ter(gmx_bool bSet);
-/* set read_pdbatoms to read upto 'TER' or 'ENDMDL' (default, bSet=FALSE).
-   This function is fundamentally broken as far as thread-safety is concerned.*/
-
-void gmx_write_pdb_box(FILE* out, PbcType pbcType, const matrix box);
-/* write the box in the CRYST1 record,
- * with pbcType=PbcType::Unset the pbc is guessed from the box
- * This function is fundamentally broken as far as thread-safety is concerned.
- */
-
-void write_pdbfile_indexed(FILE*          out,
-                           const char*    title,
-                           const t_atoms* atoms,
-                           const rvec     x[],
-                           PbcType        pbcType,
-                           const matrix   box,
-                           char           chain,
-                           int            model_nr,
-                           int            nindex,
-                           const int      index[],
-                           gmx_conect     conect,
-                           bool           usePqrFormat,
-                           bool           standardCompliantMode = false);
-/* REALLY low level */
-
-void write_pdbfile(FILE*          out,
-                   const char*    title,
-                   const t_atoms* atoms,
-                   const rvec     x[],
-                   PbcType        pbcType,
-                   const matrix   box,
-                   char           chain,
-                   int            model_nr,
-                   gmx_conect     conect);
-/* Low level pdb file writing routine.
- *
- *          ONLY FOR SPECIAL PURPOSES,
- *
- *       USE write_sto_conf WHEN YOU CAN.
- *
- * override chain-identifiers with chain when chain>0
- * write ENDMDL when bEndmodel is TRUE.
- *
- * If the gmx_conect structure is not NULL its content is dumped as CONECT records
- * which may be useful for visualization purposes.
- */
-
-void get_pdb_atomnumber(const t_atoms* atoms, AtomProperties* aps);
-/* Routine to extract atomic numbers from the atom names */
-
-int read_pdbfile(FILE*            in,
-                 char*            title,
-                 int*             model_nr,
-                 struct t_atoms*  atoms,
-                 struct t_symtab* symtab,
-                 rvec             x[],
-                 PbcType*         pbcType,
-                 matrix           box,
-                 gmx_conect       conect);
-/* Function returns number of atoms found.
- * pbcType and gmx_conect structure may be NULL.
- */
-
-void gmx_pdb_read_conf(const char* infile,
-                       t_symtab*   symtab,
-                       char**      name,
-                       t_atoms*    atoms,
-                       rvec        x[],
-                       PbcType*    pbcType,
-                       matrix      box);
-/* Read a pdb file and extract ATOM and HETATM fields.
- * Read a box from the CRYST1 line, return 0 box when no CRYST1 is found.
- * pbcType may be NULL.
- *
- * If name is not nullptr, gmx_strdup the title string into it. */
-
-void get_pdb_coordnum(FILE* in, int* natoms);
-/* Read a pdb file and count the ATOM and HETATM fields. */
-
-gmx_bool is_hydrogen(const char* nm);
-/* Return whether atom nm is a hydrogen */
-
-gmx_bool is_dummymass(const char* nm);
-/* Return whether atom nm is a dummy mass */
-
-/* Routines to handle CONECT records if they have been read in */
-void gmx_conect_dump(FILE* fp, gmx_conect conect);
-
-gmx_bool gmx_conect_exist(gmx_conect conect, int ai, int aj);
-/* Return TRUE if there is a conection between the atoms */
-
-void gmx_conect_add(gmx_conect conect, int ai, int aj);
-/* Add a connection between ai and aj (numbered from 0 to natom-1) */
-
-gmx_conect gmx_conect_generate(const t_topology* top);
-/* Generate a conect structure from a topology */
-
-gmx_conect gmx_conect_init();
-/* Initiate data structure */
-
-void gmx_conect_done(gmx_conect gc);
-/* Free memory */
-
-#endif /* GMX_FILEIO_PDBIO_H */
diff --git a/src/include/gromacs/fileio/tpxio.h b/src/include/gromacs/fileio/tpxio.h
deleted file mode 100644 (file)
index d58aaef..0000000
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- * 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,2015,2016,2017 by the GROMACS development team.
- * Copyright (c) 2018,2019,2020,2021, 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.
- */
-#ifndef GMX_FILEIO_TPXIO_H
-#define GMX_FILEIO_TPXIO_H
-
-#include <cstdio>
-
-#include <vector>
-
-#include "gromacs/math/vectypes.h"
-#include "gromacs/pbcutil/pbc.h"
-#include "gromacs/utility/basedefinitions.h"
-#include "gromacs/utility/real.h"
-
-struct gmx_mtop_t;
-struct t_atoms;
-struct t_block;
-struct t_inputrec;
-class t_state;
-struct t_topology;
-
-namespace gmx
-{
-template<typename>
-class ArrayRef;
-}
-/*! \libinternal
- * \brief
- * First part of the TPR file structure containing information about
- * the general aspect of the system.
- *
- * When adding to or making breaking changes to reading this struct,
- * update TpxGeneration.
- */
-struct TpxFileHeader
-{
-    //! Non zero if input_rec is present.
-    bool bIr = false;
-    //! Non zero if a box is present.
-    bool bBox = false;
-    //! Non zero if a topology is present.
-    bool bTop = false;
-    //! Non zero if coordinates are present.
-    bool bX = false;
-    //! Non zero if velocities are present.
-    bool bV = false;
-    //! Non zero if forces are present (no longer supported, but retained so old .tpr can be read)
-    bool bF = false;
-    //! The total number of atoms.
-    int natoms = 0;
-    //! The number of temperature coupling groups.
-    int ngtc = 0;
-    //! Current value of lambda.
-    real lambda = 0;
-    //! Current value of the alchemical state - not yet printed out.
-    int fep_state = 0;
-    /*a better decision will eventually (5.0 or later) need to be made
-       on how to treat the alchemical state of the system, which can now
-       vary through a simulation, and cannot be completely described
-       though a single lambda variable, or even a single state
-       index. Eventually, should probably be a vector. MRS*/
-    //! Size of the TPR body in chars (equal to number of bytes) during I/O.
-    int64_t sizeOfTprBody = 0;
-    //! File version.
-    int fileVersion = 0;
-    //! File generation.
-    int fileGeneration = 0;
-    //! If the tpr file was written in double precision.
-    bool isDouble = false;
-};
-
-/*! \brief
- * Contains the partly deserialized contents of a TPR file.
- *
- * Convenience struct that holds a fully deserialized TPR file header,
- * and the body of the TPR file as char buffer that can be deserialized
- * independently from the header.
- */
-struct PartialDeserializedTprFile
-{
-    //! The file header.
-    TpxFileHeader header;
-    //! The file body.
-    std::vector<char> body;
-    //! Flag for PBC needed by legacy implementation.
-    PbcType pbcType = PbcType::Unset;
-};
-
-/*
- * These routines handle reading and writing of preprocessed
- * topology files in any of the following formats:
- * TPR : topology in XDR format, portable across platforms
- *
- * Files are written in the precision with which the source are compiled,
- * but double and single precision can be read by either.
- */
-
-/*! \brief
- * Read the header from a tpx file and then close it again.
- *
- * By setting \p canReadTopologyOnly to true, it is possible to read future
- * versions too (we skip the changed inputrec), provided we havent
- * changed the topology description. If it is possible to read
- * the inputrec it will still be done even if canReadTopologyOnly is true.
- *
- * \param[in] fileName The name of the input file.
- * \param[in] canReadTopologyOnly If reading the inputrec can be skipped or not.
- * \returns An initialized and populated TPX File header object.
- */
-TpxFileHeader readTpxHeader(const char* fileName, bool canReadTopologyOnly);
-
-void write_tpx_state(const char* fn, const t_inputrec* ir, const t_state* state, const gmx_mtop_t& mtop);
-/* Write a file, and close it again.
- */
-
-/*! \brief
- * Complete deserialization of TPR file into the individual data structures.
- *
- * If \p state is nullptr, only populates ir and mtop.
- *
- * \param[in] partialDeserializedTpr Struct with header and char buffer needed to populate system.
- * \param[out] ir Input rec to populate.
- * \param[out] state System state variables to populate.
- * \param[out] x Separate vector for coordinates, deprecated.
- * \param[out] v Separate vector for velocities, deprecated.
- * \param[out] mtop Global topology to populate.
- *
- * \returns PBC flag.
- */
-PbcType completeTprDeserialization(PartialDeserializedTprFile* partialDeserializedTpr,
-                                   t_inputrec*                 ir,
-                                   t_state*                    state,
-                                   rvec*                       x,
-                                   rvec*                       v,
-                                   gmx_mtop_t*                 mtop);
-
-//! Overload for final TPR deserialization when not using state vectors.
-PbcType completeTprDeserialization(PartialDeserializedTprFile* partialDeserializedTpr,
-                                   t_inputrec*                 ir,
-                                   gmx_mtop_t*                 mtop);
-
-/*! \brief
- * Read a file to set up a simulation and close it after reading.
- *
- * Main function used to initialize simulations. Reads the input \p fn
- * to populate the \p state, \p ir and \p mtop needed to run a simulations.
- *
- * This function returns the partial deserialized TPR file
- * that can then be communicated to set up non-master nodes to run simulations.
- *
- * \param[in] fn Input file name.
- * \param[out] ir Input parameters to be set, or nullptr.
- * \param[out] state State variables for the simulation.
- * \param[out] mtop Global simulation topolgy.
- * \returns Struct with header and body in char vector.
- */
-PartialDeserializedTprFile read_tpx_state(const char* fn, t_inputrec* ir, t_state* state, gmx_mtop_t* mtop);
-
-/*! \brief
- * Read a file and close it again.
- *
- * Reads a topology input file and populates the fields if the passed
- * variables are valid. It is possible to pass \p ir, \p natoms,
- * \p x, \p v or \p mtop as nullptr to the function. In those cases,
- * the variables will not be populated from the input file. Passing both
- * \p x and \p v as nullptr is not supported. If both \p natoms and
- * \p mtop are passed as valid objects to the function, the total atom
- * number from \p mtop will be set in \p natoms. Otherwise \p natoms
- * will not be changed. If \p box is valid, the box will be set from
- * the information read in from the file.
- *
- * \param[in] fn Input file name.
- * \param[out] ir Input parameters to be set, or nullptr.
- * \param[out] box Box matrix.
- * \param[out] natoms Total atom numbers to be set, or nullptr.
- * \param[out] x Positions to be filled from file, or nullptr.
- * \param[out] v Velocities to be filled from file, or nullptr.
- * \param[out] mtop Topology to be populated, or nullptr.
- * \returns ir->pbcType if it was read from the file.
- */
-PbcType read_tpx(const char* fn, t_inputrec* ir, matrix box, int* natoms, rvec* x, rvec* v, gmx_mtop_t* mtop);
-
-PbcType read_tpx_top(const char* fn, t_inputrec* ir, matrix box, int* natoms, rvec* x, rvec* v, t_topology* top);
-/* As read_tpx, but for the old t_topology struct */
-
-gmx_bool fn2bTPX(const char* file);
-/* return if *file is one of the TPX file types */
-
-void pr_tpxheader(FILE* fp, int indent, const char* title, const TpxFileHeader* sh);
-
-#endif
diff --git a/src/include/gromacs/fileio/trxio.h b/src/include/gromacs/fileio/trxio.h
deleted file mode 100644 (file)
index b3022c3..0000000
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- * 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,2015,2016,2017 by the GROMACS development team.
- * Copyright (c) 2018,2019,2020,2021, 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.
- */
-
-#ifndef GMX_FILEIO_TRXIO_H
-#define GMX_FILEIO_TRXIO_H
-
-#include "gromacs/fileio/pdbio.h"
-
-struct gmx_mtop_t;
-struct gmx_output_env_t;
-struct t_atoms;
-struct t_fileio;
-struct t_topology;
-struct t_trxframe;
-
-namespace gmx
-{
-template<typename>
-class ArrayRef;
-}
-/* a dedicated status type contains fp, etc. */
-typedef struct t_trxstatus t_trxstatus;
-
-/* I/O function types */
-
-/************************************************
- *             Trajectory functions
- ************************************************/
-
-int prec2ndec(real prec);
-/* Convert precision in 1/(nm) to number of decimal places */
-
-/*! \brief Convert number of decimal places to trajectory precision in
- * 1/(nm) */
-real ndec2prec(int ndec);
-
-void clear_trxframe(struct t_trxframe* fr, gmx_bool bFirst);
-/* Set all content gmx_booleans to FALSE.
- * When bFirst = TRUE, set natoms=-1, all pointers to NULL
- *                     and all data to zero.
- */
-
-void setTrxFramePbcType(struct t_trxframe* fr, PbcType pbcType);
-/* Set the type of periodic boundary conditions, pbcType=PbcType::Unset is not set */
-
-int nframes_read(t_trxstatus* status);
-/* Returns the number of frames read from the trajectory */
-
-int write_trxframe_indexed(t_trxstatus* status, const t_trxframe* fr, int nind, const int* ind, gmx_conect gc);
-/* Write an indexed frame to a TRX file, see write_trxframe. gc may be NULL */
-
-int write_trxframe(t_trxstatus* status, struct t_trxframe* fr, gmx_conect gc);
-/* Write a frame to a TRX file.
- * Only entries for which the gmx_boolean is TRUE will be written,
- * except for step, time, lambda and/or box, which may not be
- * omitted for certain trajectory formats.
- * The precision for .xtc and .gro is fr->prec, when fr->bPrec=FALSE,
- * the precision is set to 1000.
- * gc is important for pdb file writing only and may be NULL.
- */
-
-int write_trx(t_trxstatus*   status,
-              int            nind,
-              const int*     ind,
-              const t_atoms* atoms,
-              int            step,
-              real           time,
-              matrix         box,
-              rvec           x[],
-              rvec*          v,
-              gmx_conect     gc);
-/* Write an indexed frame to a TRX file.
- * v can be NULL.
- * atoms can be NULL for file types which don't need atom names.
- */
-
-/*! \brief
- * Set up TNG writing to \p out.
- *
- * Sets up \p out for writing TNG. If \p in != NULL and contains a TNG trajectory
- * some data, e.g. molecule system, will be copied over from \p in to the return value.
- * If \p in == NULL a file name (infile) of a TNG file can be provided instead
- * and used for copying data to the return value.
- * If there is no TNG input \p natoms is used to create "implicit atoms" (no atom
- * or molecular data present). If \p natoms == -1 the number of atoms are
- * not known (or there is already a TNG molecule system to copy, in which case
- * natoms is not required anyhow). If an group of indexed atoms are written
- * \p natoms must be the length of \p index. \p index_group_name is the name of the
- * index group.
- *
- * \param[in] filename Name of new TNG file.
- * \param[in] filemode How to open the output file.
- * \param[in] in Input file pointer or null.
- * \param[in] infile Input file name or null.
- * \param[in] natoms Number of atoms to write.
- * \param[in] mtop Pointer to system topology or null.
- * \param[in] index Array of atom indices.
- * \param[in] index_group_name Name of the group of atom indices.
- * \returns Pointer to output TNG file.
- */
-t_trxstatus* trjtools_gmx_prepare_tng_writing(const char*              filename,
-                                              char                     filemode,
-                                              t_trxstatus*             in,
-                                              const char*              infile,
-                                              int                      natoms,
-                                              const gmx_mtop_t*        mtop,
-                                              gmx::ArrayRef<const int> index,
-                                              const char*              index_group_name);
-
-/*! \brief Write a trxframe to the TNG file in status.
- *
- * This function is needed because both t_trxstatus and
- * gmx_tng_trajectory_t are encapsulated, so client trajectory-writing
- * code with a t_trxstatus can't just call the TNG writing
- * function. */
-void write_tng_frame(t_trxstatus* status, struct t_trxframe* fr);
-
-void close_trx(t_trxstatus* status);
-/* Close trajectory file as opened with read_first_x, read_first_frame
- * or open_trx.
- * Also frees memory in the structure.
- */
-
-/*! \brief Deallocates an t_trxframe and its contents
- *
- * Old code using read_first_x() does not clean up all its memory when
- * using close_trx(), but new code using read_first_frame() needs
- * close_trx() to keep its current form. When using read_first_x(),
- * this function should be called before close_trx() in order to clean
- * up the t_trxframe inside the t_trxstatus before close_trx() can clean
- * up the rest.
- *
- * As read_first_x() is deprecated, this function should not be called
- * in new code. Use read_first_frame() and close_trx() instead. */
-void done_trx_xframe(t_trxstatus* status);
-
-t_trxstatus* open_trx(const char* outfile, const char* filemode);
-/* Open a TRX file and return an allocated status pointer */
-
-struct t_fileio* trx_get_fileio(t_trxstatus* status);
-/* get a fileio from a trxstatus */
-
-float trx_get_time_of_final_frame(t_trxstatus* status);
-/* get time of final frame. Only supported for TNG and XTC */
-
-gmx_bool bRmod_fd(double a, double b, double c, gmx_bool bDouble);
-/* Returns TRUE when (a - b) MOD c = 0, using a margin which is slightly
- * larger than the float/double precision.
- */
-
-#if GMX_DOUBLE
-#    define bRmod(a, b, c) bRmod_fd(a, b, c, TRUE)
-#else
-#    define bRmod(a, b, c) bRmod_fd(a, b, c, FALSE)
-#endif
-
-int check_times2(real t, real t0, gmx_bool bDouble);
-/* This routine checkes if the read-in time is correct or not;
- * returns -1 if t<tbegin or t MOD dt = t0,
- *          0 if tbegin <= t <=tend+margin,
- *          1 if t>tend
- * where margin is 0.1*min(t-tp,tp-tpp), if this positive, 0 otherwise.
- * tp and tpp should be the time of the previous frame and the one before.
- * The mod is done with single or double precision accuracy depending
- * on the value of bDouble.
- */
-
-int check_times(real t);
-/* This routine checkes if the read-in time is correct or not;
- * returns -1 if t<tbegin,
- *          0 if tbegin <= t <=tend,
- *          1 if t>tend
- */
-
-
-/* For trxframe.flags, used in trxframe read routines.
- * When a READ flag is set, the field will be read when present,
- * but a frame might be returned which does not contain the field.
- * When a NEED flag is set, frames not containing the field will be skipped.
- */
-#define TRX_READ_X (1u << 0u)
-#define TRX_NEED_X (1u << 1u)
-#define TRX_READ_V (1u << 2u)
-#define TRX_NEED_V (1u << 3u)
-#define TRX_READ_F (1u << 4u)
-#define TRX_NEED_F (1u << 5u)
-/* Useful for reading natoms from a trajectory without skipping */
-#define TRX_DONT_SKIP (1u << 6u)
-
-/* For trxframe.not_ok */
-#define HEADER_NOT_OK (1u << 0u)
-#define DATA_NOT_OK (1u << 1u)
-#define FRAME_NOT_OK (HEADER_NOT_OK | DATA_NOT_OK)
-
-bool read_first_frame(const gmx_output_env_t* oenv,
-                      t_trxstatus**           status,
-                      const char*             fn,
-                      struct t_trxframe*      fr,
-                      int                     flags);
-/* Read the first frame which is in accordance with flags, which are
- * defined further up in this file.
- * Memory will be allocated for flagged entries.
- * The flags are copied to fr for subsequent calls to read_next_frame.
- * Returns true when succeeded, false otherwise.
- */
-
-bool read_next_frame(const gmx_output_env_t* oenv, t_trxstatus* status, struct t_trxframe* fr);
-/* Reads the next frame which is in accordance with fr->flags.
- * Returns true when succeeded, false otherwise.
- */
-
-int read_first_x(const gmx_output_env_t* oenv, t_trxstatus** status, const char* fn, real* t, rvec** x, matrix box);
-/* These routines read first coordinates and box, and allocates
- * memory for the coordinates, for a trajectory file.
- * The routine returns the number of atoms, or 0 when something is wrong.
- * The integer in status should be passed to calls of read_next_x
- *
- * DEPRECATED: Use read_first_frame and read_next_frame instead
- */
-
-gmx_bool read_next_x(const gmx_output_env_t* oenv, t_trxstatus* status, real* t, rvec x[], matrix box);
-/* Read coordinates and box from a trajectory file. Return TRUE when all well,
- * or FALSE when end of file (or last frame requested by user).
- * status is the integer set in read_first_x.
- *
- * DEPRECATED: Use read_first_frame and read_next_frame instead
- */
-
-void rewind_trj(t_trxstatus* status);
-/* Rewind trajectory file as opened with read_first_x */
-
-struct t_topology* read_top(const char* fn, PbcType* pbcType);
-/* Extract a topology data structure from a topology file.
- * If pbcType!=NULL *pbcType gives the pbc type.
- */
-
-#endif
diff --git a/src/include/gromacs/math/do_fit.h b/src/include/gromacs/math/do_fit.h
deleted file mode 100644 (file)
index 17551d8..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * 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) 2010,2014,2015,2016,2018 by the GROMACS development team.
- * Copyright (c) 2019,2020, 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.
- */
-#ifndef GMX_MATH_DO_FIT_H
-#define GMX_MATH_DO_FIT_H
-
-#include "gromacs/math/vectypes.h"
-#include "gromacs/utility/basedefinitions.h"
-#include "gromacs/utility/real.h"
-
-real calc_similar_ind(gmx_bool bRho, int nind, const int* index, const real mass[], rvec x[], rvec xp[]);
-/* Returns RMSD or Rho (depending on bRho) over all atoms in index */
-
-real rmsdev_ind(int nind, int index[], real mass[], rvec x[], rvec xp[]);
-/* Returns the RMS Deviation betweem x and xp over all atoms in index */
-
-real rmsdev(int natoms, real mass[], rvec x[], rvec xp[]);
-/* Returns the RMS Deviation betweem x and xp over all atoms */
-
-real rhodev_ind(int nind, int index[], real mass[], rvec x[], rvec xp[]);
-/* Returns size-independent Rho similarity parameter over all atoms in index
- * Maiorov & Crippen, PROTEINS 22, 273 (1995).
- */
-
-real rhodev(int natoms, real mass[], rvec x[], rvec xp[]);
-/* Returns size-independent Rho similarity parameter over all atoms
- * Maiorov & Crippen, PROTEINS 22, 273 (1995).
- */
-
-void calc_fit_R(int ndim, int natoms, const real* w_rls, const rvec* xp, rvec* x, matrix R);
-/* Calculates the rotation matrix R for which
- * sum_i w_rls_i (xp_i - R x_i).(xp_i - R x_i)
- * is minimal. ndim=3 gives full fit, ndim=2 gives xy fit.
- * This matrix is also used do_fit.
- * x_rotated[i] = sum R[i][j]*x[j]
- */
-
-void do_fit_ndim(int ndim, int natoms, real* w_rls, const rvec* xp, rvec* x);
-/* Do a least squares fit of x to xp. Atoms which have zero mass
- * (w_rls[i]) are not taken into account in fitting.
- * This makes is possible to fit eg. on Calpha atoms and orient
- * all atoms. The routine only fits the rotational part,
- * therefore both xp and x should be centered round the origin.
- */
-
-void do_fit(int natoms, real* w_rls, const rvec* xp, rvec* x);
-/* Calls do_fit with ndim=3, thus fitting in 3D */
-
-void reset_x_ndim(int ndim, int ncm, const int* ind_cm, int nreset, const int* ind_reset, rvec x[], const real mass[]);
-/* Put the center of mass of atoms in the origin for dimensions 0 to ndim.
- * The center of mass is computed from the index ind_cm.
- * When ind_cm!=NULL the COM is determined using ind_cm.
- * When ind_cm==NULL the COM is determined for atoms 0 to ncm.
- * When ind_reset!=NULL the coordinates indexed by ind_reset are reset.
- * When ind_reset==NULL the coordinates up to nreset are reset.
- */
-
-void reset_x(int ncm, const int* ind_cm, int nreset, const int* ind_reset, rvec x[], const real mass[]);
-/* Calls reset_x with ndim=3, thus resetting all dimesions */
-
-#endif
diff --git a/src/include/gromacs/math/functions.h b/src/include/gromacs/math/functions.h
deleted file mode 100644 (file)
index 9130522..0000000
+++ /dev/null
@@ -1,492 +0,0 @@
-/*
- * This file is part of the GROMACS molecular simulation package.
- *
- * Copyright (c) 2015,2016,2018,2019,2020 by the GROMACS development team.
- * Copyright (c) 2021, 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.
- */
-/*! \file
- * \brief
- * Declares simple math functions
- *
- * \author Erik Lindahl <erik.lindahl@gmail.com>
- * \inpublicapi
- * \ingroup module_math
- */
-#ifndef GMX_MATH_FUNCTIONS_H
-#define GMX_MATH_FUNCTIONS_H
-
-#include <cmath>
-#include <cstdint>
-
-#include "gromacs/utility/gmxassert.h"
-#include "gromacs/utility/real.h"
-
-namespace gmx
-{
-
-/*! \brief Evaluate log2(n) for integer n statically at compile time.
- *
- * Use as staticLog2<n>::value, where n must be a positive integer.
- * Negative n will be reinterpreted as the corresponding unsigned integer,
- * and you will get a compile-time error if n==0.
- * The calculation is done by recursively dividing n by 2 (until it is 1),
- * and incrementing the result by 1 in each step.
- *
- * \tparam n Value to recursively calculate log2(n) for
- */
-template<std::uint64_t n>
-struct StaticLog2
-{
-    static const int value = StaticLog2<n / 2>::value
-                             + 1; //!< Variable value used for recursive static calculation of Log2(int)
-};
-
-/*! \brief Specialization of StaticLog2<n> for n==1.
- *
- *  This specialization provides the final value in the recursion; never
- *  call it directly, but use StaticLog2<n>::value.
- */
-template<>
-struct StaticLog2<1>
-{
-    static const int value = 0; //!< Base value for recursive static calculation of Log2(int)
-};
-
-/*! \brief Specialization of StaticLog2<n> for n==0.
- *
- *  This specialization should never actually be used since log2(0) is
- *  negative infinity. However, since Log2() is often used to calculate the number
- *  of bits needed for a number, we might be using the value 0 with a conditional
- *  statement around the logarithm. Depending on the compiler the expansion of
- *  the template can occur before the conditional statement, so to avoid infinite
- *  recursion we need a specialization for the case n==0.
- */
-template<>
-struct StaticLog2<0>
-{
-    static const int value = -1; //!< Base value for recursive static calculation of Log2(int)
-};
-
-
-/*! \brief Compute floor of logarithm to base 2, 32 bit signed argument
- *
- *  \param x 32-bit signed argument
- *
- *  \return log2(x)
- *
- *  \note This version of the overloaded function will assert that x is
- *        not negative.
- */
-unsigned int log2I(std::int32_t x);
-
-/*! \brief Compute floor of logarithm to base 2, 64 bit signed argument
- *
- *  \param x 64-bit signed argument
- *
- *  \return log2(x)
- *
- *  \note This version of the overloaded function will assert that x is
- *        not negative.
- */
-unsigned int log2I(std::int64_t x);
-
-/*! \brief Compute floor of logarithm to base 2, 32 bit unsigned argument
- *
- *  \param x 32-bit unsigned argument
- *
- *  \return log2(x)
- *
- *  \note This version of the overloaded function uses unsigned arguments to
- *        be able to handle arguments using all 32 bits.
- */
-unsigned int log2I(std::uint32_t x);
-
-/*! \brief Compute floor of logarithm to base 2, 64 bit unsigned argument
- *
- *  \param x 64-bit unsigned argument
- *
- *  \return log2(x)
- *
- *  \note This version of the overloaded function uses unsigned arguments to
- *        be able to handle arguments using all 64 bits.
- */
-unsigned int log2I(std::uint64_t x);
-
-/*! \brief Find greatest common divisor of two numbers
- *
- *  \param p First number, positive
- *  \param q Second number, positive
- *
- * \return Greatest common divisor of p and q
- */
-std::int64_t greatestCommonDivisor(std::int64_t p, std::int64_t q);
-
-
-/*! \brief Calculate 1.0/sqrt(x) in single precision
- *
- * \param  x  Positive value to calculate inverse square root for
- *
- * For now this is implemented with std::sqrt(x) since gcc seems to do a
- * decent job optimizing it. However, we might decide to use instrinsics
- * or compiler-specific functions in the future.
- *
- * \return 1.0/sqrt(x)
- */
-static inline float invsqrt(float x)
-{
-    return 1.0F / std::sqrt(x);
-}
-
-/*! \brief Calculate 1.0/sqrt(x) in double precision, but single range
- *
- * \param  x  Positive value to calculate inverse square root for, must be
- *            in the input domain valid for single precision.
- *
- * For now this is implemented with std::sqrt(x). However, we might
- * decide to use instrinsics or compiler-specific functions in the future, and
- * then we want to have the freedom to do the first step in single precision.
- *
- * \return 1.0/sqrt(x)
- */
-static inline double invsqrt(double x)
-{
-    return 1.0 / std::sqrt(x);
-}
-
-/*! \brief Calculate 1.0/sqrt(x) for integer x in double precision.
- *
- * \param  x  Positive value to calculate inverse square root for.
- *
- * \return 1.0/sqrt(x)
- */
-static inline double invsqrt(int x)
-{
-    return invsqrt(static_cast<double>(x));
-}
-
-/*! \brief Calculate inverse cube root of x in single precision
- *
- *  \param  x  Argument
- *
- *  \return x^(-1/3)
- *
- *  This routine is typically faster than using std::pow().
- */
-static inline float invcbrt(float x)
-{
-    return 1.0F / std::cbrt(x);
-}
-
-/*! \brief Calculate inverse sixth root of x in double precision
- *
- *  \param  x  Argument
- *
- *  \return x^(-1/3)
- *
- *  This routine is typically faster than using std::pow().
- */
-static inline double invcbrt(double x)
-{
-    return 1.0 / std::cbrt(x);
-}
-
-/*! \brief Calculate inverse sixth root of integer x in double precision
- *
- *  \param  x  Argument
- *
- *  \return x^(-1/3)
- *
- *  This routine is typically faster than using std::pow().
- */
-static inline double invcbrt(int x)
-{
-    return 1.0 / std::cbrt(x);
-}
-
-/*! \brief Calculate sixth root of x in single precision.
- *
- *  \param  x  Argument, must be greater than or equal to zero.
- *
- *  \return x^(1/6)
- *
- *  This routine is typically faster than using std::pow().
- */
-static inline float sixthroot(float x)
-{
-    return std::sqrt(std::cbrt(x));
-}
-
-/*! \brief Calculate sixth root of x in double precision.
- *
- *  \param  x  Argument, must be greater than or equal to zero.
- *
- *  \return x^(1/6)
- *
- *  This routine is typically faster than using std::pow().
- */
-static inline double sixthroot(double x)
-{
-    return std::sqrt(std::cbrt(x));
-}
-
-/*! \brief Calculate sixth root of integer x, return double.
- *
- *  \param  x  Argument, must be greater than or equal to zero.
- *
- *  \return x^(1/6)
- *
- *  This routine is typically faster than using std::pow().
- */
-static inline double sixthroot(int x)
-{
-    return std::sqrt(std::cbrt(x));
-}
-
-/*! \brief Calculate inverse sixth root of x in single precision
- *
- *  \param  x  Argument, must be greater than zero.
- *
- *  \return x^(-1/6)
- *
- *  This routine is typically faster than using std::pow().
- */
-static inline float invsixthroot(float x)
-{
-    return invsqrt(std::cbrt(x));
-}
-
-/*! \brief Calculate inverse sixth root of x in double precision
- *
- *  \param  x  Argument, must be greater than zero.
- *
- *  \return x^(-1/6)
- *
- *  This routine is typically faster than using std::pow().
- */
-static inline double invsixthroot(double x)
-{
-    return invsqrt(std::cbrt(x));
-}
-
-/*! \brief Calculate inverse sixth root of integer x in double precision
- *
- *  \param  x  Argument, must be greater than zero.
- *
- *  \return x^(-1/6)
- *
- *  This routine is typically faster than using std::pow().
- */
-static inline double invsixthroot(int x)
-{
-    return invsqrt(std::cbrt(x));
-}
-
-/*! \brief calculate x^2
- *
- *  \tparam T  Type of argument and return value
- *  \param  x  argument
- *
- *  \return x^2
- */
-template<typename T>
-T square(T x)
-{
-    return x * x;
-}
-
-/*! \brief calculate x^3
- *
- *  \tparam T  Type of argument and return value
- *  \param  x  argument
- *
- *  \return x^3
- */
-template<typename T>
-T power3(T x)
-{
-    return x * square(x);
-}
-
-/*! \brief calculate x^4
- *
- *  \tparam T  Type of argument and return value
- *  \param  x  argument
- *
- *  \return x^4
- */
-template<typename T>
-T power4(T x)
-{
-    return square(square(x));
-}
-
-/*! \brief calculate x^5
- *
- *  \tparam T  Type of argument and return value
- *  \param  x  argument
- *
- *  \return x^5
- */
-template<typename T>
-T power5(T x)
-{
-    return x * power4(x);
-}
-
-/*! \brief calculate x^6
- *
- *  \tparam T  Type of argument and return value
- *  \param  x  argument
- *
- *  \return x^6
- */
-template<typename T>
-T power6(T x)
-{
-    return square(power3(x));
-}
-
-/*! \brief calculate x^12
- *
- *  \tparam T  Type of argument and return value
- *  \param  x  argument
- *
- *  \return x^12
- */
-template<typename T>
-T power12(T x)
-{
-    return square(power6(x));
-}
-
-/*! \brief Maclaurin series for sinh(x)/x.
- *
- * Used for NH chains and MTTK pressure control.
- * Here, we compute it to 10th order, which might be an overkill.
- * 8th is probably enough, but it's not very much more expensive.
- */
-static inline real series_sinhx(real x)
-{
-    real x2 = x * x;
-    return (1
-            + (x2 / 6.0_real)
-                      * (1
-                         + (x2 / 20.0_real)
-                                   * (1 + (x2 / 42.0_real) * (1 + (x2 / 72.0_real) * (1 + (x2 / 110.0_real))))));
-}
-
-/*! \brief Inverse error function, double precision.
- *
- *  \param x Argument, should be in the range -1.0 < x < 1.0
- *
- *  \return The inverse of the error function if the argument is inside the
- *          range, +/- infinity if it is exactly 1.0 or -1.0, and NaN otherwise.
- */
-double erfinv(double x);
-
-/*! \brief Inverse error function, single precision.
- *
- *  \param x Argument, should be in the range -1.0 < x < 1.0
- *
- *  \return The inverse of the error function if the argument is inside the
- *          range, +/- infinity if it is exactly 1.0 or -1.0, and NaN otherwise.
- */
-float erfinv(float x);
-
-/*! \brief Exact integer division, 32bit.
- *
- * \param a dividend. Function asserts that it is a multiple of divisor
- * \param b divisor
- *
- * \return quotient of division
- */
-constexpr int32_t exactDiv(int32_t a, int32_t b)
-{
-    return GMX_ASSERT(a % b == 0, "exactDiv called with non-divisible arguments"), a / b;
-}
-
-//! Exact integer division, 64bit.
-constexpr int64_t exactDiv(int64_t a, int64_t b)
-{
-    return GMX_ASSERT(a % b == 0, "exactDiv called with non-divisible arguments"), a / b;
-}
-
-/*! \brief Round float to int
- *
- * Rounding behavior is round to nearest. Rounding of halfway cases is implementation defined
- * (either halfway to even or halfway away from zero).
- */
-/* Implementation details: It is assumed that FE_TONEAREST is default and not changed by anyone.
- * Currently the implementation is using rint(f) because 1) on all known HW that is faster than
- * lround and 2) some compilers (e.g. clang (#22944) and icc) don't optimize (l)lrint(f) well.
- * GCC(>=4.7) optimizes (l)lrint(f) well but with "-fno-math-errno -funsafe-math-optimizations"
- * rint(f) is optimized as well. This avoids using intrinsics.
- * rint(f) followed by float/double to int/int64 conversion produces the same result as directly
- * rounding to int/int64.
- */
-static inline int roundToInt(float x)
-{
-    return static_cast<int>(rintf(x));
-}
-//! Round double to int
-static inline int roundToInt(double x)
-{
-    return static_cast<int>(rint(x));
-}
-//! Round float to int64_t
-static inline int64_t roundToInt64(float x)
-{
-    return static_cast<int>(rintf(x));
-}
-//! Round double to int64_t
-static inline int64_t roundToInt64(double x)
-{
-    return static_cast<int>(rint(x));
-}
-
-//! \brief Check whether \p v is an integer power of 2.
-template<typename T, typename = std::enable_if_t<std::is_integral<T>::value>>
-#if defined(__NVCC__) && !defined(__CUDACC_RELAXED_CONSTEXPR__)
-/* In CUDA 11, a constexpr function cannot be called from a function with incompatible execution
- * space, unless --expt-relaxed-constexpr flag is set */
-__host__ __device__
-#endif
-        static inline constexpr bool
-        isPowerOfTwo(const T v)
-{
-    return (v > 0) && ((v & (v - 1)) == 0);
-}
-
-} // namespace gmx
-
-
-#endif // GMX_MATH_FUNCTIONS_H
diff --git a/src/include/gromacs/math/units.h b/src/include/gromacs/math/units.h
deleted file mode 100644 (file)
index c0cde6f..0000000
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * 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) 2012,2014,2015,2018,2019, The GROMACS development team.
- * Copyright (c) 2020,2021, 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.
- */
-#ifndef GMX_MATH_UNITS_H
-#define GMX_MATH_UNITS_H
-
-#include <cmath>
-
-/*
- * Physical constants to be used in Gromacs.
- * No constants (apart from 0, 1 or 2) should
- * be anywhere else in the code.
- */
-
-#ifndef M_PI
-#    define M_PI 3.14159265358979323846
-#endif
-
-#ifndef M_PI_2
-#    define M_PI_2 1.57079632679489661923
-#endif
-
-#ifndef M_2PI
-#    define M_2PI 6.28318530717958647692
-#endif
-
-#ifndef M_SQRT2
-#    define M_SQRT2 sqrt(2.0)
-#endif
-
-#ifndef M_1_PI
-#    define M_1_PI 0.31830988618379067154
-#endif
-
-#ifndef M_FLOAT_1_SQRTPI /* used in GPU kernels */
-/* 1.0 / sqrt(M_PI) */
-#    define M_FLOAT_1_SQRTPI 0.564189583547756f
-#endif
-
-#ifndef M_1_SQRTPI
-/* 1.0 / sqrt(M_PI) */
-#    define M_1_SQRTPI 0.564189583547756
-#endif
-
-#ifndef M_2_SQRTPI
-/* 2.0 / sqrt(M_PI) */
-#    define M_2_SQRTPI 1.128379167095513
-#endif
-
-namespace gmx
-{
-
-constexpr double c_angstrom       = 1e-10;
-constexpr double c_kilo           = 1e3;
-constexpr double c_nano           = 1e-9;
-constexpr double c_pico           = 1e-12;
-constexpr double c_nm2A           = c_nano / c_angstrom;
-constexpr double c_cal2Joule      = 4.184;           /* Exact definition of the calorie */
-constexpr double c_electronCharge = 1.602176634e-19; /* Exact definition, Coulomb NIST 2018 CODATA */
-
-constexpr double c_amu       = 1.66053906660e-27; /* kg, NIST 2018 CODATA  */
-constexpr double c_boltzmann = 1.380649e-23;      /* (J/K, Exact definition, NIST 2018 CODATA */
-constexpr double c_avogadro  = 6.02214076e23;     /* 1/mol, Exact definition, NIST 2018 CODATA */
-constexpr double c_universalGasConstant = c_boltzmann * c_avogadro;        /* (J/(mol K))  */
-constexpr double c_boltz                = c_universalGasConstant / c_kilo; /* (kJ/(mol K)) */
-constexpr double c_faraday              = c_electronCharge * c_avogadro;   /* (C/mol)      */
-constexpr double c_planck1 = 6.62607015e-34; /* J/Hz, Exact definition, NIST 2018 CODATA */
-constexpr double c_planck  = (c_planck1 * c_avogadro / (c_pico * c_kilo)); /* (kJ/mol) ps */
-
-constexpr double c_epsilon0Si = 8.8541878128e-12; /* F/m,  NIST 2018 CODATA */
-/* Epsilon in our MD units: (e^2 / Na (kJ nm)) == (e^2 mol/(kJ nm)) */
-constexpr double c_epsilon0 =
-        ((c_epsilon0Si * c_nano * c_kilo) / (c_electronCharge * c_electronCharge * c_avogadro));
-
-constexpr double c_speedOfLight =
-        2.99792458e05; /* units of nm/ps, Exact definition, NIST 2018 CODATA */
-
-constexpr double c_rydberg = 1.0973731568160e-02; /* nm^-1, NIST 2018 CODATA */
-
-constexpr double c_one4PiEps0 = (1.0 / (4.0 * M_PI * c_epsilon0));
-
-/* Pressure in MD units is:
- * 1 bar = 1e5 Pa = 1e5 kg m^-1 s^-2 = 1e-28 kg nm^-1 ps^-2 = 1e-28 / amu amu nm^1 ps ^2
- */
-constexpr double c_barMdunits = (1e5 * c_nano * c_pico * c_pico / c_amu);
-constexpr double c_presfac    = 1.0 / c_barMdunits;
-
-/* c_debye2Enm should be (1e-21*c_pico)/(c_speedOfLight*c_electronCharge*c_nano*c_nano),
- * but we need to factor out some of the exponents to avoid single-precision overflows.
- */
-constexpr double c_debye2Enm = (1e-15 / (c_speedOfLight * c_electronCharge));
-constexpr double c_enm2Debye = 1.0 / c_debye2Enm;
-
-/* to convert from a acceleration in (e V)/(amu nm) */
-/* c_fieldfac is also Faraday's constant and c_electronCharge/(1e6 amu) */
-constexpr double c_fieldfac = c_faraday / c_kilo;
-
-/* to convert AU to MD units: */
-constexpr double c_hartree2Kj     = ((2.0 * c_rydberg * c_planck * c_speedOfLight) / c_avogadro);
-constexpr double c_bohr2Nm        = 0.0529177210903; /* nm^-1, NIST 2018 CODATA */
-constexpr double c_hartreeBohr2Md = (c_hartree2Kj * c_avogadro / c_bohr2Nm);
-
-constexpr double c_rad2Deg = 180.0 / M_PI;
-constexpr double c_deg2Rad = M_PI / 180.0;
-} // namespace gmx
-
-/* The four basic units */
-#define unit_length "nm"
-#define unit_time "ps"
-#define unit_mass "u"
-#define unit_energy "kJ/mol"
-
-/* Temperature unit, T in this unit times c_boltz give energy in unit_energy */
-#define unit_temp_K "K"
-
-/* Charge unit, electron charge, involves c_one4PiEps0 */
-#define unit_charge_e "e"
-
-/* Pressure unit, pressure in basic units times c_presfac gives this unit */
-#define unit_pres_bar "bar"
-
-/* Dipole unit, debye, conversion from the unit_charge_e involves c_enm2Debye */
-#define unit_dipole_D "D"
-
-/* Derived units from basic units only */
-#define unit_vel unit_length "/" unit_time
-#define unit_volume unit_length "^3"
-#define unit_invtime "1/" unit_time
-
-/* Other derived units */
-#define unit_surft_bar unit_pres_bar " " unit_length
-
-/* SI units, conversion from basic units involves c_nano, c_pico and amu */
-#define unit_length_SI "m"
-#define unit_time_SI "s"
-#define unit_mass_SI "kg"
-
-#define unit_density_SI unit_mass_SI "/" unit_length_SI "^3"
-#define unit_invvisc_SI unit_length_SI " " unit_time_SI "/" unit_mass_SI
-
-#endif
diff --git a/src/include/gromacs/math/utilities.h b/src/include/gromacs/math/utilities.h
deleted file mode 100644 (file)
index a4c40e9..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * 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,2015,2016,2017 by the GROMACS development team.
- * Copyright (c) 2018,2019,2020,2021, 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.
- */
-#ifndef GMX_MATH_UTILITIES_H
-#define GMX_MATH_UTILITIES_H
-
-#include <limits.h>
-#include <stdint.h>
-
-#include <cmath>
-
-/*! \brief Enum to select safe or highly unsafe (faster) math functions.
- *
- *  Normally all the Gromacs math functions should apply reasonable care with
- *  input arguments. While we do not necessarily adhere strictly to IEEE
- *  (in particular not for arguments that might result in NaN, inf, etc.), the
- *  functions should return reasonable values or e.g. clamp results to zero.
- *
- *  However, in a few cases where we are extremely performance-sensitive it
- *  makes sense to forego these checks too in cases where we know the exact
- *  properties if the input data, and we really need to save every cycle we can.
- *
- *  This class is typically used as a template parameter to such calls to enable
- *  the caller to select the level of aggressiveness. We should always use the
- *  safe alternative as the default value, and document carefully what might
- *  happen with the unsafe alternative.
- */
-enum class MathOptimization
-{
-    Safe,  //!< Don't do unsafe optimizations. This should always be default.
-    Unsafe //!< Allow optimizations that can be VERY dangerous for general code.
-};
-
-/*! \brief Check if two numbers are within a tolerance
- *
- *  This routine checks if the relative difference between two numbers is
- *  approximately within the given tolerance, defined as
- *  fabs(f1-f2)<=tolerance*fabs(f1+f2).
- *
- *  To check if two floating-point numbers are almost identical, use this routine
- *  with the tolerance GMX_REAL_EPS, or GMX_DOUBLE_EPS if the check should be
- *  done in double regardless of Gromacs precision.
- *
- *  To check if two algorithms produce similar results you will normally need
- *  to relax the tolerance significantly since many operations (e.g. summation)
- *  accumulate floating point errors.
- *
- *  \param f1  First number to compare
- *  \param f2  Second number to compare
- *  \param tol Tolerance to use
- *
- *  \return 1 if the relative difference is within tolerance, 0 if not.
- */
-bool gmx_within_tol(double f1, double f2, double tol);
-
-/*!
- * \brief Check if a number is smaller than some preset safe minimum
- * value, currently defined as GMX_REAL_MIN/GMX_REAL_EPS.
- *
- * If a number is smaller than this value we risk numerical overflow
- * if any number larger than 1.0/GMX_REAL_EPS is divided by it.
- *
- * \return True if 'almost' numerically zero, false otherwise.
- */
-bool gmx_numzero(double a);
-
-/*! \brief Multiply two large ints
- *
- * \return False iff overflow occurred
- */
-bool check_int_multiply_for_overflow(int64_t a, int64_t b, int64_t* result);
-
-/*! \brief Enable floating-point exceptions if supported on OS
- *
- * Enables division-by-zero, invalid value, and overflow.
- *
- * \returns 0 if successful in enabling exceptions, anything else in case of failure/unsupported OS.
- */
-int gmx_feenableexcept();
-
-/*! \brief Disable floating-point exceptions if supported on OS
- *
- * Disables division-by-zero, invalid value, and overflow.
- *
- * \returns 0 if successful in disabling exceptions, anything else in case of failure/unsupported OS.
- */
-int gmx_fedisableexcept();
-
-/*! \brief Return true if the current build should enable floating-point exceptions by default.
- *
- * Currently, it returns true unless any of the following conditions are met:
- * - release build,
- * - SYCL build (Intel IGC, at least 1.0.5964, raises FP exceptions in JIT compilation),
- * - - See https://github.com/intel/intel-graphics-compiler/issues/164
- * - compilers with known buggy FP exception support (clang with any optimization)
- *   or suspected buggy FP exception support (gcc 7.* with optimization).
- *
- * Note that this function does not check whether the build/OS supports FP exceptions.
- *
- * \returns true if we should enable FP exceptions by default.
- */
-bool gmxShouldEnableFPExceptions();
-
-#endif
diff --git a/src/include/gromacs/math/vec.h b/src/include/gromacs/math/vec.h
deleted file mode 100644 (file)
index ec8b3e1..0000000
+++ /dev/null
@@ -1,644 +0,0 @@
-/*
- * 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,2015,2016,2018, 2019, 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.
- */
-#ifndef GMX_MATH_VEC_H
-#define GMX_MATH_VEC_H
-
-/*! \brief Mathematical operations on (deprecated) rvec and matrix classes
- *
- * \todo Remove functions as Rvec replaces rvec and BasicMatrix3x3 replaces matrix
- *
- * \ingroup module_math
- */
-/*
-   collection of in-line ready operations:
-
-   vector operations:
-   void rvec_add(const rvec a,const rvec b,rvec c)  c = a + b
-   void dvec_add(const dvec a,const dvec b,dvec c)  c = a + b
-   void rvec_inc(rvec a,const rvec b)               a += b
-   void dvec_inc(dvec a,const dvec b)               a += b
-   void ivec_inc(ivec a,const ivec b)               a += b
-   void rvec_sub(const rvec a,const rvec b,rvec c)  c = a - b
-   void dvec_sub(const dvec a,const dvec b,dvec c)  c = a - b
-   void rvec_dec(rvec a,rvec b)                     a -= b
-   void copy_rvec(const rvec a,rvec b)              b = a (reals)
-   void copy_dvec(const dvec a,dvec b)              b = a (reals)
-   void copy_rvec_to_dvec(const rvec a,dvec b)      b = a (reals)
-   void copy_dvec_to_rvec(const dvec a,rvec b)      b = a (reals)
-   void copy_ivec(const ivec a,ivec b)              b = a (integers)
-   void ivec_sub(const ivec a,const ivec b,ivec c)  c = a - b
-   void svmul(real a,rvec v1,rvec v2)               v2 = a * v1
-   void dsvmul(double a,dvec v1,dvec v2)            v2 = a * v1
-   void clear_rvec(rvec a)                          a = 0
-   void clear_dvec(dvec a)                          a = 0
-   void clear_ivec(rvec a)                          a = 0
-   void clear_rvecs(int n,rvec v[])
-   real iprod(rvec a,rvec b)                        = a . b (inner product)
-   double diprod(dvec a,dvec b)                     = a . b (inner product)
-   real norm2(rvec a)                               = | a |^2 ( = x*y*z )
-   double dnorm2(dvec a)                            = | a |^2 ( = x*y*z )
-   real norm(rvec a)                                = | a |
-   double dnorm(dvec a)                             = | a |
-   void cprod(rvec a,rvec b,rvec c)                 c = a x b (cross product)
-   void dcprod(dvec a,dvec b,dvec c)                c = a x b (cross product)
-   void dprod(rvec a,rvec b,rvec c)                 c = a * b (direct product)
-   real cos_angle(rvec a,rvec b)
-   real distance2(rvec v1, rvec v2)                 = | v2 - v1 |^2
-   void unitv(rvec src,rvec dest)                   dest = src / |src|
-
-   matrix (3x3) operations:
-    ! indicates that dest should not be the same as a, b or src
-    the _ur0 varieties work on matrices that have only zeros
-    in the upper right part, such as box matrices, these varieties
-    could produce less rounding errors, not due to the operations themselves,
-    but because the compiler can easier recombine the operations
-   void copy_mat(matrix a,matrix b)                 b = a
-   void clear_mat(matrix a)                         a = 0
-   void mmul(matrix a,matrix b,matrix dest)      !  dest = a . b
-   void mmul_ur0(matrix a,matrix b,matrix dest)     dest = a . b
-   void transpose(matrix src,matrix dest)        !  dest = src*
-   void tmmul(matrix a,matrix b,matrix dest)     !  dest = a* . b
-   void mtmul(matrix a,matrix b,matrix dest)     !  dest = a . b*
-   real det(matrix a)                               = det(a)
-   void m_add(matrix a,matrix b,matrix dest)        dest = a + b
-   void m_sub(matrix a,matrix b,matrix dest)        dest = a - b
-   void msmul(matrix m1,real r1,matrix dest)        dest = r1 * m1
-   void mvmul(matrix a,rvec src,rvec dest)       !  dest = a . src
-   void mvmul_ur0(matrix a,rvec src,rvec dest)      dest = a . src
-   void tmvmul_ur0(matrix a,rvec src,rvec dest)     dest = a* . src
-   real trace(matrix m)                             = trace(m)
- */
-
-#include <cmath>
-
-#include <type_traits>
-
-#include "gromacs/math/functions.h"
-#include "gromacs/math/vectypes.h"
-#include "gromacs/utility/real.h"
-
-static inline void rvec_add(const rvec a, const rvec b, rvec c)
-{
-    real x, y, z;
-
-    x = a[XX] + b[XX];
-    y = a[YY] + b[YY];
-    z = a[ZZ] + b[ZZ];
-
-    c[XX] = x;
-    c[YY] = y;
-    c[ZZ] = z;
-}
-
-static inline void ivec_add(const ivec a, const ivec b, ivec c)
-{
-    int x, y, z;
-
-    x = a[XX] + b[XX];
-    y = a[YY] + b[YY];
-    z = a[ZZ] + b[ZZ];
-
-    c[XX] = x;
-    c[YY] = y;
-    c[ZZ] = z;
-}
-
-static inline void rvec_inc(rvec a, const rvec b)
-{
-    real x, y, z;
-
-    x = a[XX] + b[XX];
-    y = a[YY] + b[YY];
-    z = a[ZZ] + b[ZZ];
-
-    a[XX] = x;
-    a[YY] = y;
-    a[ZZ] = z;
-}
-
-static inline void dvec_inc(dvec a, const dvec b)
-{
-    double x, y, z;
-
-    x = a[XX] + b[XX];
-    y = a[YY] + b[YY];
-    z = a[ZZ] + b[ZZ];
-
-    a[XX] = x;
-    a[YY] = y;
-    a[ZZ] = z;
-}
-
-static inline void rvec_sub(const rvec a, const rvec b, rvec c)
-{
-    real x, y, z;
-
-    x = a[XX] - b[XX];
-    y = a[YY] - b[YY];
-    z = a[ZZ] - b[ZZ];
-
-    c[XX] = x;
-    c[YY] = y;
-    c[ZZ] = z;
-}
-
-static inline void dvec_sub(const dvec a, const dvec b, dvec c)
-{
-    double x, y, z;
-
-    x = a[XX] - b[XX];
-    y = a[YY] - b[YY];
-    z = a[ZZ] - b[ZZ];
-
-    c[XX] = x;
-    c[YY] = y;
-    c[ZZ] = z;
-}
-
-static inline void rvec_dec(rvec a, const rvec b)
-{
-    real x, y, z;
-
-    x = a[XX] - b[XX];
-    y = a[YY] - b[YY];
-    z = a[ZZ] - b[ZZ];
-
-    a[XX] = x;
-    a[YY] = y;
-    a[ZZ] = z;
-}
-
-static inline void copy_rvec(const rvec a, rvec b)
-{
-    b[XX] = a[XX];
-    b[YY] = a[YY];
-    b[ZZ] = a[ZZ];
-}
-
-static inline void copy_rvec_to_dvec(const rvec a, dvec b)
-{
-    b[XX] = a[XX];
-    b[YY] = a[YY];
-    b[ZZ] = a[ZZ];
-}
-
-static inline void copy_dvec_to_rvec(const dvec a, rvec b)
-{
-    b[XX] = static_cast<real>(a[XX]);
-    b[YY] = static_cast<real>(a[YY]);
-    b[ZZ] = static_cast<real>(a[ZZ]);
-}
-
-static inline void copy_rvecn(const rvec* a, rvec* b, int startn, int endn)
-{
-    int i;
-    for (i = startn; i < endn; i++)
-    {
-        b[i][XX] = a[i][XX];
-        b[i][YY] = a[i][YY];
-        b[i][ZZ] = a[i][ZZ];
-    }
-}
-
-static inline void copy_dvec(const dvec a, dvec b)
-{
-    b[XX] = a[XX];
-    b[YY] = a[YY];
-    b[ZZ] = a[ZZ];
-}
-
-static inline void copy_ivec(const ivec a, ivec b)
-{
-    b[XX] = a[XX];
-    b[YY] = a[YY];
-    b[ZZ] = a[ZZ];
-}
-
-static inline void ivec_sub(const ivec a, const ivec b, ivec c)
-{
-    int x, y, z;
-
-    x = a[XX] - b[XX];
-    y = a[YY] - b[YY];
-    z = a[ZZ] - b[ZZ];
-
-    c[XX] = x;
-    c[YY] = y;
-    c[ZZ] = z;
-}
-
-static inline void copy_mat(const matrix a, matrix b)
-{
-    copy_rvec(a[XX], b[XX]);
-    copy_rvec(a[YY], b[YY]);
-    copy_rvec(a[ZZ], b[ZZ]);
-}
-
-static inline void svmul(real a, const rvec v1, rvec v2)
-{
-    v2[XX] = a * v1[XX];
-    v2[YY] = a * v1[YY];
-    v2[ZZ] = a * v1[ZZ];
-}
-
-static inline void dsvmul(double a, const dvec v1, dvec v2)
-{
-    v2[XX] = a * v1[XX];
-    v2[YY] = a * v1[YY];
-    v2[ZZ] = a * v1[ZZ];
-}
-
-static inline real distance2(const rvec v1, const rvec v2)
-{
-    return gmx::square(v2[XX] - v1[XX]) + gmx::square(v2[YY] - v1[YY]) + gmx::square(v2[ZZ] - v1[ZZ]);
-}
-
-static inline void clear_rvec(rvec a)
-{
-    /* The ibm compiler has problems with inlining this
-     * when we use a const real variable
-     */
-    a[XX] = 0.0_real;
-    a[YY] = 0.0_real;
-    a[ZZ] = 0.0_real;
-}
-
-static inline void clear_dvec(dvec a)
-{
-    /* The ibm compiler has problems with inlining this
-     * when we use a const real variable
-     */
-    a[XX] = 0.0;
-    a[YY] = 0.0;
-    a[ZZ] = 0.0;
-}
-
-static inline void clear_ivec(ivec a)
-{
-    a[XX] = 0;
-    a[YY] = 0;
-    a[ZZ] = 0;
-}
-
-static inline void clear_rvecs(int n, rvec v[])
-{
-    int i;
-
-    for (i = 0; (i < n); i++)
-    {
-        clear_rvec(v[i]);
-    }
-}
-
-static inline void clear_mat(matrix a)
-{
-    const real nul = 0.0;
-
-    a[XX][XX] = a[XX][YY] = a[XX][ZZ] = nul;
-    a[YY][XX] = a[YY][YY] = a[YY][ZZ] = nul;
-    a[ZZ][XX] = a[ZZ][YY] = a[ZZ][ZZ] = nul;
-}
-
-static inline real iprod(const rvec a, const rvec b)
-{
-    return (a[XX] * b[XX] + a[YY] * b[YY] + a[ZZ] * b[ZZ]);
-}
-
-static inline double diprod(const dvec a, const dvec b)
-{
-    return (a[XX] * b[XX] + a[YY] * b[YY] + a[ZZ] * b[ZZ]);
-}
-
-static inline real norm2(const rvec a)
-{
-    return a[XX] * a[XX] + a[YY] * a[YY] + a[ZZ] * a[ZZ];
-}
-
-static inline double dnorm2(const dvec a)
-{
-    return a[XX] * a[XX] + a[YY] * a[YY] + a[ZZ] * a[ZZ];
-}
-
-/* WARNING:
- * As dnorm() uses sqrt() (which is slow) _only_ use it if you are sure you
- * don't need 1/dnorm(), otherwise use dnorm2()*dinvnorm(). */
-static inline double dnorm(const dvec a)
-{
-    return std::sqrt(diprod(a, a));
-}
-
-/* WARNING:
- * As norm() uses sqrt() (which is slow) _only_ use it if you are sure you
- * don't need 1/norm(), otherwise use norm2()*invnorm(). */
-static inline real norm(const rvec a)
-{
-    return std::sqrt(iprod(a, a));
-}
-
-/* WARNING:
- * Do _not_ use these routines to calculate the angle between two vectors
- * as acos(cos_angle(u,v)). While it might seem obvious, the acos function
- * is very flat close to -1 and 1, which will lead to accuracy-loss.
- * Instead, use the new gmx_angle() function directly.
- */
-static inline real cos_angle(const rvec a, const rvec b)
-{
-    /*
-     *                  ax*bx + ay*by + az*bz
-     * cos-vec (a,b) =  ---------------------
-     *                      ||a|| * ||b||
-     */
-    real   cosval;
-    int    m;
-    double aa, bb, ip, ipa, ipb, ipab; /* For accuracy these must be double! */
-
-    ip = ipa = ipb = 0.0;
-    for (m = 0; (m < DIM); m++) /* 18 */
-    {
-        aa = a[m];
-        bb = b[m];
-        ip += aa * bb;
-        ipa += aa * aa;
-        ipb += bb * bb;
-    }
-    ipab = ipa * ipb;
-    if (ipab > 0)
-    {
-        cosval = static_cast<real>(ip * gmx::invsqrt(ipab)); /*  7 */
-    }
-    else
-    {
-        cosval = 1;
-    }
-    /* 25 TOTAL */
-    if (cosval > 1.0)
-    {
-        return 1.0;
-    }
-    if (cosval < -1.0)
-    {
-        return -1.0;
-    }
-
-    return cosval;
-}
-
-static inline void cprod(const rvec a, const rvec b, rvec c)
-{
-    c[XX] = a[YY] * b[ZZ] - a[ZZ] * b[YY];
-    c[YY] = a[ZZ] * b[XX] - a[XX] * b[ZZ];
-    c[ZZ] = a[XX] * b[YY] - a[YY] * b[XX];
-}
-
-static inline void dcprod(const dvec a, const dvec b, dvec c)
-{
-    c[XX] = a[YY] * b[ZZ] - a[ZZ] * b[YY];
-    c[YY] = a[ZZ] * b[XX] - a[XX] * b[ZZ];
-    c[ZZ] = a[XX] * b[YY] - a[YY] * b[XX];
-}
-
-/* This routine calculates the angle between a & b without any loss of accuracy close to 0/PI.
- * If you only need cos(theta), use the cos_angle() routines to save a few cycles.
- * This routine is faster than it might appear, since atan2 is accelerated on many CPUs (e.g. x86).
- */
-static inline real gmx_angle(const rvec a, const rvec b)
-{
-    rvec w;
-    real wlen, s;
-
-    cprod(a, b, w);
-
-    wlen = norm(w);
-    s    = iprod(a, b);
-
-    return std::atan2(wlen, s);
-}
-
-static inline double gmx_angle_between_dvecs(const dvec a, const dvec b)
-{
-    dvec   w;
-    double wlen, s;
-
-    dcprod(a, b, w);
-
-    wlen = dnorm(w);
-    s    = diprod(a, b);
-
-    return std::atan2(wlen, s);
-}
-
-static inline void mmul_ur0(const matrix a, const matrix b, matrix dest)
-{
-    dest[XX][XX] = a[XX][XX] * b[XX][XX];
-    dest[XX][YY] = 0.0;
-    dest[XX][ZZ] = 0.0;
-    dest[YY][XX] = a[YY][XX] * b[XX][XX] + a[YY][YY] * b[YY][XX];
-    dest[YY][YY] = a[YY][YY] * b[YY][YY];
-    dest[YY][ZZ] = 0.0;
-    dest[ZZ][XX] = a[ZZ][XX] * b[XX][XX] + a[ZZ][YY] * b[YY][XX] + a[ZZ][ZZ] * b[ZZ][XX];
-    dest[ZZ][YY] = a[ZZ][YY] * b[YY][YY] + a[ZZ][ZZ] * b[ZZ][YY];
-    dest[ZZ][ZZ] = a[ZZ][ZZ] * b[ZZ][ZZ];
-}
-
-static inline void mmul(const matrix a, const matrix b, matrix dest)
-{
-    dest[XX][XX] = a[XX][XX] * b[XX][XX] + a[XX][YY] * b[YY][XX] + a[XX][ZZ] * b[ZZ][XX];
-    dest[YY][XX] = a[YY][XX] * b[XX][XX] + a[YY][YY] * b[YY][XX] + a[YY][ZZ] * b[ZZ][XX];
-    dest[ZZ][XX] = a[ZZ][XX] * b[XX][XX] + a[ZZ][YY] * b[YY][XX] + a[ZZ][ZZ] * b[ZZ][XX];
-    dest[XX][YY] = a[XX][XX] * b[XX][YY] + a[XX][YY] * b[YY][YY] + a[XX][ZZ] * b[ZZ][YY];
-    dest[YY][YY] = a[YY][XX] * b[XX][YY] + a[YY][YY] * b[YY][YY] + a[YY][ZZ] * b[ZZ][YY];
-    dest[ZZ][YY] = a[ZZ][XX] * b[XX][YY] + a[ZZ][YY] * b[YY][YY] + a[ZZ][ZZ] * b[ZZ][YY];
-    dest[XX][ZZ] = a[XX][XX] * b[XX][ZZ] + a[XX][YY] * b[YY][ZZ] + a[XX][ZZ] * b[ZZ][ZZ];
-    dest[YY][ZZ] = a[YY][XX] * b[XX][ZZ] + a[YY][YY] * b[YY][ZZ] + a[YY][ZZ] * b[ZZ][ZZ];
-    dest[ZZ][ZZ] = a[ZZ][XX] * b[XX][ZZ] + a[ZZ][YY] * b[YY][ZZ] + a[ZZ][ZZ] * b[ZZ][ZZ];
-}
-
-static inline void transpose(const matrix src, matrix dest)
-{
-    dest[XX][XX] = src[XX][XX];
-    dest[YY][XX] = src[XX][YY];
-    dest[ZZ][XX] = src[XX][ZZ];
-    dest[XX][YY] = src[YY][XX];
-    dest[YY][YY] = src[YY][YY];
-    dest[ZZ][YY] = src[YY][ZZ];
-    dest[XX][ZZ] = src[ZZ][XX];
-    dest[YY][ZZ] = src[ZZ][YY];
-    dest[ZZ][ZZ] = src[ZZ][ZZ];
-}
-
-static inline void tmmul(const matrix a, const matrix b, matrix dest)
-{
-    /* Computes dest=mmul(transpose(a),b,dest) - used in do_pr_pcoupl */
-    dest[XX][XX] = a[XX][XX] * b[XX][XX] + a[YY][XX] * b[YY][XX] + a[ZZ][XX] * b[ZZ][XX];
-    dest[XX][YY] = a[XX][XX] * b[XX][YY] + a[YY][XX] * b[YY][YY] + a[ZZ][XX] * b[ZZ][YY];
-    dest[XX][ZZ] = a[XX][XX] * b[XX][ZZ] + a[YY][XX] * b[YY][ZZ] + a[ZZ][XX] * b[ZZ][ZZ];
-    dest[YY][XX] = a[XX][YY] * b[XX][XX] + a[YY][YY] * b[YY][XX] + a[ZZ][YY] * b[ZZ][XX];
-    dest[YY][YY] = a[XX][YY] * b[XX][YY] + a[YY][YY] * b[YY][YY] + a[ZZ][YY] * b[ZZ][YY];
-    dest[YY][ZZ] = a[XX][YY] * b[XX][ZZ] + a[YY][YY] * b[YY][ZZ] + a[ZZ][YY] * b[ZZ][ZZ];
-    dest[ZZ][XX] = a[XX][ZZ] * b[XX][XX] + a[YY][ZZ] * b[YY][XX] + a[ZZ][ZZ] * b[ZZ][XX];
-    dest[ZZ][YY] = a[XX][ZZ] * b[XX][YY] + a[YY][ZZ] * b[YY][YY] + a[ZZ][ZZ] * b[ZZ][YY];
-    dest[ZZ][ZZ] = a[XX][ZZ] * b[XX][ZZ] + a[YY][ZZ] * b[YY][ZZ] + a[ZZ][ZZ] * b[ZZ][ZZ];
-}
-
-static inline void mtmul(const matrix a, const matrix b, matrix dest)
-{
-    /* Computes dest=mmul(a,transpose(b),dest) - used in do_pr_pcoupl */
-    dest[XX][XX] = a[XX][XX] * b[XX][XX] + a[XX][YY] * b[XX][YY] + a[XX][ZZ] * b[XX][ZZ];
-    dest[XX][YY] = a[XX][XX] * b[YY][XX] + a[XX][YY] * b[YY][YY] + a[XX][ZZ] * b[YY][ZZ];
-    dest[XX][ZZ] = a[XX][XX] * b[ZZ][XX] + a[XX][YY] * b[ZZ][YY] + a[XX][ZZ] * b[ZZ][ZZ];
-    dest[YY][XX] = a[YY][XX] * b[XX][XX] + a[YY][YY] * b[XX][YY] + a[YY][ZZ] * b[XX][ZZ];
-    dest[YY][YY] = a[YY][XX] * b[YY][XX] + a[YY][YY] * b[YY][YY] + a[YY][ZZ] * b[YY][ZZ];
-    dest[YY][ZZ] = a[YY][XX] * b[ZZ][XX] + a[YY][YY] * b[ZZ][YY] + a[YY][ZZ] * b[ZZ][ZZ];
-    dest[ZZ][XX] = a[ZZ][XX] * b[XX][XX] + a[ZZ][YY] * b[XX][YY] + a[ZZ][ZZ] * b[XX][ZZ];
-    dest[ZZ][YY] = a[ZZ][XX] * b[YY][XX] + a[ZZ][YY] * b[YY][YY] + a[ZZ][ZZ] * b[YY][ZZ];
-    dest[ZZ][ZZ] = a[ZZ][XX] * b[ZZ][XX] + a[ZZ][YY] * b[ZZ][YY] + a[ZZ][ZZ] * b[ZZ][ZZ];
-}
-
-static inline real det(const matrix a)
-{
-    return (a[XX][XX] * (a[YY][YY] * a[ZZ][ZZ] - a[ZZ][YY] * a[YY][ZZ])
-            - a[YY][XX] * (a[XX][YY] * a[ZZ][ZZ] - a[ZZ][YY] * a[XX][ZZ])
-            + a[ZZ][XX] * (a[XX][YY] * a[YY][ZZ] - a[YY][YY] * a[XX][ZZ]));
-}
-
-
-static inline void m_add(const matrix a, const matrix b, matrix dest)
-{
-    dest[XX][XX] = a[XX][XX] + b[XX][XX];
-    dest[XX][YY] = a[XX][YY] + b[XX][YY];
-    dest[XX][ZZ] = a[XX][ZZ] + b[XX][ZZ];
-    dest[YY][XX] = a[YY][XX] + b[YY][XX];
-    dest[YY][YY] = a[YY][YY] + b[YY][YY];
-    dest[YY][ZZ] = a[YY][ZZ] + b[YY][ZZ];
-    dest[ZZ][XX] = a[ZZ][XX] + b[ZZ][XX];
-    dest[ZZ][YY] = a[ZZ][YY] + b[ZZ][YY];
-    dest[ZZ][ZZ] = a[ZZ][ZZ] + b[ZZ][ZZ];
-}
-
-static inline void m_sub(const matrix a, const matrix b, matrix dest)
-{
-    dest[XX][XX] = a[XX][XX] - b[XX][XX];
-    dest[XX][YY] = a[XX][YY] - b[XX][YY];
-    dest[XX][ZZ] = a[XX][ZZ] - b[XX][ZZ];
-    dest[YY][XX] = a[YY][XX] - b[YY][XX];
-    dest[YY][YY] = a[YY][YY] - b[YY][YY];
-    dest[YY][ZZ] = a[YY][ZZ] - b[YY][ZZ];
-    dest[ZZ][XX] = a[ZZ][XX] - b[ZZ][XX];
-    dest[ZZ][YY] = a[ZZ][YY] - b[ZZ][YY];
-    dest[ZZ][ZZ] = a[ZZ][ZZ] - b[ZZ][ZZ];
-}
-
-static inline void msmul(const matrix m1, real r1, matrix dest)
-{
-    dest[XX][XX] = r1 * m1[XX][XX];
-    dest[XX][YY] = r1 * m1[XX][YY];
-    dest[XX][ZZ] = r1 * m1[XX][ZZ];
-    dest[YY][XX] = r1 * m1[YY][XX];
-    dest[YY][YY] = r1 * m1[YY][YY];
-    dest[YY][ZZ] = r1 * m1[YY][ZZ];
-    dest[ZZ][XX] = r1 * m1[ZZ][XX];
-    dest[ZZ][YY] = r1 * m1[ZZ][YY];
-    dest[ZZ][ZZ] = r1 * m1[ZZ][ZZ];
-}
-
-static inline void mvmul(const matrix a, const rvec src, rvec dest)
-{
-    dest[XX] = a[XX][XX] * src[XX] + a[XX][YY] * src[YY] + a[XX][ZZ] * src[ZZ];
-    dest[YY] = a[YY][XX] * src[XX] + a[YY][YY] * src[YY] + a[YY][ZZ] * src[ZZ];
-    dest[ZZ] = a[ZZ][XX] * src[XX] + a[ZZ][YY] * src[YY] + a[ZZ][ZZ] * src[ZZ];
-}
-
-
-static inline void mvmul_ur0(const matrix a, const rvec src, rvec dest)
-{
-    dest[ZZ] = a[ZZ][XX] * src[XX] + a[ZZ][YY] * src[YY] + a[ZZ][ZZ] * src[ZZ];
-    dest[YY] = a[YY][XX] * src[XX] + a[YY][YY] * src[YY];
-    dest[XX] = a[XX][XX] * src[XX];
-}
-
-static inline void tmvmul_ur0(const matrix a, const rvec src, rvec dest)
-{
-    dest[XX] = a[XX][XX] * src[XX] + a[YY][XX] * src[YY] + a[ZZ][XX] * src[ZZ];
-    dest[YY] = a[YY][YY] * src[YY] + a[ZZ][YY] * src[ZZ];
-    dest[ZZ] = a[ZZ][ZZ] * src[ZZ];
-}
-
-static inline void unitv(const rvec src, rvec dest)
-{
-    real linv;
-
-    linv     = gmx::invsqrt(norm2(src));
-    dest[XX] = linv * src[XX];
-    dest[YY] = linv * src[YY];
-    dest[ZZ] = linv * src[ZZ];
-}
-
-static inline real trace(const matrix m)
-{
-    return (m[XX][XX] + m[YY][YY] + m[ZZ][ZZ]);
-}
-
-namespace gmx
-{
-/*!
- * \brief Forward operations on C Array style vectors to C implementations.
- *
- * Since vec.h and vectypes.h independently declare `norm` and `norm2` in
- * different namespaces, code that includes both headers but does not specify
- * the namespace from which to use `norm` and `norm2` cannot properly resolve
- * overloads without the following helper templates.
- * \tparam T array element type (e.g. real, int, etc.)
- * \param v address of first vector element
- * \return magnitude or squared magnitude of vector
- * \{
- */
-template<typename T>
-std::remove_const_t<T> norm(T* v)
-{
-    return ::norm(v);
-}
-template<typename T>
-std::remove_const_t<T> norm2(T* v)
-{
-    return ::norm2(v);
-}
-/*! \} */
-
-} // namespace gmx
-
-
-#endif
diff --git a/src/include/gromacs/math/vectypes.h b/src/include/gromacs/math/vectypes.h
deleted file mode 100644 (file)
index 55f28e2..0000000
+++ /dev/null
@@ -1,381 +0,0 @@
-/*
- * 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,2016,2017,2018 by the GROMACS development team.
- * Copyright (c) 2019,2020,2021, 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.
- */
-#ifndef GMX_MATH_VECTYPES_H
-#define GMX_MATH_VECTYPES_H
-
-#include <cassert>
-#include <cmath>
-
-#include <algorithm>
-#include <type_traits>
-
-#include "gromacs/utility/real.h"
-
-#define XX 0 /* Defines for indexing in */
-#define YY 1 /* vectors                 */
-#define ZZ 2
-#define DIM 3 /* Dimension of vectors    */
-
-typedef real rvec[DIM];
-
-typedef double dvec[DIM];
-
-typedef real matrix[DIM][DIM];
-
-typedef real tensor[DIM][DIM];
-
-typedef int ivec[DIM];
-
-namespace gmx
-{
-
-/*! \brief
- * C++ class for 3D vectors.
- *
- * \tparam ValueType  Type
- *
- * This class provides a C++ version of rvec/dvec/ivec that can be put into STL
- * containers etc.  It is more or less a drop-in replacement for `rvec` and
- * friends: it can be used in most contexts that accept the equivalent C type.
- * However, there is one case where explicit conversion is necessary:
- *  - An array of these objects needs to be converted with as_vec_array() (or
- *    convenience methods like as_rvec_array()).
- *
- * For the array conversion to work, the compiler should not add any extra
- * alignment/padding in the layout of this class;  that this actually works as
- * intended is tested in the unit tests.
- *
- * \inpublicapi
- */
-template<typename ValueType>
-class BasicVector
-{
-public:
-    //! Underlying raw C array type (rvec/dvec/ivec).
-    using RawArray = ValueType[DIM];
-
-    // The code here assumes ValueType has been deduced as a data type like int
-    // and not a pointer like int*. If there is a use case for a 3-element array
-    // of pointers, the implementation will be different enough that the whole
-    // template class should have a separate partial specialization. We try to avoid
-    // accidental matching to pointers, but this assertion is a no-cost extra check.
-    //
-    // TODO: Use std::is_pointer_v when CUDA 11 is a requirement.
-    static_assert(!std::is_pointer<std::remove_cv_t<ValueType>>::value,
-                  "BasicVector value type must not be a pointer.");
-
-    //! Constructs default (uninitialized) vector.
-    BasicVector() {}
-    //! Constructs a vector from given values.
-    BasicVector(ValueType x, ValueType y, ValueType z) : x_{ x, y, z } {}
-    /*! \brief
-     * Constructs a vector from given values.
-     *
-     * This constructor is not explicit to support implicit conversions
-     * that allow, e.g., calling `std::vector<RVec>:``:push_back()` directly
-     * with an `rvec` parameter.
-     */
-    BasicVector(const RawArray x) : x_{ x[XX], x[YY], x[ZZ] } {}
-    //! Default copy constructor.
-    BasicVector(const BasicVector& src) = default;
-    //! Default copy assignment operator.
-    BasicVector& operator=(const BasicVector& v) = default;
-    //! Default move constructor.
-    BasicVector(BasicVector&& src) noexcept = default;
-    //! Default move assignment operator.
-    BasicVector& operator=(BasicVector&& v) noexcept = default;
-    //! Indexing operator to make the class work as the raw array.
-    ValueType& operator[](int i) { return x_[i]; }
-    //! Indexing operator to make the class work as the raw array.
-    ValueType operator[](int i) const { return x_[i]; }
-    //! Return whether all elements compare equal
-    bool operator==(const BasicVector<ValueType>& right)
-    {
-        return x_[0] == right[0] && x_[1] == right[1] && x_[2] == right[2];
-    }
-    //! Return whether any elements compare unequal
-    bool operator!=(const BasicVector<ValueType>& right)
-    {
-        return x_[0] != right[0] || x_[1] != right[1] || x_[2] != right[2];
-    }
-    //! Allow inplace addition for BasicVector
-    BasicVector<ValueType>& operator+=(const BasicVector<ValueType>& right)
-    {
-        return *this = *this + right;
-    }
-    //! Allow inplace subtraction for BasicVector
-    BasicVector<ValueType>& operator-=(const BasicVector<ValueType>& right)
-    {
-        return *this = *this - right;
-    }
-    //! Allow vector addition
-    BasicVector<ValueType> operator+(const BasicVector<ValueType>& right) const
-    {
-        return { x_[0] + right[0], x_[1] + right[1], x_[2] + right[2] };
-    }
-    //! Allow vector subtraction
-    BasicVector<ValueType> operator-(const BasicVector<ValueType>& right) const
-    {
-        return { x_[0] - right[0], x_[1] - right[1], x_[2] - right[2] };
-    }
-    //! Allow vector scalar division
-    BasicVector<ValueType> operator/(const ValueType& right) const
-    {
-        assert((right != 0 && "Cannot divide by zero"));
-
-        return *this * (1 / right);
-    }
-    //! Scale vector by a scalar
-    BasicVector<ValueType>& operator*=(const ValueType& right)
-    {
-        x_[0] *= right;
-        x_[1] *= right;
-        x_[2] *= right;
-
-        return *this;
-    }
-    //! Divide vector by a scalar
-    BasicVector<ValueType>& operator/=(const ValueType& right)
-    {
-        assert((right != 0 && "Cannot divide by zero"));
-
-        return *this *= 1 / right;
-    }
-    //! Return dot product
-    ValueType dot(const BasicVector<ValueType>& right) const
-    {
-        return x_[0] * right[0] + x_[1] * right[1] + x_[2] * right[2];
-    }
-
-    //! Allow vector vector multiplication (cross product)
-    BasicVector<ValueType> cross(const BasicVector<ValueType>& right) const
-    {
-        return { x_[YY] * right.x_[ZZ] - x_[ZZ] * right.x_[YY],
-                 x_[ZZ] * right.x_[XX] - x_[XX] * right.x_[ZZ],
-                 x_[XX] * right.x_[YY] - x_[YY] * right.x_[XX] };
-    }
-
-    //! Return normalized to unit vector
-    BasicVector<ValueType> unitVector() const
-    {
-        const ValueType vectorNorm = norm();
-        assert((vectorNorm != 0 && "unitVector() should not be called with a zero vector"));
-
-        return *this / vectorNorm;
-    }
-
-    //! Length^2 of vector
-    ValueType norm2() const { return dot(*this); }
-
-    //! Norm or length of vector
-    ValueType norm() const { return std::sqrt(norm2()); }
-
-    //! cast to RVec
-    BasicVector<real> toRVec() const { return { real(x_[0]), real(x_[1]), real(x_[2]) }; }
-
-    //! cast to IVec
-    BasicVector<int> toIVec() const
-    {
-        return { static_cast<int>(x_[0]), static_cast<int>(x_[1]), static_cast<int>(x_[2]) };
-    }
-
-    //! cast to DVec
-    BasicVector<double> toDVec() const { return { double(x_[0]), double(x_[1]), double(x_[2]) }; }
-
-    //! Converts to a raw C array where implicit conversion does not work.
-    RawArray& as_vec() { return x_; }
-    //! Converts to a raw C array where implicit conversion does not work.
-    const RawArray& as_vec() const { return x_; }
-    //! Makes BasicVector usable in contexts where a raw C array is expected.
-    operator RawArray&() { return x_; }
-    //! Makes BasicVector usable in contexts where a raw C array is expected.
-    operator const RawArray&() const { return x_; }
-
-private:
-    RawArray x_;
-};
-
-//! Allow vector scalar multiplication
-template<typename ValueType>
-BasicVector<ValueType> operator*(const BasicVector<ValueType>& basicVector, const ValueType& scalar)
-{
-    return { basicVector[0] * scalar, basicVector[1] * scalar, basicVector[2] * scalar };
-}
-
-//! Allow scalar vector multiplication
-template<typename ValueType>
-BasicVector<ValueType> operator*(const ValueType& scalar, const BasicVector<ValueType>& basicVector)
-{
-    return { scalar * basicVector[0], scalar * basicVector[1], scalar * basicVector[2] };
-}
-
-/*! \brief
- * unitv for gmx::BasicVector
- */
-template<typename VectorType>
-static inline VectorType unitVector(const VectorType& v)
-{
-    return v.unitVector();
-}
-
-/*! \brief
- * norm for gmx::BasicVector
- */
-template<typename ValueType>
-static inline ValueType norm(BasicVector<ValueType> v)
-{
-    return v.norm();
-}
-
-/*! \brief
- * Square of the vector norm for gmx::BasicVector
- */
-template<typename ValueType>
-static inline ValueType norm2(BasicVector<ValueType> v)
-{
-    return v.norm2();
-}
-
-/*! \brief
- * cross product for gmx::BasicVector
- */
-template<typename VectorType>
-static inline VectorType cross(const VectorType& a, const VectorType& b)
-{
-    return a.cross(b);
-}
-
-/*! \brief
- * dot product for gmx::BasicVector
- */
-template<typename ValueType>
-static inline ValueType dot(BasicVector<ValueType> a, BasicVector<ValueType> b)
-{
-    return a.dot(b);
-}
-
-/*! \brief
- * Multiply two vectors element by element and return the result.
- */
-template<typename VectorType>
-static inline VectorType scaleByVector(const VectorType& a, const VectorType& b)
-{
-    return { a[0] * b[0], a[1] * b[1], a[2] * b[2] };
-}
-
-/*! \brief
- * Return the element-wise minimum of two vectors.
- */
-template<typename VectorType>
-static inline VectorType elementWiseMin(const VectorType& a, const VectorType& b)
-{
-    return { std::min(a[0], b[0]), std::min(a[1], b[1]), std::min(a[2], b[2]) };
-}
-
-/*! \brief
- * Return the element-wise maximum of two vectors.
- */
-template<typename VectorType>
-static inline VectorType elementWiseMax(const VectorType& a, const VectorType& b)
-{
-    return { std::max(a[0], b[0]), std::max(a[1], b[1]), std::max(a[2], b[2]) };
-}
-
-/*! \brief
- * Casts a gmx::BasicVector array into an equivalent raw C array.
- */
-template<typename ValueType>
-static inline typename BasicVector<ValueType>::RawArray* as_vec_array(BasicVector<ValueType>* x)
-{
-    return reinterpret_cast<typename BasicVector<ValueType>::RawArray*>(x);
-}
-
-/*! \brief
- * Casts a gmx::BasicVector array into an equivalent raw C array.
- */
-template<typename ValueType>
-static inline const typename BasicVector<ValueType>::RawArray* as_vec_array(const BasicVector<ValueType>* x)
-{
-    return reinterpret_cast<const typename BasicVector<ValueType>::RawArray*>(x);
-}
-
-//! Shorthand for C++ `rvec`-equivalent type.
-typedef BasicVector<real> RVec;
-//! Shorthand for C++ `dvec`-equivalent type.
-typedef BasicVector<double> DVec;
-//! Shorthand for C++ `ivec`-equivalent type.
-typedef BasicVector<int> IVec;
-//! Casts a gmx::RVec array into an `rvec` array.
-static inline rvec* as_rvec_array(RVec* x)
-{
-    return as_vec_array(x);
-}
-//! Casts a gmx::RVec array into an `rvec` array.
-static inline const rvec* as_rvec_array(const RVec* x)
-{
-    return as_vec_array(x);
-}
-//! Casts a gmx::DVec array into an `Dvec` array.
-static inline dvec* as_dvec_array(DVec* x)
-{
-    return as_vec_array(x);
-}
-//! Casts a gmx::IVec array into an `ivec` array.
-static inline ivec* as_ivec_array(IVec* x)
-{
-    return as_vec_array(x);
-}
-
-
-//! Casts a gmx::DVec array into an `dvec` array.
-static inline const dvec* as_dvec_array(const DVec* x)
-{
-    return as_vec_array(x);
-}
-//! Casts a gmx::IVec array into an `ivec` array.
-static inline const ivec* as_ivec_array(const IVec* x)
-{
-    return as_vec_array(x);
-}
-
-//! Shorthand for C++ `ivec`-equivalent type.
-typedef BasicVector<int> IVec;
-
-} // namespace gmx
-
-#endif // include guard
diff --git a/src/include/gromacs/restraint/restraintpotential.h b/src/include/gromacs/restraint/restraintpotential.h
deleted file mode 100644 (file)
index 872d069..0000000
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * This file is part of the GROMACS molecular simulation package.
- *
- * Copyright (c) 2018,2019,2020, 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.
- */
-
-#ifndef GROMACS_RESTRAINT_RESTRAINTPOTENTIAL_H
-#define GROMACS_RESTRAINT_RESTRAINTPOTENTIAL_H
-
-/*!
- * \defgroup module_restraint MD restraints
- * \inpublicapi
- * \brief Apply restraints during MD integration.
- *
- * The classes here are available through the public API. To write a restraint
- * plugin, implement gmx::IRestraintPotential with a calculation method that
- * produces a PotentialPointData for each site to which MD forces will be applied.
- */
-/*! \file
- * \brief Declare generic interface for restraint implementations.
- *
- * \author M. Eric Irrgang <ericirrgang@gmail.com>
- *
- * \inpublicapi
- * \ingroup module_restraint
- */
-
-#include <functional>
-#include <memory>
-#include <ostream>
-#include <vector>
-
-#include "gromacs/math/vectypes.h"
-
-// TODO: Get from a header once the public API settles down a bit.
-namespace gmxapi
-{
-class SessionResources;
-}
-
-namespace gmx
-{
-
-/*!
- * \brief Provide a vector type name with a more stable interface than RVec and a more stable
- * implementation than vec3<>.
- *
- * \ingroup module_restraint
- *
- * \internal
- * Type alias is used at namespace level
- */
-using Vector = ::gmx::RVec;
-
-/*!
- * \brief Structure to hold the results of IRestraintPotential::evaluate().
- *
- * \ingroup module_restraint
- */
-class PotentialPointData
-{
-public:
-    /*!
-     * \brief Initialize a new data structure.
-     */
-    PotentialPointData() : PotentialPointData{ Vector(0., 0., 0.), real(0.0) } {}
-
-    /*!
-     * \brief Initialize from an argument list
-     *
-     * \param f Force vector.
-     * \param e Energy value.
-     *
-     * Note that if force was calculated as a scalar, it needs to be multiplied by a unit
-     * vector in the direction to which it should be applied.
-     */
-    PotentialPointData(const Vector& f, const real e) : force(f), energy(e) {}
-
-    /*!
-     * \brief Force vector calculated for first position.
-     */
-    Vector force;
-
-    /*!
-     * \brief Potential energy calculated for this interaction.
-     */
-    real energy;
-};
-
-/*!
- * \brief Interface for Restraint potentials.
- *
- * Derive from this interface class to implement a restraint potential. The derived class
- * must implement the evaluate() member function that produces a PotentialPointData instance.
- * For various convenience functions and to decouple the internal library
- * interface from implementations of potentials, it is expected that
- * restraints will be programmed by subclassing gmx::RestraintPotential<>
- * rather than gmx::IRestraintPotential.
- *
- * For a set of \f$n\f$ coordinates, generate a force field according to a
- * scalar potential that is a fun. \f$F_i = - \nabla_{q_i} \Phi (q_0, q_1, ... q_n; t)\f$
- *
- * Potentials implemented with these classes may be long ranged and are appropriate
- * for only a small number of particles to avoid substantial performance impact.
- *
- * The indices in the above equation refer to the input and output sites specified
- * before the simulation is started. In the current interface, the evaluate() virtual
- * function allows an implementer to calculate the energy and force acting at the
- * first of a pair of sites. The equal and opposite force is applied at the second site.
- *
- * The potential function is evaluated with a time argument
- * and can be updated during the simulation.
- * For non-time-varying potentials, the time argument may still be useful for
- * internal optimizations, such as managing cached values.
- *
- * In the simplest and most common case, pairs of sites (atoms or groups)
- * are specified by the user and then, during integration, GROMACS provides
- * the current positions of each pair for the restraint potential to be evaluated.
- * In such a case, the potential can be implemented by overriding evaluate().
- * \todo Template headers can help to build compatible calculation methods with different input
- * requirements. For reference, see https://github.com/kassonlab/sample_restraint
- *
- * \ingroup module_restraint
- */
-class IRestraintPotential
-{
-public:
-    virtual ~IRestraintPotential() = default;
-
-    /*!
-     * \brief Calculate a force vector according to two input positions at a given time.
-     *
-     * If not overridden by derived class, returns a zero vector.
-     * \param r1 position of first site
-     * \param r2 position of second site
-     * \param t simulation time in picoseconds
-     * \return force vector and potential energy to be applied by calling code.
-     *
-     * \todo The virtual function call should be replaced by a (table of) function objects retrieved before the run.
-     */
-    virtual PotentialPointData evaluate(Vector r1, Vector r2, double t) = 0;
-
-
-    /*!
-     * \brief Call-back hook for restraint implementations.
-     *
-     * An update function to be called on the simulation master rank/thread periodically
-     * by the Restraint framework.
-     * Receives the same input as the evaluate() method, but is only called on the master
-     * rank of a simulation to allow implementation code to be thread-safe without knowing
-     * anything about the domain decomposition.
-     *
-     * \param v position of the first site
-     * \param v0 position of the second site
-     * \param t simulation time
-     *
-     * \internal
-     * We give the definition here because we don't want plugins to have to link against
-     * libgromacs right now (complicated header maintenance and no API stability guarantees).
-     * But once we've had plugin restraints wrap themselves in a Restraint template,
-     * we can set update = 0
-     *
-     * \todo: Provide gmxapi facility for plugin restraints to wrap themselves
-     * with a default implementation to let this class be pure virtual.
-     */
-    virtual void update(gmx::Vector v, gmx::Vector v0, double t)
-    {
-        (void)v;
-        (void)v0;
-        (void)t;
-    }
-
-
-    /*!
-     * \brief Find out what sites this restraint is configured to act on.
-     * \return
-     */
-    virtual std::vector<int> sites() const = 0;
-
-    /*!
-     * \brief Allow Session-mediated interaction with other resources or workflow elements.
-     *
-     * \param resources temporary access to the resources provided by the session for additional configuration.
-     *
-     * A module implements this method to receive a handle to resources configured for this particular workflow
-     * element.
-     *
-     * \internal
-     * \todo This should be more general than the RestraintPotential interface.
-     */
-    virtual void bindSession(gmxapi::SessionResources* resources) { (void)resources; }
-};
-
-} // end namespace gmx
-
-#endif // GMX_PULLING_PULLPOTENTIAL_H
diff --git a/src/include/gromacs/utility/arrayref.h b/src/include/gromacs/utility/arrayref.h
deleted file mode 100644 (file)
index 91d003a..0000000
+++ /dev/null
@@ -1,380 +0,0 @@
-/*
- * This file is part of the GROMACS molecular simulation package.
- *
- * Copyright (c) 2012,2013,2014,2015,2016, by the GROMACS development team.
- * Copyright (c) 2017,2018,2019,2020,2021, 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.
- */
-/*! \file
- * \brief
- * Declares gmx::ArrayRef
- *
- * \author Teemu Murtola <teemu.murtola@gmail.com>
- * \author Mark Abraham <mark.j.abraham@gmail.com>
- * \author Roland Schulz <roland.schulz@intel.com>
- * \author Berk Hess <hess@kth.se>
- * \inpublicapi
- * \ingroup module_utility
- */
-#ifndef GMX_UTILITY_ARRAYREF_H
-#define GMX_UTILITY_ARRAYREF_H
-
-#include <cassert>
-#include <cstddef>
-
-#include <array>
-#include <iterator>
-#include <stdexcept>
-#include <utility>
-#include <vector>
-
-#if __has_include(<boost/stl_interfaces/iterator_interface.hpp>)
-#    include <boost/stl_interfaces/iterator_interface.hpp>
-#else // fallback for installed headers
-#    include <gromacs/external/boost/stl_interfaces/iterator_interface.hpp>
-#endif
-
-namespace gmx
-{
-
-template<class T>
-struct ArrayRefIter :
-    boost::stl_interfaces::iterator_interface<ArrayRefIter<T>, std::random_access_iterator_tag, T>
-{
-    // This default constructor does not initialize it_
-    constexpr ArrayRefIter() noexcept {}
-    constexpr explicit ArrayRefIter(T* it) noexcept : it_(it) {}
-    // TODO: Use std::is_const_v when CUDA 11 is a requirement.
-    template<class T2 = T, class = std::enable_if_t<std::is_const<T2>::value>>
-    constexpr ArrayRefIter(ArrayRefIter<std::remove_const_t<T2>> it) noexcept : it_(&*it)
-    {
-    }
-    constexpr T*            data() const noexcept { return it_; }
-    constexpr T&            operator*() const noexcept { return *it_; }
-    constexpr ArrayRefIter& operator+=(std::ptrdiff_t i) noexcept
-    {
-        it_ += i;
-        return *this;
-    }
-    constexpr auto operator-(ArrayRefIter other) const noexcept { return it_ - other.it_; }
-
-private:
-    T* it_ = nullptr;
-};
-
-/*! \brief STL-like interface to a C array of T (or part
- * of a std container of T).
- *
- * \tparam T  Value type of elements.
- *
- * This class provides an interface similar to \c std::vector<T, A>, with the
- * following main differences:
- *  - This class does not have its own storage.  Instead, it references an
- *    existing array of values (either a C-style array or part of an existing
- *    std::vector<T, A> or std::array<T>).
- *  - It is only possible to modify the values themselves through ArrayRef;
- *    it is not possible to add or remove values.
- *  - Copying objects of this type is cheap, and the copies behave identically
- *    to the original object: the copy references the same set of values.
- *
- * This class is useful for writing wrappers that expose a view of the
- * internal data stored as a single vector/array, which can be a whole
- * or part of the underlying storage.
- *
- * Methods in this class do not throw, except where indicated.
- *
- * Note that due to a Doxygen limitation, the constructor that takes a C array
- * whose size is known at compile time does not appear in the documentation.
- *
- * To refer to const data of type T, ArrayRef<const T> is used. For both const
- * and non-const std::vector and std::array an ArrayRef view can be created.
- * Attempting to create a non-const ArrayRef of a const vector/array will result
- * in a compiler error in the respective constructor.
- *
- * For SIMD types there is template specialization available
- * (e.g. ArrayRef<SimdReal>) in gromacs/simd/simd_memory.h which should have
- * the same functionality as much as possible.
- *
- * \todo
- * This class is not complete. There are likely also methods missing (not
- * required for current usage).
- *
- * \inpublicapi
- * \ingroup module_utility
- */
-template<typename T>
-class ArrayRef
-{
-public:
-    //! Type of values stored in the reference.
-    typedef T value_type;
-    //! Type for representing size of the reference.
-    typedef size_t size_type;
-    //! Type for representing difference between two indices.
-    typedef ptrdiff_t difference_type;
-    //! Const reference to an element.
-    typedef const T& const_reference;
-    //! Const pointer to an element.
-    typedef const T* const_pointer;
-    //! Const iterator type to an element.
-    typedef ArrayRefIter<const T> const_iterator;
-    //! Reference to an element.
-    typedef T& reference;
-    //! Pointer to an element.
-    typedef T* pointer;
-    //! Iterator type to an element.
-    typedef ArrayRefIter<T> iterator;
-    //! Standard reverse iterator.
-    typedef std::reverse_iterator<iterator> reverse_iterator;
-    //! Standard reverse iterator.
-    typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
-
-    /*! \brief
-     * Constructs an empty reference.
-     */
-    ArrayRef() : begin_(nullptr), end_(nullptr) {}
-    /*! \brief
-     * Constructs a reference to a container or reference
-     *
-     * \param[in] o container to reference.
-     *
-     * Can be used to create a reference to a whole vector, std::array or
-     * an ArrayRef. The destination has to have a convertible pointer type
-     * (identical besides const or base class).
-     *
-     * Passed container must remain valid and not be reallocated for the
-     * lifetime of this object.
-     *
-     * This constructor is not explicit to allow directly passing
-     * a container to a method that takes ArrayRef.
-     *
-     * \todo Use std::is_convertible_v when CUDA 11 is a requirement.
-     */
-    template<typename U, typename = std::enable_if_t<std::is_convertible<typename std::remove_reference_t<U>::pointer, pointer>::value>>
-    ArrayRef(U&& o) : begin_(o.data()), end_(o.data() + o.size())
-    {
-    }
-    /*! \brief
-     * Constructs a reference to a particular range.
-     *
-     * \param[in] begin  Pointer to the beginning of a range.
-     * \param[in] end    Pointer to the end of a range.
-     *
-     * Passed pointers must remain valid for the lifetime of this object.
-     */
-    ArrayRef(pointer begin, pointer end) : begin_(begin), end_(end)
-    {
-        assert((end >= begin && "Invalid range"));
-        assert((begin != nullptr || (begin == nullptr && end == nullptr))
-               && "If begin is nullptr, end needs to be nullptr as well");
-    }
-    /*! \brief
-     * Constructs a reference to a particular range.
-     *
-     * \param[in] begin  Iterator to the beginning of a range.
-     * \param[in] end    iterator to the end of a range.
-     *
-     * Passed iterators must remain valid for the lifetime of this object.
-     */
-    ArrayRef(iterator begin, iterator end) : begin_(begin), end_(end)
-    {
-        assert((end >= begin && "Invalid range"));
-        assert((begin.data() != nullptr || (begin.data() == nullptr && end.data() == nullptr))
-               && "If begin is nullptr, end needs to be nullptr as well");
-    }
-    //! \cond
-    // Doxygen 1.8.5 doesn't parse the declaration correctly...
-    /*! \brief
-     * Constructs a reference to a C array.
-     *
-     * \param[in] array  C array to reference.
-     * \tparam    count  Deduced number of elements in \p array.
-     *
-     * This constructor can only be used with a real array (not with a
-     * pointer).  It constructs a reference to the whole array, without
-     * a need to pass the number of elements explicitly.  The compiler
-     * must be able to deduce the array size.
-     *
-     * Passed array must remain valid for the lifetime of this object.
-     *
-     * This constructor is not explicit to allow directly passing
-     * a C array to a function that takes an ArrayRef parameter.
-     */
-    template<size_t count>
-    ArrayRef(value_type (&array)[count]) : begin_(array), end_(array + count)
-    {
-    }
-    //! \endcond
-
-    //! Returns a reference to part of the memory.
-    ArrayRef subArray(size_type start, size_type count) const
-    {
-        return { begin_ + start, begin_ + start + count };
-    }
-    //! Returns an iterator to the beginning of the reference.
-    iterator begin() const { return iterator(begin_); }
-    //! Returns an iterator to the end of the reference.
-    iterator end() const { return iterator(end_); }
-    //! Returns an iterator to the reverse beginning of the reference.
-    reverse_iterator rbegin() const { return reverse_iterator(end()); }
-    //! Returns an iterator to the reverse end of the reference.
-    reverse_iterator rend() const { return reverse_iterator(begin()); }
-
-    /*! \brief Returns the size of the reference.
-     *
-     * \note Use ssize for any expression involving arithmetic operations
-         (including loop indices).
-     */
-    size_type size() const { return end_ - begin_; }
-    //! Returns the signed size of the reference.
-    difference_type ssize() const { return size(); }
-    //! Identical to size().
-    size_type capacity() const { return end_ - begin_; }
-    //! Whether the reference refers to no memory.
-    bool empty() const { return begin_ == end_; }
-
-    //! Access an element.
-    reference operator[](size_type n) const { return begin_[n]; }
-    //! Access an element (throws on out-of-range error).
-    reference at(size_type n) const
-    {
-        if (n >= size())
-        {
-            throw std::out_of_range("Vector index out of range");
-        }
-        return begin_[n];
-    }
-    //! Returns the first element.
-    reference front() const { return *(begin_); }
-    //! Returns the first element.
-    reference back() const { return *(end_ - 1); }
-
-    //! Returns a raw pointer to the contents of the array.
-    pointer data() const { return begin_.data(); }
-
-    /*! \brief
-     * Swaps referenced memory with the other object.
-     *
-     * The actual memory areas are not modified, only the references are
-     * swapped.
-     */
-    void swap(ArrayRef<T>& other)
-    {
-        std::swap(begin_, other.begin_);
-        std::swap(end_, other.end_);
-    }
-
-private:
-    iterator begin_;
-    iterator end_;
-};
-
-/*! \brief
- * Constructs a reference to a C array.
- *
- * \param[in] begin  Pointer to the beginning of array.
- * \param[in] size   Number of elements in array.
- *
- * Passed array must remain valid for the lifetime of this object.
- * If \c begin is nullptr, return an empty ArrayRef.
- */
-//! \related ArrayRef
-template<typename T>
-ArrayRef<T> arrayRefFromArray(T* begin, size_t size)
-{
-    return (begin != nullptr) ? ArrayRef<T>(begin, begin + size) : ArrayRef<T>{};
-}
-
-//! \copydoc arrayRefFromArray
-//! \related ArrayRef
-template<typename T>
-ArrayRef<const T> constArrayRefFromArray(const T* begin, size_t size)
-{
-    return (begin != nullptr) ? ArrayRef<const T>(begin, begin + size) : ArrayRef<const T>{};
-}
-
-/*! \brief
- * Create ArrayRef from container with type deduction
- *
- * \see ArrayRef
- *
- * \todo Use std::is_const_v when CUDA 11 is a requirement.
- */
-template<typename T>
-ArrayRef<std::conditional_t<std::is_const<T>::value, const typename T::value_type, typename T::value_type>>
-makeArrayRef(T& c)
-{
-    return c;
-}
-
-/*! \brief
- * Create ArrayRef to const T from container with type deduction
- *
- * \see ArrayRef
- */
-template<typename T>
-ArrayRef<const typename T::value_type> makeConstArrayRef(const T& c)
-{
-    return c;
-}
-
-/*! \brief
- * Simple swap method for ArrayRef objects.
- *
- * \see ArrayRef::swap()
- *
- * \ingroup module_utility
- */
-template<typename T>
-void swap(ArrayRef<T>& a, ArrayRef<T>& b)
-{
-    a.swap(b);
-}
-
-/*! \brief Return a vector that is a copy of an ArrayRef.
- *
- * This makes it convenient, clear, and performant (the compiler will
- * either do RVO to elide the temporary, or invoke the move constructor
- * taking the unnamed temporary) to write a declaration like
- *
- *   auto v = copyOf(arrayRef);
- *
- * \ingroup module_utility
- */
-template<typename T>
-std::vector<T> copyOf(const ArrayRef<const T>& arrayRef)
-{
-    return std::vector<T>(arrayRef.begin(), arrayRef.end());
-}
-
-} // namespace gmx
-
-#endif
diff --git a/src/include/gromacs/utility/basedefinitions.h b/src/include/gromacs/utility/basedefinitions.h
deleted file mode 100644 (file)
index 79dbbbc..0000000
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
- * 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,2015,2016,2017 by the GROMACS development team.
- * Copyright (c) 2018,2019,2020,2021, 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.
- */
-/*! \file
- * \brief
- * Basic types and macros used throughout \Gromacs.
- *
- * \inpublicapi
- * \ingroup module_utility
- */
-#ifndef GMX_UTILITY_BASEDEFINITIONS_H
-#define GMX_UTILITY_BASEDEFINITIONS_H
-
-#include <stdint.h>
-
-#include <cinttypes>
-#include <cstddef>
-
-//! Identical to bool
-typedef bool gmx_bool;
-
-#ifndef FALSE
-/** False value for ::gmx_bool. */
-#    define FALSE false
-#endif
-#ifndef TRUE
-/** True value for ::gmx_bool. */
-#    define TRUE true
-#endif
-/** Number of gmx_bool values. */
-#define BOOL_NR 2
-
-namespace gmx
-{
-/*! \brief Integer type for indexing into arrays or vectors
- *
- * Same as ptrdiff_t.
- */
-using index = std::ptrdiff_t;
-
-//! Return signed size of container
-template<typename T>
-index ssize(const T& t)
-{
-    return t.size();
-}
-} // namespace gmx
-
-/* ICC, GCC, MSVC, Pathscale, PGI, XLC support __restrict.
- * Any other compiler can be added here. */
-/*! \brief
- * Keyword to use in instead of C99 `restrict`.
- *
- * We cannot use `restrict` because it is only in C99, but not in C++.
- * This macro should instead be used to allow easily supporting different
- * compilers.
- */
-#define gmx_restrict __restrict
-
-/*! \def gmx_unused
- * \brief
- * Attribute to suppress compiler warnings about unused function parameters.
- *
- * This attribute suppresses compiler warnings about unused function arguments
- * by marking them as possibly unused.  Some arguments are unused but
- * have to be retained to preserve a function signature
- * that must match that of another function.
- * Some arguments are only used in *some* conditional compilation code paths
- * (e.g. MPI).
- */
-#ifndef gmx_unused
-#    ifdef __GNUC__
-/* GCC, clang, and any pretending to be or based on them */
-#        define gmx_unused __attribute__((unused))
-#    elif defined(__PGI)
-/* Portland group compilers */
-#        define gmx_unused __attribute__((unused))
-#    elif defined _MSC_VER
-/* MSVC */
-#        define gmx_unused /*@unused@*/
-#    elif defined(__xlC__)
-/* IBM */
-#        define gmx_unused __attribute__((unused))
-#    else
-#        define gmx_unused
-#    endif
-#endif
-
-/*! \brief Attribute to explicitly indicate that a parameter or
- * locally scoped variable is used just in debug mode.
- *
- * \ingroup module_utility
- */
-#ifdef NDEBUG
-#    define gmx_used_in_debug gmx_unused
-#else
-#    define gmx_used_in_debug
-#endif
-
-#ifndef __has_feature
-/** For compatibility with non-clang compilers. */
-#    define __has_feature(x) 0
-#endif
-
-/*! \brief
- * Macro to explicitly ignore an unused value.
- *
- * \ingroup module_utility
- *
- * \todo Deprecated - use gmx_unused
- */
-#define GMX_UNUSED_VALUE(value) (void)value
-
-#if defined(__GNUC__) && !defined(__clang__)
-#    define DO_PRAGMA(x) _Pragma(#    x)
-#    define GCC_DIAGNOSTIC_IGNORE(warning) \
-        _Pragma("GCC diagnostic push") DO_PRAGMA(GCC diagnostic ignored #warning)
-#    define GCC_DIAGNOSTIC_RESET _Pragma("GCC diagnostic pop")
-#else
-//! Ignore specified clang warning until GCC_DIAGNOSTIC_RESET
-#    define GCC_DIAGNOSTIC_IGNORE(warning)
-//! Reset all diagnostics to default
-#    define GCC_DIAGNOSTIC_RESET
-#endif
-
-#ifdef __clang__
-#    define DO_PRAGMA(x) _Pragma(#    x)
-#    define CLANG_DIAGNOSTIC_IGNORE(warning) \
-        _Pragma("clang diagnostic push") DO_PRAGMA(clang diagnostic ignored #warning)
-#    define CLANG_DIAGNOSTIC_RESET _Pragma("clang diagnostic pop")
-#else
-//! Ignore specified clang warning until CLANG_DIAGNOSTIC_RESET
-#    define CLANG_DIAGNOSTIC_IGNORE(warning)
-//! Reset all diagnostics to default
-#    define CLANG_DIAGNOSTIC_RESET
-#endif
-
-#ifdef _MSC_VER
-#    define MSVC_DIAGNOSTIC_IGNORE(id) __pragma(warning(push)) __pragma(warning(disable : id))
-#    define MSVC_DIAGNOSTIC_RESET __pragma(warning(pop))
-#else
-//! Ignore specified MSVC warning until MSVC_DIAGNOSTIC_RESET
-#    define MSVC_DIAGNOSTIC_IGNORE(warning)
-//! Reset all diagnostics to default
-#    define MSVC_DIAGNOSTIC_RESET
-#endif
-
-namespace gmx
-{
-namespace internal
-{
-/*! \cond internal */
-/*! \internal \brief
- * Helper for ignoring values in macros.
- *
- * \ingroup module_utility
- */
-template<typename T>
-static inline void ignoreValueHelper(const T& /*unused*/)
-{
-}
-//! \endcond
-} // namespace internal
-} // namespace gmx
-
-/*! \brief
- * Macro to explicitly ignore a return value of a call.
- *
- * Mainly meant for ignoring values of functions declared with
- * `__attribute__((warn_unused_return))`.  Makes it easy to find those places if
- * they need to be fixed, and document the intent in cases where the return
- * value really can be ignored.  It also makes it easy to adapt the approach so
- * that they don't produce warnings.  A cast to void doesn't remove the warning
- * in gcc, while adding a dummy variable can cause warnings about an unused
- * variable.
- *
- * \ingroup module_utility
- */
-#define GMX_IGNORE_RETURN_VALUE(call) ::gmx::internal::ignoreValueHelper(call)
-
-#endif
diff --git a/src/include/gromacs/utility/current_function.h b/src/include/gromacs/utility/current_function.h
deleted file mode 100644 (file)
index 2d5aef4..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * This file is part of the GROMACS molecular simulation package.
- *
- * Copyright (c) 2015,2019,2020,2021, 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.
- */
-/*! \file
- * \brief
- * Declares GMX_CURRENT_FUNCTION for getting the current function name.
- *
- * The implementation is essentially copied from Boost 1.55 (see reference below).
- *
- * \ingroup module_utility
- */
-#ifndef GMX_UTILITY_CURRENT_FUNCTION_H
-#define GMX_UTILITY_CURRENT_FUNCTION_H
-
-/*! \def GMX_CURRENT_FUNCTION
- * \brief
- * Expands to a string that provides the name of the current function.
- *
- * \ingroup module_utility
- */
-
-//
-//  boost/current_function.hpp - BOOST_CURRENT_FUNCTION
-//
-//  Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-//  http://www.boost.org/libs/utility/current_function.html
-//
-
-namespace gmx
-{
-
-namespace internal
-{
-
-//! Helper for defining GMX_CURRENT_FUNCTION.
-inline void current_function_helper()
-{
-
-#if defined(__GNUC__) || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) \
-        || (defined(__ICC) && (__ICC >= 600)) || defined(__ghs__)
-
-#    define GMX_CURRENT_FUNCTION __PRETTY_FUNCTION__
-
-#elif defined(__DMC__) && (__DMC__ >= 0x810)
-
-#    define GMX_CURRENT_FUNCTION __PRETTY_FUNCTION__
-
-#elif defined(__FUNCSIG__)
-
-#    define GMX_CURRENT_FUNCTION __FUNCSIG__
-
-#elif (defined(__IBMCPP__) && (__IBMCPP__ >= 500))
-
-#    define GMX_CURRENT_FUNCTION __FUNCTION__
-
-#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x550)
-
-#    define GMX_CURRENT_FUNCTION __FUNC__
-
-#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)
-
-#    define GMX_CURRENT_FUNCTION __func__
-
-#else
-
-#    define GMX_CURRENT_FUNCTION "(unknown)"
-
-#endif
-}
-
-} // namespace internal
-
-} // namespace gmx
-
-#endif
diff --git a/src/include/gromacs/utility/exceptions.h b/src/include/gromacs/utility/exceptions.h
deleted file mode 100644 (file)
index 8d7b62d..0000000
+++ /dev/null
@@ -1,751 +0,0 @@
-/*
- * This file is part of the GROMACS molecular simulation package.
- *
- * Copyright (c) 2011,2012,2013,2014,2015 by the GROMACS development team.
- * Copyright (c) 2016,2018,2019,2020, 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.
- */
-/*! \file
- * \brief
- * Declares common exception classes and macros for fatal error handling.
- *
- * The basic approach is the same as in boost::exception for storing additional
- * context information to exceptions, but since that functionality is a very
- * small and simple part of boost::exception, the code is duplicated here.
- *
- * \author Teemu Murtola <teemu.murtola@gmail.com>
- * \inpublicapi
- * \ingroup module_utility
- */
-#ifndef GMX_UTILITY_EXCEPTIONS_H
-#define GMX_UTILITY_EXCEPTIONS_H
-
-#include <cstdio>
-#include <cstdlib>
-
-#include <exception>
-#include <memory>
-#include <string>
-#include <type_traits>
-#include <typeindex>
-#include <vector>
-
-#include "gromacs/utility/basedefinitions.h"
-#include "gromacs/utility/gmxassert.h"
-
-namespace gmx
-{
-
-class TextWriter;
-
-namespace internal
-{
-//! Internal container type for storing a list of nested exceptions.
-typedef std::vector<std::exception_ptr> NestedExceptionList;
-
-/*! \internal
- * \brief
- * Base class for ExceptionInfo.
- *
- * This class only provides a way to store different ExceptionInfo objects in
- * the same container.  Actual access to the ExceptionInfo items is handled by
- * downcasting, after looking up the correct item based on its type.
- *
- * \ingroup module_utility
- */
-class IExceptionInfo
-{
-public:
-    virtual ~IExceptionInfo();
-    IExceptionInfo()                          = default;
-    IExceptionInfo(const IExceptionInfo&)     = default;
-    IExceptionInfo(IExceptionInfo&&) noexcept = default;
-    IExceptionInfo& operator=(const IExceptionInfo&) = default;
-    IExceptionInfo& operator=(IExceptionInfo&&) noexcept = default;
-};
-
-//! Smart pointer to manage IExceptionInfo ownership.
-typedef std::unique_ptr<IExceptionInfo> ExceptionInfoPointer;
-
-class ExceptionData;
-
-} // namespace internal
-
-//! \addtogroup module_utility
-//! \{
-
-/*! \brief
- * Stores additional context information for exceptions.
- *
- * \tparam  Tag  Tag type (typically, a forward-declared struct that is not
- *     defined anywhere) that makes all ExceptionInfo types unique, even if
- *     they have the same value type.
- * \tparam  T    Type of value this object stores.
- *     Needs to be copy-constructible.
- *
- * Example of declaring a new info type that stores an integer:
- * \code
-   typedef ExceptionInfo<struct ExceptionInfoMyInfo_, int> ExceptionInfoMyInfo;
-   \endcode
- *
- * \inpublicapi
- */
-template<class Tag, typename T>
-class ExceptionInfo : public internal::IExceptionInfo
-{
-public:
-    //! The type of value stored in this object.
-    typedef T value_type;
-
-    //! Creates an info object from given value.
-    explicit ExceptionInfo(const T& value) : value_(value) {}
-
-    //! Returns the stored value.
-    const T& value() const { return value_; }
-
-private:
-    T value_;
-};
-
-/*! \internal
- * \brief
- * Stores the location from which an exception was thrown.
- */
-struct ThrowLocation
-{
-    //! Creates an object for storing the throw location.
-    ThrowLocation(const char* func, const char* file, int line) : func(func), file(file), line(line)
-    {
-    }
-
-    //! Function where the throw occurred.
-    const char* func;
-    //! File where the throw occurred.
-    const char* file;
-    //! Line number where the throw occurred.
-    int line;
-};
-
-//! Stores `errno` value that triggered the exception.
-typedef ExceptionInfo<struct ExceptionInfoErrno_, int> ExceptionInfoErrno;
-//! Stores the function name that returned the `errno` in ExceptionInfoErrno.
-typedef ExceptionInfo<struct ExceptionInfoApiFunc_, const char*> ExceptionInfoApiFunction;
-//! Stores the location where the exception was thrown.
-typedef ExceptionInfo<struct ExceptionInfoLocation_, ThrowLocation> ExceptionInfoLocation;
-
-/*! \brief
- * Provides information for Gromacs exception constructors.
- *
- * This class exists to implement common functionality for initializing all
- * Gromacs exceptions without having extra code in each exception class.
- * In simple cases, it can be implicitly constructed by passing a simple string
- * to an exception constructor.
- * If more complex initialization is necessary, it is possible to explicitly
- * construct an object of this type and then call other methods to add
- * information before actually creating the exception object.
- *
- * \todo
- * With the exception of the reason string, information added with this class
- * is not currently accessible through any public API, except for calling
- * printFatalErrorMessage(), formatExceptionMessageToString() or
- * formatExceptionMessageToFile().  This is not implemented as there is not yet
- * need for it, and it is not clear what would be the best alternative for the
- * access.  It should be possible to refactor the internal implementation to
- * suit the needs of such external access without requiring changes in code
- * that throws these exceptions.
- *
- * \ingroup module_utility
- */
-class ExceptionInitializer
-{
-public:
-    /*! \brief
-     * Creates an initialized with the given string as the reason.
-     *
-     * \param[in] reason  Detailed reason for the exception.
-     * \throw     std::bad_alloc if out of memory.
-     *
-     * This constructor is not explicit to allow constructing exceptions
-     * with a plain string argument given to the constructor without adding
-     * extra code to each exception class.
-     */
-    ExceptionInitializer(const char* reason) : reason_(reason) {}
-    //! \copydoc ExceptionInitializer(const char *)
-    ExceptionInitializer(const std::string& reason) : reason_(reason) {}
-
-    /*! \brief
-     * Returns true if addCurrentExceptionAsNested() has been called.
-     *
-     * Provided for convenience for cases where exceptions will be added
-     * conditionally, and the caller wants to check whether any excetions
-     * were actually added.
-     */
-    bool hasNestedExceptions() const { return !nested_.empty(); }
-    /*! \brief
-     * Adds the currently caught exception as a nested exception.
-     *
-     * May be called multiple times; all provided exceptions will be added
-     * in a list of nested exceptions.
-     *
-     * Must not be called outside a catch block.
-     */
-    void addCurrentExceptionAsNested() { nested_.push_back(std::current_exception()); }
-    /*! \brief
-     * Adds the specified exception as a nested exception.
-     *
-     * May be called multiple times; all provided exceptions will be added
-     * in a list of nested exceptions.
-     *
-     * This is equivalent to throwing \p ex and calling
-     * addCurrentExceptionAsNested() in the catch block, but potentially
-     * more efficient.
-     */
-    template<class Exception>
-    void addNested(const Exception& ex)
-    {
-        nested_.push_back(std::make_exception_ptr(ex));
-    }
-
-private:
-    std::string                   reason_;
-    internal::NestedExceptionList nested_;
-
-    friend class GromacsException;
-};
-
-/*! \brief
- * Base class for all exception objects in Gromacs.
- *
- * \inpublicapi
- */
-class GromacsException : public std::exception
-{
-public:
-    // Explicitly declared because some compiler/library combinations warn
-    // about missing noexcept otherwise.
-    ~GromacsException() noexcept override {}
-
-    GromacsException()                            = default;
-    GromacsException(const GromacsException&)     = default;
-    GromacsException(GromacsException&&) noexcept = default;
-    GromacsException& operator=(const GromacsException&) = default;
-    GromacsException& operator=(GromacsException&&) noexcept = default;
-
-    /*! \brief
-     * Returns the reason string for the exception.
-     *
-     * The return value is the string that was passed to the constructor.
-     */
-    const char* what() const noexcept override;
-    /*! \brief
-     * Returns the error code corresponding to the exception type.
-     */
-    virtual int errorCode() const = 0;
-
-    /*! \brief
-     * Returns the value associated with given ExceptionInfo.
-     *
-     * \tparam  InfoType  ExceptionInfo type to get the value for.
-     * \returns Value set for `InfoType`, or `nullptr` if such info has not
-     *     been set.
-     *
-     * Does not throw.
-     */
-    template<class InfoType>
-    const typename InfoType::value_type* getInfo() const
-    {
-        const internal::IExceptionInfo* item = getInfo(typeid(InfoType));
-        if (item != nullptr)
-        {
-            GMX_ASSERT(dynamic_cast<const InfoType*>(item) != nullptr,
-                       "Invalid exception info item found");
-            return &static_cast<const InfoType*>(item)->value();
-        }
-        return nullptr;
-    }
-
-    /*! \brief
-     * Associates extra information with the exception.
-     *
-     * \tparam  Tag  ExceptionInfo tag type.
-     * \tparam  T          ExceptionInfo value type.
-     * \param[in] item  ExceptionInfo to associate.
-     * \throws std::bad_alloc if out of memory.
-     * \throws unspecified    any exception thrown by `T` copy construction.
-     *
-     * If an item of this type is already associated, it is overwritten.
-     */
-    template<class Tag, typename T>
-    void setInfo(const ExceptionInfo<Tag, T>& item)
-    {
-        typedef ExceptionInfo<Tag, T>  ItemType;
-        internal::ExceptionInfoPointer itemPtr(new ItemType(item));
-        setInfo(typeid(ItemType), std::move(itemPtr));
-    }
-
-    /*! \brief
-     * Adds context information to this exception.
-     *
-     * \param[in] context  Context string to add.
-     * \throws    std::bad_alloc if out of memory.
-     *
-     * Typical use is to add additional information higher up in the call
-     * stack using this function in a catch block and the rethrow the
-     * exception.
-     *
-     * \todo
-     * The added information is currently not accessible through what(),
-     * nor through any other means except for calling
-     * printFatalErrorMessage(), formatExceptionMessageToString() or
-     * formatExceptionMessageToFile(). See ExceptionInitializer for more
-     * discussion.
-     */
-    void prependContext(const std::string& context);
-
-protected:
-    /*! \brief
-     * Creates an exception object with the provided initializer/reason.
-     *
-     * \param[in] details  Initializer for the exception.
-     * \throws    std::bad_alloc if out of memory.
-     */
-    explicit GromacsException(const ExceptionInitializer& details);
-
-private:
-    const internal::IExceptionInfo* getInfo(const std::type_index& index) const;
-    void setInfo(const std::type_index& index, internal::ExceptionInfoPointer&& item);
-
-    std::shared_ptr<internal::ExceptionData> data_;
-};
-
-/*! \brief
- * Associates extra information with an exception.
- *
- * \tparam  Exception  Exception type (must be derived from GromacsException).
- * \tparam  Tag        ExceptionInfo tag.
- * \tparam  T          ExceptionInfo value type.
- * \param[in,out] ex   Exception to associate the information to.
- * \param[in]     item Information to associate.
- *
- * \internal
- * The association is done with a templated non-member operator of exactly this
- * form to make the simple syntax of GMX_THROW() possible.  To support this,
- * this operation needs to:
- *  - Allow setting information in a temporary to support
- *    `GMX_THROW(InvalidInputError(ex))`.
- *  - Return a copy of the same class it takes in.  The compiler needs
- *    this information to throw the correct type of exception.  This
- *    would be tedious to achieve with a member function (without a
- *    lot of code duplication).  Generally, \c ex will be a temporary,
- *    copied twice and returned by value, which the compiler will
- *    typically elide away (and anyway performance is not important
- *    when throwing).  We are not using the typical
- *    return-by-const-reference idiom for this operator so that
- *    tooling can reliably see that we are throwing by value.
- *  - Provide convenient syntax for adding multiple items.  A non-member
- *    function that would require nested calls would look ugly for such cases.
- *
- * The reason for the enable_if is that this way, it does not conflict with
- * other overloads of `operator<<` for ExceptionInfo objects, in case someone
- * would like to declare those.  But currently we do not have such overloads, so
- * if the enable_if causes problems with some compilers, it can be removed.
- *
- * \todo Use std::is_base_of_v when CUDA 11 is a requirement.
- */
-template<class Exception, class Tag, class T>
-inline std::enable_if_t<std::is_base_of<GromacsException, Exception>::value, Exception>
-operator<<(Exception ex, const ExceptionInfo<Tag, T>& item)
-{
-    ex.setInfo(item);
-    return ex;
-}
-
-/*! \brief
- * Exception class for file I/O errors.
- *
- * \inpublicapi
- */
-class FileIOError : public GromacsException
-{
-public:
-    /*! \brief
-     * Creates an exception object with the provided initializer/reason.
-     *
-     * \param[in] details  Initializer for the exception.
-     * \throws    std::bad_alloc if out of memory.
-     *
-     * It is possible to call this constructor either with an explicit
-     * ExceptionInitializer object (useful for more complex cases), or
-     * a simple string if only a reason string needs to be provided.
-     */
-    explicit FileIOError(const ExceptionInitializer& details) : GromacsException(details) {}
-
-    int errorCode() const override;
-};
-
-/*! \brief
- * Exception class for user input errors.
- *
- * Derived classes should be used to indicate the nature of the error instead
- * of throwing this class directly.
- *
- * \inpublicapi
- */
-class UserInputError : public GromacsException
-{
-protected:
-    //! \copydoc FileIOError::FileIOError()
-    explicit UserInputError(const ExceptionInitializer& details) : GromacsException(details) {}
-};
-
-/*! \brief
- * Exception class for situations where user input cannot be parsed/understood.
- *
- * \inpublicapi
- */
-class InvalidInputError : public UserInputError
-{
-public:
-    //! \copydoc FileIOError::FileIOError()
-    explicit InvalidInputError(const ExceptionInitializer& details) : UserInputError(details) {}
-
-    int errorCode() const override;
-};
-
-/*! \brief
- * Exception class for situations where user input is inconsistent.
- *
- * \inpublicapi
- */
-class InconsistentInputError : public UserInputError
-{
-public:
-    //! \copydoc FileIOError::FileIOError()
-    explicit InconsistentInputError(const ExceptionInitializer& details) : UserInputError(details)
-    {
-    }
-
-    int errorCode() const override;
-};
-
-/*! \brief
- * Exception class when a specified tolerance cannot be achieved.
- *
- * \inpublicapi
- */
-class ToleranceError : public GromacsException
-{
-public:
-    /*! \brief
-     * Creates an exception object with the provided initializer/reason.
-     *
-     * \param[in] details  Initializer for the exception.
-     * \throws    std::bad_alloc if out of memory.
-     *
-     * It is possible to call this constructor either with an explicit
-     * ExceptionInitializer object (useful for more complex cases), or
-     * a simple string if only a reason string needs to be provided.
-     */
-    explicit ToleranceError(const ExceptionInitializer& details) : GromacsException(details) {}
-
-    int errorCode() const override;
-};
-
-/*! \brief
- * Exception class for simulation instabilities.
- *
- * \inpublicapi
- */
-class SimulationInstabilityError : public GromacsException
-{
-public:
-    //! \copydoc FileIOError::FileIOError()
-    explicit SimulationInstabilityError(const ExceptionInitializer& details) :
-        GromacsException(details)
-    {
-    }
-
-    int errorCode() const override;
-};
-
-/*! \brief
- * Exception class for internal errors.
- *
- * \inpublicapi
- */
-class InternalError : public GromacsException
-{
-public:
-    //! \copydoc FileIOError::FileIOError()
-    explicit InternalError(const ExceptionInitializer& details) : GromacsException(details) {}
-
-    int errorCode() const override;
-};
-
-/*! \brief
- * Exception class for incorrect use of an API.
- *
- * \inpublicapi
- */
-class APIError : public GromacsException
-{
-public:
-    //! \copydoc FileIOError::FileIOError()
-    explicit APIError(const ExceptionInitializer& details) : GromacsException(details) {}
-
-    int errorCode() const override;
-};
-
-/*! \brief
- * Exception class for out-of-range values or indices
- *
- * \inpublicapi
- */
-class RangeError : public GromacsException
-{
-public:
-    //! \copydoc FileIOError::FileIOError()
-    explicit RangeError(const ExceptionInitializer& details) : GromacsException(details) {}
-
-    int errorCode() const override;
-};
-
-/*! \brief
- * Exception class for use of an unimplemented feature.
- *
- * \inpublicapi
- */
-class NotImplementedError : public APIError
-{
-public:
-    //! \copydoc FileIOError::FileIOError()
-    explicit NotImplementedError(const ExceptionInitializer& details) : APIError(details) {}
-
-    int errorCode() const override;
-};
-
-/*! \brief Exception class for use when ensuring that MPI ranks to throw
- * in a coordinated fashion.
- *
- * Generally all ranks that can throw would need to check for whether
- * an exception has been caught, communicate whether any rank caught,
- * then all throw one of these, with either a string that describes
- * any exception caught on that rank, or a generic string.
- *
- * \inpublicapi
- */
-class ParallelConsistencyError : public APIError
-{
-public:
-    //! \copydoc FileIOError::FileIOError()
-    explicit ParallelConsistencyError(const ExceptionInitializer& details) : APIError(details) {}
-
-    int errorCode() const override;
-};
-
-/*! \brief
- * Exception class for modular simulator.
- *
- * \inpublicapi
- */
-class ModularSimulatorError : public GromacsException
-{
-public:
-    //! \copydoc FileIOError::FileIOError()
-    explicit ModularSimulatorError(const ExceptionInitializer& details) : GromacsException(details)
-    {
-    }
-
-    [[nodiscard]] int errorCode() const override;
-};
-
-/*! \brief
- * Macro for throwing an exception.
- *
- * \param[in] e    Exception object to throw.
- *
- * Using this macro instead of \c throw directly makes it possible to uniformly
- * attach information into the exception objects.
- * \p e should evaluate to an instance of an object derived from
- * GromacsException.
- *
- * Basic usage:
- * \code
-   if (value < 0)
-   {
-       GMX_THROW(InconsistentUserInput("Negative values not allowed for value"));
-   }
-   \endcode
- */
-#define GMX_THROW(e) \
-    throw(e) << gmx::ExceptionInfoLocation(gmx::ThrowLocation(GMX_CURRENT_FUNCTION, __FILE__, __LINE__))
-
-/*! \brief
- * Macro for throwing an exception based on errno.
- *
- * \param[in] e       Exception object to throw.
- * \param[in] syscall Name of the syscall that returned the error.
- * \param[in] err     errno value returned by the syscall.
- *
- * This macro provides a convenience interface for throwing an exception to
- * report an error based on a errno value.  In addition to adding the necessary
- * information to the exception object, the macro also ensures that \p errno is
- * evaluated before, e.g., the constructor of \p e may call other functions
- * that could overwrite the errno value.
- * \p e should evaluate to an instance of an object derived from
- * GromacsException.
- *
- * Typical usage (note that gmx::File wraps this particular case):
- * \code
-   FILE *fp = fopen("filename.txt", "r");
-   if (fp == NULL)
-   {
-       GMX_THROW(FileIOError("Could not open file"), "fopen", errno);
-   }
-   \endcode
- */
-#define GMX_THROW_WITH_ERRNO(e, syscall, err)                     \
-    do                                                            \
-    {                                                             \
-        int stored_errno_ = (err);                                \
-        GMX_THROW((e) << gmx::ExceptionInfoErrno(stored_errno_)   \
-                      << gmx::ExceptionInfoApiFunction(syscall)); \
-    } while (0)
-// TODO: Add an equivalent macro for Windows GetLastError
-
-/*! \brief
- * Formats a standard fatal error message for reporting an exception.
- *
- * \param[in] fp  %File to format the message to.
- * \param[in] ex  Exception to format.
- *
- * Does not throw.  If memory allocation fails or some other error occurs
- * while formatting the error, tries to print a reasonable alternative message.
- *
- * Normal usage in Gromacs command-line programs is like this:
- * \code
-   int main(int argc, char *argv[])
-   {
-       gmx::init(&argc, &argv);
-       try
-       {
-           // The actual code for the program
-           return 0;
-       }
-       catch (const std::exception &ex)
-       {
-           gmx::printFatalErrorMessage(stderr, ex);
-           return gmx::processExceptionAtExit(ex);
-       }
-   }
-   \endcode
- */
-void printFatalErrorMessage(FILE* fp, const std::exception& ex);
-/*! \brief
- * Formats an error message for reporting an exception.
- *
- * \param[in] ex  Exception to format.
- * \returns   Formatted string containing details of \p ex.
- * \throws    std::bad_alloc if out of memory.
- */
-std::string formatExceptionMessageToString(const std::exception& ex);
-/*! \brief
- * Formats an error message for reporting an exception.
- *
- * \param     fp  %File to write the message to.
- * \param[in] ex  Exception to format.
- * \throws    std::bad_alloc if out of memory.
- */
-void formatExceptionMessageToFile(FILE* fp, const std::exception& ex);
-/*! \brief
- * Formats an error message for reporting an exception.
- *
- * \param     writer  Writer to use for writing the message.
- * \param[in] ex      Exception to format.
- * \throws    std::bad_alloc if out of memory.
- */
-void formatExceptionMessageToWriter(TextWriter* writer, const std::exception& ex);
-/*! \brief
- * Handles an exception that is causing the program to terminate.
- *
- * \param[in] ex  Exception that is the cause for terminating the program.
- * \returns   Return code to return from main().
- *
- * This method should be called as the last thing before terminating the
- * program because of an exception.  It exists to terminate the program as
- * gracefully as possible in the case of MPI processing (but the current
- * implementation always calls MPI_Abort()).
- *
- * See printFatalErrorMessage() for example usage.
- *
- * Does not throw.
- */
-int processExceptionAtExit(const std::exception& ex);
-
-/*! \brief
- * Helper function for terminating the program on an exception.
- *
- * \param[in] ex  Exception that is the cause for terminating the program.
- *
- * Does not throw, and does not return.
- */
-[[noreturn]] void processExceptionAsFatalError(const std::exception& ex);
-
-/*! \brief
- * Macro for catching exceptions at C++ -> C boundary.
- *
- * This macro is intended for uniform handling of exceptions when C++ code is
- * called from C code within Gromacs.  Since most existing code is written
- * using the assumption that fatal errors terminate the program, this macro
- * implements this behavior for exceptions.  It should only be used in cases
- * where the error cannot be propagated upwards using return values or such.
- *
- * Having this as a macro instead of having the same code in each place makes
- * it easy to 1) find all such locations in the code, and 2) change the exact
- * behavior if needed.
- *
- * Usage:
-   \code
-   try
-   {
-       // C++ code
-   }
-   GMX_CATCH_ALL_AND_EXIT_WITH_FATAL_ERROR;
-   \endcode
- */
-#define GMX_CATCH_ALL_AND_EXIT_WITH_FATAL_ERROR \
-    catch (const std::exception& ex) { ::gmx::processExceptionAsFatalError(ex); }
-
-//! \}
-
-} // namespace gmx
-
-#endif
diff --git a/src/include/gromacs/utility/gmxassert.h b/src/include/gromacs/utility/gmxassert.h
deleted file mode 100644 (file)
index ec31a94..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * This file is part of the GROMACS molecular simulation package.
- *
- * Copyright (c) 2011-2018, The GROMACS development team.
- * Copyright (c) 2019,2020,2021, 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.
- */
-/*! \file
- * \brief
- * Defines assert macros customized for Gromacs.
- *
- * \author Teemu Murtola <teemu.murtola@gmail.com>
- * \inpublicapi
- * \ingroup module_utility
- */
-#ifndef GMX_UTILITY_GMXASSERT_H
-#define GMX_UTILITY_GMXASSERT_H
-
-#include "current_function.h"
-
-//! \addtogroup module_utility
-//! \{
-
-/*! \def GMX_RELEASE_ASSERT
- * \brief
- * Macro for asserts that should also be present in the release version.
- *
- * Regardless of NDEBUG, this macro checks \p condition, and if it is not true,
- * it calls the assert handler.
- *
- * Although this macro currently calls abort() if the assertion fails, it
- * should only be used in a context where it is safe to throw an exception to
- * keep the option open.
- */
-#ifdef GMX_DISABLE_ASSERTS
-#    define GMX_RELEASE_ASSERT(condition, msg)
-#else
-#    ifdef _MSC_VER
-#        define GMX_RELEASE_ASSERT(condition, msg)                \
-            ((void)((condition) ? (void)0                         \
-                                : ::gmx::internal::assertHandler( \
-                                        #condition, msg, GMX_CURRENT_FUNCTION, __FILE__, __LINE__)))
-#    else
-// Use an "immediately invoked function expression" to allow being
-// used in constexpr context with older GCC versions
-// https://akrzemi1.wordpress.com/2017/05/18/asserts-in-constexpr-functions/
-#        define GMX_RELEASE_ASSERT(condition, msg)                                                         \
-            ((void)((condition) ? (void)0 : [&]() {                                                        \
-                ::gmx::internal::assertHandler(#condition, msg, GMX_CURRENT_FUNCTION, __FILE__, __LINE__); \
-            }()))
-#    endif
-#endif
-/*! \def GMX_ASSERT
- * \brief
- * Macro for debug asserts.
- *
- * If NDEBUG is defined, this macro expands to nothing.
- * If it is not defined, it will work exactly like ::GMX_RELEASE_ASSERT.
- *
- * \see ::GMX_RELEASE_ASSERT
- */
-#ifdef NDEBUG
-#    define GMX_ASSERT(condition, msg) ((void)0)
-#else
-#    define GMX_ASSERT(condition, msg) GMX_RELEASE_ASSERT(condition, msg)
-#endif
-
-//! \}
-
-namespace gmx
-{
-
-/*! \cond internal */
-namespace internal
-{
-
-/*! \brief
- * Called when an assert fails.
- *
- * Should not be called directly, but instead through ::GMX_ASSERT or
- * ::GMX_RELEASE_ASSERT.
- *
- * \ingroup module_utility
- */
-[[noreturn]] void
-assertHandler(const char* condition, const char* msg, const char* func, const char* file, int line);
-
-} // namespace internal
-//! \endcond
-
-} // namespace gmx
-
-#endif
diff --git a/src/include/gromacs/utility/listoflists.h b/src/include/gromacs/utility/listoflists.h
deleted file mode 100644 (file)
index 48fc0c8..0000000
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * This file is part of the GROMACS molecular simulation package.
- *
- * Copyright (c) 2019,2020,2021, 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.
- */
-/*! \file
- * \brief
- * Declares gmx::ListOfLists
- *
- * \author Berk Hess <hess@kth.se>
- * \inpublicapi
- * \ingroup module_utility
- */
-#ifndef GMX_UTILITY_LISTOFLISTS_H
-#define GMX_UTILITY_LISTOFLISTS_H
-
-#include <vector>
-
-#include "gromacs/utility/arrayref.h"
-#include "gromacs/utility/basedefinitions.h"
-#include "gromacs/utility/exceptions.h"
-
-namespace gmx
-{
-
-/*! \brief A list of lists, optimized for performance
- *
- * This class holds a list of \p size() lists of elements of type \p T.
- * To optimize performance, the only modification operation supporting
- * is adding a new list at the end of the list of lists.
- *
- * This implementation stores all data internally in two std::vector objects
- * and thereby avoids the overhead of managing \p size() separate objects
- * in memory.
- *
- * Internal storage consists of one std::vector<int> listRanges_ of size number
- * of lists plus one and a std::vector<T> elements_ with the elements of all
- * lists concatenated. List i is stored in entries listRanges_[i] to
- * listRanges_[i+1] in elements_.
- *
- * \note This class is currently limited to arithmetic types, mainly because
- * this should only be used for performance critical applications.
- * When performance is not critical, a std::vector of std::vector can be used.
- *
- * \tparam T value type
- */
-
-template<typename T>
-class ListOfLists
-{
-    // TODO: Use std::is_arithmetic_v when CUDA 11 is a requirement.
-    static_assert(std::is_arithmetic<T>::value, "This class is limited to arithmetic types");
-
-public:
-    //! Constructs an empty list of lists
-    ListOfLists() = default;
-
-    /*! \brief Constructs a list of list from raw data in internal layout
-     *
-     * Does basic consistency checks and throws when one of those fail.
-     *
-     * \param[in] listRanges  Ranges of the lists concatenated (see above), is consumed
-     * \param[in] elements    Elements for all lists concatenated, is consumed
-     */
-    ListOfLists(std::vector<int>&& listRanges, std::vector<T>&& elements) :
-        listRanges_(std::move(listRanges)), elements_(std::move(elements))
-    {
-        if (listRanges_.empty() || listRanges_.at(0) != 0)
-        {
-            GMX_THROW(InconsistentInputError(
-                    "listRanges does not have a first element with value 0"));
-        }
-        if (int(elements_.size()) != listRanges_.back())
-        {
-            GMX_THROW(InconsistentInputError(
-                    "The size of elements does not match the last value in listRanges"));
-        }
-    }
-
-    //! Returns the number of lists
-    std::size_t size() const { return listRanges_.size() - 1; }
-
-    /*! \brief Returns the number of lists
-     *
-     * \note Use ssize for any expression involving arithmetic operations
-     * (including loop indices).
-     */
-    index ssize() const { return index(listRanges_.size()) - 1; }
-
-    //! Returns whether the list holds no lists
-    bool empty() const { return listRanges_.size() == 1; }
-
-    //! Returns the sum of the number of elements over all lists
-    int numElements() const { return listRanges_.back(); }
-
-    //! Appends a new list with elements \p values, pass {} to add an empty list
-    void pushBack(ArrayRef<const T> values)
-    {
-        elements_.insert(elements_.end(), values.begin(), values.end());
-        listRanges_.push_back(int(elements_.size()));
-    }
-
-    //! Appends a new list with \p numElements elements
-    void pushBackListOfSize(int numElements)
-    {
-        // With arithmetic types enforced, this assertion is always true
-        // TODO: Use std::is_default_constructible_v when CUDA 11 is a requirement.
-        static_assert(std::is_default_constructible<T>::value,
-                      "pushBackListOfSize should only be called with default constructable types");
-        elements_.resize(elements_.size() + numElements);
-        listRanges_.push_back(int(elements_.size()));
-    }
-
-    //! Returns an ArrayRef to the elements of the list with the given index
-    ArrayRef<const T> operator[](std::size_t listIndex) const
-    {
-        return ArrayRef<const T>(elements_.data() + listRanges_[listIndex],
-                                 elements_.data() + listRanges_[listIndex + 1]);
-    }
-
-    //! Returns the list of elements for the list with index \p listIndex, throws an \p out_of_range exception when out of range
-    ArrayRef<const T> at(std::size_t listIndex) const
-    {
-        return ArrayRef<const T>(elements_.data() + listRanges_.at(listIndex),
-                                 elements_.data() + listRanges_.at(listIndex + 1));
-    }
-
-    /*! \brief Returns a reference to the first list
-     *
-     * \returns a reference to the first list
-     */
-    ArrayRef<T> front()
-    {
-        GMX_ASSERT(size() > 0, "Must contain a list if front() is called");
-        auto* beginPtr = elements_.data();
-        auto* endPtr   = beginPtr + listRanges_[1];
-        return { beginPtr, endPtr };
-    }
-    /*! \brief Returns a reference to the final list
-     *
-     * \returns a reference to the final list
-     */
-    ArrayRef<T> back()
-    {
-        GMX_ASSERT(size() > 0, "Must contain a list if bank() is called");
-        auto endIndex   = *(listRanges_.end() - 1);
-        auto beginIndex = *(listRanges_.end() - 2);
-        return { elements_.data() + beginIndex, elements_.data() + endIndex };
-    }
-
-    //! Clears the list
-    void clear()
-    {
-        listRanges_.resize(1);
-        elements_.clear();
-    }
-
-    //! Appends a ListOfLists at the end and increments the appended elements by \p offset
-    void appendListOfLists(const ListOfLists& listOfLists, const T offset = 0)
-    {
-        listRanges_.insert(
-                listRanges_.end(), listOfLists.listRanges_.begin() + 1, listOfLists.listRanges_.end());
-        const int oldNumElements = elements_.size();
-        for (std::size_t i = listRanges_.size() - listOfLists.size(); i < listRanges_.size(); i++)
-        {
-            listRanges_[i] += oldNumElements;
-        }
-        elements_.insert(elements_.end(), listOfLists.elements_.begin(), listOfLists.elements_.end());
-
-        if (offset != 0)
-        {
-            for (std::size_t i = elements_.size() - listOfLists.elements_.size(); i < elements_.size(); i++)
-            {
-                elements_[i] += offset;
-            }
-        }
-    }
-
-    //! Returns concatenated ranges of the lists (see above for details)
-    ArrayRef<const int> listRangesView() const { return listRanges_; }
-
-    //! Returns the a view of the elements of all lists concatenated
-    ArrayRef<const T> elementsView() const { return elements_; }
-
-private:
-    //! The ranges of the lists, list i uses range \p listRanges_[i], \p listRanges_[i+1].
-    std::vector<int> listRanges_ = { 0 };
-    //! The elements in all lists concatenated
-    std::vector<T> elements_;
-};
-
-} // namespace gmx
-
-#endif
diff --git a/src/include/gromacs/utility/real.h b/src/include/gromacs/utility/real.h
deleted file mode 100644 (file)
index 9ca6562..0000000
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * 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,2015,2017,2018 by the GROMACS development team.
- * Copyright (c) 2019,2020,2021, 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.
- */
-/*! \file
- * \brief
- * Declares `real` and related constants.
- *
- * \inpublicapi
- * \ingroup module_utility
- */
-#ifndef GMX_UTILITY_REAL_H
-#define GMX_UTILITY_REAL_H
-
-/*! \brief Double precision accuracy */
-#define GMX_DOUBLE_EPS 2.2204460492503131e-16
-
-/*! \brief Maximum double precision value - reduced 1 unit in last digit for MSVC */
-#define GMX_DOUBLE_MAX 1.7976931348623157e+308
-
-/*! \brief Minimum double precision value */
-#define GMX_DOUBLE_MIN 2.2250738585072014e-308
-
-/*! \brief Single precision accuracy */
-#define GMX_FLOAT_EPS 1.19209290e-07F
-
-/*! \brief Maximum single precision value - reduced 1 unit in last digit for MSVC */
-#define GMX_FLOAT_MAX 3.40282346E+38F
-
-/*! \brief Minimum single precision value */
-#define GMX_FLOAT_MIN 1.175494351E-38F
-
-#ifdef __PGI
-/* The portland group x86 C/C++ compilers do not treat negative zero initializers
- * correctly, but "optimizes" them to positive zero, so we implement it explicitly.
- * These constructs are optimized to simple loads at compile time. If you want to
- * use them on other compilers those have to support gcc preprocessor extensions.
- * Note: These initializers might be sensitive to the endianness (which can
- * be different for byte and word order), so check that it works for your platform
- * and add a separate section if necessary before adding to the ifdef above.
- */
-#    define GMX_DOUBLE_NEGZERO                 \
-        ({                                     \
-            const union                        \
-            {                                  \
-                int    di[2];                  \
-                double d;                      \
-            } _gmx_dzero = { 0, -2147483648 }; \
-            _gmx_dzero.d;                      \
-        })
-#    define GMX_FLOAT_NEGZERO               \
-        ({                                  \
-            const union                     \
-            {                               \
-                int   fi;                   \
-                float f;                    \
-            } _gmx_fzero = { -2147483648 }; \
-            _gmx_fzero.f;                   \
-        })
-#else
-/*! \brief Negative zero in double */
-#    define GMX_DOUBLE_NEGZERO (-0.0)
-
-/*! \brief Negative zero in float */
-#    define GMX_FLOAT_NEGZERO (-0.0F)
-#endif
-
-/*! \typedef real
- * \brief Precision-dependent \Gromacs floating-point type.
- */
-/*! \def HAVE_REAL
- * \brief Used to check whether `real` is already defined.
- */
-/*! \def GMX_MPI_REAL
- * \brief MPI data type for `real`.
- */
-/*! \def GMX_REAL_EPS
- * \brief Accuracy for `real`.
- */
-/*! \def GMX_REAL_MIN
- * \brief Smallest non-zero value for `real`.
- */
-/*! \def GMX_REAL_MAX
- * \brief Largest finite value for `real`.
- */
-/*! \def GMX_REAL_NEGZERO
- * \brief Negative zero for `real`.
- */
-/*! \def gmx_real_fullprecision_pfmt
- * \brief Format string for full `real` precision.
- */
-/*! \def GMX_FLOAT_MAX_SIMD_WIDTH
- * \brief The maximum supported number of `float` elements in a SIMD register.
- */
-/*! \def GMX_DOUBLE_MAX_SIMD_WIDTH
- * \brief The maximum supported number of `double` elements in a SIMD register.
- */
-/*! \def GMX_REAL_MAX_SIMD_WIDTH
- * \brief The maximum supported number of `real` elements in a SIMD register.
- */
-
-#define GMX_FLOAT_MAX_SIMD_WIDTH 16
-#define GMX_DOUBLE_MAX_SIMD_WIDTH 8
-
-#if GMX_DOUBLE
-
-#    ifndef HAVE_REAL
-typedef double real;
-#        define HAVE_REAL
-#    endif
-
-#    define GMX_MPI_REAL MPI_DOUBLE
-#    define GMX_REAL_EPS GMX_DOUBLE_EPS
-#    define GMX_REAL_MIN GMX_DOUBLE_MIN
-#    define GMX_REAL_MAX GMX_DOUBLE_MAX
-#    define GMX_REAL_NEGZERO GMX_DOUBLE_NEGZERO
-#    define gmx_real_fullprecision_pfmt "%21.14e"
-#    define GMX_REAL_MAX_SIMD_WIDTH GMX_DOUBLE_MAX_SIMD_WIDTH
-
-#else /* GMX_DOUBLE */
-
-#    ifndef HAVE_REAL
-typedef float real;
-#        define HAVE_REAL
-#    endif
-
-#    define GMX_MPI_REAL MPI_FLOAT
-#    define GMX_REAL_EPS GMX_FLOAT_EPS
-#    define GMX_REAL_MIN GMX_FLOAT_MIN
-#    define GMX_REAL_MAX GMX_FLOAT_MAX
-#    define GMX_REAL_NEGZERO GMX_FLOAT_NEGZERO
-#    define gmx_real_fullprecision_pfmt "%14.7e"
-#    define GMX_REAL_MAX_SIMD_WIDTH GMX_FLOAT_MAX_SIMD_WIDTH
-
-#endif /* GMX_DOUBLE */
-
-/*! \brief User defined literal for real numbers.
- *
- * Examples: 2._real, 2.5_real, .5_real. The number is always of type real.
- *
- * It is best to use a real constant whenever it is used only with operands which are real.
- * If a constant is double than the compiler is forced to do operations directly involving the
- * constant in double even if all variables are real. A constant shouldn't be real when used with
- * double operands, because then the constant is less accurate with GMX_DOUBLE=no.
- *
- * See https://en.cppreference.com/w/cpp/language/user_literal for details on this lanuage feature.
- */
-constexpr real operator"" _real(long double x)
-{
-    return real(x);
-}
-
-#endif