FIAS . Impressum . Privacy

logical operations

Matthias Kretz [please enable javascript to see the address]
Tue Aug 13 10:38:32 CEST 2013


Hi Igor.

On Monday 12 August 2013 21:04:00 Kulakov, Igor wrote:
> Operations like:
> 
> ushort_m U;
> sfloat_m F;
> R =  U && F;
> 
> some times lead to incorrect result. So one needs to cast it explicitly:
> 
> R =  static_cast<sfloat_m>(U) && F;
> 
> 
> But both codes compiles without an error. Is it possible to forbid first
> code on compiler level?

That's possible. But I'd rather just fix the bug, because U && F should just 
work.
The problem is that U && F is evaluated as bool(U) && bool(F), so you get a 
single boolean answer.
I'm working on a fix and I'll track the issue at http://code.compeng.uni-frankfurt.de/issues/490

Cheers,
	Matthias

-- 
Dipl.-Phys. Matthias Kretz

Web:   http://compeng.uni-frankfurt.de/?mkretz

SIMD easy and portable: http://compeng.uni-frankfurt.de/?vc



More information about the Vc-devel mailing list
FIAS . Impressum . Privacy