IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
div.h
Go to the documentation of this file.
1 // div.h:
3 // -----------------
4 //
16 
17 #ifndef __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_DIV_H__
18 #define __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_DIV_H__
19 
21 
25 
26 namespace ipsdk {
27 namespace simd {
28 
31 /*
36 template <eInstructionSet::domain instructionSet,
37  typename TIn1, typename TIn2, typename TOut>
38 IPSDK_FORCEINLINE
39 typename IS2Pack<instructionSet,
40  typename PromotedType<TIn1, TIn2>::Type>::Type
41 div(const typename IS2Pack<instructionSet, TIn1>::Type& a,
42  const typename IS2Pack<instructionSet, TIn2>::Type& b)
43 {
44  return detail::DivPack<instructionSet, TIn1, TIn2>::act(a, b);
45 }
46 
47 template <eInstructionSet::domain instructionSet,
48  typename TIn1, typename TIn2, typename TOut>
49 IPSDK_FORCEINLINE
50 void
51 div(const typename IS2Pack<instructionSet, TIn1>::Type& in1,
52  const typename IS2Pack<instructionSet, TIn2>::Type& in2,
53  typename IS2Pack<instructionSet, TOut>::Type& out)
54 {
55  detail::DivPack<instructionSet, TIn1, TIn2>::act(in1, in2, out);
56 }
57 
59 template <eInstructionSet::domain instructionSet, typename TIn1, typename TIn2>
60 IPSDK_FORCEINLINE
61 typename IS2Pack<instructionSet, typename PromotedType<TIn1, TIn2>::Type>::Type
62 operator/(const typename IS2Pack<instructionSet, TIn1>::Type& a,
63  const typename IS2Pack<instructionSet, TIn2>::Type& b)
64 {
65  typedef typename PromotedType<TIn1, TIn2>::Type PromType;
66  return div<instructionSet, TIn1, TIn2, PromType>(a, b);
67 }*/
68 
69 template <eInstructionSet::domain instructionSet, class PackT>
70 IPSDK_FORCEINLINE
71 PackT
72 div(const PackT& in1, const PackT& in2)
73 {
74  typedef typename PackT::DataType T;
75  return detail::DivPack<instructionSet, T, T>::act(in1, in2);
76 }
77 
78 template <eInstructionSet::domain instructionSet, class PackT>
79 IPSDK_FORCEINLINE
80 void
81 div(const PackT& in1, const PackT& in2, PackT& out)
82 {
83  typedef typename PackT::DataType T;
84  detail::DivPack<instructionSet, T, T>::act(in1, in2, out);
85 }
86 
89 
90 } // end of namespace simd
91 } // end of namespace ipsdk
92 
93 #endif // __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_DIV_H__
Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
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.
structure DivPack<typename TIn1, typename TIn2, typename Enable=void>