Commit ff2b7679 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Fixing tnlBasicTypesSetter.

parent 7cd842c7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ SET( headers tnlBasicTypesSetter.h
		       tnlConfigDescriptionParser.ih 
		       tnlConfigDescriptionScanner.h 
		       tnlParameterContainer.h
		       tnlDefaultBasicTypesChecker.h
		       FlexLexer.h 
    )

+3 −10
Original line number Diff line number Diff line
@@ -20,23 +20,16 @@

#include <core/tnlObject.h>
#include <config/tnlParameterContainer.h>
#include <config/tnlDefaultBasicTypesChecker.h>

template< typename ProblemTypesSetter >
template< typename ProblemTypesSetter,
          typename ProblemTypesChecker = tnlDefaultBasicTypesChecker >
class tnlBasicTypesSetter : public tnlObject
{
   public:

   bool run( const tnlParameterContainer& parameters );

   virtual bool checkSupportedRealTypes( const tnlString& realType,
                                         const tnlParameterContainer& parameters ) const;

   virtual bool checkSupportedIndexTypes( const tnlString& indexType,
                                          const tnlParameterContainer& parameters ) const;

   virtual bool checkSupportedDevices( const tnlString& device,
                                       const tnlParameterContainer& parameters ) const;

   /*virtual bool checkSupportedDimensions( const int dimensions,
                                          const tnlParameterContainer& parameters ) const;

+40 −0
Original line number Diff line number Diff line
/***************************************************************************
                          tnlDefaultBasicTypesChecker.h  -  description
                             -------------------
    begin                : Feb 24, 2013
    copyright            : (C) 2013 by Tomas Oberhuber
    email                : tomas.oberhuber@fjfi.cvut.cz
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef TNLDEFAULTBASICTYPESCHECKER_H_
#define TNLDEFAULTBASICTYPESCHECKER_H_

#include <core/tnlString.h>
#include <config/tnlParameterContainer.h>

class tnlDefaultBasicTypesChecker
{
   public:

   static bool checkSupportedRealTypes( const tnlString& realType,
                                        const tnlParameterContainer& parameters );

   static bool checkSupportedIndexTypes( const tnlString& indexType,
                                         const tnlParameterContainer& parameters );

   static bool checkSupportedDevices( const tnlString& device,
                                      const tnlParameterContainer& parameters );
};

#include <implementation/config/tnlDefaultBasicTypesChecker_impl.h>

#endif /* TNLDEFAULTBASICTYPESCHECKER_H_ */
+1 −1
Original line number Diff line number Diff line
@@ -111,7 +111,7 @@ class tnlCuda
      }
   }

   template< typename Element, typename Index, typename Device >
   template< typename Element, typename Index >
   static bool memset( Element* destination,
                       const Element& value,
                       const Index size )
+1 −1
Original line number Diff line number Diff line
@@ -106,7 +106,7 @@ class tnlHost
      }
   }

   template< typename Element, typename Index, typename Device >
   template< typename Element, typename Index >
   static bool memset( Element* destination,
                       const Element& value,
                       const Index size )
Loading