IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
IfElseReg.h
Go to the documentation of this file.
1 // IfElseReg.h:
3 // -------------------
4 //
14 
15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_LOGICAL_DETAIL_STD_IFELSEREG_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_LOGICAL_DETAIL_STD_IFELSEREG_H__
17 
21 
22 namespace ipsdk {
23 namespace simd {
24 namespace detail {
25 
28 
29 template <typename T>
31 {
32  static IPSDK_FORCEINLINE
33  T
34  act(const T& mask,
35  const T& in1,
36  const T& in2)
37  {
38  return mask ? in1 : in2;
39  }
40 
41  static IPSDK_FORCEINLINE
42  void
43  act(const T& mask,
44  const T& in1,
45  const T& in2,
46  T& out)
47  {
48  out = (mask ? in1 : in2);
49  }
50 };
51 
54 
55 } // end of namespace detail
56 } // end of namespace simd
57 } // end of namespace ipsdk
58 
59 #endif // __IPSDKUTIL_INSTRUCTIONSET_LOGICAL_DETAIL_STD_IFELSEREG_H__
Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
eInstructionSet
Enumerate for processor instruction set description.
Definition: InstructionSetTypes.h:31
Definition of import/export macro for library.
Definition: IfElseReg.h:33
compiler optimisations only
Definition: InstructionSetTypes.h:34