diff --git a/src/TNL/Config/ConfigDescription.h b/src/TNL/Config/ConfigDescription.h index 37325183b7ae2dde99aa6d6e2a573c66e7531410..d193869580bae369c5698936fa92943f3d37fa65 100644 --- a/src/TNL/Config/ConfigDescription.h +++ b/src/TNL/Config/ConfigDescription.h @@ -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 ) @@ -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 ) @@ -44,7 +61,15 @@ class ConfigDescription currentEntry = new ConfigEntry< EntryType >( name, description, true ); 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, @@ -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 ) @@ -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 ) @@ -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, @@ -162,6 +209,9 @@ class ConfigDescription //bool parseConfigDescription( const char* file_name ); + /** + * \brief Basic destructor. + */ ~ConfigDescription(); protected: diff --git a/src/TNL/Config/ParameterContainer.h b/src/TNL/Config/ParameterContainer.h index b475c53ec1586e2a04cdd84e380d5530b34b3470..aac0cb6ab707799bac7d7079eb569705ef21933a 100644 --- a/src/TNL/Config/ParameterContainer.h +++ b/src/TNL/Config/ParameterContainer.h @@ -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, diff --git a/src/TNL/Math.h b/src/TNL/Math.h index 12cab18d8ce8cfa7b57c4d1091e8205a1d9c5112..68eb1f556f246c2a3e0909e0f58ebd2ee57b17dd 100644 --- a/src/TNL/Math.h +++ b/src/TNL/Math.h @@ -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, @@ -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, @@ -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__ @@ -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 ) @@ -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 ) @@ -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 ) { diff --git a/src/TNL/Object.h b/src/TNL/Object.h index f0b2b435fe62c1b94af0db8b720d6ee18ec46021..9725d1db590bc31e8c44be14b347b0d236ce1b89 100644 --- a/src/TNL/Object.h +++ b/src/TNL/Object.h @@ -33,7 +33,7 @@ class Object { public: - /**** + /** * \brief Type getter. * * Returns the type in C++ style - for example the returned value @@ -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 > @@ -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.