IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
bitwiseSelect.h
Go to the documentation of this file.
1 // bitwiseSelect.h:
3 // -----------------
4 //
14 
15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_LOGICAL_BITWISESELECT_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_LOGICAL_BITWISESELECT_H__
17 
19 
24 
25 namespace ipsdk {
26 namespace simd {
27 
30 
33 
34 template <eInstructionSet::domain instructionSet, class PackT>
35 IPSDK_FORCEINLINE
36 PackT
37 bitwiseSelect(const PackT& mask, const PackT& in1, const PackT& in2)
38 {
39  typedef typename PackT::DataType T;
40  return detail::TernaryPackOp<instructionSet, T,
41  detail::BitwiseSelectReg<instructionSet, T> >::act(mask, in1, in2);
42 }
43 
44 template <eInstructionSet::domain instructionSet, class PackT>
45 IPSDK_FORCEINLINE
46 void
47 bitwiseSelect(const PackT& mask, const PackT& in1, const PackT& in2,
48  PackT& out)
49 {
50  typedef typename PackT::DataType T;
51  detail::TernaryPackOp<instructionSet, T,
52  detail::BitwiseSelectReg<instructionSet, T> >::act(mask, in1, in2, out);
53 }
54 
57 
58 } // end of namespace simd
59 } // end of namespace ipsdk
60 
61 #endif // __IPSDKUTIL_INSTRUCTIONSET_LOGICAL_BITWISESELECT_H__
Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Definition: BitwiseSelectReg.h:30
Definition: TernaryPackOp.h:31
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.
IPSDK_FORCEINLINE PackT bitwiseSelect(const PackT &mask, const PackT &in1, const PackT &in2)
bitwiseSelect function; vectorized arithmetic addition of data contained in 2 Register structures ...
Definition: bitwiseSelect.h:37