From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> To: Serge Petrenko <sergepetrenko@tarantool.org> Cc: tarantool-patches@dev.tarantool.org Subject: Re: [Tarantool-patches] [PATCH] vclock: refactor vclock map to use type uint32_t Date: Thu, 5 Mar 2020 21:46:06 +0100 [thread overview] Message-ID: <f2f5ec85-8519-655e-0726-11dcd84159b4@tarantool.org> (raw) In-Reply-To: <20200305113600.65203-1-sergepetrenko@tarantool.org> Hi! Thanks for the patch! Consider this diff: ==================== diff --git a/src/box/vclock.h b/src/box/vclock.h index 9b499513a..a8549d2a9 100644 --- a/src/box/vclock.h +++ b/src/box/vclock.h @@ -195,7 +195,7 @@ vclock_copy(struct vclock *dst, const struct vclock *src) static inline uint32_t vclock_size(const struct vclock *vclock) { - return __builtin_popcount(vclock->map); + return bit_count_u32(vclock->map); } static inline int64_t @@ -281,7 +281,7 @@ vclock_compare_generic(const struct vclock *a, const struct vclock *b, bool ignore_zero) { bool le = true, ge = true; - unsigned int map = a->map | b->map; + uint32_t map = a->map | b->map; struct bit_iterator it; bit_iterator_init(&it, &map, sizeof(map), true);
next prev parent reply other threads:[~2020-03-05 20:46 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-03-05 11:36 Serge Petrenko 2020-03-05 20:46 ` Vladislav Shpilevoy [this message] 2020-03-06 8:58 ` Serge Petrenko 2020-03-08 22:16 ` Vladislav Shpilevoy 2020-03-10 11:23 ` Serge Petrenko 2020-03-16 20:31 ` Konstantin Osipov 2020-03-19 14:36 ` Serge Petrenko 2020-03-19 14:47 ` Konstantin Osipov 2020-03-20 11:15 ` Kirill Yukhin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=f2f5ec85-8519-655e-0726-11dcd84159b4@tarantool.org \ --to=v.shpilevoy@tarantool.org \ --cc=sergepetrenko@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH] vclock: refactor vclock map to use type uint32_t' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox