所谓的“固定"意味着什么.漂浮? [英] What is meant by "fixing up" floats?

查看:89
本文介绍了所谓的“固定"意味着什么.漂浮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在浏览AVX-512中的指令集,发现有一组fixup指令.一些示例:

I was looking through the instruction set in AVX-512 and noticed a set of fixup instructions. Some examples:

_mm512_fixupimm_pd, 
_mm512_mask_fixupimm_pd, 
_mm512_maskz_fixupimm_pd

_mm512_fixupimm_round_pd, 
_mm512_mask_fixupimm_round_pd, 
_mm512_maskz_fixupimm_round_pd

这里的修复"是什么意思?

What is meant here by "fixing up"?

推荐答案

这是一个很好的问题.英特尔的答案(我的粗体字是):

That's a great question. Intel's answer (my bold) is here:

此说明专门用于修复 涉及一个来源的算术计算的结果,因此它们 符合规格,尽管通常可用于固定 多指令序列反映特殊数字的结果 输入.例如,考虑rcp(0). 将0输入到rcp,您应该 根据DX10规范获得INF.但是,通过以下方式评估rcp Newton-Raphson,其中x = approx(1/0),产生错误的结果.到 为了解决这个问题,可以在N-R倒数后使用VFIXUPIMMPS 将结果设置为正确值的顺序(即,当 输入为0).

This instruction is specifically intended for use in fixing up the results of arithmetic calculations involving one source so that they match the spec, although it is generally useful for fixing up the results of multiple-instruction sequences to reflect special-number inputs. For example, consider rcp(0). Input 0 to rcp, and you should get INF according to the DX10 spec. However, evaluating rcp via Newton-Raphson, where x=approx(1/0), yields an incorrect result. To deal with this, VFIXUPIMMPS can be used after the N-R reciprocal sequence to set the result to the correct value (i.e. INF when the input is 0).

在以下位置查找VFIXUPIMMPD:

Look for VFIXUPIMMPD in:

https://software.intel. com/sites/default/files/managed/0d/53/319433-022.pdf

这篇关于所谓的“固定"意味着什么.漂浮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