diff --git a/cmake/HPX_AddConfigTest.cmake b/cmake/HPX_AddConfigTest.cmake index 881fe51b1610..d3adb881c377 100644 --- a/cmake/HPX_AddConfigTest.cmake +++ b/cmake/HPX_AddConfigTest.cmake @@ -4,7 +4,7 @@ # Copyright (c) 2017 Google # Copyright (c) 2017 Taeguk Kwon # Copyright (c) 2020 Giannis Gonidelis -# Copyright (c) 2021-2022 Hartmut Kaiser +# Copyright (c) 2021-2024 Hartmut Kaiser # # SPDX-License-Identifier: BSL-1.0 # Distributed under the Boost Software License, Version 1.0. (See accompanying @@ -373,7 +373,7 @@ endfunction() function(hpx_check_for_cxx14_delete_operator_with_size) add_hpx_config_test( HPX_WITH_CXX14_DELETE_OPERATOR_WITH_SIZE - SOURCE cmake/tests/cxx_14_delete_operator_with_size.cpp + SOURCE cmake/tests/cxx14_delete_operator_with_size.cpp FILE ${ARGN} ) endfunction() @@ -669,51 +669,6 @@ function(hpx_check_for_cxx_lambda_capture_decltype) ) endfunction() -# ############################################################################## -function(hpx_check_for_builtin_integer_pack) - add_hpx_config_test( - HPX_WITH_BUILTIN_INTEGER_PACK - SOURCE cmake/tests/builtin_integer_pack.cpp - FILE ${ARGN} - ) -endfunction() - -# ############################################################################## -function(hpx_check_for_builtin_make_integer_seq) - add_hpx_config_test( - HPX_WITH_BUILTIN_MAKE_INTEGER_SEQ - SOURCE cmake/tests/builtin_make_integer_seq.cpp - FILE ${ARGN} - ) -endfunction() - -# ############################################################################## -function(hpx_check_for_builtin_make_integer_seq_cuda) - add_hpx_config_test( - HPX_WITH_BUILTIN_MAKE_INTEGER_SEQ_CUDA - SOURCE cmake/tests/builtin_make_integer_seq.cu CUDA - FILE ${ARGN} - ) -endfunction() - -# ############################################################################## -function(hpx_check_for_builtin_type_pack_element) - add_hpx_config_test( - HPX_WITH_BUILTIN_TYPE_PACK_ELEMENT - SOURCE cmake/tests/builtin_type_pack_element.cpp - FILE ${ARGN} - ) -endfunction() - -# ############################################################################## -function(hpx_check_for_builtin_type_pack_element_cuda) - add_hpx_config_test( - HPX_WITH_BUILTIN_TYPE_PACK_ELEMENT_CUDA - SOURCE cmake/tests/builtin_type_pack_element.cu CUDA - FILE ${ARGN} - ) -endfunction() - # ############################################################################## function(hpx_check_for_mm_prefetch) add_hpx_config_test( diff --git a/cmake/HPX_PerformCxxFeatureTests.cmake b/cmake/HPX_PerformCxxFeatureTests.cmake index ea43a3bb1a76..2e9d02eb8de6 100644 --- a/cmake/HPX_PerformCxxFeatureTests.cmake +++ b/cmake/HPX_PerformCxxFeatureTests.cmake @@ -169,29 +169,6 @@ function(hpx_perform_cxx_feature_tests) DEFINITIONS HPX_HAVE_CXX_LAMBDA_CAPTURE_DECLTYPE ) - # Check the availability of certain C++ builtins - hpx_check_for_builtin_integer_pack(DEFINITIONS HPX_HAVE_BUILTIN_INTEGER_PACK) - - hpx_check_for_builtin_make_integer_seq( - DEFINITIONS HPX_HAVE_BUILTIN_MAKE_INTEGER_SEQ - ) - - if(HPX_WITH_CUDA) - hpx_check_for_builtin_make_integer_seq_cuda( - DEFINITIONS HPX_HAVE_BUILTIN_MAKE_INTEGER_SEQ_CUDA - ) - endif() - - hpx_check_for_builtin_type_pack_element( - DEFINITIONS HPX_HAVE_BUILTIN_TYPE_PACK_ELEMENT - ) - - if(HPX_WITH_CUDA) - hpx_check_for_builtin_type_pack_element_cuda( - DEFINITIONS HPX_HAVE_BUILTIN_TYPE_PACK_ELEMENT_CUDA - ) - endif() - hpx_check_for_builtin_forward_move(DEFINITIONS HPX_HAVE_BUILTIN_FORWARD_MOVE) endfunction() diff --git a/cmake/tests/builtin_integer_pack.cpp b/cmake/tests/builtin_integer_pack.cpp deleted file mode 100644 index ced395b75e56..000000000000 --- a/cmake/tests/builtin_integer_pack.cpp +++ /dev/null @@ -1,31 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2020 Agustin Berge -// -// SPDX-License-Identifier: BSL-1.0 -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -//////////////////////////////////////////////////////////////////////////////// - -#include -#include - -template -struct pack_c -{ -}; - -template -void test() -{ - static_assert(std::is_same_v, - pack_c>); - static_assert(std::is_same_v, - pack_c>); - static_assert(std::is_same_v, - pack_c>); -} - -int main() -{ - test(); -} diff --git a/cmake/tests/builtin_make_integer_seq.cpp b/cmake/tests/builtin_make_integer_seq.cpp deleted file mode 100644 index d9e602cf900c..000000000000 --- a/cmake/tests/builtin_make_integer_seq.cpp +++ /dev/null @@ -1,31 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2020 Agustin Berge -// -// SPDX-License-Identifier: BSL-1.0 -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -//////////////////////////////////////////////////////////////////////////////// - -#include -#include - -template -struct pack_c -{ -}; - -template -void test() -{ - static_assert(std::is_same_v<__make_integer_seq, - pack_c>); - static_assert(std::is_same_v<__make_integer_seq, - pack_c>); - static_assert(std::is_same_v<__make_integer_seq, - pack_c>); -} - -int main() -{ - test(); -} diff --git a/cmake/tests/builtin_make_integer_seq.cu b/cmake/tests/builtin_make_integer_seq.cu deleted file mode 100644 index de0ba3748244..000000000000 --- a/cmake/tests/builtin_make_integer_seq.cu +++ /dev/null @@ -1,9 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2020 Agustin Berge -// -// SPDX-License-Identifier: BSL-1.0 -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -//////////////////////////////////////////////////////////////////////////////// - -#include "builtin_make_integer_seq.cpp" diff --git a/cmake/tests/builtin_type_pack_element.cpp b/cmake/tests/builtin_type_pack_element.cpp deleted file mode 100644 index 3965459051bb..000000000000 --- a/cmake/tests/builtin_type_pack_element.cpp +++ /dev/null @@ -1,26 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2020 Agustin Berge -// -// SPDX-License-Identifier: BSL-1.0 -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -//////////////////////////////////////////////////////////////////////////////// - -#include -#include - -template -void test() -{ - static_assert(std::is_same_v<__type_pack_element<0, Ts...>, - typename std::tuple_element<0, std::tuple>::type>); - static_assert(std::is_same_v<__type_pack_element<1, Ts...>, - typename std::tuple_element<1, std::tuple>::type>); - static_assert(std::is_same_v<__type_pack_element<2, Ts...>, - typename std::tuple_element<2, std::tuple>::type>); -} - -int main() -{ - test(); -} diff --git a/cmake/tests/builtin_type_pack_element.cu b/cmake/tests/builtin_type_pack_element.cu deleted file mode 100644 index 067f276e6531..000000000000 --- a/cmake/tests/builtin_type_pack_element.cu +++ /dev/null @@ -1,9 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2020 Agustin Berge -// -// SPDX-License-Identifier: BSL-1.0 -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -//////////////////////////////////////////////////////////////////////////////// - -#include "builtin_type_pack_element.cpp" diff --git a/cmake/tests/cxx_14_delete_operator_with_size.cpp b/cmake/tests/cxx14_delete_operator_with_size.cpp similarity index 100% rename from cmake/tests/cxx_14_delete_operator_with_size.cpp rename to cmake/tests/cxx14_delete_operator_with_size.cpp diff --git a/libs/core/type_support/include/hpx/type_support/pack.hpp b/libs/core/type_support/include/hpx/type_support/pack.hpp index 47442f02c10d..93c5657d0dc1 100644 --- a/libs/core/type_support/include/hpx/type_support/pack.hpp +++ b/libs/core/type_support/include/hpx/type_support/pack.hpp @@ -1,4 +1,5 @@ // Copyright (c) 2014-2020 Agustin Berge +// Copyright (c) 2024 Hartmut Kaiser // // SPDX-License-Identifier: BSL-1.0 // Distributed under the Boost Software License, Version 1.0. (See accompanying @@ -45,17 +46,8 @@ namespace hpx::util { template struct make_index_pack -#if defined(HPX_HAVE_BUILTIN_INTEGER_PACK) - : index_pack<__integer_pack(N)...> -#elif (defined(HPX_HAVE_BUILTIN_MAKE_INTEGER_SEQ) && \ - !defined(HPX_COMPUTE_DEVICE_CODE)) || \ - (defined(HPX_HAVE_BUILTIN_MAKE_INTEGER_SEQ_CUDA) && \ - defined(HPX_COMPUTE_DEVICE_CODE)) - : __make_integer_seq -#else : detail::make_index_pack_join::type, typename make_index_pack::type> -#endif { }; @@ -168,21 +160,6 @@ namespace hpx::util { { }; -#if (defined(HPX_HAVE_BUILTIN_TYPE_PACK_ELEMENT) && \ - !defined(HPX_COMPUTE_DEVICE_CODE)) || \ - (defined(HPX_HAVE_BUILTIN_TYPE_PACK_ELEMENT_CUDA) && \ - defined(HPX_COMPUTE_DEVICE_CODE)) - template - struct at_index_impl : empty_helper - { - }; - - template - struct at_index_impl, /*InBounds*/ true> - { - using type = __type_pack_element; - }; -#else template struct indexed { @@ -210,7 +187,6 @@ namespace hpx::util { indexer>())) { }; -#endif } // namespace detail template