Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-08-25 16:17:46 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-08-25 16:17:46 +0400
commit3a9eb9b49716aad15156180da6e8018241b80cf8 (patch)
treed961c2c0f35e3a87a2dab4aaffac2511ed42dfd1 /source/blender/blenlib/intern/edgehash.c
parent150af65d9f4794a3397dabb307c37d42607ec07a (diff)
doxygen docs for ghash/edgehash
Diffstat (limited to 'source/blender/blenlib/intern/edgehash.c')
-rw-r--r--source/blender/blenlib/intern/edgehash.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/source/blender/blenlib/intern/edgehash.c b/source/blender/blenlib/intern/edgehash.c
index dac107187f3..cae23356782 100644
--- a/source/blender/blenlib/intern/edgehash.c
+++ b/source/blender/blenlib/intern/edgehash.c
@@ -82,9 +82,8 @@ struct EdgeHash {
/* -------------------------------------------------------------------- */
/* EdgeHash API */
-/* internal utility API */
-
-#define EDGE_HASH(v0, v1) ((v0 * 39) ^ (v1 * 31))
+/** \name Internal Utility API
+ * \{ */
BLI_INLINE bool edgehash_test_expand_buckets(const unsigned int nentries, const unsigned int nbuckets)
{
@@ -94,7 +93,8 @@ BLI_INLINE bool edgehash_test_expand_buckets(const unsigned int nentries, const
BLI_INLINE unsigned int edgehash_keyhash(EdgeHash *eh, unsigned int v0, unsigned int v1)
{
BLI_assert(v0 < v1);
- return EDGE_HASH(v0, v1) % eh->nbuckets;
+
+ return ((v0 * 39) ^ (v1 * 31)) % eh->nbuckets;
}
BLI_INLINE EdgeEntry *edgehash_lookup_entry_ex(EdgeHash *eh, unsigned int v0, unsigned int v1,
@@ -156,9 +156,11 @@ static void edgehash_insert_ex(EdgeHash *eh, unsigned int v0, unsigned int v1, v
MEM_freeN(old);
}
}
+/** \} */
-#undef EDGE_HASH
+/** \name Public API
+ * \{ */
/* Public API */
@@ -305,10 +307,15 @@ void BLI_edgehash_flag_clear(EdgeHash *eh, unsigned int flag)
eh->flag &= ~flag;
}
+/** \} */
+
/* -------------------------------------------------------------------- */
/* EdgeHash Iterator API */
+/** \name Iterator API
+ * \{ */
+
struct EdgeHashIterator {
EdgeHash *eh;
unsigned int curBucket;
@@ -398,3 +405,5 @@ bool BLI_edgehashIterator_isDone(EdgeHashIterator *ehi)
{
return (ehi->curEntry == NULL);
}
+
+/** \} */