IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Namespaces | Functions
roundToEven.h File Reference

roundToEven function; returns the even integral value closest to input value More...

#include <IPSDKUtil/IPSDKUtilExports.h>
#include <IPSDKUtil/InstructionSet/Arithmetic/detail/RoundToEvenPack.h>
#include <IPSDKUtil/InstructionSet/IS2Pack.h>
#include <IPSDKUtil/Tools/ForceInline.h>

Go to the source code of this file.

Namespaces

 ipsdk
 Main namespace for IPSDK library.
 
 ipsdk::simd
 Namespace agregating IPSDK SIMD routines and classes.
 

Functions

template<eInstructionSet::domain instructionSet, class PackT >
IPSDK_FORCEINLINE PackT ipsdk::simd::roundToEven (const PackT &in)
 
template<eInstructionSet::domain instructionSet, class PackT >
IPSDK_FORCEINLINE void ipsdk::simd::roundToEven (const PackT &in, PackT &out)
 

Detailed Description

roundToEven function; returns the even integral value closest to input value

Author
H. Delestre
Date
2017/03/28

given a pack P, with P = {p1, ..., pn}, roundToEven(P) returns R, with R ={ roundToEven(p1), ..., roundToEven(pn)}

ex.: roundToEven(P) = R, with P = {1.2, 1.5, 1.9, -3.2, -3.5, -3.8, 0.0, 10.0} and R = {2, 2, 2, -4, -4, -4, 0, 10}