task.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2008 by Kutumov Alexey                                  *
00003  *   ru.pixel@gmail.com                                                    *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 
00033 #ifndef __task__header__
00034 #define __task__header__
00035 
00036 #include "gpucalc/data.h"
00037 #include "gpucalc/kernel.h"
00038 
00039 namespace gpucalc
00040 {
00041 
00124  class _GpuCalcExport Task: public Object
00125  {
00126 
00127   OBJ_DISABLE_COPY(Task)
00128   
00129   
00130   
00131   public:
00132 
00133 
00139    Task(const std::string & TaskClassName, const std::string & TaskName): Object(TaskClassName, TaskName)
00140    {
00141    }
00142 
00143 
00144 
00145    virtual ~Task()
00146    {
00147    }
00148 
00149 
00153    virtual void compile() = 0;
00154 
00155 
00164    virtual void addDataToActiveKernel(const Data & data) = 0;
00165 
00166 
00170    virtual void addCompilerParamsToActiveKernel(const std::string & Parameters) = 0;
00171 
00172 
00176    virtual void removeDataFromActiveKernel(const Data & data) = 0;
00177 
00178 
00179    virtual void addResultToActiveKernel(Data & result) = 0;
00180 
00181 
00182    virtual Data & getResultData() const = 0;
00183 
00184 
00185    virtual void removeResultFromActiveKernel(const Data & result) = 0;
00186 
00187 
00188    virtual void addActiveKernel(Kernel * ActiveKernel) = 0;
00189 
00190 
00194    virtual Kernel * getActiveKernel() const = 0;
00195 
00196 
00200    virtual void removeKernel(Kernel * kernel) = 0;
00201 
00202 
00208    virtual void compute() = 0;
00209 
00210 
00211   protected:
00212 
00213 
00214    virtual void computeOneKernel(Texture * RenderTarget) = 0;
00215  };
00216 }
00217 
00218 #endif

Generated on Thu Mar 5 22:36:42 2009 for gpucalc by  doxygen 1.5.6