We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
clang++ (clang version 10.0.0-4ubuntu1) yields zero when abs() is called with a float vector. Here's code to reproduce the error:
#include <iostream> #include <experimental/simd> int main ( int argc , char * argv[] ) { std::experimental::simd < float , std::experimental::simd_abi::fixed_size < 2 > > x ; x[0] = -1.0f ; x[1] = 1.0f ; auto y = abs ( x ) ; for ( int i = 0 ; i < 2 ; i++ ) { std::cout << "x[" << i << "] : " << x[i] << " -> " ; std::cout << "y[" << i << "] : " << y[i] << std::endl ; } }
compiling with clang I get the error:
$ clang++ -std=c++17 stdsimd_abs.cc $ ./a.out x[0] : -1 -> y[0] : 0 x[1] : 1 -> y[1] : 0
g++ yields the correct result.
$ g++ -std=c++17 stdsimd_abs.cc $ ./a.out x[0] : -1 -> y[0] : 1 x[1] : 1 -> y[1] : 1
Kay
The text was updated successfully, but these errors were encountered:
No branches or pull requests
clang++ (clang version 10.0.0-4ubuntu1) yields zero when abs() is called with a float vector. Here's code to reproduce the error:
Actual Results
compiling with clang I get the error:
$ clang++ -std=c++17 stdsimd_abs.cc
$ ./a.out
x[0] : -1 -> y[0] : 0
x[1] : 1 -> y[1] : 0
Expected Results
g++ yields the correct result.
$ g++ -std=c++17 stdsimd_abs.cc
$ ./a.out
x[0] : -1 -> y[0] : 1
x[1] : 1 -> y[1] : 1
Kay
The text was updated successfully, but these errors were encountered: