Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
simde
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
Libraries
simde
Commits
78783046
Commit
78783046
authored
May 22, 2024
by
Cuda Chen
Committed by
Michael R. Crusoe
May 22, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x86: Apply half tabular method in _mm_crc32 family
parent
d8a0c764
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
x86/sse4.2.h
x86/sse4.2.h
+14
-6
No files found.
x86/sse4.2.h
View file @
78783046
...
...
@@ -300,12 +300,20 @@ simde_mm_crc32_u8(uint32_t prevcrc, uint8_t v) {
#else
uint32_t
crc
=
prevcrc
;
crc
^=
v
;
for
(
int
bit
=
0
;
bit
<
8
;
bit
++
)
{
if
(
crc
&
1
)
crc
=
(
crc
>>
1
)
^
UINT32_C
(
0x82f63b78
);
else
crc
=
(
crc
>>
1
);
}
// Adapted from: https://create.stephan-brumme.com/crc32/
// Apply half-byte comparision algorithm for the best ratio between
// performance and lookup table.
// The lookup table just needs to store every 16th entry
// of the standard look-up table.
static
const
uint32_t
crc32_half_byte_tbl
[]
=
{
0x00000000
,
0x105ec76f
,
0x20bd8ede
,
0x30e349b1
,
0x417b1dbc
,
0x5125dad3
,
0x61c69362
,
0x7198540d
,
0x82f63b78
,
0x92a8fc17
,
0xa24bb5a6
,
0xb21572c9
,
0xc38d26c4
,
0xd3d3e1ab
,
0xe330a81a
,
0xf36e6f75
,
};
crc
=
(
crc
>>
4
)
^
crc32_half_byte_tbl
[
crc
&
0x0f
];
crc
=
(
crc
>>
4
)
^
crc32_half_byte_tbl
[
crc
&
0x0f
];
return
crc
;
#endif
#endif
...
...
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