IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
add.h
Go to the documentation of this file.
1 // add.h:
3 // -----------------
4 //
17 
18 #ifndef __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_ADD_H__
19 #define __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_ADD_H__
20 
22 
26 
27 namespace ipsdk {
28 namespace simd {
29 
32 
33 template <eInstructionSet::domain instructionSet,
34  class PackT>
35 IPSDK_FORCEINLINE
36 PackT
37 add(const PackT& in1, const PackT& in2)
38 {
39  typedef typename PackT::DataType T;
40  return detail::AddPack<instructionSet, T, T>::act(in1, in2);
41 }
42 
43 template <eInstructionSet::domain instructionSet,
44  class PackT>
45 IPSDK_FORCEINLINE
46 void
47 add(const PackT& in1, const PackT& in2, PackT& out)
48 {
49  typedef typename PackT::DataType T;
50  detail::AddPack<instructionSet, T, T>::act(in1, in2, out);
51 }
52 
53 /*
56 template <eInstructionSet::domain instructionSet, typename TIn1, typename TIn2>
57 IPSDK_FORCEINLINE
58 typename IS2Pack<instructionSet, typename PromotedType<TIn1, TIn2>::Type>::Type
59 operator+(const typename IS2Pack<instructionSet, TIn1>::Type& a,
60  const typename IS2Pack<instructionSet, TIn2>::Type& b)
61 {
62  typedef typename PromotedType<TIn1, TIn2>::Type PromType;
63  return add<instructionSet, TIn1, TIn2, PromType>(a, b);
64 }*/
65 
66 
69 
70 } // end of namespace simd
71 } // end of namespace ipsdk
72 
73 #endif // __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_ADD_H__
Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
AddPack<eInstructionSet::domain instructionSet, typename TIn1, typename TIn2, typename Enable=void> s...
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.