Loading src/TNL/Config/ConfigDescription.h +51 −1 Original line number Diff line number Diff line Loading @@ -27,8 +27,18 @@ class ConfigDescription { public: /** * \brief Basic constructor. */ ConfigDescription(); /** * \brief Adds new entry to the configuration description. * * \tparam EntryType Type of the entry. * \param name Name of the entry. * \param description More specific information about the entry. */ template< typename EntryType > void addEntry( const String& name, const String& description ) Loading @@ -37,6 +47,13 @@ class ConfigDescription entries.Append( currentEntry ); } /** * \brief Adds new entry to the configuration description. * * \tparam EntryType Type of the entry. * \param name Name of the entry. * \param description More specific information about the entry. */ template< typename EntryType > void addRequiredEntry( const String& name, const String& description ) Loading @@ -45,6 +62,14 @@ class ConfigDescription entries.Append( currentEntry ); } /** * \brief Adds new entry to the configuration description. * * \tparam EntryType Type of the entry. * \param name Name of the entry. * \param description More specific information about the entry. * \param defaultValue Default value of the entry. */ template< typename EntryType > void addEntry( const String& name, const String& description, Loading @@ -57,6 +82,13 @@ class ConfigDescription entries. Append( currentEntry ); } /** * \brief Adds new list to the configuration description. * * \tparam EntryType Type of the list. * \param name Name of the list. * \param description More specific information about the list. */ template< typename EntryType > void addList( const String& name, const String& description ) Loading @@ -65,6 +97,13 @@ class ConfigDescription entries.Append( currentEntry ); } /** * \brief Adds new list to the configuration description. * * \tparam EntryType Type of the list. * \param name Name of the list. * \param description More specific information about the list. */ template< typename EntryType > void addRequiredList( const String& name, const String& description ) Loading @@ -73,6 +112,14 @@ class ConfigDescription entries.Append( currentEntry ); } /** * \brief Adds new list to the configuration description. * * \tparam EntryType Type of the list. * \param name Name of the list. * \param description More specific information about the list. * \param defaultValue Default value of the list. */ template< typename EntryType > void addList( const String& name, const String& description, Loading Loading @@ -162,6 +209,9 @@ class ConfigDescription //bool parseConfigDescription( const char* file_name ); /** * \brief Basic destructor. */ ~ConfigDescription(); protected: Loading src/TNL/Config/ParameterContainer.h +3 −3 Original line number Diff line number Diff line Loading @@ -89,9 +89,9 @@ class ParameterContainer * If the parameter does not have any value or has different value then the given * \e value the method returns \e false and shows message when \e verbose is \e true. * * @param name Name of parameter. * @param value Value of type T we want to check whether is assigned to the parameter. * @param verbose Boolean value defining whether to show error message (when true) or not (when false). * \param name Name of parameter. * \param value Value of type T we want to check whether is assigned to the parameter. * \param verbose Boolean value defining whether to show error message (when true) or not (when false). */ template< class T > bool getParameter( const String& name, T& value, Loading src/TNL/Math.h +20 −8 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ namespace TNL { /*** /** * \brief This function returns minimum of two numbers. * * GPU device code uses the functions defined in the CUDA's math_functions.h, Loading @@ -43,7 +43,7 @@ ResultType min( const T1& a, const T2& b ) } /*** /** * \brief This function returns maximum of two numbers. * * GPU device code uses the functions defined in the CUDA's math_functions.h, Loading Loading @@ -191,8 +191,8 @@ T sign( const T& a ) * * It tests whether the number \e v is in \e tolerance, in other words, whether * \e v in absolute value is less then or equal to \e tolerance. * @param v Real number. * @param tolerance Critical value which is set to 0.00001 by defalt. * \param v Real number. * \param tolerance Critical value which is set to 0.00001 by defalt. */ template< typename Real > __cuda_callable__ Loading @@ -205,8 +205,8 @@ bool isSmall( const Real& v, /** * \brief This function divides \e num by \e div and rounds up the result. * * @param num An integer considered as dividend. * @param div An integer considered as divisor. * \param num An integer considered as dividend. * \param div An integer considered as divisor. */ __cuda_callable__ inline int roundUpDivision( const int num, const int div ) Loading @@ -217,8 +217,8 @@ inline int roundUpDivision( const int num, const int div ) /** * \brief This function rounds up \e number to the nearest multiple of number \e multiple. * * @param number Integer we want to round. * @param multiple Integer. * \param number Integer we want to round. * \param multiple Integer. */ __cuda_callable__ inline int roundToMultiple( int number, int multiple ) Loading @@ -226,12 +226,24 @@ inline int roundToMultiple( int number, int multiple ) return multiple*( number/ multiple + ( number % multiple != 0 ) ); } /** * \brief This function checks if \e x is an integral power of two. * * Returns \e true if \e x is a power of two. Otherwise returns \e false. * \param x Integer. */ __cuda_callable__ inline bool isPow2( int x ) { return ( ( x & ( x - 1 ) ) == 0 ); } /** * \brief This function checks if \e x is an integral power of two. * * Returns \e true if \e x is a power of two. Otherwise returns \e false. * \param x Long integer. */ __cuda_callable__ inline bool isPow2( long int x ) { Loading src/TNL/Object.h +5 −5 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ class Object { public: /**** /** * \brief Type getter. * * Returns the type in C++ style - for example the returned value Loading @@ -43,7 +43,7 @@ class Object virtual String getTypeVirtual() const; /**** /** * \brief This is used for load and save methods. * * Each object is saved as if it was stored on Devices::Host. So even Vector< double, Devices::Cuda > Loading @@ -53,21 +53,21 @@ class Object virtual String getSerializationTypeVirtual() const; /*** /** * \brief Method for saving the object to a file as a binary data. * * \param file Name of file object. */ virtual bool save( File& file ) const; /*** /** * \brief Method for restoring the object from a file. * * \param file Name of file object. */ virtual bool load( File& file ); /*** /** * \brief Method for restoring the object from a file. * * \param file Name of file object. Loading Loading
src/TNL/Config/ConfigDescription.h +51 −1 Original line number Diff line number Diff line Loading @@ -27,8 +27,18 @@ class ConfigDescription { public: /** * \brief Basic constructor. */ ConfigDescription(); /** * \brief Adds new entry to the configuration description. * * \tparam EntryType Type of the entry. * \param name Name of the entry. * \param description More specific information about the entry. */ template< typename EntryType > void addEntry( const String& name, const String& description ) Loading @@ -37,6 +47,13 @@ class ConfigDescription entries.Append( currentEntry ); } /** * \brief Adds new entry to the configuration description. * * \tparam EntryType Type of the entry. * \param name Name of the entry. * \param description More specific information about the entry. */ template< typename EntryType > void addRequiredEntry( const String& name, const String& description ) Loading @@ -45,6 +62,14 @@ class ConfigDescription entries.Append( currentEntry ); } /** * \brief Adds new entry to the configuration description. * * \tparam EntryType Type of the entry. * \param name Name of the entry. * \param description More specific information about the entry. * \param defaultValue Default value of the entry. */ template< typename EntryType > void addEntry( const String& name, const String& description, Loading @@ -57,6 +82,13 @@ class ConfigDescription entries. Append( currentEntry ); } /** * \brief Adds new list to the configuration description. * * \tparam EntryType Type of the list. * \param name Name of the list. * \param description More specific information about the list. */ template< typename EntryType > void addList( const String& name, const String& description ) Loading @@ -65,6 +97,13 @@ class ConfigDescription entries.Append( currentEntry ); } /** * \brief Adds new list to the configuration description. * * \tparam EntryType Type of the list. * \param name Name of the list. * \param description More specific information about the list. */ template< typename EntryType > void addRequiredList( const String& name, const String& description ) Loading @@ -73,6 +112,14 @@ class ConfigDescription entries.Append( currentEntry ); } /** * \brief Adds new list to the configuration description. * * \tparam EntryType Type of the list. * \param name Name of the list. * \param description More specific information about the list. * \param defaultValue Default value of the list. */ template< typename EntryType > void addList( const String& name, const String& description, Loading Loading @@ -162,6 +209,9 @@ class ConfigDescription //bool parseConfigDescription( const char* file_name ); /** * \brief Basic destructor. */ ~ConfigDescription(); protected: Loading
src/TNL/Config/ParameterContainer.h +3 −3 Original line number Diff line number Diff line Loading @@ -89,9 +89,9 @@ class ParameterContainer * If the parameter does not have any value or has different value then the given * \e value the method returns \e false and shows message when \e verbose is \e true. * * @param name Name of parameter. * @param value Value of type T we want to check whether is assigned to the parameter. * @param verbose Boolean value defining whether to show error message (when true) or not (when false). * \param name Name of parameter. * \param value Value of type T we want to check whether is assigned to the parameter. * \param verbose Boolean value defining whether to show error message (when true) or not (when false). */ template< class T > bool getParameter( const String& name, T& value, Loading
src/TNL/Math.h +20 −8 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ namespace TNL { /*** /** * \brief This function returns minimum of two numbers. * * GPU device code uses the functions defined in the CUDA's math_functions.h, Loading @@ -43,7 +43,7 @@ ResultType min( const T1& a, const T2& b ) } /*** /** * \brief This function returns maximum of two numbers. * * GPU device code uses the functions defined in the CUDA's math_functions.h, Loading Loading @@ -191,8 +191,8 @@ T sign( const T& a ) * * It tests whether the number \e v is in \e tolerance, in other words, whether * \e v in absolute value is less then or equal to \e tolerance. * @param v Real number. * @param tolerance Critical value which is set to 0.00001 by defalt. * \param v Real number. * \param tolerance Critical value which is set to 0.00001 by defalt. */ template< typename Real > __cuda_callable__ Loading @@ -205,8 +205,8 @@ bool isSmall( const Real& v, /** * \brief This function divides \e num by \e div and rounds up the result. * * @param num An integer considered as dividend. * @param div An integer considered as divisor. * \param num An integer considered as dividend. * \param div An integer considered as divisor. */ __cuda_callable__ inline int roundUpDivision( const int num, const int div ) Loading @@ -217,8 +217,8 @@ inline int roundUpDivision( const int num, const int div ) /** * \brief This function rounds up \e number to the nearest multiple of number \e multiple. * * @param number Integer we want to round. * @param multiple Integer. * \param number Integer we want to round. * \param multiple Integer. */ __cuda_callable__ inline int roundToMultiple( int number, int multiple ) Loading @@ -226,12 +226,24 @@ inline int roundToMultiple( int number, int multiple ) return multiple*( number/ multiple + ( number % multiple != 0 ) ); } /** * \brief This function checks if \e x is an integral power of two. * * Returns \e true if \e x is a power of two. Otherwise returns \e false. * \param x Integer. */ __cuda_callable__ inline bool isPow2( int x ) { return ( ( x & ( x - 1 ) ) == 0 ); } /** * \brief This function checks if \e x is an integral power of two. * * Returns \e true if \e x is a power of two. Otherwise returns \e false. * \param x Long integer. */ __cuda_callable__ inline bool isPow2( long int x ) { Loading
src/TNL/Object.h +5 −5 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ class Object { public: /**** /** * \brief Type getter. * * Returns the type in C++ style - for example the returned value Loading @@ -43,7 +43,7 @@ class Object virtual String getTypeVirtual() const; /**** /** * \brief This is used for load and save methods. * * Each object is saved as if it was stored on Devices::Host. So even Vector< double, Devices::Cuda > Loading @@ -53,21 +53,21 @@ class Object virtual String getSerializationTypeVirtual() const; /*** /** * \brief Method for saving the object to a file as a binary data. * * \param file Name of file object. */ virtual bool save( File& file ) const; /*** /** * \brief Method for restoring the object from a file. * * \param file Name of file object. */ virtual bool load( File& file ); /*** /** * \brief Method for restoring the object from a file. * * \param file Name of file object. Loading