conversion of Vector<double> to Vector<long>
Kay F. Jahnke
[please enable javascript to see the address]
Sun Mar 27 12:51:32 CEST 2016
Hi group!
I'm trying to convert a Vector<double> to a Vector<long> - or
Vector<llong>. While casting Vector<float> to Vector<int> works just
fine, the code for Vector<double> to Vector<long> won't compile.
I tried both conventional cast and simd_cast, but neither works. Here's
the code I can't get to compile:
Vc::Vector<double> dv ;
Vc::Vector<long> lv ( dv ) ;
lv = Vc::Vector<long> ( dv ) ; // fails
lv = Vc::simd_cast < Vc::Vector<long> > ( dv ) ; // fails as well
I'm using a core i5 running Kubuntu 14.04.04 with gcc 4.8.4 and Vc
1.2.0-dev up-to-date from the repo as per today.
I'd really like the cast to work, so that I can write generic code
running both with the int/float and the long/double combinations. The
sizes of the underlying types match, both are 8 bytes long.
Am I maybe missing something, like a conversion routine I haven't found
in the docs?
with regards
Kay F. Jahnke
More information about the Vc
mailing list