Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zstd
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
yocto-mirrors
zstd
Commits
9ba07907
Unverified
Commit
9ba07907
authored
3 years ago
by
Yann Collet
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #2836 from animalize/copy16
ZSTD_copy16() uses ZSTD_memcpy()
parents
a071e006
b10357ce
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/common/zstd_internal.h
+7
-1
7 additions, 1 deletion
lib/common/zstd_internal.h
with
7 additions
and
1 deletion
lib/common/zstd_internal.h
+
7
−
1
View file @
9ba07907
...
...
@@ -176,11 +176,17 @@ static void ZSTD_copy8(void* dst, const void* src) {
ZSTD_memcpy
(
dst
,
src
,
8
);
#endif
}
#define COPY8(d,s) { ZSTD_copy8(d,s); d+=8; s+=8; }
/* Need to use memmove here since the literal buffer can now be located within
the dst buffer. In circumstances where the op "catches up" to where the
literal buffer is, there can be partial overlaps in this call on the final
copy if the literal is being shifted by less than 16 bytes. */
static
void
ZSTD_copy16
(
void
*
dst
,
const
void
*
src
)
{
#if defined(ZSTD_ARCH_ARM_NEON)
vst1q_u8
((
uint8_t
*
)
dst
,
vld1q_u8
((
const
uint8_t
*
)
src
));
#elif defined(ZSTD_ARCH_X86_SSE2)
_mm_storeu_si128
((
__m128i
*
)
dst
,
_mm_loadu_si128
((
const
__m128i
*
)
src
));
#else
ZSTD_memmove
(
dst
,
src
,
16
);
#endif
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment