Skip to content
This repository has been archived by the owner on Jun 12, 2023. It is now read-only.

Wrap attributes in platform checks to preserve portability #8

Closed
StefanHamminga opened this issue Jan 18, 2019 · 2 comments
Closed
Assignees

Comments

@StefanHamminga
Copy link
Contributor

StefanHamminga commented Jan 18, 2019

The inserted attributes prevent compilation on, for example, arm.

Wrapping the inserted line in a check for x86 platforms will preserve portability:

    ...
#if defined(i386__) || defined(__i386__) || defined(_M_IX86) || defined(_M_IX86) || defined(__X86__) || defined(_X86_) || defined(__I86__) || defined(__INTEL__) || defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) || defined(_M_AMD64)
    __attribute__((target_clones("avx2","arch=atom","default")))
#endif
    ...

Defines taken from: https://sourceforge.net/p/predef/wiki/Architectures/

@VictorRodriguez
Copy link
Contributor

@StefanHamminga let me know if #11 is a way to address the portability

@StefanHamminga
Copy link
Contributor Author

Excellent, works for me, thanks (both for addressing this and the work on this project)!

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

No branches or pull requests

2 participants