RT-WDF / rt-wdf_lib

RT-WDF - Real-Time Wave Digital Filter Library
92 stars 20 forks source link

Remove strong link to armadillo using wrapper functions #6

Open m-rest opened 7 years ago

m-rest commented 7 years ago

Use a wrapper and a type definition to externalize the use of Armadillo like:

#ifdef ARMADILLO_WRAPPE
template <typename PrecisionType>
using Matrix = arma::Mat<PrecisionType>;
...
#elif EIGEN_WRAPPER
template <typename PrecisionType>
using Matrix = eigen::Matrix<PrecisionType, eigen::Dynamic, eigen::Dynamic>;
...
#endif
} // namespace wdf
m-rest commented 7 years ago

http://en.cppreference.com/w/cpp/language/type_alias for more information

maxprod2016 commented 7 years ago

If someone have better idea or more clean/powerful way to do a wrapper (and possibly avoid macro) let me know.