IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
DivPack.h
Go to the documentation of this file.
1 // DivPack.h:
3 // -----------------
4 //
14 
15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_DETAIL_STD_DIVPACK_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_DETAIL_STD_DIVPACK_H__
17 
26 
27 #include <boost/type_traits/is_same.hpp>
28 #include <boost/utility/enable_if.hpp>
29 
30 namespace ipsdk {
31 namespace simd {
32 namespace detail {
33 
36 
39 template <typename TIn>
41 {
42  static
43  IPSDK_FORCEINLINE
46  {
49  }
50 
51  static
52  IPSDK_FORCEINLINE
53  void
57  {
59  DivReg<eInstructionSet::eIS_Standard, TIn> >::act(in1, in2, out);
60  }
61 };
62 
65 template <typename TIn1, typename TIn2>
66 struct DivPack<eInstructionSet::eIS_Standard, TIn1, TIn2,
67  typename boost::enable_if_c<!boost::is_same<TIn1, TIn2>::value
68  && boost::is_same<TIn1, typename PromotedType<TIn1, TIn2>::Type>::value
69  >::type>
70 {
71  static
72  IPSDK_FORCEINLINE
76  {
78  cast<eInstructionSet::eIS_Standard, TIn2, TIn1>(in2);
80  in1, in2Promoted);
81  }
82 
83  static
84  IPSDK_FORCEINLINE
85  void
89  {
91  cast<eInstructionSet::eIS_Standard, TIn2, TIn1>(in2, in2Promoted);
93  in1, in2Promoted, out);
94  }
95 };
96 
99 template <typename TIn1, typename TIn2>
101  typename boost::enable_if_c<!boost::is_same<TIn1, TIn2>::value
102  && !boost::is_same<TIn1, typename PromotedType<TIn1, TIn2>::Type>::value
103  >::type>
104 {
105  static
106  IPSDK_FORCEINLINE
110  {
112  cast<eInstructionSet::eIS_Standard, TIn1, TIn2>(in1);
114  in1Promoted, in2);
115  }
116 
117  static
118  IPSDK_FORCEINLINE
119  void
123  {
125  cast<eInstructionSet::eIS_Standard, TIn1, TIn2>(in1, in1Promoted);
127  in1Promoted, in2, out);
128  }
129 };
130 
133 
134 } // end of namespace detail
135 } // end of namespace simd
136 } // end of namespace ipsdk
137 
138 #endif // __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_DETAIL_STD_DIVPACK_H__
Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Definition: DivReg.h:39
cast function; casts a Pack<instructionSet, TIn> to a Pack<instructionSet, TOut>
Definition: DivPack.h:40
BasePack class; defines a set of scalars (for instruction set "standard") or registers (for all other...
eInstructionSet
Enumerate for processor instruction set description.
Definition: InstructionSetTypes.h:31
defines template structures PromotedType<T1, T2> and PromotedType3<T1, T2, T3>; their attribute Type ...
Predefined types associated to instruction set management.
Definition of import/export macro for library.
compiler optimisations only
Definition: InstructionSetTypes.h:34
Definition: BinaryPackOp.h:31
structure containing intrinsic registers used to store vectorized data
Definition: BasePackDecl.h:29