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
b799d1bc
Commit
b799d1bc
authored
Jan 11, 2021
by
Jesper Storm Bache
Committed by
Evan Nemerson
Jan 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
align: allow alignment > 8 on MSVC ≥ 19.16 (VS 2017)
Fixes #695
parent
7e2ccdbd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
13 deletions
+17
-13
simde-align.h
simde-align.h
+17
-13
No files found.
simde-align.h
View file @
b799d1bc
...
@@ -151,8 +151,8 @@
...
@@ -151,8 +151,8 @@
*
*
* Most compilers are okay with types which are aligned beyond what
* Most compilers are okay with types which are aligned beyond what
* they think is the maximum, as long as the alignment is a power
* they think is the maximum, as long as the alignment is a power
* of two.
MSVC is the exception (of course), so we need to cap the
* of two.
Older versions of MSVC is the exception, so we need to cap
* alignment requests at values that the implementation supports.
*
the
alignment requests at values that the implementation supports.
*
*
* XL C/C++ will accept values larger than 16 (which is the alignment
* XL C/C++ will accept values larger than 16 (which is the alignment
* of an AltiVec vector), but will not reliably align to the larger
* of an AltiVec vector), but will not reliably align to the larger
...
@@ -163,18 +163,22 @@
...
@@ -163,18 +163,22 @@
* macro will just return the value passed to it. */
* macro will just return the value passed to it. */
#if !defined(SIMDE_ALIGN_MAXIMUM)
#if !defined(SIMDE_ALIGN_MAXIMUM)
#if defined(HEDLEY_MSVC_VERSION)
#if defined(HEDLEY_MSVC_VERSION)
#if defined(_M_IX86) || defined(_M_AMD64)
#if HEDLEY_MSVC_VERSION_CHECK(19, 16, 0)
#if HEDLEY_MSVC_VERSION_CHECK(19,14,0)
// Visual studio 2017 and newer does not need a max
#define SIMDE_ALIGN_PLATFORM_MAXIMUM 64
#else
#elif HEDLEY_MSVC_VERSION_CHECK(16,0,0)
#if defined(_M_IX86) || defined(_M_AMD64)
/* VS 2010 is really a guess based on Wikipedia; if anyone can
#if HEDLEY_MSVC_VERSION_CHECK(19,14,0)
* test with old VS versions I'd really appreciate it. */
#define SIMDE_ALIGN_PLATFORM_MAXIMUM 64
#define SIMDE_ALIGN_PLATFORM_MAXIMUM 32
#elif HEDLEY_MSVC_VERSION_CHECK(16,0,0)
#else
/* VS 2010 is really a guess based on Wikipedia; if anyone can
#define SIMDE_ALIGN_PLATFORM_MAXIMUM 16
* test with old VS versions I'd really appreciate it. */
#define SIMDE_ALIGN_PLATFORM_MAXIMUM 32
#else
#define SIMDE_ALIGN_PLATFORM_MAXIMUM 16
#endif
#elif defined(_M_ARM) || defined(_M_ARM64)
#define SIMDE_ALIGN_PLATFORM_MAXIMUM 8
#endif
#endif
#elif defined(_M_ARM) || defined(_M_ARM64)
#define SIMDE_ALIGN_PLATFORM_MAXIMUM 8
#endif
#endif
#elif defined(HEDLEY_IBM_VERSION)
#elif defined(HEDLEY_IBM_VERSION)
#define SIMDE_ALIGN_PLATFORM_MAXIMUM 16
#define SIMDE_ALIGN_PLATFORM_MAXIMUM 16
...
...
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