Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
90d3da11
Commit
90d3da11
authored
Oct 18, 2016
by
Andres Freund
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a few typos in simplehash.h.
Author: Erik Rijkers Discussion: <274e4c8ac545d6622735f97c1f6c354b@xs4all.nl>
parent
fca41acb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/include/lib/simplehash.h
src/include/lib/simplehash.h
+4
-4
No files found.
src/include/lib/simplehash.h
View file @
90d3da11
...
@@ -256,7 +256,7 @@ SH_PREV(SH_TYPE *tb, uint32 curelem, uint32 startelem)
...
@@ -256,7 +256,7 @@ SH_PREV(SH_TYPE *tb, uint32 curelem, uint32 startelem)
return
curelem
;
return
curelem
;
}
}
/* return distance between bucket and it
'
s optimal position */
/* return distance between bucket and its optimal position */
static
inline
uint32
static
inline
uint32
SH_DISTANCE_FROM_OPTIMAL
(
SH_TYPE
*
tb
,
uint32
optimal
,
uint32
bucket
)
SH_DISTANCE_FROM_OPTIMAL
(
SH_TYPE
*
tb
,
uint32
optimal
,
uint32
bucket
)
{
{
...
@@ -349,7 +349,7 @@ SH_GROW(SH_TYPE *tb, uint32 newsize)
...
@@ -349,7 +349,7 @@ SH_GROW(SH_TYPE *tb, uint32 newsize)
*
*
* To be able to simply move entries over, we have to start not at the
* To be able to simply move entries over, we have to start not at the
* first bucket (i.e olddata[0]), but find the first bucket that's either
* first bucket (i.e olddata[0]), but find the first bucket that's either
* empty, or is occupied by an entry at it
'
s optimal position. Such a
* empty, or is occupied by an entry at its optimal position. Such a
* bucket has to exist in any table with a load factor under 1, as not all
* bucket has to exist in any table with a load factor under 1, as not all
* buckets are occupied, i.e. there always has to be an empty bucket. By
* buckets are occupied, i.e. there always has to be an empty bucket. By
* starting at such a bucket we can move the entries to the larger table,
* starting at such a bucket we can move the entries to the larger table,
...
@@ -485,9 +485,9 @@ SH_INSERT(SH_TYPE *tb, SH_KEY_TYPE key, bool *found)
...
@@ -485,9 +485,9 @@ SH_INSERT(SH_TYPE *tb, SH_KEY_TYPE key, bool *found)
/*
/*
* If the bucket is not empty, we either found a match (in which case
* If the bucket is not empty, we either found a match (in which case
* we're done), or we have to decide whether to skip over or move the
* we're done), or we have to decide whether to skip over or move the
* colliding entry. When the
the colliding elements distance to it'
s
* colliding entry. When the
colliding element's distance to it
s
* optimal position is smaller than the to-be-inserted entry's, we
* optimal position is smaller than the to-be-inserted entry's, we
* shift the colliding entry (and it
'
s followers) forward by one.
* shift the colliding entry (and its followers) forward by one.
*/
*/
if
(
SH_COMPARE_KEYS
(
tb
,
hash
,
key
,
entry
))
if
(
SH_COMPARE_KEYS
(
tb
,
hash
,
key
,
entry
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment