Enum NppRoundMode
Rounding Modes
The enumerated rounding modes are used by a large number of NPP primitives to allow the user to specify the method by which fractional values are converted to integer values. Also see \ref rounding_modes.
For NPP release 5.5 new names for the three rounding modes are introduced that are based on the naming conventions for rounding modes set forth in the IEEE-754 floating-point standard. Developers are encouraged to use the new, longer names to be future proof as the legacy names will be deprecated in subsequent NPP releases.
Namespace: ManagedCuda.NPP
Assembly: NPP.dll
Syntax
public enum NppRoundMode
Fields
Name | Description |
---|---|
Financial | Round according to financial rule. All fractional numbers are rounded to their nearest integer. The ambiguous cases (i.e. integer.5) are rounded away from zero. E.g.
|
Near | Round to the nearest even integer. All fractional numbers are rounded to their nearest integer. The ambiguous cases (i.e. integer.5) are rounded to the closest even integer. E.g.
|
RoundNearestTiesAwayFromZero | Round according to financial rule. All fractional numbers are rounded to their nearest integer. The ambiguous cases (i.e. integer.5) are rounded away from zero. E.g.
|
RoundNearestTiesToEven | Round to the nearest even integer. All fractional numbers are rounded to their nearest integer. The ambiguous cases (i.e. integer.5) are rounded to the closest even integer. E.g.
|
RoundTowardZero | Round towards zero (truncation). All fractional numbers of the form integer.decimals are truncated to integer.
|
Zero | Round towards zero (truncation). All fractional numbers of the form integer.decimals are truncated to integer.
|