Skip to content

Instantly share code, notes, and snippets.

@tshev
Last active July 2, 2019 06:49
Show Gist options
  • Save tshev/e9b818047a08fbfca9dbae358925e54b to your computer and use it in GitHub Desktop.
Save tshev/e9b818047a08fbfca9dbae358925e54b to your computer and use it in GitHub Desktop.
transformbench.cpp:134:19: warning: absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value]
return N(sqrt(abs(x + y)));
^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/stl_algo.h:4327:14: note: in instantiation of member function 'square_root<long>::operator()' requested here
*__result = __binary_op(*__first1, *__first2);
^
transformbench.cpp:152:10: note: in instantiation of function template specialization 'std::transform<__gnu_cxx::__normal_iterator<const long *, std::vector<long, std::allocator<long> > >, __gnu_cxx::__normal_iterator<const long *,
std::vector<long, std::allocator<long> > >, __gnu_cxx::__normal_iterator<long *, std::vector<long, std::allocator<long> > >, square_root<long> >' requested here
std::transform(s1.begin(), s1.end(), s2.begin(), s3.begin(), op);
^
transformbench.cpp:214:5: note: in instantiation of function template specialization 'time_test<std::vector<long, std::allocator<long> >, std::vector<long, std::allocator<long> >, std::vector<long, std::allocator<long> >,
square_root<long> >' requested here
time_test(v1, v2, v3, square_root<T>(), n, m);
^
transformbench.cpp:228:5: note: in instantiation of member function 'test_instructions<long, vector>::operator()' requested here
test_instructions<int64_t, Seq>()(n, m);
^
transformbench.cpp:239:32: note: in instantiation of member function 'test_all_types<std::vector>::operator()' requested here
test_all_types<std::vector>()(n, m);
^
transformbench.cpp:134:19: note: use function 'std::abs' instead
return N(sqrt(abs(x + y)));
^~~
std::abs
transformbench.cpp:142:18: warning: absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value]
return N(pow(abs(x + y), 1.0/3.0));
^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/stl_algo.h:4327:14: note: in instantiation of member function 'cube_root_pow<long>::operator()' requested here
*__result = __binary_op(*__first1, *__first2);
^
transformbench.cpp:152:10: note: in instantiation of function template specialization 'std::transform<__gnu_cxx::__normal_iterator<const long *, std::vector<long, std::allocator<long> > >, __gnu_cxx::__normal_iterator<const long *,
std::vector<long, std::allocator<long> > >, __gnu_cxx::__normal_iterator<long *, std::vector<long, std::allocator<long> > >, cube_root_pow<long> >' requested here
std::transform(s1.begin(), s1.end(), s2.begin(), s3.begin(), op);
^
transformbench.cpp:215:5: note: in instantiation of function template specialization 'time_test<std::vector<long, std::allocator<long> >, std::vector<long, std::allocator<long> >, std::vector<long, std::allocator<long> >,
cube_root_pow<long> >' requested here
time_test(v1, v2, v3, cube_root_pow<T>(), n, m);
^
transformbench.cpp:228:5: note: in instantiation of member function 'test_instructions<long, vector>::operator()' requested here
test_instructions<int64_t, Seq>()(n, m);
^
transformbench.cpp:239:32: note: in instantiation of member function 'test_all_types<std::vector>::operator()' requested here
test_all_types<std::vector>()(n, m);
^
transformbench.cpp:142:18: note: use function 'std::abs' instead
return N(pow(abs(x + y), 1.0/3.0));
^~~
std::abs
transformbench.cpp:134:19: warning: using integer absolute value function 'abs' when argument is of floating point type [-Wabsolute-value]
return N(sqrt(abs(x + y)));
^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/stl_algo.h:4327:14: note: in instantiation of member function 'square_root<float>::operator()' requested here
*__result = __binary_op(*__first1, *__first2);
^
transformbench.cpp:152:10: note: in instantiation of function template specialization 'std::transform<__gnu_cxx::__normal_iterator<const float *, std::vector<float, std::allocator<float> > >, __gnu_cxx::__normal_iterator<const float *,
std::vector<float, std::allocator<float> > >, __gnu_cxx::__normal_iterator<float *, std::vector<float, std::allocator<float> > >, square_root<float> >' requested here
std::transform(s1.begin(), s1.end(), s2.begin(), s3.begin(), op);
^
transformbench.cpp:214:5: note: in instantiation of function template specialization 'time_test<std::vector<float, std::allocator<float> >, std::vector<float, std::allocator<float> >, std::vector<float, std::allocator<float> >,
square_root<float> >' requested here
time_test(v1, v2, v3, square_root<T>(), n, m);
^
transformbench.cpp:229:5: note: in instantiation of member function 'test_instructions<float, vector>::operator()' requested here
test_instructions<float, Seq>()(n, m);
^
transformbench.cpp:239:32: note: in instantiation of member function 'test_all_types<std::vector>::operator()' requested here
test_all_types<std::vector>()(n, m);
^
transformbench.cpp:134:19: note: use function 'std::abs' instead
return N(sqrt(abs(x + y)));
^~~
std::abs
transformbench.cpp:142:18: warning: using integer absolute value function 'abs' when argument is of floating point type [-Wabsolute-value]
return N(pow(abs(x + y), 1.0/3.0));
^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/stl_algo.h:4327:14: note: in instantiation of member function 'cube_root_pow<float>::operator()' requested here
*__result = __binary_op(*__first1, *__first2);
^
transformbench.cpp:152:10: note: in instantiation of function template specialization 'std::transform<__gnu_cxx::__normal_iterator<const float *, std::vector<float, std::allocator<float> > >, __gnu_cxx::__normal_iterator<const float *,
std::vector<float, std::allocator<float> > >, __gnu_cxx::__normal_iterator<float *, std::vector<float, std::allocator<float> > >, cube_root_pow<float> >' requested here
std::transform(s1.begin(), s1.end(), s2.begin(), s3.begin(), op);
^
transformbench.cpp:215:5: note: in instantiation of function template specialization 'time_test<std::vector<float, std::allocator<float> >, std::vector<float, std::allocator<float> >, std::vector<float, std::allocator<float> >,
cube_root_pow<float> >' requested here
time_test(v1, v2, v3, cube_root_pow<T>(), n, m);
^
transformbench.cpp:229:5: note: in instantiation of member function 'test_instructions<float, vector>::operator()' requested here
test_instructions<float, Seq>()(n, m);
^
transformbench.cpp:239:32: note: in instantiation of member function 'test_all_types<std::vector>::operator()' requested here
test_all_types<std::vector>()(n, m);
^
transformbench.cpp:142:18: note: use function 'std::abs' instead
return N(pow(abs(x + y), 1.0/3.0));
^~~
std::abs
transformbench.cpp:134:19: warning: using integer absolute value function 'abs' when argument is of floating point type [-Wabsolute-value]
return N(sqrt(abs(x + y)));
^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/stl_algo.h:4327:14: note: in instantiation of member function 'square_root<double>::operator()' requested here
*__result = __binary_op(*__first1, *__first2);
^
transformbench.cpp:152:10: note: in instantiation of function template specialization 'std::transform<__gnu_cxx::__normal_iterator<const double *, std::vector<double, std::allocator<double> > >, __gnu_cxx::__normal_iterator<const double
*, std::vector<double, std::allocator<double> > >, __gnu_cxx::__normal_iterator<double *, std::vector<double, std::allocator<double> > >, square_root<double> >' requested here
std::transform(s1.begin(), s1.end(), s2.begin(), s3.begin(), op);
^
transformbench.cpp:214:5: note: in instantiation of function template specialization 'time_test<std::vector<double, std::allocator<double> >, std::vector<double, std::allocator<double> >, std::vector<double, std::allocator<double> >,
square_root<double> >' requested here
time_test(v1, v2, v3, square_root<T>(), n, m);
^
transformbench.cpp:230:5: note: in instantiation of member function 'test_instructions<double, vector>::operator()' requested here
test_instructions<double, Seq>()(n, m);
^
transformbench.cpp:239:32: note: in instantiation of member function 'test_all_types<std::vector>::operator()' requested here
test_all_types<std::vector>()(n, m);
^
transformbench.cpp:134:19: note: use function 'std::abs' instead
return N(sqrt(abs(x + y)));
^~~
std::abs
transformbench.cpp:142:18: warning: using integer absolute value function 'abs' when argument is of floating point type [-Wabsolute-value]
return N(pow(abs(x + y), 1.0/3.0));
^
/usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/bits/stl_algo.h:4327:14: note: in instantiation of member function 'cube_root_pow<double>::operator()' requested here
*__result = __binary_op(*__first1, *__first2);
^
transformbench.cpp:152:10: note: in instantiation of function template specialization 'std::transform<__gnu_cxx::__normal_iterator<const double *, std::vector<double, std::allocator<double> > >, __gnu_cxx::__normal_iterator<const double
*, std::vector<double, std::allocator<double> > >, __gnu_cxx::__normal_iterator<double *, std::vector<double, std::allocator<double> > >, cube_root_pow<double> >' requested here
std::transform(s1.begin(), s1.end(), s2.begin(), s3.begin(), op);
^
transformbench.cpp:215:5: note: in instantiation of function template specialization 'time_test<std::vector<double, std::allocator<double> >, std::vector<double, std::allocator<double> >, std::vector<double, std::allocator<double> >,
cube_root_pow<double> >' requested here
time_test(v1, v2, v3, cube_root_pow<T>(), n, m);
^
transformbench.cpp:230:5: note: in instantiation of member function 'test_instructions<double, vector>::operator()' requested here
test_instructions<double, Seq>()(n, m);
^
transformbench.cpp:239:32: note: in instantiation of member function 'test_all_types<std::vector>::operator()' requested here
test_all_types<std::vector>()(n, m);
^
transformbench.cpp:142:18: note: use function 'std::abs' instead
return N(pow(abs(x + y), 1.0/3.0));
^~~
std::abs
6 warnings generated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment