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

fmadd function; returns the result of a multiplication followed by an addition of all the elements of 3 input pack operandes More...

#include <IPSDKUtil/IPSDKUtilExports.h>
#include <IPSDKUtil/InstructionSet/Arithmetic/detail/FmaddPack.h>
#include <IPSDKUtil/InstructionSet/PromotedType.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::fmadd (const PackT &in1, const PackT &in2, const PackT &in3)
 
template<eInstructionSet::domain instructionSet, class PackT >
IPSDK_FORCEINLINE void ipsdk::simd::fmadd (const PackT &in1, const PackT &in2, const PackT &in3, PackT &out)
 

Detailed Description

fmadd function; returns the result of a multiplication followed by an addition of all the elements of 3 input pack operandes

Author
H. Delestre
Date
2014/02/24

given 3 packs A, B and C with A = {a1, ..., an}, B = {b1, ..., bn} and C = {c1, ..., cn}, fmadd(A, B, C) returns D, with D ={ a1*b1+b1, ..., an*bn+cn}

Note
fmadd is a real fused multiply-add operation (with only one rounding) only if instructionSet equals to FMA3 or Standard; in other cases, fmadd corresponds to a multiplication followed by an addition, with 2 roundings, so results may slightly differ