IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
MinReg.h
Go to the documentation of this file.
1 // MinReg.h:
3 // -------------------
4 //
14 
15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_REDUCTION_DETAIL_AVX2_MINREG_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_REDUCTION_DETAIL_AVX2_MINREG_H__
17 
21 
22 namespace ipsdk {
23 namespace simd {
24 namespace detail {
25 namespace reduction {
26 
29 
32 template <typename T>
34 {
35  static IPSDK_FORCEINLINE
36  T
37  act(const typename AvxType<T>::Type& in)
38  {
39  const int nbElts = 32 / sizeof(T);
40  T unloaded[nbElts];
42  T tmin = unloaded[0];
43  for(int i=1; i<nbElts; ++i) {
44  tmin = (unloaded[i] < tmin ? unloaded[i] : tmin);
45  }
46  return tmin;
47  }
48 };
49 
52 
53 } // end of namespace reduction
54 } // end of namespace detail
55 } // end of namespace simd
56 } // end of namespace ipsdk
57 
58 #endif // __IPSDKUTIL_INSTRUCTIONSET_REDUCTION_DETAIL_AVX2_MINREG_H__
Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
cast function; casts a Pack<instructionSet, TIn> to a Pack<instructionSet, TOut>
eInstructionSet
Enumerate for processor instruction set description.
Definition: InstructionSetTypes.h:31
Advanced Vector Extensions 2.
Definition: InstructionSetTypes.h:48
Definition of import/export macro for library.
structure used to retrieve AVX type associated to a base type
Definition: AvxTypes.h:33
Definition: UnloadReg.h:30