发明名称 Code evaluation of fixed-point math in the presence of customizable fixed-point typing rules
摘要 Systems and methods are provided for using partial evaluation techniques to efficiently generate code for a fixed-point operation. The present invention uses partial evaluation techniques to evaluate a fixed-point rule of a fixed-point operation. The fixed-point rules, which may be customized by a user, determine the data type of the result or output of the operation. Although the values of all the inputs may not be known at code generation time, the present invention determines via static or known information associated with the input the portion of the fixed-point rule known at code generation time. As such, the present invention can generate more efficient code by generating code representing the static analysis of the inputs and fixed-point typing rules of the fixed-point operation.
申请公布号 US9075630(B1) 申请公布日期 2015.07.07
申请号 US200511274721 申请日期 2005.11.14
申请人 The MathWorks, Inc. 发明人 Smith Frederick Mattsson;Bottema Alexander Jean-Claude
分类号 G06F9/45 主分类号 G06F9/45
代理机构 Harrity & Harrity, LLP 代理人 Harrity & Harrity, LLP
主权项 1. A method performed by an electronic device, the method comprising: identifying, by the electronic device, a fixed-point operation in a first representation, the fixed-point operation utilizing a first operand and a second operand,the first operand having a first data type comprising a first slope value and a first bias value,the second operand having a second data type comprising a second slope value and a second bias value, andthe first slope value being different from the second slope value or the first bias value being different from the second bias value; determining, by the electronic device, a fixed-point typing rule based on the first data type of the first operand and the second data type of the second operand; associating, by the electronic device, the fixed-point typing rule as an attribute of a portion of a graphical model; determining, by the electronic device and at compile time, that the first data type of the first operand and the second data type of the second operand are known; determining, by the electronic device, a result data type of an output of the fixed-point operation based on the fixed-point typing rule, the first data type of the first operand, and the second data type of the second operand; generating, by the electronic device and for the graphical model, a second representation of the fixed-point operation based on determining the result data type; evaluating, by the electronic device and during execution, the fixed-point operation based on the second representation; and generating, by the electronic device and based on evaluating the second representation, the output of the fixed-point operation having the result data type.
地址 Natick MA US