-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Test suite compilation failing on Mac #49
Comments
Hmm ... weird. Does the clang version your using support that? |
I don't think it supports it. I could be mistaken, but isnt that the
compilation error?
…On Thu, Jun 4, 2020, 3:18 PM Jeroen Baert ***@***.***> wrote:
Hmm ... weird.
I *did* recently drop C++11 requirement for the headers themselves, but
the libmorton_test.h (part of the test suite, not the libmorton headers
themselves) you're referring to still uses variadic templates, which are a
C++11 feature
Does the clang version your using support that?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#49 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AETRWLWT6MBE6ENKCBTGOGDRVAMRZANCNFSM4NOGFLIQ>
.
|
Hi Joroen,
I have another question. I would like to encode a voxel with each dimension
being a uint64. Does your current library support that?
Thanks
Kiran
…On Thu, Jun 4, 2020, 3:18 PM Jeroen Baert ***@***.***> wrote:
Hmm ... weird.
I *did* recently drop C++11 requirement for the headers themselves, but
the libmorton_test.h (part of the test suite, not the libmorton headers
themselves) you're referring to still uses variadic templates, which are a
C++11 feature
Does the clang version your using support that?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#49 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AETRWLWT6MBE6ENKCBTGOGDRVAMRZANCNFSM4NOGFLIQ>
.
|
Well, if each of your coordinates can be 64 bits (and you sure all of those bits are used), your morton number has to be 64*3 bits = 192 bits, so you'd need some kind of 256-bit type to store that. You can probably derive methods to do that based on this library. You sure you're not dealing with 16 / 32 bit coordinates stored in a uint64? |
I am sure. I would like to store the encoded number in an array of 3
uint64s.
…On Thu, Jun 4, 2020, 4:00 PM Jeroen Baert ***@***.***> wrote:
Well, if each of your coordinates can be 64 bits (and you sure all of
those bits are used), your morton number has to be 64*3 bits = 192 bits, so
you'd need some kind of 256-bit type to store that.
You sure you're not dealing with 16 / 32 bit coordinates stored in a
uint64?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#49 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AETRWLSUKA5IBQ4ETGYHMJLRVARSLANCNFSM4NOGFLIQ>
.
|
Well, have a look at the pre-shifted LUT method in morton3D.h
You can adapt this method to work with 64-bit coordinates as well, and have some logic to writeout the result to three seperate uint64's. I see it's already using sizeof(coord) in its internal logic, so that's taken care of. And to answer your original question: if you really want to compile the test suite (which, again: is not required to use the library!), you'll have to resort to a compiler which supports C++11 / variadic templates. |
It does (Apple's clang 10.0.1 equals official clang 7.0.0), but it's not turned on by default. Adding
However this results in further compile errors because apparently Apple defines
|
Does only the test suite fail to compile, or are the header files not usable too? |
The following tests fail to compile. Once I commented them out, the remaining tests compiled successfully: libmorton/test/libmorton_test.cpp Line 121 in 7a45306
libmorton/test/libmorton_test.cpp Line 123 in 7a45306
libmorton/test/libmorton_test.cpp Line 158 in 7a45306
libmorton/test/libmorton_test.cpp Line 160 in 7a45306
libmorton/test/libmorton_test.cpp Line 164 in 7a45306
libmorton/test/libmorton_test.cpp Line 166 in 7a45306
|
I'm still getting this same problem making libmorton_test on my new MacBook using clang 14. Has the bug been fixed? |
Can you post the full compile output? |
Here is the compile output |
My configuration:
MacOS Mojave 10.14.6Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Errors I am seeing:
template<typename...T>
^
/Users/kiran/libmorton/libmorton/test/libmorton_test.h:98:107: error: expected expression
return control_encode_impl<sizeof...(fields)>(std::numeric_limits<uint64_t>::digits / sizeof...(fields), { fields... });
^
/Users/kiran/libmorton/libmorton/test/libmorton_test.h:102:118: error: a space is required between consecutive right angle brackets
(use '> >')
void control_decode_impl(uint64_t encoding, std::size_t bitCount, const std::valarray<std::reference_wrapper<uint64_t>>& fields) {
The text was updated successfully, but these errors were encountered: