crown  1.0.0
include/crown/CrownBinary.hpp
Go to the documentation of this file.
00001 /*
00002  Copyright 2015 Nicolas Melot
00003 
00004  This file is part of Pelib.
00005 
00006  Pelib is free software: you can redistribute it and/or modify
00007  it under the terms of the GNU General Public License as published by
00008  the Free Software Foundation, either version 3 of the License, or
00009  (at your option) any later version.
00010 
00011  Pelib 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
00014  GNU General Public License for more details.
00015 
00016  You should have received a copy of the GNU General Public License
00017  along with Pelib. If not, see <http://www.gnu.org/licenses/>.
00018 */
00019 
00020 #include <crown/CrownScheduler.hpp>
00021 #include <crown/CrownAllocation.hpp>
00022 #include <crown/CrownMapping.hpp>
00023 #include <crown/CrownScaling.hpp>
00024 
00025 #ifndef CROWN_BINARY
00026 #define CROWN_BINARY
00027 
00028 namespace pelib
00029 {
00030 namespace crown
00031 {
00032         class CrownBinary : public CrownScheduler
00033         {
00034                 public:
00035                         CrownBinary(const CrownConfig *config = NULL, const CrownMapping *mapping = NULL, const CrownScaling *scaling = NULL, size_t precision = 3, bool showOutput = false, bool showError = false);
00036                         CrownBinary(const Algebra &param, const CrownConfig *config = NULL, const CrownMapping *mapping = NULL, const CrownScaling *scaling = NULL, size_t precision = 3, bool showOutput = false, bool showError = false);
00037                         CrownBinary(const Taskgraph &tg, const Platform &pt, const Algebra &param, const CrownConfig* = NULL, const CrownMapping *mapping = NULL, const CrownScaling *scaling = NULL, size_t precision = 3, bool showOutput = false, bool showError = false);
00038                         CrownBinary(const CrownBinary&);
00039                         virtual ~CrownBinary();
00040                         Schedule schedule(const Taskgraph &tg, const Platform &pt, std::map<const string, double>&) const;
00041                         Schedule schedule(const Taskgraph &tg, const Platform &pt, const Algebra &param, std::map<const string, double>&) const;
00042                         Algebra solve(const Algebra &tg, const Algebra &pt, const pelib::Algebra &param, std::map<const std::basic_string<char>, double> &statistics) const;
00043                         virtual float complexity(const Algebra &problem) const;
00044                         virtual float complexity(const Taskgraph&, const Platform&, const Algebra&) const;
00045                         const Algebra* solve() const;
00046                         const Algebra* solve(map<const string, double>&) const;
00047                         std::string getShortDescription() const;
00048                         virtual CrownBinary* clone() const;
00049                 protected:
00050                         const CrownMapping *mapping;
00051                         const CrownScaling *scaling;
00052                         size_t precision;
00053                 private:
00054                         void initialize(const CrownMapping *mapping = NULL, const CrownScaling *scaling = NULL);
00055         };
00056 }
00057 }
00058 
00059 #endif