YANE-Framework Tutorial 1.1.0

examples/parallelcomputing/src/simplecomputation.h

00001 /***************************************************************************
00002  *                                                                         *
00003  * Copyright (C) 2011 by www.nonlinearmpc.com                              *
00004  *                                                                         *
00005  * Authors:                                                                *
00006  *  Juergen Pannek <juergen.pannek@googlemail.com>                         *
00007  *  Michael Schamel <michael.schamel@uni-bayreuth.de>                      *
00008  *                                                                         *
00009  ***************************************************************************/
00010 
00011 #ifndef COMPUTATIONMANAGER_H
00012 #define COMPUTATIONMANAGER_H
00013 
00014 #include <yane/utils/parallelcomputing.h>
00015 
00016 namespace yane
00017 {
00018 
00019         namespace Utils
00020         {
00021 
00022                 class DebugMaster;
00023         }
00024 }
00025 
00030 class SimpleComputation : public yane::Utils::ParallelComputing
00031 {
00032         public:
00037                 struct T_COMPUTATIONINFO
00038                 {
00039                                 double sleep;
00040                 };
00041 
00049                 SimpleComputation ( const std::string & name,
00050                         yane::Utils::DebugMaster * dm, int threads );
00051 
00052         protected:
00053 
00059                 virtual void compute (
00060                         yane::Utils::ParallelComputing::T_TASKINFO * task,
00061                         yane::Utils::DebugClient * debugclient );
00062 };
00063 
00064 #endif