Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Add Shift-Right, Shift-Left, and XOR #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rsaxvc
Copy link

@rsaxvc rsaxvc commented Aug 3, 2018

Add a few more bit-twiddling operations

@Maratyszcza
Copy link
Owner

sr and sl are too ambiguous, could you change to shr/shl, or shiftr/shiftl?

@rsaxvc
Copy link
Author

rsaxvc commented Aug 23, 2018

Changed to shr/shl

include/psimd.h Outdated

/* Vector shift right */
PSIMD_INTRINSIC psimd_s8 psimd_shr_s8(psimd_s8 a, uint32_t b) {
return a >> b;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clang before 4.0 requires both parts of a >> operator to be vectors, so you should use a >> psimd_splat_s8((int8_t) b)

@breznak
Copy link

breznak commented Jul 11, 2019

@Maratyszcza can you merge this change?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants