Re: Review Request 35874: Added template parameters and constructors to hashset which reflex the state of hashmap

2015-06-30 Thread Joris Van Remoortere

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35874/#review89982
---


Hi Alex,
I just wanted to follow up on our conversation.
As discussed, I think it makes sense to refactor to use `std::unordered_set<>` 
first.
After that, I think you can simplify this code significantly:
```
hashset(const std::set &set) : std::unordered_set(set.begin(), set.end(), std::ceil(list.size() / max_load_factor())) {}

hashset(std::initializer_list list) : std::unordered_set(list.begin(), list.end(), std::ceil(list.size() / max_load_factor())) {}
```

The move constructor is a little trickier, let's discuss that one :-)

- Joris Van Remoortere


On June 25, 2015, 1:45 p.m., Alexander Rojas wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35874/
> ---
> 
> (Updated June 25, 2015, 1:45 p.m.)
> 
> 
> Review request for mesos, Bernd Mathiske, Joerg Schad, Michael Park, and Till 
> Toenshoff.
> 
> 
> Bugs: MESOS-2924
> https://issues.apache.org/jira/browse/MESOS-2924
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Adds extra template parameters to hashset as well as implicit constructors 
> from
> `std::set` and a initializer list constructor.
> 
> These changes keep hashset up to date with the changes in hashmap.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/hashset.hpp 
> 75ed9db54dc9ab502e978f06c55a621cacb56b91 
>   3rdparty/libprocess/3rdparty/stout/tests/hashset_tests.cpp 
> 3c4b732432c0c155451d34ecd5f985318d118fe5 
> 
> Diff: https://reviews.apache.org/r/35874/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> 
> Thanks,
> 
> Alexander Rojas
> 
>



Re: Review Request 35874: Added template parameters and constructors to hashset which reflex the state of hashmap

2015-06-25 Thread Joerg Schad

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35874/#review89381
---


s/reflex/reflects

- Joerg Schad


On June 25, 2015, 1:45 p.m., Alexander Rojas wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35874/
> ---
> 
> (Updated June 25, 2015, 1:45 p.m.)
> 
> 
> Review request for mesos, Bernd Mathiske, Joerg Schad, Michael Park, and Till 
> Toenshoff.
> 
> 
> Bugs: MESOS-2924
> https://issues.apache.org/jira/browse/MESOS-2924
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Adds extra template parameters to hashset as well as implicit constructors 
> from
> `std::set` and a initializer list constructor.
> 
> These changes keep hashset up to date with the changes in hashmap.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/hashset.hpp 
> 75ed9db54dc9ab502e978f06c55a621cacb56b91 
>   3rdparty/libprocess/3rdparty/stout/tests/hashset_tests.cpp 
> 3c4b732432c0c155451d34ecd5f985318d118fe5 
> 
> Diff: https://reviews.apache.org/r/35874/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> 
> Thanks,
> 
> Alexander Rojas
> 
>



Re: Review Request 35874: Added template parameters and constructors to hashset which reflex the state of hashmap

2015-06-25 Thread Mesos ReviewBot

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35874/#review89349
---


Patch looks great!

Reviews applied: [35874]

All tests passed.

- Mesos ReviewBot


On June 25, 2015, 1:45 p.m., Alexander Rojas wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35874/
> ---
> 
> (Updated June 25, 2015, 1:45 p.m.)
> 
> 
> Review request for mesos, Bernd Mathiske, Joerg Schad, Michael Park, and Till 
> Toenshoff.
> 
> 
> Bugs: MESOS-2924
> https://issues.apache.org/jira/browse/MESOS-2924
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Adds extra template parameters to hashset as well as implicit constructors 
> from
> `std::set` and a initializer list constructor.
> 
> These changes keep hashset up to date with the changes in hashmap.
> 
> 
> Diffs
> -
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/hashset.hpp 
> 75ed9db54dc9ab502e978f06c55a621cacb56b91 
>   3rdparty/libprocess/3rdparty/stout/tests/hashset_tests.cpp 
> 3c4b732432c0c155451d34ecd5f985318d118fe5 
> 
> Diff: https://reviews.apache.org/r/35874/diff/
> 
> 
> Testing
> ---
> 
> make check
> 
> 
> Thanks,
> 
> Alexander Rojas
> 
>