IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
IfElse0Reg.h
Go to the documentation of this file.
1 // IfElse0Reg.h:
3 // -------------------
4 //
14 
15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_LOGICAL_DETAIL_STD_IFELSE0REG_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_LOGICAL_DETAIL_STD_IFELSE0REG_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& in)
36  {
37  return mask ? in : 0;
38  }
39 
40  static IPSDK_FORCEINLINE
41  void
42  act(const T& mask,
43  const T& in,
44  T& out)
45  {
46  out = (mask ? in : 0);
47  }
48 };
49 
52 
53 } // end of namespace detail
54 } // end of namespace simd
55 } // end of namespace ipsdk
56 
57 #endif // __IPSDKUTIL_INSTRUCTIONSET_LOGICAL_DETAIL_STD_IFELSE0REG_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: IfElse0Reg.h:33
Definition of import/export macro for library.
compiler optimisations only
Definition: InstructionSetTypes.h:34