LAMA
/home/brandes/workspace/LAMA/src/lama/distribution/NoDistribution.hpp
Go to the documentation of this file.
00001 
00033 #ifndef LAMA_NODISTRIBUTION_HPP_
00034 #define LAMA_NODISTRIBUTION_HPP_
00035 
00036 // for dll_import
00037 #include <lama/config.hpp>
00038 
00039 // base classes
00040 #include <lama/distribution/Distribution.hpp>
00041 
00042 // logging
00043 #include <logging/logging.hpp>
00044 
00045 namespace lama
00046 {
00047 
00048 class LAMA_DLL_IMPORTEXPORT NoDistribution: public Distribution
00049 {
00050 public:
00051 
00052     NoDistribution(const IndexType globalSize);
00053 
00054     virtual ~NoDistribution();
00055 
00056     virtual bool isLocal(const IndexType index) const;
00057 
00058     virtual IndexType getLocalSize() const;
00059 
00060     virtual IndexType local2global(const IndexType localIndex) const;
00061 
00062     virtual IndexType global2local(const IndexType globalIndex) const;
00063 
00064     virtual bool isEqual(const Distribution& other) const;
00065 
00066     virtual void writeAt(std::ostream& stream) const;
00067 
00068     void printDistributionVector( std::string name ) const;
00069 
00070 private:
00071 
00072     NoDistribution();  // no default constructor as global size is not available
00073 
00074     LAMA_LOG_DECL_STATIC_LOGGER(logger);
00075 };
00076 
00077 }
00078 
00079 #endif // LAMA_NODISTRIBUTION_HPP_