IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
CeilReg.h
1 // CeilReg.h:
3 // -------------------
4 //
14 
15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_DETAIL_COMMON_CEILREG_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_DETAIL_COMMON_CEILREG_H__
17 
20 #include <IPSDKUtil/InstructionSet/Arithmetic/detail/CeilReg.h>
21 #include <IPSDKUtil/InstructionSet/Arithmetic/detail/RoundToEvenReg.h>
22 #include <IPSDKUtil/InstructionSet/Arithmetic/detail/AddReg.h>
23 #include <IPSDKUtil/InstructionSet/Arithmetic/detail/ConditionalAddReg.h>
27 
28 namespace ipsdk {
29 namespace simd {
30 namespace detail {
31 
34 
36 template <eInstructionSet::domain IS>
37 struct CeilReg<IS, ipReal32>
38 {
39  static IPSDK_FORCEINLINE
41  act(const typename RegType<IS, ipReal32>::Type& in)
42  {
43  typename RegType<IS, ipReal32>::Type out;
44  act(in, out);
45  return out;
46  }
47 
48  static IPSDK_FORCEINLINE
49  void
50  act(const typename RegType<IS, ipReal32>::Type& in,
51  typename RegType<IS, ipReal32>::Type& out)
52  {
53  typedef typename RegType<IS, ipReal32>::Type Reg;
54  typedef typename RegMaskType<IS, ipReal32>::Type RegMask;
55  Reg inRoundToEven;
56  RoundToEvenReg<IS, ipReal32>::act(in, inRoundToEven);
57  RegMask inRoundToEvenLTIn;
58  IsLessReg<IS, ipReal32>::act(inRoundToEven, in, inRoundToEvenLTIn);
59  ConditionalAddReg<IS, ipReal32>::act(inRoundToEvenLTIn, inRoundToEven, 1.0f, out);
60  }
61 };
62 
65 
66 } // end of namespace detail
67 } // end of namespace simd
68 } // end of namespace ipsdk
69 
70 #endif // __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_DETAIL_COMMON_CEILREG_H__
Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
template structure which is specialized to implement the computation of value rounded to closest even...
Definition: CeilReg.h:36
RegType class.
Definition: ConditionalAddReg.h:36
Definition of import/export macro for library.
template structure which is specialized to implement the computation of value rounded to closest even...
Definition: RoundToEvenReg.h:36
Definition: RegMaskType.h:29
Definition: IsLessRegDecl.h:30
Definition: RegType.h:29
float ipReal32
Base types definition.
Definition: BaseTypes.h:56