From 2a8e4d9c477c4c4f26834259bcd828dbd394d000 Mon Sep 17 00:00:00 2001 From: Scott Klum Date: Sat, 29 Mar 2014 13:30:13 -0400 Subject: [PATCH] Added an inconsequential multithreading initializer based on Eigen docs --- openbr/plugins/eigen3.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+), 0 deletions(-) diff --git a/openbr/plugins/eigen3.cpp b/openbr/plugins/eigen3.cpp index 710570e..82e45cd 100644 --- a/openbr/plugins/eigen3.cpp +++ b/openbr/plugins/eigen3.cpp @@ -15,6 +15,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include + #include "openbr_internal.h" #include "openbr/core/common.h" @@ -24,6 +25,24 @@ namespace br { /*! + * \ingroup initializers + * \brief Initialize Eigen + * http://eigen.tuxfamily.org/dox/TopicMultiThreading.html + * \author Scott Klum \cite sklum + */ +class EigenInitializer : public Initializer +{ + Q_OBJECT + + void initialize() const + { + Eigen::initParallel(); + } +}; + +BR_REGISTER(Initializer, EigenInitializer) + +/*! * \ingroup transforms * \brief Projects input into learned Principal Component Analysis subspace. * \author Brendan Klare \cite bklare -- libgit2 0.21.4