IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
MaxReg.h
Go to the documentation of this file.
1 // MaxReg.h:
3 // -------------------
4 //
14 
15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_REDUCTION_DETAIL_AVX_MAXREG_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_REDUCTION_DETAIL_AVX_MAXREG_H__
17 
21 
22 namespace ipsdk {
23 namespace simd {
24 namespace detail {
25 namespace reduction {
26 
29 
32 template <>
34 {
35  static IPSDK_FORCEINLINE
36  ipReal32
37  act(const AvxType<ipReal32>::Type& in)
38  {
39  ipReal32 unloaded[8];
41  ipReal32 tmax = unloaded[0];
42  for(int i=1; i<8; ++i) {
43  tmax = (unloaded[i] > tmax ? unloaded[i] : tmax);
44  }
45  return tmax;
46  }
47 };
48 
51 template <>
53 {
54  static IPSDK_FORCEINLINE
55  ipReal64
56  act(const AvxType<ipReal64>::Type& in)
57  {
58  ipReal64 unloaded[4];
60  ipReal64 tmax = unloaded[0];
61  for(int i=1; i<4; ++i) {
62  tmax = (unloaded[i] > tmax ? unloaded[i] : tmax);
63  }
64  return tmax;
65  }
66 };
67 
70 
71 } // end of namespace reduction
72 } // end of namespace detail
73 } // end of namespace simd
74 } // end of namespace ipsdk
75 
76 #endif // __IPSDKUTIL_INSTRUCTIONSET_REDUCTION_DETAIL_AVX_MAXREGIMPL_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>
double ipReal64
Base types definition.
Definition: BaseTypes.h:57
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
float ipReal32
Base types definition.
Definition: BaseTypes.h:56