IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
CeilReg.h
1 // CeilReg.h:
3 // -------------------
4 //
14 
15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_DETAIL_AVX512_CEILREG_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_DETAIL_AVX512_CEILREG_H__
17 
21 #include <IPSDKUtil/InstructionSet/Arithmetic/detail/CeilReg.h>
23 
24 #include "immintrin.h"
25 
26 namespace ipsdk {
27 namespace simd {
28 namespace detail {
29 
32 
35 template <>
37 {
38  static IPSDK_FORCEINLINE
40  act(const Avx512Type<ipReal32>::Type& in)
41  {
43  act(in, out);
44  return out;
45  }
46 
47  static IPSDK_FORCEINLINE
48  void
49  act(const Avx512Type<ipReal32>::Type& in,
51  {
52  out = _mm512_roundscale_ps(in, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
53  }
54 };
55 
58 template <>
60 {
61  static IPSDK_FORCEINLINE
63  act(const Avx512Type<ipReal64>::Type& in)
64  {
66  act(in, out);
67  return out;
68  }
69 
70  static IPSDK_FORCEINLINE
71  void
72  act(const Avx512Type<ipReal64>::Type& in,
74  {
75  out = _mm512_roundscale_pd(in, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
76  }
77 };
78 
81 
82 } // end of namespace detail
83 } // end of namespace simd
84 } // end of namespace ipsdk
85 
86 #endif // __IPSDKUTIL_INSTRUCTIONSET_ARITHMETIC_DETAIL_AVX512_CEILREG_H__
Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
template structure which is specialized to implement the computation of value rounded to closest even...
Definition: CeilReg.h:36
double ipReal64
Base types definition.
Definition: BaseTypes.h:57
(including fundation and byte and word instructions)
Definition: InstructionSetTypes.h:51
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
Predefined types for Avx512 instruction set management.
Definition of import/export macro for library.
float ipReal32
Base types definition.
Definition: BaseTypes.h:56
structure used to retrieve AVX512 type associated to a base type
Definition: Avx512Types.h:36