Macros | Functions
vnl_copy.cxx File Reference
#include <complex>
#include <cassert>
#include <vnl/vnl_vector.h>
#include <vnl/vnl_matrix.h>
#include <vnl/vnl_diag_matrix.h>

Go to the source code of this file.

Macros

#define VNL_COPY_INSTANTIATE0(S, T)   template void VNL_EXPORT vnl_copy(S const * const, T * const, const unsigned )
 
#define vnl_copy_macro(S, D)
 
#define vnl_copy_dumb(S)
 
#define VNL_COPY_INSTANTIATE(S, T)
 
#define VNL_COPY_INSTANTIATE_twoway(S, T)
 

Functions

template<class S , class T >
void vnl_copy (S const *const src, T *const dst, const unsigned n)
 Easy conversion between vectors and matrices templated over different types. More...
 
template<class S , class T >
void vnl_copy (S const &src, T &dst)
 Easy conversion between vectors and matrices templated over different types. More...
 
 VNL_COPY_INSTANTIATE0 (float, double)
 
 VNL_COPY_INSTANTIATE0 (double, float)
 
 VNL_COPY_INSTANTIATE0 (double, long double)
 
 VNL_COPY_INSTANTIATE0 (long double, double)
 
 vnl_copy_macro (float, double)
 
 vnl_copy_macro (double, float)
 
 vnl_copy_macro (double, long double)
 
 vnl_copy_macro (long double, double)
 
 vnl_copy_dumb (float)
 
 vnl_copy_dumb (double)
 
 VNL_COPY_INSTANTIATE (float, float)
 
 VNL_COPY_INSTANTIATE (double, double)
 
 VNL_COPY_INSTANTIATE_twoway (float, double)
 
 VNL_COPY_INSTANTIATE_twoway (std::complex< float >, std::complex< double >)
 
 VNL_COPY_INSTANTIATE_twoway (double, long double)
 
 VNL_COPY_INSTANTIATE_twoway (std::complex< double >, std::complex< long double >)
 

Detailed Description

Author
fsm

Definition in file vnl_copy.cxx.

Macro Definition Documentation

◆ vnl_copy_dumb

#define vnl_copy_dumb (   S)
Value:
template <> \
VNL_EXPORT void vnl_copy(S const * const src, S *const dst, const unsigned n) \
{ \
for (unsigned int i=0; i<n; ++i) \
dst[i] = src[i]; \
}
VNL_EXPORT void vnl_copy(S const *const src, T *const dst, const unsigned n)
Easy conversion between vectors and matrices templated over different types.
Definition: vnl_copy.cxx:15

Definition at line 55 of file vnl_copy.cxx.

◆ VNL_COPY_INSTANTIATE

#define VNL_COPY_INSTANTIATE (   S,
 
)
Value:
template VNL_EXPORT void vnl_copy(vnl_vector<S > const &, vnl_vector<T > &); \
template VNL_EXPORT void vnl_copy(vnl_matrix<S > const &, vnl_matrix<T > &); \
template VNL_EXPORT void vnl_copy(vnl_diag_matrix<S > const &, vnl_diag_matrix<T > &)
VNL_EXPORT void vnl_copy(S const *const src, T *const dst, const unsigned n)
Easy conversion between vectors and matrices templated over different types.
Definition: vnl_copy.cxx:15
An ordinary mathematical matrix.
Definition: vnl_adjugate.h:22
Mathematical vector class, templated by type of element.
Definition: vnl_fwd.h:16
stores a diagonal matrix as a single vector.

Definition at line 68 of file vnl_copy.cxx.

◆ VNL_COPY_INSTANTIATE0

#define VNL_COPY_INSTANTIATE0 (   S,
 
)    template void VNL_EXPORT vnl_copy(S const * const, T * const, const unsigned )

Definition at line 31 of file vnl_copy.cxx.

◆ VNL_COPY_INSTANTIATE_twoway

#define VNL_COPY_INSTANTIATE_twoway (   S,
 
)
Value:
VNL_COPY_INSTANTIATE(T, S)
#define VNL_COPY_INSTANTIATE(S, T)
Definition: vnl_copy.cxx:68

Definition at line 76 of file vnl_copy.cxx.

◆ vnl_copy_macro

#define vnl_copy_macro (   S,
 
)
Value:
template <> \
VNL_EXPORT void vnl_copy(std::complex<S> const * const src, std::complex<D> * const dst, const unsigned n) \
{ \
for (unsigned int i=0; i<n; ++i) \
dst[i] = std::complex<D>((D)std::real(src[i]), (D)std::imag(src[i])); \
}
VNL_EXPORT void vnl_copy(S const *const src, T *const dst, const unsigned n)
Easy conversion between vectors and matrices templated over different types.
Definition: vnl_copy.cxx:15

Definition at line 41 of file vnl_copy.cxx.

Function Documentation

◆ vnl_copy() [1/2]

template<class S , class T >
void vnl_copy ( S const *const  src,
T *const  dst,
const unsigned  n 
)

Easy conversion between vectors and matrices templated over different types.

Definition at line 15 of file vnl_copy.cxx.

◆ vnl_copy() [2/2]

template<class S , class T >
void vnl_copy ( S const &  src,
T &  dst 
)

Easy conversion between vectors and matrices templated over different types.

Definition at line 22 of file vnl_copy.cxx.

◆ vnl_copy_dumb() [1/2]

vnl_copy_dumb ( float  )

◆ vnl_copy_dumb() [2/2]

vnl_copy_dumb ( double  )

◆ VNL_COPY_INSTANTIATE() [1/2]

VNL_COPY_INSTANTIATE ( float  ,
float   
)

◆ VNL_COPY_INSTANTIATE() [2/2]

VNL_COPY_INSTANTIATE ( double  ,
double   
)

◆ VNL_COPY_INSTANTIATE0() [1/4]

VNL_COPY_INSTANTIATE0 ( float  ,
double   
)

◆ VNL_COPY_INSTANTIATE0() [2/4]

VNL_COPY_INSTANTIATE0 ( double  ,
float   
)

◆ VNL_COPY_INSTANTIATE0() [3/4]

VNL_COPY_INSTANTIATE0 ( double  ,
long double   
)

◆ VNL_COPY_INSTANTIATE0() [4/4]

VNL_COPY_INSTANTIATE0 ( long double  ,
double   
)

◆ VNL_COPY_INSTANTIATE_twoway() [1/4]

VNL_COPY_INSTANTIATE_twoway ( float  ,
double   
)

◆ VNL_COPY_INSTANTIATE_twoway() [2/4]

VNL_COPY_INSTANTIATE_twoway ( std::complex< float >  ,
std::complex< double >   
)

◆ VNL_COPY_INSTANTIATE_twoway() [3/4]

VNL_COPY_INSTANTIATE_twoway ( double  ,
long double   
)

◆ VNL_COPY_INSTANTIATE_twoway() [4/4]

VNL_COPY_INSTANTIATE_twoway ( std::complex< double >  ,
std::complex< long double >   
)

◆ vnl_copy_macro() [1/4]

vnl_copy_macro ( float  ,
double   
)

◆ vnl_copy_macro() [2/4]

vnl_copy_macro ( double  ,
float   
)

◆ vnl_copy_macro() [3/4]

vnl_copy_macro ( double  ,
long double   
)

◆ vnl_copy_macro() [4/4]

vnl_copy_macro ( long double  ,
double   
)