public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Clean up non-conforming names
@ 2019-05-31 20:50 Thomas Rodgers
  2019-06-01  0:15 ` Thomas Rodgers
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Rodgers @ 2019-05-31 20:50 UTC (permalink / raw)
  To: gcc-patches, libstdc++


	* include/pstl/algorithm_impl.h (__parallel_set_union_op):
	Uglfiy copy_range1 and copy_range2
	* include/pstl/parallel_backend_tbb.h (struct __binary_no_op):
	Rename parameter _T to _Tp.
---
 libstdc++-v3/include/pstl/algorithm_impl.h       | 16 ++++++++--------
 libstdc++-v3/include/pstl/parallel_backend_tbb.h |  4 ++--
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/libstdc++-v3/include/pstl/algorithm_impl.h b/libstdc++-v3/include/pstl/algorithm_impl.h
index 3491e002c94..a224b2b3633 100644
--- a/libstdc++-v3/include/pstl/algorithm_impl.h
+++ b/libstdc++-v3/include/pstl/algorithm_impl.h
@@ -2855,22 +2855,22 @@ __parallel_set_union_op(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _
     const auto __n1 = __last1 - __first1;
     const auto __n2 = __last2 - __first2;
 
-    auto copy_range1 = [__is_vector](_ForwardIterator1 __begin, _ForwardIterator1 __end, _OutputIterator __res) {
+    auto __copy_range1 = [__is_vector](_ForwardIterator1 __begin, _ForwardIterator1 __end, _OutputIterator __res) {
         return __internal::__brick_copy(__begin, __end, __res, __is_vector);
     };
-    auto copy_range2 = [__is_vector](_ForwardIterator2 __begin, _ForwardIterator2 __end, _OutputIterator __res) {
+    auto __copy_range2 = [__is_vector](_ForwardIterator2 __begin, _ForwardIterator2 __end, _OutputIterator __res) {
         return __internal::__brick_copy(__begin, __end, __res, __is_vector);
     };
 
     // {1} {}: parallel copying just first sequence
     if (__n2 == 0)
         return __internal::__pattern_walk2_brick(std::forward<_ExecutionPolicy>(__exec), __first1, __last1, __result,
-                                                 copy_range1, std::true_type());
+                                                 __copy_range1, std::true_type());
 
     // {} {2}: parallel copying justmake  second sequence
     if (__n1 == 0)
         return __internal::__pattern_walk2_brick(std::forward<_ExecutionPolicy>(__exec), __first2, __last2, __result,
-                                                 copy_range2, std::true_type());
+                                                 __copy_range2, std::true_type());
 
     // testing  whether the sequences are intersected
     _ForwardIterator1 __left_bound_seq_1 = std::lower_bound(__first1, __last1, *__first2, __comp);
@@ -2882,7 +2882,7 @@ __parallel_set_union_op(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _
             std::forward<_ExecutionPolicy>(__exec),
             [=] {
                 __internal::__pattern_walk2_brick(std::forward<_ExecutionPolicy>(__exec), __first1, __last1, __result,
-                                                  copy_range1, std::true_type());
+                                                  __copy_range1, std::true_type());
             },
             [=] {
                 __internal::__pattern_walk2_brick(std::forward<_ExecutionPolicy>(__exec), __first2, __last2,
@@ -2901,7 +2901,7 @@ __parallel_set_union_op(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _
             std::forward<_ExecutionPolicy>(__exec),
             [=] {
                 __internal::__pattern_walk2_brick(std::forward<_ExecutionPolicy>(__exec), __first2, __last2, __result,
-                                                  copy_range2, std::true_type());
+                                                  __copy_range2, std::true_type());
             },
             [=] {
                 __internal::__pattern_walk2_brick(std::forward<_ExecutionPolicy>(__exec), __first1, __last1,
@@ -2920,7 +2920,7 @@ __parallel_set_union_op(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _
             //do parallel copying of [first1; left_bound_seq_1)
             [=] {
                 __internal::__pattern_walk2_brick(std::forward<_ExecutionPolicy>(__exec), __first1, __left_bound_seq_1,
-                                                  __res_or, copy_range1, std::true_type());
+                                                  __res_or, __copy_range1, std::true_type());
             },
             [=, &__result] {
                 __result = __internal::__parallel_set_op(
@@ -2942,7 +2942,7 @@ __parallel_set_union_op(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _
             //do parallel copying of [first2; left_bound_seq_2)
             [=] {
                 __internal::__pattern_walk2_brick(std::forward<_ExecutionPolicy>(__exec), __first2, __left_bound_seq_2,
-                                                  __res_or, copy_range2, std::true_type());
+                                                  __res_or, __copy_range2, std::true_type());
             },
             [=, &__result] {
                 __result = __internal::__parallel_set_op(
diff --git a/libstdc++-v3/include/pstl/parallel_backend_tbb.h b/libstdc++-v3/include/pstl/parallel_backend_tbb.h
index c6f5bb8d5ab..9c05ade0532 100644
--- a/libstdc++-v3/include/pstl/parallel_backend_tbb.h
+++ b/libstdc++-v3/include/pstl/parallel_backend_tbb.h
@@ -508,8 +508,8 @@ class __stable_sort_task : public tbb::task
 //! Binary operator that does nothing
 struct __binary_no_op
 {
-    template <typename _T>
-    void operator()(_T, _T)
+    template <typename _Tp>
+    void operator()(_Tp, _Tp)
     {
     }
 };
-- 
2.20.1

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

* Re: [PATCH] Clean up non-conforming names
  2019-05-31 20:50 [PATCH] Clean up non-conforming names Thomas Rodgers
@ 2019-06-01  0:15 ` Thomas Rodgers
  2019-06-01 11:43   ` Jonathan Wakely
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Rodgers @ 2019-06-01  0:15 UTC (permalink / raw)
  To: Thomas Rodgers; +Cc: gcc-patches, libstdc++

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


Revising previous version of this patch to pick another missed
uglification.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Clean-up-non-conforming-names.patch --]
[-- Type: text/x-patch, Size: 6096 bytes --]

From 543d6be586ad8c29ef0ceefd55a249c715bd2480 Mon Sep 17 00:00:00 2001
From: Thomas Rodgers <trodgers@redhat.com>
Date: Fri, 31 May 2019 13:28:32 -0700
Subject: [PATCH] Clean up non-conforming names

	* include/pstl/algorithm_impl.h (__parallel_set_union_op):
	Uglfiy copy_range1 and copy_range2
	(__pattern_walk2_n): Rename local n to __n
	* include/pstl/parallel_backend_tbb.h (struct __binary_no_op):
	Rename parameter _T to _Tp.
---
 libstdc++-v3/include/pstl/algorithm_impl.h     | 18 +++++++++---------
 .../include/pstl/parallel_backend_tbb.h        |  4 ++--
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/libstdc++-v3/include/pstl/algorithm_impl.h b/libstdc++-v3/include/pstl/algorithm_impl.h
index 3491e002c94..2216420d1c3 100644
--- a/libstdc++-v3/include/pstl/algorithm_impl.h
+++ b/libstdc++-v3/include/pstl/algorithm_impl.h
@@ -282,7 +282,7 @@ _RandomAccessIterator2
 __pattern_walk2_n(_ExecutionPolicy&& __exec, _RandomAccessIterator1 __first1, _Size __n, _RandomAccessIterator2 __first2,
                   _Function __f, _IsVector __is_vector, /*parallel=*/std::true_type)
 {
-    return __internal::__pattern_walk2(std::forward<_ExecutionPolicy>(__exec), __first1, __first1 + n, __first2, __f,
+    return __internal::__pattern_walk2(std::forward<_ExecutionPolicy>(__exec), __first1, __first1 + __n, __first2, __f,
                                        __is_vector, std::true_type());
 }
 
@@ -2855,22 +2855,22 @@ __parallel_set_union_op(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _
     const auto __n1 = __last1 - __first1;
     const auto __n2 = __last2 - __first2;
 
-    auto copy_range1 = [__is_vector](_ForwardIterator1 __begin, _ForwardIterator1 __end, _OutputIterator __res) {
+    auto __copy_range1 = [__is_vector](_ForwardIterator1 __begin, _ForwardIterator1 __end, _OutputIterator __res) {
         return __internal::__brick_copy(__begin, __end, __res, __is_vector);
     };
-    auto copy_range2 = [__is_vector](_ForwardIterator2 __begin, _ForwardIterator2 __end, _OutputIterator __res) {
+    auto __copy_range2 = [__is_vector](_ForwardIterator2 __begin, _ForwardIterator2 __end, _OutputIterator __res) {
         return __internal::__brick_copy(__begin, __end, __res, __is_vector);
     };
 
     // {1} {}: parallel copying just first sequence
     if (__n2 == 0)
         return __internal::__pattern_walk2_brick(std::forward<_ExecutionPolicy>(__exec), __first1, __last1, __result,
-                                                 copy_range1, std::true_type());
+                                                 __copy_range1, std::true_type());
 
     // {} {2}: parallel copying justmake  second sequence
     if (__n1 == 0)
         return __internal::__pattern_walk2_brick(std::forward<_ExecutionPolicy>(__exec), __first2, __last2, __result,
-                                                 copy_range2, std::true_type());
+                                                 __copy_range2, std::true_type());
 
     // testing  whether the sequences are intersected
     _ForwardIterator1 __left_bound_seq_1 = std::lower_bound(__first1, __last1, *__first2, __comp);
@@ -2882,7 +2882,7 @@ __parallel_set_union_op(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _
             std::forward<_ExecutionPolicy>(__exec),
             [=] {
                 __internal::__pattern_walk2_brick(std::forward<_ExecutionPolicy>(__exec), __first1, __last1, __result,
-                                                  copy_range1, std::true_type());
+                                                  __copy_range1, std::true_type());
             },
             [=] {
                 __internal::__pattern_walk2_brick(std::forward<_ExecutionPolicy>(__exec), __first2, __last2,
@@ -2901,7 +2901,7 @@ __parallel_set_union_op(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _
             std::forward<_ExecutionPolicy>(__exec),
             [=] {
                 __internal::__pattern_walk2_brick(std::forward<_ExecutionPolicy>(__exec), __first2, __last2, __result,
-                                                  copy_range2, std::true_type());
+                                                  __copy_range2, std::true_type());
             },
             [=] {
                 __internal::__pattern_walk2_brick(std::forward<_ExecutionPolicy>(__exec), __first1, __last1,
@@ -2920,7 +2920,7 @@ __parallel_set_union_op(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _
             //do parallel copying of [first1; left_bound_seq_1)
             [=] {
                 __internal::__pattern_walk2_brick(std::forward<_ExecutionPolicy>(__exec), __first1, __left_bound_seq_1,
-                                                  __res_or, copy_range1, std::true_type());
+                                                  __res_or, __copy_range1, std::true_type());
             },
             [=, &__result] {
                 __result = __internal::__parallel_set_op(
@@ -2942,7 +2942,7 @@ __parallel_set_union_op(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _
             //do parallel copying of [first2; left_bound_seq_2)
             [=] {
                 __internal::__pattern_walk2_brick(std::forward<_ExecutionPolicy>(__exec), __first2, __left_bound_seq_2,
-                                                  __res_or, copy_range2, std::true_type());
+                                                  __res_or, __copy_range2, std::true_type());
             },
             [=, &__result] {
                 __result = __internal::__parallel_set_op(
diff --git a/libstdc++-v3/include/pstl/parallel_backend_tbb.h b/libstdc++-v3/include/pstl/parallel_backend_tbb.h
index c6f5bb8d5ab..9c05ade0532 100644
--- a/libstdc++-v3/include/pstl/parallel_backend_tbb.h
+++ b/libstdc++-v3/include/pstl/parallel_backend_tbb.h
@@ -508,8 +508,8 @@ class __stable_sort_task : public tbb::task
 //! Binary operator that does nothing
 struct __binary_no_op
 {
-    template <typename _T>
-    void operator()(_T, _T)
+    template <typename _Tp>
+    void operator()(_Tp, _Tp)
     {
     }
 };
-- 
2.20.1


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

* Re: [PATCH] Clean up non-conforming names
  2019-06-01  0:15 ` Thomas Rodgers
