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

truncate function; returns the nearest integer not greater in magnitude than input value More...

#include <IPSDKUtil/IPSDKUtilExports.h>
#include <IPSDKUtil/InstructionSet/Arithmetic/detail/TruncatePack.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::truncate (const PackT &in)
 
template<eInstructionSet::domain instructionSet, class PackT >
IPSDK_FORCEINLINE void ipsdk::simd::truncate (const PackT &in, PackT &out)
 

Detailed Description

truncate function; returns the nearest integer not greater in magnitude than input value

Author
H. Delestre
Date
2018/02/07

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

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