public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Delegate PSTL configuration to pstl/pstl_config.h
@ 2019-04-19  0:29 Thomas Rodgers
  2019-04-19 21:36 ` Jonathan Wakely
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Rodgers @ 2019-04-19  0:29 UTC (permalink / raw)
  To: libstdc++, gcc-patches List

[-- Attachment #1: Type: text/plain, Size: 121 bytes --]


	 * include/bits/c++config: Remove explicit PSTL configuration
	 macros and use definitions from <pstl/pstl_config.h>.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Delegate-PSTL-configuration-to-pstl-pstl_config.h.patch --]
[-- Type: text/x-patch, Size: 4234 bytes --]

From 198662c6e2ee6b1a6b363c2a515c05ef1ca949bd Mon Sep 17 00:00:00 2001
From: Thomas Rodgers <trodgers@redhat.com>
Date: Thu, 18 Apr 2019 16:55:40 -0700
Subject: [PATCH] Delegate PSTL configuration to pstl/pstl_config.h

	 * include/bits/c++config: Remove explicit PSTL configuration
	 macros and use definitions from <pstl/pstl_config.h>.
---
 libstdc++-v3/include/bits/c++config | 82 +----------------------------
 1 file changed, 1 insertion(+), 81 deletions(-)

diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config
index ef8ba96737b..5016f4853de 100644
--- a/libstdc++-v3/include/bits/c++config
+++ b/libstdc++-v3/include/bits/c++config
@@ -682,90 +682,10 @@ namespace std
 #  define __PSTL_USE_PAR_POLICIES 1
 # endif
 
-# if __PSTL_USE_PAR_POLICIES
-#  if !defined(__PSTL_PAR_BACKEND_TBB)
-#   define __PSTL_PAR_BACKEND_TBB 1
-#  endif
-# else
-#  undef __PSTL_PAR_BACKEND_TBB
-# endif
-
 # define __PSTL_ASSERT(_Condition) __glibcxx_assert(_Condition)
 # define __PSTL_ASSERT_MSG(_Condition, _Message) __glibcxx_assert(_Condition)
 
-
-# define __PSTL_PRAGMA(x) _Pragma (#x)
-
-# define __PSTL_STRING_AUX(x) #x
-# define __PSTL_STRING(x) __PSTL_STRING_AUX(x)
-# define __PSTL_STRING_CONCAT(x, y) x#y
-
-# define __PSTL_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + \
-			     __GNUC_PATCHLEVEL__)
-
-// Enable SIMD for compilers that support OpenMP 4.0
-# if (__PSTL_GCC_VERSION >= 40900)
-#  define __PSTL_PRAGMA_SIMD __PSTL_PRAGMA(omp simd)
-#define __PSTL_PRAGMA_DECLARE_SIMD __PSTL_PRAGMA(omp declare simd)
-#  define __PSTL_PRAGMA_SIMD_REDUCTION(PRM) __PSTL_PRAGMA(omp simd reduction(PRM))
-# else //no simd
-#  define __PSTL_PRAGMA_SIMD
-#  define __PSTL_PRAGMA_SIMD_REDUCTION(PRM)
-# endif //Enable SIMD
-
-#define __PSTL_PRAGMA_SIMD_SCAN(PRM)
-#define __PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN(PRM)
-#define __PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN(PRM)
-
-#define __PSTL_PRAGMA_FORCEINLINE
-
-// Should be defined to 1 for environments with a vendor implementation
-// of C++17 execution policies
-// #define __PSTL_CPP17_EXECUTION_POLICIES_PRESENT (_MSC_VER >= 1912)
-// TODO define libstdc++ policies
-
-# define __PSTL_CPP14_2RANGE_MISMATCH_EQUAL_PRESENT \
-  (__cplusplus >= 201300L || __cpp_lib_robust_nonmodifying_seq_ops == 201304)
-# define __PSTL_CPP14_MAKE_REVERSE_ITERATOR_PRESENT \
-  (__cplusplus >= 201402L || __cpp_lib_make_reverse_iterator == 201402)
-# define __PSTL_CPP14_INTEGER_SEQUENCE_PRESENT (__cplusplus >= 201402L)
-# define __PSTL_CPP14_VARIABLE_TEMPLATES_PRESENT (__cplusplus >= 201402L)
-
-# if __PSTL_MONOTONIC_PRESENT
-#  define __PSTL_PRAGMA_SIMD_ORDERED_MONOTONIC(PRM) \
-  __PSTL_PRAGMA(omp ordered simd monotonic(PRM))
-#  define __PSTL_PRAGMA_SIMD_ORDERED_MONOTONIC_2ARGS(PRM1, PRM2) \
-  __PSTL_PRAGMA(omp ordered simd monotonic(PRM1, PRM2))
-# else
-#  define __PSTL_PRAGMA_SIMD_ORDERED_MONOTONIC(PRM)
-#  define __PSTL_PRAGMA_SIMD_ORDERED_MONOTONIC_2ARGS(PRM1, PRM2)
-# endif
-
-// Declaration of reduction functor, where
-// NAME - the name of the functor
-// OP - type of the callable object with the reduction operation
-// omp_in - refers to the local partial result
-// omp_out - refers to the final value of the combiner operator
-// omp_priv - refers to the private copy of the initial value
-// omp_orig - refers to the original variable to be reduced
-#define __PSTL_PRAGMA_DECLARE_REDUCTION(NAME, OP)                                                                      \
-    __PSTL_PRAGMA(omp declare reduction(NAME : OP : omp_out(omp_in)) initializer(omp_priv = omp_orig))
-
-# define __PSTL_PRAGMA_VECTOR_UNALIGNED
-# define __PSTL_USE_NONTEMPORAL_STORES_IF_ALLOWED
-# define __PSTL_PRAGMA_LOCATION
-
-# define __PSTL_PRAGMA_MESSAGE_IMPL(x) \
-  __PSTL_PRAGMA(message(__PSTL_STRING_CONCAT(__PSTL_PRAGMA_LOCATION, x)))
-# define __PSTL_PRAGMA_MESSAGE_POLICIES(x) __PSTL_PRAGMA_MESSAGE_IMPL(x)
-
-//Too many warnings in output, switched off
-# define __PSTL_PRAGMA_MESSAGE(x)
-
-# if defined(__GLIBCXX__)
-#  define __PSTL_CPP11_STD_ROTATE_BROKEN \
-  (__PSTL_GCC_VERSION < 50100) //GCC 5.1 release
-# endif
+#include <pstl/pstl_config.h>
 
 #endif
 // End of prewritten config; the settings discovered at configure time follow.
-- 
2.20.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Delegate PSTL configuration to pstl/pstl_config.h
  2019-04-19  0:29 [PATCH] Delegate PSTL configuration to pstl/pstl_config.h Thomas Rodgers
@ 2019-04-19 21:36 ` Jonathan Wakely
  2019-04-21  2:06   ` Thomas Rodgers
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Wakely @ 2019-04-19 21:36 UTC (permalink / raw)
  To: Thomas Rodgers; +Cc: libstdc++, gcc-patches List

On 18/04/19 17:02 -0700, Thomas Rodgers wrote:
>
>	 * include/bits/c++config: Remove explicit PSTL configuration
>	 macros and use definitions from <pstl/pstl_config.h>.

OK for trunk, thanks.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Delegate PSTL configuration to pstl/pstl_config.h
  2019-04-19 21:36 ` Jonathan Wakely
@ 2019-04-21  2:06   ` Thomas Rodgers
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Rodgers @ 2019-04-21  2:06 UTC (permalink / raw)
  To: libstdc++, gcc-patches List


Jonathan Wakely writes:

> On 18/04/19 17:02 -0700, Thomas Rodgers wrote:
>>
>>	 * include/bits/c++config: Remove explicit PSTL configuration
>>	 macros and use definitions from <pstl/pstl_config.h>.
>
> OK for trunk, thanks.

Tested x86_64-linux-gnu, committed to trunk.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-04-20 23:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-19  0:29 [PATCH] Delegate PSTL configuration to pstl/pstl_config.h Thomas Rodgers
2019-04-19 21:36 ` Jonathan Wakely
2019-04-21  2:06   ` Thomas Rodgers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).