├── .gitignore ├── .gitmodules ├── LICENSE ├── Makefile.in ├── README.md ├── aclocal.m4 ├── build-aux ├── install-sh └── m4 │ ├── ax_check_compile_flag.m4 │ ├── ax_cxx_compile_stdcxx.m4 │ ├── ax_cxx_compile_stdcxx_0x.m4 │ ├── ax_cxx_compile_stdcxx_11.m4 │ ├── ax_cxx_compile_stdcxx_14.m4 │ ├── ax_cxx_compile_stdcxx_17.m4 │ ├── ax_lib_sqlite3.m4 │ ├── ax_openmp.m4 │ ├── ax_subdirs_configure.m4 │ ├── my_arg_enable.m4 │ ├── my_check_stdlib_libcxx.m4 │ └── my_set_cc_flag.m4 ├── configuration.cpp ├── configuration.hpp ├── configure.ac ├── experiment ├── aging2_experiment.cpp ├── aging2_experiment.hpp ├── aging2_result.cpp ├── aging2_result.hpp ├── details │ ├── aging2_master.cpp │ ├── aging2_master.hpp │ ├── aging2_worker.cpp │ ├── aging2_worker.hpp │ ├── async_batch.cpp │ ├── async_batch.hpp │ ├── build_thread.cpp │ ├── build_thread.hpp │ ├── latency.cpp │ └── latency.hpp ├── graphalytics.cpp ├── graphalytics.hpp ├── insert_only.cpp ├── insert_only.hpp ├── mixed_workload.cpp ├── mixed_workload.hpp ├── mixed_workload_result.cpp ├── mixed_workload_result.hpp ├── statistics.cpp ├── statistics.hpp ├── validate.cpp └── validate.hpp ├── graph ├── cbytearray.cpp ├── cbytearray.hpp ├── edge.cpp ├── edge.hpp ├── edge_stream.cpp ├── edge_stream.hpp ├── vertex_list.cpp └── vertex_list.hpp ├── library ├── baseline │ ├── adjacency_list.cpp │ ├── adjacency_list.hpp │ ├── csr.cpp │ ├── csr.hpp │ ├── dummy.cpp │ └── dummy.hpp ├── graphone │ ├── graphone.cpp │ ├── graphone.hpp │ └── internal.hpp ├── interface.cpp ├── interface.hpp ├── livegraph │ ├── livegraph_driver.cpp │ └── livegraph_driver.hpp ├── llama-dv │ ├── llama-dv.cpp │ └── llama-dv.hpp ├── llama │ ├── llama_bfs.cpp │ ├── llama_cdlp.cpp │ ├── llama_class.cpp │ ├── llama_class.hpp │ ├── llama_internal.cpp │ ├── llama_internal.hpp │ ├── llama_lcc.cpp │ ├── llama_mutex.hpp │ ├── llama_pagerank.cpp │ ├── llama_ref.cpp │ ├── llama_ref.hpp │ ├── llama_sssp.cpp │ └── llama_wcc.cpp ├── microbenchmarks │ ├── microbenchmarks_driver.cpp │ └── microbenchmarks_driver.hpp ├── sortledton │ ├── not_implemented.cpp │ ├── not_implemented.hpp │ ├── sortledton_driver.cpp │ └── sortledton_driver.hpp ├── sortledton_v2 │ ├── sortledton_driver_v2.cpp │ └── sortledton_driver_v2.hpp ├── stinger-dv │ ├── stinger-dv.cpp │ └── stinger-dv.hpp ├── stinger │ ├── community_detection.cpp │ ├── connected_components.cpp │ ├── local_clustering_coefficient.cpp │ ├── pagerank.cpp │ ├── shortest_paths.cpp │ ├── stinger.hpp │ ├── stinger_batch.cpp │ ├── stinger_error.hpp │ ├── stinger_ref.cpp │ └── stinger_unsafe.cpp └── teseo │ ├── teseo_driver.cpp │ ├── teseo_driver.hpp │ ├── teseo_openmp.cpp │ ├── teseo_openmp.hpp │ ├── teseo_real_vtx.cpp │ └── teseo_real_vtx.hpp ├── main_driver.cpp ├── network ├── client.cpp ├── client.hpp ├── error.hpp ├── internal.cpp ├── internal.hpp ├── message.cpp ├── message.hpp ├── server.cpp └── server.hpp ├── reader ├── binary_reader.cpp ├── binary_reader.hpp ├── dimacs9_reader.cpp ├── dimacs9_reader.hpp ├── format.cpp ├── format.hpp ├── graphalytics_reader.cpp ├── graphalytics_reader.hpp ├── graphlog_reader.cpp ├── graphlog_reader.hpp ├── metis_reader.cpp ├── metis_reader.hpp ├── plain_reader.cpp ├── plain_reader.hpp ├── reader.cpp ├── reader.hpp ├── utility.cpp └── utility.hpp ├── tests ├── graphs │ ├── ldbc_graphalytics │ │ ├── example-directed-BFS │ │ ├── example-directed-CDLP │ │ ├── example-directed-LCC │ │ ├── example-directed-PR │ │ ├── example-directed-SSSP │ │ ├── example-directed-WCC │ │ ├── example-directed-compressed.ez │ │ ├── example-directed-compressed.properties │ │ ├── example-directed-compressed.vz │ │ ├── example-directed.e │ │ ├── example-directed.properties │ │ ├── example-directed.v │ │ ├── example-undirected-BFS │ │ ├── example-undirected-CDLP │ │ ├── example-undirected-LCC │ │ ├── example-undirected-PR │ │ ├── example-undirected-SSSP │ │ ├── example-undirected-WCC │ │ ├── example-undirected-compressed.ez │ │ ├── example-undirected-compressed.graphlog │ │ ├── example-undirected-compressed.properties │ │ ├── example-undirected-compressed.vz │ │ ├── example-undirected-dense.ez │ │ ├── example-undirected-dense.properties │ │ ├── example-undirected-dense.vz │ │ ├── example-undirected-nonweighted.ez │ │ ├── example-undirected-nonweighted.properties │ │ ├── example-undirected-nonweighted.vz │ │ ├── example-undirected-validate.pl │ │ ├── example-undirected.e │ │ ├── example-undirected.graphlog │ │ ├── example-undirected.properties │ │ └── example-undirected.v │ ├── non_weighted.el │ ├── rome99.gr │ ├── rome99.no_duplicates.gr │ ├── shortest_paths.wel │ ├── weighted_no_comments.dimacs9 │ ├── weighted_no_comments.metis │ ├── weighted_no_comments.wel │ ├── weighted_with_comments.dimacs9 │ ├── weighted_with_comments.metis │ └── weighted_with_comments.wel ├── test_aging2.cpp ├── test_async_batch.cpp ├── test_csr.cpp ├── test_edge_stream.cpp ├── test_graphalytics.cpp ├── test_graphlog.cpp ├── test_graphone_bugfixes.cpp ├── test_livegraph_bugfixes.cpp ├── test_llama_bugfixes.cpp ├── test_performance.cpp ├── test_readers.cpp ├── test_updates_directed.cpp └── test_updates_undirected.cpp ├── third-party ├── cxxopts │ ├── LICENSE │ └── cxxopts.hpp ├── gapbs │ └── gapbs.hpp ├── googletest │ ├── .travis.yml │ ├── BUILD.bazel │ ├── CMakeLists.txt │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── Makefile.am │ ├── README.md │ ├── WORKSPACE │ ├── appveyor.yml │ ├── ci │ │ ├── build-linux-autotools.sh │ │ ├── build-linux-bazel.sh │ │ ├── env-linux.sh │ │ ├── env-osx.sh │ │ ├── get-nprocessors.sh │ │ ├── install-linux.sh │ │ ├── install-osx.sh │ │ ├── log-config.sh │ │ └── travis.sh │ ├── configure.ac │ ├── googlemock │ │ ├── CHANGES │ │ ├── CMakeLists.txt │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── Makefile.am │ │ ├── README.md │ │ ├── build-aux │ │ │ └── .keep │ │ ├── cmake │ │ │ ├── gmock.pc.in │ │ │ └── gmock_main.pc.in │ │ ├── configure.ac │ │ ├── docs │ │ │ ├── CheatSheet.md │ │ │ ├── CookBook.md │ │ │ ├── DesignDoc.md │ │ │ ├── Documentation.md │ │ │ ├── ForDummies.md │ │ │ ├── FrequentlyAskedQuestions.md │ │ │ └── KnownIssues.md │ │ ├── include │ │ │ └── gmock │ │ │ │ ├── gmock-actions.h │ │ │ │ ├── gmock-cardinalities.h │ │ │ │ ├── gmock-generated-actions.h │ │ │ │ ├── gmock-generated-actions.h.pump │ │ │ │ ├── gmock-generated-function-mockers.h │ │ │ │ ├── gmock-generated-function-mockers.h.pump │ │ │ │ ├── gmock-generated-matchers.h │ │ │ │ ├── gmock-generated-matchers.h.pump │ │ │ │ ├── gmock-generated-nice-strict.h │ │ │ │ ├── gmock-generated-nice-strict.h.pump │ │ │ │ ├── gmock-matchers.h │ │ │ │ ├── gmock-more-actions.h │ │ │ │ ├── gmock-more-matchers.h │ │ │ │ ├── gmock-spec-builders.h │ │ │ │ ├── gmock.h │ │ │ │ └── internal │ │ │ │ ├── custom │ │ │ │ ├── README.md │ │ │ │ ├── gmock-generated-actions.h │ │ │ │ ├── gmock-generated-actions.h.pump │ │ │ │ ├── gmock-matchers.h │ │ │ │ └── gmock-port.h │ │ │ │ ├── gmock-generated-internal-utils.h │ │ │ │ ├── gmock-generated-internal-utils.h.pump │ │ │ │ ├── gmock-internal-utils.h │ │ │ │ └── gmock-port.h │ │ ├── make │ │ │ └── Makefile │ │ ├── msvc │ │ │ ├── 2005 │ │ │ │ ├── gmock.sln │ │ │ │ ├── gmock.vcproj │ │ │ │ ├── gmock_config.vsprops │ │ │ │ ├── gmock_main.vcproj │ │ │ │ └── gmock_test.vcproj │ │ │ ├── 2010 │ │ │ │ ├── gmock.sln │ │ │ │ ├── gmock.vcxproj │ │ │ │ ├── gmock_config.props │ │ │ │ ├── gmock_main.vcxproj │ │ │ │ └── gmock_test.vcxproj │ │ │ └── 2015 │ │ │ │ ├── gmock.sln │ │ │ │ ├── gmock.vcxproj │ │ │ │ ├── gmock_config.props │ │ │ │ ├── gmock_main.vcxproj │ │ │ │ └── gmock_test.vcxproj │ │ ├── scripts │ │ │ ├── fuse_gmock_files.py │ │ │ ├── generator │ │ │ │ ├── LICENSE │ │ │ │ ├── README │ │ │ │ ├── README.cppclean │ │ │ │ ├── cpp │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── ast.py │ │ │ │ │ ├── gmock_class.py │ │ │ │ │ ├── gmock_class_test.py │ │ │ │ │ ├── keywords.py │ │ │ │ │ ├── tokenize.py │ │ │ │ │ └── utils.py │ │ │ │ └── gmock_gen.py │ │ │ ├── gmock-config.in │ │ │ ├── gmock_doctor.py │ │ │ ├── upload.py │ │ │ └── upload_gmock.py │ │ ├── src │ │ │ ├── gmock-all.cc │ │ │ ├── gmock-cardinalities.cc │ │ │ ├── gmock-internal-utils.cc │ │ │ ├── gmock-matchers.cc │ │ │ ├── gmock-spec-builders.cc │ │ │ ├── gmock.cc │ │ │ └── gmock_main.cc │ │ └── test │ │ │ ├── BUILD.bazel │ │ │ ├── gmock-actions_test.cc │ │ │ ├── gmock-cardinalities_test.cc │ │ │ ├── gmock-generated-actions_test.cc │ │ │ ├── gmock-generated-function-mockers_test.cc │ │ │ ├── gmock-generated-internal-utils_test.cc │ │ │ ├── gmock-generated-matchers_test.cc │ │ │ ├── gmock-internal-utils_test.cc │ │ │ ├── gmock-matchers_test.cc │ │ │ ├── gmock-more-actions_test.cc │ │ │ ├── gmock-nice-strict_test.cc │ │ │ ├── gmock-port_test.cc │ │ │ ├── gmock-spec-builders_test.cc │ │ │ ├── gmock_all_test.cc │ │ │ ├── gmock_ex_test.cc │ │ │ ├── gmock_leak_test.py │ │ │ ├── gmock_leak_test_.cc │ │ │ ├── gmock_link2_test.cc │ │ │ ├── gmock_link_test.cc │ │ │ ├── gmock_link_test.h │ │ │ ├── gmock_output_test.py │ │ │ ├── gmock_output_test_.cc │ │ │ ├── gmock_output_test_golden.txt │ │ │ ├── gmock_stress_test.cc │ │ │ ├── gmock_test.cc │ │ │ └── gmock_test_utils.py │ └── googletest │ │ ├── CHANGES │ │ ├── CMakeLists.txt │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── Makefile.am │ │ ├── README.md │ │ ├── cmake │ │ ├── Config.cmake.in │ │ ├── gtest.pc.in │ │ ├── gtest_main.pc.in │ │ └── internal_utils.cmake │ │ ├── codegear │ │ ├── gtest.cbproj │ │ ├── gtest.groupproj │ │ ├── gtest_all.cc │ │ ├── gtest_link.cc │ │ ├── gtest_main.cbproj │ │ └── gtest_unittest.cbproj │ │ ├── configure.ac │ │ ├── docs │ │ ├── Pkgconfig.md │ │ ├── PumpManual.md │ │ ├── XcodeGuide.md │ │ ├── advanced.md │ │ ├── faq.md │ │ ├── primer.md │ │ └── samples.md │ │ ├── include │ │ └── gtest │ │ │ ├── gtest-death-test.h │ │ │ ├── gtest-message.h │ │ │ ├── gtest-param-test.h │ │ │ ├── gtest-param-test.h.pump │ │ │ ├── gtest-printers.h │ │ │ ├── gtest-spi.h │ │ │ ├── gtest-test-part.h │ │ │ ├── gtest-typed-test.h │ │ │ ├── gtest.h │ │ │ ├── gtest_pred_impl.h │ │ │ ├── gtest_prod.h │ │ │ └── internal │ │ │ ├── custom │ │ │ ├── README.md │ │ │ ├── gtest-port.h │ │ │ ├── gtest-printers.h │ │ │ └── gtest.h │ │ │ ├── gtest-death-test-internal.h │ │ │ ├── gtest-filepath.h │ │ │ ├── gtest-internal.h │ │ │ ├── gtest-linked_ptr.h │ │ │ ├── gtest-param-util-generated.h │ │ │ ├── gtest-param-util-generated.h.pump │ │ │ ├── gtest-param-util.h │ │ │ ├── gtest-port-arch.h │ │ │ ├── gtest-port.h │ │ │ ├── gtest-string.h │ │ │ ├── gtest-tuple.h │ │ │ ├── gtest-tuple.h.pump │ │ │ ├── gtest-type-util.h │ │ │ └── gtest-type-util.h.pump │ │ ├── m4 │ │ ├── acx_pthread.m4 │ │ └── gtest.m4 │ │ ├── make │ │ └── Makefile │ │ ├── msvc │ │ └── 2010 │ │ │ ├── gtest-md.sln │ │ │ ├── gtest-md.vcxproj │ │ │ ├── gtest-md.vcxproj.filters │ │ │ ├── gtest.sln │ │ │ ├── gtest.vcxproj │ │ │ ├── gtest.vcxproj.filters │ │ │ ├── gtest_main-md.vcxproj │ │ │ ├── gtest_main-md.vcxproj.filters │ │ │ ├── gtest_main.vcxproj │ │ │ ├── gtest_main.vcxproj.filters │ │ │ ├── gtest_prod_test-md.vcxproj │ │ │ ├── gtest_prod_test-md.vcxproj.filters │ │ │ ├── gtest_prod_test.vcxproj │ │ │ ├── gtest_prod_test.vcxproj.filters │ │ │ ├── gtest_unittest-md.vcxproj │ │ │ ├── gtest_unittest-md.vcxproj.filters │ │ │ ├── gtest_unittest.vcxproj │ │ │ └── gtest_unittest.vcxproj.filters │ │ ├── samples │ │ ├── prime_tables.h │ │ ├── sample1.cc │ │ ├── sample1.h │ │ ├── sample10_unittest.cc │ │ ├── sample1_unittest.cc │ │ ├── sample2.cc │ │ ├── sample2.h │ │ ├── sample2_unittest.cc │ │ ├── sample3-inl.h │ │ ├── sample3_unittest.cc │ │ ├── sample4.cc │ │ ├── sample4.h │ │ ├── sample4_unittest.cc │ │ ├── sample5_unittest.cc │ │ ├── sample6_unittest.cc │ │ ├── sample7_unittest.cc │ │ ├── sample8_unittest.cc │ │ └── sample9_unittest.cc │ │ ├── scripts │ │ ├── common.py │ │ ├── fuse_gtest_files.py │ │ ├── gen_gtest_pred_impl.py │ │ ├── gtest-config.in │ │ ├── pump.py │ │ ├── release_docs.py │ │ ├── test │ │ │ └── Makefile │ │ ├── upload.py │ │ └── upload_gtest.py │ │ ├── src │ │ ├── gtest-all.cc │ │ ├── gtest-death-test.cc │ │ ├── gtest-filepath.cc │ │ ├── gtest-internal-inl.h │ │ ├── gtest-port.cc │ │ ├── gtest-printers.cc │ │ ├── gtest-test-part.cc │ │ ├── gtest-typed-test.cc │ │ ├── gtest.cc │ │ └── gtest_main.cc │ │ ├── test │ │ ├── BUILD.bazel │ │ ├── googletest-break-on-failure-unittest.py │ │ ├── googletest-break-on-failure-unittest_.cc │ │ ├── googletest-catch-exceptions-test.py │ │ ├── googletest-catch-exceptions-test_.cc │ │ ├── googletest-color-test.py │ │ ├── googletest-color-test_.cc │ │ ├── googletest-death-test-test.cc │ │ ├── googletest-death-test_ex_test.cc │ │ ├── googletest-env-var-test.py │ │ ├── googletest-env-var-test_.cc │ │ ├── googletest-filepath-test.cc │ │ ├── googletest-filter-unittest.py │ │ ├── googletest-filter-unittest_.cc │ │ ├── googletest-json-outfiles-test.py │ │ ├── googletest-json-output-unittest.py │ │ ├── googletest-linked-ptr-test.cc │ │ ├── googletest-list-tests-unittest.py │ │ ├── googletest-list-tests-unittest_.cc │ │ ├── googletest-listener-test.cc │ │ ├── googletest-message-test.cc │ │ ├── googletest-options-test.cc │ │ ├── googletest-output-test-golden-lin.txt │ │ ├── googletest-output-test.py │ │ ├── googletest-output-test_.cc │ │ ├── googletest-param-test-invalid-name1-test.py │ │ ├── googletest-param-test-invalid-name1-test_.cc │ │ ├── googletest-param-test-invalid-name2-test.py │ │ ├── googletest-param-test-invalid-name2-test_.cc │ │ ├── googletest-param-test-test.cc │ │ ├── googletest-param-test-test.h │ │ ├── googletest-param-test2-test.cc │ │ ├── googletest-port-test.cc │ │ ├── googletest-printers-test.cc │ │ ├── googletest-shuffle-test.py │ │ ├── googletest-shuffle-test_.cc │ │ ├── googletest-test-part-test.cc │ │ ├── googletest-test2_test.cc │ │ ├── googletest-throw-on-failure-test.py │ │ ├── googletest-throw-on-failure-test_.cc │ │ ├── googletest-tuple-test.cc │ │ ├── googletest-uninitialized-test.py │ │ ├── googletest-uninitialized-test_.cc │ │ ├── gtest-typed-test2_test.cc │ │ ├── gtest-typed-test_test.cc │ │ ├── gtest-typed-test_test.h │ │ ├── gtest-unittest-api_test.cc │ │ ├── gtest_all_test.cc │ │ ├── gtest_assert_by_exception_test.cc │ │ ├── gtest_environment_test.cc │ │ ├── gtest_help_test.py │ │ ├── gtest_help_test_.cc │ │ ├── gtest_json_test_utils.py │ │ ├── gtest_list_output_unittest.py │ │ ├── gtest_list_output_unittest_.cc │ │ ├── gtest_main_unittest.cc │ │ ├── gtest_no_test_unittest.cc │ │ ├── gtest_pred_impl_unittest.cc │ │ ├── gtest_premature_exit_test.cc │ │ ├── gtest_prod_test.cc │ │ ├── gtest_repeat_test.cc │ │ ├── gtest_sole_header_test.cc │ │ ├── gtest_stress_test.cc │ │ ├── gtest_test_macro_stack_footprint_test.cc │ │ ├── gtest_test_utils.py │ │ ├── gtest_testbridge_test.py │ │ ├── gtest_testbridge_test_.cc │ │ ├── gtest_throw_on_failure_ex_test.cc │ │ ├── gtest_unittest.cc │ │ ├── gtest_xml_outfile1_test_.cc │ │ ├── gtest_xml_outfile2_test_.cc │ │ ├── gtest_xml_outfiles_test.py │ │ ├── gtest_xml_output_unittest.py │ │ ├── gtest_xml_output_unittest_.cc │ │ ├── gtest_xml_test_utils.py │ │ ├── production.cc │ │ └── production.h │ │ └── xcode │ │ ├── Config │ │ ├── DebugProject.xcconfig │ │ ├── FrameworkTarget.xcconfig │ │ ├── General.xcconfig │ │ ├── ReleaseProject.xcconfig │ │ ├── StaticLibraryTarget.xcconfig │ │ └── TestTarget.xcconfig │ │ ├── Resources │ │ └── Info.plist │ │ ├── Samples │ │ └── FrameworkSample │ │ │ ├── Info.plist │ │ │ ├── WidgetFramework.xcodeproj │ │ │ └── project.pbxproj │ │ │ ├── runtests.sh │ │ │ ├── widget.cc │ │ │ ├── widget.h │ │ │ └── widget_test.cc │ │ ├── Scripts │ │ ├── runtests.sh │ │ └── versiongenerate.py │ │ └── gtest.xcodeproj │ │ └── project.pbxproj ├── libcuckoo │ ├── CMakeLists.txt │ ├── bucket_container.hh │ ├── cuckoohash_config.hh │ ├── cuckoohash_map.hh │ ├── cuckoohash_util.hh │ ├── libcuckoo-config.cmake │ └── mainpage.dox ├── livegraph │ └── livegraph.hpp └── robin_hood │ ├── LICENSE │ └── robin_hood.h ├── tools ├── bm.cpp ├── edges_per_vertex.cpp ├── memory_profiler.cpp └── timestamped_graph_2_edge_list.py └── utility ├── graphalytics_validate.cpp ├── graphalytics_validate.hpp ├── memory_usage.cpp ├── memory_usage.hpp ├── timeout_service.cpp └── timeout_service.hpp /.gitignore: -------------------------------------------------------------------------------- 1 | # Eclipse project files 2 | /.cproject 3 | /.project 4 | /.settings/ 5 | /eclipse_symbols.xml 6 | 7 | # IntelliJ IDEA / CLion project files 8 | *.idea 9 | *.iml 10 | _Deparsed_XSubs.pm 11 | 12 | # Autoconf 13 | /autom4te.cache/ 14 | /configure 15 | 16 | # Build directories 17 | /build/ 18 | /Debug/ 19 | /Release/ -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "third-party/libcommon"] 2 | path = third-party/libcommon 3 | url = https://github.com/PerFuchs/libcommon 4 | branch = master 5 | -------------------------------------------------------------------------------- /aclocal.m4: -------------------------------------------------------------------------------- 1 | ############################################################################# 2 | # Include all m4 files from ./build-aux/m4 3 | m4_pushdef([DIR_BUNDLE_M4], [[build-aux/m4]]) 4 | m4_foreach_w([i], m4_esyscmd_s([ls ']DIR_BUNDLE_M4[' | egrep '*.m4$']), [m4_include(DIR_BUNDLE_M4/i)]) 5 | m4_popdef([DIR_BUNDLE_M4]) -------------------------------------------------------------------------------- /build-aux/m4/ax_cxx_compile_stdcxx_11.m4: -------------------------------------------------------------------------------- 1 | # ============================================================================= 2 | # https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html 3 | # ============================================================================= 4 | # 5 | # SYNOPSIS 6 | # 7 | # AX_CXX_COMPILE_STDCXX_11([ext|noext], [mandatory|optional]) 8 | # 9 | # DESCRIPTION 10 | # 11 | # Check for baseline language coverage in the compiler for the C++11 12 | # standard; if necessary, add switches to CXX and CXXCPP to enable 13 | # support. 14 | # 15 | # This macro is a convenience alias for calling the AX_CXX_COMPILE_STDCXX 16 | # macro with the version set to C++11. The two optional arguments are 17 | # forwarded literally as the second and third argument respectively. 18 | # Please see the documentation for the AX_CXX_COMPILE_STDCXX macro for 19 | # more information. If you want to use this macro, you also need to 20 | # download the ax_cxx_compile_stdcxx.m4 file. 21 | # 22 | # LICENSE 23 | # 24 | # Copyright (c) 2008 Benjamin Kosnik 25 | # Copyright (c) 2012 Zack Weinberg 26 | # Copyright (c) 2013 Roy Stogner 27 | # Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov 28 | # Copyright (c) 2015 Paul Norman 29 | # Copyright (c) 2015 Moritz Klammler 30 | # 31 | # Copying and distribution of this file, with or without modification, are 32 | # permitted in any medium without royalty provided the copyright notice 33 | # and this notice are preserved. This file is offered as-is, without any 34 | # warranty. 35 | 36 | #serial 18 37 | 38 | AX_REQUIRE_DEFINED([AX_CXX_COMPILE_STDCXX]) 39 | AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [AX_CXX_COMPILE_STDCXX([11], [$1], [$2])]) 40 | -------------------------------------------------------------------------------- /build-aux/m4/ax_cxx_compile_stdcxx_14.m4: -------------------------------------------------------------------------------- 1 | # ============================================================================= 2 | # https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_14.html 3 | # ============================================================================= 4 | # 5 | # SYNOPSIS 6 | # 7 | # AX_CXX_COMPILE_STDCXX_14([ext|noext], [mandatory|optional]) 8 | # 9 | # DESCRIPTION 10 | # 11 | # Check for baseline language coverage in the compiler for the C++14 12 | # standard; if necessary, add switches to CXX and CXXCPP to enable 13 | # support. 14 | # 15 | # This macro is a convenience alias for calling the AX_CXX_COMPILE_STDCXX 16 | # macro with the version set to C++14. The two optional arguments are 17 | # forwarded literally as the second and third argument respectively. 18 | # Please see the documentation for the AX_CXX_COMPILE_STDCXX macro for 19 | # more information. If you want to use this macro, you also need to 20 | # download the ax_cxx_compile_stdcxx.m4 file. 21 | # 22 | # LICENSE 23 | # 24 | # Copyright (c) 2015 Moritz Klammler 25 | # 26 | # Copying and distribution of this file, with or without modification, are 27 | # permitted in any medium without royalty provided the copyright notice 28 | # and this notice are preserved. This file is offered as-is, without any 29 | # warranty. 30 | 31 | #serial 5 32 | 33 | AX_REQUIRE_DEFINED([AX_CXX_COMPILE_STDCXX]) 34 | AC_DEFUN([AX_CXX_COMPILE_STDCXX_14], [AX_CXX_COMPILE_STDCXX([14], [$1], [$2])]) 35 | -------------------------------------------------------------------------------- /build-aux/m4/ax_cxx_compile_stdcxx_17.m4: -------------------------------------------------------------------------------- 1 | # ============================================================================= 2 | # https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_17.html 3 | # ============================================================================= 4 | # 5 | # SYNOPSIS 6 | # 7 | # AX_CXX_COMPILE_STDCXX_17([ext|noext], [mandatory|optional]) 8 | # 9 | # DESCRIPTION 10 | # 11 | # Check for baseline language coverage in the compiler for the C++17 12 | # standard; if necessary, add switches to CXX and CXXCPP to enable 13 | # support. 14 | # 15 | # This macro is a convenience alias for calling the AX_CXX_COMPILE_STDCXX 16 | # macro with the version set to C++17. The two optional arguments are 17 | # forwarded literally as the second and third argument respectively. 18 | # Please see the documentation for the AX_CXX_COMPILE_STDCXX macro for 19 | # more information. If you want to use this macro, you also need to 20 | # download the ax_cxx_compile_stdcxx.m4 file. 21 | # 22 | # LICENSE 23 | # 24 | # Copyright (c) 2015 Moritz Klammler 25 | # Copyright (c) 2016 Krzesimir Nowak 26 | # 27 | # Copying and distribution of this file, with or without modification, are 28 | # permitted in any medium without royalty provided the copyright notice 29 | # and this notice are preserved. This file is offered as-is, without any 30 | # warranty. 31 | 32 | #serial 2 33 | 34 | AX_REQUIRE_DEFINED([AX_CXX_COMPILE_STDCXX]) 35 | AC_DEFUN([AX_CXX_COMPILE_STDCXX_17], [AX_CXX_COMPILE_STDCXX([17], [$1], [$2])]) 36 | -------------------------------------------------------------------------------- /build-aux/m4/my_check_stdlib_libcxx.m4: -------------------------------------------------------------------------------- 1 | # Check whether the option -stdlib=libc++ is available and the program 2 | # can be compiled, linked and executed. 3 | # libc++ is the STL replacement from the LLVM community: 4 | # https://libcxx.llvm.org/ 5 | # 6 | # serial 1 7 | 8 | # MY_CHECK_STDLIB_LIBCXX([action-if-true], [action-if-false]) 9 | # ------------------------------------------- 10 | # 11 | # Checks whether the current compiler can compile, link and execute 12 | # programs linked with the option -stdlib=libc++. 13 | # In case of success, it executes the `action-if-true', otherwise 14 | # `action-if-false' 15 | AC_DEFUN([MY_CHECK_STDLIB_LIBCXX], [ 16 | AS_VAR_PUSHDEF([CACHEVAR],[my_cv_check_stdlib_libcxx]) 17 | AC_MSG_CHECKING([whether ${_AC_CC} supports the libc++ replacement]) 18 | my_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS 19 | _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS -stdlib=libc++" 20 | AC_RUN_IFELSE([AC_LANG_SOURCE([ 21 | #include 22 | #include 23 | 24 | using namespace std; 25 | 26 | int main(int argc, const char* argv@<:@@:>@){ 27 | cout << "yes" << endl; 28 | return 0; 29 | } 30 | ])], 31 | [AS_VAR_SET(CACHEVAR,[yes]);], dnl The result is written by the cout program 32 | [AS_VAR_SET(CACHEVAR,[no]); AC_MSG_RESULT([no])], 33 | [AS_VAR_SET(CACHEVAR,[maybe]); AC_MSG_RESULT([maybe, cross compiling...])] 34 | ) 35 | _AC_LANG_PREFIX[]FLAGS=${my_check_save_flags} 36 | AS_VAR_IF(CACHEVAR, yes, [m4_default([$1], :)], [m4_default([$2], :)]) 37 | AS_VAR_POPDEF([CACHEVAR]) 38 | ]) 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /build-aux/m4/my_set_cc_flag.m4: -------------------------------------------------------------------------------- 1 | # Set the current compiler option if the given flag is supported 2 | # serial 1 3 | 4 | # MY_SET_CC_FLAG(var_cflags, flag) 5 | # ------------------------------------------- 6 | # 7 | # Test whether is accepted by the current compiler. If so, it appends 8 | # it to the shell variable . 9 | # The macro depends on AX_CHECK_COMPILE_FLAG from the Autoarchive. 10 | AC_DEFUN([MY_SET_CC_FLAG], [ AX_CHECK_COMPILE_FLAG([$2], [AS_VAR_APPEND([$1], " $2")]) ]) -------------------------------------------------------------------------------- /experiment/mixed_workload.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by per on 29.09.21. 3 | // 4 | 5 | #include "mixed_workload.hpp" 6 | 7 | #include 8 | #include 9 | 10 | #if defined(HAVE_OPENMP) 11 | #include "omp.h" 12 | #endif 13 | 14 | #include "graphalytics.hpp" 15 | #include "aging2_experiment.hpp" 16 | #include "mixed_workload_result.hpp" 17 | 18 | namespace gfe::experiment { 19 | 20 | using namespace std; 21 | 22 | MixedWorkloadResult MixedWorkload::execute() { 23 | auto aging_result_future = std::async(std::launch::async, &Aging2Experiment::execute, &m_aging_experiment); 24 | 25 | chrono::seconds progress_check_interval( 1 ); 26 | this_thread::sleep_for( progress_check_interval ); // Poor mans synchronization to ensure AgingExperiment was able to setup the master etc 27 | while (true) { 28 | if (m_aging_experiment.progress_so_far() > 0.1 || aging_result_future.wait_for(std::chrono::seconds(0)) == std::future_status::ready) { // The graph reached its final size 29 | break; 30 | } 31 | this_thread::sleep_for( progress_check_interval ) ; 32 | } 33 | cout << "Graph reached final size, executing graphaltyics now" << endl; 34 | 35 | // TODO change this to also work for LCC, generally this solution is very ugly 36 | #if defined(HAVE_OPENMP) 37 | if(m_read_threads != 0 ){ 38 | cout << "[driver] OpenMP, number of threads for the Graphalytics suite: " << m_read_threads << endl; 39 | omp_set_num_threads(m_read_threads); 40 | } 41 | #endif 42 | 43 | while (m_aging_experiment.progress_so_far() < 0.9 && aging_result_future.wait_for(std::chrono::seconds(0)) != std::future_status::ready) { 44 | m_graphalytics.execute(); 45 | } 46 | 47 | cout << "Waiting for aging experiment to finish" << endl; 48 | aging_result_future.wait(); 49 | cout << "Getting aging experiment results" << endl; 50 | auto aging_result = aging_result_future.get(); 51 | 52 | return MixedWorkloadResult { aging_result, m_graphalytics }; 53 | } 54 | 55 | } -------------------------------------------------------------------------------- /experiment/mixed_workload.hpp: -------------------------------------------------------------------------------- 1 | #ifndef GFE_DRIVER_MIXED_WORKLOAD_H 2 | #define GFE_DRIVER_MIXED_WORKLOAD_H 3 | 4 | namespace gfe::experiment { class Aging2Experiment; } 5 | namespace gfe::experiment { class GraphalyticsSequential; } 6 | namespace gfe::experiment { class MixedWorkloadResult; } 7 | 8 | namespace gfe::experiment { 9 | 10 | class MixedWorkload { 11 | public: 12 | MixedWorkload(Aging2Experiment& aging_experiment, GraphalyticsSequential& graphalytics, int read_threads) 13 | : m_aging_experiment(aging_experiment), m_graphalytics(graphalytics), m_read_threads(read_threads) {} 14 | 15 | MixedWorkloadResult execute(); 16 | private: 17 | Aging2Experiment& m_aging_experiment; 18 | GraphalyticsSequential& m_graphalytics; 19 | 20 | int m_read_threads = 0; 21 | }; 22 | 23 | } 24 | 25 | #endif //GFE_DRIVER_MIXED_WORKLOAD_H 26 | -------------------------------------------------------------------------------- /experiment/mixed_workload_result.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by per on 29.09.21. 3 | // 4 | 5 | #include "mixed_workload_result.hpp" 6 | 7 | #include "common/database.hpp" 8 | #include "aging2_result.hpp" 9 | #include "graphalytics.hpp" 10 | #include "iostream" 11 | 12 | namespace gfe::experiment { 13 | using namespace std; 14 | 15 | MixedWorkloadResult::MixedWorkloadResult(Aging2Result aging_result, GraphalyticsSequential& analytics) 16 | : m_aging_result(aging_result), m_graphalytics(analytics) { 17 | 18 | } 19 | 20 | void MixedWorkloadResult::save(common::Database* db) { 21 | cout << "Start saving results" << endl; 22 | m_graphalytics.report(true); 23 | cout << "Saved graphalytics" << endl; 24 | m_aging_result.save(db); 25 | cout << "Saved aging" << endl; 26 | cout << "Saved aging" << endl; 27 | } 28 | } -------------------------------------------------------------------------------- /experiment/mixed_workload_result.hpp: -------------------------------------------------------------------------------- 1 | #ifndef GFE_DRIVER_MIXED_WORKLOAD_RESULT_H 2 | #define GFE_DRIVER_MIXED_WORKLOAD_RESULT_H 3 | 4 | #include "aging2_result.hpp" 5 | namespace gfe::experiment { class GraphalyticsSequential; } 6 | namespace common { class Database; } 7 | 8 | namespace gfe::experiment { 9 | 10 | class MixedWorkloadResult { 11 | public: 12 | MixedWorkloadResult(Aging2Result aging_result, GraphalyticsSequential& analytics); 13 | 14 | void save(common::Database* db); 15 | 16 | private: 17 | Aging2Result m_aging_result; 18 | GraphalyticsSequential& m_graphalytics; 19 | }; 20 | 21 | } 22 | 23 | #endif //GFE_DRIVER_MIXED_WORKLOAD_RESULT_H 24 | -------------------------------------------------------------------------------- /experiment/statistics.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2019 Dean De Leo, email: dleo[at]cwi.nl 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | #pragma once 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | namespace gfe::experiment { 25 | 26 | /** 27 | * Compute a set of basic statistics (mean, median, and so on) from a sequence of results. 28 | * The class is not thread safe 29 | */ 30 | class ExecStatistics { 31 | friend std::ostream& operator<<(std::ostream& out, const ExecStatistics& stats); 32 | 33 | const uint64_t m_num_trials; 34 | uint64_t m_num_timeouts {0}; 35 | uint64_t m_mean {0}; 36 | uint64_t m_stddev {0}; 37 | uint64_t m_min {0}; 38 | uint64_t m_max {0}; 39 | uint64_t m_median {0}; 40 | uint64_t m_percentile90 {0}; 41 | uint64_t m_percentile95 {0}; 42 | uint64_t m_percentile97 {0}; 43 | uint64_t m_percentile99 {0}; 44 | 45 | private: 46 | static uint64_t get_percentile(const std::vector& values_sorted, uint64_t position); 47 | 48 | public: 49 | /** 50 | * Compute the statistics for the given sequence of results. Each entry represents either 51 | * the completion time (in microsecs), or the special value -1 to indicate a timeout. 52 | */ 53 | ExecStatistics(const std::vector& trials); 54 | 55 | /** 56 | * Save the computed statistics in the database 57 | */ 58 | void save(const std::string& name); 59 | }; 60 | 61 | // Print the statistics into the given output stream, for reporting or debugging purposes 62 | std::ostream& operator<<(std::ostream& out, const ExecStatistics& stats); 63 | 64 | } // namespace 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /experiment/validate.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2019 Dean De Leo, email: dleo[at]cwi.nl 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | #pragma once 19 | 20 | #include 21 | #include 22 | 23 | namespace gfe::graph { class WeightedEdgeStream; } // forward declaration 24 | namespace gfe::library { class Interface; } // forward declaration 25 | 26 | namespace gfe::experiment { 27 | 28 | /** 29 | * Check that all edges in the stream are contained in the interface. Report the number of missing vertices (0 => validation successful). 30 | */ 31 | uint64_t validate_updates(std::shared_ptr interface, std::shared_ptr stream); 32 | 33 | } // namespace 34 | -------------------------------------------------------------------------------- /graph/edge.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2019 Dean De Leo, email: dleo[at]cwi.nl 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | #include "edge.hpp" 19 | 20 | #include 21 | 22 | using namespace std; 23 | 24 | namespace gfe::graph { 25 | 26 | bool Edge::operator==(const Edge& e) const noexcept { 27 | return source() == e.source() && destination() == e.destination(); 28 | } 29 | 30 | bool Edge::operator!=(const Edge& e) const noexcept{ 31 | return !(*this == e); 32 | } 33 | 34 | WeightedEdge::WeightedEdge() : WeightedEdge(0,0,0){ } 35 | WeightedEdge::WeightedEdge(uint64_t source, uint64_t destination, double weight) : Edge{source, destination}, m_weight(weight){ 36 | assert((m_weight >= 0 || m_weight == -1) && "Expected a non-negative value"); // -1 => deletion 37 | } 38 | 39 | bool WeightedEdge::operator==(const WeightedEdge& e) const noexcept { 40 | return source() == e.source() && destination() == e.destination() && weight() == e.weight(); 41 | } 42 | 43 | bool WeightedEdge::operator!=(const WeightedEdge& e) const noexcept{ 44 | return !(*this == e); 45 | } 46 | 47 | ostream& operator<<(std::ostream& out, const Edge& e) { 48 | out << "[src: " << e.source() << ", dst: " << e.destination() << "]"; 49 | return out; 50 | } 51 | 52 | 53 | std::ostream& operator<<(std::ostream& out, const WeightedEdge& e){ 54 | out << "[src: " << e.source() << ", dst: " << e.destination() << ", weight: " << e.weight() << "]"; 55 | return out; 56 | } 57 | 58 | } // namespace 59 | -------------------------------------------------------------------------------- /graph/vertex_list.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2019 Dean De Leo, email: dleo[at]cwi.nl 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | #pragma once 19 | 20 | #include 21 | 22 | namespace gfe::graph { 23 | 24 | class CByteArray; 25 | 26 | /** 27 | * Represent a list of vertices in a graph 28 | */ 29 | class VertexList { 30 | private: 31 | VertexList(const VertexList&) = delete; 32 | VertexList& operator=(const VertexList&) = delete; 33 | 34 | CByteArray* m_vertices; // the list of vertices contained 35 | public: 36 | /** 37 | * Pass the list of vertices 38 | */ 39 | VertexList(CByteArray* vertices); 40 | 41 | /** 42 | * Destructor 43 | */ 44 | ~VertexList(); 45 | 46 | /** 47 | * Retrieve the vertex at the given position, in [0, num_vertices() ) 48 | */ 49 | uint64_t get(uint64_t index) const; 50 | uint64_t operator[](uint64_t index) const { return get(index); } // alias 51 | 52 | /** 53 | * Total number of vertices 54 | */ 55 | uint64_t num_vertices() const noexcept; 56 | 57 | /** 58 | * Perform a random permutation of the list of vertices, using a custom seed 59 | */ 60 | void permute(); 61 | 62 | /** 63 | * Perform a random permutation of the list of vertices, using the given seed 64 | */ 65 | void permute(uint64_t seed); 66 | 67 | /** 68 | * Sort the list of vertices 69 | */ 70 | void sort(); 71 | }; 72 | 73 | } // namespace 74 | -------------------------------------------------------------------------------- /library/baseline/dummy.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * dummy.cpp 3 | * 4 | * Created on: 22 Aug 2019 5 | * Author: Dean De Leo 6 | */ 7 | 8 | #include "dummy.hpp" 9 | 10 | using namespace std; 11 | 12 | namespace gfe::library { 13 | 14 | Dummy::Dummy(bool is_directed) : m_is_directed(is_directed) { } 15 | Dummy::~Dummy() { } 16 | uint64_t Dummy::num_edges() const { return 0; } 17 | uint64_t Dummy::num_vertices() const { return 0; } 18 | bool Dummy::is_directed() const { return m_is_directed; } 19 | bool Dummy::has_vertex(uint64_t vertex_id) const { return true; } 20 | double Dummy::get_weight(uint64_t source, uint64_t destination) const { return 0.0; } 21 | void Dummy::dump_ostream(std::ostream& out) const { out << "DuMMy"; } 22 | bool Dummy::add_vertex(uint64_t vertex_id) { return true; } 23 | bool Dummy::remove_vertex(uint64_t vertex_id){ return true; } 24 | bool Dummy::add_edge(graph::WeightedEdge e) { return true; } 25 | bool Dummy::add_edge_v2(graph::WeightedEdge e) { return true; } 26 | bool Dummy::remove_edge(graph::Edge e){ return true; } 27 | void Dummy::set_timeout(uint64_t seconds) { } 28 | 29 | } // namespace 30 | 31 | 32 | -------------------------------------------------------------------------------- /library/baseline/dummy.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2019 Dean De Leo, email: dleo[at]cwi.nl 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | #pragma once 19 | 20 | 21 | #include "library/interface.hpp" 22 | 23 | namespace gfe::library { 24 | 25 | /** 26 | * This is a dummy instance of the interface. All operations are *nop*. It is used simply 27 | * to compute the driver and network overhead in running the experiments. 28 | */ 29 | class Dummy : public virtual UpdateInterface { 30 | private: 31 | const bool m_is_directed; // whether the underlying graph is directed 32 | public: 33 | 34 | /** 35 | * Initialise the instance 36 | */ 37 | Dummy(bool is_directed); 38 | 39 | /** 40 | * Destructor 41 | */ 42 | ~Dummy(); 43 | 44 | virtual uint64_t num_edges() const; // returns 0 45 | virtual uint64_t num_vertices() const; // returns 0 46 | virtual bool is_directed() const; // returns m_directed 47 | virtual bool has_vertex(uint64_t vertex_id) const; // always returns true 48 | virtual double get_weight(uint64_t source, uint64_t destination) const; // always returns 0 49 | virtual void dump_ostream(std::ostream& out) const; // prints `DuMMy' 50 | virtual bool add_vertex(uint64_t vertex_id); // returns true 51 | virtual bool remove_vertex(uint64_t vertex_id); // returns true 52 | virtual bool add_edge(graph::WeightedEdge e); // returns true 53 | virtual bool add_edge_v2(gfe::graph::WeightedEdge e); // returns true 54 | virtual bool remove_edge(graph::Edge e); // returns true 55 | virtual void set_timeout(uint64_t seconds); // nop 56 | }; // class 57 | 58 | } // namespace 59 | -------------------------------------------------------------------------------- /library/graphone/internal.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2019 Dean De Leo, email: dleo[at]cwi.nl 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | #pragma once 19 | 20 | #include 21 | 22 | // these definitions are set by CMake when compiling the executable graphone64. 23 | // I don't know whether all of them are actually required 24 | #define OVER_COMMIT 25 | #define TBB 26 | #define PLAIN_GRAPH 27 | #define B64 28 | #define DEL 29 | 30 | // Internal counters for the iterator? 31 | //#define GRAPHONE_COUNTERS 32 | 33 | /** 34 | * Do not issue warnings due to the included GraphOne library 35 | */ 36 | #pragma GCC diagnostic push /* works for both GCC and Clang */ 37 | #pragma GCC diagnostic ignored "-Wunused-variable" /* Do not flag unused variables */ 38 | #pragma GCC diagnostic ignored "-Woverloaded-virtual" /* Shadow methods */ 39 | 40 | // GraphOne includes 41 | // From the directory src/ 42 | #include "graph.h" // main graph instance 43 | #include "sgraph.h" // directed and undirected weighted graphs 44 | #include "str.h" // dictionary external vertex id to logical id 45 | #include "type.h" // graphone typedefs 46 | #include "typekv.h" // first container, reserved for the "metadata" 47 | // From the directory gview/ 48 | #include "graph_view.h" // static view 49 | 50 | #pragma GCC diagnostic pop 51 | 52 | // Globals (...) 53 | extern graph* g; // defined in base.cpp 54 | 55 | // Convenience macro, to retrieve the property graph of an instanced graph 56 | inline static pgraph_t* get_graphone_graph(){ 57 | assert(g->cf_count == 2 && "Graph not initialised"); 58 | return (pgraph_t*) g->get_sgraph(1); 59 | } 60 | -------------------------------------------------------------------------------- /library/llama/llama_internal.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2019 Dean De Leo, email: dleo[at]cwi.nl 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | #include "llama_internal.hpp" 19 | 20 | // Define the global memory pool used by the LLAMA allocators 21 | ll_memory_pool __w_pool; 22 | 23 | // sometimes I'm referring them as singular, sometimes as plural. Let's use a const for peace of mind 24 | char const * const g_llama_property_names = "names"; 25 | char const * const g_llama_property_weights = "weights"; 26 | -------------------------------------------------------------------------------- /library/llama/llama_internal.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2019 Dean De Leo, email: dleo[at]cwi.nl 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | #pragma once 19 | 20 | /** 21 | * The library requires to be set up with a few macros to enable/disable its features. Which is 22 | * what we do here. 23 | * This header acts a wrapper before including the actual llama.h header, ensuring all translation 24 | * units are compiled in a consistent way. 25 | */ 26 | 27 | // Which implementation to use? 28 | #define LL_MEMORY_ONLY /* llama, ask for the implementation in-memory */ 29 | //#define LL_PERSISTENT /* llama, ask for the implementation with memory mapped files */ 30 | 31 | // Support for deletions? 32 | #define LL_DELETIONS 33 | 34 | // Benchmark counters? 35 | //#define LL_COUNTERS 36 | 37 | // Profile the cost of ll_writable_graph#add_edge_if_not_exists and #build 38 | //#define LL_PROFILE_UPDATES 39 | 40 | // Disable a warning in the llama.h implementation, ISO C++17 does not allow register bla bla 41 | #define register /* nop */ 42 | 43 | // We're finally ready to include the actual library 44 | #include "llama.h" 45 | 46 | // the string ID for the vertex property associated to the external IDs (e.g. user id) 47 | extern char const * const g_llama_property_names; 48 | 49 | // the string ID for the edge property associated to the weights 50 | extern char const * const g_llama_property_weights; 51 | -------------------------------------------------------------------------------- /library/sortledton/not_implemented.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by per on 03.02.21. 3 | // 4 | 5 | #include "not_implemented.hpp" 6 | -------------------------------------------------------------------------------- /library/sortledton/not_implemented.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by per on 03.02.21. 3 | // 4 | 5 | #ifndef GFE_DRIVER_NOTIMPLEMENTED_H 6 | #define GFE_DRIVER_NOTIMPLEMENTED_H 7 | 8 | namespace gfe::library { 9 | 10 | class NotImplemented : exception { 11 | 12 | }; 13 | 14 | } 15 | 16 | #endif //GFE_DRIVER_NOTIMPLEMENTED_H 17 | -------------------------------------------------------------------------------- /library/stinger/stinger_batch.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2019 Dean De Leo, email: dleo[at]cwi.nl 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /library/stinger/stinger_error.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2019 Dean De Leo, email: dleo[at]cwi.nl 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | #pragma once 19 | 20 | #include "common/error.hpp" 21 | 22 | namespace gfe::library { 23 | 24 | // Generic exception thrown by the Stinger wrapper 25 | DEFINE_EXCEPTION(StingerError); 26 | 27 | } // namespace 28 | -------------------------------------------------------------------------------- /network/error.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2019 Dean De Leo, email: dleo[at]cwi.nl 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | #pragma once 19 | 20 | #include "common/error.hpp" 21 | 22 | namespace gfe::network { 23 | 24 | // Base exception thrown by the network module 25 | DEFINE_EXCEPTION(NetworkError); 26 | 27 | // An error propagated by the remote server to client 28 | DEFINE_EXCEPTION_SUBCLASS(RPCError, NetworkError); 29 | 30 | } // namespace 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /network/internal.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2019 Dean De Leo, email: dleo[at]cwi.nl 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | #include "internal.hpp" 18 | 19 | #include 20 | 21 | using namespace std; 22 | 23 | namespace gfe::network { 24 | 25 | // global def. of the lock used to wrap calls to thread-unsafe functions of the C library 26 | mutex g_network_lock; 27 | 28 | } // namespace 29 | 30 | 31 | -------------------------------------------------------------------------------- /network/internal.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2019 Dean De Leo, email: dleo[at]cwi.nl 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | #pragma once 19 | 20 | #include "network/error.hpp" 21 | 22 | #include 23 | #include 24 | #include // strerror 25 | 26 | // Handy macro to throw a network error with ERROR( message ) 27 | #undef CURRENT_ERROR_TYPE 28 | #define CURRENT_ERROR_TYPE ::gfe::network::NetworkError 29 | 30 | // Macro to report an error with the content of errno 31 | #define ERROR_ERRNO(message) ERROR(message << ". Low level description: " << strerror(errno) << " (errno: " << errno << ")") 32 | 33 | namespace gfe::network { 34 | 35 | // Some functions from the C library are not thread-safe, such as gethostbyname() and gethostbyaddr(). 36 | // More details: http://man7.org/linux/man-pages/man3/gethostbyname.3.html 37 | // We wrap each call to these functions inside the following global lock 38 | extern std::mutex g_network_lock; 39 | 40 | // Convenience macro to wrap a critical section inside g_network_lock 41 | #define SYNCHRONISE_NETWORK(stmt) { std::scoped_lock lock(g_network_lock); stmt; } 42 | 43 | } // namespace 44 | -------------------------------------------------------------------------------- /reader/binary_reader.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by per on 08.02.21. 3 | // 4 | 5 | #include "binary_reader.hpp" 6 | 7 | #include 8 | #include "graph/edge.hpp" 9 | #include "configuration.hpp" 10 | 11 | 12 | 13 | namespace gfe::reader { 14 | 15 | BinaryReader::BinaryReader(const std::string &path) : m_random_generator(configuration().seed() + 12908478) { 16 | ifstream f(path, ifstream::in | ifstream::binary); 17 | 18 | size_t edge_count; 19 | f.read((char *) &edge_count, sizeof(edge_count)); 20 | 21 | edges.clear(); 22 | edges.resize(edge_count); 23 | 24 | f.read((char *) edges.data(), edge_count * sizeof(edge_t)); 25 | 26 | f.close(); 27 | } 28 | 29 | BinaryReader::~BinaryReader() { 30 | 31 | } 32 | 33 | bool BinaryReader::read(graph::WeightedEdge &edge) { 34 | if (pos < edges.size()) { 35 | edge_t e = edges[pos]; 36 | pos += 1; 37 | edge.m_source = e.src; 38 | edge.m_destination = e.dst; 39 | 40 | uniform_real_distribution distribution{0, configuration().max_weight()}; // in [0, max_weight) 41 | auto w = distribution(m_random_generator); 42 | if(w == 0.0) { 43 | w = configuration().max_weight(); // in (0, max_weight] 44 | } 45 | 46 | edge.m_weight = w; 47 | return true; 48 | } else { 49 | return false; 50 | } 51 | } 52 | 53 | bool BinaryReader::is_directed() const { 54 | return false; 55 | } 56 | } 57 | 58 | -------------------------------------------------------------------------------- /reader/binary_reader.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by per on 08.02.21. 3 | // 4 | 5 | #ifndef GFE_DRIVER_BINARY_READER_HPP 6 | #define GFE_DRIVER_BINARY_READER_HPP 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | #include "reader.hpp" 13 | 14 | using namespace std; 15 | 16 | namespace gfe::reader { 17 | 18 | class BinaryReader : public Reader { 19 | 20 | struct edge_t { 21 | uint64_t src; 22 | uint64_t dst; 23 | }; 24 | 25 | vector edges; // vector to load edges into 26 | size_t pos {0}; // Position in the edge vector to read next. 27 | 28 | public: 29 | /** 30 | * Read the edge list from the given file 31 | * @param path the source of the file 32 | */ 33 | BinaryReader(const std::string &path); 34 | 35 | ~BinaryReader(); 36 | 37 | bool read(graph::WeightedEdge &) override; 38 | 39 | bool is_directed() const override; 40 | 41 | private: 42 | std::mt19937_64 m_random_generator; 43 | }; 44 | } 45 | 46 | #endif //GFE_DRIVER_BINARY_READER_HPP 47 | -------------------------------------------------------------------------------- /reader/format.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2019 Dean De Leo, email: dleo[at]cwi.nl 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | #include "format.hpp" 19 | 20 | #include 21 | #include 22 | #include "common/filesystem.hpp" 23 | 24 | namespace gfe::reader { 25 | 26 | Format get_graph_format(const char* path) { 27 | const char* extension = strrchr(path, '.'); 28 | if(extension != nullptr){ 29 | extension++; // skip the '.' 30 | if ( strcasecmp(extension, "properties") == 0 ){ // properties file of the Graphalytics suite 31 | return reader::Format::LDBC_GRAPHALYTICS; 32 | } else if( strcasecmp(extension, "log") == 0 || strcasecmp(extension, "glog") == 0 || strcasecmp(extension, "graphlog") == 0){ 33 | return reader::Format::GRAPHLOG; 34 | } else if( strcasecmp(extension, "el") == 0){ 35 | return reader::Format::PLAIN; 36 | } else if( strcasecmp(extension, "wel") == 0 ){ 37 | return reader::Format::PLAIN_WEIGHTED; 38 | } else if( strcasecmp(extension, "metis") == 0 || strcasecmp(extension, "graph") == 0) { 39 | return reader::Format::METIS; 40 | } else if( strcasecmp(extension, "gr") == 0 || strcasecmp(extension, "dimacs") == 0 || strcasecmp(extension, "dimacs9") == 0 ){ 41 | return reader::Format::DIMACS9; 42 | } else if( strcasecmp(extension, "edgeList") == 0 ){ 43 | return reader::Format::BINARY_EDGE_LOG; 44 | } 45 | } 46 | 47 | return reader::Format::UNKNOWN; 48 | } 49 | 50 | Format get_graph_format(const std::string& path) { 51 | return get_graph_format(path.c_str()); 52 | } 53 | 54 | } // namespace 55 | -------------------------------------------------------------------------------- /reader/format.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2019 Dean De Leo, email: dleo[at]cwi.nl 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | #pragma once 19 | 20 | #include 21 | 22 | namespace gfe::reader { 23 | 24 | // The format of the given graph 25 | enum class Format { 26 | UNKNOWN, // No idea 27 | LDBC_GRAPHALYTICS, // It has its own descriptor in the form of a java .property file, two additional files contain a vertex list and an edge list 28 | GRAPHLOG, // Custom format, this is a binary sequence of edge insertions/deletions 29 | PLAIN, // Extension .el, a list with one edge per line: src dst 30 | PLAIN_WEIGHTED, // Extension .wel, a list with one edge per line: src dst weight 31 | METIS, // Extension .metis or .graph, METIS v5.1 format 32 | DIMACS9, // Extension .gr, .dimacs or .dimacs9, DIMACS challenge #9, year 2005-06, url: http://users.diag.uniroma1.it/challenge9/format.shtml#graph 33 | BINARY_EDGE_LOG // Extension .edgeList edges in binary form using 32 bit per identifier, format is ... 34 | }; 35 | 36 | 37 | // Retrieve the representation of the given stored graph, according to the extension of the file 38 | Format get_graph_format(const char* path); 39 | Format get_graph_format(const std::string& path); 40 | 41 | } // namespace 42 | 43 | 44 | -------------------------------------------------------------------------------- /reader/reader.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2019 Dean De Leo, email: dleo[at]cwi.nl 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | #include "reader.hpp" 19 | 20 | #include "dimacs9_reader.hpp" 21 | #include "format.hpp" 22 | #include "graphalytics_reader.hpp" 23 | #include "graphlog_reader.hpp" 24 | #include "metis_reader.hpp" 25 | #include "plain_reader.hpp" 26 | #include "binary_reader.hpp" 27 | 28 | #undef CURRENT_ERROR_TYPE 29 | #define CURRENT_ERROR_TYPE ::gfe::reader::ReaderError 30 | 31 | using namespace std; 32 | 33 | namespace gfe::reader { 34 | 35 | Reader::Reader(){ } 36 | Reader::~Reader(){ } 37 | 38 | std::unique_ptr Reader::open(const std::string& path){ 39 | auto format = get_graph_format(path); 40 | switch(format){ 41 | case Format::DIMACS9: 42 | return make_unique(path); 43 | case Format::GRAPHLOG: 44 | return make_unique(path); 45 | case Format::LDBC_GRAPHALYTICS: // LDBC 46 | return make_unique(path); 47 | case Format::METIS: 48 | return make_unique(path); 49 | case Format::PLAIN: 50 | return make_unique(path, false); 51 | case Format::PLAIN_WEIGHTED: 52 | return make_unique(path, true); 53 | case Format::BINARY_EDGE_LOG: 54 | return make_unique(path); 55 | default: 56 | ERROR("Unrecognised graph format for the file: `" << path << "'"); 57 | } 58 | } 59 | 60 | } // namespace reader 61 | 62 | -------------------------------------------------------------------------------- /reader/reader.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2019 Dean De Leo, email: dleo[at]cwi.nl 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | #pragma once 19 | 20 | #include 21 | #include "common/error.hpp" 22 | 23 | namespace gfe::graph { class WeightedEdge; } // forward decl. 24 | 25 | namespace gfe::reader { 26 | 27 | /** 28 | * Forward iterator to read the list of weighted edges from a stored file. Usage: 29 | * 30 | * auto reader = Reader::open( path_to_read ); 31 | * WeightedEdge edge; 32 | * while ( reader.read(&edge) ) { 33 | * // ... process edge ... 34 | * } 35 | * 36 | */ 37 | class Reader { 38 | // disable copy ctors 39 | Reader(const Reader&) = delete; 40 | Reader& operator=(const Reader&) = delete; 41 | 42 | public: 43 | // Factory method, to obtain a specific reader depending on the extention of the given file name 44 | static std::unique_ptr open(const std::string& path); 45 | 46 | // Default constructor 47 | Reader(); 48 | 49 | // Virtual destructor 50 | virtual ~Reader(); 51 | 52 | // Retrieve the next edge of the file. Returns true if an edge has been read, false if we reached the end of the file. 53 | virtual bool read(graph::WeightedEdge& edge) = 0; 54 | 55 | // Check whether the input graph is directed or not 56 | virtual bool is_directed() const = 0; 57 | }; 58 | 59 | /** 60 | * Raised due an error encountered by a reader 61 | */ 62 | DEFINE_EXCEPTION(ReaderError); 63 | 64 | } // namespace 65 | -------------------------------------------------------------------------------- /reader/utility.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2019 Dean De Leo, email: dleo[at]cwi.nl 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | #include "reader.hpp" 19 | #include "utility.hpp" 20 | 21 | #include 22 | #include "common/filesystem.hpp" 23 | 24 | using namespace std; 25 | 26 | #undef CURRENT_ERROR_TYPE 27 | #define CURRENT_ERROR_TYPE ::gfe::reader::ReaderError 28 | 29 | namespace gfe::reader { 30 | 31 | fstream init_fstream(const string& path){ 32 | fstream handle(path.c_str(), ios_base::in); 33 | if(!handle.good()){ // some error occurred 34 | if(!common::filesystem::file_exists(path)){ 35 | ERROR("The file `" << path << "' does not exist"); 36 | } else { 37 | ERROR("Cannot read the file: `" << path << "'"); 38 | } 39 | } 40 | return handle; 41 | } 42 | 43 | } // namespace reader 44 | -------------------------------------------------------------------------------- /reader/utility.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2019 Dean De Leo, email: dleo[at]cwi.nl 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | #pragma once 19 | 20 | #include 21 | #include 22 | 23 | namespace gfe::reader { 24 | 25 | // Open an input stream to read the content of the given file 26 | std::fstream init_fstream(const std::string& path); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /tests/graphs/ldbc_graphalytics/example-directed-BFS: -------------------------------------------------------------------------------- 1 | 1 0 2 | 2 9223372036854775807 3 | 3 1 4 | 4 2 5 | 5 1 6 | 6 9223372036854775807 7 | 7 9223372036854775807 8 | 8 2 9 | 9 9223372036854775807 10 | 10 2 11 | -------------------------------------------------------------------------------- /tests/graphs/ldbc_graphalytics/example-directed-CDLP: -------------------------------------------------------------------------------- 1 | 1 1 2 | 2 2 3 | 3 3 4 | 4 4 5 | 5 1 6 | 6 1 7 | 7 2 8 | 8 3 9 | 9 2 10 | 10 1 11 | -------------------------------------------------------------------------------- /tests/graphs/ldbc_graphalytics/example-directed-LCC: -------------------------------------------------------------------------------- 1 | 1 6.666666666666666e-01 2 | 2 1.666666666666667e-01 3 | 3 1.500000000000000e-01 4 | 4 5.000000000000000e-02 5 | 5 2.500000000000000e-01 6 | 6 0.000000000000000e+00 7 | 7 0.000000000000000e+00 8 | 8 8.333333333333334e-01 9 | 9 0.000000000000000e+00 10 | 10 0.000000000000000e+00 11 | -------------------------------------------------------------------------------- /tests/graphs/ldbc_graphalytics/example-directed-PR: -------------------------------------------------------------------------------- 1 | 1 1.477629166666667e-01 2 | 2 4.753375000000000e-02 3 | 3 1.550469444444444e-01 4 | 4 1.597573611111111e-01 5 | 5 1.462400000000000e-01 6 | 6 4.753375000000000e-02 7 | 7 4.753375000000000e-02 8 | 8 1.135740277777778e-01 9 | 9 4.753375000000000e-02 10 | 10 8.748375000000001e-02 11 | -------------------------------------------------------------------------------- /tests/graphs/ldbc_graphalytics/example-directed-SSSP: -------------------------------------------------------------------------------- 1 | 1 0.000000000000000e+00 2 | 2 infinity 3 | 3 5.000000000000000e-01 4 | 4 8.300000000000001e-01 5 | 5 3.000000000000000e-01 6 | 6 infinity 7 | 7 infinity 8 | 8 4.000000000000000e-01 9 | 9 infinity 10 | 10 1.020000000000000e+00 11 | -------------------------------------------------------------------------------- /tests/graphs/ldbc_graphalytics/example-directed-WCC: -------------------------------------------------------------------------------- 1 | 1 1 2 | 2 1 3 | 3 1 4 | 4 1 5 | 5 1 6 | 6 1 7 | 7 1 8 | 8 1 9 | 9 1 10 | 10 1 11 | -------------------------------------------------------------------------------- /tests/graphs/ldbc_graphalytics/example-directed-compressed.ez: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerFuchs/gfe_driver/92c04ee5e447ff674d1cfa2ffa5945be01f67853/tests/graphs/ldbc_graphalytics/example-directed-compressed.ez -------------------------------------------------------------------------------- /tests/graphs/ldbc_graphalytics/example-directed-compressed.properties: -------------------------------------------------------------------------------- 1 | # Created by vtxremap, on 22/10/2019 19:01:31 2 | 3 | # Filenames of graph on local filesystem 4 | graph.example-directed-compressed.vertex-file = example-directed-compressed.vz 5 | graph.example-directed-compressed.edge-file = example-directed-compressed.ez 6 | 7 | # Graph metadata for reporting purposes 8 | graph.example-directed-compressed.meta.vertices = 10 9 | graph.example-directed-compressed.meta.edges = 17 10 | graph.example-directed-compressed.meta.hostname = dell-linux 11 | graph.example-directed-compressed.meta.input-graph = example-directed.properties 12 | 13 | # Properties describing the graph format 14 | graph.example-directed-compressed.compression = zlib 15 | graph.example-directed-compressed.directed = true 16 | 17 | # Description of graph properties 18 | graph.example-directed-compressed.edge-properties.names = weight 19 | graph.example-directed-compressed.edge-properties.types = real 20 | 21 | # List of supported algorithms on the graph 22 | graph.example-directed-compressed.algorithms = bfs, cdlp, lcc, pr, sssp, wcc 23 | 24 | 25 | # 26 | # Per-algorithm properties describing the input parameters to each algorithm 27 | # 28 | 29 | # Parameters for BFS 30 | graph.example-directed-compressed.bfs.source-vertex = 0 31 | 32 | # Parameters for CDLP 33 | graph.example-directed-compressed.cdlp.max-iterations = 2 34 | 35 | # No parameters for LCC 36 | 37 | # Parameters for PR 38 | graph.example-directed-compressed.pr.damping-factor = 0.85 39 | graph.example-directed-compressed.pr.num-iterations = 2 40 | 41 | # Parameters for SSSP 42 | graph.example-directed-compressed.sssp.weight-property = weight 43 | graph.example-directed-compressed.sssp.source-vertex = 0 44 | 45 | # No parameters for WCC 46 | -------------------------------------------------------------------------------- /tests/graphs/ldbc_graphalytics/example-directed-compressed.vz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerFuchs/gfe_driver/92c04ee5e447ff674d1cfa2ffa5945be01f67853/tests/graphs/ldbc_graphalytics/example-directed-compressed.vz -------------------------------------------------------------------------------- /tests/graphs/ldbc_graphalytics/example-directed.e: -------------------------------------------------------------------------------- 1 | 1 3 0.5 2 | 1 5 0.3 3 | 2 4 0.1 4 | 2 5 0.3 5 | 2 10 0.12 6 | 3 1 0.53 7 | 3 5 0.62 8 | 3 8 0.21 9 | 3 10 0.52 10 | 5 3 0.69 11 | 5 4 0.53 12 | 5 8 0.1 13 | 6 3 0.23 14 | 6 4 0.39 15 | 7 4 0.83 16 | 8 1 0.39 17 | 9 4 0.69 18 | -------------------------------------------------------------------------------- /tests/graphs/ldbc_graphalytics/example-directed.properties: -------------------------------------------------------------------------------- 1 | # Properties file describing the example-directed dataset 2 | 3 | # Filenames of graph on local filesystem 4 | graph.example-directed.vertex-file = example-directed.v 5 | graph.example-directed.edge-file = example-directed.e 6 | 7 | # Graph metadata for reporting purposes 8 | graph.example-directed.meta.vertices = 10 9 | graph.example-directed.meta.edges = 17 10 | 11 | # Properties describing the graph format 12 | graph.example-directed.directed = true 13 | 14 | # Description of graph properties 15 | graph.example-directed.edge-properties.names = weight 16 | graph.example-directed.edge-properties.types = real 17 | 18 | # List of supported algorithms on the graph 19 | graph.example-directed.algorithms = bfs, cdlp, lcc, pr, sssp, wcc 20 | 21 | # 22 | # Per-algorithm properties describing the input parameters to each algorithm 23 | # 24 | 25 | # Parameters for BFS 26 | graph.example-directed.bfs.source-vertex = 1 27 | 28 | # Parameters for CDLP 29 | graph.example-directed.cdlp.max-iterations = 2 30 | 31 | # No parameters for LCC 32 | 33 | # Parameters for PR 34 | graph.example-directed.pr.damping-factor = 0.85 35 | graph.example-directed.pr.num-iterations = 2 36 | 37 | # Parameters for SSSP 38 | graph.example-directed.sssp.weight-property = weight 39 | graph.example-directed.sssp.source-vertex = 1 40 | 41 | # No parameters for WCC 42 | -------------------------------------------------------------------------------- /tests/graphs/ldbc_graphalytics/example-directed.v: -------------------------------------------------------------------------------- 1 | 1 2 | 2 3 | 3 4 | 4 5 | 5 6 | 6 7 | 7 8 | 8 9 | 9 10 | 10 11 | -------------------------------------------------------------------------------- /tests/graphs/ldbc_graphalytics/example-undirected-BFS: -------------------------------------------------------------------------------- 1 | 2 0 2 | 3 1 3 | 4 1 4 | 5 2 5 | 6 3 6 | 7 4 7 | 8 2 8 | 9 4 9 | 10 4 10 | -------------------------------------------------------------------------------- /tests/graphs/ldbc_graphalytics/example-undirected-CDLP: -------------------------------------------------------------------------------- 1 | 2 2 2 | 3 3 3 | 4 2 4 | 5 2 5 | 6 6 6 | 7 5 7 | 8 2 8 | 9 5 9 | 10 5 10 | -------------------------------------------------------------------------------- /tests/graphs/ldbc_graphalytics/example-undirected-LCC: -------------------------------------------------------------------------------- 1 | 2 1.000000000000000e+00 2 | 3 3.333333333333333e-01 3 | 4 1.000000000000000e+00 4 | 5 6.666666666666666e-01 5 | 6 2.000000000000000e-01 6 | 7 1.000000000000000e+00 7 | 8 6.666666666666666e-01 8 | 9 1.000000000000000e+00 9 | 10 0.000000000000000e+00 10 | -------------------------------------------------------------------------------- /tests/graphs/ldbc_graphalytics/example-undirected-PR: -------------------------------------------------------------------------------- 1 | 2 9.084490740740739e-02 2 | 3 1.424089506172839e-01 3 | 4 9.084490740740739e-02 4 | 5 1.249891975308642e-01 5 | 6 1.686172839506173e-01 6 | 7 9.749537037037037e-02 7 | 8 1.249891975308642e-01 8 | 9 9.749537037037037e-02 9 | 10 6.231481481481481e-02 10 | -------------------------------------------------------------------------------- /tests/graphs/ldbc_graphalytics/example-undirected-SSSP: -------------------------------------------------------------------------------- 1 | 2 0.000000000000000e+00 2 | 3 8.200000000000000e-01 3 | 4 6.899999999999999e-01 4 | 5 1.260000000000000e+00 5 | 6 1.780000000000000e+00 6 | 7 2.310000000000000e+00 7 | 8 1.140000000000000e+00 8 | 9 2.010000000000000e+00 9 | 10 2.410000000000000e+00 10 | -------------------------------------------------------------------------------- /tests/graphs/ldbc_graphalytics/example-undirected-WCC: -------------------------------------------------------------------------------- 1 | 2 2 2 | 3 2 3 | 4 2 4 | 5 2 5 | 6 2 6 | 7 2 7 | 8 2 8 | 9 2 9 | 10 2 10 | -------------------------------------------------------------------------------- /tests/graphs/ldbc_graphalytics/example-undirected-compressed.ez: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerFuchs/gfe_driver/92c04ee5e447ff674d1cfa2ffa5945be01f67853/tests/graphs/ldbc_graphalytics/example-undirected-compressed.ez -------------------------------------------------------------------------------- /tests/graphs/ldbc_graphalytics/example-undirected-compressed.graphlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerFuchs/gfe_driver/92c04ee5e447ff674d1cfa2ffa5945be01f67853/tests/graphs/ldbc_graphalytics/example-undirected-compressed.graphlog -------------------------------------------------------------------------------- /tests/graphs/ldbc_graphalytics/example-undirected-compressed.properties: -------------------------------------------------------------------------------- 1 | # Created by vtxremap, on 22/10/2019 19:03:37 2 | 3 | # Filenames of graph on local filesystem 4 | graph.example-undirected-compressed.vertex-file = example-undirected-compressed.vz 5 | graph.example-undirected-compressed.edge-file = example-undirected-compressed.ez 6 | 7 | # Graph metadata for reporting purposes 8 | graph.example-undirected-compressed.meta.vertices = 9 9 | graph.example-undirected-compressed.meta.edges = 12 10 | graph.example-undirected-compressed.meta.hostname = dell-linux 11 | graph.example-undirected-compressed.meta.input-graph = example-undirected.properties 12 | 13 | # Properties describing the graph format 14 | graph.example-undirected-compressed.compression = zlib 15 | graph.example-undirected-compressed.directed = false 16 | 17 | # Description of graph properties 18 | graph.example-undirected-compressed.edge-properties.names = weight 19 | graph.example-undirected-compressed.edge-properties.types = real 20 | 21 | # List of supported algorithms on the graph 22 | graph.example-undirected-compressed.algorithms = bfs, cdlp, lcc, pr, sssp, wcc 23 | 24 | 25 | # 26 | # Per-algorithm properties describing the input parameters to each algorithm 27 | # 28 | 29 | # Parameters for BFS 30 | graph.example-undirected-compressed.bfs.source-vertex = 0 31 | 32 | # Parameters for CDLP 33 | graph.example-undirected-compressed.cdlp.max-iterations = 2 34 | 35 | # No parameters for LCC 36 | 37 | # Parameters for PR 38 | graph.example-undirected-compressed.pr.damping-factor = 0.85 39 | graph.example-undirected-compressed.pr.num-iterations = 2 40 | 41 | # Parameters for SSSP 42 | graph.example-undirected-compressed.sssp.weight-property = weight 43 | graph.example-undirected-compressed.sssp.source-vertex = 0 44 | 45 | # No parameters for WCC 46 | -------------------------------------------------------------------------------- /tests/graphs/ldbc_graphalytics/example-undirected-compressed.vz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerFuchs/gfe_driver/92c04ee5e447ff674d1cfa2ffa5945be01f67853/tests/graphs/ldbc_graphalytics/example-undirected-compressed.vz -------------------------------------------------------------------------------- /tests/graphs/ldbc_graphalytics/example-undirected-dense.ez: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerFuchs/gfe_driver/92c04ee5e447ff674d1cfa2ffa5945be01f67853/tests/graphs/ldbc_graphalytics/example-undirected-dense.ez -------------------------------------------------------------------------------- /tests/graphs/ldbc_graphalytics/example-undirected-dense.properties: -------------------------------------------------------------------------------- 1 | # Created by vtxremap, on 26/12/2020 11:25:54 2 | 3 | # Filenames of graph on local filesystem 4 | graph.example-undirected-dense.vertex-file = example-undirected-dense.vz 5 | graph.example-undirected-dense.edge-file = example-undirected-dense.ez 6 | 7 | # Graph metadata for reporting purposes 8 | graph.example-undirected-dense.meta.vertices = 9 9 | graph.example-undirected-dense.meta.edges = 12 10 | graph.example-undirected-dense.meta.hostname = bricks03 11 | graph.example-undirected-dense.meta.stable-map = true 12 | graph.example-undirected-dense.meta.input-graph = example-undirected.properties 13 | 14 | # Properties describing the graph format 15 | graph.example-undirected-dense.compression = zlib 16 | graph.example-undirected-dense.directed = false 17 | 18 | # Description of graph properties 19 | graph.example-undirected-dense.edge-properties.names = weight 20 | graph.example-undirected-dense.edge-properties.types = real 21 | 22 | # List of supported algorithms on the graph 23 | graph.example-undirected-dense.algorithms = bfs, cdlp, lcc, pr, sssp, wcc 24 | 25 | 26 | # 27 | # Per-algorithm properties describing the input parameters to each algorithm 28 | # 29 | 30 | # Parameters for BFS 31 | graph.example-undirected-dense.bfs.source-vertex = 0 32 | 33 | # Parameters for CDLP 34 | graph.example-undirected-dense.cdlp.max-iterations = 2 35 | 36 | # No parameters for LCC 37 | 38 | # Parameters for PR 39 | graph.example-undirected-dense.pr.damping-factor = 0.85 40 | graph.example-undirected-dense.pr.num-iterations = 2 41 | 42 | # Parameters for SSSP 43 | graph.example-undirected-dense.sssp.weight-property = weight 44 | graph.example-undirected-dense.sssp.source-vertex = 0 45 | 46 | # No parameters for WCC 47 | -------------------------------------------------------------------------------- /tests/graphs/ldbc_graphalytics/example-undirected-dense.vz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerFuchs/gfe_driver/92c04ee5e447ff674d1cfa2ffa5945be01f67853/tests/graphs/ldbc_graphalytics/example-undirected-dense.vz -------------------------------------------------------------------------------- /tests/graphs/ldbc_graphalytics/example-undirected-nonweighted.ez: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerFuchs/gfe_driver/92c04ee5e447ff674d1cfa2ffa5945be01f67853/tests/graphs/ldbc_graphalytics/example-undirected-nonweighted.ez -------------------------------------------------------------------------------- /tests/graphs/ldbc_graphalytics/example-undirected-nonweighted.properties: -------------------------------------------------------------------------------- 1 | # Created by vtxremap, on 24/10/2019 00:13:27 2 | 3 | # Filenames of graph on local filesystem 4 | graph.example-undirected-nonweighted.vertex-file = example-undirected-nonweighted.vz 5 | graph.example-undirected-nonweighted.edge-file = example-undirected-nonweighted.ez 6 | 7 | # Graph metadata for reporting purposes 8 | graph.example-undirected-nonweighted.meta.vertices = 9 9 | graph.example-undirected-nonweighted.meta.edges = 12 10 | graph.example-undirected-nonweighted.meta.hostname = sebastian 11 | graph.example-undirected-nonweighted.meta.input-graph = example-undirected.properties 12 | 13 | # Properties describing the graph format 14 | graph.example-undirected-nonweighted.compression = zlib 15 | graph.example-undirected-nonweighted.directed = false 16 | 17 | # List of supported algorithms on the graph 18 | graph.example-undirected-nonweighted.algorithms = bfs, cdlp, lcc, pr, wcc 19 | 20 | 21 | # 22 | # Per-algorithm properties describing the input parameters to each algorithm 23 | # 24 | 25 | # Parameters for BFS 26 | graph.example-undirected-nonweighted.bfs.source-vertex = 0 27 | 28 | # Parameters for CDLP 29 | graph.example-undirected-nonweighted.cdlp.max-iterations = 2 30 | 31 | # No parameters for LCC 32 | 33 | # Parameters for PR 34 | graph.example-undirected-nonweighted.pr.damping-factor = 0.85 35 | graph.example-undirected-nonweighted.pr.num-iterations = 2 36 | 37 | # No parameters for WCC 38 | -------------------------------------------------------------------------------- /tests/graphs/ldbc_graphalytics/example-undirected-nonweighted.vz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerFuchs/gfe_driver/92c04ee5e447ff674d1cfa2ffa5945be01f67853/tests/graphs/ldbc_graphalytics/example-undirected-nonweighted.vz -------------------------------------------------------------------------------- /tests/graphs/ldbc_graphalytics/example-undirected-validate.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | 3 | # Generate the list of edges to validate for test_graphlog.cpp Graphlog::EdgeReader 4 | 5 | use strict; 6 | use warnings; 7 | 8 | open(my $f, "/tmp/edges.txt"); # create a log (input.txt) in the generator of the form [src: , dst: , weight: ] 9 | my $matches = 0; 10 | 11 | while(my $line = <$f>){ 12 | if($line =~ /\[src: (\d+), dst: (\d+), weight: (-?[\d\.]+)\]/){ 13 | print("validate_edge(reader, $1, $2, $3);\n"); 14 | $matches ++; 15 | } 16 | } 17 | 18 | close($f); 19 | 20 | print("matches: $matches\n"); -------------------------------------------------------------------------------- /tests/graphs/ldbc_graphalytics/example-undirected.e: -------------------------------------------------------------------------------- 1 | 2 3 0.9 2 | 2 4 0.69 3 | 3 4 0.13 4 | 3 5 0.5 5 | 3 8 0.32 6 | 5 6 0.63 7 | 5 8 0.12 8 | 6 7 0.53 9 | 6 8 0.64 10 | 6 9 0.23 11 | 6 10 0.63 12 | 7 9 0.36 13 | -------------------------------------------------------------------------------- /tests/graphs/ldbc_graphalytics/example-undirected.graphlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerFuchs/gfe_driver/92c04ee5e447ff674d1cfa2ffa5945be01f67853/tests/graphs/ldbc_graphalytics/example-undirected.graphlog -------------------------------------------------------------------------------- /tests/graphs/ldbc_graphalytics/example-undirected.properties: -------------------------------------------------------------------------------- 1 | # Properties file describing an example undirected dataset 2 | # Link: 3 | 4 | # Filenames of graph on local filesystem 5 | graph.example-undirected.vertex-file = example-undirected.v 6 | graph.example-undirected.edge-file = example-undirected.e 7 | 8 | # Graph metadata for reporting purposes 9 | graph.example-undirected.meta.vertices = 9 10 | graph.example-undirected.meta.edges = 12 11 | 12 | # Properties describing the graph format 13 | graph.example-undirected.directed = false 14 | 15 | # Description of graph properties 16 | graph.example-undirected.edge-properties.names = weight 17 | graph.example-undirected.edge-properties.types = real 18 | 19 | # List of supported algorithms on the graph 20 | graph.example-undirected.algorithms = bfs, cdlp, lcc, pr, sssp, wcc 21 | 22 | 23 | # 24 | # Per-algorithm properties describing the input parameters to each algorithm 25 | # 26 | 27 | # Parameters for BFS 28 | graph.example-undirected.bfs.source-vertex = 2 29 | 30 | # Parameters for CDLP 31 | graph.example-undirected.cdlp.max-iterations = 2 32 | 33 | # No parameters for LCC 34 | 35 | # Parameters for PR 36 | graph.example-undirected.pr.damping-factor = 0.85 37 | graph.example-undirected.pr.num-iterations = 2 38 | 39 | # Parameters for SSSP 40 | graph.example-undirected.sssp.weight-property = weight 41 | graph.example-undirected.sssp.source-vertex = 2 42 | 43 | # No parameters for WCC 44 | -------------------------------------------------------------------------------- /tests/graphs/ldbc_graphalytics/example-undirected.v: -------------------------------------------------------------------------------- 1 | 2 2 | 3 3 | 4 4 | 5 5 | 6 6 | 7 7 | 8 8 | 9 9 | 10 10 | -------------------------------------------------------------------------------- /tests/graphs/non_weighted.el: -------------------------------------------------------------------------------- 1 | # Simple non weighted graph 2 | # Each line corresponds to an edge: src dst 3 | 1 2 4 | 1 3 5 | 1 4 6 | 2 1 7 | 2 4 8 | 3 1 9 | 3 4 10 | 4 1 11 | 4 2 12 | 4 3 13 | -------------------------------------------------------------------------------- /tests/graphs/shortest_paths.wel: -------------------------------------------------------------------------------- 1 | # 2 | # 105 3 | # ------> 20 ---------- 4 | # / ^ \ 1 5 | # / | 15 \ 6 | # 5 / 75 | \ 7 | # ------> 10 ---------> 21 ------ \ 20 8 | # / | \ 2 \ +-----> 41 9 | # / | 15 \ \ / | 10 | # / 10 65 | 3 \ \ / | 11 | # 1 ---------> 11 ---------> 22 ---------+-------+---> 30 | 10 12 | # \ | / / \ | 13 | # \ | 15 / / \ 5 | 14 | # \ 15 45 | / 4 / +-----> 42 15 | # ------> 12 ---------> 23 ------ / 16 | # \ ^ / 17 | # \ | 15 / 18 | # \ 25 | / 5 20 19 | # ------> 24 ---------- 35 --------> 45 20 | # 21 | # Shortest paths, from 1: 22 | # Dest Non weighted Weighted 23 | # 10 1 5 24 | # 11 1 10 25 | # 12 1 15 26 | # 20 2, by 10 95, 1->10->21->20 27 | # 21 2, by 10 80, 1->10->21 28 | # 22 2, by 11 70, 1->12->24->23->22 29 | # 23 2, by 12 55, 1->12->24->23 30 | # 24 2, by 12 40, 1->12->24 31 | # 30 3, mult. choices 45, 1->12->24->30 32 | # 35 inf inf 33 | # 41 4 60, 1->12->24->30->42->41 34 | # 42 4 50, 1->12->24->30->42 35 | # 45 inf inf 36 | # 37 | 38 | 1 10 5 39 | 1 11 10 40 | 1 12 15 41 | 10 20 105 42 | 10 21 75 43 | 11 22 65 44 | 12 23 45 45 | 12 24 25 46 | 20 30 1 47 | 21 20 15 48 | 21 30 2 49 | 22 21 15 50 | 22 23 15 51 | 22 30 3 52 | 23 22 15 53 | 23 30 4 54 | 24 23 15 55 | 24 30 5 56 | 30 41 20 57 | 30 42 5 58 | 35 45 20 59 | 41 42 10 60 | 42 41 10 61 | -------------------------------------------------------------------------------- /tests/graphs/weighted_no_comments.dimacs9: -------------------------------------------------------------------------------- 1 | a 1 2 10 2 | a 1 3 100 3 | a 1 4 200 4 | a 2 1 10 5 | a 2 4 10 6 | a 3 1 100 7 | a 3 4 10 8 | a 4 1 200 9 | a 4 2 10 10 | a 4 3 10 -------------------------------------------------------------------------------- /tests/graphs/weighted_no_comments.metis: -------------------------------------------------------------------------------- 1 | 4 5 001 2 | 2 10 3 100 4 200 3 | 1 10 4 10 4 | 1 100 4 10 5 | 1 200 2 10 3 10 -------------------------------------------------------------------------------- /tests/graphs/weighted_no_comments.wel: -------------------------------------------------------------------------------- 1 | 1 2 10 2 | 1 3 100 3 | 1 4 200 4 | 2 1 10 5 | 2 4 10 6 | 3 1 100 7 | 3 4 10 8 | 4 1 200 9 | 4 2 10 10 | 4 3 10 -------------------------------------------------------------------------------- /tests/graphs/weighted_with_comments.dimacs9: -------------------------------------------------------------------------------- 1 | c This is a comment 2 | c In theory, the parser should be able to successfully able to skip them 3 | a 1 2 10 4 | c Another comment 5 | a 1 3 100 6 | c This is another comment 7 | a 1 4 200 8 | a 2 1 10 9 | a 2 4 10 c In body comments are allowed 10 | a 3 1 100 11 | c Empty lines should be skipped 12 | 13 | a 3 4 10 14 | 15 | c This is a half broken comment 16 | c Than continues 17 | c for 18 | c several lines 19 | c and stops here.... 20 | a 4 1 200 21 | a 4 2 10 22 | a 4 3 10 23 | c And then we terminate with a comment 24 | c ... and an empty line ... 25 | -------------------------------------------------------------------------------- /tests/graphs/weighted_with_comments.metis: -------------------------------------------------------------------------------- 1 | 4 5 001 2 | % Same graph as weighted_no_comments with some lines commented 3 | % The parser should be able to ignore all comments in the file 4 | 2 10 3 100 4 200 5 | % this is another comment 6 | 1 10 4 10 7 | % this is a comment with few spaces at the start 8 | 1 100 4 10 9 | 1 200 2 10 3 10 10 | % this is a series of comments 11 | % at the end of the file -------------------------------------------------------------------------------- /tests/graphs/weighted_with_comments.wel: -------------------------------------------------------------------------------- 1 | # This is a comment 2 | # In theory, the parser should be able to successfully able to skip them 3 | 1 2 10 4 | # Another comment 5 | 1 3 100 6 | # This is another comment 7 | 1 4 200 8 | 2 1 10 9 | 2 4 10 # In body comments are allowed 10 | 3 1 100 11 | # Empty lines should be skipped 12 | 13 | 3 4 10 14 | 15 | # This is a half broken comment 16 | # Than continues 17 | # for 18 | # several lines 19 | # and stops here.... 20 | 4 1 200 21 | 4 2 10 22 | 4 3 10 23 | # And then we terminate with a comment 24 | # ... and an empty line ... 25 | -------------------------------------------------------------------------------- /tests/test_async_batch.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2019 Dean De Leo, email: dleo[at]cwi.nl 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | 19 | #include "gtest/gtest.h" 20 | 21 | #include // getenv 22 | #include 23 | #include 24 | 25 | #include "experiment/details/async_batch.hpp" 26 | #include "graph/edge.hpp" 27 | #include "library/baseline/adjacency_list.hpp" 28 | 29 | using namespace gfe::experiment::details; 30 | using namespace gfe::graph; 31 | using namespace gfe::library; 32 | using namespace std; 33 | 34 | TEST(AsyncBatch, Sanity){ 35 | auto library = make_shared(/* directed = */ true); 36 | AsyncBatch batch { library.get(), 1, /* num batches */ 3, /* batch_sz */ 4}; 37 | 38 | for(uint64_t i = 1; i <= 8; i++){ 39 | library->add_vertex(i); 40 | } 41 | 42 | for(uint64_t i = 1; i < 8; i++){ 43 | for(uint64_t j = i +1; j <= 8; j++){ 44 | batch.add_edge(WeightedEdge{i, j, (double) i + j}); 45 | } 46 | } 47 | batch.flush(true); 48 | 49 | // library->dump(); 50 | 51 | for(uint64_t i = 1; i < 8; i++){ 52 | for(uint64_t j = i +1; j <= 8; j++){ 53 | ASSERT_TRUE(library->has_edge(i, j)); 54 | ASSERT_EQ(library->get_weight(i, j), i +j); 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /third-party/cxxopts/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Jarryd Beck 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /third-party/googletest/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.8) 2 | 3 | if (POLICY CMP0048) 4 | cmake_policy(SET CMP0048 NEW) 5 | endif (POLICY CMP0048) 6 | 7 | project(googletest-distribution) 8 | set(GOOGLETEST_VERSION 1.9.0) 9 | 10 | enable_testing() 11 | 12 | include(CMakeDependentOption) 13 | include(GNUInstallDirs) 14 | 15 | #Note that googlemock target already builds googletest 16 | option(BUILD_GMOCK "Builds the googlemock subproject" ON) 17 | option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON) 18 | 19 | if(BUILD_GMOCK) 20 | add_subdirectory( googlemock ) 21 | else() 22 | add_subdirectory( googletest ) 23 | endif() 24 | -------------------------------------------------------------------------------- /third-party/googletest/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2008, Google Inc. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above 11 | copyright notice, this list of conditions and the following disclaimer 12 | in the documentation and/or other materials provided with the 13 | distribution. 14 | * Neither the name of Google Inc. nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /third-party/googletest/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | ACLOCAL_AMFLAGS = -I m4 3 | 4 | AUTOMAKE_OPTIONS = foreign 5 | 6 | # Build . before src so that our all-local and clean-local hooks kicks in at 7 | # the right time. 8 | SUBDIRS = googletest googlemock 9 | 10 | EXTRA_DIST = \ 11 | BUILD.bazel \ 12 | CMakeLists.txt \ 13 | README.md \ 14 | WORKSPACE 15 | -------------------------------------------------------------------------------- /third-party/googletest/WORKSPACE: -------------------------------------------------------------------------------- 1 | workspace(name = "com_google_googletest") 2 | 3 | # Abseil 4 | http_archive( 5 | name = "com_google_absl", 6 | urls = ["https://github.com/abseil/abseil-cpp/archive/master.zip"], 7 | strip_prefix = "abseil-cpp-master", 8 | ) 9 | -------------------------------------------------------------------------------- /third-party/googletest/ci/build-linux-autotools.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright 2017 Google Inc. 3 | # All Rights Reserved. 4 | # 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are 8 | # met: 9 | # 10 | # * Redistributions of source code must retain the above copyright 11 | # notice, this list of conditions and the following disclaimer. 12 | # * Redistributions in binary form must reproduce the above 13 | # copyright notice, this list of conditions and the following disclaimer 14 | # in the documentation and/or other materials provided with the 15 | # distribution. 16 | # * Neither the name of Google Inc. nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | set -e 33 | 34 | . ci/get-nprocessors.sh 35 | 36 | # Create the configuration script 37 | autoreconf -i 38 | 39 | # Run in a subdirectory to keep the sources clean 40 | mkdir build || true 41 | cd build 42 | ../configure 43 | 44 | make -j ${NPROCESSORS:-2} 45 | -------------------------------------------------------------------------------- /third-party/googletest/ci/build-linux-bazel.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright 2017 Google Inc. 3 | # All Rights Reserved. 4 | # 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are 8 | # met: 9 | # 10 | # * Redistributions of source code must retain the above copyright 11 | # notice, this list of conditions and the following disclaimer. 12 | # * Redistributions in binary form must reproduce the above 13 | # copyright notice, this list of conditions and the following disclaimer 14 | # in the documentation and/or other materials provided with the 15 | # distribution. 16 | # * Neither the name of Google Inc. nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | set -e 33 | 34 | bazel build --curses=no //...:all 35 | bazel test --curses=no //...:all 36 | bazel test --curses=no //...:all --define absl=1 37 | -------------------------------------------------------------------------------- /third-party/googletest/ci/env-linux.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright 2017 Google Inc. 3 | # All Rights Reserved. 4 | # 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are 8 | # met: 9 | # 10 | # * Redistributions of source code must retain the above copyright 11 | # notice, this list of conditions and the following disclaimer. 12 | # * Redistributions in binary form must reproduce the above 13 | # copyright notice, this list of conditions and the following disclaimer 14 | # in the documentation and/or other materials provided with the 15 | # distribution. 16 | # * Neither the name of Google Inc. nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | # 33 | # This file should be sourced, and not executed as a standalone script. 34 | # 35 | 36 | # TODO() - we can check if this is being sourced using $BASH_VERSION and $BASH_SOURCE[0] != ${0}. 37 | 38 | if [ "${TRAVIS_OS_NAME}" = "linux" ]; then 39 | if [ "$CXX" = "g++" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi 40 | if [ "$CXX" = "clang++" ]; then export CXX="clang++-3.9" CC="clang-3.9"; fi 41 | fi 42 | -------------------------------------------------------------------------------- /third-party/googletest/ci/env-osx.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright 2017 Google Inc. 3 | # All Rights Reserved. 4 | # 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are 8 | # met: 9 | # 10 | # * Redistributions of source code must retain the above copyright 11 | # notice, this list of conditions and the following disclaimer. 12 | # * Redistributions in binary form must reproduce the above 13 | # copyright notice, this list of conditions and the following disclaimer 14 | # in the documentation and/or other materials provided with the 15 | # distribution. 16 | # * Neither the name of Google Inc. nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | # 33 | # This file should be sourced, and not executed as a standalone script. 34 | # 35 | 36 | # TODO() - we can check if this is being sourced using $BASH_VERSION and $BASH_SOURCE[0] != ${0}. 37 | 38 | if [ "${TRAVIS_OS_NAME}" = "linux" ]; then 39 | if [ "$CXX" = "clang++" ]; then export CXX="clang++-3.9" CC="clang-3.9"; fi 40 | fi 41 | -------------------------------------------------------------------------------- /third-party/googletest/ci/install-osx.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright 2017 Google Inc. 3 | # All Rights Reserved. 4 | # 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are 8 | # met: 9 | # 10 | # * Redistributions of source code must retain the above copyright 11 | # notice, this list of conditions and the following disclaimer. 12 | # * Redistributions in binary form must reproduce the above 13 | # copyright notice, this list of conditions and the following disclaimer 14 | # in the documentation and/or other materials provided with the 15 | # distribution. 16 | # * Neither the name of Google Inc. nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | set -eu 33 | 34 | if [ "${TRAVIS_OS_NAME}" != "osx" ]; then 35 | echo "Not a macOS build; skipping installation" 36 | exit 0 37 | fi 38 | 39 | brew install ccache 40 | -------------------------------------------------------------------------------- /third-party/googletest/ci/log-config.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright 2017 Google Inc. 3 | # All Rights Reserved. 4 | # 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are 8 | # met: 9 | # 10 | # * Redistributions of source code must retain the above copyright 11 | # notice, this list of conditions and the following disclaimer. 12 | # * Redistributions in binary form must reproduce the above 13 | # copyright notice, this list of conditions and the following disclaimer 14 | # in the documentation and/or other materials provided with the 15 | # distribution. 16 | # * Neither the name of Google Inc. nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | set -e 33 | 34 | # ccache on OS X needs installation first 35 | # reset ccache statistics 36 | ccache --zero-stats 37 | 38 | echo PATH=${PATH} 39 | 40 | echo "Compiler configuration:" 41 | echo CXX=${CXX} 42 | echo CC=${CC} 43 | echo CXXFLAGS=${CXXFLAGS} 44 | 45 | echo "C++ compiler version:" 46 | ${CXX} --version || echo "${CXX} does not seem to support the --version flag" 47 | ${CXX} -v || echo "${CXX} does not seem to support the -v flag" 48 | 49 | echo "C compiler version:" 50 | ${CC} --version || echo "${CXX} does not seem to support the --version flag" 51 | ${CC} -v || echo "${CXX} does not seem to support the -v flag" 52 | -------------------------------------------------------------------------------- /third-party/googletest/ci/travis.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | set -evx 3 | 4 | . ci/get-nprocessors.sh 5 | 6 | # if possible, ask for the precise number of processors, 7 | # otherwise take 2 processors as reasonable default; see 8 | # https://docs.travis-ci.com/user/speeding-up-the-build/#Makefile-optimization 9 | if [ -x /usr/bin/getconf ]; then 10 | NPROCESSORS=$(/usr/bin/getconf _NPROCESSORS_ONLN) 11 | else 12 | NPROCESSORS=2 13 | fi 14 | # as of 2017-09-04 Travis CI reports 32 processors, but GCC build 15 | # crashes if parallelized too much (maybe memory consumption problem), 16 | # so limit to 4 processors for the time being. 17 | if [ $NPROCESSORS -gt 4 ] ; then 18 | echo "$0:Note: Limiting processors to use by make from $NPROCESSORS to 4." 19 | NPROCESSORS=4 20 | fi 21 | # Tell make to use the processors. No preceding '-' required. 22 | MAKEFLAGS="j${NPROCESSORS}" 23 | export MAKEFLAGS 24 | 25 | env | sort 26 | 27 | # Set default values to OFF for these variables if not specified. 28 | : "${NO_EXCEPTION:=OFF}" 29 | : "${NO_RTTI:=OFF}" 30 | : "${COMPILER_IS_GNUCXX:=OFF}" 31 | 32 | mkdir build || true 33 | cd build 34 | cmake -Dgtest_build_samples=ON \ 35 | -Dgtest_build_tests=ON \ 36 | -Dgmock_build_tests=ON \ 37 | -Dcxx_no_exception=$NO_EXCEPTION \ 38 | -Dcxx_no_rtti=$NO_RTTI \ 39 | -DCMAKE_COMPILER_IS_GNUCXX=$COMPILER_IS_GNUCXX \ 40 | -DCMAKE_CXX_FLAGS=$CXX_FLAGS \ 41 | -DCMAKE_BUILD_TYPE=$BUILD_TYPE \ 42 | .. 43 | make 44 | CTEST_OUTPUT_ON_FAILURE=1 make test 45 | -------------------------------------------------------------------------------- /third-party/googletest/configure.ac: -------------------------------------------------------------------------------- 1 | AC_INIT([Google C++ Mocking and Testing Frameworks], 2 | [1.8.0], 3 | [googlemock@googlegroups.com], 4 | [googletest]) 5 | 6 | # Provide various options to initialize the Autoconf and configure processes. 7 | AC_PREREQ([2.59]) 8 | AC_CONFIG_SRCDIR([./README.md]) 9 | AC_CONFIG_AUX_DIR([build-aux]) 10 | AC_CONFIG_FILES([Makefile]) 11 | AC_CONFIG_SUBDIRS([googletest googlemock]) 12 | 13 | AM_INIT_AUTOMAKE 14 | 15 | # Output the generated files. No further autoconf macros may be used. 16 | AC_OUTPUT 17 | -------------------------------------------------------------------------------- /third-party/googletest/googlemock/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This file contains a list of people who've made non-trivial 2 | # contribution to the Google C++ Mocking Framework project. People 3 | # who commit code to the project are encouraged to add their names 4 | # here. Please keep the list sorted by first names. 5 | 6 | Benoit Sigoure 7 | Bogdan Piloca 8 | Chandler Carruth 9 | Dave MacLachlan 10 | David Anderson 11 | Dean Sturtevant 12 | Gene Volovich 13 | Hal Burch 14 | Jeffrey Yasskin 15 | Jim Keller 16 | Joe Walnes 17 | Jon Wray 18 | Keir Mierle 19 | Keith Ray 20 | Kostya Serebryany 21 | Lev Makhlis 22 | Manuel Klimek 23 | Mario Tanev 24 | Mark Paskin 25 | Markus Heule 26 | Matthew Simmons 27 | Mike Bland 28 | Neal Norwitz 29 | Nermin Ozkiranartli 30 | Owen Carlsen 31 | Paneendra Ba 32 | Paul Menage 33 | Piotr Kaminski 34 | Russ Rufer 35 | Sverre Sundsdal 36 | Takeshi Yoshino 37 | Vadim Berman 38 | Vlad Losev 39 | Wolfgang Klier 40 | Zhanyong Wan 41 | -------------------------------------------------------------------------------- /third-party/googletest/googlemock/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2008, Google Inc. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above 11 | copyright notice, this list of conditions and the following disclaimer 12 | in the documentation and/or other materials provided with the 13 | distribution. 14 | * Neither the name of Google Inc. nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /third-party/googletest/googlemock/build-aux/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerFuchs/gfe_driver/92c04ee5e447ff674d1cfa2ffa5945be01f67853/third-party/googletest/googlemock/build-aux/.keep -------------------------------------------------------------------------------- /third-party/googletest/googlemock/cmake/gmock.pc.in: -------------------------------------------------------------------------------- 1 | libdir=@CMAKE_INSTALL_FULL_LIBDIR@ 2 | includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 3 | 4 | Name: gmock 5 | Description: GoogleMock (without main() function) 6 | Version: @PROJECT_VERSION@ 7 | URL: https://github.com/google/googletest 8 | Libs: -L${libdir} -lgmock @CMAKE_THREAD_LIBS_INIT@ 9 | Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ @CMAKE_THREAD_LIBS_INIT@ 10 | -------------------------------------------------------------------------------- /third-party/googletest/googlemock/cmake/gmock_main.pc.in: -------------------------------------------------------------------------------- 1 | libdir=@CMAKE_INSTALL_FULL_LIBDIR@ 2 | includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 3 | 4 | Name: gmock_main 5 | Description: GoogleMock (with main() function) 6 | Version: @PROJECT_VERSION@ 7 | URL: https://github.com/google/googletest 8 | Libs: -L${libdir} -lgmock_main @CMAKE_THREAD_LIBS_INIT@ 9 | Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ @CMAKE_THREAD_LIBS_INIT@ 10 | -------------------------------------------------------------------------------- /third-party/googletest/googlemock/docs/Documentation.md: -------------------------------------------------------------------------------- 1 | This page lists all documentation markdown files for Google Mock **(the 2 | current git version)** 3 | -- **if you use a former version of Google Mock, please read the 4 | documentation for that specific version instead (e.g. by checking out 5 | the respective git branch/tag).** 6 | 7 | * [ForDummies](ForDummies.md) -- start here if you are new to Google Mock. 8 | * [CheatSheet](CheatSheet.md) -- a quick reference. 9 | * [CookBook](CookBook.md) -- recipes for doing various tasks using Google Mock. 10 | * [FrequentlyAskedQuestions](FrequentlyAskedQuestions.md) -- check here before asking a question on the mailing list. 11 | 12 | To contribute code to Google Mock, read: 13 | 14 | * [CONTRIBUTING](../CONTRIBUTING.md) -- read this _before_ writing your first patch. 15 | * [Pump Manual](../../googletest/docs/PumpManual.md) -- how we generate some of Google Mock's source files. 16 | -------------------------------------------------------------------------------- /third-party/googletest/googlemock/docs/KnownIssues.md: -------------------------------------------------------------------------------- 1 | As any non-trivial software system, Google Mock has some known limitations and problems. We are working on improving it, and welcome your help! The follow is a list of issues we know about. 2 | 3 | 4 | 5 | ## README contains outdated information on Google Mock's compatibility with other testing frameworks ## 6 | 7 | The `README` file in release 1.1.0 still says that Google Mock only works with Google Test. Actually, you can configure Google Mock to work with any testing framework you choose. 8 | 9 | ## Tests failing on machines using Power PC CPUs (e.g. some Macs) ## 10 | 11 | `gmock_output_test` and `gmock-printers_test` are known to fail with Power PC CPUs. This is due to portability issues with these tests, and is not an indication of problems in Google Mock itself. You can safely ignore them. 12 | 13 | ## Failed to resolve libgtest.so.0 in tests when built against installed Google Test ## 14 | 15 | This only applies if you manually built and installed Google Test, and then built a Google Mock against it (either explicitly, or because gtest-config was in your path post-install). In this situation, Libtool has a known issue with certain systems' ldconfig setup: 16 | 17 | http://article.gmane.org/gmane.comp.sysutils.automake.general/9025 18 | 19 | This requires a manual run of "sudo ldconfig" after the "sudo make install" for Google Test before any binaries which link against it can be executed. This isn't a bug in our install, but we should at least have documented it or hacked a work-around into our install. We should have one of these solutions in our next release. -------------------------------------------------------------------------------- /third-party/googletest/googlemock/include/gmock/internal/custom/README.md: -------------------------------------------------------------------------------- 1 | # Customization Points 2 | 3 | The custom directory is an injection point for custom user configurations. 4 | 5 | ## Header `gmock-port.h` 6 | 7 | The following macros can be defined: 8 | 9 | ### Flag related macros: 10 | 11 | * `GMOCK_DECLARE_bool_(name)` 12 | * `GMOCK_DECLARE_int32_(name)` 13 | * `GMOCK_DECLARE_string_(name)` 14 | * `GMOCK_DEFINE_bool_(name, default_val, doc)` 15 | * `GMOCK_DEFINE_int32_(name, default_val, doc)` 16 | * `GMOCK_DEFINE_string_(name, default_val, doc)` 17 | -------------------------------------------------------------------------------- /third-party/googletest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h: -------------------------------------------------------------------------------- 1 | // This file was GENERATED by command: 2 | // pump.py gmock-generated-actions.h.pump 3 | // DO NOT EDIT BY HAND!!! 4 | 5 | // GOOGLETEST_CM0002 DO NOT DELETE 6 | 7 | #ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_GENERATED_ACTIONS_H_ 8 | #define GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_GENERATED_ACTIONS_H_ 9 | 10 | #endif // GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_GENERATED_ACTIONS_H_ 11 | -------------------------------------------------------------------------------- /third-party/googletest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h.pump: -------------------------------------------------------------------------------- 1 | $$ -*- mode: c++; -*- 2 | $$ This is a Pump source file. Please use Pump to convert 3 | $$ it to callback-actions.h. 4 | $$ 5 | $var max_callback_arity = 5 6 | $$}} This meta comment fixes auto-indentation in editors. 7 | 8 | // GOOGLETEST_CM0002 DO NOT DELETE 9 | #ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_GENERATED_ACTIONS_H_ 10 | #define GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_GENERATED_ACTIONS_H_ 11 | 12 | #endif // GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_GENERATED_ACTIONS_H_ 13 | -------------------------------------------------------------------------------- /third-party/googletest/googlemock/include/gmock/internal/custom/gmock-matchers.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Injection point for custom user configurations. See README for details 31 | // 32 | // GOOGLETEST_CM0002 DO NOT DELETE 33 | 34 | #ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_MATCHERS_H_ 35 | #define GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_MATCHERS_H_ 36 | #endif // GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_MATCHERS_H_ 37 | -------------------------------------------------------------------------------- /third-party/googletest/googlemock/include/gmock/internal/custom/gmock-port.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Injection point for custom user configurations. See README for details 31 | // 32 | // ** Custom implementation starts here ** 33 | 34 | // GOOGLETEST_CM0002 DO NOT DELETE 35 | 36 | #ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_PORT_H_ 37 | #define GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_PORT_H_ 38 | 39 | #endif // GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_PORT_H_ 40 | -------------------------------------------------------------------------------- /third-party/googletest/googlemock/msvc/2005/gmock.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 9.00 3 | # Visual Studio 2005 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gmock", "gmock.vcproj", "{34681F0D-CE45-415D-B5F2-5C662DFE3BD5}" 5 | EndProject 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gmock_test", "gmock_test.vcproj", "{F10D22F8-AC7B-4213-8720-608E7D878CD2}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gmock_main", "gmock_main.vcproj", "{E4EF614B-30DF-4954-8C53-580A0BF6B589}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Win32 = Debug|Win32 13 | Release|Win32 = Release|Win32 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Debug|Win32.Build.0 = Debug|Win32 18 | {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Release|Win32.ActiveCfg = Release|Win32 19 | {34681F0D-CE45-415D-B5F2-5C662DFE3BD5}.Release|Win32.Build.0 = Release|Win32 20 | {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Debug|Win32.ActiveCfg = Debug|Win32 21 | {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Debug|Win32.Build.0 = Debug|Win32 22 | {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Release|Win32.ActiveCfg = Release|Win32 23 | {F10D22F8-AC7B-4213-8720-608E7D878CD2}.Release|Win32.Build.0 = Release|Win32 24 | {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Debug|Win32.ActiveCfg = Debug|Win32 25 | {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Debug|Win32.Build.0 = Debug|Win32 26 | {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Release|Win32.ActiveCfg = Release|Win32 27 | {E4EF614B-30DF-4954-8C53-580A0BF6B589}.Release|Win32.Build.0 = Release|Win32 28 | EndGlobalSection 29 | GlobalSection(SolutionProperties) = preSolution 30 | HideSolutionNode = FALSE 31 | EndGlobalSection 32 | EndGlobal 33 | -------------------------------------------------------------------------------- /third-party/googletest/googlemock/msvc/2005/gmock_config.vsprops: -------------------------------------------------------------------------------- 1 | 2 | 7 | 11 | 15 | 16 | -------------------------------------------------------------------------------- /third-party/googletest/googlemock/msvc/2010/gmock_config.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | ../../../googletest 5 | 6 | 7 | <_ProjectFileVersion>10.0.30319.1 8 | 9 | 10 | 11 | $(GTestDir)/include;%(AdditionalIncludeDirectories) 12 | 13 | 14 | 15 | 16 | $(GTestDir) 17 | 18 | 19 | -------------------------------------------------------------------------------- /third-party/googletest/googlemock/msvc/2015/gmock_config.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ../../../googletest 5 | 6 | 7 | <_ProjectFileVersion>10.0.30319.1 8 | 9 | 10 | 11 | $(GTestDir)/include;%(AdditionalIncludeDirectories) 12 | 13 | 14 | 15 | 16 | $(GTestDir) 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /third-party/googletest/googlemock/scripts/generator/README: -------------------------------------------------------------------------------- 1 | 2 | The Google Mock class generator is an application that is part of cppclean. 3 | For more information about cppclean, visit http://code.google.com/p/cppclean/ 4 | 5 | The mock generator requires Python 2.3.5 or later. If you don't have Python 6 | installed on your system, you will also need to install it. You can download 7 | Python from: http://www.python.org/download/releases/ 8 | 9 | To use the Google Mock class generator, you need to call it 10 | on the command line passing the header file and class for which you want 11 | to generate a Google Mock class. 12 | 13 | Make sure to install the scripts somewhere in your path. Then you can 14 | run the program. 15 | 16 | gmock_gen.py header-file.h [ClassName]... 17 | 18 | If no ClassNames are specified, all classes in the file are emitted. 19 | 20 | To change the indentation from the default of 2, set INDENT in 21 | the environment. For example to use an indent of 4 spaces: 22 | 23 | INDENT=4 gmock_gen.py header-file.h ClassName 24 | 25 | This version was made from SVN revision 281 in the cppclean repository. 26 | 27 | Known Limitations 28 | ----------------- 29 | Not all code will be generated properly. For example, when mocking templated 30 | classes, the template information is lost. You will need to add the template 31 | information manually. 32 | 33 | Not all permutations of using multiple pointers/references will be rendered 34 | properly. These will also have to be fixed manually. 35 | -------------------------------------------------------------------------------- /third-party/googletest/googlemock/scripts/generator/cpp/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PerFuchs/gfe_driver/92c04ee5e447ff674d1cfa2ffa5945be01f67853/third-party/googletest/googlemock/scripts/generator/cpp/__init__.py -------------------------------------------------------------------------------- /third-party/googletest/googlemock/scripts/generator/cpp/keywords.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # Copyright 2007 Neal Norwitz 4 | # Portions Copyright 2007 Google Inc. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | 18 | """C++ keywords and helper utilities for determining keywords.""" 19 | 20 | __author__ = 'nnorwitz@google.com (Neal Norwitz)' 21 | 22 | 23 | try: 24 | # Python 3.x 25 | import builtins 26 | except ImportError: 27 | # Python 2.x 28 | import __builtin__ as builtins 29 | 30 | 31 | if not hasattr(builtins, 'set'): 32 | # Nominal support for Python 2.3. 33 | from sets import Set as set 34 | 35 | 36 | TYPES = set('bool char int long short double float void wchar_t unsigned signed'.split()) 37 | TYPE_MODIFIERS = set('auto register const inline extern static virtual volatile mutable'.split()) 38 | ACCESS = set('public protected private friend'.split()) 39 | 40 | CASTS = set('static_cast const_cast dynamic_cast reinterpret_cast'.split()) 41 | 42 | OTHERS = set('true false asm class namespace using explicit this operator sizeof'.split()) 43 | OTHER_TYPES = set('new delete typedef struct union enum typeid typename template'.split()) 44 | 45 | CONTROL = set('case switch default if else return goto'.split()) 46 | EXCEPTION = set('try catch throw'.split()) 47 | LOOP = set('while do for break continue'.split()) 48 | 49 | ALL = TYPES | TYPE_MODIFIERS | ACCESS | CASTS | OTHERS | OTHER_TYPES | CONTROL | EXCEPTION | LOOP 50 | 51 | 52 | def IsKeyword(token): 53 | return token in ALL 54 | 55 | def IsBuiltinType(token): 56 | if token in ('virtual', 'inline'): 57 | # These only apply to methods, they can't be types by themselves. 58 | return False 59 | return token in TYPES or token in TYPE_MODIFIERS 60 | -------------------------------------------------------------------------------- /third-party/googletest/googlemock/scripts/generator/cpp/utils.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # Copyright 2007 Neal Norwitz 4 | # Portions Copyright 2007 Google Inc. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | 18 | """Generic utilities for C++ parsing.""" 19 | 20 | __author__ = 'nnorwitz@google.com (Neal Norwitz)' 21 | 22 | 23 | import sys 24 | 25 | 26 | # Set to True to see the start/end token indices. 27 | DEBUG = True 28 | 29 | 30 | def ReadFile(filename, print_error=True): 31 | """Returns the contents of a file.""" 32 | try: 33 | fp = open(filename) 34 | try: 35 | return fp.read() 36 | finally: 37 | fp.close() 38 | except IOError: 39 | if print_error: 40 | print('Error reading %s: %s' % (filename, sys.exc_info()[1])) 41 | return None 42 | -------------------------------------------------------------------------------- /third-party/googletest/googlemock/scripts/generator/gmock_gen.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # Copyright 2008 Google Inc. All Rights Reserved. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | """Driver for starting up Google Mock class generator.""" 18 | 19 | __author__ = 'nnorwitz@google.com (Neal Norwitz)' 20 | 21 | import os 22 | import sys 23 | 24 | if __name__ == '__main__': 25 | # Add the directory of this script to the path so we can import gmock_class. 26 | sys.path.append(os.path.dirname(__file__)) 27 | 28 | from cpp import gmock_class 29 | # Fix the docstring in case they require the usage. 30 | gmock_class.__doc__ = gmock_class.__doc__.replace('gmock_class.py', __file__) 31 | gmock_class.main() 32 | -------------------------------------------------------------------------------- /third-party/googletest/googlemock/src/gmock-all.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // 31 | // Google C++ Mocking Framework (Google Mock) 32 | // 33 | // This file #includes all Google Mock implementation .cc files. The 34 | // purpose is to allow a user to build Google Mock by compiling this 35 | // file alone. 36 | 37 | // This line ensures that gmock.h can be compiled on its own, even 38 | // when it's fused. 39 | #include "gmock/gmock.h" 40 | 41 | // The following lines pull in the real gmock *.cc files. 42 | #include "src/gmock-cardinalities.cc" 43 | #include "src/gmock-internal-utils.cc" 44 | #include "src/gmock-matchers.cc" 45 | #include "src/gmock-spec-builders.cc" 46 | #include "src/gmock.cc" 47 | -------------------------------------------------------------------------------- /third-party/googletest/googlemock/test/gmock-port_test.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | 31 | // Google Mock - a framework for writing C++ mock classes. 32 | // 33 | // This file tests the internal cross-platform support utilities. 34 | 35 | #include "gmock/internal/gmock-port.h" 36 | #include "gtest/gtest.h" 37 | 38 | // NOTE: if this file is left without tests for some reason, put a dummy 39 | // test here to make references to symbols in the gtest library and avoid 40 | // 'undefined symbol' linker errors in gmock_main: 41 | 42 | TEST(DummyTest, Dummy) {} 43 | -------------------------------------------------------------------------------- /third-party/googletest/googlemock/test/gmock_link2_test.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | 31 | // Google Mock - a framework for writing C++ mock classes. 32 | // 33 | // This file is for verifying that various Google Mock constructs do not 34 | // produce linker errors when instantiated in different translation units. 35 | // Please see gmock_link_test.h for details. 36 | 37 | #define LinkTest LinkTest2 38 | 39 | #include "test/gmock_link_test.h" 40 | -------------------------------------------------------------------------------- /third-party/googletest/googlemock/test/gmock_link_test.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | 31 | // Google Mock - a framework for writing C++ mock classes. 32 | // 33 | // This file is for verifying that various Google Mock constructs do not 34 | // produce linker errors when instantiated in different translation units. 35 | // Please see gmock_link_test.h for details. 36 | 37 | #define LinkTest LinkTest1 38 | 39 | #include "test/gmock_link_test.h" 40 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This file contains a list of people who've made non-trivial 2 | # contribution to the Google C++ Testing Framework project. People 3 | # who commit code to the project are encouraged to add their names 4 | # here. Please keep the list sorted by first names. 5 | 6 | Ajay Joshi 7 | Balázs Dán 8 | Bharat Mediratta 9 | Chandler Carruth 10 | Chris Prince 11 | Chris Taylor 12 | Dan Egnor 13 | Eric Roman 14 | Hady Zalek 15 | Jeffrey Yasskin 16 | Jói Sigurðsson 17 | Keir Mierle 18 | Keith Ray 19 | Kenton Varda 20 | Manuel Klimek 21 | Markus Heule 22 | Mika Raento 23 | Miklós Fazekas 24 | Pasi Valminen 25 | Patrick Hanna 26 | Patrick Riley 27 | Peter Kaminski 28 | Preston Jackson 29 | Rainer Klaffenboeck 30 | Russ Cox 31 | Russ Rufer 32 | Sean Mcafee 33 | Sigurður Ásgeirsson 34 | Tracy Bialik 35 | Vadim Berman 36 | Vlad Losev 37 | Zhanyong Wan 38 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2008, Google Inc. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above 11 | copyright notice, this list of conditions and the following disclaimer 12 | in the documentation and/or other materials provided with the 13 | distribution. 14 | * Neither the name of Google Inc. nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/cmake/Config.cmake.in: -------------------------------------------------------------------------------- 1 | @PACKAGE_INIT@ 2 | include(CMakeFindDependencyMacro) 3 | if (@GTEST_HAS_PTHREAD@) 4 | set(THREADS_PREFER_PTHREAD_FLAG @THREADS_PREFER_PTHREAD_FLAG@) 5 | find_dependency(Threads) 6 | endif() 7 | 8 | include("${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake") 9 | check_required_components("@project_name@") 10 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/cmake/gtest.pc.in: -------------------------------------------------------------------------------- 1 | libdir=@CMAKE_INSTALL_FULL_LIBDIR@ 2 | includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 3 | 4 | Name: gtest 5 | Description: GoogleTest (without main() function) 6 | Version: @PROJECT_VERSION@ 7 | URL: https://github.com/google/googletest 8 | Libs: -L${libdir} -lgtest @CMAKE_THREAD_LIBS_INIT@ 9 | Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ @CMAKE_THREAD_LIBS_INIT@ 10 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/cmake/gtest_main.pc.in: -------------------------------------------------------------------------------- 1 | libdir=@CMAKE_INSTALL_FULL_LIBDIR@ 2 | includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 3 | 4 | Name: gtest_main 5 | Description: GoogleTest (with main() function) 6 | Version: @PROJECT_VERSION@ 7 | URL: https://github.com/google/googletest 8 | Requires: gtest 9 | Libs: -L${libdir} -lgtest_main @CMAKE_THREAD_LIBS_INIT@ 10 | Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ @CMAKE_THREAD_LIBS_INIT@ 11 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/codegear/gtest.groupproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {c1d923e0-6cba-4332-9b6f-3420acbf5091} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Default.Personality 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/codegear/gtest_all.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2009, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: Josh Kelley (joshkel@gmail.com) 31 | // 32 | // Google C++ Testing Framework (Google Test) 33 | // 34 | // C++Builder's IDE cannot build a static library from files with hyphens 35 | // in their name. See http://qc.codegear.com/wc/qcmain.aspx?d=70977 . 36 | // This file serves as a workaround. 37 | 38 | #include "src/gtest-all.cc" 39 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/codegear/gtest_link.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2009, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: Josh Kelley (joshkel@gmail.com) 31 | // 32 | // Google C++ Testing Framework (Google Test) 33 | // 34 | // Links gtest.lib and gtest_main.lib into the current project in C++Builder. 35 | // This means that these libraries can't be renamed, but it's the only way to 36 | // ensure that Debug versus Release test builds are linked against the 37 | // appropriate Debug or Release build of the libraries. 38 | 39 | #pragma link "gtest.lib" 40 | #pragma link "gtest_main.lib" 41 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/docs/samples.md: -------------------------------------------------------------------------------- 1 | # Googletest Samples {#samples} 2 | 3 | If you're like us, you'd like to look at [googletest 4 | samples.](https://github.com/google/googletest/tree/master/googletest/samples) 5 | The sample directory has a number of well-commented samples showing how to use a 6 | variety of googletest features. 7 | 8 | * Sample #1 shows the basic steps of using googletest to test C++ functions. 9 | * Sample #2 shows a more complex unit test for a class with multiple member 10 | functions. 11 | * Sample #3 uses a test fixture. 12 | * Sample #4 teaches you how to use googletest and `googletest.h` together to 13 | get the best of both libraries. 14 | * Sample #5 puts shared testing logic in a base test fixture, and reuses it in 15 | derived fixtures. 16 | * Sample #6 demonstrates type-parameterized tests. 17 | * Sample #7 teaches the basics of value-parameterized tests. 18 | * Sample #8 shows using `Combine()` in value-parameterized tests. 19 | * Sample #9 shows use of the listener API to modify Google Test's console 20 | output and the use of its reflection API to inspect test results. 21 | * Sample #10 shows use of the listener API to implement a primitive memory 22 | leak checker. 23 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/include/gtest/internal/custom/README.md: -------------------------------------------------------------------------------- 1 | # Customization Points 2 | 3 | The custom directory is an injection point for custom user configurations. 4 | 5 | ## Header `gtest.h` 6 | 7 | ### The following macros can be defined: 8 | 9 | * `GTEST_OS_STACK_TRACE_GETTER_` - The name of an implementation of 10 | `OsStackTraceGetterInterface`. 11 | * `GTEST_CUSTOM_TEMPDIR_FUNCTION_` - An override for `testing::TempDir()`. See 12 | `testing::TempDir` for semantics and signature. 13 | 14 | ## Header `gtest-port.h` 15 | 16 | The following macros can be defined: 17 | 18 | ### Flag related macros: 19 | 20 | * `GTEST_FLAG(flag_name)` 21 | * `GTEST_USE_OWN_FLAGFILE_FLAG_` - Define to 0 when the system provides its 22 | own flagfile flag parsing. 23 | * `GTEST_DECLARE_bool_(name)` 24 | * `GTEST_DECLARE_int32_(name)` 25 | * `GTEST_DECLARE_string_(name)` 26 | * `GTEST_DEFINE_bool_(name, default_val, doc)` 27 | * `GTEST_DEFINE_int32_(name, default_val, doc)` 28 | * `GTEST_DEFINE_string_(name, default_val, doc)` 29 | 30 | ### Logging: 31 | 32 | * `GTEST_LOG_(severity)` 33 | * `GTEST_CHECK_(condition)` 34 | * Functions `LogToStderr()` and `FlushInfoLog()` have to be provided too. 35 | 36 | ### Threading: 37 | 38 | * `GTEST_HAS_NOTIFICATION_` - Enabled if Notification is already provided. 39 | * `GTEST_HAS_MUTEX_AND_THREAD_LOCAL_` - Enabled if `Mutex` and `ThreadLocal` 40 | are already provided. Must also provide `GTEST_DECLARE_STATIC_MUTEX_(mutex)` 41 | and `GTEST_DEFINE_STATIC_MUTEX_(mutex)` 42 | * `GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks)` 43 | * `GTEST_LOCK_EXCLUDED_(locks)` 44 | 45 | ### Underlying library support features 46 | 47 | * `GTEST_HAS_CXXABI_H_` 48 | 49 | ### Exporting API symbols: 50 | 51 | * `GTEST_API_` - Specifier for exported symbols. 52 | 53 | ## Header `gtest-printers.h` 54 | 55 | * See documentation at `gtest/gtest-printers.h` for details on how to define a 56 | custom printer. 57 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/include/gtest/internal/custom/gtest-port.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Injection point for custom user configurations. See README for details 31 | // 32 | // ** Custom implementation starts here ** 33 | 34 | #ifndef GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PORT_H_ 35 | #define GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PORT_H_ 36 | 37 | #endif // GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PORT_H_ 38 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/include/gtest/internal/custom/gtest-printers.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // This file provides an injection point for custom printers in a local 31 | // installation of gTest. 32 | // It will be included from gtest-printers.h and the overrides in this file 33 | // will be visible to everyone. 34 | // 35 | // Injection point for custom user configurations. See README for details 36 | // 37 | // ** Custom implementation starts here ** 38 | 39 | #ifndef GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PRINTERS_H_ 40 | #define GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PRINTERS_H_ 41 | 42 | #endif // GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PRINTERS_H_ 43 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/include/gtest/internal/custom/gtest.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Injection point for custom user configurations. See README for details 31 | // 32 | // ** Custom implementation starts here ** 33 | 34 | #ifndef GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_H_ 35 | #define GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_H_ 36 | 37 | #endif // GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_H_ 38 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/msvc/2010/gtest-md.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | 14 | 15 | Source Files 16 | 17 | 18 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/msvc/2010/gtest.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | 14 | 15 | Source Files 16 | 17 | 18 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/msvc/2010/gtest_main-md.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | 14 | 15 | Source Files 16 | 17 | 18 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/msvc/2010/gtest_main.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | 14 | 15 | Source Files 16 | 17 | 18 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/msvc/2010/gtest_prod_test-md.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | 14 | 15 | Source Files 16 | 17 | 18 | Source Files 19 | 20 | 21 | 22 | 23 | Header Files 24 | 25 | 26 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/msvc/2010/gtest_prod_test.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | 14 | 15 | Source Files 16 | 17 | 18 | Source Files 19 | 20 | 21 | 22 | 23 | Header Files 24 | 25 | 26 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/msvc/2010/gtest_unittest-md.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | 14 | 15 | Source Files 16 | 17 | 18 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/msvc/2010/gtest_unittest.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | 14 | 15 | Source Files 16 | 17 | 18 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/samples/sample1.h: -------------------------------------------------------------------------------- 1 | // Copyright 2005, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // A sample program demonstrating using Google C++ testing framework. 31 | 32 | #ifndef GTEST_SAMPLES_SAMPLE1_H_ 33 | #define GTEST_SAMPLES_SAMPLE1_H_ 34 | 35 | // Returns n! (the factorial of n). For negative n, n! is defined to be 1. 36 | int Factorial(int n); 37 | 38 | // Returns true iff n is a prime number. 39 | bool IsPrime(int n); 40 | 41 | #endif // GTEST_SAMPLES_SAMPLE1_H_ 42 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/samples/sample4.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2005, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // A sample program demonstrating using Google C++ testing framework. 31 | 32 | #include 33 | 34 | #include "sample4.h" 35 | 36 | // Returns the current counter value, and increments it. 37 | int Counter::Increment() { 38 | return counter_++; 39 | } 40 | 41 | // Returns the current counter value, and decrements it. 42 | // counter can not be less than 0, return 0 in this case 43 | int Counter::Decrement() { 44 | if (counter_ == 0) { 45 | return counter_; 46 | } else { 47 | return counter_--; 48 | } 49 | } 50 | 51 | // Prints the current counter value to STDOUT. 52 | void Counter::Print() const { 53 | printf("%d", counter_); 54 | } 55 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/samples/sample4.h: -------------------------------------------------------------------------------- 1 | // Copyright 2005, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // A sample program demonstrating using Google C++ testing framework. 31 | #ifndef GTEST_SAMPLES_SAMPLE4_H_ 32 | #define GTEST_SAMPLES_SAMPLE4_H_ 33 | 34 | // A simple monotonic counter. 35 | class Counter { 36 | private: 37 | int counter_; 38 | 39 | public: 40 | // Creates a counter that starts at 0. 41 | Counter() : counter_(0) {} 42 | 43 | // Returns the current counter value, and increments it. 44 | int Increment(); 45 | 46 | // Returns the current counter value, and decrements it. 47 | int Decrement(); 48 | 49 | // Prints the current counter value to STDOUT. 50 | void Print() const; 51 | }; 52 | 53 | #endif // GTEST_SAMPLES_SAMPLE4_H_ 54 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/samples/sample4_unittest.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2005, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | 31 | #include "sample4.h" 32 | #include "gtest/gtest.h" 33 | 34 | namespace { 35 | // Tests the Increment() method. 36 | 37 | TEST(Counter, Increment) { 38 | Counter c; 39 | 40 | // Test that counter 0 returns 0 41 | EXPECT_EQ(0, c.Decrement()); 42 | 43 | // EXPECT_EQ() evaluates its arguments exactly once, so they 44 | // can have side effects. 45 | 46 | EXPECT_EQ(0, c.Increment()); 47 | EXPECT_EQ(1, c.Increment()); 48 | EXPECT_EQ(2, c.Increment()); 49 | 50 | EXPECT_EQ(3, c.Decrement()); 51 | } 52 | 53 | } // namespace 54 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/scripts/test/Makefile: -------------------------------------------------------------------------------- 1 | # A Makefile for fusing Google Test and building a sample test against it. 2 | # 3 | # SYNOPSIS: 4 | # 5 | # make [all] - makes everything. 6 | # make TARGET - makes the given target. 7 | # make check - makes everything and runs the built sample test. 8 | # make clean - removes all files generated by make. 9 | 10 | # Points to the root of fused Google Test, relative to where this file is. 11 | FUSED_GTEST_DIR = output 12 | 13 | # Paths to the fused gtest files. 14 | FUSED_GTEST_H = $(FUSED_GTEST_DIR)/gtest/gtest.h 15 | FUSED_GTEST_ALL_CC = $(FUSED_GTEST_DIR)/gtest/gtest-all.cc 16 | 17 | # Where to find the sample test. 18 | SAMPLE_DIR = ../../samples 19 | 20 | # Where to find gtest_main.cc. 21 | GTEST_MAIN_CC = ../../src/gtest_main.cc 22 | 23 | # Flags passed to the preprocessor. 24 | # We have no idea here whether pthreads is available in the system, so 25 | # disable its use. 26 | CPPFLAGS += -I$(FUSED_GTEST_DIR) -DGTEST_HAS_PTHREAD=0 27 | 28 | # Flags passed to the C++ compiler. 29 | CXXFLAGS += -g 30 | 31 | all : sample1_unittest 32 | 33 | check : all 34 | ./sample1_unittest 35 | 36 | clean : 37 | rm -rf $(FUSED_GTEST_DIR) sample1_unittest *.o 38 | 39 | $(FUSED_GTEST_H) : 40 | ../fuse_gtest_files.py $(FUSED_GTEST_DIR) 41 | 42 | $(FUSED_GTEST_ALL_CC) : 43 | ../fuse_gtest_files.py $(FUSED_GTEST_DIR) 44 | 45 | gtest-all.o : $(FUSED_GTEST_H) $(FUSED_GTEST_ALL_CC) 46 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(FUSED_GTEST_DIR)/gtest/gtest-all.cc 47 | 48 | gtest_main.o : $(FUSED_GTEST_H) $(GTEST_MAIN_CC) 49 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(GTEST_MAIN_CC) 50 | 51 | sample1.o : $(SAMPLE_DIR)/sample1.cc $(SAMPLE_DIR)/sample1.h 52 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(SAMPLE_DIR)/sample1.cc 53 | 54 | sample1_unittest.o : $(SAMPLE_DIR)/sample1_unittest.cc \ 55 | $(SAMPLE_DIR)/sample1.h $(FUSED_GTEST_H) 56 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(SAMPLE_DIR)/sample1_unittest.cc 57 | 58 | sample1_unittest : sample1.o sample1_unittest.o gtest-all.o gtest_main.o 59 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) $^ -o $@ 60 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/src/gtest-all.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // 31 | // Google C++ Testing and Mocking Framework (Google Test) 32 | // 33 | // Sometimes it's desirable to build Google Test by compiling a single file. 34 | // This file serves this purpose. 35 | 36 | // This line ensures that gtest.h can be compiled on its own, even 37 | // when it's fused. 38 | #include "gtest/gtest.h" 39 | 40 | // The following lines pull in the real gtest *.cc files. 41 | #include "src/gtest.cc" 42 | #include "src/gtest-death-test.cc" 43 | #include "src/gtest-filepath.cc" 44 | #include "src/gtest-port.cc" 45 | #include "src/gtest-printers.cc" 46 | #include "src/gtest-test-part.cc" 47 | #include "src/gtest-typed-test.cc" 48 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/src/gtest_main.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2006, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #include 31 | #include "gtest/gtest.h" 32 | 33 | GTEST_API_ int main(int argc, char **argv) { 34 | printf("Running main() from %s\n", __FILE__); 35 | testing::InitGoogleTest(&argc, argv); 36 | return RUN_ALL_TESTS(); 37 | } 38 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/test/googletest-param-test-invalid-name1-test_.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2015, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | 31 | #include "gtest/gtest.h" 32 | 33 | namespace { 34 | class DummyTest : public ::testing::TestWithParam {}; 35 | 36 | TEST_P(DummyTest, Dummy) { 37 | } 38 | 39 | INSTANTIATE_TEST_CASE_P(InvalidTestName, 40 | DummyTest, 41 | ::testing::Values("InvalidWithQuotes"), 42 | ::testing::PrintToStringParamName()); 43 | 44 | } // namespace 45 | 46 | int main(int argc, char *argv[]) { 47 | testing::InitGoogleTest(&argc, argv); 48 | return RUN_ALL_TESTS(); 49 | } 50 | 51 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/test/googletest-uninitialized-test_.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | 31 | #include "gtest/gtest.h" 32 | 33 | TEST(DummyTest, Dummy) { 34 | // This test doesn't verify anything. We just need it to create a 35 | // realistic stage for testing the behavior of Google Test when 36 | // RUN_ALL_TESTS() is called without 37 | // testing::InitGoogleTest() being called first. 38 | } 39 | 40 | int main() { 41 | return RUN_ALL_TESTS(); 42 | } 43 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/test/gtest-typed-test2_test.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008 Google Inc. 2 | // All Rights Reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | 31 | #include 32 | 33 | #include "test/gtest-typed-test_test.h" 34 | #include "gtest/gtest.h" 35 | 36 | #if GTEST_HAS_TYPED_TEST_P 37 | 38 | // Tests that the same type-parameterized test case can be 39 | // instantiated in different translation units linked together. 40 | // (ContainerTest is also instantiated in gtest-typed-test_test.cc.) 41 | INSTANTIATE_TYPED_TEST_CASE_P(Vector, ContainerTest, 42 | testing::Types >); 43 | 44 | #endif // GTEST_HAS_TYPED_TEST_P 45 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/test/gtest_help_test_.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2009, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | 31 | // This program is meant to be run by gtest_help_test.py. Do not run 32 | // it directly. 33 | 34 | #include "gtest/gtest.h" 35 | 36 | // When a help flag is specified, this program should skip the tests 37 | // and exit with 0; otherwise the following test will be executed, 38 | // causing this program to exit with a non-zero code. 39 | TEST(HelpFlagTest, ShouldNotBeRun) { 40 | ASSERT_TRUE(false) << "Tests shouldn't be run when --help is specified."; 41 | } 42 | 43 | #if GTEST_HAS_DEATH_TEST 44 | TEST(DeathTest, UsedByPythonScriptToDetectSupportForDeathTestsInThisBinary) {} 45 | #endif 46 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/test/gtest_list_output_unittest_.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2018, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: david.schuldenfrei@gmail.com (David Schuldenfrei) 31 | 32 | // Unit test for Google Test's --gtest_list_tests and --gtest_output flag. 33 | // 34 | // A user can ask Google Test to list all tests that will run, 35 | // and have the output saved in a Json/Xml file. 36 | // The tests will not be run after listing. 37 | // 38 | // This program will be invoked from a Python unit test. 39 | // Don't run it directly. 40 | 41 | #include "gtest/gtest.h" 42 | 43 | TEST(FooTest, Test1) {} 44 | 45 | TEST(FooTest, Test2) {} 46 | 47 | int main(int argc, char **argv) { 48 | ::testing::InitGoogleTest(&argc, argv); 49 | 50 | return RUN_ALL_TESTS(); 51 | } 52 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/test/gtest_main_unittest.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2006, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | 31 | #include "gtest/gtest.h" 32 | 33 | // Tests that we don't have to define main() when we link to 34 | // gtest_main instead of gtest. 35 | 36 | namespace { 37 | 38 | TEST(GTestMainTest, ShouldSucceed) { 39 | } 40 | 41 | } // namespace 42 | 43 | // We are using the main() function defined in gtest_main.cc, so we 44 | // don't define it here. 45 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/test/gtest_prod_test.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2006, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // 31 | // Unit test for gtest_prod.h. 32 | 33 | #include "production.h" 34 | #include "gtest/gtest.h" 35 | 36 | // Tests that private members can be accessed from a TEST declared as 37 | // a friend of the class. 38 | TEST(PrivateCodeTest, CanAccessPrivateMembers) { 39 | PrivateCode a; 40 | EXPECT_EQ(0, a.x_); 41 | 42 | a.set_x(1); 43 | EXPECT_EQ(1, a.x_); 44 | } 45 | 46 | typedef testing::Test PrivateCodeFixtureTest; 47 | 48 | // Tests that private members can be accessed from a TEST_F declared 49 | // as a friend of the class. 50 | TEST_F(PrivateCodeFixtureTest, CanAccessPrivateMembers) { 51 | PrivateCode a; 52 | EXPECT_EQ(0, a.x_); 53 | 54 | a.set_x(2); 55 | EXPECT_EQ(2, a.x_); 56 | } 57 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/test/gtest_testbridge_test_.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2018, Google LLC. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | 31 | // This program is meant to be run by gtest_test_filter_test.py. Do not run 32 | // it directly. 33 | 34 | #include "gtest/gtest.h" 35 | 36 | // These tests are used to detect if filtering is working. Only 37 | // 'TestThatSucceeds' should ever run. 38 | 39 | TEST(TestFilterTest, TestThatSucceeds) {} 40 | 41 | TEST(TestFilterTest, TestThatFails) { 42 | ASSERT_TRUE(false) << "This test should never be run."; 43 | } 44 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/test/gtest_xml_outfile1_test_.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // gtest_xml_outfile1_test_ writes some xml via TestProperty used by 31 | // gtest_xml_outfiles_test.py 32 | 33 | #include "gtest/gtest.h" 34 | 35 | class PropertyOne : public testing::Test { 36 | protected: 37 | virtual void SetUp() { 38 | RecordProperty("SetUpProp", 1); 39 | } 40 | virtual void TearDown() { 41 | RecordProperty("TearDownProp", 1); 42 | } 43 | }; 44 | 45 | TEST_F(PropertyOne, TestSomeProperties) { 46 | RecordProperty("TestSomeProperty", 1); 47 | } 48 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/test/gtest_xml_outfile2_test_.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // gtest_xml_outfile2_test_ writes some xml via TestProperty used by 31 | // gtest_xml_outfiles_test.py 32 | 33 | #include "gtest/gtest.h" 34 | 35 | class PropertyTwo : public testing::Test { 36 | protected: 37 | virtual void SetUp() { 38 | RecordProperty("SetUpProp", 2); 39 | } 40 | virtual void TearDown() { 41 | RecordProperty("TearDownProp", 2); 42 | } 43 | }; 44 | 45 | TEST_F(PropertyTwo, TestSomeProperties) { 46 | RecordProperty("TestSomeProperty", 2); 47 | } 48 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/test/production.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2006, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // 31 | // This is part of the unit test for gtest_prod.h. 32 | 33 | #include "production.h" 34 | 35 | PrivateCode::PrivateCode() : x_(0) {} 36 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/test/production.h: -------------------------------------------------------------------------------- 1 | // Copyright 2006, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // 31 | // This is part of the unit test for gtest_prod.h. 32 | 33 | #ifndef GTEST_TEST_PRODUCTION_H_ 34 | #define GTEST_TEST_PRODUCTION_H_ 35 | 36 | #include "gtest/gtest_prod.h" 37 | 38 | class PrivateCode { 39 | public: 40 | // Declares a friend test that does not use a fixture. 41 | FRIEND_TEST(PrivateCodeTest, CanAccessPrivateMembers); 42 | 43 | // Declares a friend test that uses a fixture. 44 | FRIEND_TEST(PrivateCodeFixtureTest, CanAccessPrivateMembers); 45 | 46 | PrivateCode(); 47 | 48 | int x() const { return x_; } 49 | private: 50 | void set_x(int an_x) { x_ = an_x; } 51 | int x_; 52 | }; 53 | 54 | #endif // GTEST_TEST_PRODUCTION_H_ 55 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/xcode/Config/DebugProject.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // DebugProject.xcconfig 3 | // 4 | // These are Debug Configuration project settings for the gtest framework and 5 | // examples. It is set in the "Based On:" dropdown in the "Project" info 6 | // dialog. 7 | // This file is based on the Xcode Configuration files in: 8 | // https://github.com/google/google-toolbox-for-mac 9 | // 10 | 11 | #include "General.xcconfig" 12 | 13 | // No optimization 14 | GCC_OPTIMIZATION_LEVEL = 0 15 | 16 | // Deployment postprocessing is what triggers Xcode to strip, turn it off 17 | DEPLOYMENT_POSTPROCESSING = NO 18 | 19 | // Dead code stripping off 20 | DEAD_CODE_STRIPPING = NO 21 | 22 | // Debug symbols should be on obviously 23 | GCC_GENERATE_DEBUGGING_SYMBOLS = YES 24 | 25 | // Define the DEBUG macro in all debug builds 26 | OTHER_CFLAGS = $(OTHER_CFLAGS) -DDEBUG=1 27 | 28 | // These are turned off to avoid STL incompatibilities with client code 29 | // // Turns on special C++ STL checks to "encourage" good STL use 30 | // GCC_PREPROCESSOR_DEFINITIONS = $(GCC_PREPROCESSOR_DEFINITIONS) _GLIBCXX_DEBUG_PEDANTIC _GLIBCXX_DEBUG _GLIBCPP_CONCEPT_CHECKS 31 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/xcode/Config/FrameworkTarget.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // FrameworkTarget.xcconfig 3 | // 4 | // These are Framework target settings for the gtest framework and examples. It 5 | // is set in the "Based On:" dropdown in the "Target" info dialog. 6 | // This file is based on the Xcode Configuration files in: 7 | // https://github.com/google/google-toolbox-for-mac 8 | // 9 | 10 | // Dynamic libs need to be position independent 11 | GCC_DYNAMIC_NO_PIC = NO 12 | 13 | // Dynamic libs should not have their external symbols stripped. 14 | STRIP_STYLE = non-global 15 | 16 | // Let the user install by specifying the $DSTROOT with xcodebuild 17 | SKIP_INSTALL = NO 18 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/xcode/Config/General.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // General.xcconfig 3 | // 4 | // These are General configuration settings for the gtest framework and 5 | // examples. 6 | // This file is based on the Xcode Configuration files in: 7 | // https://github.com/google/google-toolbox-for-mac 8 | // 9 | 10 | // Build for PPC and Intel, 32- and 64-bit 11 | ARCHS = i386 x86_64 ppc ppc64 12 | 13 | // Zerolink prevents link warnings so turn it off 14 | ZERO_LINK = NO 15 | 16 | // Prebinding considered unhelpful in 10.3 and later 17 | PREBINDING = NO 18 | 19 | // Strictest warning policy 20 | WARNING_CFLAGS = -Wall -Werror -Wendif-labels -Wnewline-eof -Wno-sign-compare -Wshadow 21 | 22 | // Work around Xcode bugs by using external strip. See: 23 | // http://lists.apple.com/archives/Xcode-users/2006/Feb/msg00050.html 24 | SEPARATE_STRIP = YES 25 | 26 | // Force C99 dialect 27 | GCC_C_LANGUAGE_STANDARD = c99 28 | 29 | // not sure why apple defaults this on, but it's pretty risky 30 | ALWAYS_SEARCH_USER_PATHS = NO 31 | 32 | // Turn on position dependent code for most cases (overridden where appropriate) 33 | GCC_DYNAMIC_NO_PIC = YES 34 | 35 | // Default SDK and minimum OS version is 10.4 36 | SDKROOT = $(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk 37 | MACOSX_DEPLOYMENT_TARGET = 10.4 38 | GCC_VERSION = 4.0 39 | 40 | // VERSIONING BUILD SETTINGS (used in Info.plist) 41 | GTEST_VERSIONINFO_ABOUT = © 2008 Google Inc. 42 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/xcode/Config/ReleaseProject.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // ReleaseProject.xcconfig 3 | // 4 | // These are Release Configuration project settings for the gtest framework 5 | // and examples. It is set in the "Based On:" dropdown in the "Project" info 6 | // dialog. 7 | // This file is based on the Xcode Configuration files in: 8 | // https://github.com/google/google-toolbox-for-mac 9 | // 10 | 11 | #include "General.xcconfig" 12 | 13 | // subconfig/Release.xcconfig 14 | 15 | // Optimize for space and size (Apple recommendation) 16 | GCC_OPTIMIZATION_LEVEL = s 17 | 18 | // Deploment postprocessing is what triggers Xcode to strip 19 | DEPLOYMENT_POSTPROCESSING = YES 20 | 21 | // No symbols 22 | GCC_GENERATE_DEBUGGING_SYMBOLS = NO 23 | 24 | // Dead code strip does not affect ObjC code but can help for C 25 | DEAD_CODE_STRIPPING = YES 26 | 27 | // NDEBUG is used by things like assert.h, so define it for general compat. 28 | // ASSERT going away in release tends to create unused vars. 29 | OTHER_CFLAGS = $(OTHER_CFLAGS) -DNDEBUG=1 -Wno-unused-variable 30 | 31 | // When we strip we want to strip all symbols in release, but save externals. 32 | STRIP_STYLE = all 33 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/xcode/Config/StaticLibraryTarget.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // StaticLibraryTarget.xcconfig 3 | // 4 | // These are static library target settings for libgtest.a. It 5 | // is set in the "Based On:" dropdown in the "Target" info dialog. 6 | // This file is based on the Xcode Configuration files in: 7 | // https://github.com/google/google-toolbox-for-mac 8 | // 9 | 10 | // Static libs can be included in bundles so make them position independent 11 | GCC_DYNAMIC_NO_PIC = NO 12 | 13 | // Static libs should not have their internal globals or external symbols 14 | // stripped. 15 | STRIP_STYLE = debugging 16 | 17 | // Let the user install by specifying the $DSTROOT with xcodebuild 18 | SKIP_INSTALL = NO 19 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/xcode/Config/TestTarget.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // TestTarget.xcconfig 3 | // 4 | // These are Test target settings for the gtest framework and examples. It 5 | // is set in the "Based On:" dropdown in the "Target" info dialog. 6 | 7 | PRODUCT_NAME = $(TARGET_NAME) 8 | HEADER_SEARCH_PATHS = ../include 9 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/xcode/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.google.${PRODUCT_NAME} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | GTEST_VERSIONINFO_LONG 21 | CFBundleShortVersionString 22 | GTEST_VERSIONINFO_SHORT 23 | CFBundleGetInfoString 24 | ${PRODUCT_NAME} GTEST_VERSIONINFO_LONG, ${GTEST_VERSIONINFO_ABOUT} 25 | NSHumanReadableCopyright 26 | ${GTEST_VERSIONINFO_ABOUT} 27 | CSResourcesFileMapped 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /third-party/googletest/googletest/xcode/Samples/FrameworkSample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.google.gtest.${PRODUCT_NAME:identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | CSResourcesFileMapped 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /third-party/libcuckoo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # for write_basic_package_version_file() 2 | include(CMakePackageConfigHelpers) 3 | 4 | # we require the use of threads 5 | set(THREADS_PREFER_PTHREAD_FLAG ON) 6 | find_package(Threads REQUIRED) 7 | 8 | # generate a version for cmake to use with find_package(libcuckoo) 9 | set (libcuckoo_VERSION "${libcuckoo_VERSION_MAJOR}.${libcuckoo_VERSION_MINOR}") 10 | set (libcuckoo_VERSION "${libcuckoo_VERSION}.${libcuckoo_VERSION_PATCH}") 11 | 12 | # libcuckoo is an interface (all headers) library target 13 | add_library(libcuckoo INTERFACE) 14 | 15 | # tag libcuckoo target with a c++11 feature so that libcuckoo users 16 | # will have c++11 turned on in their compile when they use this target. 17 | # XXX: newer cmakes have a "cxx_std_11" feature that could be used 18 | target_compile_features (libcuckoo INTERFACE cxx_constexpr) 19 | 20 | # Include relative to the base directory 21 | target_include_directories(libcuckoo INTERFACE 22 | $ 23 | $ 24 | ) 25 | 26 | # switch on threading for all targets that link with libcuckoo 27 | target_link_libraries(libcuckoo INTERFACE Threads::Threads) 28 | 29 | # cmake packaging 30 | set (libcuckoo_pkgloc "share/cmake/libcuckoo") 31 | 32 | write_basic_package_version_file( 33 | "libcuckoo-config-version.cmake" VERSION ${libcuckoo_VERSION} 34 | COMPATIBILITY AnyNewerVersion) 35 | 36 | install(TARGETS libcuckoo EXPORT libcuckoo-targets) 37 | install(EXPORT libcuckoo-targets 38 | DESTINATION ${libcuckoo_pkgloc} 39 | FILE "libcuckoo-targets.cmake") 40 | install(FILES libcuckoo-config.cmake 41 | ${CMAKE_CURRENT_BINARY_DIR}/libcuckoo-config-version.cmake 42 | DESTINATION ${libcuckoo_pkgloc}) 43 | install( 44 | FILES 45 | cuckoohash_config.hh 46 | cuckoohash_map.hh 47 | cuckoohash_util.hh 48 | bucket_container.hh 49 | DESTINATION 50 | ${CMAKE_INSTALL_PREFIX}/include/libcuckoo 51 | ) 52 | -------------------------------------------------------------------------------- /third-party/libcuckoo/cuckoohash_config.hh: -------------------------------------------------------------------------------- 1 | /** \file */ 2 | 3 | #ifndef _CUCKOOHASH_CONFIG_HH 4 | #define _CUCKOOHASH_CONFIG_HH 5 | 6 | #include 7 | #include 8 | 9 | namespace libcuckoo { 10 | 11 | //! The default maximum number of keys per bucket 12 | constexpr size_t DEFAULT_SLOT_PER_BUCKET = 4; 13 | 14 | //! The default number of elements in an empty hash table 15 | constexpr size_t DEFAULT_SIZE = 16 | (1U << 16) * DEFAULT_SLOT_PER_BUCKET; 17 | 18 | //! The default minimum load factor that the table allows for automatic 19 | //! expansion. It must be a number between 0.0 and 1.0. The table will throw 20 | //! load_factor_too_low if the load factor falls below this value 21 | //! during an automatic expansion. 22 | constexpr double DEFAULT_MINIMUM_LOAD_FACTOR = 0.05; 23 | 24 | //! An alias for the value that sets no limit on the maximum hashpower. If this 25 | //! value is set as the maximum hashpower limit, there will be no limit. This 26 | //! is also the default initial value for the maximum hashpower in a table. 27 | constexpr size_t NO_MAXIMUM_HASHPOWER = 28 | std::numeric_limits::max(); 29 | 30 | //! set LIBCUCKOO_DEBUG to 1 to enable debug output 31 | #define LIBCUCKOO_DEBUG 0 32 | 33 | } // namespace libcuckoo 34 | 35 | #endif // _CUCKOOHASH_CONFIG_HH 36 | -------------------------------------------------------------------------------- /third-party/libcuckoo/libcuckoo-config.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # libcuckoo-config.cmake 3 | # 4 | 5 | include (CMakeFindDependencyMacro) 6 | 7 | set(THREADS_PREFER_PTHREAD_FLAG ON) 8 | find_dependency(Threads) 9 | 10 | include ("${CMAKE_CURRENT_LIST_DIR}/libcuckoo-targets.cmake") 11 | -------------------------------------------------------------------------------- /third-party/libcuckoo/mainpage.dox: -------------------------------------------------------------------------------- 1 | /*! \mainpage libcuckoo Documentation 2 | * 3 | * libcuckoo is a high-performance, memory efficient hash table that 4 | * supports concurrent reads and writes. 5 | * 6 | * \ref cuckoohash_map is the class of the hash table. Its interface 7 | * resembles that of STL's unordered_map but does contain some 8 | * important differences. 9 | * 10 | * Internally, the hash table is partitioned into an array of 11 | * buckets, each of which contains \c SLOT_PER_BUCKET slots to 12 | * store items. 13 | * 14 | * Each bucket has a lock to ensure multiple threads don't modify the 15 | * same elements. Most operations will lock no more than two buckets 16 | * at a time, thereby allowing for concurrent reads and writes. 17 | */ 18 | -------------------------------------------------------------------------------- /third-party/robin_hood/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018-2019 Martin Ankerl 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /tools/timestamped_graph_2_edge_list.py: -------------------------------------------------------------------------------- 1 | """ 2 | Script reads a timestamped edge list format, deduplicates entries with the same src and dst values, 3 | deduplicates entries with exchanged src and dst values, sorts the edges by timestamp and outputs the same edge list without the timestamps. 4 | 5 | The first argument should be the path to the input edge list with the extension .tel. The output will be written to the 6 | same path but with the extension .el. 7 | 8 | The script assumes that the input format is '\t\t\t' with one edge per line. 9 | The output format is ' '. 10 | """ 11 | 12 | import sys 13 | import os 14 | 15 | def parse_edge(line): 16 | src, dst, _, timestamp = line.split('\t') 17 | return (int(src), int(dst), int(timestamp)) 18 | 19 | input_path = sys.argv[1] 20 | assert(input_path.endswith('.tel')) 21 | 22 | output_path = input_path.replace('.tel', '.el') 23 | 24 | edges = [] 25 | dedup_set = set() 26 | with open(input_path, 'r') as input_file: 27 | for line in input_file: 28 | if line.startswith('#') or line.startswith('%'): 29 | continue 30 | src, dst, timestamp = parse_edge(line) 31 | if src > dst: 32 | dst, src = src, dst 33 | if src == dst: 34 | continue # We do not allow self edges 35 | if (src, dst) not in dedup_set: 36 | dedup_set.add((src, dst)) 37 | edges.append(parse_edge(line)) 38 | 39 | edges = sorted(edges, key=lambda e: e[2]) 40 | 41 | # On my system open(file, 'w') appends to the end of the file, let's avoid this. 42 | if os.path.exists(output_path): 43 | os.remove(output_path) 44 | 45 | with open(output_path, 'w') as output_file: 46 | for e in edges: 47 | output_file.write("%s %s\n" % (e[0], e[1])) 48 | -------------------------------------------------------------------------------- /utility/memory_usage.hpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2019 Dean De Leo, email: dleo[at]cwi.nl 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | #pragma once 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | namespace gfe::utility { 25 | 26 | /** 27 | * Compute the memory usage of this process. 28 | */ 29 | class MemoryUsage { 30 | public: 31 | /** 32 | * This method must be invoked at start-up. The process is reloaded with the functions 33 | * #malloc/#free override by the loader. 34 | * The function can be invoked multiple times, subsequent calls to the method are transformed into *nop*. 35 | * 36 | * This method is not thread-safe. 37 | */ 38 | static void initialise(int argc, char* argv[]); 39 | 40 | /** 41 | * Check whether the instrumentation facility has been initialised. 42 | */ 43 | static bool is_initialised(); 44 | 45 | /** 46 | * Compute the memory footprint of this process. 47 | * For allocations made with #malloc & co, by the C++ runtime, it reports the virtual memory allocated. 48 | * For allocations explicitly made with #mmap, it reports the physical memory currently in use. 49 | * 50 | * The function always returns `0` if the class has not been previously initialised. 51 | */ 52 | static int64_t memory_footprint(); 53 | 54 | /** 55 | * Get the virtual space used by the given allocation, assuming the allocation has been made by glibc 56 | */ 57 | static uint64_t get_allocated_space(const void* pointer); 58 | }; 59 | 60 | } // namespace 61 | -------------------------------------------------------------------------------- /utility/timeout_service.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2019 Dean De Leo, email: dleo[at]cwi.nl 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | #include "timeout_service.hpp" 19 | 20 | #include 21 | 22 | #include "common/system.hpp" 23 | 24 | using namespace std; 25 | 26 | namespace gfe::utility { 27 | 28 | /***************************************************************************** 29 | * * 30 | * TimeoutService * 31 | * * 32 | *****************************************************************************/ 33 | void TimeoutService::start() { 34 | if(m_budget == 0s) return; // nop, the timer will never expire 35 | 36 | assert(!m_background_thread.joinable() && "A background thread is already present"); 37 | m_background_thread = thread(&TimeoutService::main_thread, this); 38 | } 39 | 40 | void TimeoutService::stop(){ 41 | if(m_budget == 0s) return; // nop, never started 42 | 43 | { 44 | scoped_lock lock(m_mutex); 45 | m_terminate = true; 46 | } 47 | m_condvar.notify_all(); 48 | 49 | m_background_thread.join(); // wait for termination 50 | } 51 | 52 | void TimeoutService::main_thread(){ 53 | bool terminate = false; 54 | while(!terminate){ 55 | unique_lock lock(m_mutex); 56 | m_condvar.wait_for(lock, 1s, [this](){ return m_terminate; }); 57 | terminate = m_terminate; 58 | lock.unlock(); 59 | 60 | m_is_timeout = ( clock_t::now() - m_start ) > m_budget; 61 | } 62 | } 63 | 64 | } // namespace 65 | --------------------------------------------------------------------------------