Main Content

このページの翻訳は最新ではありません。ここをクリックして、英語の最新版を参照してください。

防御的プログラミング

防御的コードと効率的なコードのトレードオフを取る

生成済みコードの効率を向上させるには、非正規数計算を実行するコードを削除したり、シミュレーション結果とコード生成結果との間で不一致の可能性を防ぐコードを削除します。

トピック

Remove Code From Floating-Point to Integer Conversions That Wraps Out-of-Range Values

If the input values in your application are in the range of the output type, remove code for out-of-range floating-point to integer conversions.

Remove Code That Maps NaN to Integer Zero

If input values of NaN do not exist in your application, specify that the code generator remove code that maps NaN to integer zero.

Disable Nonfinite Checks or Inlining for Math Functions

Use code replacement library (CRL) customization entries to selectively disable nonfinite checks for math functions and inlining of math functions.

Subnormal Number Execution Speed

Minimize the possibility of execution slowdowns or overruns due to subnormal number calculation latency.

Remove Code That Guards Against Division Exceptions for Integers and Fixed-Point Data

Optimize the generated code by removing code that protects against division by zero and overflows in division INT_MIN/-1 operations for integers and fixed-point data.

Remove Code from Tunable Parameter Expressions That Saturate Against Integer Overflow

Remove code that prevents integer overflow of tunable expression parameters for efficiency benefits.