From 858813fdaa7eb122ded24dece7b31c23847538c8 Mon Sep 17 00:00:00 2001 From: Hartmut Kaiser Date: Tue, 9 May 2023 09:51:09 -0500 Subject: [PATCH] Adding new test to build system - adding newly generated files to verification - flyby: fixing typos in code generator --- .cmake-format.py | 15 + backend/src/codegenvisitor.cpp | 4 +- backend/test/CMakeLists.txt | 28 +- backend/test/arr/arr.cpp.good | 124 ++++---- backend/test/arr/arr.hpp.good | 34 +-- backend/test/arr/arr_driver.cpp.good | 14 +- backend/test/arr/arr_driver.hpp.good | 2 +- backend/test/cfg/cfg.cpp.good | 6 +- backend/test/cfg/cfg.hpp.good | 56 ++-- backend/test/cfg/cfg_driver.cpp.good | 38 ++- backend/test/cfg/cfg_driver.hpp.good | 2 +- backend/test/cond/CMakeLists.txt.good | 24 +- backend/test/cond/cond.cpp.good | 121 ++++---- backend/test/cond/cond.hpp.good | 34 +-- backend/test/cond/cond_driver.cpp.good | 14 +- backend/test/cond/cond_driver.hpp.good | 2 +- backend/test/expr/expr.cpp.good | 339 ++++++++++----------- backend/test/expr/expr.hpp.good | 52 ++-- backend/test/expr/expr_driver.cpp.good | 14 +- backend/test/expr/expr_driver.hpp.good | 2 +- backend/test/fn/fn.cpp.good | 53 ++-- backend/test/fn/fn.hpp.good | 34 +-- backend/test/fn/fn_driver.cpp.good | 14 +- backend/test/fn/fn_driver.hpp.good | 2 +- backend/test/fnc/fnc.cpp.good | 69 ++--- backend/test/fnc/fnc.hpp.good | 52 ++-- backend/test/fnc/fnc_driver.cpp.good | 14 +- backend/test/fnc/fnc_driver.hpp.good | 2 +- backend/test/forall/forall.cpp.good | 137 +++++---- backend/test/forall/forall.hpp.good | 34 +-- backend/test/forall/forall_driver.cpp.good | 14 +- backend/test/forall/forall_driver.hpp.good | 2 +- library/include/chplx/dmap.hpp | 2 +- 33 files changed, 662 insertions(+), 692 deletions(-) diff --git a/.cmake-format.py b/.cmake-format.py index 6b17ec89..477a29ac 100644 --- a/.cmake-format.py +++ b/.cmake-format.py @@ -215,6 +215,9 @@ additional_commands = { 'add_chplx_pseudo_dependencies': {'pargs': {'nargs': 0}}, 'add_chplx_pseudo_dependencies_no_shortening': {'pargs': {'nargs': 0}}, 'add_chplx_pseudo_target': {'pargs': {'nargs': 0}}, + 'add_chplx_pseudo_target_folder': { 'kwargs': { 'FOLDER': 1, + 'TARGET': 1 }, + 'pargs': {'nargs': 0}}, 'add_chplx_test': { 'kwargs': { 'ARGS': '+', 'EXECUTABLE': 1, 'LOCALITIES': 1, @@ -228,6 +231,18 @@ 'NO_PARCELPORT_MPI', 'NO_PARCELPORT_LCI'], 'nargs': '2+'}}, + 'chplx_compare_result': { 'kwargs': { 'GOOD': 1, + 'TEST_NAME': 1, + 'DEPENDENCIES': '+', + 'SOURCES': '+'}, + 'pargs': {'nargs': '2+'}}, + 'chplx_compile_project': { 'kwargs': { 'TARGET': 1, + 'TEST_NAME': 1, + 'DEPENDENCIES': '+'}, + 'pargs': {'nargs': '2+'}}, + 'chplx_format_file': { 'kwargs': { 'SOURCES': '+', + 'DEPENDENCIES': '+'}, + 'pargs': {'nargs': '2+'}}, 'chplx_config_loglevel': {'pargs': {'nargs': 2}}, 'chplx_debug': {'pargs': {'nargs': 0}}, 'chplx_error': {'pargs': {'nargs': 0}}, diff --git a/backend/src/codegenvisitor.cpp b/backend/src/codegenvisitor.cpp index 6873c82e..f113a516 100644 --- a/backend/src/codegenvisitor.cpp +++ b/backend/src/codegenvisitor.cpp @@ -870,7 +870,7 @@ static void generateSourceFooter(std::string const& modStr, SymbolTable & symtab << " chplx::registerModule<" << modStr << "::__thisModule>();" << std::endl; if(0 < cfgVars.size()) { - fos << " hpx::program::options::options::options_description options;\n options.add_options()"; + fos << " hpx::program_options::options_description options;\n options.add_options()"; for(auto & opt : cfgVars) { fos << std::endl << " (\"" << opt.identifier << "\"," << std::endl; FuncDeclArgVisitor v{fos}; @@ -878,7 +878,7 @@ static void generateSourceFooter(std::string const& modStr, SymbolTable & symtab std::visit(v, opt.kind); - std::string opt_identifier{"_this->" + opt.identifier}; + std::string opt_identifier{"__this->" + opt.identifier}; buildFullNamespaceString(opt_identifier, symtable, opt); fos << ">(&" << opt_identifier << "), " << "\"config "; diff --git a/backend/test/CMakeLists.txt b/backend/test/CMakeLists.txt index 62aa28ca..1f736913 100644 --- a/backend/test/CMakeLists.txt +++ b/backend/test/CMakeLists.txt @@ -10,27 +10,43 @@ find_package(ClangFormat) add_chplx_pseudo_target(tests.unit.backend_dir) add_chplx_pseudo_target_folder( - backend TARGET tests.unit.backend_dir FOLDER "Backend/Tests/Targets" + backend + TARGET tests.unit.backend_dir + FOLDER "Backend/Tests/Targets" ) add_chplx_pseudo_dependencies(tests.unit tests.unit.backend_dir) -set(tests arr cond expr fn fnc forall) +set(tests + arr + cfg + cond + expr + fn + fnc + forall +) foreach(test ${tests}) chplx_compile(${test} SOURCE ${test}.chpl) if(CLANGFORMAT_FOUND) - chplx_format_file(${test} SOURCES ${test}.cpp ${test}.hpp) + chplx_format_file( + ${test} SOURCES ${test}.cpp ${test}.hpp ${test}_driver.cpp + ${test}_driver.hpp + ) endif() - chplx_compare_result(${test} - SOURCES ${test}.cpp ${test}.hpp "CMakeLists.txt" + chplx_compare_result( + ${test} + SOURCES ${test}.cpp ${test}.hpp ${test}_driver.cpp ${test}_driver.hpp + "CMakeLists.txt" TEST_NAME "tests.unit.backend_dir.${test}" ) # now build the created files - chplx_compile_project(${test} + chplx_compile_project( + ${test} TARGET ${test} TEST_NAME "tests.unit.backend_dir.${test}_cpp" ) diff --git a/backend/test/arr/arr.cpp.good b/backend/test/arr/arr.cpp.good index ded23c4d..56217807 100644 --- a/backend/test/arr/arr.cpp.good +++ b/backend/test/arr/arr.cpp.good @@ -5,69 +5,67 @@ namespace arr { - struct __thisModule* __this = nullptr; +struct __thisModule *__this = nullptr; -#line 37 "../../backend/test/arr.chpl" - auto __thisModule::dd() - { -#line 38 "../../backend/test/arr.chpl" - return 1; - }; +#line 37 "arr.chpl" +auto __thisModule::dd() { +#line 38 "arr.chpl" + return 1; +}; - void __thisModule::__main() - { -#line 8 "../../backend/test/arr.chpl" - std::vector k = {1, 2, 3, 4, 5}; -#line 9 "../../backend/test/arr.chpl" - std::vector> l = {{1, 2}, {3, 4}}; -#line 10 "../../backend/test/arr.chpl" - std::vector> m = {{1}, {2}, {3, 4, 5}}; -#line 11 "../../backend/test/arr.chpl" - std::vector> n = {{1, 2}, {1, 2}}; -#line 12 "../../backend/test/arr.chpl" - std::vector>> o = { - {{1, 2}, {1, 2}, {3, 4}}, {{5, 6}, {7, 8}}}; -#line 13 "../../backend/test/arr.chpl" - std::vector> p = {{1, 2, 3, 4, 5}}; -#line 14 "../../backend/test/arr.chpl" - std::vector>> q = { - {{1, 2, 3, 4, 5}}}; -#line 16 "../../backend/test/arr.chpl" - bool u; -#line 17 "../../backend/test/arr.chpl" - double v; -#line 18 "../../backend/test/arr.chpl" - std::uint8_t w; -#line 19 "../../backend/test/arr.chpl" - std::int64_t x; -#line 20 "../../backend/test/arr.chpl" - std::complex y; -#line 21 "../../backend/test/arr.chpl" - std::string z; -#line 23 "../../backend/test/arr.chpl" - std::vector a(10); -#line 24 "../../backend/test/arr.chpl" - std::vector b(10); -#line 25 "../../backend/test/arr.chpl" - std::vector> c(10); -#line 26 "../../backend/test/arr.chpl" - std::vector d(10); -#line 27 "../../backend/test/arr.chpl" - std::vector e(10); -#line 28 "../../backend/test/arr.chpl" - std::vector f(10); -#line 30 "../../backend/test/arr.chpl" - std::int64_t g = 1; -#line 31 "../../backend/test/arr.chpl" - bool h = true; -#line 32 "../../backend/test/arr.chpl" - std::string i = {"value"}; -#line 33 "../../backend/test/arr.chpl" - double j = 1.000000; -#line 35 "../../backend/test/arr.chpl" - auto aa = 1 + 1; -#line 41 "../../backend/test/arr.chpl" - auto bb = dd(); - } +void __thisModule::__main() { -} // namespace arr \ No newline at end of file +#line 8 "arr.chpl" + std::vector k = {1, 2, 3, 4, 5}; +#line 9 "arr.chpl" + std::vector> l = {{1, 2}, {3, 4}}; +#line 10 "arr.chpl" + std::vector> m = {{1}, {2}, {3, 4, 5}}; +#line 11 "arr.chpl" + std::vector> n = {{1, 2}, {1, 2}}; +#line 12 "arr.chpl" + std::vector>> o = { + {{1, 2}, {1, 2}, {3, 4}}, {{5, 6}, {7, 8}}}; +#line 13 "arr.chpl" + std::vector> p = {{1, 2, 3, 4, 5}}; +#line 14 "arr.chpl" + std::vector>> q = {{{1, 2, 3, 4, 5}}}; +#line 16 "arr.chpl" + bool u; +#line 17 "arr.chpl" + double v; +#line 18 "arr.chpl" + std::uint8_t w; +#line 19 "arr.chpl" + std::int64_t x; +#line 20 "arr.chpl" + std::complex y; +#line 21 "arr.chpl" + std::string z; +#line 23 "arr.chpl" + std::vector a(10); +#line 24 "arr.chpl" + std::vector b(10); +#line 25 "arr.chpl" + std::vector> c(10); +#line 26 "arr.chpl" + std::vector d(10); +#line 27 "arr.chpl" + std::vector e(10); +#line 28 "arr.chpl" + std::vector f(10); +#line 30 "arr.chpl" + std::int64_t g = 1; +#line 31 "arr.chpl" + bool h = true; +#line 32 "arr.chpl" + std::string i = {"value"}; +#line 33 "arr.chpl" + double j = 1.000000; +#line 35 "arr.chpl" + auto aa = 1 + 1; +#line 41 "arr.chpl" + auto bb = dd(); +} + +} // namespace arr \ No newline at end of file diff --git a/backend/test/arr/arr.hpp.good b/backend/test/arr/arr.hpp.good index 52575ffa..f9326966 100644 --- a/backend/test/arr/arr.hpp.good +++ b/backend/test/arr/arr.hpp.good @@ -11,30 +11,26 @@ #include #include #include -#line 1 "../../backend/test/arr.chpl" +#line 1 "arr.chpl" namespace arr { - extern struct __thisModule* __this; +extern struct __thisModule *__this; - struct __thisModule - { -#line 37 "../../backend/test/arr.chpl" - auto dd(); +struct __thisModule { - static void __construct() - { - arr::__this = new __thisModule(); - } +#line 37 "arr.chpl" + auto dd(); - static void __destruct() noexcept - { - auto* m = arr::__this; - arr::__this = nullptr; - delete m; - } + static void __construct() { arr::__this = new __thisModule(); } - void __main(); - }; // end struct __thisModule + static void __destruct() noexcept { + auto *m = arr::__this; + arr::__this = nullptr; + delete m; + } -} // namespace arr + void __main(); +}; // end struct __thisModule + +} // namespace arr #endif diff --git a/backend/test/arr/arr_driver.cpp.good b/backend/test/arr/arr_driver.cpp.good index f4e37c5c..c728bbab 100644 --- a/backend/test/arr/arr_driver.cpp.good +++ b/backend/test/arr/arr_driver.cpp.good @@ -7,14 +7,12 @@ using namespace arr; -int hpx_main(int argc, char* argv[]) -{ - arr::__this->__main(); - return hpx::finalize(); +int hpx_main(int argc, char *argv[]) { + arr::__this->__main(); + return hpx::finalize(); } -int main(int argc, char* argv[]) -{ - chplx::registerModule(); - return hpx::init(argc, argv); +int main(int argc, char *argv[]) { + chplx::registerModule(); + return hpx::init(argc, argv); } diff --git a/backend/test/arr/arr_driver.hpp.good b/backend/test/arr/arr_driver.hpp.good index cc6efe16..4fa17fd1 100644 --- a/backend/test/arr/arr_driver.hpp.good +++ b/backend/test/arr/arr_driver.hpp.good @@ -6,7 +6,7 @@ #ifndef __ARR_DRIVER_HPP__ #define __ARR_DRIVER_HPP__ -#include #include "arr.hpp" +#include #endif diff --git a/backend/test/cfg/cfg.cpp.good b/backend/test/cfg/cfg.cpp.good index 4feff76b..ec79a121 100644 --- a/backend/test/cfg/cfg.cpp.good +++ b/backend/test/cfg/cfg.cpp.good @@ -5,8 +5,8 @@ namespace cfg { - struct __thisModule* __this = nullptr; +struct __thisModule *__this = nullptr; - void __thisModule::__main() {} +void __thisModule::__main() {} -} // namespace cfg \ No newline at end of file +} // namespace cfg \ No newline at end of file diff --git a/backend/test/cfg/cfg.hpp.good b/backend/test/cfg/cfg.hpp.good index 04f9e5ed..5f512852 100644 --- a/backend/test/cfg/cfg.hpp.good +++ b/backend/test/cfg/cfg.hpp.good @@ -7,36 +7,32 @@ #define __CFG_HPP__ #include -#line 1 "../../backend/test/cfg.chpl" +#line 1 "cfg.chpl" namespace cfg { - extern struct __thisModule* __this; - - struct __thisModule - { -#line 8 "../../backend/test/cfg.chpl" - std::int64_t a; -#line 9 "../../backend/test/cfg.chpl" - std::int64_t b = 1; -#line 10 "../../backend/test/cfg.chpl" - std::int64_t c; -#line 11 "../../backend/test/cfg.chpl" - std::int64_t d = 1; - - static void __construct() - { - cfg::__this = new __thisModule(); - } - - static void __destruct() noexcept - { - auto* m = cfg::__this; - cfg::__this = nullptr; - delete m; - } - - void __main(); - }; // end struct __thisModule - -} // namespace cfg +extern struct __thisModule *__this; + +struct __thisModule { + +#line 8 "cfg.chpl" + std::int64_t a; +#line 9 "cfg.chpl" + std::int64_t b = 1; +#line 10 "cfg.chpl" + std::int64_t c; +#line 11 "cfg.chpl" + std::int64_t d = 1; + + static void __construct() { cfg::__this = new __thisModule(); } + + static void __destruct() noexcept { + auto *m = cfg::__this; + cfg::__this = nullptr; + delete m; + } + + void __main(); +}; // end struct __thisModule + +} // namespace cfg #endif diff --git a/backend/test/cfg/cfg_driver.cpp.good b/backend/test/cfg/cfg_driver.cpp.good index 7c9c702d..28d6761a 100644 --- a/backend/test/cfg/cfg_driver.cpp.good +++ b/backend/test/cfg/cfg_driver.cpp.good @@ -8,26 +8,24 @@ using namespace cfg; -int hpx_main(int argc, char* argv[]) -{ - cfg::__this->__main(); - return hpx::finalize(); +int hpx_main(int argc, char *argv[]) { + cfg::__this->__main(); + return hpx::finalize(); } -int main(int argc, char* argv[]) -{ - chplx::registerModule(); - hpx::program::options::options::options_description options; - options.add_options()("a", - hpx::program_options::value(&cfg::_this->a), - "config const a : std::int64_t")("b", - hpx::program_options::value(&cfg::_this->b), - "config var b : std::int64_t")("c", - hpx::program_options::value(&cfg::_this->c), - "config const c : std::int64_t")("d", - hpx::program_options::value(&cfg::_this->d), - "config const d : std::int64_t"); - hpx::init_params init_args; - init_args.desc_cmdline = options; - return hpx::init(argc, argv, init_args); +int main(int argc, char *argv[]) { + chplx::registerModule(); + hpx::program_options::options_description options; + options.add_options()( + "a", hpx::program_options::value(&cfg::__this->a), + "config const a : std::int64_t")( + "b", hpx::program_options::value(&cfg::__this->b), + "config var b : std::int64_t")( + "c", hpx::program_options::value(&cfg::__this->c), + "config const c : std::int64_t")( + "d", hpx::program_options::value(&cfg::__this->d), + "config const d : std::int64_t"); + hpx::init_params init_args; + init_args.desc_cmdline = options; + return hpx::init(argc, argv, init_args); } diff --git a/backend/test/cfg/cfg_driver.hpp.good b/backend/test/cfg/cfg_driver.hpp.good index 4adf69ed..94cb47fb 100644 --- a/backend/test/cfg/cfg_driver.hpp.good +++ b/backend/test/cfg/cfg_driver.hpp.good @@ -6,7 +6,7 @@ #ifndef __CFG_DRIVER_HPP__ #define __CFG_DRIVER_HPP__ -#include #include "cfg.hpp" +#include #endif diff --git a/backend/test/cond/CMakeLists.txt.good b/backend/test/cond/CMakeLists.txt.good index 8ae3fa57..c43335ea 100644 --- a/backend/test/cond/CMakeLists.txt.good +++ b/backend/test/cond/CMakeLists.txt.good @@ -1,13 +1,13 @@ # # This program file was generated by the chplx compiler. -# The original Chapel program file can be found here: "cfg.chpl" +# The original Chapel program file can be found here: "cond.chpl" # cmake_minimum_required(VERSION 3.19) if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Debug CACHE STRING "Configuration type" FORCE) endif() -project(cfg) -add_executable(cfg cfg.cpp cfg_driver.cpp) +project(cond) +add_executable(cond cond.cpp cond_driver.cpp) if(NOT APPLE) set(CMAKE_CXX_STANDARD 20) endif() @@ -21,28 +21,28 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON) find_package(fmt REQUIRED CONFIG) find_package(HPX REQUIRED CONFIG) find_package(Chplx REQUIRED CONFIG) -set(cfg_sources cfg.cpp cfg_driver.cpp) -set(cfg_headers cfg.hpp cfg_driver.hpp) +set(cond_sources cond.cpp cond_driver.cpp) +set(cond_headers cond.hpp cond_driver.hpp) if(NOT WIN32 AND ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" AND APPLE) find_library(CORE_LIBPATH NAMES CoreFoundation REQUIRED) - target_compile_options(cfg + target_compile_options(cond PUBLIC -nostdlib -std=c++20 -O3 -stdlib=libc++ ) - target_link_libraries(cfg PRIVATE ${CORE_LIBPATH}) - target_link_libraries(cfg + target_link_libraries(cond PRIVATE ${CORE_LIBPATH}) + target_link_libraries(cond PUBLIC c++ ) endif() -target_link_libraries(cfg PUBLIC fmt::fmt-header-only HPX::hpx Chplx::library) +target_link_libraries(cond PUBLIC fmt::fmt-header-only HPX::hpx Chplx::library) enable_testing() include(CTest) add_test( - NAME cfg_test - COMMAND cfg - WORKING_DIRECTORY $ + NAME cond_test + COMMAND cond + WORKING_DIRECTORY $ ) diff --git a/backend/test/cond/cond.cpp.good b/backend/test/cond/cond.cpp.good index 73df8161..262edf76 100644 --- a/backend/test/cond/cond.cpp.good +++ b/backend/test/cond/cond.cpp.good @@ -5,71 +5,62 @@ namespace cond { - struct __thisModule* __this = nullptr; +struct __thisModule *__this = nullptr; -#line 38 "../../backend/test/cond.chpl" - void __thisModule::alpha() - { -#line 39 "../../backend/test/cond.chpl" - std::int64_t d = 1; -#line 40 "../../backend/test/cond.chpl" - if (d) - { -#line 41 "../../backend/test/cond.chpl" - std::cout << d << std::endl; - } - }; +#line 38 "cond.chpl" +void __thisModule::alpha() { +#line 39 "cond.chpl" + std::int64_t d = 1; +#line 40 "cond.chpl" + if (d) { +#line 41 "cond.chpl" + std::cout << d << std::endl; + } +}; - void __thisModule::__main() - { -#line 8 "../../backend/test/cond.chpl" - std::int64_t a = 1; -#line 10 "../../backend/test/cond.chpl" - if (a) - { -#line 11 "../../backend/test/cond.chpl" - std::cout << a << std::endl; - } -#line 14 "../../backend/test/cond.chpl" - std::int64_t b = 0; -#line 16 "../../backend/test/cond.chpl" - if (b == 0) - { -#line 17 "../../backend/test/cond.chpl" - std::cout << b << std::endl; - } -#line 19 "../../backend/test/cond.chpl" - else if (b == 1) - { -#line 20 "../../backend/test/cond.chpl" - std::cout << b << std::endl; - } -#line 22 "../../backend/test/cond.chpl" - else - { -#line 23 "../../backend/test/cond.chpl" - std::cout << b << std::endl; - } -#line 26 "../../backend/test/cond.chpl" - std::int64_t c = 0; -#line 28 "../../backend/test/cond.chpl" - if (c == 3) - { -#line 29 "../../backend/test/cond.chpl" - std::cout << c << std::endl; - } -#line 31 "../../backend/test/cond.chpl" - else if (c == 2) - { -#line 32 "../../backend/test/cond.chpl" - std::cout << c << std::endl; - } -#line 34 "../../backend/test/cond.chpl" - else if (c == 1) - { -#line 35 "../../backend/test/cond.chpl" - std::cout << c << std::endl; - } - } +void __thisModule::__main() { -} // namespace cond \ No newline at end of file +#line 8 "cond.chpl" + std::int64_t a = 1; +#line 10 "cond.chpl" + if (a) { +#line 11 "cond.chpl" + std::cout << a << std::endl; + } +#line 14 "cond.chpl" + std::int64_t b = 0; +#line 16 "cond.chpl" + if (b == 0) { +#line 17 "cond.chpl" + std::cout << b << std::endl; + } +#line 19 "cond.chpl" + else if (b == 1) { +#line 20 "cond.chpl" + std::cout << b << std::endl; + } +#line 22 "cond.chpl" + else { +#line 23 "cond.chpl" + std::cout << b << std::endl; + } +#line 26 "cond.chpl" + std::int64_t c = 0; +#line 28 "cond.chpl" + if (c == 3) { +#line 29 "cond.chpl" + std::cout << c << std::endl; + } +#line 31 "cond.chpl" + else if (c == 2) { +#line 32 "cond.chpl" + std::cout << c << std::endl; + } +#line 34 "cond.chpl" + else if (c == 1) { +#line 35 "cond.chpl" + std::cout << c << std::endl; + } +} + +} // namespace cond \ No newline at end of file diff --git a/backend/test/cond/cond.hpp.good b/backend/test/cond/cond.hpp.good index f83e5b6d..da02893c 100644 --- a/backend/test/cond/cond.hpp.good +++ b/backend/test/cond/cond.hpp.good @@ -9,30 +9,26 @@ #include #include #include -#line 1 "../../backend/test/cond.chpl" +#line 1 "cond.chpl" namespace cond { - extern struct __thisModule* __this; +extern struct __thisModule *__this; - struct __thisModule - { -#line 38 "../../backend/test/cond.chpl" - void alpha(); +struct __thisModule { - static void __construct() - { - cond::__this = new __thisModule(); - } +#line 38 "cond.chpl" + void alpha(); - static void __destruct() noexcept - { - auto* m = cond::__this; - cond::__this = nullptr; - delete m; - } + static void __construct() { cond::__this = new __thisModule(); } - void __main(); - }; // end struct __thisModule + static void __destruct() noexcept { + auto *m = cond::__this; + cond::__this = nullptr; + delete m; + } -} // namespace cond + void __main(); +}; // end struct __thisModule + +} // namespace cond #endif diff --git a/backend/test/cond/cond_driver.cpp.good b/backend/test/cond/cond_driver.cpp.good index a29234cb..ae2e1a28 100644 --- a/backend/test/cond/cond_driver.cpp.good +++ b/backend/test/cond/cond_driver.cpp.good @@ -7,14 +7,12 @@ using namespace cond; -int hpx_main(int argc, char* argv[]) -{ - cond::__this->__main(); - return hpx::finalize(); +int hpx_main(int argc, char *argv[]) { + cond::__this->__main(); + return hpx::finalize(); } -int main(int argc, char* argv[]) -{ - chplx::registerModule(); - return hpx::init(argc, argv); +int main(int argc, char *argv[]) { + chplx::registerModule(); + return hpx::init(argc, argv); } diff --git a/backend/test/cond/cond_driver.hpp.good b/backend/test/cond/cond_driver.hpp.good index 5b10a329..5fe869de 100644 --- a/backend/test/cond/cond_driver.hpp.good +++ b/backend/test/cond/cond_driver.hpp.good @@ -6,7 +6,7 @@ #ifndef __COND_DRIVER_HPP__ #define __COND_DRIVER_HPP__ -#include #include "cond.hpp" +#include #endif diff --git a/backend/test/expr/expr.cpp.good b/backend/test/expr/expr.cpp.good index ba93426f..4ae84b15 100644 --- a/backend/test/expr/expr.cpp.good +++ b/backend/test/expr/expr.cpp.good @@ -5,179 +5,176 @@ namespace expr { - struct __thisModule* __this = nullptr; +struct __thisModule *__this = nullptr; -#line 33 "../../backend/test/expr.chpl" - std::int64_t __thisModule::value() - { -#line 34 "../../backend/test/expr.chpl" - return 1; - }; +#line 33 "expr.chpl" +std::int64_t __thisModule::value() { +#line 34 "expr.chpl" + return 1; +}; -#line 46 "../../backend/test/expr.chpl" - std::int64_t __thisModule::valuea(std::int64_t a) - { -#line 47 "../../backend/test/expr.chpl" - return a; - }; +#line 46 "expr.chpl" +std::int64_t __thisModule::valuea(std::int64_t a) { +#line 47 "expr.chpl" + return a; +}; -#line 100 "../../backend/test/expr.chpl" - std::int64_t __thisModule::valueb(std::int64_t a) - { -#line 101 "../../backend/test/expr.chpl" - std::int64_t x = valuea(a); -#line 102 "../../backend/test/expr.chpl" - x = valuea(a); -#line 103 "../../backend/test/expr.chpl" - return valuea(a) + x; - }; +#line 100 "expr.chpl" +std::int64_t __thisModule::valueb(std::int64_t a) { +#line 101 "expr.chpl" + std::int64_t x = valuea(a); +#line 102 "expr.chpl" + x = valuea(a); +#line 103 "expr.chpl" + return valuea(a) + x; +}; - void __thisModule::__main() - { -#line 8 "../../backend/test/expr.chpl" - std::int64_t a; -#line 10 "../../backend/test/expr.chpl" - a = 1 + 1; -#line 11 "../../backend/test/expr.chpl" - a = a + 1; -#line 12 "../../backend/test/expr.chpl" - a = 1 + a; -#line 13 "../../backend/test/expr.chpl" - a = a + a; -#line 14 "../../backend/test/expr.chpl" - a = (a + a) + a; -#line 15 "../../backend/test/expr.chpl" - a = (a + a) + 1; -#line 16 "../../backend/test/expr.chpl" - a = ((1 + a) + a) + a; -#line 17 "../../backend/test/expr.chpl" - a = ((a + 1) + a) + a; -#line 18 "../../backend/test/expr.chpl" - a = ((a + a) + 1) + a; -#line 19 "../../backend/test/expr.chpl" - a = ((a + a) + a) + 1; -#line 21 "../../backend/test/expr.chpl" - a = 1 + (1 + 1); -#line 22 "../../backend/test/expr.chpl" - a = (1 + 1) + 1; -#line 23 "../../backend/test/expr.chpl" - a = a + ((a + a) + a); -#line 24 "../../backend/test/expr.chpl" - a = ((a + a) + a) + a; -#line 25 "../../backend/test/expr.chpl" - a = 1 + (1 * 1); -#line 26 "../../backend/test/expr.chpl" - a = 1 + a; -#line 27 "../../backend/test/expr.chpl" - a = a + a; -#line 28 "../../backend/test/expr.chpl" - a = a + (a + a); -#line 29 "../../backend/test/expr.chpl" - a = (a + a) + a; -#line 30 "../../backend/test/expr.chpl" - a = a + ((a + a) + a); -#line 31 "../../backend/test/expr.chpl" - a = ((a + a) + a) + a; -#line 37 "../../backend/test/expr.chpl" - a = value(); -#line 38 "../../backend/test/expr.chpl" - a = 1 + value(); -#line 39 "../../backend/test/expr.chpl" - a = value() + 1; -#line 40 "../../backend/test/expr.chpl" - a = value() + value(); -#line 41 "../../backend/test/expr.chpl" - a = a + (value() + value()); -#line 42 "../../backend/test/expr.chpl" - a = (value() + value()) + a; -#line 43 "../../backend/test/expr.chpl" - a = ((value() + value()) + value()) + a; -#line 44 "../../backend/test/expr.chpl" - a = a + ((value() + value()) + value()); -#line 50 "../../backend/test/expr.chpl" - a = valuea(a); -#line 51 "../../backend/test/expr.chpl" - a = valuea(1 + a); -#line 52 "../../backend/test/expr.chpl" - a = 1 + valuea(1 + a); -#line 53 "../../backend/test/expr.chpl" - a = valuea(1 + a) + 1; -#line 55 "../../backend/test/expr.chpl" - a = 1 + valuea(a); -#line 56 "../../backend/test/expr.chpl" - a = valuea(a) + 1; -#line 57 "../../backend/test/expr.chpl" - a = valuea(a) + valuea(a); -#line 58 "../../backend/test/expr.chpl" - a = a + (valuea(a) + valuea(a)); -#line 59 "../../backend/test/expr.chpl" - a = (valuea(a) + valuea(a)) + a; -#line 60 "../../backend/test/expr.chpl" - a = ((valuea(a) + valuea(a)) + valuea(a)) + a; -#line 61 "../../backend/test/expr.chpl" - a = a + ((valuea(a) + valuea(a)) + valuea(a)); -#line 63 "../../backend/test/expr.chpl" - std::vector b(10); -#line 65 "../../backend/test/expr.chpl" - b[0] = 1; -#line 66 "../../backend/test/expr.chpl" - b[0] = a; -#line 67 "../../backend/test/expr.chpl" - b[0] = a; -#line 68 "../../backend/test/expr.chpl" - b[0] = b[0]; -#line 69 "../../backend/test/expr.chpl" - b[0] = b[0]; -#line 70 "../../backend/test/expr.chpl" - b[0] = b[0]; -#line 71 "../../backend/test/expr.chpl" - b[0] = b[0]; -#line 73 "../../backend/test/expr.chpl" - b[0 + 0] = 1; -#line 74 "../../backend/test/expr.chpl" - b[0 + 0] = 1; -#line 76 "../../backend/test/expr.chpl" - b[0 + 0] = a; -#line 77 "../../backend/test/expr.chpl" - b[0 + 0] = a; -#line 78 "../../backend/test/expr.chpl" - b[0 + 0] = b[0]; -#line 79 "../../backend/test/expr.chpl" - b[0 + 0] = b[0]; -#line 80 "../../backend/test/expr.chpl" - b[0 + 0] = b[0 + 0]; -#line 81 "../../backend/test/expr.chpl" - b[0 + 0] = b[0 + 0]; -#line 83 "../../backend/test/expr.chpl" - std::vector> c = {{1, 2}, {3, 4}}; -#line 84 "../../backend/test/expr.chpl" - c[0][0] = 0; -#line 85 "../../backend/test/expr.chpl" - c[0][0] = a; -#line 86 "../../backend/test/expr.chpl" - c[0][0] = 0; -#line 87 "../../backend/test/expr.chpl" - c[0][0] = a; -#line 88 "../../backend/test/expr.chpl" - c[0][0] = c[0][0]; -#line 89 "../../backend/test/expr.chpl" - c[0][0] = c[0][0]; -#line 90 "../../backend/test/expr.chpl" - c[0][0] = c[0][0]; -#line 91 "../../backend/test/expr.chpl" - c[0][0] = c[0][0]; -#line 92 "../../backend/test/expr.chpl" - c[0 + 0][0] = 1; -#line 93 "../../backend/test/expr.chpl" - c[0 + 0][0] = 1; -#line 95 "../../backend/test/expr.chpl" - std::int64_t y = valuea(1); -#line 96 "../../backend/test/expr.chpl" - std::int64_t z = valuea(a); -#line 97 "../../backend/test/expr.chpl" - std::int64_t w = valuea(a); -#line 98 "../../backend/test/expr.chpl" - std::int64_t u = valuea(1); - } +void __thisModule::__main() { -} // namespace expr \ No newline at end of file +#line 8 "expr.chpl" + std::int64_t a; +#line 10 "expr.chpl" + a = 1 + 1; +#line 11 "expr.chpl" + a = a + 1; +#line 12 "expr.chpl" + a = 1 + a; +#line 13 "expr.chpl" + a = a + a; +#line 14 "expr.chpl" + a = (a + a) + a; +#line 15 "expr.chpl" + a = (a + a) + 1; +#line 16 "expr.chpl" + a = ((1 + a) + a) + a; +#line 17 "expr.chpl" + a = ((a + 1) + a) + a; +#line 18 "expr.chpl" + a = ((a + a) + 1) + a; +#line 19 "expr.chpl" + a = ((a + a) + a) + 1; +#line 21 "expr.chpl" + a = 1 + (1 + 1); +#line 22 "expr.chpl" + a = (1 + 1) + 1; +#line 23 "expr.chpl" + a = a + ((a + a) + a); +#line 24 "expr.chpl" + a = ((a + a) + a) + a; +#line 25 "expr.chpl" + a = 1 + (1 * 1); +#line 26 "expr.chpl" + a = 1 + a; +#line 27 "expr.chpl" + a = a + a; +#line 28 "expr.chpl" + a = a + (a + a); +#line 29 "expr.chpl" + a = (a + a) + a; +#line 30 "expr.chpl" + a = a + ((a + a) + a); +#line 31 "expr.chpl" + a = ((a + a) + a) + a; +#line 37 "expr.chpl" + a = value(); +#line 38 "expr.chpl" + a = 1 + value(); +#line 39 "expr.chpl" + a = value() + 1; +#line 40 "expr.chpl" + a = value() + value(); +#line 41 "expr.chpl" + a = a + (value() + value()); +#line 42 "expr.chpl" + a = (value() + value()) + a; +#line 43 "expr.chpl" + a = ((value() + value()) + value()) + a; +#line 44 "expr.chpl" + a = a + ((value() + value()) + value()); +#line 50 "expr.chpl" + a = valuea(a); +#line 51 "expr.chpl" + a = valuea(1 + a); +#line 52 "expr.chpl" + a = 1 + valuea(1 + a); +#line 53 "expr.chpl" + a = valuea(1 + a) + 1; +#line 55 "expr.chpl" + a = 1 + valuea(a); +#line 56 "expr.chpl" + a = valuea(a) + 1; +#line 57 "expr.chpl" + a = valuea(a) + valuea(a); +#line 58 "expr.chpl" + a = a + (valuea(a) + valuea(a)); +#line 59 "expr.chpl" + a = (valuea(a) + valuea(a)) + a; +#line 60 "expr.chpl" + a = ((valuea(a) + valuea(a)) + valuea(a)) + a; +#line 61 "expr.chpl" + a = a + ((valuea(a) + valuea(a)) + valuea(a)); +#line 63 "expr.chpl" + std::vector b(10); +#line 65 "expr.chpl" + b[0] = 1; +#line 66 "expr.chpl" + b[0] = a; +#line 67 "expr.chpl" + b[0] = a; +#line 68 "expr.chpl" + b[0] = b[0]; +#line 69 "expr.chpl" + b[0] = b[0]; +#line 70 "expr.chpl" + b[0] = b[0]; +#line 71 "expr.chpl" + b[0] = b[0]; +#line 73 "expr.chpl" + b[0 + 0] = 1; +#line 74 "expr.chpl" + b[0 + 0] = 1; +#line 76 "expr.chpl" + b[0 + 0] = a; +#line 77 "expr.chpl" + b[0 + 0] = a; +#line 78 "expr.chpl" + b[0 + 0] = b[0]; +#line 79 "expr.chpl" + b[0 + 0] = b[0]; +#line 80 "expr.chpl" + b[0 + 0] = b[0 + 0]; +#line 81 "expr.chpl" + b[0 + 0] = b[0 + 0]; +#line 83 "expr.chpl" + std::vector> c = {{1, 2}, {3, 4}}; +#line 84 "expr.chpl" + c[0][0] = 0; +#line 85 "expr.chpl" + c[0][0] = a; +#line 86 "expr.chpl" + c[0][0] = 0; +#line 87 "expr.chpl" + c[0][0] = a; +#line 88 "expr.chpl" + c[0][0] = c[0][0]; +#line 89 "expr.chpl" + c[0][0] = c[0][0]; +#line 90 "expr.chpl" + c[0][0] = c[0][0]; +#line 91 "expr.chpl" + c[0][0] = c[0][0]; +#line 92 "expr.chpl" + c[0 + 0][0] = 1; +#line 93 "expr.chpl" + c[0 + 0][0] = 1; +#line 95 "expr.chpl" + std::int64_t y = valuea(1); +#line 96 "expr.chpl" + std::int64_t z = valuea(a); +#line 97 "expr.chpl" + std::int64_t w = valuea(a); +#line 98 "expr.chpl" + std::int64_t u = valuea(1); +} + +} // namespace expr \ No newline at end of file diff --git a/backend/test/expr/expr.hpp.good b/backend/test/expr/expr.hpp.good index 90f3974a..86b5817a 100644 --- a/backend/test/expr/expr.hpp.good +++ b/backend/test/expr/expr.hpp.good @@ -9,34 +9,30 @@ #include #include #include -#line 1 "../../backend/test/expr.chpl" +#line 1 "expr.chpl" namespace expr { - extern struct __thisModule* __this; - - struct __thisModule - { -#line 33 "../../backend/test/expr.chpl" - std::int64_t value(); -#line 46 "../../backend/test/expr.chpl" - std::int64_t valuea(std::int64_t a); -#line 100 "../../backend/test/expr.chpl" - std::int64_t valueb(std::int64_t a); - - static void __construct() - { - expr::__this = new __thisModule(); - } - - static void __destruct() noexcept - { - auto* m = expr::__this; - expr::__this = nullptr; - delete m; - } - - void __main(); - }; // end struct __thisModule - -} // namespace expr +extern struct __thisModule *__this; + +struct __thisModule { + +#line 33 "expr.chpl" + std::int64_t value(); +#line 46 "expr.chpl" + std::int64_t valuea(std::int64_t a); +#line 100 "expr.chpl" + std::int64_t valueb(std::int64_t a); + + static void __construct() { expr::__this = new __thisModule(); } + + static void __destruct() noexcept { + auto *m = expr::__this; + expr::__this = nullptr; + delete m; + } + + void __main(); +}; // end struct __thisModule + +} // namespace expr #endif diff --git a/backend/test/expr/expr_driver.cpp.good b/backend/test/expr/expr_driver.cpp.good index 56b55a96..420f8ccc 100644 --- a/backend/test/expr/expr_driver.cpp.good +++ b/backend/test/expr/expr_driver.cpp.good @@ -7,14 +7,12 @@ using namespace expr; -int hpx_main(int argc, char* argv[]) -{ - expr::__this->__main(); - return hpx::finalize(); +int hpx_main(int argc, char *argv[]) { + expr::__this->__main(); + return hpx::finalize(); } -int main(int argc, char* argv[]) -{ - chplx::registerModule(); - return hpx::init(argc, argv); +int main(int argc, char *argv[]) { + chplx::registerModule(); + return hpx::init(argc, argv); } diff --git a/backend/test/expr/expr_driver.hpp.good b/backend/test/expr/expr_driver.hpp.good index 821b68d0..159f3782 100644 --- a/backend/test/expr/expr_driver.hpp.good +++ b/backend/test/expr/expr_driver.hpp.good @@ -6,7 +6,7 @@ #ifndef __EXPR_DRIVER_HPP__ #define __EXPR_DRIVER_HPP__ -#include #include "expr.hpp" +#include #endif diff --git a/backend/test/fn/fn.cpp.good b/backend/test/fn/fn.cpp.good index 5c40819e..5de665a2 100644 --- a/backend/test/fn/fn.cpp.good +++ b/backend/test/fn/fn.cpp.good @@ -5,33 +5,32 @@ namespace fn { - struct __thisModule* __this = nullptr; +struct __thisModule *__this = nullptr; -#line 11 "../../backend/test/fn.chpl" - void __thisModule::print() - { -#line 12 "../../backend/test/fn.chpl" - std::int64_t j; -#line 13 "../../backend/test/fn.chpl" - std::int64_t i = 1; -#line 14 "../../backend/test/fn.chpl" - bool k = true; -#line 15 "../../backend/test/fn.chpl" - double l = 1.000000; -#line 16 "../../backend/test/fn.chpl" - bool m; -#line 17 "../../backend/test/fn.chpl" - double n; -#line 18 "../../backend/test/fn.chpl" - std::cout << "a" << std::endl; -#line 19 "../../backend/test/fn.chpl" - std::cout << i << std::endl; -#line 20 "../../backend/test/fn.chpl" - std::cout << i << std::endl; -#line 21 "../../backend/test/fn.chpl" - std::cout << i << l << std::endl; - }; +#line 11 "fn.chpl" +void __thisModule::print() { +#line 12 "fn.chpl" + std::int64_t j; +#line 13 "fn.chpl" + std::int64_t i = 1; +#line 14 "fn.chpl" + bool k = true; +#line 15 "fn.chpl" + double l = 1.000000; +#line 16 "fn.chpl" + bool m; +#line 17 "fn.chpl" + double n; +#line 18 "fn.chpl" + std::cout << "a" << std::endl; +#line 19 "fn.chpl" + std::cout << i << std::endl; +#line 20 "fn.chpl" + std::cout << i << std::endl; +#line 21 "fn.chpl" + std::cout << i << l << std::endl; +}; - void __thisModule::__main() {} +void __thisModule::__main() {} -} // namespace fn \ No newline at end of file +} // namespace fn \ No newline at end of file diff --git a/backend/test/fn/fn.hpp.good b/backend/test/fn/fn.hpp.good index 8f600b40..70c040be 100644 --- a/backend/test/fn/fn.hpp.good +++ b/backend/test/fn/fn.hpp.good @@ -9,30 +9,26 @@ #include #include #include -#line 1 "../../backend/test/fn.chpl" +#line 1 "fn.chpl" namespace fn { - extern struct __thisModule* __this; +extern struct __thisModule *__this; - struct __thisModule - { -#line 11 "../../backend/test/fn.chpl" - void print(); +struct __thisModule { - static void __construct() - { - fn::__this = new __thisModule(); - } +#line 11 "fn.chpl" + void print(); - static void __destruct() noexcept - { - auto* m = fn::__this; - fn::__this = nullptr; - delete m; - } + static void __construct() { fn::__this = new __thisModule(); } - void __main(); - }; // end struct __thisModule + static void __destruct() noexcept { + auto *m = fn::__this; + fn::__this = nullptr; + delete m; + } -} // namespace fn + void __main(); +}; // end struct __thisModule + +} // namespace fn #endif diff --git a/backend/test/fn/fn_driver.cpp.good b/backend/test/fn/fn_driver.cpp.good index 1e65db5f..abcb6feb 100644 --- a/backend/test/fn/fn_driver.cpp.good +++ b/backend/test/fn/fn_driver.cpp.good @@ -7,14 +7,12 @@ using namespace fn; -int hpx_main(int argc, char* argv[]) -{ - fn::__this->__main(); - return hpx::finalize(); +int hpx_main(int argc, char *argv[]) { + fn::__this->__main(); + return hpx::finalize(); } -int main(int argc, char* argv[]) -{ - chplx::registerModule(); - return hpx::init(argc, argv); +int main(int argc, char *argv[]) { + chplx::registerModule(); + return hpx::init(argc, argv); } diff --git a/backend/test/fn/fn_driver.hpp.good b/backend/test/fn/fn_driver.hpp.good index 2795b193..c887395a 100644 --- a/backend/test/fn/fn_driver.hpp.good +++ b/backend/test/fn/fn_driver.hpp.good @@ -6,7 +6,7 @@ #ifndef __FN_DRIVER_HPP__ #define __FN_DRIVER_HPP__ -#include #include "fn.hpp" +#include #endif diff --git a/backend/test/fnc/fnc.cpp.good b/backend/test/fnc/fnc.cpp.good index ac4ad747..e894af30 100644 --- a/backend/test/fnc/fnc.cpp.good +++ b/backend/test/fnc/fnc.cpp.good @@ -5,39 +5,36 @@ namespace fnc { - struct __thisModule* __this = nullptr; - -#line 1 "../../backend/test/fnc.chpl" - void __thisModule::alpha() - { -#line 2 "../../backend/test/fnc.chpl" - std::int64_t a; - }; - -#line 7 "../../backend/test/fnc.chpl" - std::int64_t __thisModule::delta(std::int64_t c) - { -#line 8 "../../backend/test/fnc.chpl" - return c; - }; - -#line 11 "../../backend/test/fnc.chpl" - std::int64_t __thisModule::beta(std::int64_t b) - { -#line 12 "../../backend/test/fnc.chpl" - return b + delta(b); - }; - - void __thisModule::__main() - { -#line 5 "../../backend/test/fnc.chpl" - alpha(); -#line 15 "../../backend/test/fnc.chpl" - std::int64_t c = 1; -#line 16 "../../backend/test/fnc.chpl" - beta(c); -#line 17 "../../backend/test/fnc.chpl" - c = beta(c); - } - -} // namespace fnc \ No newline at end of file +struct __thisModule *__this = nullptr; + +#line 1 "fnc.chpl" +void __thisModule::alpha() { +#line 2 "fnc.chpl" + std::int64_t a; +}; + +#line 7 "fnc.chpl" +std::int64_t __thisModule::delta(std::int64_t c) { +#line 8 "fnc.chpl" + return c; +}; + +#line 11 "fnc.chpl" +std::int64_t __thisModule::beta(std::int64_t b) { +#line 12 "fnc.chpl" + return b + delta(b); +}; + +void __thisModule::__main() { + +#line 5 "fnc.chpl" + alpha(); +#line 15 "fnc.chpl" + std::int64_t c = 1; +#line 16 "fnc.chpl" + beta(c); +#line 17 "fnc.chpl" + c = beta(c); +} + +} // namespace fnc \ No newline at end of file diff --git a/backend/test/fnc/fnc.hpp.good b/backend/test/fnc/fnc.hpp.good index 13700521..ab6b9f59 100644 --- a/backend/test/fnc/fnc.hpp.good +++ b/backend/test/fnc/fnc.hpp.good @@ -8,34 +8,30 @@ #include #include -#line 1 "../../backend/test/fnc.chpl" +#line 1 "fnc.chpl" namespace fnc { - extern struct __thisModule* __this; - - struct __thisModule - { -#line 1 "../../backend/test/fnc.chpl" - void alpha(); -#line 7 "../../backend/test/fnc.chpl" - std::int64_t delta(std::int64_t c); -#line 11 "../../backend/test/fnc.chpl" - std::int64_t beta(std::int64_t b); - - static void __construct() - { - fnc::__this = new __thisModule(); - } - - static void __destruct() noexcept - { - auto* m = fnc::__this; - fnc::__this = nullptr; - delete m; - } - - void __main(); - }; // end struct __thisModule - -} // namespace fnc +extern struct __thisModule *__this; + +struct __thisModule { + +#line 1 "fnc.chpl" + void alpha(); +#line 7 "fnc.chpl" + std::int64_t delta(std::int64_t c); +#line 11 "fnc.chpl" + std::int64_t beta(std::int64_t b); + + static void __construct() { fnc::__this = new __thisModule(); } + + static void __destruct() noexcept { + auto *m = fnc::__this; + fnc::__this = nullptr; + delete m; + } + + void __main(); +}; // end struct __thisModule + +} // namespace fnc #endif diff --git a/backend/test/fnc/fnc_driver.cpp.good b/backend/test/fnc/fnc_driver.cpp.good index b7a882ef..34db5d0d 100644 --- a/backend/test/fnc/fnc_driver.cpp.good +++ b/backend/test/fnc/fnc_driver.cpp.good @@ -7,14 +7,12 @@ using namespace fnc; -int hpx_main(int argc, char* argv[]) -{ - fnc::__this->__main(); - return hpx::finalize(); +int hpx_main(int argc, char *argv[]) { + fnc::__this->__main(); + return hpx::finalize(); } -int main(int argc, char* argv[]) -{ - chplx::registerModule(); - return hpx::init(argc, argv); +int main(int argc, char *argv[]) { + chplx::registerModule(); + return hpx::init(argc, argv); } diff --git a/backend/test/fnc/fnc_driver.hpp.good b/backend/test/fnc/fnc_driver.hpp.good index 999c6d9b..2618b3e5 100644 --- a/backend/test/fnc/fnc_driver.hpp.good +++ b/backend/test/fnc/fnc_driver.hpp.good @@ -6,7 +6,7 @@ #ifndef __FNC_DRIVER_HPP__ #define __FNC_DRIVER_HPP__ -#include #include "fnc.hpp" +#include #endif diff --git a/backend/test/forall/forall.cpp.good b/backend/test/forall/forall.cpp.good index 1c90e90d..cd6bdf5f 100644 --- a/backend/test/forall/forall.cpp.good +++ b/backend/test/forall/forall.cpp.good @@ -5,75 +5,74 @@ namespace forall { - struct __thisModule* __this = nullptr; +struct __thisModule *__this = nullptr; -#line 19 "../../backend/test/forall.chpl" - void __thisModule::alpha() - { -#line 20 "../../backend/test/forall.chpl" - std::vector B(9); -#line 21 "../../backend/test/forall.chpl" - chplx::forLoop(chplx::Range{0, 9}, [&](auto i) { -#line 22 "../../backend/test/forall.chpl" - B[i] = 1.000000; - }); -#line 24 "../../backend/test/forall.chpl" - chplx::forall(chplx::Range{0, 9}, [&](auto i) { -#line 25 "../../backend/test/forall.chpl" - B[i] = 1.000000; - }); - }; +#line 19 "forall.chpl" +void __thisModule::alpha() { +#line 20 "forall.chpl" + std::vector B(9); +#line 21 "forall.chpl" + chplx::forLoop(chplx::Range{0, 9}, [&](auto i) { +#line 22 "forall.chpl" + B[i] = 1.000000; + }); +#line 24 "forall.chpl" + chplx::forall(chplx::Range{0, 9}, [&](auto i) { +#line 25 "forall.chpl" + B[i] = 1.000000; + }); +}; - void __thisModule::__main() - { -#line 8 "../../backend/test/forall.chpl" - std::vector A(9); -#line 10 "../../backend/test/forall.chpl" - chplx::forLoop(chplx::Range{0, 9}, [&](auto i) { -#line 11 "../../backend/test/forall.chpl" - A[i] = i; -#line 12 "../../backend/test/forall.chpl" - std::cout << i << std::endl; - }); -#line 15 "../../backend/test/forall.chpl" - chplx::forall(chplx::Range{0, 9}, [&](auto i) { -#line 16 "../../backend/test/forall.chpl" - A[i] = 1.000000; - }); -#line 29 "../../backend/test/forall.chpl" - chplx::forLoop(chplx::Range{0, 9}, [&](auto i) { -#line 30 "../../backend/test/forall.chpl" - A[i] = i; - }); -#line 32 "../../backend/test/forall.chpl" - chplx::forall(chplx::Range{0, 9}, [&](auto i) { -#line 33 "../../backend/test/forall.chpl" - A[i] = i; - }); -#line 35 "../../backend/test/forall.chpl" - std::vector B(2); -#line 36 "../../backend/test/forall.chpl" - chplx::coforall(chplx::Range{0, 2}, [&](auto tid) { -#line 37 "../../backend/test/forall.chpl" - B[tid] = tid; - }); -#line 40 "../../backend/test/forall.chpl" - chplx::forLoop(chplx::Range{0, 2}, [&](auto i) { -#line 41 "../../backend/test/forall.chpl" - std::cout << B[i] << std::endl; - }); -#line 43 "../../backend/test/forall.chpl" - std::vector C(2); -#line 44 "../../backend/test/forall.chpl" - chplx::coforall(chplx::Range{0, 2}, [&](auto tid) { -#line 45 "../../backend/test/forall.chpl" - C[tid] = tid; - }); -#line 47 "../../backend/test/forall.chpl" - chplx::forLoop(chplx::Range{0, 2}, [&](auto i) { -#line 48 "../../backend/test/forall.chpl" - std::cout << C[i] << std::endl; - }); - } +void __thisModule::__main() { -} // namespace forall \ No newline at end of file +#line 8 "forall.chpl" + std::vector A(9); +#line 10 "forall.chpl" + chplx::forLoop(chplx::Range{0, 9}, [&](auto i) { +#line 11 "forall.chpl" + A[i] = i; +#line 12 "forall.chpl" + std::cout << i << std::endl; + }); +#line 15 "forall.chpl" + chplx::forall(chplx::Range{0, 9}, [&](auto i) { +#line 16 "forall.chpl" + A[i] = 1.000000; + }); +#line 29 "forall.chpl" + chplx::forLoop(chplx::Range{0, 9}, [&](auto i) { +#line 30 "forall.chpl" + A[i] = i; + }); +#line 32 "forall.chpl" + chplx::forall(chplx::Range{0, 9}, [&](auto i) { +#line 33 "forall.chpl" + A[i] = i; + }); +#line 35 "forall.chpl" + std::vector B(2); +#line 36 "forall.chpl" + chplx::coforall(chplx::Range{0, 2}, [&](auto tid) { +#line 37 "forall.chpl" + B[tid] = tid; + }); +#line 40 "forall.chpl" + chplx::forLoop(chplx::Range{0, 2}, [&](auto i) { +#line 41 "forall.chpl" + std::cout << B[i] << std::endl; + }); +#line 43 "forall.chpl" + std::vector C(2); +#line 44 "forall.chpl" + chplx::coforall(chplx::Range{0, 2}, [&](auto tid) { +#line 45 "forall.chpl" + C[tid] = tid; + }); +#line 47 "forall.chpl" + chplx::forLoop(chplx::Range{0, 2}, [&](auto i) { +#line 48 "forall.chpl" + std::cout << C[i] << std::endl; + }); +} + +} // namespace forall \ No newline at end of file diff --git a/backend/test/forall/forall.hpp.good b/backend/test/forall/forall.hpp.good index eab975e8..f57af9f9 100644 --- a/backend/test/forall/forall.hpp.good +++ b/backend/test/forall/forall.hpp.good @@ -10,30 +10,26 @@ #include #include #include -#line 1 "../../backend/test/forall.chpl" +#line 1 "forall.chpl" namespace forall { - extern struct __thisModule* __this; +extern struct __thisModule *__this; - struct __thisModule - { -#line 19 "../../backend/test/forall.chpl" - void alpha(); +struct __thisModule { - static void __construct() - { - forall::__this = new __thisModule(); - } +#line 19 "forall.chpl" + void alpha(); - static void __destruct() noexcept - { - auto* m = forall::__this; - forall::__this = nullptr; - delete m; - } + static void __construct() { forall::__this = new __thisModule(); } - void __main(); - }; // end struct __thisModule + static void __destruct() noexcept { + auto *m = forall::__this; + forall::__this = nullptr; + delete m; + } -} // namespace forall + void __main(); +}; // end struct __thisModule + +} // namespace forall #endif diff --git a/backend/test/forall/forall_driver.cpp.good b/backend/test/forall/forall_driver.cpp.good index 93c7380c..0296faf4 100644 --- a/backend/test/forall/forall_driver.cpp.good +++ b/backend/test/forall/forall_driver.cpp.good @@ -7,14 +7,12 @@ using namespace forall; -int hpx_main(int argc, char* argv[]) -{ - forall::__this->__main(); - return hpx::finalize(); +int hpx_main(int argc, char *argv[]) { + forall::__this->__main(); + return hpx::finalize(); } -int main(int argc, char* argv[]) -{ - chplx::registerModule(); - return hpx::init(argc, argv); +int main(int argc, char *argv[]) { + chplx::registerModule(); + return hpx::init(argc, argv); } diff --git a/backend/test/forall/forall_driver.hpp.good b/backend/test/forall/forall_driver.hpp.good index 484c9af8..cbd52824 100644 --- a/backend/test/forall/forall_driver.hpp.good +++ b/backend/test/forall/forall_driver.hpp.good @@ -6,7 +6,7 @@ #ifndef __FORALL_DRIVER_HPP__ #define __FORALL_DRIVER_HPP__ -#include #include "forall.hpp" +#include #endif diff --git a/library/include/chplx/dmap.hpp b/library/include/chplx/dmap.hpp index c51a58da..59702342 100644 --- a/library/include/chplx/dmap.hpp +++ b/library/include/chplx/dmap.hpp @@ -93,7 +93,7 @@ struct BaseArray { //----------------------------------------------------------------------------- // GlobalDistribution defines the Domain map Standard Interface (DSI) This class -// is visible to the users of the domain map: the dmap wrapper in Chapel’s +// is visible to the users of the domain map: the dmap wrapper in Chapel's // dmapped clauses wraps instances of this class. This class must be a subclass // of BaseDist. template struct GlobalDistribution : BaseDist {