Closed milianw closed 5 years ago
This is unfortunate. You can work around the issue by using an int
instead of size_t
: https://godbolt.org/z/QHC5p9.
I believe the return type of Vector::size()
shouldn't be size_t
(which it is for consistency with all the other size()
functions in the STL) but rather just int
. (Please comment on https://github.com/mattkretz/wg21-papers/issues/72 if you want to support this change. I'll include it in the feedback to the C++ committee then.)
For now there's nothing I can/want to change. Rather I'd have to change SimdArray
to make it ill-formed as well.
Testcase
Based on the mandelbrot example: https://godbolt.org/z/0K1zvC
I have just realized that the mandelbrot is actually using a custom
uint_v
anduint_m
, which isn'tVc::uint_v
orVc::uint_m
, but rather aVc::SimdArray<uint, Vc::float_v::Size>
. But why can't we get the same nice API forVc::uint_v
?Actual Results
Expected Results
should compile fine without issues. For now, I workaround this via https://godbolt.org/z/pEU_WP. but I'll now also look at porting to
SimdArray
for the indices.