Skip to content
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

use exp10 and cbrt from vectorclass when enabled #2274

Merged
merged 2 commits into from
Apr 24, 2018

Conversation

jehuty0shift
Copy link
Contributor

Hello,
I tried to compile ClikHouse with vector class suport enabled and it failed at two places :

ClickHouse/dbms/src/Functions/FunctionsMath.h:489:5: error: could not convert template argument ‘preciseExp10’ from ‘double(double) noexcept’ to ‘Vec2d (*)(const Vec2d&)’
     preciseExp10
     ^~~~~~~~~~~~

ClickHouse/dbms/src/Functions/FunctionsMath.h:500:28: error: could not convert template argument ‘ Power_rational<1, 3>::pow<VTYPE>’ from ‘<unresolved overloaded function type>’ to ‘Vec2d (*)(const Vec2d&)’
     Power_rational<1, 3>::pow

Power_rational::pow function is non static (even the specialized functions). I don't understand how it was compiling but i'm maybe missing something here.
So i changed the code to call the vectorized version of cbrt and exp10 when vectorclass is Enabled.

Compiled with gcc-7:
gcc-7 --version
gcc-7 (Ubuntu 7.2.0-1ubuntu1~16.04) 7.2.0

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

@alexey-milovidov alexey-milovidov merged commit 6c73fb8 into ClickHouse:master Apr 24, 2018
@alexey-milovidov
Copy link
Member

Thank you!
We ceased to use vectorclass in our packages to comply the licence.
It was left as an option, but with no CI tests.

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

Successfully merging this pull request may close these issues.

2 participants