Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ShStatement.hpp

00001 // Sh: A GPU metaprogramming language.
00002 //
00003 // Copyright 2003-2005 Serious Hack Inc.
00004 // 
00005 // This library is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU Lesser General Public
00007 // License as published by the Free Software Foundation; either
00008 // version 2.1 of the License, or (at your option) any later version.
00009 //
00010 // This library 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 GNU
00013 // Lesser General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU Lesser General Public
00016 // License along with this library; if not, write to the Free Software
00017 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
00018 // MA  02110-1301, USA
00020 #ifndef SHSTATEMENT_HPP
00021 #define SHSTATEMENT_HPP
00022 
00023 #include <iosfwd>
00024 #include <set>
00025 #include <list>
00026 #include "ShOperation.hpp"
00027 #include "ShDllExport.hpp"
00028 #include "ShInfo.hpp"
00029 #include "ShVariable.hpp"
00030 
00031 namespace SH {
00032 
00033 
00042 class
00043 SH_DLLEXPORT ShStatement: public ShInfoHolder {
00044 public:
00048   ShStatement(ShOperation op);
00049   ShStatement(ShVariable dest, ShOperation op);
00050   ShStatement(ShVariable dest, ShOperation op, ShVariable src);
00051   ShStatement(ShVariable dest, ShVariable src0, ShOperation op, ShVariable src1);
00052   ShStatement(ShVariable dest, ShOperation op, ShVariable src0, ShVariable src1, ShVariable src2);
00053   // @}
00054 
00055   ShVariable dest;
00056 
00057   typedef std::vector<ShVariable> ShVariableVec;
00058   
00059   //< by default always allocates 3 ShVariables, but may hold more for future internal use.
00060   ShVariableVec src; 
00061                      
00062   
00063   ShOperation op;
00064 
00065   bool marked;
00066 
00067   friend SH_DLLEXPORT std::ostream& operator<<(std::ostream& out, const SH::ShStatement& stmt);
00068 
00069   private:
00070     static std::ostream& dumpVar(std::ostream &out, const ShVariable& var);
00071 };
00072 
00073 } // namespace SH
00074 
00075 #endif

Generated on Thu Jul 28 17:33:05 2005 for Sh by  doxygen 1.4.3-20050530