tft_ir_api.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:FPTuner 作者: soarlab 项目源码 文件源码
def FConst (fpn): 
    global CONST_ID 

    assert((type(fpn) is float) or (isinstance(fpn, Fraction))) 
    # return tft_expr.ConstantExpr(fpn)

    const_value = tft_expr.ConstantExpr( fpn ) 
    const_name  = tft_expr.PRESERVED_CONST_VPREFIX + "_" + str(CONST_ID) 
    CONST_ID    = CONST_ID + 1 

    return DeclareBoundedVar(const_name, 
                             Fraction, 
                             tft_expr.PRESERVED_CONST_GID, 
                             const_value, const_value, 
                             True)                              


# NOTE: Please don't call this function internally...
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号