IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
saturated_cast.h
1 // saturated_cast.h:
3 // ------------
4 //
16 
17 #ifndef __IPSDKUTIL_INSTRUCTIONSET_SATURATED_CAST_H__
18 #define __IPSDKUTIL_INSTRUCTIONSET_SATURATED_CAST_H__
19 
23 
24 namespace ipsdk {
25 namespace simd {
26 
29 
33 template <eInstructionSet::domain instructionSet, typename TOut, class PackIn>
34 IPSDK_FORCEINLINE
36 saturated_cast(const PackIn& in)
37 {
38  typedef typename PackIn::DataType TIn;
40 }
41 
42 template <eInstructionSet::domain instructionSet, class PackIn, class PackOut>
43 IPSDK_FORCEINLINE
44 void
45 saturated_cast(const PackIn& in, PackOut& out)
46 {
47  typedef typename PackIn::DataType TIn;
48  typedef typename PackOut::DataType TOut;
49  detail::SaturatedCastPack<instructionSet, TIn, TOut>::act(in, out);
50 }
51 
54 
55 } // end of namespace simd
56 } // end of namespace ipsdk
57 
58 #endif // __IPSDKUTIL_INSTRUCTIONSET_SATURATED_CAST_H__
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Definition: SaturatedCastPack.h:33
IPSDK_FORCEINLINE ipsdk::simd::IS2Pack< instructionSet, TOut >::Type saturated_cast(const PackIn &in)
casts from PackIn type to PackOut type
Definition: saturated_cast.h:36
Vector DataType
data type used for estimation
Definition: EstimationTypes.h:58
Definition of import/export macro for library.
Definition: IS2Pack.h:34