public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] [libstdc++] Remove unused hasher instance.
@ 2021-06-04 19:51 Thomas Rodgers
  2021-06-04 20:30 ` Jonathan Wakely
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Rodgers @ 2021-06-04 19:51 UTC (permalink / raw)
  To: gcc-patches, libstdc++; +Cc: trodgers, Thomas Rodgers

This is a remnant of poorly executed refactoring.

libstdc++-v3/ChangeLog:

	* include/std/barrier (__tree_barrier::_M_arrive): Remove
        unnecessary hasher instantiation.
---
 libstdc++-v3/include/std/barrier | 1 -
 1 file changed, 1 deletion(-)

diff --git a/libstdc++-v3/include/std/barrier b/libstdc++-v3/include/std/barrier
index fd61fb4f9da..4210e30d1ce 100644
--- a/libstdc++-v3/include/std/barrier
+++ b/libstdc++-v3/include/std/barrier
@@ -103,7 +103,6 @@ It looks different from literature pseudocode for two main reasons:
 			   static_cast<__barrier_phase_t>(__old_phase_val + 2);
 
 	size_t __current_expected = _M_expected;
-	std::hash<std::thread::id> __hasher;
 	__current %= ((_M_expected + 1) >> 1);
 
 	for (int __round = 0; ; ++__round)
-- 
2.26.2


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

* Re: [PATCH] [libstdc++] Remove unused hasher instance.
  2021-06-04 19:51 [PATCH] [libstdc++] Remove unused hasher instance Thomas Rodgers
@ 2021-06-04 20:30 ` Jonathan Wakely
  2021-06-08 23:04   ` Thomas Rodgers
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Wakely @ 2021-06-04 20:30 UTC (permalink / raw)
  To: Thomas Rodgers; +Cc: gcc-patches, libstdc++, Thomas Rodgers

On Fri, 4 Jun 2021 at 20:54, Thomas Rodgers wrote:

> This is a remnant of poorly executed refactoring.
>

OK for trunk and gcc-11, thanks.



> libstdc++-v3/ChangeLog:
>
>         * include/std/barrier (__tree_barrier::_M_arrive): Remove
>         unnecessary hasher instantiation.
> ---
>  libstdc++-v3/include/std/barrier | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/libstdc++-v3/include/std/barrier
> b/libstdc++-v3/include/std/barrier
> index fd61fb4f9da..4210e30d1ce 100644
> --- a/libstdc++-v3/include/std/barrier
> +++ b/libstdc++-v3/include/std/barrier
> @@ -103,7 +103,6 @@ It looks different from literature pseudocode for two
> main reasons:
>                            static_cast<__barrier_phase_t>(__old_phase_val
> + 2);
>
>         size_t __current_expected = _M_expected;
> -       std::hash<std::thread::id> __hasher;
>         __current %= ((_M_expected + 1) >> 1);
>
>         for (int __round = 0; ; ++__round)
> --
> 2.26.2
>
>

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

* Re: [PATCH] [libstdc++] Remove unused hasher instance.
  2021-06-04 20:30 ` Jonathan Wakely
@ 2021-06-08 23:04   ` Thomas Rodgers
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Rodgers @ 2021-06-08 23:04 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: Thomas Rodgers, gcc-patches, libstdc++

Tested x86_64-pc-linux-gnu, committed to master, backported to
releases/gcc-11.

On Fri, Jun 4, 2021 at 1:30 PM Jonathan Wakely <jwakely@redhat.com> wrote:

>
>
> On Fri, 4 Jun 2021 at 20:54, Thomas Rodgers wrote:
>
>> This is a remnant of poorly executed refactoring.
>>
>
> OK for trunk and gcc-11, thanks.
>
>
>
>> libstdc++-v3/ChangeLog:
>>
>>         * include/std/barrier (__tree_barrier::_M_arrive): Remove
>>         unnecessary hasher instantiation.
>> ---
>>  libstdc++-v3/include/std/barrier | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/libstdc++-v3/include/std/barrier
>> b/libstdc++-v3/include/std/barrier
>> index fd61fb4f9da..4210e30d1ce 100644
>> --- a/libstdc++-v3/include/std/barrier
>> +++ b/libstdc++-v3/include/std/barrier
>> @@ -103,7 +103,6 @@ It looks different from literature pseudocode for two
>> main reasons:
>>                            static_cast<__barrier_phase_t>(__old_phase_val
>> + 2);
>>
>>         size_t __current_expected = _M_expected;
>> -       std::hash<std::thread::id> __hasher;
>>         __current %= ((_M_expected + 1) >> 1);
>>
>>         for (int __round = 0; ; ++__round)
>> --
>> 2.26.2
>>
>>

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

end of thread, other threads:[~2021-06-08 23:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-04 19:51 [PATCH] [libstdc++] Remove unused hasher instance Thomas Rodgers
2021-06-04 20:30 ` Jonathan Wakely
2021-06-08 23:04   ` 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).