IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
SqrtReg.h
Go to the documentation of this file.
1 // SqrtReg.h:
3 // -------------------
4 //
14 
15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_DETAIL_STD_SQRTREG_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_DETAIL_STD_SQRTREG_H__
17 
21 #include <cmath>
22 
23 namespace ipsdk {
24 namespace simd {
25 namespace detail {
26 
29 
32 template <>
34 {
35  static IPSDK_FORCEINLINE
36  ipReal32
37  act(const ipReal32& in)
38  {
39  return std::sqrt(in);
40  }
41 
42  static IPSDK_FORCEINLINE
43  void
44  act(const ipReal32& in, ipReal32& out)
45  {
46  out = std::sqrt(in);
47  }
48 };
49 
52 template <>
54 {
55  static IPSDK_FORCEINLINE
56  ipReal64
57  act(const ipReal64& in)
58  {
59  return std::sqrt(in);
60  }
61 
62  static IPSDK_FORCEINLINE
63  void
64  act(const ipReal64& in, ipReal64& out)
65  {
66  out = std::sqrt(in);
67  }
68 };
69 
72 
73 } // end of namespace detail
74 } // end of namespace simd
75 } // end of namespace ipsdk
76 
77 #endif // __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_DETAIL_STD_SQRTREG_H__
Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Definition: SqrtReg.h:39
IPSDK_FORCEINLINE PackT sqrt(const PackT &in)
returns the square root of a pack
Definition: sqrt.h:40
double ipReal64
Base types definition.
Definition: BaseTypes.h:57
BasePack class; defines a set of scalars (for instruction set "standard") or registers (for all other...
eInstructionSet
Enumerate for processor instruction set description.
Definition: InstructionSetTypes.h:31
Definition of import/export macro for library.
compiler optimisations only
Definition: InstructionSetTypes.h:34
float ipReal32
Base types definition.
Definition: BaseTypes.h:56