quickstep-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jianqiao <...@git.apache.org>
Subject [GitHub] incubator-quickstep pull request #120: Store handle count in FastSeparateCha...
Date Sat, 22 Oct 2016 04:36:52 GMT
Github user jianqiao commented on a diff in the pull request:

    https://github.com/apache/incubator-quickstep/pull/120#discussion_r84570072
  
    --- Diff: storage/FastSeparateChainingHashTable.hpp ---
    @@ -145,10 +145,10 @@ class FastSeparateChainingHashTable
             header_->buckets_allocated.load(std::memory_order_relaxed);
         void *bucket_ptr = static_cast<char *>(buckets_) + kValueOffset;
         for (std::size_t bucket_num = 0; bucket_num < num_buckets; ++bucket_num) {
    -      for (std::size_t handle_num = 0; handle_num < handles_.size(); ++handle_num)
{
    +      for (std::size_t handle_id = 0; handle_id < num_handles_; ++handle_id) {
             void *value_internal_ptr =
    --- End diff --
    
    I think it's okay either way. If we are using `char *`, then we need `reinterpret_cast`
to cast `char *` to `std::uint8_t *`. Here two `static_cast`'s should semantically be better.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message