On 11/27/2013 3:41 PM, John Harper wrote:
> At present some compilers deal with the statement
> x = merge(tsource,fsource,mask)
> by first evaluating mask and then whichever of tsource and fsource is
> needed, while others evaluate all three arguments of merge. That makes
> merge less useful than it would otherwise be, because evaluating
> the "wrong" one of tsource and fsource might trigger an exception.
> Is there any chance that a future standard might require tsource to
> be evaluated if and only if mask is true, and fsource to be evaluated
> if and only if mask is false?
>
> -- John Harper, School of Mathematics Statistics and Operations Research
> Victoria University, PO Box 600, Wellington 6140, New Zealand
> e-mail [log in to unmask] phone (+64)(4)463 5276 fax (+64)(4)463 5045
Compilers I use require a directive such as !$omp simd to enable
speculative execution where it may incur exception on discarded
results. Ability to request such optimization is needed for
performance, as is the ability to avoid the extra exceptions.
--
Tim Prince
|