IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
conditionalAdd.h
Go to the documentation of this file.
1 // conditionalAdd.h:
3 // -----------------
4 //
14 
15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_CONDITIONALADD_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_CONDITIONALADD_H__
17 
19 
23 
24 namespace ipsdk {
25 namespace simd {
26 
29 
30 template <eInstructionSet::domain instructionSet,
31  ePackType::domain packType,
32  typename T>
33 IPSDK_FORCEINLINE
34 BasePack<packType, T>
35 conditionalAdd(
36  const BaseMaskPack<packType, T>& mask,
37  const BasePack<packType, T>& in1,
38  const BasePack<packType, T>& in1)
39 {
40  return detail::ConditionalAddPack<instructionSet, T>::act(mask, in1, in2);
41 }
42 
43 template <eInstructionSet::domain instructionSet,
44  ePackType::domain packType,
45  typename T>
46 IPSDK_FORCEINLINE
47 void
48 conditionalAdd(
49  const BaseMaskPack<packType, T>& mask,
50  const BasePack<packType, T>& in1,
51  const BasePack<packType, T>& in2,
52  BasePack<packType, T>& out)
53 {
54  typedef typename PackT::DataType T;
55  detail::ConditionalAddPack<instructionSet, T>::act(mask, in1, in2, out);
56 }
57 
60 
61 } // end of namespace simd
62 } // end of namespace ipsdk
63 
64 #endif // __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_CONDITIONALADD_H__
Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
defines template structures PromotedType<T1, T2> and PromotedType3<T1, T2, T3>; their attribute Type ...
Vector DataType
data type used for estimation
Definition: EstimationTypes.h:58
Definition of import/export macro for library.
ConditionalAddPack<eInstructionSet::domain instructionSet, typename TIn1, typename TIn2...