-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Impossible to compile on macOS because of c++ standards #227
Comments
Weird. I am seeing conflicting information. http://en.cppreference.com/w/c/memory/aligned_alloc http://en.cppreference.com/w/cpp/memory/c/aligned_alloc Trying to make sense of it. The thing is, it compiles fine on GNU g++ with only C+11 enabled. |
If I understand correctly, We use the version from |
I've been searching for a while, and I'm starting to suspect that this function is not implemented in macOS. I've open "stdlib.h" and the function is basically not defined there. I've also found this url where they mention that the libc doesn't not implement it. |
@emjotde I removed last |
@nurv So does this work now for you with C++17 support enabled? |
@emjotde Sorry, I've been on vacation. No, it doesn't. The problem here is that macos has a bad implementation of C11, and doesn't implement aligned_alloc. I've confirm this with LLVM developers. Does the memory need to be allocated in a alignment fashion here? If it does, we can try c++17 |
Do you need to It not, it's easy to roll your own, as I have done with |
Oh, I meant, does it work with C++17 now that we removed std::random_shuffle? |
I can add a compile time check later to for MacOS/C++17 that will switch to std::aligned_alloc. |
Where are we with this one right now? Are you still having problems? |
I've built a container with docker, and run it from there. I gave up on running it on macOS. |
OK. So we will keep this open. I believe we do not need the aligned alloc for the CPU version and will try to get rid of that. We are also working on a Windows build were this is causing a bit of trouble. |
It seems replacing |
Hey, AVX2 and AVX512 need 32-byte and 64-byte respectively. Might I suggest |
Currently on file
device.cpp
in lines 21 and 26 there is a reference to functionaligned_alloc
. Although the C++ defined in CMake isC++11
, according with CLang website, that function is only available atC++17
.The problem is that increasing the C++ causes references to
random_shuffle
to break:This is caused because
random_shuffle
was deprecated on C++14 and removed on C++17. This makes impossible to compile the code in macOS without changing the source code.The text was updated successfully, but these errors were encountered: