IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
CopyImpl.h
Go to the documentation of this file.
1 // CopyImpl.h:
3 // ------------
4 //
14 
15 #ifndef __IPSDKUTIL_INSTRUCTIONSET_DETAIL_AVX2_COPYIMPL_H__
16 #define __IPSDKUTIL_INSTRUCTIONSET_DETAIL_AVX2_COPYIMPL_H__
17 
23 
24 namespace ipsdk {
25 namespace simd {
26 namespace detail {
27 
30 
31 template <typename T>
33  static IPSDK_FORCEINLINE
34  void act(T* dest, const T* src, ipUInt64 nbElts)
35  {
36  const ipUInt64 nbAlignedElts =
38 
39  typename AvxType<T>::Type reg;
40 
41  for(ipUInt64 i=0; i<nbAlignedElts; i+=NbEltsPerReg<ePackType::ePT_Avx, T>::Value) {
44  }
45 
46  memcpy(reinterpret_cast<void*>(dest+nbAlignedElts),
47  reinterpret_cast<const void*>(src +nbAlignedElts),
48  (nbElts-nbAlignedElts)*sizeof(T));
49  }
50 };
51 
54 
55 } // end of namespace detail
56 } // end of namespace simd
57 } // end of namespace ipsdk
58 
59 #endif // __IPSDKUTIL_INSTRUCTIONSET_DETAIL_AVX2_COPYIMPL_H__
Defines the IPSDK_FORCEINLINE.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
uint64_t ipUInt64
Base types definition.
Definition: BaseTypes.h:55
Definition: CopyImpl.h:29
Definition: NbEltsPerReg.h:28
eInstructionSet
Enumerate for processor instruction set description.
Definition: InstructionSetTypes.h:31
Advanced Vector Extensions 2.
Definition: InstructionSetTypes.h:48
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
Definition: LoadRegDecl.h:30