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_SSE2_MINREG_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_REDUCTION_DETAIL_SSE2_MINREG_H__
17 
22 
23 namespace ipsdk {
24 namespace simd {
25 namespace detail {
26 namespace reduction {
27 
30 
32 template <typename T>
34 {
35  static IPSDK_FORCEINLINE
36  T
37  act(const typename Sse2Type<T>::Type& in)
38  {
39  const int nbElts = 16 / 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_SSE2_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
Definition of import/export macro for library.
unload function; unloads a pack into a memory buffer
Streaming SIMD Extensions 2.
Definition: InstructionSetTypes.h:36
structure used to retrieve SSE2 type associated to a base type
Definition: Sse2Types.h:32
Definition: UnloadReg.h:30