@ 2019-06-01 11:43   ` Jonathan Wakely
  2019-06-02 20:05     ` Thomas Rodgers
  0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Wakely @ 2019-06-01 11:43 UTC (permalink / raw)
  To: Thomas Rodgers; +Cc: gcc-patches, libstdc++

On 31/05/19 17:15 -0700, Thomas Rodgers wrote:
>
>Revising previous version of this patch to pick another missed
>uglification.

OK for trunk, thanks.

I also see this one:

include/pstl/parallel_backend_tbb.h:    __buffer(std::size_t n) : _M_allocator(), _M_ptr(_M_allocator.allocate(n)), _M_buf_size(n) {}



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

* Re: [PATCH] Clean up non-conforming names
  2019-06-01 11:43   ` Jonathan Wakely
@ 2019-06-02 20:05     ` Thomas Rodgers
  2019-06-11 18:05       ` Thomas Rodgers
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Rodgers @ 2019-06-02 20:05 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-patches, libstdc++


Jonathan Wakely writes:

> On 31/05/19 17:15 -0700, Thomas Rodgers wrote:
>>
>>Revising previous version of this patch to pick another missed
>>uglification.
>
> OK for trunk, thanks.
>
> I also see this one:
>
> include/pstl/parallel_backend_tbb.h:    __buffer(std::size_t n) : _M_allocator(), _M_ptr(_M_allocator.allocate(n)), _M_buf_size(n) {}

Ok, I'll clean that one up and commit along with these changes.

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

* Re: [PATCH] Clean up non-conforming names
  2019-06-02 20:05     ` Thomas Rodgers
@ 2019-06-11 18:05       ` Thomas Rodgers
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Rodgers @ 2019-06-11 18:05 UTC (permalink / raw)
  To: gcc-patches, libstdc++

Tested x86_64-linux, committed to trunk.

Thomas Rodgers writes:

> Jonathan Wakely writes:
>
>> On 31/05/19 17:15 -0700, Thomas Rodgers wrote:
>>>
>>>Revising previous version of this patch to pick another missed
>>>uglification.
>>
>> OK for trunk, thanks.
>>
>> I also see this one:
>>
>> include/pstl/parallel_backend_tbb.h:    __buffer(std::size_t n) : _M_allocator(), _M_ptr(_M_allocator.allocate(n)), _M_buf_size(n) {}
>
> Ok, I'll clean that one up and commit along with these changes.

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

end of thread, other threads:[~2019-06-11 18:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-31 20:50 [PATCH] Clean up non-conforming names Thomas Rodgers
2019-06-01  0:15 ` Thomas Rodgers
2019-06-01 11:43   ` Jonathan Wakely
2019-06-02 20:05     ` Thomas Rodgers
2019-06-11 18:05       ` 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).