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_AVX_MINREG_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_REDUCTION_DETAIL_AVX_MINREG_H__
17 
22 
23 namespace ipsdk {
24 namespace simd {
25 namespace detail {
26 namespace reduction {
27 
30 
33 template <typename T>
35 {
36  static IPSDK_FORCEINLINE
37  T
38  act(const typename AvxType<T>::Type& in)
39  {
40  const int nbElts = 32 / sizeof(T);
41  T unloaded[nbElts];
43  T tmin = unloaded[0];
44  for(int i=1; i<nbElts; ++i) {
45  tmin = (unloaded[i] < tmin ? unloaded[i] : tmin);
46  }
47  return tmin;
48  }
49 };
50 
53 
54 } // end of namespace reduction
55 } // end of namespace detail
56 } // end of namespace simd
57 } // end of namespace ipsdk
58 
59 #endif // __IPSDKUTIL_INSTRUCTIONSET_REDUCTION_DETAIL_AVX_MINREG_H__
Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
template structure, specialized to implement the computation of the minimum of the elements loaded in...
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.
Definition: InstructionSetTypes.h:44
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