IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
PowReg.h
Go to the documentation of this file.
1 // PowReg.h:
3 // -------------------
4 //
14 
15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_DETAIL_STD_POWREG_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_DETAIL_STD_POWREG_H__
17 
20 #include <IPSDKUtil/InstructionSet/Arithmetic/detail/PowReg.h>
21 
22 #include <math.h>
23 
24 namespace ipsdk {
25 namespace simd {
26 namespace detail {
27 
30 
32 template <typename T>
34 {
35  static IPSDK_FORCEINLINE
36  T
37  act(const T& base, const T& exp)
38  {
39  return std::pow(base, exp);
40  }
41 
42  static IPSDK_FORCEINLINE
43  void
44  act(const T& base, const T& exp, T& out)
45  {
46  out = std::pow(base, exp);
47  }
48 };
49 
52 
53 } // end of namespace detail
54 } // end of namespace simd
55 } // end of namespace ipsdk
56 
57 #endif // __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_DETAIL_STD_POWREG_H__
Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
eInstructionSet
Enumerate for processor instruction set description.
Definition: InstructionSetTypes.h:31
IPSDK_FORCEINLINE PackT pow(const PackT &in1, const PackT &in2)
given 2 input packs in1 and in2, returns exp(in2.log(in1))
Definition: pow.h:41
Definition of import/export macro for library.
template structure which is specialized to implement the computation of pow function on scalars or re...
Definition: PowReg.h:38
compiler optimisations only
Definition: InstructionSetTypes.h:34