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

Rewriting some code to templates for better support of single-precision arithmetic.

parent 5555122a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
TODO: zavest povinna jmena objektu
      - mozna mit konstruktor jen se jmenem a metody pro nastaveni dimenze a oblasti

TODO: implementovat tridu tnlFileName pro generovani jmen souboru

TODO: metodu pro tnlString pro nahrazeni napr. podretezce XXXXX indexem 00001 tj. uXXXXX.bin -> u00001.bin
+2 −2
Original line number Diff line number Diff line
@@ -72,5 +72,5 @@ endif



TESTS = tnl-benchmarks \
        tnl-unit-tests
 No newline at end of file
TESTS = tnl-unit-tests \
        tnl-benchmarks
 No newline at end of file
+2 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ headers = tnlAssert.h \
		    tnlList.h \
		    tnlLongVector.h \
		    tnlLongVectorCUDA.h \
		    tnlLongVectorCUDA.cu.h \
		    tnlLogger.h \
		    tnlObject.h \
		    tnlStack.h \
@@ -52,6 +53,7 @@ sources = tnlConfigDescription.cpp \
	  tnlString.cpp \
	  tnlConfigDescriptionScanner.cpp \
	  tnlConfigDescriptionParser.cpp \
	  tnlLongVectorCUDA.cu \
	  tnlParameterContainer.cpp \
	  tnlTimerCPU.cpp \
	  tnlTimerRT.cpp \
+2 −2
Original line number Diff line number Diff line
@@ -224,7 +224,7 @@ template< class T > class tnlCUDAKernelsTester : public CppUnit :: TestCase
      int size = 2;
      for( int s = 1; s < 12; s ++ )
      {
         tnlLongVector< T > host_input( size );
         tnlLongVector< T > host_input( "host-input", size );

         //cout << "Alg. " << algorithm_efficiency << "Testing zeros with size "  << size << " ";
         for( int i = 0; i < size; i ++ )
@@ -260,7 +260,7 @@ template< class T > class tnlCUDAKernelsTester : public CppUnit :: TestCase
      }
      for( size = 1; size < 5000; size ++ )
      {
         tnlLongVector< T > host_input( size );
         tnlLongVector< T > host_input( "host-input", size );

         //cout << "Alg. " << algorithm_efficiency  << " Testing zeros with size "  << size << " ";
         for( int i = 0; i < size; i ++ )
+5 −5
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@ struct tnlConfigEntryBase
        group( _group ),
        comment( _comment ),
        required( _required ),
        has_default_value( false ){};
        has_default_value( false ){}

};

@@ -101,7 +101,7 @@ template< class T > struct tnlConfigEntry : public tnlConfigEntryBase
        default_value( _default_value ) 
      {
         has_default_value = true;
      };
      }

};

@@ -132,7 +132,7 @@ class tnlConfigDescription
                                              group,
                                              comment,
                                              default_value ) );
   };
   }

   
   //! Returns zero if given entry does not exist
@@ -150,7 +150,7 @@ class tnlConfigDescription
            else return NULL;
      cerr << "Asking for the default value of uknown parameter." << endl;
      return NULL;
   };
   }
   
   //! Returns zero pointer if there is no default value
   template< class T > T* GetDefaultValue( const char* name )
@@ -164,7 +164,7 @@ class tnlConfigDescription
            else return NULL;
      cerr << "Asking for the default value of uknown parameter." << endl;
      return NULL;
   };
   }

   //! If there is missing entry with defined default value in the tnlParameterContainer it is going to be added
   void AddMissingEntries( tnlParameterContainer& parameter_container ) const;
Loading