EvolvingObjects
eoParallel.h
00001 // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
00002 
00003 /*
00004 (c) Thales group, 2010
00005 
00006     This library is free software; you can redistribute it and/or
00007     modify it under the terms of the GNU Lesser General Public
00008     License as published by the Free Software Foundation;
00009     version 2 of the License.
00010 
00011     This library is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014     Lesser General Public License for more details.
00015 
00016     You should have received a copy of the GNU Lesser General Public
00017     License along with this library; if not, write to the Free Software
00018     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019 
00020 Contact: http://eodev.sourceforge.net
00021 
00022 Authors:
00023     Caner Candan <caner.candan@thalesgroup.com>
00024 */
00025 
00031 #ifndef eoParallel_h
00032 #define eoParallel_h
00033 
00034 #include "eoObject.h"
00035 #include "eoParser.h"
00036 
00042 class eoParallel : public eoObject
00043 {
00044 public:
00045     eoParallel();
00046     ~eoParallel();
00047 
00048     virtual std::string className() const;
00049 
00050     inline bool isEnabled() const { return _isEnabled.value(); }
00051     inline bool isDynamic() const { return _isDynamic.value(); }
00052 
00053     std::string prefix() const;
00054 
00055     inline unsigned int nthreads() const { return _nthreads.value(); }
00056     inline unsigned int packetSize() const { return _packetSize.value(); }
00057 
00058     inline bool enableResults() const { return _enableResults.value(); }
00059     inline bool doMeasure() const { return _doMeasure.value(); }
00060 
00061     friend void make_parallel(eoParser&);
00062 
00063 private:
00064     void _createParameters( eoParser& );
00065 
00066 private:
00067     eoValueParam<bool> _isEnabled;
00068     eoValueParam<bool> _isDynamic;
00069     eoValueParam<std::string> _prefix;
00070     eoValueParam<unsigned int> _nthreads;
00071     eoValueParam<unsigned int> _packetSize;
00072     eoValueParam<bool> _enableResults;
00073     eoValueParam<bool> _doMeasure;
00074     double _t_start;
00075 };
00076 
00077 void make_parallel(eoParser&);
00078 
00079 namespace eo
00080 {
00084     extern eoParallel parallel;
00085 }
00086 
00089 #endif // !eoParallel_h
 All Classes Namespaces Files Functions Variables Typedefs Friends