diff --git a/.cproject b/.cproject index 89a0873e084f7a0d00b9950c1919d6259972f95c..2e42104373e8b53683590425ef365ed94e058198 100644 --- a/.cproject +++ b/.cproject @@ -18,7 +18,11 @@ <folderInfo id="cdt.managedbuild.toolchain.gnu.base.2134791445.1799170915" name="/" resourcePath=""> <toolChain id="cdt.managedbuild.toolchain.gnu.base.1762402759" name="cdt.managedbuild.toolchain.gnu.base" superClass="cdt.managedbuild.toolchain.gnu.base"> <targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.base.840154721" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/> - <builder id="cdt.managedbuild.target.gnu.builder.base.573876641" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.base"/> + <builder id="cdt.managedbuild.target.gnu.builder.base.573876641" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.base"> + <outputEntries> + <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="outputPath" name=""/> + </outputEntries> + </builder> <tool id="cdt.managedbuild.tool.gnu.archiver.base.958650307" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/> <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.1237330740" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base"> <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1856262209" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/> @@ -38,6 +42,9 @@ </tool> </toolChain> </folderInfo> + <sourceEntries> + <entry excluding="tnlLinearDiffusionTest.cu" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> + </sourceEntries> </configuration> </storageModule> <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> @@ -46,8 +53,14 @@ <storageModule moduleId="cdtBuildSystem" version="4.0.0"> <project id="tnl.null.219466708" name="tnl"/> </storageModule> + <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/> <storageModule moduleId="scannerConfiguration"> <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> + <scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.base.2134791445;cdt.managedbuild.toolchain.gnu.base.2134791445.1799170915;cdt.managedbuild.tool.gnu.c.compiler.base.315517693;cdt.managedbuild.tool.gnu.c.compiler.input.950045328"> + <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/> + </scannerConfigBuildInfo> + <scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.base.2134791445;cdt.managedbuild.toolchain.gnu.base.2134791445.1799170915;cdt.managedbuild.tool.gnu.cpp.compiler.base.1237330740;cdt.managedbuild.tool.gnu.cpp.compiler.input.1856262209"> + <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/> + </scannerConfigBuildInfo> </storageModule> - <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/> </cproject> diff --git a/TODO b/TODO index 601def17fe8cd1362a5e560b3fd8a26c7591e3ac..333e2c0927997f74deb33276eb7c8ddb15ec4448 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,20 @@ +TODO: test aproximace pro implicitni schemata +TODO: pokusit se napsat test explicitni aproximace podobne jako implicinit bez specializace pro grid +TODO: doladit semi-implicitni resic +TODO: opravit argumenty metod v heat equation - nekde se nepredavaji dofy a pomocne dofy +TODO: doresit okrajove podminky v heat equation - nacitani ze souboru + => soucasne Dir. a Neum. okrajove podminky prejmenovat asi tnlAnalytic... a zavest nove tnlDirichlet... a tnlNeumann... + ktere budou mit sve hodnoty ulozene ve vektoru TODO: neumanovy okrajove podminky +TODO: doladit vse s CUDA +TODO: doplnit mesh travelsals pro jine mesh entity nez cell +TODO: implementace maticovych resicu + * Gaussova eliminace + * SOR metoda + * Jacobiho metoda + * TFQMR metoda + * IDR metody + TODO: implementovat tridu tnlFileName pro generovani jmen souboru diff --git a/examples/heat-equation/tnl-heat-equation.cpp b/examples/heat-equation/tnl-heat-equation.cpp index 449eb20a30e5d5454a1c0aa5e89936eab0e65fce..d74f517f68c9fe1e64a67c537eeba0fe3aa2d4d0 100644 --- a/examples/heat-equation/tnl-heat-equation.cpp +++ b/examples/heat-equation/tnl-heat-equation.cpp @@ -32,8 +32,13 @@ class heatEquationConfig public: static void configSetup( tnlConfigDescription& config ) { - //config.addDelimiter( "Heat equation settings:" ); - } + config.addDelimiter( "Heat equation settings:" ); + config.addEntry< tnlString >( "boundary-conditions-type", "Choose the boundary conditions type.", "dirichlet"); + config.addEntryEnum< tnlString >( "dirichlet" ); + config.addEntryEnum< tnlString >( "neumann" ); + config.addEntry< tnlString >( "boundary-conditions", "File with the values of the boundary conditions.", "boundary.tnl" ); + config.addEntry< tnlString >( "initial-condition", "File with the initial condition.", "initial.tnl"); + }; }; template< typename Real, diff --git a/install b/install index 0c15ff9b1e3e6f64833becbfd12d2b004e53e2c2..217830e0b630bc3bb0a67552eec438508640725c 100755 --- a/install +++ b/install @@ -2,7 +2,7 @@ TARGET=TNL INSTALL_PREFIX=${HOME}/local -WITH_CUDA=no +WITH_CUDA=yes TEMPLATE_EXPLICIT_INSTANTIATION=yes #VERBOSE="VERBOSE=1" diff --git a/src/core/tnlAssert.h b/src/core/tnlAssert.h index d407a53c44c413f828dea3195477d25c0f011523..a853120f41deb05402325efee9f8faf94d3f6f92 100644 --- a/src/core/tnlAssert.h +++ b/src/core/tnlAssert.h @@ -30,15 +30,14 @@ using namespace std; #ifdef HAVE_CUDA -#define tnlAssert( ___tnl__assert_condition, ___tnl__assert_command ) \ - if( ! ( ___tnl__assert_condition ) ) \ - { \ - cerr << "Assertion '" << __STRING( ___tnl__assert_condition ) << "' failed !!!" << endl \ - << "File: " << __FILE__ << endl \ - << "Line: " << __LINE__ << endl \ - << "Diagnostics: "; \ - ___tnl__assert_command; \ - abort(); \ +#define tnlAssert( ___tnl__assert_condition, ___tnl__assert_command ) \ + if( ! ( ___tnl__assert_condition ) ) \ + { \ + printf( "Assertion '%s' failed !!! \n File: %s \n Line: %d \n Diagnostics: Not supported with CUDA.", \ + __STRING( ___tnl__assert_condition ), \ + __FILE__, \ + __LINE__ ); \ + abort(); \ } #else #define tnlAssert( ___tnl__assert_condition, ___tnl__assert_command ) \ @@ -61,6 +60,7 @@ using namespace std; * Static assert */ +#ifndef HAVE_CUDA // TODO: fix this when nvcc can compile it // static_assert() available for g++ 4.3 or newer with -std=c++0x or -std=gnu++0x #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 2)) && defined(__GXX_EXPERIMENTAL_CXX0X__) #define CXX0X_STATIC_ASSERT_AVAILABLE @@ -87,4 +87,8 @@ template<int x> struct static_assert_test{}; #endif // defined(CXX0X_STATIC_ASSERT_AVAILABLE) +#else +#define tnlStaticAssert(expression, msg) +#endif // ifndef HAVE_CUDA + #endif /* TNLASSERT_H_ */ diff --git a/src/core/vectors/tnlVector.h b/src/core/vectors/tnlVector.h index 6d93f1528c5a5fe8f36dc4a35cb2349c850b9029..ba0d1864eae284e2e171b01fb07551184e7b90b2 100644 --- a/src/core/vectors/tnlVector.h +++ b/src/core/vectors/tnlVector.h @@ -67,6 +67,9 @@ class tnlVector : public tnlArray< Real, Device, Index > template< typename Vector > tnlVector< Real, Device, Index >& operator += ( const Vector& vector ); + // TODO: implement + //tnlVector< Real, Device, Index >& operator *= ( const RealType& c ); + Real max() const; Real min() const; diff --git a/src/functions/tnlConstantFunction.h b/src/functions/tnlConstantFunction.h index 534f72bbc7b5dff86e1dec5bda6b9c481566605a..e7fcfd2aa474563627ef9d1e3c71f46c4d844117 100644 --- a/src/functions/tnlConstantFunction.h +++ b/src/functions/tnlConstantFunction.h @@ -55,6 +55,15 @@ class tnlConstantFunction #endif RealType getValue( const Vertex& v, const Real& time = 0.0 ) const; +#ifdef HAVE_NOT_CXX11 + template< typename Vertex > + RealType getValue( const Vertex& v, + const Real& time = 0.0 ) const + { + return getValue< 0, 0, 0, Vertex >( v, time ); + } + +#endif protected: diff --git a/src/functions/tnlFunctionDiscretizer.h b/src/functions/tnlFunctionDiscretizer.h index 8725057c0713e8beb6111605560cc4acb4a8a712..06fb6f6e18fdb5b332d91fe23e7853d00b560cce 100644 --- a/src/functions/tnlFunctionDiscretizer.h +++ b/src/functions/tnlFunctionDiscretizer.h @@ -24,6 +24,9 @@ class tnlFunctionDiscretizer public: typedef typename Vector::DeviceType DeviceType; + typedef typename Mesh::IndexType IndexType; + typedef typename Mesh::VertexType VertexType; + typedef typename Mesh::CoordinatesType CoordinatesType; #ifdef HAVE_NOT_CXX11 template< int XDiffOrder, diff --git a/src/functions/tnlSinBumpsFunction.h b/src/functions/tnlSinBumpsFunction.h index 109910fd6c47816007673c513e6365c239d5a457..522768d8bf29ba46a36dddd522079383a94e948c 100644 --- a/src/functions/tnlSinBumpsFunction.h +++ b/src/functions/tnlSinBumpsFunction.h @@ -139,9 +139,9 @@ class tnlSinBumpsFunction< 3, Real > : public tnlSinBumpsFunctionBase< tnlStatic int YDiffOrder = 0, int ZDiffOrder = 0, typename Vertex = VertexType > +#endif RealType getValue( const Vertex& v, const Real& time = 0.0 ) const; -#endif }; #include <implementation/functions/tnlSinBumpsFunction_impl.h> diff --git a/src/functions/tnlTestFunction.h b/src/functions/tnlTestFunction.h index 049d1594cf2af91fe5369cee9f793a20962a850b..0c9672e36dafd0c8781d39e26770629c330ce354 100644 --- a/src/functions/tnlTestFunction.h +++ b/src/functions/tnlTestFunction.h @@ -54,6 +54,8 @@ class tnlTestFunction bool setup( const tnlParameterContainer& parameters, const tnlString& prefix = "" ); + const tnlTestFunction& operator = ( const tnlTestFunction& function ); + #ifdef HAVE_NOT_CXX11 template< int XDiffOrder, int YDiffOrder, @@ -71,6 +73,15 @@ class tnlTestFunction Real getValue( const Vertex& vertex, const Real& time = 0 ) const; +#ifdef HAVE_NOT_CXX11 + template< typename Vertex > + Real getValue( const Vertex& vertex, + const Real& time = 0 ) const + { + return this->getValue< 0, 0, 0, Vertex >( vertex, time ); + } +#endif + #ifdef HAVE_NOT_CXX11 template< int XDiffOrder, int YDiffOrder, @@ -88,6 +99,15 @@ class tnlTestFunction Real getTimeDerivative( const Vertex& vertex, const Real& time = 0 ) const; +#ifdef HAVE_NOT_CXX11 + template< typename Vertex > + Real getTimeDerivative( const Vertex& vertex, + const Real& time = 0 ) const + { + return this->getTimeDerivative< 0, 0, 0, Vertex >( vertex, time ); + } +#endif + ~tnlTestFunction(); protected: diff --git a/src/implementation/core/arrays/tnlArrayOperationsCuda_impl.cpp b/src/implementation/core/arrays/tnlArrayOperationsCuda_impl.cpp index 32d2b7207a30e332214e31fe05bc91f8a45d5413..b1dba6e09237516ef773e933b372e84b817010e4 100644 --- a/src/implementation/core/arrays/tnlArrayOperationsCuda_impl.cpp +++ b/src/implementation/core/arrays/tnlArrayOperationsCuda_impl.cpp @@ -24,136 +24,136 @@ template bool tnlArrayOperations< tnlCuda >::allocateMemory< int, int >( template bool tnlArrayOperations< tnlCuda >::allocateMemory< long int, int >( long int*& data, const int size ); template bool tnlArrayOperations< tnlCuda >::allocateMemory< float, int >( float*& data, const int size ); template bool tnlArrayOperations< tnlCuda >::allocateMemory< double, int >( double*& data, const int size ); -template bool tnlArrayOperations< tnlCuda >::allocateMemory< long double, int >( long double*& data, const int size ); +//template bool tnlArrayOperations< tnlCuda >::allocateMemory< long double, int >( long double*& data, const int size ); template bool tnlArrayOperations< tnlCuda >::allocateMemory< char, long int >( char*& data, const long int size ); template bool tnlArrayOperations< tnlCuda >::allocateMemory< int, long int >( int*& data, const long int size ); template bool tnlArrayOperations< tnlCuda >::allocateMemory< long int, long int >( long int*& data, const long int size ); template bool tnlArrayOperations< tnlCuda >::allocateMemory< float, long int >( float*& data, const long int size ); template bool tnlArrayOperations< tnlCuda >::allocateMemory< double, long int >( double*& data, const long int size ); -template bool tnlArrayOperations< tnlCuda >::allocateMemory< long double, long int >( long double*& data, const long int size ); +//template bool tnlArrayOperations< tnlCuda >::allocateMemory< long double, long int >( long double*& data, const long int size ); template bool tnlArrayOperations< tnlCuda >::freeMemory< char >( char* data ); template bool tnlArrayOperations< tnlCuda >::freeMemory< int >( int* data ); template bool tnlArrayOperations< tnlCuda >::freeMemory< long int >( long int* data ); template bool tnlArrayOperations< tnlCuda >::freeMemory< float >( float* data ); template bool tnlArrayOperations< tnlCuda >::freeMemory< double >( double* data ); -template bool tnlArrayOperations< tnlCuda >::freeMemory< long double >( long double* data ); +//template bool tnlArrayOperations< tnlCuda >::freeMemory< long double >( long double* data ); template void tnlArrayOperations< tnlCuda >::setMemoryElement< char >( char* data, const char& value ); template void tnlArrayOperations< tnlCuda >::setMemoryElement< int >( int* data, const int& value ); template void tnlArrayOperations< tnlCuda >::setMemoryElement< long int >( long int* data, const long int& value ); template void tnlArrayOperations< tnlCuda >::setMemoryElement< float >( float* data, const float& value ); template void tnlArrayOperations< tnlCuda >::setMemoryElement< double >( double* data, const double& value ); -template void tnlArrayOperations< tnlCuda >::setMemoryElement< long double >( long double* data, const long double& value ); +//template void tnlArrayOperations< tnlCuda >::setMemoryElement< long double >( long double* data, const long double& value ); template char tnlArrayOperations< tnlCuda >::getMemoryElement< char >( const char* data ); template int tnlArrayOperations< tnlCuda >::getMemoryElement< int >( const int* data ); template long int tnlArrayOperations< tnlCuda >::getMemoryElement< long int >( const long int* data ); template float tnlArrayOperations< tnlCuda >::getMemoryElement< float >( const float* data ); template double tnlArrayOperations< tnlCuda >::getMemoryElement< double >( const double* data ); -template long double tnlArrayOperations< tnlCuda >::getMemoryElement< long double >( const long double* data ); +//template long double tnlArrayOperations< tnlCuda >::getMemoryElement< long double >( const long double* data ); template char& tnlArrayOperations< tnlCuda >::getArrayElementReference< char, int >( char* data, const int i ); template int& tnlArrayOperations< tnlCuda >::getArrayElementReference< int, int >( int* data, const int i ); template long int& tnlArrayOperations< tnlCuda >::getArrayElementReference< long int, int >( long int* data, const int i ); template float& tnlArrayOperations< tnlCuda >::getArrayElementReference< float, int >( float* data, const int i ); template double& tnlArrayOperations< tnlCuda >::getArrayElementReference< double, int >( double* data, const int i ); -template long double& tnlArrayOperations< tnlCuda >::getArrayElementReference< long double, int >( long double* data, const int i ); +//template long double& tnlArrayOperations< tnlCuda >::getArrayElementReference< long double, int >( long double* data, const int i ); template char& tnlArrayOperations< tnlCuda >::getArrayElementReference< char, long int >( char* data, const long int i ); template int& tnlArrayOperations< tnlCuda >::getArrayElementReference< int, long int >( int* data, const long int i ); template long int& tnlArrayOperations< tnlCuda >::getArrayElementReference< long int, long int >( long int* data, const long int i ); template float& tnlArrayOperations< tnlCuda >::getArrayElementReference< float, long int >( float* data, const long int i ); template double& tnlArrayOperations< tnlCuda >::getArrayElementReference< double, long int >( double* data, const long int i ); -template long double& tnlArrayOperations< tnlCuda >::getArrayElementReference< long double, long int >( long double* data, const long int i ); +//template long double& tnlArrayOperations< tnlCuda >::getArrayElementReference< long double, long int >( long double* data, const long int i ); template const char& tnlArrayOperations< tnlCuda >::getArrayElementReference< char, int >( const char* data, const int i ); template const int& tnlArrayOperations< tnlCuda >::getArrayElementReference< int, int >( const int* data, const int i ); template const long int& tnlArrayOperations< tnlCuda >::getArrayElementReference< long int, int >( const long int* data, const int i ); template const float& tnlArrayOperations< tnlCuda >::getArrayElementReference< float, int >( const float* data, const int i ); template const double& tnlArrayOperations< tnlCuda >::getArrayElementReference< double, int >( const double* data, const int i ); -template const long double& tnlArrayOperations< tnlCuda >::getArrayElementReference< long double, int >( const long double* data, const int i ); +//template const long double& tnlArrayOperations< tnlCuda >::getArrayElementReference< long double, int >( const long double* data, const int i ); template const char& tnlArrayOperations< tnlCuda >::getArrayElementReference< char, long int >( const char* data, const long int i ); template const int& tnlArrayOperations< tnlCuda >::getArrayElementReference< int, long int >( const int* data, const long int i ); template const long int& tnlArrayOperations< tnlCuda >::getArrayElementReference< long int, long int >( const long int* data, const long int i ); template const float& tnlArrayOperations< tnlCuda >::getArrayElementReference< float, long int >( const float* data, const long int i ); template const double& tnlArrayOperations< tnlCuda >::getArrayElementReference< double, long int >( const double* data, const long int i ); -template const long double& tnlArrayOperations< tnlCuda >::getArrayElementReference< long double, long int >( const long double* data, const long int i ); +//template const long double& tnlArrayOperations< tnlCuda >::getArrayElementReference< long double, long int >( const long double* data, const long int i ); template bool tnlArrayOperations< tnlCuda >::copyMemory< char, char, int >( char* destination, const char* source, const int size ); template bool tnlArrayOperations< tnlCuda >::copyMemory< int, int, int >( int* destination, const int* source, const int size ); template bool tnlArrayOperations< tnlCuda >::copyMemory< long int, long int, int >( long int* destination, const long int* source, const int size ); template bool tnlArrayOperations< tnlCuda >::copyMemory< float, float, int >( float* destination, const float* source, const int size ); template bool tnlArrayOperations< tnlCuda >::copyMemory< double, double, int >( double* destination, const double* source, const int size ); -template bool tnlArrayOperations< tnlCuda >::copyMemory< long double, long double, int >( long double* destination, const long double* source, const int size ); +//template bool tnlArrayOperations< tnlCuda >::copyMemory< long double, long double, int >( long double* destination, const long double* source, const int size ); template bool tnlArrayOperations< tnlCuda >::copyMemory< char, char, long int >( char* destination, const char* source, const long int size ); template bool tnlArrayOperations< tnlCuda >::copyMemory< int, int, long int >( int* destination, const int* source, const long int size ); template bool tnlArrayOperations< tnlCuda >::copyMemory< long int, long int, long int >( long int* destination, const long int* source, const long int size ); template bool tnlArrayOperations< tnlCuda >::copyMemory< float, float, long int >( float* destination, const float* source, const long int size ); template bool tnlArrayOperations< tnlCuda >::copyMemory< double, double, long int >( double* destination, const double* source, const long int size ); -template bool tnlArrayOperations< tnlCuda >::copyMemory< long double, long double, long int >( long double* destination, const long double* source, const long int size ); +//template bool tnlArrayOperations< tnlCuda >::copyMemory< long double, long double, long int >( long double* destination, const long double* source, const long int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< char, char, int >( char* destination, const char* source, const int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< int, int, int >( int* destination, const int* source, const int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< long int, long int, int >( long int* destination, const long int* source, const int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< float, float, int >( float* destination, const float* source, const int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< double, double, int >( double* destination, const double* source, const int size ); -template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< long double, long double, int >( long double* destination, const long double* source, const int size ); +//template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< long double, long double, int >( long double* destination, const long double* source, const int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< char, char, long int >( char* destination, const char* source, const long int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< int, int, long int >( int* destination, const int* source, const long int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< long int, long int, long int >( long int* destination, const long int* source, const long int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< float, float, long int >( float* destination, const float* source, const long int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< double, double, long int >( double* destination, const double* source, const long int size ); -template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< long double, long double, long int >( long double* destination, const long double* source, const long int size ); +//template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< long double, long double, long int >( long double* destination, const long double* source, const long int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< char, char, int >( char* destination, const char* source, const int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< int, int, int >( int* destination, const int* source, const int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< long int, long int, int >( long int* destination, const long int* source, const int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< float, float, int >( float* destination, const float* source, const int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< double, double, int >( double* destination, const double* source, const int size ); -template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< long double, long double, int >( long double* destination, const long double* source, const int size ); +//template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< long double, long double, int >( long double* destination, const long double* source, const int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< char, char, long int >( char* destination, const char* source, const long int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< int, int, long int >( int* destination, const int* source, const long int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< long int, long int, long int >( long int* destination, const long int* source, const long int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< float, float, long int >( float* destination, const float* source, const long int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< double, double, long int >( double* destination, const double* source, const long int size ); -template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< long double, long double, long int >( long double* destination, const long double* source, const long int size ); +//template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< long double, long double, long int >( long double* destination, const long double* source, const long int size ); template bool tnlArrayOperations< tnlCuda >::compareMemory< char, char, int >( const char* data1, const char* data2, const int size ); template bool tnlArrayOperations< tnlCuda >::compareMemory< int, int, int >( const int* data1, const int* data2, const int size ); template bool tnlArrayOperations< tnlCuda >::compareMemory< long int, long int, int >( const long int* data1, const long int* data2, const int size ); template bool tnlArrayOperations< tnlCuda >::compareMemory< float, float, int >( const float* data1, const float* data2, const int size ); template bool tnlArrayOperations< tnlCuda >::compareMemory< double, double, int >( const double* data1, const double* data2, const int size ); -template bool tnlArrayOperations< tnlCuda >::compareMemory< long double, long double, int >( const long double* data1, const long double* data2, const int size ); +//template bool tnlArrayOperations< tnlCuda >::compareMemory< long double, long double, int >( const long double* data1, const long double* data2, const int size ); template bool tnlArrayOperations< tnlCuda >::compareMemory< char, char, long int >( const char* data1, const char* data2, const long int size ); template bool tnlArrayOperations< tnlCuda >::compareMemory< int, int, long int >( const int* data1, const int* data2, const long int size ); template bool tnlArrayOperations< tnlCuda >::compareMemory< long int, long int, long int >( const long int* data1, const long int* data2, const long int size ); template bool tnlArrayOperations< tnlCuda >::compareMemory< float, float, long int >( const float* data1, const float* data2, const long int size ); template bool tnlArrayOperations< tnlCuda >::compareMemory< double, double, long int >( const double* data1, const double* data2, const long int size ); -template bool tnlArrayOperations< tnlCuda >::compareMemory< long double, long double, long int >( const long double* data1, const long double* data2, const long int size ); +//template bool tnlArrayOperations< tnlCuda >::compareMemory< long double, long double, long int >( const long double* data1, const long double* data2, const long int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< char, char, int >( const char* data1, const char* data2, const int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< int, int, int >( const int* data1, const int* data2, const int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< long int, long int, int >( const long int* data1, const long int* data2, const int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< float, float, int >( const float* data1, const float* data2, const int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< double, double, int >( const double* data1, const double* data2, const int size ); -template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< long double, long double, int >( const long double* data1, const long double* data2, const int size ); +//template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< long double, long double, int >( const long double* data1, const long double* data2, const int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< char, char, long int >( const char* data1, const char* data2, const long int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< int, int, long int >( const int* data1, const int* data2, const long int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< long int, long int, long int >( const long int* data1, const long int* data2, const long int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< float, float, long int >( const float* data1, const float* data2, const long int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< double, double, long int >( const double* data1, const double* data2, const long int size ); -template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< long double, long double, long int >( const long double* data1, const long double* data2, const long int size ); +//template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< long double, long double, long int >( const long double* data1, const long double* data2, const long int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< char, char, int >( const char* data1, const char* data2, const int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< int, int, int >( const int* data1, const int* data2, const int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< long int, long int, int >( const long int* data1, const long int* data2, const int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< float, float, int >( const float* data1, const float* data2, const int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< double, double, int >( const double* data1, const double* data2, const int size ); -template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< long double, long double, int >( const long double* data1, const long double* data2, const int size ); +//template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< long double, long double, int >( const long double* data1, const long double* data2, const int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< char, char, long int >( const char* data1, const char* data2, const long int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< int, int, long int >( const int* data1, const int* data2, const long int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< long int, long int, long int >( const long int* data1, const long int* data2, const long int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< float, float, long int >( const float* data1, const float* data2, const long int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< double, double, long int >( const double* data1, const double* data2, const long int size ); -template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< long double, long double, long int >( const long double* data1, const long double* data2, const long int size ); +//template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< long double, long double, long int >( const long double* data1, const long double* data2, const long int size ); template bool tnlArrayOperations< tnlCuda >::setMemory< char, int >( char* destination, const char& value, const int size ); @@ -161,13 +161,13 @@ template bool tnlArrayOperations< tnlCuda >::setMemory< int, int >( int* template bool tnlArrayOperations< tnlCuda >::setMemory< long int, int >( long int* destination, const long int& value, const int size ); template bool tnlArrayOperations< tnlCuda >::setMemory< float, int >( float* destination, const float& value, const int size ); template bool tnlArrayOperations< tnlCuda >::setMemory< double, int >( double* destination, const double& value, const int size ); -template bool tnlArrayOperations< tnlCuda >::setMemory< long double, int >( long double* destination, const long double& value, const int size ); +//template bool tnlArrayOperations< tnlCuda >::setMemory< long double, int >( long double* destination, const long double& value, const int size ); template bool tnlArrayOperations< tnlCuda >::setMemory< char, long int >( char* destination, const char& value, const long int size ); template bool tnlArrayOperations< tnlCuda >::setMemory< int, long int >( int* destination, const int& value, const long int size ); template bool tnlArrayOperations< tnlCuda >::setMemory< long int, long int >( long int* destination, const long int& value, const long int size ); template bool tnlArrayOperations< tnlCuda >::setMemory< float, long int >( float* destination, const float& value, const long int size ); template bool tnlArrayOperations< tnlCuda >::setMemory< double, long int >( double* destination, const double& value, const long int size ); -template bool tnlArrayOperations< tnlCuda >::setMemory< long double, long int >( long double* destination, const long double& value, const long int size ); +//template bool tnlArrayOperations< tnlCuda >::setMemory< long double, long int >( long double* destination, const long double& value, const long int size ); #endif diff --git a/src/implementation/core/arrays/tnlArrayOperationsCuda_impl.cu b/src/implementation/core/arrays/tnlArrayOperationsCuda_impl.cu index c6013f707689dd020800a74092989109e695ad77..326ead4c762d042f5fe31c4393d4abd7ab4393d4 100644 --- a/src/implementation/core/arrays/tnlArrayOperationsCuda_impl.cu +++ b/src/implementation/core/arrays/tnlArrayOperationsCuda_impl.cu @@ -24,136 +24,136 @@ template bool tnlArrayOperations< tnlCuda >::allocateMemory< int, int >( template bool tnlArrayOperations< tnlCuda >::allocateMemory< long int, int >( long int*& data, const int size ); template bool tnlArrayOperations< tnlCuda >::allocateMemory< float, int >( float*& data, const int size ); template bool tnlArrayOperations< tnlCuda >::allocateMemory< double, int >( double*& data, const int size ); -template bool tnlArrayOperations< tnlCuda >::allocateMemory< long double, int >( long double*& data, const int size ); +//template bool tnlArrayOperations< tnlCuda >::allocateMemory< long double, int >( long double*& data, const int size ); template bool tnlArrayOperations< tnlCuda >::allocateMemory< char, long int >( char*& data, const long int size ); template bool tnlArrayOperations< tnlCuda >::allocateMemory< int, long int >( int*& data, const long int size ); template bool tnlArrayOperations< tnlCuda >::allocateMemory< long int, long int >( long int*& data, const long int size ); template bool tnlArrayOperations< tnlCuda >::allocateMemory< float, long int >( float*& data, const long int size ); template bool tnlArrayOperations< tnlCuda >::allocateMemory< double, long int >( double*& data, const long int size ); -template bool tnlArrayOperations< tnlCuda >::allocateMemory< long double, long int >( long double*& data, const long int size ); +//template bool tnlArrayOperations< tnlCuda >::allocateMemory< long double, long int >( long double*& data, const long int size ); template bool tnlArrayOperations< tnlCuda >::freeMemory< char >( char* data ); template bool tnlArrayOperations< tnlCuda >::freeMemory< int >( int* data ); template bool tnlArrayOperations< tnlCuda >::freeMemory< long int >( long int* data ); template bool tnlArrayOperations< tnlCuda >::freeMemory< float >( float* data ); template bool tnlArrayOperations< tnlCuda >::freeMemory< double >( double* data ); -template bool tnlArrayOperations< tnlCuda >::freeMemory< long double >( long double* data ); +//template bool tnlArrayOperations< tnlCuda >::freeMemory< long double >( long double* data ); template void tnlArrayOperations< tnlCuda >::setMemoryElement< char >( char* data, const char& value ); template void tnlArrayOperations< tnlCuda >::setMemoryElement< int >( int* data, const int& value ); template void tnlArrayOperations< tnlCuda >::setMemoryElement< long int >( long int* data, const long int& value ); template void tnlArrayOperations< tnlCuda >::setMemoryElement< float >( float* data, const float& value ); template void tnlArrayOperations< tnlCuda >::setMemoryElement< double >( double* data, const double& value ); -template void tnlArrayOperations< tnlCuda >::setMemoryElement< long double >( long double* data, const long double& value ); +//template void tnlArrayOperations< tnlCuda >::setMemoryElement< long double >( long double* data, const long double& value ); template char tnlArrayOperations< tnlCuda >::getMemoryElement< char >( const char* data ); template int tnlArrayOperations< tnlCuda >::getMemoryElement< int >( const int* data ); template long int tnlArrayOperations< tnlCuda >::getMemoryElement< long int >( const long int* data ); template float tnlArrayOperations< tnlCuda >::getMemoryElement< float >( const float* data ); template double tnlArrayOperations< tnlCuda >::getMemoryElement< double >( const double* data ); -template long double tnlArrayOperations< tnlCuda >::getMemoryElement< long double >( const long double* data ); +//template long double tnlArrayOperations< tnlCuda >::getMemoryElement< long double >( const long double* data ); template char& tnlArrayOperations< tnlCuda >::getArrayElementReference< char, int >( char* data, const int i ); template int& tnlArrayOperations< tnlCuda >::getArrayElementReference< int, int >( int* data, const int i ); template long int& tnlArrayOperations< tnlCuda >::getArrayElementReference< long int, int >( long int* data, const int i ); template float& tnlArrayOperations< tnlCuda >::getArrayElementReference< float, int >( float* data, const int i ); template double& tnlArrayOperations< tnlCuda >::getArrayElementReference< double, int >( double* data, const int i ); -template long double& tnlArrayOperations< tnlCuda >::getArrayElementReference< long double, int >( long double* data, const int i ); +//template long double& tnlArrayOperations< tnlCuda >::getArrayElementReference< long double, int >( long double* data, const int i ); template char& tnlArrayOperations< tnlCuda >::getArrayElementReference< char, long int >( char* data, const long int i ); template int& tnlArrayOperations< tnlCuda >::getArrayElementReference< int, long int >( int* data, const long int i ); template long int& tnlArrayOperations< tnlCuda >::getArrayElementReference< long int, long int >( long int* data, const long int i ); template float& tnlArrayOperations< tnlCuda >::getArrayElementReference< float, long int >( float* data, const long int i ); template double& tnlArrayOperations< tnlCuda >::getArrayElementReference< double, long int >( double* data, const long int i ); -template long double& tnlArrayOperations< tnlCuda >::getArrayElementReference< long double, long int >( long double* data, const long int i ); +//template long double& tnlArrayOperations< tnlCuda >::getArrayElementReference< long double, long int >( long double* data, const long int i ); template const char& tnlArrayOperations< tnlCuda >::getArrayElementReference< char, int >( const char* data, const int i ); template const int& tnlArrayOperations< tnlCuda >::getArrayElementReference< int, int >( const int* data, const int i ); template const long int& tnlArrayOperations< tnlCuda >::getArrayElementReference< long int, int >( const long int* data, const int i ); template const float& tnlArrayOperations< tnlCuda >::getArrayElementReference< float, int >( const float* data, const int i ); template const double& tnlArrayOperations< tnlCuda >::getArrayElementReference< double, int >( const double* data, const int i ); -template const long double& tnlArrayOperations< tnlCuda >::getArrayElementReference< long double, int >( const long double* data, const int i ); +//template const long double& tnlArrayOperations< tnlCuda >::getArrayElementReference< long double, int >( const long double* data, const int i ); template const char& tnlArrayOperations< tnlCuda >::getArrayElementReference< char, long int >( const char* data, const long int i ); template const int& tnlArrayOperations< tnlCuda >::getArrayElementReference< int, long int >( const int* data, const long int i ); template const long int& tnlArrayOperations< tnlCuda >::getArrayElementReference< long int, long int >( const long int* data, const long int i ); template const float& tnlArrayOperations< tnlCuda >::getArrayElementReference< float, long int >( const float* data, const long int i ); template const double& tnlArrayOperations< tnlCuda >::getArrayElementReference< double, long int >( const double* data, const long int i ); -template const long double& tnlArrayOperations< tnlCuda >::getArrayElementReference< long double, long int >( const long double* data, const long int i ); +//template const long double& tnlArrayOperations< tnlCuda >::getArrayElementReference< long double, long int >( const long double* data, const long int i ); template bool tnlArrayOperations< tnlCuda >::copyMemory< char, char, int >( char* destination, const char* source, const int size ); template bool tnlArrayOperations< tnlCuda >::copyMemory< int, int, int >( int* destination, const int* source, const int size ); template bool tnlArrayOperations< tnlCuda >::copyMemory< long int, long int, int >( long int* destination, const long int* source, const int size ); template bool tnlArrayOperations< tnlCuda >::copyMemory< float, float, int >( float* destination, const float* source, const int size ); template bool tnlArrayOperations< tnlCuda >::copyMemory< double, double, int >( double* destination, const double* source, const int size ); -template bool tnlArrayOperations< tnlCuda >::copyMemory< long double, long double, int >( long double* destination, const long double* source, const int size ); +//template bool tnlArrayOperations< tnlCuda >::copyMemory< long double, long double, int >( long double* destination, const long double* source, const int size ); template bool tnlArrayOperations< tnlCuda >::copyMemory< char, char, long int >( char* destination, const char* source, const long int size ); template bool tnlArrayOperations< tnlCuda >::copyMemory< int, int, long int >( int* destination, const int* source, const long int size ); template bool tnlArrayOperations< tnlCuda >::copyMemory< long int, long int, long int >( long int* destination, const long int* source, const long int size ); template bool tnlArrayOperations< tnlCuda >::copyMemory< float, float, long int >( float* destination, const float* source, const long int size ); template bool tnlArrayOperations< tnlCuda >::copyMemory< double, double, long int >( double* destination, const double* source, const long int size ); -template bool tnlArrayOperations< tnlCuda >::copyMemory< long double, long double, long int >( long double* destination, const long double* source, const long int size ); +//template bool tnlArrayOperations< tnlCuda >::copyMemory< long double, long double, long int >( long double* destination, const long double* source, const long int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< char, char, int >( char* destination, const char* source, const int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< int, int, int >( int* destination, const int* source, const int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< long int, long int, int >( long int* destination, const long int* source, const int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< float, float, int >( float* destination, const float* source, const int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< double, double, int >( double* destination, const double* source, const int size ); -template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< long double, long double, int >( long double* destination, const long double* source, const int size ); +//template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< long double, long double, int >( long double* destination, const long double* source, const int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< char, char, long int >( char* destination, const char* source, const long int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< int, int, long int >( int* destination, const int* source, const long int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< long int, long int, long int >( long int* destination, const long int* source, const long int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< float, float, long int >( float* destination, const float* source, const long int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< double, double, long int >( double* destination, const double* source, const long int size ); -template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< long double, long double, long int >( long double* destination, const long double* source, const long int size ); +//template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< long double, long double, long int >( long double* destination, const long double* source, const long int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< char, char, int >( char* destination, const char* source, const int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< int, int, int >( int* destination, const int* source, const int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< long int, long int, int >( long int* destination, const long int* source, const int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< float, float, int >( float* destination, const float* source, const int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< double, double, int >( double* destination, const double* source, const int size ); -template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< long double, long double, int >( long double* destination, const long double* source, const int size ); +//template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< long double, long double, int >( long double* destination, const long double* source, const int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< char, char, long int >( char* destination, const char* source, const long int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< int, int, long int >( int* destination, const int* source, const long int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< long int, long int, long int >( long int* destination, const long int* source, const long int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< float, float, long int >( float* destination, const float* source, const long int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< double, double, long int >( double* destination, const double* source, const long int size ); -template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< long double, long double, long int >( long double* destination, const long double* source, const long int size ); +//template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< long double, long double, long int >( long double* destination, const long double* source, const long int size ); template bool tnlArrayOperations< tnlCuda >::compareMemory< char, char, int >( const char* data1, const char* data2, const int size ); template bool tnlArrayOperations< tnlCuda >::compareMemory< int, int, int >( const int* data1, const int* data2, const int size ); template bool tnlArrayOperations< tnlCuda >::compareMemory< long int, long int, int >( const long int* data1, const long int* data2, const int size ); template bool tnlArrayOperations< tnlCuda >::compareMemory< float, float, int >( const float* data1, const float* data2, const int size ); template bool tnlArrayOperations< tnlCuda >::compareMemory< double, double, int >( const double* data1, const double* data2, const int size ); -template bool tnlArrayOperations< tnlCuda >::compareMemory< long double, long double, int >( const long double* data1, const long double* data2, const int size ); +//template bool tnlArrayOperations< tnlCuda >::compareMemory< long double, long double, int >( const long double* data1, const long double* data2, const int size ); template bool tnlArrayOperations< tnlCuda >::compareMemory< char, char, long int >( const char* data1, const char* data2, const long int size ); template bool tnlArrayOperations< tnlCuda >::compareMemory< int, int, long int >( const int* data1, const int* data2, const long int size ); template bool tnlArrayOperations< tnlCuda >::compareMemory< long int, long int, long int >( const long int* data1, const long int* data2, const long int size ); template bool tnlArrayOperations< tnlCuda >::compareMemory< float, float, long int >( const float* data1, const float* data2, const long int size ); template bool tnlArrayOperations< tnlCuda >::compareMemory< double, double, long int >( const double* data1, const double* data2, const long int size ); -template bool tnlArrayOperations< tnlCuda >::compareMemory< long double, long double, long int >( const long double* data1, const long double* data2, const long int size ); +//template bool tnlArrayOperations< tnlCuda >::compareMemory< long double, long double, long int >( const long double* data1, const long double* data2, const long int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< char, char, int >( const char* data1, const char* data2, const int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< int, int, int >( const int* data1, const int* data2, const int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< long int, long int, int >( const long int* data1, const long int* data2, const int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< float, float, int >( const float* data1, const float* data2, const int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< double, double, int >( const double* data1, const double* data2, const int size ); -template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< long double, long double, int >( const long double* data1, const long double* data2, const int size ); +//template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< long double, long double, int >( const long double* data1, const long double* data2, const int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< char, char, long int >( const char* data1, const char* data2, const long int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< int, int, long int >( const int* data1, const int* data2, const long int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< long int, long int, long int >( const long int* data1, const long int* data2, const long int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< float, float, long int >( const float* data1, const float* data2, const long int size ); template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< double, double, long int >( const double* data1, const double* data2, const long int size ); -template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< long double, long double, long int >( const long double* data1, const long double* data2, const long int size ); +//template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< long double, long double, long int >( const long double* data1, const long double* data2, const long int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< char, char, int >( const char* data1, const char* data2, const int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< int, int, int >( const int* data1, const int* data2, const int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< long int, long int, int >( const long int* data1, const long int* data2, const int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< float, float, int >( const float* data1, const float* data2, const int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< double, double, int >( const double* data1, const double* data2, const int size ); -template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< long double, long double, int >( const long double* data1, const long double* data2, const int size ); +//template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< long double, long double, int >( const long double* data1, const long double* data2, const int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< char, char, long int >( const char* data1, const char* data2, const long int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< int, int, long int >( const int* data1, const int* data2, const long int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< long int, long int, long int >( const long int* data1, const long int* data2, const long int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< float, float, long int >( const float* data1, const float* data2, const long int size ); template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< double, double, long int >( const double* data1, const double* data2, const long int size ); -template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< long double, long double, long int >( const long double* data1, const long double* data2, const long int size ); +//template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< long double, long double, long int >( const long double* data1, const long double* data2, const long int size ); template bool tnlArrayOperations< tnlCuda >::setMemory< char, int >( char* destination, const char& value, const int size ); @@ -161,13 +161,13 @@ template bool tnlArrayOperations< tnlCuda >::setMemory< int, int >( int* template bool tnlArrayOperations< tnlCuda >::setMemory< long int, int >( long int* destination, const long int& value, const int size ); template bool tnlArrayOperations< tnlCuda >::setMemory< float, int >( float* destination, const float& value, const int size ); template bool tnlArrayOperations< tnlCuda >::setMemory< double, int >( double* destination, const double& value, const int size ); -template bool tnlArrayOperations< tnlCuda >::setMemory< long double, int >( long double* destination, const long double& value, const int size ); +//template bool tnlArrayOperations< tnlCuda >::setMemory< long double, int >( long double* destination, const long double& value, const int size ); template bool tnlArrayOperations< tnlCuda >::setMemory< char, long int >( char* destination, const char& value, const long int size ); template bool tnlArrayOperations< tnlCuda >::setMemory< int, long int >( int* destination, const int& value, const long int size ); template bool tnlArrayOperations< tnlCuda >::setMemory< long int, long int >( long int* destination, const long int& value, const long int size ); template bool tnlArrayOperations< tnlCuda >::setMemory< float, long int >( float* destination, const float& value, const long int size ); template bool tnlArrayOperations< tnlCuda >::setMemory< double, long int >( double* destination, const double& value, const long int size ); -template bool tnlArrayOperations< tnlCuda >::setMemory< long double, long int >( long double* destination, const long double& value, const long int size ); +//template bool tnlArrayOperations< tnlCuda >::setMemory< long double, long int >( long double* destination, const long double& value, const long int size ); #endif diff --git a/src/implementation/core/arrays/tnlArrayOperationsCuda_impl.h b/src/implementation/core/arrays/tnlArrayOperationsCuda_impl.h index afe1675361ab2718d0bc5abf6f6b75bcc0ba3684..23ccd957d28ce02415f0eac4ca997e7c5a0b4e89 100644 --- a/src/implementation/core/arrays/tnlArrayOperationsCuda_impl.h +++ b/src/implementation/core/arrays/tnlArrayOperationsCuda_impl.h @@ -109,8 +109,8 @@ bool tnlArrayOperations< tnlCuda >::setMemory( Element* data, setArrayValueCudaKernel<<< gridSize, blockSize >>>( data, size, value ); return checkCudaDevice; #else - tnlCudaSupportMissingMessage;; - return false; + tnlCudaSupportMissingMessage;; + return false; #endif } @@ -158,9 +158,9 @@ bool tnlArrayOperations< tnlCuda >::copyMemory( DestinationElement* destination, return checkCudaDevice; } #else - tnlCudaSupportMissingMessage;; - return false; + tnlCudaSupportMissingMessage;; #endif + return false; } template< typename Element1, @@ -233,6 +233,7 @@ bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory( DestinationElement* des tnlCudaSupportMissingMessage;; return false; #endif + return true; } @@ -354,149 +355,149 @@ extern template bool tnlArrayOperations< tnlCuda >::allocateMemory< int, extern template bool tnlArrayOperations< tnlCuda >::allocateMemory< long int, int >( long int*& data, const int size ); extern template bool tnlArrayOperations< tnlCuda >::allocateMemory< float, int >( float*& data, const int size ); extern template bool tnlArrayOperations< tnlCuda >::allocateMemory< double, int >( double*& data, const int size ); -extern template bool tnlArrayOperations< tnlCuda >::allocateMemory< long double, int >( long double*& data, const int size ); +//extern template bool tnlArrayOperations< tnlCuda >::allocateMemory< long double, int >( long double*& data, const int size ); extern template bool tnlArrayOperations< tnlCuda >::allocateMemory< char, long int >( char*& data, const long int size ); extern template bool tnlArrayOperations< tnlCuda >::allocateMemory< int, long int >( int*& data, const long int size ); extern template bool tnlArrayOperations< tnlCuda >::allocateMemory< long int, long int >( long int*& data, const long int size ); extern template bool tnlArrayOperations< tnlCuda >::allocateMemory< float, long int >( float*& data, const long int size ); extern template bool tnlArrayOperations< tnlCuda >::allocateMemory< double, long int >( double*& data, const long int size ); -extern template bool tnlArrayOperations< tnlCuda >::allocateMemory< long double, long int >( long double*& data, const long int size ); +//extern template bool tnlArrayOperations< tnlCuda >::allocateMemory< long double, long int >( long double*& data, const long int size ); extern template bool tnlArrayOperations< tnlCuda >::freeMemory< char >( char* data ); extern template bool tnlArrayOperations< tnlCuda >::freeMemory< int >( int* data ); extern template bool tnlArrayOperations< tnlCuda >::freeMemory< long int >( long int* data ); extern template bool tnlArrayOperations< tnlCuda >::freeMemory< float >( float* data ); extern template bool tnlArrayOperations< tnlCuda >::freeMemory< double >( double* data ); -extern template bool tnlArrayOperations< tnlCuda >::freeMemory< long double >( long double* data ); +//extern template bool tnlArrayOperations< tnlCuda >::freeMemory< long double >( long double* data ); extern template void tnlArrayOperations< tnlCuda >::setMemoryElement< char >( char* data, const char& value ); extern template void tnlArrayOperations< tnlCuda >::setMemoryElement< int >( int* data, const int& value ); extern template void tnlArrayOperations< tnlCuda >::setMemoryElement< long int >( long int* data, const long int& value ); extern template void tnlArrayOperations< tnlCuda >::setMemoryElement< float >( float* data, const float& value ); extern template void tnlArrayOperations< tnlCuda >::setMemoryElement< double >( double* data, const double& value ); -extern template void tnlArrayOperations< tnlCuda >::setMemoryElement< long double >( long double* data, const long double& value ); +//extern template void tnlArrayOperations< tnlCuda >::setMemoryElement< long double >( long double* data, const long double& value ); extern template char tnlArrayOperations< tnlCuda >::getMemoryElement< char >( const char* data ); extern template int tnlArrayOperations< tnlCuda >::getMemoryElement< int >( const int* data ); extern template long int tnlArrayOperations< tnlCuda >::getMemoryElement< long int >( const long int* data ); extern template float tnlArrayOperations< tnlCuda >::getMemoryElement< float >( const float* data ); extern template double tnlArrayOperations< tnlCuda >::getMemoryElement< double >( const double* data ); -extern template long double tnlArrayOperations< tnlCuda >::getMemoryElement< long double >( const long double* data ); +//extern template long double tnlArrayOperations< tnlCuda >::getMemoryElement< long double >( const long double* data ); extern template char& tnlArrayOperations< tnlCuda >::getArrayElementReference< char, int >( char* data, const int i ); extern template int& tnlArrayOperations< tnlCuda >::getArrayElementReference< int, int >( int* data, const int i ); extern template long int& tnlArrayOperations< tnlCuda >::getArrayElementReference< long int, int >( long int* data, const int i ); extern template float& tnlArrayOperations< tnlCuda >::getArrayElementReference< float, int >( float* data, const int i ); extern template double& tnlArrayOperations< tnlCuda >::getArrayElementReference< double, int >( double* data, const int i ); -extern template long double& tnlArrayOperations< tnlCuda >::getArrayElementReference< long double, int >( long double* data, const int i ); +//extern template long double& tnlArrayOperations< tnlCuda >::getArrayElementReference< long double, int >( long double* data, const int i ); extern template char& tnlArrayOperations< tnlCuda >::getArrayElementReference< char, long int >( char* data, const long int i ); extern template int& tnlArrayOperations< tnlCuda >::getArrayElementReference< int, long int >( int* data, const long int i ); extern template long int& tnlArrayOperations< tnlCuda >::getArrayElementReference< long int, long int >( long int* data, const long int i ); extern template float& tnlArrayOperations< tnlCuda >::getArrayElementReference< float, long int >( float* data, const long int i ); extern template double& tnlArrayOperations< tnlCuda >::getArrayElementReference< double, long int >( double* data, const long int i ); -extern template long double& tnlArrayOperations< tnlCuda >::getArrayElementReference< long double, long int >( long double* data, const long int i ); +//extern template long double& tnlArrayOperations< tnlCuda >::getArrayElementReference< long double, long int >( long double* data, const long int i ); extern template const char& tnlArrayOperations< tnlCuda >::getArrayElementReference< char, int >( const char* data, const int i ); extern template const int& tnlArrayOperations< tnlCuda >::getArrayElementReference< int, int >( const int* data, const int i ); extern template const long int& tnlArrayOperations< tnlCuda >::getArrayElementReference< long int, int >( const long int* data, const int i ); extern template const float& tnlArrayOperations< tnlCuda >::getArrayElementReference< float, int >( const float* data, const int i ); extern template const double& tnlArrayOperations< tnlCuda >::getArrayElementReference< double, int >( const double* data, const int i ); -extern template const long double& tnlArrayOperations< tnlCuda >::getArrayElementReference< long double, int >( const long double* data, const int i ); +//extern template const long double& tnlArrayOperations< tnlCuda >::getArrayElementReference< long double, int >( const long double* data, const int i ); extern template const char& tnlArrayOperations< tnlCuda >::getArrayElementReference< char, long int >( const char* data, const long int i ); extern template const int& tnlArrayOperations< tnlCuda >::getArrayElementReference< int, long int >( const int* data, const long int i ); extern template const long int& tnlArrayOperations< tnlCuda >::getArrayElementReference< long int, long int >( const long int* data, const long int i ); extern template const float& tnlArrayOperations< tnlCuda >::getArrayElementReference< float, long int >( const float* data, const long int i ); extern template const double& tnlArrayOperations< tnlCuda >::getArrayElementReference< double, long int >( const double* data, const long int i ); -extern template const long double& tnlArrayOperations< tnlCuda >::getArrayElementReference< long double, long int >( const long double* data, const long int i ); +//extern template const long double& tnlArrayOperations< tnlCuda >::getArrayElementReference< long double, long int >( const long double* data, const long int i ); extern template bool tnlArrayOperations< tnlCuda >::copyMemory< char, char, int >( char* destination, const char* source, const int size ); extern template bool tnlArrayOperations< tnlCuda >::copyMemory< int, int, int >( int* destination, const int* source, const int size ); extern template bool tnlArrayOperations< tnlCuda >::copyMemory< long int, long int, int >( long int* destination, const long int* source, const int size ); extern template bool tnlArrayOperations< tnlCuda >::copyMemory< float, float, int >( float* destination, const float* source, const int size ); extern template bool tnlArrayOperations< tnlCuda >::copyMemory< double, double, int >( double* destination, const double* source, const int size ); -extern template bool tnlArrayOperations< tnlCuda >::copyMemory< long double, long double, int >( long double* destination, const long double* source, const int size ); +//extern template bool tnlArrayOperations< tnlCuda >::copyMemory< long double, long double, int >( long double* destination, const long double* source, const int size ); extern template bool tnlArrayOperations< tnlCuda >::copyMemory< char, char, long int >( char* destination, const char* source, const long int size ); extern template bool tnlArrayOperations< tnlCuda >::copyMemory< int, int, long int >( int* destination, const int* source, const long int size ); extern template bool tnlArrayOperations< tnlCuda >::copyMemory< long int, long int, long int >( long int* destination, const long int* source, const long int size ); extern template bool tnlArrayOperations< tnlCuda >::copyMemory< float, float, long int >( float* destination, const float* source, const long int size ); extern template bool tnlArrayOperations< tnlCuda >::copyMemory< double, double, long int >( double* destination, const double* source, const long int size ); -extern template bool tnlArrayOperations< tnlCuda >::copyMemory< long double, long double, long int >( long double* destination, const long double* source, const long int size ); +//extern template bool tnlArrayOperations< tnlCuda >::copyMemory< long double, long double, long int >( long double* destination, const long double* source, const long int size ); extern template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< char, char, int >( char* destination, const char* source, const int size ); extern template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< int, int, int >( int* destination, const int* source, const int size ); extern template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< long int, long int, int >( long int* destination, const long int* source, const int size ); extern template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< float, float, int >( float* destination, const float* source, const int size ); extern template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< double, double, int >( double* destination, const double* source, const int size ); -extern template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< long double, long double, int >( long double* destination, const long double* source, const int size ); +//extern template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< long double, long double, int >( long double* destination, const long double* source, const int size ); extern template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< char, char, long int >( char* destination, const char* source, const long int size ); extern template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< int, int, long int >( int* destination, const int* source, const long int size ); extern template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< long int, long int, long int >( long int* destination, const long int* source, const long int size ); extern template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< float, float, long int >( float* destination, const float* source, const long int size ); extern template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< double, double, long int >( double* destination, const double* source, const long int size ); -extern template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< long double, long double, long int >( long double* destination, const long double* source, const long int size ); +//extern template bool tnlArrayOperations< tnlCuda, tnlHost >::copyMemory< long double, long double, long int >( long double* destination, const long double* source, const long int size ); extern template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< char, char, int >( char* destination, const char* source, const int size ); extern template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< int, int, int >( int* destination, const int* source, const int size ); extern template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< long int, long int, int >( long int* destination, const long int* source, const int size ); extern template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< float, float, int >( float* destination, const float* source, const int size ); extern template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< double, double, int >( double* destination, const double* source, const int size ); -extern template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< long double, long double, int >( long double* destination, const long double* source, const int size ); +//extern template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< long double, long double, int >( long double* destination, const long double* source, const int size ); extern template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< char, char, long int >( char* destination, const char* source, const long int size ); extern template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< int, int, long int >( int* destination, const int* source, const long int size ); extern template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< long int, long int, long int >( long int* destination, const long int* source, const long int size ); extern template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< float, float, long int >( float* destination, const float* source, const long int size ); extern template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< double, double, long int >( double* destination, const double* source, const long int size ); -extern template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< long double, long double, long int >( long double* destination, const long double* source, const long int size ); +//extern template bool tnlArrayOperations< tnlHost, tnlCuda >::copyMemory< long double, long double, long int >( long double* destination, const long double* source, const long int size ); extern template bool tnlArrayOperations< tnlCuda >::compareMemory< char, char, int >( const char* data1, const char* data2, const int size ); extern template bool tnlArrayOperations< tnlCuda >::compareMemory< int, int, int >( const int* data1, const int* data2, const int size ); extern template bool tnlArrayOperations< tnlCuda >::compareMemory< long int, long int, int >( const long int* data1, const long int* data2, const int size ); extern template bool tnlArrayOperations< tnlCuda >::compareMemory< float, float, int >( const float* data1, const float* data2, const int size ); extern template bool tnlArrayOperations< tnlCuda >::compareMemory< double, double, int >( const double* data1, const double* data2, const int size ); -extern template bool tnlArrayOperations< tnlCuda >::compareMemory< long double, long double, int >( const long double* data1, const long double* data2, const int size ); +//extern template bool tnlArrayOperations< tnlCuda >::compareMemory< long double, long double, int >( const long double* data1, const long double* data2, const int size ); extern template bool tnlArrayOperations< tnlCuda >::compareMemory< char, char, long int >( const char* data1, const char* data2, const long int size ); extern template bool tnlArrayOperations< tnlCuda >::compareMemory< int, int, long int >( const int* data1, const int* data2, const long int size ); extern template bool tnlArrayOperations< tnlCuda >::compareMemory< long int, long int, long int >( const long int* data1, const long int* data2, const long int size ); extern template bool tnlArrayOperations< tnlCuda >::compareMemory< float, float, long int >( const float* data1, const float* data2, const long int size ); extern template bool tnlArrayOperations< tnlCuda >::compareMemory< double, double, long int >( const double* data1, const double* data2, const long int size ); -extern template bool tnlArrayOperations< tnlCuda >::compareMemory< long double, long double, long int >( const long double* data1, const long double* data2, const long int size ); +//extern template bool tnlArrayOperations< tnlCuda >::compareMemory< long double, long double, long int >( const long double* data1, const long double* data2, const long int size ); extern template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< char, char, int >( const char* data1, const char* data2, const int size ); extern template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< int, int, int >( const int* data1, const int* data2, const int size ); extern template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< long int, long int, int >( const long int* data1, const long int* data2, const int size ); extern template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< float, float, int >( const float* data1, const float* data2, const int size ); extern template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< double, double, int >( const double* data1, const double* data2, const int size ); -extern template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< long double, long double, int >( const long double* data1, const long double* data2, const int size ); +//extern template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< long double, long double, int >( const long double* data1, const long double* data2, const int size ); extern template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< char, char, long int >( const char* data1, const char* data2, const long int size ); extern template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< int, int, long int >( const int* data1, const int* data2, const long int size ); extern template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< long int, long int, long int >( const long int* data1, const long int* data2, const long int size ); extern template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< float, float, long int >( const float* data1, const float* data2, const long int size ); extern template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< double, double, long int >( const double* data1, const double* data2, const long int size ); -extern template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< long double, long double, long int >( const long double* data1, const long double* data2, const long int size ); +//extern template bool tnlArrayOperations< tnlCuda, tnlHost >::compareMemory< long double, long double, long int >( const long double* data1, const long double* data2, const long int size ); extern template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< char, char, int >( const char* data1, const char* data2, const int size ); extern template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< int, int, int >( const int* data1, const int* data2, const int size ); extern template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< long int, long int, int >( const long int* data1, const long int* data2, const int size ); extern template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< float, float, int >( const float* data1, const float* data2, const int size ); extern template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< double, double, int >( const double* data1, const double* data2, const int size ); -extern template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< long double, long double, int >( const long double* data1, const long double* data2, const int size ); +//extern template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< long double, long double, int >( const long double* data1, const long double* data2, const int size ); extern template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< char, char, long int >( const char* data1, const char* data2, const long int size ); extern template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< int, int, long int >( const int* data1, const int* data2, const long int size ); extern template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< long int, long int, long int >( const long int* data1, const long int* data2, const long int size ); extern template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< float, float, long int >( const float* data1, const float* data2, const long int size ); extern template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< double, double, long int >( const double* data1, const double* data2, const long int size ); -extern template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< long double, long double, long int >( const long double* data1, const long double* data2, const long int size ); +//extern template bool tnlArrayOperations< tnlHost, tnlCuda >::compareMemory< long double, long double, long int >( const long double* data1, const long double* data2, const long int size ); extern template bool tnlArrayOperations< tnlCuda >::setMemory< char, int >( char* destination, const char& value, const int size ); extern template bool tnlArrayOperations< tnlCuda >::setMemory< int, int >( int* destination, const int& value, const int size ); extern template bool tnlArrayOperations< tnlCuda >::setMemory< long int, int >( long int* destination, const long int& value, const int size ); extern template bool tnlArrayOperations< tnlCuda >::setMemory< float, int >( float* destination, const float& value, const int size ); extern template bool tnlArrayOperations< tnlCuda >::setMemory< double, int >( double* destination, const double& value, const int size ); -extern template bool tnlArrayOperations< tnlCuda >::setMemory< long double, int >( long double* destination, const long double& value, const int size ); +//extern template bool tnlArrayOperations< tnlCuda >::setMemory< long double, int >( long double* destination, const long double& value, const int size ); extern template bool tnlArrayOperations< tnlCuda >::setMemory< char, long int >( char* destination, const char& value, const long int size ); extern template bool tnlArrayOperations< tnlCuda >::setMemory< int, long int >( int* destination, const int& value, const long int size ); extern template bool tnlArrayOperations< tnlCuda >::setMemory< long int, long int >( long int* destination, const long int& value, const long int size ); extern template bool tnlArrayOperations< tnlCuda >::setMemory< float, long int >( float* destination, const float& value, const long int size ); extern template bool tnlArrayOperations< tnlCuda >::setMemory< double, long int >( double* destination, const double& value, const long int size ); -extern template bool tnlArrayOperations< tnlCuda >::setMemory< long double, long int >( long double* destination, const long double& value, const long int size ); +//extern template bool tnlArrayOperations< tnlCuda >::setMemory< long double, long int >( long double* destination, const long double& value, const long int size ); #endif diff --git a/src/implementation/core/arrays/tnlArray_impl.h b/src/implementation/core/arrays/tnlArray_impl.h index c03ed290d6619c0d1390559bf45ae24b243380b4..64b25751c55da60d989a367a5e1cfed4d571c849 100644 --- a/src/implementation/core/arrays/tnlArray_impl.h +++ b/src/implementation/core/arrays/tnlArray_impl.h @@ -409,6 +409,7 @@ ostream& operator << ( ostream& str, const tnlArray< Element, Device, Index >& v str << ", " << v. getElement( i ); } str << " ]"; + return str; } diff --git a/src/implementation/core/arrays/tnlStaticArray1D_impl.h b/src/implementation/core/arrays/tnlStaticArray1D_impl.h index 501787c2237ca60af6a2f36c91ec71529d668d22..9d5b6b736a8c15f26cf3a85218373c8e33fc3a5f 100644 --- a/src/implementation/core/arrays/tnlStaticArray1D_impl.h +++ b/src/implementation/core/arrays/tnlStaticArray1D_impl.h @@ -65,28 +65,28 @@ tnlString tnlStaticArray< 1, Element >::getType() tnlString( " >" ); } +template< typename Element > #ifdef HAVE_CUDA __host__ __device__ #endif -template< typename Element > int tnlStaticArray< 1, Element >::getSize() const { return size; } +template< typename Element > #ifdef HAVE_CUDA __host__ __device__ #endif -template< typename Element > Element* tnlStaticArray< 1, Element >::getData() { return data; } +template< typename Element > #ifdef HAVE_CUDA __host__ __device__ #endif -template< typename Element > const Element* tnlStaticArray< 1, Element >::getData() const { return data; @@ -136,6 +136,7 @@ template< typename Element > tnlStaticArray< 1, Element >& tnlStaticArray< 1, Element >::operator = ( const tnlStaticArray< 1, Element >& array ) { data[ 0 ] = array[ 0 ]; + return *this; } template< typename Element > @@ -143,13 +144,14 @@ template< typename Element > tnlStaticArray< 1, Element >& tnlStaticArray< 1, Element >::operator = ( const Array& array ) { data[ 0 ] = array[ 0 ]; + return *this; } template< typename Element > template< typename Array > bool tnlStaticArray< 1, Element >::operator == ( const Array& array ) const { - return( size == Array::size && data[ 0 ] == array[ 0 ] ); + return( ( int ) size == ( int ) Array::size && data[ 0 ] == array[ 0 ] ); } template< typename Element > @@ -207,7 +209,7 @@ extern template class tnlStaticArray< 1, int >; extern template class tnlStaticArray< 1, long int >; extern template class tnlStaticArray< 1, float >; extern template class tnlStaticArray< 1, double >; -extern template class tnlStaticArray< 1, long double >; +//extern template class tnlStaticArray< 1, long double >; #endif diff --git a/src/implementation/core/arrays/tnlStaticArray2D_impl.h b/src/implementation/core/arrays/tnlStaticArray2D_impl.h index 2f8b8d317f8e3af5a29133dab2edd56edabc7687..362d7d62bf1b811050d2dd8cc5f8908cc9c2f8e4 100644 --- a/src/implementation/core/arrays/tnlStaticArray2D_impl.h +++ b/src/implementation/core/arrays/tnlStaticArray2D_impl.h @@ -78,28 +78,28 @@ tnlString tnlStaticArray< 2, Element >::getType() tnlString( " >" ); } +template< typename Element > #ifdef HAVE_CUDA __host__ __device__ #endif -template< typename Element > int tnlStaticArray< 2, Element >::getSize() const { return size; } +template< typename Element > #ifdef HAVE_CUDA __host__ __device__ #endif -template< typename Element > Element* tnlStaticArray< 2, Element >::getData() { return data; } +template< typename Element > #ifdef HAVE_CUDA __host__ __device__ #endif -template< typename Element > const Element* tnlStaticArray< 2, Element >::getData() const { return data; @@ -168,6 +168,7 @@ tnlStaticArray< 2, Element >& tnlStaticArray< 2, Element >::operator = ( const t { data[ 0 ] = array[ 0 ]; data[ 1 ] = array[ 1 ]; + return *this; } template< typename Element > @@ -176,13 +177,14 @@ tnlStaticArray< 2, Element >& tnlStaticArray< 2, Element >::operator = ( const A { data[ 0 ] = array[ 0 ]; data[ 1 ] = array[ 1 ]; + return *this; } template< typename Element > template< typename Array > bool tnlStaticArray< 2, Element >::operator == ( const Array& array ) const { - return( size == Array::size && + return( ( int ) size == ( int ) Array::size && data[ 0 ] == array[ 0 ] && data[ 1 ] == array[ 1 ] ); } @@ -244,7 +246,7 @@ extern template class tnlStaticArray< 2, int >; extern template class tnlStaticArray< 2, long int >; extern template class tnlStaticArray< 2, float >; extern template class tnlStaticArray< 2, double >; -extern template class tnlStaticArray< 2, long double >; +//extern template class tnlStaticArray< 2, long double >; #endif diff --git a/src/implementation/core/arrays/tnlStaticArray3D_impl.h b/src/implementation/core/arrays/tnlStaticArray3D_impl.h index 8f5399d1ab0c3347e8671c17e92bbce19ee5d791..f7039296fd0125b69143bd7a335cb49a00e0868f 100644 --- a/src/implementation/core/arrays/tnlStaticArray3D_impl.h +++ b/src/implementation/core/arrays/tnlStaticArray3D_impl.h @@ -82,28 +82,28 @@ tnlString tnlStaticArray< 3, Element >::getType() tnlString( " >" ); } +template< typename Element > #ifdef HAVE_CUDA __host__ __device__ #endif -template< typename Element > int tnlStaticArray< 3, Element >::getSize() const { return size; } +template< typename Element > #ifdef HAVE_CUDA __host__ __device__ #endif -template< typename Element > Element* tnlStaticArray< 3, Element >::getData() { return data; } +template< typename Element > #ifdef HAVE_CUDA __host__ __device__ #endif -template< typename Element > const Element* tnlStaticArray< 3, Element >::getData() const { return data; @@ -190,6 +190,7 @@ tnlStaticArray< 3, Element >& tnlStaticArray< 3, Element >::operator = ( const t data[ 0 ] = array[ 0 ]; data[ 1 ] = array[ 1 ]; data[ 2 ] = array[ 2 ]; + return *this; } template< typename Element > @@ -199,13 +200,14 @@ tnlStaticArray< 3, Element >& tnlStaticArray< 3, Element >::operator = ( const A data[ 0 ] = array[ 0 ]; data[ 1 ] = array[ 1 ]; data[ 2 ] = array[ 2 ]; + return *this; } template< typename Element > template< typename Array > bool tnlStaticArray< 3, Element >::operator == ( const Array& array ) const { - return( size == Array::size && + return( ( int ) size == ( int ) Array::size && data[ 0 ] == array[ 0 ] && data[ 1 ] == array[ 1 ] && data[ 2 ] == array[ 2 ] ); @@ -275,7 +277,7 @@ extern template class tnlStaticArray< 3, int >; extern template class tnlStaticArray< 3, long int >; extern template class tnlStaticArray< 3, float >; extern template class tnlStaticArray< 3, double >; -extern template class tnlStaticArray< 3, long double >; +//extern template class tnlStaticArray< 3, long double >; #endif diff --git a/src/implementation/core/arrays/tnlStaticArray_impl.cu b/src/implementation/core/arrays/tnlStaticArray_impl.cu index 00c9cb6a62a953c7f82b9494a002d6d086f4d1f5..52a8065dc84e5ea97c0238ca85845905c2ef2bc0 100644 --- a/src/implementation/core/arrays/tnlStaticArray_impl.cu +++ b/src/implementation/core/arrays/tnlStaticArray_impl.cu @@ -25,28 +25,28 @@ template class tnlStaticArray< 1, int >; template class tnlStaticArray< 1, long int >; template class tnlStaticArray< 1, float >; template class tnlStaticArray< 1, double >; -template class tnlStaticArray< 1, long double >; +//template class tnlStaticArray< 1, long double >; template class tnlStaticArray< 2, char >; template class tnlStaticArray< 2, int >; template class tnlStaticArray< 2, long int >; template class tnlStaticArray< 2, float >; template class tnlStaticArray< 2, double >; -template class tnlStaticArray< 2, long double >; +//template class tnlStaticArray< 2, long double >; template class tnlStaticArray< 3, char >; template class tnlStaticArray< 3, int >; template class tnlStaticArray< 3, long int >; template class tnlStaticArray< 3, float >; template class tnlStaticArray< 3, double >; -template class tnlStaticArray< 3, long double >; +//template class tnlStaticArray< 3, long double >; template class tnlStaticArray< 4, char >; template class tnlStaticArray< 4, int >; template class tnlStaticArray< 4, long int >; template class tnlStaticArray< 4, float >; template class tnlStaticArray< 4, double >; -template class tnlStaticArray< 4, long double >; +//template class tnlStaticArray< 4, long double >; #endif #endif \ No newline at end of file diff --git a/src/implementation/core/arrays/tnlStaticArray_impl.h b/src/implementation/core/arrays/tnlStaticArray_impl.h index 43e4c049822ba441d4f7b12de8fa29a1e43a4efe..0970678d85ded6fc9b5e4082ec85357a4716c5be 100644 --- a/src/implementation/core/arrays/tnlStaticArray_impl.h +++ b/src/implementation/core/arrays/tnlStaticArray_impl.h @@ -68,28 +68,28 @@ tnlString tnlStaticArray< Size, Element >::getType() tnlString( " >" ); } +template< int Size, typename Element > #ifdef HAVE_CUDA __host__ __device__ #endif -template< int Size, typename Element > int tnlStaticArray< Size, Element >::getSize() const { return size; } +template< int Size, typename Element > #ifdef HAVE_CUDA __host__ __device__ #endif -template< int Size, typename Element > Element* tnlStaticArray< Size, Element >::getData() { return data; } +template< int Size, typename Element > #ifdef HAVE_CUDA __host__ __device__ #endif -template< int Size, typename Element > const Element* tnlStaticArray< Size, Element >::getData() const { return data; @@ -122,6 +122,7 @@ tnlStaticArray< Size, Element >& tnlStaticArray< Size, Element >::operator = ( c { for( int i = 0; i < size; i++ ) data[ i ] = array[ i ]; + return *this; } template< int Size, typename Element > @@ -130,13 +131,14 @@ tnlStaticArray< Size, Element >& tnlStaticArray< Size, Element >::operator = ( c { for( int i = 0; i < size; i++ ) data[ i ] = array[ i ]; + return *this; } template< int Size, typename Element > template< typename Array > bool tnlStaticArray< Size, Element >::operator == ( const Array& array ) const { - if( size != Array::size ) + if( ( int ) size != ( int ) Array::size ) return false; for( int i = 0; i < size; i++ ) if( data[ i ] != array[ i ] ) @@ -220,7 +222,7 @@ extern template class tnlStaticArray< 4, int >; extern template class tnlStaticArray< 4, long int >; extern template class tnlStaticArray< 4, float >; extern template class tnlStaticArray< 4, double >; -extern template class tnlStaticArray< 4, long double >; +//extern template class tnlStaticArray< 4, long double >; #endif diff --git a/src/implementation/core/cuda/cuda-prefix-sum_impl.cu b/src/implementation/core/cuda/cuda-prefix-sum_impl.cu index 70d4e6e205267973de6c8a44c17842ab47210966..36497541e34da0eb35d9252bf7a67754681c191d 100644 --- a/src/implementation/core/cuda/cuda-prefix-sum_impl.cu +++ b/src/implementation/core/cuda/cuda-prefix-sum_impl.cu @@ -70,10 +70,10 @@ template bool cudaPrefixSum( const long int size, const tnlParallelReductionSum< double, long int >& operation, const enumPrefixSumType prefixSumType ); -template bool cudaPrefixSum( const long int size, +/*template bool cudaPrefixSum( const long int size, const long int blockSize, const long double *deviceInput, long double* deviceOutput, const tnlParallelReductionSum< long double, long int >& operation, - const enumPrefixSumType prefixSumType ); + const enumPrefixSumType prefixSumType );*/ #endif diff --git a/src/implementation/core/cuda/cuda-reduction-abs-max_impl.cu b/src/implementation/core/cuda/cuda-reduction-abs-max_impl.cu index b5a8c533b1fc4a0e0e20b5afbdc40e61ff202d26..93605031fd1071be207ef28c2055761867c74011 100644 --- a/src/implementation/core/cuda/cuda-reduction-abs-max_impl.cu +++ b/src/implementation/core/cuda/cuda-reduction-abs-max_impl.cu @@ -88,11 +88,11 @@ template bool reductionOnCudaDevice< tnlParallelReductionAbsMax< double, long in const typename tnlParallelReductionAbsMax< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionAbsMax< double, long int> :: ResultType& result ); -template bool reductionOnCudaDevice< tnlParallelReductionAbsMax< long double, long int > > +/*template bool reductionOnCudaDevice< tnlParallelReductionAbsMax< long double, long int > > ( const tnlParallelReductionAbsMax< long double, long int>& operation, const typename tnlParallelReductionAbsMax< long double, long int > :: IndexType size, const typename tnlParallelReductionAbsMax< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionAbsMax< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionAbsMax< long double, long int> :: ResultType& result ); + typename tnlParallelReductionAbsMax< long double, long int> :: ResultType& result );*/ #endif \ No newline at end of file diff --git a/src/implementation/core/cuda/cuda-reduction-abs-min_impl.cu b/src/implementation/core/cuda/cuda-reduction-abs-min_impl.cu index af0c2f537d9281747fd5aaf639957d0fbfce2f5d..812159df5ff33db346c1615a128acc278b938168 100644 --- a/src/implementation/core/cuda/cuda-reduction-abs-min_impl.cu +++ b/src/implementation/core/cuda/cuda-reduction-abs-min_impl.cu @@ -87,11 +87,11 @@ template bool reductionOnCudaDevice< tnlParallelReductionAbsMin< double, long in const typename tnlParallelReductionAbsMin< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionAbsMin< double, long int> :: ResultType& result ); -template bool reductionOnCudaDevice< tnlParallelReductionAbsMin< long double, long int > > +/*template bool reductionOnCudaDevice< tnlParallelReductionAbsMin< long double, long int > > ( const tnlParallelReductionAbsMin< long double, long int>& operation, const typename tnlParallelReductionAbsMin< long double, long int > :: IndexType size, const typename tnlParallelReductionAbsMin< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionAbsMin< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionAbsMin< long double, long int> :: ResultType& result ); + typename tnlParallelReductionAbsMin< long double, long int> :: ResultType& result );*/ #endif \ No newline at end of file diff --git a/src/implementation/core/cuda/cuda-reduction-abs-sum_impl.cu b/src/implementation/core/cuda/cuda-reduction-abs-sum_impl.cu index 00be994c28d619b33a4a15192e2c72118aaa2946..a6a22f16c8f8c2b925ee2ba2eaca16214fb59b13 100644 --- a/src/implementation/core/cuda/cuda-reduction-abs-sum_impl.cu +++ b/src/implementation/core/cuda/cuda-reduction-abs-sum_impl.cu @@ -87,11 +87,11 @@ template bool reductionOnCudaDevice< tnlParallelReductionAbsSum< double, long in const typename tnlParallelReductionAbsSum< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionAbsSum< double, long int> :: ResultType& result ); -template bool reductionOnCudaDevice< tnlParallelReductionAbsSum< long double, long int > > +/*template bool reductionOnCudaDevice< tnlParallelReductionAbsSum< long double, long int > > ( const tnlParallelReductionAbsSum< long double, long int>& operation, const typename tnlParallelReductionAbsSum< long double, long int > :: IndexType size, const typename tnlParallelReductionAbsSum< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionAbsSum< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionAbsSum< long double, long int> :: ResultType& result ); + typename tnlParallelReductionAbsSum< long double, long int> :: ResultType& result );*/ #endif diff --git a/src/implementation/core/cuda/cuda-reduction-and_impl.cu b/src/implementation/core/cuda/cuda-reduction-and_impl.cu index 50ce1688b426ee66b34f9b28272f8d87dbef2117..592c0cd5847c036e70ee1dca05c724f069360ec8 100644 --- a/src/implementation/core/cuda/cuda-reduction-and_impl.cu +++ b/src/implementation/core/cuda/cuda-reduction-and_impl.cu @@ -86,11 +86,11 @@ template bool reductionOnCudaDevice< tnlParallelReductionLogicalAnd< double, lon const typename tnlParallelReductionLogicalAnd< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionLogicalAnd< double, long int> :: ResultType& result ); -template bool reductionOnCudaDevice< tnlParallelReductionLogicalAnd< long double, long int > > +/*template bool reductionOnCudaDevice< tnlParallelReductionLogicalAnd< long double, long int > > ( const tnlParallelReductionLogicalAnd< long double, long int>& operation, const typename tnlParallelReductionLogicalAnd< long double, long int > :: IndexType size, const typename tnlParallelReductionLogicalAnd< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionLogicalAnd< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionLogicalAnd< long double, long int> :: ResultType& result ); + typename tnlParallelReductionLogicalAnd< long double, long int> :: ResultType& result );*/ #endif \ No newline at end of file diff --git a/src/implementation/core/cuda/cuda-reduction-diff-abs-max_impl.cu b/src/implementation/core/cuda/cuda-reduction-diff-abs-max_impl.cu index ed8fa01acab85879757c88be7bcd1c149c4490d0..291fdc9d888a2ac71106d733ba20d49a8eaff536 100644 --- a/src/implementation/core/cuda/cuda-reduction-diff-abs-max_impl.cu +++ b/src/implementation/core/cuda/cuda-reduction-diff-abs-max_impl.cu @@ -87,11 +87,11 @@ template bool reductionOnCudaDevice< tnlParallelReductionDiffAbsMax< double, lon const typename tnlParallelReductionDiffAbsMax< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionDiffAbsMax< double, long int> :: ResultType& result ); -template bool reductionOnCudaDevice< tnlParallelReductionDiffAbsMax< long double, long int > > +/*template bool reductionOnCudaDevice< tnlParallelReductionDiffAbsMax< long double, long int > > ( const tnlParallelReductionDiffAbsMax< long double, long int>& operation, const typename tnlParallelReductionDiffAbsMax< long double, long int > :: IndexType size, const typename tnlParallelReductionDiffAbsMax< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionDiffAbsMax< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionDiffAbsMax< long double, long int> :: ResultType& result ); + typename tnlParallelReductionDiffAbsMax< long double, long int> :: ResultType& result );*/ #endif \ No newline at end of file diff --git a/src/implementation/core/cuda/cuda-reduction-diff-abs-min_impl.cu b/src/implementation/core/cuda/cuda-reduction-diff-abs-min_impl.cu index e82ff34ccee34e2745278ea2ac8c9b30cbc606cf..14428d5dff3cab5021c55a3168d7d67452d7bf75 100644 --- a/src/implementation/core/cuda/cuda-reduction-diff-abs-min_impl.cu +++ b/src/implementation/core/cuda/cuda-reduction-diff-abs-min_impl.cu @@ -88,11 +88,11 @@ template bool reductionOnCudaDevice< tnlParallelReductionDiffAbsMin< double, lon const typename tnlParallelReductionDiffAbsMin< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionDiffAbsMin< double, long int> :: ResultType& result ); -template bool reductionOnCudaDevice< tnlParallelReductionDiffAbsMin< long double, long int > > +/*template bool reductionOnCudaDevice< tnlParallelReductionDiffAbsMin< long double, long int > > ( const tnlParallelReductionDiffAbsMin< long double, long int>& operation, const typename tnlParallelReductionDiffAbsMin< long double, long int > :: IndexType size, const typename tnlParallelReductionDiffAbsMin< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionDiffAbsMin< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionDiffAbsMin< long double, long int> :: ResultType& result ); + typename tnlParallelReductionDiffAbsMin< long double, long int> :: ResultType& result );*/ #endif \ No newline at end of file diff --git a/src/implementation/core/cuda/cuda-reduction-diff-abs-sum_impl.cu b/src/implementation/core/cuda/cuda-reduction-diff-abs-sum_impl.cu index 6aeaa1743f3b20e32fb1cf951a00fd45357547f8..f033706ef704e81e405654e799954b136348738e 100644 --- a/src/implementation/core/cuda/cuda-reduction-diff-abs-sum_impl.cu +++ b/src/implementation/core/cuda/cuda-reduction-diff-abs-sum_impl.cu @@ -87,11 +87,11 @@ template bool reductionOnCudaDevice< tnlParallelReductionDiffAbsSum< double, lon const typename tnlParallelReductionDiffAbsSum< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionDiffAbsSum< double, long int> :: ResultType& result ); -template bool reductionOnCudaDevice< tnlParallelReductionDiffAbsSum< long double, long int > > +/*template bool reductionOnCudaDevice< tnlParallelReductionDiffAbsSum< long double, long int > > ( const tnlParallelReductionDiffAbsSum< long double, long int>& operation, const typename tnlParallelReductionDiffAbsSum< long double, long int > :: IndexType size, const typename tnlParallelReductionDiffAbsSum< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionDiffAbsSum< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionDiffAbsSum< long double, long int> :: ResultType& result ); + typename tnlParallelReductionDiffAbsSum< long double, long int> :: ResultType& result );*/ #endif \ No newline at end of file diff --git a/src/implementation/core/cuda/cuda-reduction-diff-lp-norm_impl.cu b/src/implementation/core/cuda/cuda-reduction-diff-lp-norm_impl.cu index 4010e4f26c57139ea6c4f595b68c892b88194442..1403d34b148a6c553c78454908018e81ea1812bc 100644 --- a/src/implementation/core/cuda/cuda-reduction-diff-lp-norm_impl.cu +++ b/src/implementation/core/cuda/cuda-reduction-diff-lp-norm_impl.cu @@ -72,12 +72,12 @@ template bool reductionOnCudaDevice< tnlParallelReductionDiffLpNorm< double, lon const typename tnlParallelReductionDiffLpNorm< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionDiffLpNorm< double, long int> :: ResultType& result ); -template bool reductionOnCudaDevice< tnlParallelReductionDiffLpNorm< long double, long int > > +/*template bool reductionOnCudaDevice< tnlParallelReductionDiffLpNorm< long double, long int > > ( const tnlParallelReductionDiffLpNorm< long double, long int>& operation, const typename tnlParallelReductionDiffLpNorm< long double, long int > :: IndexType size, const typename tnlParallelReductionDiffLpNorm< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionDiffLpNorm< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionDiffLpNorm< long double, long int> :: ResultType& result ); + typename tnlParallelReductionDiffLpNorm< long double, long int> :: ResultType& result );*/ diff --git a/src/implementation/core/cuda/cuda-reduction-diff-max_impl.cu b/src/implementation/core/cuda/cuda-reduction-diff-max_impl.cu index 5b8d490c350bbaf99d04a3f1a6cc5c31ea750521..76fac28487598502b5ceee8d5830180dba62d9b3 100644 --- a/src/implementation/core/cuda/cuda-reduction-diff-max_impl.cu +++ b/src/implementation/core/cuda/cuda-reduction-diff-max_impl.cu @@ -87,11 +87,11 @@ template bool reductionOnCudaDevice< tnlParallelReductionDiffMax< double, long i const typename tnlParallelReductionDiffMax< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionDiffMax< double, long int> :: ResultType& result ); -template bool reductionOnCudaDevice< tnlParallelReductionDiffMax< long double, long int > > +/*template bool reductionOnCudaDevice< tnlParallelReductionDiffMax< long double, long int > > ( const tnlParallelReductionDiffMax< long double, long int>& operation, const typename tnlParallelReductionDiffMax< long double, long int > :: IndexType size, const typename tnlParallelReductionDiffMax< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionDiffMax< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionDiffMax< long double, long int> :: ResultType& result ); + typename tnlParallelReductionDiffMax< long double, long int> :: ResultType& result );*/ #endif \ No newline at end of file diff --git a/src/implementation/core/cuda/cuda-reduction-diff-min_impl.cu b/src/implementation/core/cuda/cuda-reduction-diff-min_impl.cu index 4e0a0ebb2616aba4f7c4500070872caf24674666..fe75190d51657d6d658b2fe4623fbc18b7f6f191 100644 --- a/src/implementation/core/cuda/cuda-reduction-diff-min_impl.cu +++ b/src/implementation/core/cuda/cuda-reduction-diff-min_impl.cu @@ -88,11 +88,11 @@ template bool reductionOnCudaDevice< tnlParallelReductionDiffMin< double, long i const typename tnlParallelReductionDiffMin< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionDiffMin< double, long int> :: ResultType& result ); -template bool reductionOnCudaDevice< tnlParallelReductionDiffMin< long double, long int > > +/*template bool reductionOnCudaDevice< tnlParallelReductionDiffMin< long double, long int > > ( const tnlParallelReductionDiffMin< long double, long int>& operation, const typename tnlParallelReductionDiffMin< long double, long int > :: IndexType size, const typename tnlParallelReductionDiffMin< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionDiffMin< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionDiffMin< long double, long int> :: ResultType& result ); + typename tnlParallelReductionDiffMin< long double, long int> :: ResultType& result );*/ #endif \ No newline at end of file diff --git a/src/implementation/core/cuda/cuda-reduction-diff-sum_impl.cu b/src/implementation/core/cuda/cuda-reduction-diff-sum_impl.cu index db54096dcb0cc1c8c42a651ab878ef7180badb48..ce79e8cc4b0835b68365168e859c5b51bf8f605a 100644 --- a/src/implementation/core/cuda/cuda-reduction-diff-sum_impl.cu +++ b/src/implementation/core/cuda/cuda-reduction-diff-sum_impl.cu @@ -87,11 +87,11 @@ template bool reductionOnCudaDevice< tnlParallelReductionDiffSum< double, long i const typename tnlParallelReductionDiffSum< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionDiffSum< double, long int> :: ResultType& result ); -template bool reductionOnCudaDevice< tnlParallelReductionDiffSum< long double, long int > > +/*template bool reductionOnCudaDevice< tnlParallelReductionDiffSum< long double, long int > > ( const tnlParallelReductionDiffSum< long double, long int>& operation, const typename tnlParallelReductionDiffSum< long double, long int > :: IndexType size, const typename tnlParallelReductionDiffSum< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionDiffSum< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionDiffSum< long double, long int> :: ResultType& result ); + typename tnlParallelReductionDiffSum< long double, long int> :: ResultType& result );*/ #endif \ No newline at end of file diff --git a/src/implementation/core/cuda/cuda-reduction-equalities_impl.cu b/src/implementation/core/cuda/cuda-reduction-equalities_impl.cu index 2b4e75de14c77b96a2f43e7207f71a1d1463b111..8b4fec91d0820ee5c82fdd77e30b3a441adecc93 100644 --- a/src/implementation/core/cuda/cuda-reduction-equalities_impl.cu +++ b/src/implementation/core/cuda/cuda-reduction-equalities_impl.cu @@ -86,11 +86,11 @@ template bool reductionOnCudaDevice< tnlParallelReductionEqualities< double, lon const typename tnlParallelReductionEqualities< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionEqualities< double, long int> :: ResultType& result ); -template bool reductionOnCudaDevice< tnlParallelReductionEqualities< long double, long int > > +/*template bool reductionOnCudaDevice< tnlParallelReductionEqualities< long double, long int > > ( const tnlParallelReductionEqualities< long double, long int>& operation, const typename tnlParallelReductionEqualities< long double, long int > :: IndexType size, const typename tnlParallelReductionEqualities< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionEqualities< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionEqualities< long double, long int> :: ResultType& result ); + typename tnlParallelReductionEqualities< long double, long int> :: ResultType& result );*/ #endif \ No newline at end of file diff --git a/src/implementation/core/cuda/cuda-reduction-inequalities_impl.cu b/src/implementation/core/cuda/cuda-reduction-inequalities_impl.cu index d3c1b57f5cff2dbc9dc5a4cca00dc508520ee59e..a04537c97d44b606fcc463372e92246c9ddb6caf 100644 --- a/src/implementation/core/cuda/cuda-reduction-inequalities_impl.cu +++ b/src/implementation/core/cuda/cuda-reduction-inequalities_impl.cu @@ -86,11 +86,11 @@ template bool reductionOnCudaDevice< tnlParallelReductionInequalities< double, l const typename tnlParallelReductionInequalities< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionInequalities< double, long int> :: ResultType& result ); -template bool reductionOnCudaDevice< tnlParallelReductionInequalities< long double, long int > > +/*template bool reductionOnCudaDevice< tnlParallelReductionInequalities< long double, long int > > ( const tnlParallelReductionInequalities< long double, long int>& operation, const typename tnlParallelReductionInequalities< long double, long int > :: IndexType size, const typename tnlParallelReductionInequalities< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionInequalities< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionInequalities< long double, long int> :: ResultType& result ); + typename tnlParallelReductionInequalities< long double, long int> :: ResultType& result );*/ #endif \ No newline at end of file diff --git a/src/implementation/core/cuda/cuda-reduction-lp-norm_impl.cu b/src/implementation/core/cuda/cuda-reduction-lp-norm_impl.cu index d2440e37475ab9b678e464d482cd99098585c63e..ac4fc3a8f6e0e11f86bf078dfa29eabd545bdc58 100644 --- a/src/implementation/core/cuda/cuda-reduction-lp-norm_impl.cu +++ b/src/implementation/core/cuda/cuda-reduction-lp-norm_impl.cu @@ -65,11 +65,11 @@ template bool reductionOnCudaDevice< tnlParallelReductionLpNorm< double, long in const typename tnlParallelReductionLpNorm< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionLpNorm< double, long int> :: ResultType& result ); -template bool reductionOnCudaDevice< tnlParallelReductionLpNorm< long double, long int > > +/*template bool reductionOnCudaDevice< tnlParallelReductionLpNorm< long double, long int > > ( const tnlParallelReductionLpNorm< long double, long int>& operation, const typename tnlParallelReductionLpNorm< long double, long int > :: IndexType size, const typename tnlParallelReductionLpNorm< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionLpNorm< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionLpNorm< long double, long int> :: ResultType& result ); + typename tnlParallelReductionLpNorm< long double, long int> :: ResultType& result );*/ #endif \ No newline at end of file diff --git a/src/implementation/core/cuda/cuda-reduction-max_impl.cu b/src/implementation/core/cuda/cuda-reduction-max_impl.cu index 40e89700fd273db09c55eeee2496735071be3682..63847eb441ca9147270bb58ac63dfcfd74413e45 100644 --- a/src/implementation/core/cuda/cuda-reduction-max_impl.cu +++ b/src/implementation/core/cuda/cuda-reduction-max_impl.cu @@ -87,11 +87,11 @@ template bool reductionOnCudaDevice< tnlParallelReductionMax< double, long int > const typename tnlParallelReductionMax< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionMax< double, long int> :: ResultType& result ); -template bool reductionOnCudaDevice< tnlParallelReductionMax< long double, long int > > +/*template bool reductionOnCudaDevice< tnlParallelReductionMax< long double, long int > > ( const tnlParallelReductionMax< long double, long int>& operation, const typename tnlParallelReductionMax< long double, long int > :: IndexType size, const typename tnlParallelReductionMax< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionMax< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionMax< long double, long int> :: ResultType& result ); + typename tnlParallelReductionMax< long double, long int> :: ResultType& result );*/ #endif \ No newline at end of file diff --git a/src/implementation/core/cuda/cuda-reduction-min_impl.cu b/src/implementation/core/cuda/cuda-reduction-min_impl.cu index 04df3c0f170cf71716e4ab2ae976892d904c6bde..5ba284339dcc2f19d8c9ba68a2491ef98eb03c57 100644 --- a/src/implementation/core/cuda/cuda-reduction-min_impl.cu +++ b/src/implementation/core/cuda/cuda-reduction-min_impl.cu @@ -87,11 +87,11 @@ template bool reductionOnCudaDevice< tnlParallelReductionMin< double, long int > const typename tnlParallelReductionMin< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionMin< double, long int> :: ResultType& result ); -template bool reductionOnCudaDevice< tnlParallelReductionMin< long double, long int > > +/*template bool reductionOnCudaDevice< tnlParallelReductionMin< long double, long int > > ( const tnlParallelReductionMin< long double, long int>& operation, const typename tnlParallelReductionMin< long double, long int > :: IndexType size, const typename tnlParallelReductionMin< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionMin< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionMin< long double, long int> :: ResultType& result ); + typename tnlParallelReductionMin< long double, long int> :: ResultType& result );*/ #endif \ No newline at end of file diff --git a/src/implementation/core/cuda/cuda-reduction-or_impl.cu b/src/implementation/core/cuda/cuda-reduction-or_impl.cu index 871ee5b333241af5a1983d4393ad989ac52f931a..6128fc48c6152a85c17fb49c906cb5d8358fac34 100644 --- a/src/implementation/core/cuda/cuda-reduction-or_impl.cu +++ b/src/implementation/core/cuda/cuda-reduction-or_impl.cu @@ -86,11 +86,11 @@ template bool reductionOnCudaDevice< tnlParallelReductionLogicalOr< double, long const typename tnlParallelReductionLogicalOr< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionLogicalOr< double, long int> :: ResultType& result ); -template bool reductionOnCudaDevice< tnlParallelReductionLogicalOr< long double, long int > > +/*template bool reductionOnCudaDevice< tnlParallelReductionLogicalOr< long double, long int > > ( const tnlParallelReductionLogicalOr< long double, long int>& operation, const typename tnlParallelReductionLogicalOr< long double, long int > :: IndexType size, const typename tnlParallelReductionLogicalOr< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionLogicalOr< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionLogicalOr< long double, long int> :: ResultType& result ); + typename tnlParallelReductionLogicalOr< long double, long int> :: ResultType& result );*/ #endif \ No newline at end of file diff --git a/src/implementation/core/cuda/cuda-reduction-scalar-product_impl.cu b/src/implementation/core/cuda/cuda-reduction-scalar-product_impl.cu index c4dcbf079cd3e97475468cec2cdc568920261484..1ee2d85af2418032f7bd441acf17d3b77588e270 100644 --- a/src/implementation/core/cuda/cuda-reduction-scalar-product_impl.cu +++ b/src/implementation/core/cuda/cuda-reduction-scalar-product_impl.cu @@ -86,11 +86,11 @@ template bool reductionOnCudaDevice< tnlParallelReductionScalarProduct< double, const typename tnlParallelReductionScalarProduct< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionScalarProduct< double, long int> :: ResultType& result ); -template bool reductionOnCudaDevice< tnlParallelReductionScalarProduct< long double, long int > > +/*template bool reductionOnCudaDevice< tnlParallelReductionScalarProduct< long double, long int > > ( const tnlParallelReductionScalarProduct< long double, long int>& operation, const typename tnlParallelReductionScalarProduct< long double, long int > :: IndexType size, const typename tnlParallelReductionScalarProduct< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionScalarProduct< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionScalarProduct< long double, long int> :: ResultType& result ); + typename tnlParallelReductionScalarProduct< long double, long int> :: ResultType& result );*/ #endif \ No newline at end of file diff --git a/src/implementation/core/cuda/cuda-reduction-sum_impl.cu b/src/implementation/core/cuda/cuda-reduction-sum_impl.cu index 979ad9c1baeae29a531a3342cba5065776c29ff5..9cd01bcfd0c3de5a8f612a2205323f4772a567b3 100644 --- a/src/implementation/core/cuda/cuda-reduction-sum_impl.cu +++ b/src/implementation/core/cuda/cuda-reduction-sum_impl.cu @@ -87,11 +87,11 @@ template bool reductionOnCudaDevice< tnlParallelReductionSum< double, long int > const typename tnlParallelReductionSum< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionSum< double, long int> :: ResultType& result ); -template bool reductionOnCudaDevice< tnlParallelReductionSum< long double, long int > > +/*template bool reductionOnCudaDevice< tnlParallelReductionSum< long double, long int > > ( const tnlParallelReductionSum< long double, long int>& operation, const typename tnlParallelReductionSum< long double, long int > :: IndexType size, const typename tnlParallelReductionSum< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionSum< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionSum< long double, long int> :: ResultType& result ); + typename tnlParallelReductionSum< long double, long int> :: ResultType& result );*/ #endif \ No newline at end of file diff --git a/src/implementation/core/cuda/cuda-reduction_impl.h b/src/implementation/core/cuda/cuda-reduction_impl.h index 67e5afe12ef446413437b7974ad3b479276d4b84..368a75a978f04cb3008e1a76a750c099744cbc60 100644 --- a/src/implementation/core/cuda/cuda-reduction_impl.h +++ b/src/implementation/core/cuda/cuda-reduction_impl.h @@ -469,12 +469,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionSum< double, int const typename tnlParallelReductionSum< double, int > :: RealType* deviceInput2, typename tnlParallelReductionSum< double, int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionSum< long double, int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionSum< long double, int > > ( const tnlParallelReductionSum< long double, int>& operation, const typename tnlParallelReductionSum< long double, int > :: IndexType size, const typename tnlParallelReductionSum< long double, int > :: RealType* deviceInput1, const typename tnlParallelReductionSum< long double, int > :: RealType* deviceInput2, - typename tnlParallelReductionSum< long double, int> :: ResultType& result ); + typename tnlParallelReductionSum< long double, int> :: ResultType& result );*/ extern template bool reductionOnCudaDevice< tnlParallelReductionSum< char, long int > > ( const tnlParallelReductionSum< char, long int >& operation, @@ -504,12 +504,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionSum< double, lon const typename tnlParallelReductionSum< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionSum< double, long int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionSum< long double, long int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionSum< long double, long int > > ( const tnlParallelReductionSum< long double, long int>& operation, const typename tnlParallelReductionSum< long double, long int > :: IndexType size, const typename tnlParallelReductionSum< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionSum< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionSum< long double, long int> :: ResultType& result ); + typename tnlParallelReductionSum< long double, long int> :: ResultType& result );*/ /**** * Min @@ -543,12 +543,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionMin< double, int const typename tnlParallelReductionMin< double, int > :: RealType* deviceInput2, typename tnlParallelReductionMin< double, int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionMin< long double, int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionMin< long double, int > > ( const tnlParallelReductionMin< long double, int>& operation, const typename tnlParallelReductionMin< long double, int > :: IndexType size, const typename tnlParallelReductionMin< long double, int > :: RealType* deviceInput1, const typename tnlParallelReductionMin< long double, int > :: RealType* deviceInput2, - typename tnlParallelReductionMin< long double, int> :: ResultType& result ); + typename tnlParallelReductionMin< long double, int> :: ResultType& result );*/ extern template bool reductionOnCudaDevice< tnlParallelReductionMin< char, long int > > ( const tnlParallelReductionMin< char, long int >& operation, @@ -578,12 +578,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionMin< double, lon const typename tnlParallelReductionMin< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionMin< double, long int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionMin< long double, long int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionMin< long double, long int > > ( const tnlParallelReductionMin< long double, long int>& operation, const typename tnlParallelReductionMin< long double, long int > :: IndexType size, const typename tnlParallelReductionMin< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionMin< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionMin< long double, long int> :: ResultType& result ); + typename tnlParallelReductionMin< long double, long int> :: ResultType& result );*/ /**** * Max @@ -617,12 +617,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionMax< double, int const typename tnlParallelReductionMax< double, int > :: RealType* deviceInput2, typename tnlParallelReductionMax< double, int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionMax< long double, int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionMax< long double, int > > ( const tnlParallelReductionMax< long double, int>& operation, const typename tnlParallelReductionMax< long double, int > :: IndexType size, const typename tnlParallelReductionMax< long double, int > :: RealType* deviceInput1, const typename tnlParallelReductionMax< long double, int > :: RealType* deviceInput2, - typename tnlParallelReductionMax< long double, int> :: ResultType& result ); + typename tnlParallelReductionMax< long double, int> :: ResultType& result );*/ extern template bool reductionOnCudaDevice< tnlParallelReductionMax< char, long int > > ( const tnlParallelReductionMax< char, long int >& operation, @@ -652,12 +652,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionMax< double, lon const typename tnlParallelReductionMax< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionMax< double, long int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionMax< long double, long int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionMax< long double, long int > > ( const tnlParallelReductionMax< long double, long int>& operation, const typename tnlParallelReductionMax< long double, long int > :: IndexType size, const typename tnlParallelReductionMax< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionMax< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionMax< long double, long int> :: ResultType& result ); + typename tnlParallelReductionMax< long double, long int> :: ResultType& result );*/ /**** * Abs sum @@ -691,12 +691,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionAbsSum< double, const typename tnlParallelReductionAbsSum< double, int > :: RealType* deviceInput2, typename tnlParallelReductionAbsSum< double, int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionAbsSum< long double, int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionAbsSum< long double, int > > ( const tnlParallelReductionAbsSum< long double, int>& operation, const typename tnlParallelReductionAbsSum< long double, int > :: IndexType size, const typename tnlParallelReductionAbsSum< long double, int > :: RealType* deviceInput1, const typename tnlParallelReductionAbsSum< long double, int > :: RealType* deviceInput2, - typename tnlParallelReductionAbsSum< long double, int> :: ResultType& result ); + typename tnlParallelReductionAbsSum< long double, int> :: ResultType& result );*/ extern template bool reductionOnCudaDevice< tnlParallelReductionAbsSum< char, long int > > ( const tnlParallelReductionAbsSum< char, long int >& operation, @@ -726,12 +726,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionAbsSum< double, const typename tnlParallelReductionAbsSum< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionAbsSum< double, long int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionAbsSum< long double, long int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionAbsSum< long double, long int > > ( const tnlParallelReductionAbsSum< long double, long int>& operation, const typename tnlParallelReductionAbsSum< long double, long int > :: IndexType size, const typename tnlParallelReductionAbsSum< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionAbsSum< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionAbsSum< long double, long int> :: ResultType& result ); + typename tnlParallelReductionAbsSum< long double, long int> :: ResultType& result );*/ /**** * Abs min @@ -765,12 +765,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionAbsMin< double, const typename tnlParallelReductionAbsMin< double, int > :: RealType* deviceInput2, typename tnlParallelReductionAbsMin< double, int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionAbsMin< long double, int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionAbsMin< long double, int > > ( const tnlParallelReductionAbsMin< long double, int>& operation, const typename tnlParallelReductionAbsMin< long double, int > :: IndexType size, const typename tnlParallelReductionAbsMin< long double, int > :: RealType* deviceInput1, const typename tnlParallelReductionAbsMin< long double, int > :: RealType* deviceInput2, - typename tnlParallelReductionAbsMin< long double, int> :: ResultType& result ); + typename tnlParallelReductionAbsMin< long double, int> :: ResultType& result );*/ extern template bool reductionOnCudaDevice< tnlParallelReductionAbsMin< char, long int > > ( const tnlParallelReductionAbsMin< char, long int >& operation, @@ -800,12 +800,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionAbsMin< double, const typename tnlParallelReductionAbsMin< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionAbsMin< double, long int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionAbsMin< long double, long int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionAbsMin< long double, long int > > ( const tnlParallelReductionAbsMin< long double, long int>& operation, const typename tnlParallelReductionAbsMin< long double, long int > :: IndexType size, const typename tnlParallelReductionAbsMin< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionAbsMin< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionAbsMin< long double, long int> :: ResultType& result ); + typename tnlParallelReductionAbsMin< long double, long int> :: ResultType& result );*/ /**** * Abs max */ @@ -838,12 +838,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionAbsMax< double, const typename tnlParallelReductionAbsMax< double, int > :: RealType* deviceInput2, typename tnlParallelReductionAbsMax< double, int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionAbsMax< long double, int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionAbsMax< long double, int > > ( const tnlParallelReductionAbsMax< long double, int>& operation, const typename tnlParallelReductionAbsMax< long double, int > :: IndexType size, const typename tnlParallelReductionAbsMax< long double, int > :: RealType* deviceInput1, const typename tnlParallelReductionAbsMax< long double, int > :: RealType* deviceInput2, - typename tnlParallelReductionAbsMax< long double, int> :: ResultType& result ); + typename tnlParallelReductionAbsMax< long double, int> :: ResultType& result );*/ extern template bool reductionOnCudaDevice< tnlParallelReductionAbsMax< char, long int > > ( const tnlParallelReductionAbsMax< char, long int >& operation, @@ -873,12 +873,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionAbsMax< double, const typename tnlParallelReductionAbsMax< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionAbsMax< double, long int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionAbsMax< long double, long int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionAbsMax< long double, long int > > ( const tnlParallelReductionAbsMax< long double, long int>& operation, const typename tnlParallelReductionAbsMax< long double, long int > :: IndexType size, const typename tnlParallelReductionAbsMax< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionAbsMax< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionAbsMax< long double, long int> :: ResultType& result ); + typename tnlParallelReductionAbsMax< long double, long int> :: ResultType& result );*/ /**** * Logical AND @@ -911,12 +911,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionLogicalAnd< doub const typename tnlParallelReductionLogicalAnd< double, int > :: RealType* deviceInput2, typename tnlParallelReductionLogicalAnd< double, int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionLogicalAnd< long double, int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionLogicalAnd< long double, int > > ( const tnlParallelReductionLogicalAnd< long double, int>& operation, const typename tnlParallelReductionLogicalAnd< long double, int > :: IndexType size, const typename tnlParallelReductionLogicalAnd< long double, int > :: RealType* deviceInput1, const typename tnlParallelReductionLogicalAnd< long double, int > :: RealType* deviceInput2, - typename tnlParallelReductionLogicalAnd< long double, int> :: ResultType& result ); + typename tnlParallelReductionLogicalAnd< long double, int> :: ResultType& result );*/ extern template bool reductionOnCudaDevice< tnlParallelReductionLogicalAnd< char, long int > > ( const tnlParallelReductionLogicalAnd< char, long int >& operation, @@ -946,12 +946,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionLogicalAnd< doub const typename tnlParallelReductionLogicalAnd< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionLogicalAnd< double, long int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionLogicalAnd< long double, long int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionLogicalAnd< long double, long int > > ( const tnlParallelReductionLogicalAnd< long double, long int>& operation, const typename tnlParallelReductionLogicalAnd< long double, long int > :: IndexType size, const typename tnlParallelReductionLogicalAnd< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionLogicalAnd< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionLogicalAnd< long double, long int> :: ResultType& result ); + typename tnlParallelReductionLogicalAnd< long double, long int> :: ResultType& result );*/ /**** * Logical OR @@ -984,12 +984,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionLogicalOr< doubl const typename tnlParallelReductionLogicalOr< double, int > :: RealType* deviceInput2, typename tnlParallelReductionLogicalOr< double, int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionLogicalOr< long double, int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionLogicalOr< long double, int > > ( const tnlParallelReductionLogicalOr< long double, int>& operation, const typename tnlParallelReductionLogicalOr< long double, int > :: IndexType size, const typename tnlParallelReductionLogicalOr< long double, int > :: RealType* deviceInput1, const typename tnlParallelReductionLogicalOr< long double, int > :: RealType* deviceInput2, - typename tnlParallelReductionLogicalOr< long double, int> :: ResultType& result ); + typename tnlParallelReductionLogicalOr< long double, int> :: ResultType& result );*/ extern template bool reductionOnCudaDevice< tnlParallelReductionLogicalOr< char, long int > > ( const tnlParallelReductionLogicalOr< char, long int >& operation, @@ -1019,12 +1019,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionLogicalOr< doubl const typename tnlParallelReductionLogicalOr< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionLogicalOr< double, long int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionLogicalOr< long double, long int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionLogicalOr< long double, long int > > ( const tnlParallelReductionLogicalOr< long double, long int>& operation, const typename tnlParallelReductionLogicalOr< long double, long int > :: IndexType size, const typename tnlParallelReductionLogicalOr< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionLogicalOr< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionLogicalOr< long double, long int> :: ResultType& result ); + typename tnlParallelReductionLogicalOr< long double, long int> :: ResultType& result );*/ /**** @@ -1044,12 +1044,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionLpNorm< double, const typename tnlParallelReductionLpNorm< double, int > :: RealType* deviceInput2, typename tnlParallelReductionLpNorm< double, int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionLpNorm< long double, int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionLpNorm< long double, int > > ( const tnlParallelReductionLpNorm< long double, int>& operation, const typename tnlParallelReductionLpNorm< long double, int > :: IndexType size, const typename tnlParallelReductionLpNorm< long double, int > :: RealType* deviceInput1, const typename tnlParallelReductionLpNorm< long double, int > :: RealType* deviceInput2, - typename tnlParallelReductionLpNorm< long double, int> :: ResultType& result ); + typename tnlParallelReductionLpNorm< long double, int> :: ResultType& result );*/ extern template bool reductionOnCudaDevice< tnlParallelReductionLpNorm< char, long int > > ( const tnlParallelReductionLpNorm< char, long int >& operation, @@ -1079,12 +1079,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionLpNorm< double, const typename tnlParallelReductionLpNorm< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionLpNorm< double, long int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionLpNorm< long double, long int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionLpNorm< long double, long int > > ( const tnlParallelReductionLpNorm< long double, long int>& operation, const typename tnlParallelReductionLpNorm< long double, long int > :: IndexType size, const typename tnlParallelReductionLpNorm< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionLpNorm< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionLpNorm< long double, long int> :: ResultType& result ); + typename tnlParallelReductionLpNorm< long double, long int> :: ResultType& result );*/ /**** @@ -1118,12 +1118,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionEqualities< doub const typename tnlParallelReductionEqualities< double, int > :: RealType* deviceInput2, typename tnlParallelReductionEqualities< double, int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionEqualities< long double, int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionEqualities< long double, int > > ( const tnlParallelReductionEqualities< long double, int>& operation, const typename tnlParallelReductionEqualities< long double, int > :: IndexType size, const typename tnlParallelReductionEqualities< long double, int > :: RealType* deviceInput1, const typename tnlParallelReductionEqualities< long double, int > :: RealType* deviceInput2, - typename tnlParallelReductionEqualities< long double, int> :: ResultType& result ); + typename tnlParallelReductionEqualities< long double, int> :: ResultType& result );*/ extern template bool reductionOnCudaDevice< tnlParallelReductionEqualities< char, long int > > ( const tnlParallelReductionEqualities< char, long int >& operation, @@ -1153,12 +1153,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionEqualities< doub const typename tnlParallelReductionEqualities< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionEqualities< double, long int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionEqualities< long double, long int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionEqualities< long double, long int > > ( const tnlParallelReductionEqualities< long double, long int>& operation, const typename tnlParallelReductionEqualities< long double, long int > :: IndexType size, const typename tnlParallelReductionEqualities< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionEqualities< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionEqualities< long double, long int> :: ResultType& result ); + typename tnlParallelReductionEqualities< long double, long int> :: ResultType& result );*/ /**** @@ -1192,12 +1192,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionInequalities< do const typename tnlParallelReductionInequalities< double, int > :: RealType* deviceInput2, typename tnlParallelReductionInequalities< double, int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionInequalities< long double, int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionInequalities< long double, int > > ( const tnlParallelReductionInequalities< long double, int>& operation, const typename tnlParallelReductionInequalities< long double, int > :: IndexType size, const typename tnlParallelReductionInequalities< long double, int > :: RealType* deviceInput1, const typename tnlParallelReductionInequalities< long double, int > :: RealType* deviceInput2, - typename tnlParallelReductionInequalities< long double, int> :: ResultType& result ); + typename tnlParallelReductionInequalities< long double, int> :: ResultType& result );*/ extern template bool reductionOnCudaDevice< tnlParallelReductionInequalities< char, long int > > ( const tnlParallelReductionInequalities< char, long int >& operation, @@ -1227,12 +1227,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionInequalities< do const typename tnlParallelReductionInequalities< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionInequalities< double, long int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionInequalities< long double, long int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionInequalities< long double, long int > > ( const tnlParallelReductionInequalities< long double, long int>& operation, const typename tnlParallelReductionInequalities< long double, long int > :: IndexType size, const typename tnlParallelReductionInequalities< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionInequalities< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionInequalities< long double, long int> :: ResultType& result ); + typename tnlParallelReductionInequalities< long double, long int> :: ResultType& result );*/ /**** @@ -1266,12 +1266,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionScalarProduct< d const typename tnlParallelReductionScalarProduct< double, int > :: RealType* deviceInput2, typename tnlParallelReductionScalarProduct< double, int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionScalarProduct< long double, int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionScalarProduct< long double, int > > ( const tnlParallelReductionScalarProduct< long double, int>& operation, const typename tnlParallelReductionScalarProduct< long double, int > :: IndexType size, const typename tnlParallelReductionScalarProduct< long double, int > :: RealType* deviceInput1, const typename tnlParallelReductionScalarProduct< long double, int > :: RealType* deviceInput2, - typename tnlParallelReductionScalarProduct< long double, int> :: ResultType& result ); + typename tnlParallelReductionScalarProduct< long double, int> :: ResultType& result );*/ extern template bool reductionOnCudaDevice< tnlParallelReductionScalarProduct< char, long int > > ( const tnlParallelReductionScalarProduct< char, long int >& operation, @@ -1301,12 +1301,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionScalarProduct< d const typename tnlParallelReductionScalarProduct< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionScalarProduct< double, long int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionScalarProduct< long double, long int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionScalarProduct< long double, long int > > ( const tnlParallelReductionScalarProduct< long double, long int>& operation, const typename tnlParallelReductionScalarProduct< long double, long int > :: IndexType size, const typename tnlParallelReductionScalarProduct< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionScalarProduct< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionScalarProduct< long double, long int> :: ResultType& result ); + typename tnlParallelReductionScalarProduct< long double, long int> :: ResultType& result );*/ /**** * Diff sum @@ -1340,12 +1340,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionDiffSum< double, const typename tnlParallelReductionDiffSum< double, int > :: RealType* deviceInput2, typename tnlParallelReductionDiffSum< double, int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionDiffSum< long double, int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionDiffSum< long double, int > > ( const tnlParallelReductionDiffSum< long double, int>& operation, const typename tnlParallelReductionDiffSum< long double, int > :: IndexType size, const typename tnlParallelReductionDiffSum< long double, int > :: RealType* deviceInput1, const typename tnlParallelReductionDiffSum< long double, int > :: RealType* deviceInput2, - typename tnlParallelReductionDiffSum< long double, int> :: ResultType& result ); + typename tnlParallelReductionDiffSum< long double, int> :: ResultType& result );*/ extern template bool reductionOnCudaDevice< tnlParallelReductionDiffSum< char, long int > > ( const tnlParallelReductionDiffSum< char, long int >& operation, @@ -1375,12 +1375,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionDiffSum< double, const typename tnlParallelReductionDiffSum< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionDiffSum< double, long int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionDiffSum< long double, long int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionDiffSum< long double, long int > > ( const tnlParallelReductionDiffSum< long double, long int>& operation, const typename tnlParallelReductionDiffSum< long double, long int > :: IndexType size, const typename tnlParallelReductionDiffSum< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionDiffSum< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionDiffSum< long double, long int> :: ResultType& result ); + typename tnlParallelReductionDiffSum< long double, long int> :: ResultType& result );*/ /**** * Diff min @@ -1414,12 +1414,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionDiffMin< double, const typename tnlParallelReductionDiffMin< double, int > :: RealType* deviceInput2, typename tnlParallelReductionDiffMin< double, int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionDiffMin< long double, int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionDiffMin< long double, int > > ( const tnlParallelReductionDiffMin< long double, int>& operation, const typename tnlParallelReductionDiffMin< long double, int > :: IndexType size, const typename tnlParallelReductionDiffMin< long double, int > :: RealType* deviceInput1, const typename tnlParallelReductionDiffMin< long double, int > :: RealType* deviceInput2, - typename tnlParallelReductionDiffMin< long double, int> :: ResultType& result ); + typename tnlParallelReductionDiffMin< long double, int> :: ResultType& result );*/ extern template bool reductionOnCudaDevice< tnlParallelReductionDiffMin< char, long int > > ( const tnlParallelReductionDiffMin< char, long int >& operation, @@ -1449,12 +1449,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionDiffMin< double, const typename tnlParallelReductionDiffMin< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionDiffMin< double, long int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionDiffMin< long double, long int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionDiffMin< long double, long int > > ( const tnlParallelReductionDiffMin< long double, long int>& operation, const typename tnlParallelReductionDiffMin< long double, long int > :: IndexType size, const typename tnlParallelReductionDiffMin< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionDiffMin< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionDiffMin< long double, long int> :: ResultType& result ); + typename tnlParallelReductionDiffMin< long double, long int> :: ResultType& result );*/ /**** * Diff max @@ -1488,12 +1488,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionDiffMax< double, const typename tnlParallelReductionDiffMax< double, int > :: RealType* deviceInput2, typename tnlParallelReductionDiffMax< double, int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionDiffMax< long double, int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionDiffMax< long double, int > > ( const tnlParallelReductionDiffMax< long double, int>& operation, const typename tnlParallelReductionDiffMax< long double, int > :: IndexType size, const typename tnlParallelReductionDiffMax< long double, int > :: RealType* deviceInput1, const typename tnlParallelReductionDiffMax< long double, int > :: RealType* deviceInput2, - typename tnlParallelReductionDiffMax< long double, int> :: ResultType& result ); + typename tnlParallelReductionDiffMax< long double, int> :: ResultType& result );*/ extern template bool reductionOnCudaDevice< tnlParallelReductionDiffMax< char, long int > > ( const tnlParallelReductionDiffMax< char, long int >& operation, @@ -1523,12 +1523,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionDiffMax< double, const typename tnlParallelReductionDiffMax< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionDiffMax< double, long int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionDiffMax< long double, long int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionDiffMax< long double, long int > > ( const tnlParallelReductionDiffMax< long double, long int>& operation, const typename tnlParallelReductionDiffMax< long double, long int > :: IndexType size, const typename tnlParallelReductionDiffMax< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionDiffMax< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionDiffMax< long double, long int> :: ResultType& result ); + typename tnlParallelReductionDiffMax< long double, long int> :: ResultType& result );*/ /**** * Diff abs sum @@ -1562,12 +1562,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionDiffAbsSum< doub const typename tnlParallelReductionDiffAbsSum< double, int > :: RealType* deviceInput2, typename tnlParallelReductionDiffAbsSum< double, int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionDiffAbsSum< long double, int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionDiffAbsSum< long double, int > > ( const tnlParallelReductionDiffAbsSum< long double, int>& operation, const typename tnlParallelReductionDiffAbsSum< long double, int > :: IndexType size, const typename tnlParallelReductionDiffAbsSum< long double, int > :: RealType* deviceInput1, const typename tnlParallelReductionDiffAbsSum< long double, int > :: RealType* deviceInput2, - typename tnlParallelReductionDiffAbsSum< long double, int> :: ResultType& result ); + typename tnlParallelReductionDiffAbsSum< long double, int> :: ResultType& result );*/ extern template bool reductionOnCudaDevice< tnlParallelReductionDiffAbsSum< char, long int > > ( const tnlParallelReductionDiffAbsSum< char, long int >& operation, @@ -1597,12 +1597,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionDiffAbsSum< doub const typename tnlParallelReductionDiffAbsSum< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionDiffAbsSum< double, long int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionDiffAbsSum< long double, long int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionDiffAbsSum< long double, long int > > ( const tnlParallelReductionDiffAbsSum< long double, long int>& operation, const typename tnlParallelReductionDiffAbsSum< long double, long int > :: IndexType size, const typename tnlParallelReductionDiffAbsSum< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionDiffAbsSum< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionDiffAbsSum< long double, long int> :: ResultType& result ); + typename tnlParallelReductionDiffAbsSum< long double, long int> :: ResultType& result );*/ /**** * Diff abs min @@ -1636,12 +1636,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionDiffAbsMin< doub const typename tnlParallelReductionDiffAbsMin< double, int > :: RealType* deviceInput2, typename tnlParallelReductionDiffAbsMin< double, int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionDiffAbsMin< long double, int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionDiffAbsMin< long double, int > > ( const tnlParallelReductionDiffAbsMin< long double, int>& operation, const typename tnlParallelReductionDiffAbsMin< long double, int > :: IndexType size, const typename tnlParallelReductionDiffAbsMin< long double, int > :: RealType* deviceInput1, const typename tnlParallelReductionDiffAbsMin< long double, int > :: RealType* deviceInput2, - typename tnlParallelReductionDiffAbsMin< long double, int> :: ResultType& result ); + typename tnlParallelReductionDiffAbsMin< long double, int> :: ResultType& result );*/ extern template bool reductionOnCudaDevice< tnlParallelReductionDiffAbsMin< char, long int > > ( const tnlParallelReductionDiffAbsMin< char, long int >& operation, @@ -1671,12 +1671,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionDiffAbsMin< doub const typename tnlParallelReductionDiffAbsMin< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionDiffAbsMin< double, long int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionDiffAbsMin< long double, long int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionDiffAbsMin< long double, long int > > ( const tnlParallelReductionDiffAbsMin< long double, long int>& operation, const typename tnlParallelReductionDiffAbsMin< long double, long int > :: IndexType size, const typename tnlParallelReductionDiffAbsMin< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionDiffAbsMin< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionDiffAbsMin< long double, long int> :: ResultType& result ); + typename tnlParallelReductionDiffAbsMin< long double, long int> :: ResultType& result );*/ /**** * Diff abs max */ @@ -1709,12 +1709,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionDiffAbsMax< doub const typename tnlParallelReductionDiffAbsMax< double, int > :: RealType* deviceInput2, typename tnlParallelReductionDiffAbsMax< double, int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionDiffAbsMax< long double, int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionDiffAbsMax< long double, int > > ( const tnlParallelReductionDiffAbsMax< long double, int>& operation, const typename tnlParallelReductionDiffAbsMax< long double, int > :: IndexType size, const typename tnlParallelReductionDiffAbsMax< long double, int > :: RealType* deviceInput1, const typename tnlParallelReductionDiffAbsMax< long double, int > :: RealType* deviceInput2, - typename tnlParallelReductionDiffAbsMax< long double, int> :: ResultType& result ); + typename tnlParallelReductionDiffAbsMax< long double, int> :: ResultType& result );*/ extern template bool reductionOnCudaDevice< tnlParallelReductionDiffAbsMax< char, long int > > ( const tnlParallelReductionDiffAbsMax< char, long int >& operation, @@ -1744,12 +1744,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionDiffAbsMax< doub const typename tnlParallelReductionDiffAbsMax< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionDiffAbsMax< double, long int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionDiffAbsMax< long double, long int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionDiffAbsMax< long double, long int > > ( const tnlParallelReductionDiffAbsMax< long double, long int>& operation, const typename tnlParallelReductionDiffAbsMax< long double, long int > :: IndexType size, const typename tnlParallelReductionDiffAbsMax< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionDiffAbsMax< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionDiffAbsMax< long double, long int> :: ResultType& result ); + typename tnlParallelReductionDiffAbsMax< long double, long int> :: ResultType& result );*/ @@ -1770,12 +1770,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionDiffLpNorm< doub const typename tnlParallelReductionDiffLpNorm< double, int > :: RealType* deviceInput2, typename tnlParallelReductionDiffLpNorm< double, int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionDiffLpNorm< long double, int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionDiffLpNorm< long double, int > > ( const tnlParallelReductionDiffLpNorm< long double, int>& operation, const typename tnlParallelReductionDiffLpNorm< long double, int > :: IndexType size, const typename tnlParallelReductionDiffLpNorm< long double, int > :: RealType* deviceInput1, const typename tnlParallelReductionDiffLpNorm< long double, int > :: RealType* deviceInput2, - typename tnlParallelReductionDiffLpNorm< long double, int> :: ResultType& result ); + typename tnlParallelReductionDiffLpNorm< long double, int> :: ResultType& result );*/ extern template bool reductionOnCudaDevice< tnlParallelReductionDiffLpNorm< char, long int > > ( const tnlParallelReductionDiffLpNorm< char, long int >& operation, @@ -1805,12 +1805,12 @@ extern template bool reductionOnCudaDevice< tnlParallelReductionDiffLpNorm< doub const typename tnlParallelReductionDiffLpNorm< double, long int > :: RealType* deviceInput2, typename tnlParallelReductionDiffLpNorm< double, long int> :: ResultType& result ); -extern template bool reductionOnCudaDevice< tnlParallelReductionDiffLpNorm< long double, long int > > +/*extern template bool reductionOnCudaDevice< tnlParallelReductionDiffLpNorm< long double, long int > > ( const tnlParallelReductionDiffLpNorm< long double, long int>& operation, const typename tnlParallelReductionDiffLpNorm< long double, long int > :: IndexType size, const typename tnlParallelReductionDiffLpNorm< long double, long int > :: RealType* deviceInput1, const typename tnlParallelReductionDiffLpNorm< long double, long int > :: RealType* deviceInput2, - typename tnlParallelReductionDiffLpNorm< long double, long int> :: ResultType& result ); + typename tnlParallelReductionDiffLpNorm< long double, long int> :: ResultType& result );*/ diff --git a/src/implementation/core/vectors/tnlStaticVector1D_impl.h b/src/implementation/core/vectors/tnlStaticVector1D_impl.h index 1d507a6c5dbc08397c0277cc5a197d2faaed6a93..11170e468db0db285fa354cc30a787c99e103390 100644 --- a/src/implementation/core/vectors/tnlStaticVector1D_impl.h +++ b/src/implementation/core/vectors/tnlStaticVector1D_impl.h @@ -61,6 +61,7 @@ __host__ __device__ tnlStaticVector< 1, Real >& tnlStaticVector< 1, Real >::operator += ( const tnlStaticVector& v ) { this->data[ 0 ] += v[ 0 ]; + return *this; } template< typename Real > @@ -70,6 +71,7 @@ __host__ __device__ tnlStaticVector< 1, Real >& tnlStaticVector< 1, Real >::operator -= ( const tnlStaticVector& v ) { this->data[ 0 ] -= v[ 0 ]; + return *this; } template< typename Real > @@ -79,6 +81,7 @@ __host__ __device__ tnlStaticVector< 1, Real >& tnlStaticVector< 1, Real >::operator *= ( const Real& c ) { this->data[ 0 ] *= c; + return *this; } template< typename Real > @@ -163,7 +166,7 @@ bool tnlStaticVector< 1, Real >::operator >= ( const tnlStaticVector& v ) const extern template class tnlStaticVector< 1, float >; extern template class tnlStaticVector< 1, double >; -extern template class tnlStaticVector< 1, long double >; +//extern template class tnlStaticVector< 1, long double >; #endif diff --git a/src/implementation/core/vectors/tnlStaticVector2D_impl.h b/src/implementation/core/vectors/tnlStaticVector2D_impl.h index dce884747ffab2b0ae9d9e3b0032fcbf92a2bb36..40b93dc4b4e50eaf8ed0b381eeb13e6ebed7f66f 100644 --- a/src/implementation/core/vectors/tnlStaticVector2D_impl.h +++ b/src/implementation/core/vectors/tnlStaticVector2D_impl.h @@ -80,6 +80,7 @@ tnlStaticVector< 2, Real >& tnlStaticVector< 2, Real >::operator += ( const tnlS { this->data[ 0 ] += v[ 0 ]; this->data[ 1 ] += v[ 1 ]; + return *this; } template< typename Real > @@ -90,6 +91,7 @@ tnlStaticVector< 2, Real >& tnlStaticVector< 2, Real >::operator -= ( const tnlS { this->data[ 0 ] -= v[ 0 ]; this->data[ 1 ] -= v[ 1 ]; + return *this; } template< typename Real > @@ -100,6 +102,7 @@ tnlStaticVector< 2, Real >& tnlStaticVector< 2, Real >::operator *= ( const Real { this->data[ 0 ] *= c; this->data[ 1 ] *= c; + return *this; } template< typename Real > @@ -192,7 +195,7 @@ bool tnlStaticVector< 2, Real >::operator >= ( const tnlStaticVector& v ) const extern template class tnlStaticVector< 2, float >; extern template class tnlStaticVector< 2, double >; -extern template class tnlStaticVector< 2, long double >; +//extern template class tnlStaticVector< 2, long double >; #endif diff --git a/src/implementation/core/vectors/tnlStaticVector3D_impl.h b/src/implementation/core/vectors/tnlStaticVector3D_impl.h index bed2ed818f8417489647d5890f855761e50f58bd..6b975851ae91b51fee22e17ed3f758868e6cf045 100644 --- a/src/implementation/core/vectors/tnlStaticVector3D_impl.h +++ b/src/implementation/core/vectors/tnlStaticVector3D_impl.h @@ -81,6 +81,7 @@ tnlStaticVector< 3, Real >& tnlStaticVector< 3, Real >::operator += ( const tnlS this->data[ 0 ] += v[ 0 ]; this->data[ 1 ] += v[ 1 ]; this->data[ 2 ] += v[ 2 ]; + return *this; } template< typename Real > @@ -92,6 +93,7 @@ tnlStaticVector< 3, Real >& tnlStaticVector< 3, Real >::operator -= ( const tnlS this->data[ 0 ] -= v[ 0 ]; this->data[ 1 ] -= v[ 1 ]; this->data[ 2 ] -= v[ 2 ]; + return *this; } template< typename Real > @@ -103,6 +105,7 @@ tnlStaticVector< 3, Real >& tnlStaticVector< 3, Real >::operator *= ( const Real this->data[ 0 ] *= c; this->data[ 1 ] *= c; this->data[ 2 ] *= c; + return *this; } template< typename Real > @@ -203,7 +206,7 @@ bool tnlStaticVector< 3, Real >::operator >= ( const tnlStaticVector& v ) const extern template class tnlStaticVector< 3, float >; extern template class tnlStaticVector< 3, double >; -extern template class tnlStaticVector< 3, long double >; +//extern template class tnlStaticVector< 3, long double >; #endif diff --git a/src/implementation/core/vectors/tnlStaticVector_impl.cu b/src/implementation/core/vectors/tnlStaticVector_impl.cu index 6128e8e49b0b1273ae4ae173c71efe5a25ebcdc4..938d0c47337fb389add036ab68dc7444474e4b16 100644 --- a/src/implementation/core/vectors/tnlStaticVector_impl.cu +++ b/src/implementation/core/vectors/tnlStaticVector_impl.cu @@ -22,19 +22,19 @@ template class tnlStaticVector< 1, float >; template class tnlStaticVector< 1, double >; -template class tnlStaticVector< 1, long double >; +//template class tnlStaticVector< 1, long double >; template class tnlStaticVector< 2, float >; template class tnlStaticVector< 2, double >; -template class tnlStaticVector< 2, long double >; +//template class tnlStaticVector< 2, long double >; template class tnlStaticVector< 3, float >; template class tnlStaticVector< 3, double >; -template class tnlStaticVector< 3, long double >; +//template class tnlStaticVector< 3, long double >; template class tnlStaticVector< 4, float >; template class tnlStaticVector< 4, double >; -template class tnlStaticVector< 4, long double >; +//template class tnlStaticVector< 4, long double >; #endif #endif diff --git a/src/implementation/core/vectors/tnlStaticVector_impl.h b/src/implementation/core/vectors/tnlStaticVector_impl.h index 7a041e215cd5c88a65a019e043c26d92599e9d1d..e5e3dbde02bc993c2d9680dcd2e6b41676180ba6 100644 --- a/src/implementation/core/vectors/tnlStaticVector_impl.h +++ b/src/implementation/core/vectors/tnlStaticVector_impl.h @@ -71,6 +71,7 @@ tnlStaticVector< Size, Real >& tnlStaticVector< Size, Real >::operator += ( cons { for( int i = 0; i < Size; i++ ) this->data[ i ] += v[ i ]; + return *this; } template< int Size, typename Real > @@ -81,6 +82,7 @@ tnlStaticVector< Size, Real >& tnlStaticVector< Size, Real >::operator -= ( cons { for( int i = 0; i < Size; i++ ) this->data[ i ] -= v[ i ]; + return *this; } template< int Size, typename Real > @@ -91,6 +93,7 @@ tnlStaticVector< Size, Real >& tnlStaticVector< Size, Real >::operator *= ( cons { for( int i = 0; i < Size; i++ ) this->data[ i ] *= c; + return *this; } template< int Size, typename Real > @@ -199,7 +202,7 @@ tnlStaticVector< Size, Real > operator * ( const Real& c, const tnlStaticVector< extern template class tnlStaticVector< 4, float >; extern template class tnlStaticVector< 4, double >; -extern template class tnlStaticVector< 4, long double >; +//extern template class tnlStaticVector< 4, long double >; #endif diff --git a/src/implementation/core/vectors/tnlVectorOperationsCuda_impl.h b/src/implementation/core/vectors/tnlVectorOperationsCuda_impl.h index c6a613f8324dd167d4f258ef9c49d91160fa2e7d..0b67be53dbd07a4e5fbbf4980a2a0b39711ca144 100644 --- a/src/implementation/core/vectors/tnlVectorOperationsCuda_impl.h +++ b/src/implementation/core/vectors/tnlVectorOperationsCuda_impl.h @@ -623,12 +623,12 @@ extern template int tnlVectorOperations< tnlCuda >::getVectorMax( const extern template long int tnlVectorOperations< tnlCuda >::getVectorMax( const tnlVector< long int, tnlCuda, int >& v ); extern template float tnlVectorOperations< tnlCuda >::getVectorMax( const tnlVector< float, tnlCuda, int >& v ); extern template double tnlVectorOperations< tnlCuda >::getVectorMax( const tnlVector< double, tnlCuda, int >& v ); -extern template long double tnlVectorOperations< tnlCuda >::getVectorMax( const tnlVector< long double, tnlCuda, int >& v ); +//extern template long double tnlVectorOperations< tnlCuda >::getVectorMax( const tnlVector< long double, tnlCuda, int >& v ); extern template int tnlVectorOperations< tnlCuda >::getVectorMax( const tnlVector< int, tnlCuda, long int >& v ); extern template long int tnlVectorOperations< tnlCuda >::getVectorMax( const tnlVector< long int, tnlCuda, long int >& v ); extern template float tnlVectorOperations< tnlCuda >::getVectorMax( const tnlVector< float, tnlCuda, long int >& v ); extern template double tnlVectorOperations< tnlCuda >::getVectorMax( const tnlVector< double, tnlCuda, long int >& v ); -extern template long double tnlVectorOperations< tnlCuda >::getVectorMax( const tnlVector< long double, tnlCuda, long int >& v ); +//extern template long double tnlVectorOperations< tnlCuda >::getVectorMax( const tnlVector< long double, tnlCuda, long int >& v ); /**** * Min @@ -637,12 +637,12 @@ extern template int tnlVectorOperations< tnlCuda >::getVectorMin( const extern template long int tnlVectorOperations< tnlCuda >::getVectorMin( const tnlVector< long int, tnlCuda, int >& v ); extern template float tnlVectorOperations< tnlCuda >::getVectorMin( const tnlVector< float, tnlCuda, int >& v ); extern template double tnlVectorOperations< tnlCuda >::getVectorMin( const tnlVector< double, tnlCuda, int >& v ); -extern template long double tnlVectorOperations< tnlCuda >::getVectorMin( const tnlVector< long double, tnlCuda, int >& v ); +//extern template long double tnlVectorOperations< tnlCuda >::getVectorMin( const tnlVector< long double, tnlCuda, int >& v ); extern template int tnlVectorOperations< tnlCuda >::getVectorMin( const tnlVector< int, tnlCuda, long int >& v ); extern template long int tnlVectorOperations< tnlCuda >::getVectorMin( const tnlVector< long int, tnlCuda, long int >& v ); extern template float tnlVectorOperations< tnlCuda >::getVectorMin( const tnlVector< float, tnlCuda, long int >& v ); extern template double tnlVectorOperations< tnlCuda >::getVectorMin( const tnlVector< double, tnlCuda, long int >& v ); -extern template long double tnlVectorOperations< tnlCuda >::getVectorMin( const tnlVector< long double, tnlCuda, long int >& v ); +//extern template long double tnlVectorOperations< tnlCuda >::getVectorMin( const tnlVector< long double, tnlCuda, long int >& v ); /**** * Abs max @@ -651,12 +651,12 @@ extern template int tnlVectorOperations< tnlCuda >::getVectorAbsMax( con extern template long int tnlVectorOperations< tnlCuda >::getVectorAbsMax( const tnlVector< long int, tnlCuda, int >& v ); extern template float tnlVectorOperations< tnlCuda >::getVectorAbsMax( const tnlVector< float, tnlCuda, int >& v ); extern template double tnlVectorOperations< tnlCuda >::getVectorAbsMax( const tnlVector< double, tnlCuda, int >& v ); -extern template long double tnlVectorOperations< tnlCuda >::getVectorAbsMax( const tnlVector< long double, tnlCuda, int >& v ); +//extern template long double tnlVectorOperations< tnlCuda >::getVectorAbsMax( const tnlVector< long double, tnlCuda, int >& v ); extern template int tnlVectorOperations< tnlCuda >::getVectorAbsMax( const tnlVector< int, tnlCuda, long int >& v ); extern template long int tnlVectorOperations< tnlCuda >::getVectorAbsMax( const tnlVector< long int, tnlCuda, long int >& v ); extern template float tnlVectorOperations< tnlCuda >::getVectorAbsMax( const tnlVector< float, tnlCuda, long int >& v ); extern template double tnlVectorOperations< tnlCuda >::getVectorAbsMax( const tnlVector< double, tnlCuda, long int >& v ); -extern template long double tnlVectorOperations< tnlCuda >::getVectorAbsMax( const tnlVector< long double, tnlCuda, long int >& v ); +//extern template long double tnlVectorOperations< tnlCuda >::getVectorAbsMax( const tnlVector< long double, tnlCuda, long int >& v ); /**** * Abs min @@ -665,12 +665,12 @@ extern template int tnlVectorOperations< tnlCuda >::getVectorAbsMin( con extern template long int tnlVectorOperations< tnlCuda >::getVectorAbsMin( const tnlVector< long int, tnlCuda, int >& v ); extern template float tnlVectorOperations< tnlCuda >::getVectorAbsMin( const tnlVector< float, tnlCuda, int >& v ); extern template double tnlVectorOperations< tnlCuda >::getVectorAbsMin( const tnlVector< double, tnlCuda, int >& v ); -extern template long double tnlVectorOperations< tnlCuda >::getVectorAbsMin( const tnlVector< long double, tnlCuda, int >& v ); +//extern template long double tnlVectorOperations< tnlCuda >::getVectorAbsMin( const tnlVector< long double, tnlCuda, int >& v ); extern template int tnlVectorOperations< tnlCuda >::getVectorAbsMin( const tnlVector< int, tnlCuda, long int >& v ); extern template long int tnlVectorOperations< tnlCuda >::getVectorAbsMin( const tnlVector< long int, tnlCuda, long int >& v ); extern template float tnlVectorOperations< tnlCuda >::getVectorAbsMin( const tnlVector< float, tnlCuda, long int >& v ); extern template double tnlVectorOperations< tnlCuda >::getVectorAbsMin( const tnlVector< double, tnlCuda, long int >& v ); -extern template long double tnlVectorOperations< tnlCuda >::getVectorAbsMin( const tnlVector< long double, tnlCuda, long int >& v ); +//extern template long double tnlVectorOperations< tnlCuda >::getVectorAbsMin( const tnlVector< long double, tnlCuda, long int >& v ); /**** * Lp norm @@ -679,12 +679,12 @@ extern template int tnlVectorOperations< tnlCuda >::getVectorLpNorm( con extern template long int tnlVectorOperations< tnlCuda >::getVectorLpNorm( const tnlVector< long int, tnlCuda, int >& v, const long int& p ); extern template float tnlVectorOperations< tnlCuda >::getVectorLpNorm( const tnlVector< float, tnlCuda, int >& v, const float& p ); extern template double tnlVectorOperations< tnlCuda >::getVectorLpNorm( const tnlVector< double, tnlCuda, int >& v, const double& p ); -extern template long double tnlVectorOperations< tnlCuda >::getVectorLpNorm( const tnlVector< long double, tnlCuda, int >& v, const long double& p ); +//extern template long double tnlVectorOperations< tnlCuda >::getVectorLpNorm( const tnlVector< long double, tnlCuda, int >& v, const long double& p ); extern template int tnlVectorOperations< tnlCuda >::getVectorLpNorm( const tnlVector< int, tnlCuda, long int >& v, const int& p ); extern template long int tnlVectorOperations< tnlCuda >::getVectorLpNorm( const tnlVector< long int, tnlCuda, long int >& v, const long int& p ); extern template float tnlVectorOperations< tnlCuda >::getVectorLpNorm( const tnlVector< float, tnlCuda, long int >& v, const float& p ); extern template double tnlVectorOperations< tnlCuda >::getVectorLpNorm( const tnlVector< double, tnlCuda, long int >& v, const double& p ); -extern template long double tnlVectorOperations< tnlCuda >::getVectorLpNorm( const tnlVector< long double, tnlCuda, long int >& v, const long double& p ); +//extern template long double tnlVectorOperations< tnlCuda >::getVectorLpNorm( const tnlVector< long double, tnlCuda, long int >& v, const long double& p ); /**** * Sum @@ -693,12 +693,12 @@ extern template int tnlVectorOperations< tnlCuda >::getVectorSum( const extern template long int tnlVectorOperations< tnlCuda >::getVectorSum( const tnlVector< long int, tnlCuda, int >& v ); extern template float tnlVectorOperations< tnlCuda >::getVectorSum( const tnlVector< float, tnlCuda, int >& v ); extern template double tnlVectorOperations< tnlCuda >::getVectorSum( const tnlVector< double, tnlCuda, int >& v ); -extern template long double tnlVectorOperations< tnlCuda >::getVectorSum( const tnlVector< long double, tnlCuda, int >& v ); +//extern template long double tnlVectorOperations< tnlCuda >::getVectorSum( const tnlVector< long double, tnlCuda, int >& v ); extern template int tnlVectorOperations< tnlCuda >::getVectorSum( const tnlVector< int, tnlCuda, long int >& v ); extern template long int tnlVectorOperations< tnlCuda >::getVectorSum( const tnlVector< long int, tnlCuda, long int >& v ); extern template float tnlVectorOperations< tnlCuda >::getVectorSum( const tnlVector< float, tnlCuda, long int >& v ); extern template double tnlVectorOperations< tnlCuda >::getVectorSum( const tnlVector< double, tnlCuda, long int >& v ); -extern template long double tnlVectorOperations< tnlCuda >::getVectorSum( const tnlVector< long double, tnlCuda, long int >& v ); +//extern template long double tnlVectorOperations< tnlCuda >::getVectorSum( const tnlVector< long double, tnlCuda, long int >& v ); /**** * Difference max @@ -707,12 +707,12 @@ extern template int tnlVectorOperations< tnlCuda >::getVectorDifferenceM extern template long int tnlVectorOperations< tnlCuda >::getVectorDifferenceMax( const tnlVector< long int, tnlCuda, int >& v1, const tnlVector< long int, tnlCuda, int >& v2 ); extern template float tnlVectorOperations< tnlCuda >::getVectorDifferenceMax( const tnlVector< float, tnlCuda, int >& v1, const tnlVector< float, tnlCuda, int >& v2); extern template double tnlVectorOperations< tnlCuda >::getVectorDifferenceMax( const tnlVector< double, tnlCuda, int >& v1, const tnlVector< double, tnlCuda, int >& v2 ); -extern template long double tnlVectorOperations< tnlCuda >::getVectorDifferenceMax( const tnlVector< long double, tnlCuda, int >& v1, const tnlVector< long double, tnlCuda, int >& v2 ); +//extern template long double tnlVectorOperations< tnlCuda >::getVectorDifferenceMax( const tnlVector< long double, tnlCuda, int >& v1, const tnlVector< long double, tnlCuda, int >& v2 ); extern template int tnlVectorOperations< tnlCuda >::getVectorDifferenceMax( const tnlVector< int, tnlCuda, long int >& v1, const tnlVector< int, tnlCuda, long int >& v2 ); extern template long int tnlVectorOperations< tnlCuda >::getVectorDifferenceMax( const tnlVector< long int, tnlCuda, long int >& v1, const tnlVector< long int, tnlCuda, long int >& v2 ); extern template float tnlVectorOperations< tnlCuda >::getVectorDifferenceMax( const tnlVector< float, tnlCuda, long int >& v1, const tnlVector< float, tnlCuda, long int >& v2 ); extern template double tnlVectorOperations< tnlCuda >::getVectorDifferenceMax( const tnlVector< double, tnlCuda, long int >& v1, const tnlVector< double, tnlCuda, long int >& v2 ); -extern template long double tnlVectorOperations< tnlCuda >::getVectorDifferenceMax( const tnlVector< long double, tnlCuda, long int >& v1, const tnlVector< long double, tnlCuda, long int >& v2 ); +//extern template long double tnlVectorOperations< tnlCuda >::getVectorDifferenceMax( const tnlVector< long double, tnlCuda, long int >& v1, const tnlVector< long double, tnlCuda, long int >& v2 ); /**** * Difference min @@ -721,12 +721,12 @@ extern template int tnlVectorOperations< tnlCuda >::getVectorDifferenceM extern template long int tnlVectorOperations< tnlCuda >::getVectorDifferenceMin( const tnlVector< long int, tnlCuda, int >& v1, const tnlVector< long int, tnlCuda, int >& v2 ); extern template float tnlVectorOperations< tnlCuda >::getVectorDifferenceMin( const tnlVector< float, tnlCuda, int >& v1, const tnlVector< float, tnlCuda, int >& v2); extern template double tnlVectorOperations< tnlCuda >::getVectorDifferenceMin( const tnlVector< double, tnlCuda, int >& v1, const tnlVector< double, tnlCuda, int >& v2 ); -extern template long double tnlVectorOperations< tnlCuda >::getVectorDifferenceMin( const tnlVector< long double, tnlCuda, int >& v1, const tnlVector< long double, tnlCuda, int >& v2 ); +//extern template long double tnlVectorOperations< tnlCuda >::getVectorDifferenceMin( const tnlVector< long double, tnlCuda, int >& v1, const tnlVector< long double, tnlCuda, int >& v2 ); extern template int tnlVectorOperations< tnlCuda >::getVectorDifferenceMin( const tnlVector< int, tnlCuda, long int >& v1, const tnlVector< int, tnlCuda, long int >& v2 ); extern template long int tnlVectorOperations< tnlCuda >::getVectorDifferenceMin( const tnlVector< long int, tnlCuda, long int >& v1, const tnlVector< long int, tnlCuda, long int >& v2 ); extern template float tnlVectorOperations< tnlCuda >::getVectorDifferenceMin( const tnlVector< float, tnlCuda, long int >& v1, const tnlVector< float, tnlCuda, long int >& v2 ); extern template double tnlVectorOperations< tnlCuda >::getVectorDifferenceMin( const tnlVector< double, tnlCuda, long int >& v1, const tnlVector< double, tnlCuda, long int >& v2 ); -extern template long double tnlVectorOperations< tnlCuda >::getVectorDifferenceMin( const tnlVector< long double, tnlCuda, long int >& v1, const tnlVector< long double, tnlCuda, long int >& v2 ); +//extern template long double tnlVectorOperations< tnlCuda >::getVectorDifferenceMin( const tnlVector< long double, tnlCuda, long int >& v1, const tnlVector< long double, tnlCuda, long int >& v2 ); /**** * Difference abs max @@ -735,12 +735,12 @@ extern template int tnlVectorOperations< tnlCuda >::getVectorDifferenceA extern template long int tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMax( const tnlVector< long int, tnlCuda, int >& v1, const tnlVector< long int, tnlCuda, int >& v2 ); extern template float tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMax( const tnlVector< float, tnlCuda, int >& v1, const tnlVector< float, tnlCuda, int >& v2); extern template double tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMax( const tnlVector< double, tnlCuda, int >& v1, const tnlVector< double, tnlCuda, int >& v2 ); -extern template long double tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMax( const tnlVector< long double, tnlCuda, int >& v1, const tnlVector< long double, tnlCuda, int >& v2 ); +//extern template long double tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMax( const tnlVector< long double, tnlCuda, int >& v1, const tnlVector< long double, tnlCuda, int >& v2 ); extern template int tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMax( const tnlVector< int, tnlCuda, long int >& v1, const tnlVector< int, tnlCuda, long int >& v2 ); extern template long int tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMax( const tnlVector< long int, tnlCuda, long int >& v1, const tnlVector< long int, tnlCuda, long int >& v2 ); extern template float tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMax( const tnlVector< float, tnlCuda, long int >& v1, const tnlVector< float, tnlCuda, long int >& v2 ); extern template double tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMax( const tnlVector< double, tnlCuda, long int >& v1, const tnlVector< double, tnlCuda, long int >& v2 ); -extern template long double tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMax( const tnlVector< long double, tnlCuda, long int >& v1, const tnlVector< long double, tnlCuda, long int >& v2 ); +//extern template long double tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMax( const tnlVector< long double, tnlCuda, long int >& v1, const tnlVector< long double, tnlCuda, long int >& v2 ); /**** * Difference abs min @@ -749,12 +749,12 @@ extern template int tnlVectorOperations< tnlCuda >::getVectorDifferenceA extern template long int tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMin( const tnlVector< long int, tnlCuda, int >& v1, const tnlVector< long int, tnlCuda, int >& v2 ); extern template float tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMin( const tnlVector< float, tnlCuda, int >& v1, const tnlVector< float, tnlCuda, int >& v2); extern template double tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMin( const tnlVector< double, tnlCuda, int >& v1, const tnlVector< double, tnlCuda, int >& v2 ); -extern template long double tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMin( const tnlVector< long double, tnlCuda, int >& v1, const tnlVector< long double, tnlCuda, int >& v2 ); +//extern template long double tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMin( const tnlVector< long double, tnlCuda, int >& v1, const tnlVector< long double, tnlCuda, int >& v2 ); extern template int tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMin( const tnlVector< int, tnlCuda, long int >& v1, const tnlVector< int, tnlCuda, long int >& v2 ); extern template long int tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMin( const tnlVector< long int, tnlCuda, long int >& v1, const tnlVector< long int, tnlCuda, long int >& v2 ); extern template float tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMin( const tnlVector< float, tnlCuda, long int >& v1, const tnlVector< float, tnlCuda, long int >& v2 ); extern template double tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMin( const tnlVector< double, tnlCuda, long int >& v1, const tnlVector< double, tnlCuda, long int >& v2 ); -extern template long double tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMin( const tnlVector< long double, tnlCuda, long int >& v1, const tnlVector< long double, tnlCuda, long int >& v2 ); +//extern template long double tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMin( const tnlVector< long double, tnlCuda, long int >& v1, const tnlVector< long double, tnlCuda, long int >& v2 ); #endif diff --git a/src/implementation/core/vectors/tnlVectorOperations_impl.cu b/src/implementation/core/vectors/tnlVectorOperations_impl.cu index 977cc06215c1575d85af708f94bf1f8394eef3fa..6ad481eef135afc207929c3cf70f22f7ee99b460 100644 --- a/src/implementation/core/vectors/tnlVectorOperations_impl.cu +++ b/src/implementation/core/vectors/tnlVectorOperations_impl.cu @@ -26,12 +26,12 @@ template int tnlVectorOperations< tnlCuda >::getVectorMax( const tnlVect template long int tnlVectorOperations< tnlCuda >::getVectorMax( const tnlVector< long int, tnlCuda, int >& v ); template float tnlVectorOperations< tnlCuda >::getVectorMax( const tnlVector< float, tnlCuda, int >& v ); template double tnlVectorOperations< tnlCuda >::getVectorMax( const tnlVector< double, tnlCuda, int >& v ); -template long double tnlVectorOperations< tnlCuda >::getVectorMax( const tnlVector< long double, tnlCuda, int >& v ); +//template long double tnlVectorOperations< tnlCuda >::getVectorMax( const tnlVector< long double, tnlCuda, int >& v ); template int tnlVectorOperations< tnlCuda >::getVectorMax( const tnlVector< int, tnlCuda, long int >& v ); template long int tnlVectorOperations< tnlCuda >::getVectorMax( const tnlVector< long int, tnlCuda, long int >& v ); template float tnlVectorOperations< tnlCuda >::getVectorMax( const tnlVector< float, tnlCuda, long int >& v ); template double tnlVectorOperations< tnlCuda >::getVectorMax( const tnlVector< double, tnlCuda, long int >& v ); -template long double tnlVectorOperations< tnlCuda >::getVectorMax( const tnlVector< long double, tnlCuda, long int >& v ); +//template long double tnlVectorOperations< tnlCuda >::getVectorMax( const tnlVector< long double, tnlCuda, long int >& v ); /**** * Min @@ -40,12 +40,12 @@ template int tnlVectorOperations< tnlCuda >::getVectorMin( const tnlVect template long int tnlVectorOperations< tnlCuda >::getVectorMin( const tnlVector< long int, tnlCuda, int >& v ); template float tnlVectorOperations< tnlCuda >::getVectorMin( const tnlVector< float, tnlCuda, int >& v ); template double tnlVectorOperations< tnlCuda >::getVectorMin( const tnlVector< double, tnlCuda, int >& v ); -template long double tnlVectorOperations< tnlCuda >::getVectorMin( const tnlVector< long double, tnlCuda, int >& v ); +//template long double tnlVectorOperations< tnlCuda >::getVectorMin( const tnlVector< long double, tnlCuda, int >& v ); template int tnlVectorOperations< tnlCuda >::getVectorMin( const tnlVector< int, tnlCuda, long int >& v ); template long int tnlVectorOperations< tnlCuda >::getVectorMin( const tnlVector< long int, tnlCuda, long int >& v ); template float tnlVectorOperations< tnlCuda >::getVectorMin( const tnlVector< float, tnlCuda, long int >& v ); template double tnlVectorOperations< tnlCuda >::getVectorMin( const tnlVector< double, tnlCuda, long int >& v ); -template long double tnlVectorOperations< tnlCuda >::getVectorMin( const tnlVector< long double, tnlCuda, long int >& v ); +//template long double tnlVectorOperations< tnlCuda >::getVectorMin( const tnlVector< long double, tnlCuda, long int >& v ); /**** * Abs max @@ -54,12 +54,12 @@ template int tnlVectorOperations< tnlCuda >::getVectorAbsMax( const tnlV template long int tnlVectorOperations< tnlCuda >::getVectorAbsMax( const tnlVector< long int, tnlCuda, int >& v ); template float tnlVectorOperations< tnlCuda >::getVectorAbsMax( const tnlVector< float, tnlCuda, int >& v ); template double tnlVectorOperations< tnlCuda >::getVectorAbsMax( const tnlVector< double, tnlCuda, int >& v ); -template long double tnlVectorOperations< tnlCuda >::getVectorAbsMax( const tnlVector< long double, tnlCuda, int >& v ); +//template long double tnlVectorOperations< tnlCuda >::getVectorAbsMax( const tnlVector< long double, tnlCuda, int >& v ); template int tnlVectorOperations< tnlCuda >::getVectorAbsMax( const tnlVector< int, tnlCuda, long int >& v ); template long int tnlVectorOperations< tnlCuda >::getVectorAbsMax( const tnlVector< long int, tnlCuda, long int >& v ); template float tnlVectorOperations< tnlCuda >::getVectorAbsMax( const tnlVector< float, tnlCuda, long int >& v ); template double tnlVectorOperations< tnlCuda >::getVectorAbsMax( const tnlVector< double, tnlCuda, long int >& v ); -template long double tnlVectorOperations< tnlCuda >::getVectorAbsMax( const tnlVector< long double, tnlCuda, long int >& v ); +//template long double tnlVectorOperations< tnlCuda >::getVectorAbsMax( const tnlVector< long double, tnlCuda, long int >& v ); /**** * Abs min @@ -68,12 +68,12 @@ template int tnlVectorOperations< tnlCuda >::getVectorAbsMin( const tnlV template long int tnlVectorOperations< tnlCuda >::getVectorAbsMin( const tnlVector< long int, tnlCuda, int >& v ); template float tnlVectorOperations< tnlCuda >::getVectorAbsMin( const tnlVector< float, tnlCuda, int >& v ); template double tnlVectorOperations< tnlCuda >::getVectorAbsMin( const tnlVector< double, tnlCuda, int >& v ); -template long double tnlVectorOperations< tnlCuda >::getVectorAbsMin( const tnlVector< long double, tnlCuda, int >& v ); +//template long double tnlVectorOperations< tnlCuda >::getVectorAbsMin( const tnlVector< long double, tnlCuda, int >& v ); template int tnlVectorOperations< tnlCuda >::getVectorAbsMin( const tnlVector< int, tnlCuda, long int >& v ); template long int tnlVectorOperations< tnlCuda >::getVectorAbsMin( const tnlVector< long int, tnlCuda, long int >& v ); template float tnlVectorOperations< tnlCuda >::getVectorAbsMin( const tnlVector< float, tnlCuda, long int >& v ); template double tnlVectorOperations< tnlCuda >::getVectorAbsMin( const tnlVector< double, tnlCuda, long int >& v ); -template long double tnlVectorOperations< tnlCuda >::getVectorAbsMin( const tnlVector< long double, tnlCuda, long int >& v ); +//template long double tnlVectorOperations< tnlCuda >::getVectorAbsMin( const tnlVector< long double, tnlCuda, long int >& v ); /**** * Lp norm @@ -82,12 +82,12 @@ template int tnlVectorOperations< tnlCuda >::getVectorLpNorm( const tnlV template long int tnlVectorOperations< tnlCuda >::getVectorLpNorm( const tnlVector< long int, tnlCuda, int >& v, const long int& p ); template float tnlVectorOperations< tnlCuda >::getVectorLpNorm( const tnlVector< float, tnlCuda, int >& v, const float& p ); template double tnlVectorOperations< tnlCuda >::getVectorLpNorm( const tnlVector< double, tnlCuda, int >& v, const double& p ); -template long double tnlVectorOperations< tnlCuda >::getVectorLpNorm( const tnlVector< long double, tnlCuda, int >& v, const long double& p ); +//template long double tnlVectorOperations< tnlCuda >::getVectorLpNorm( const tnlVector< long double, tnlCuda, int >& v, const long double& p ); template int tnlVectorOperations< tnlCuda >::getVectorLpNorm( const tnlVector< int, tnlCuda, long int >& v, const int& p ); template long int tnlVectorOperations< tnlCuda >::getVectorLpNorm( const tnlVector< long int, tnlCuda, long int >& v, const long int& p ); template float tnlVectorOperations< tnlCuda >::getVectorLpNorm( const tnlVector< float, tnlCuda, long int >& v, const float& p ); template double tnlVectorOperations< tnlCuda >::getVectorLpNorm( const tnlVector< double, tnlCuda, long int >& v, const double& p ); -template long double tnlVectorOperations< tnlCuda >::getVectorLpNorm( const tnlVector< long double, tnlCuda, long int >& v, const long double& p ); +//template long double tnlVectorOperations< tnlCuda >::getVectorLpNorm( const tnlVector< long double, tnlCuda, long int >& v, const long double& p ); /**** * Sum @@ -96,12 +96,12 @@ template int tnlVectorOperations< tnlCuda >::getVectorSum( const tnlVect template long int tnlVectorOperations< tnlCuda >::getVectorSum( const tnlVector< long int, tnlCuda, int >& v ); template float tnlVectorOperations< tnlCuda >::getVectorSum( const tnlVector< float, tnlCuda, int >& v ); template double tnlVectorOperations< tnlCuda >::getVectorSum( const tnlVector< double, tnlCuda, int >& v ); -template long double tnlVectorOperations< tnlCuda >::getVectorSum( const tnlVector< long double, tnlCuda, int >& v ); +//template long double tnlVectorOperations< tnlCuda >::getVectorSum( const tnlVector< long double, tnlCuda, int >& v ); template int tnlVectorOperations< tnlCuda >::getVectorSum( const tnlVector< int, tnlCuda, long int >& v ); template long int tnlVectorOperations< tnlCuda >::getVectorSum( const tnlVector< long int, tnlCuda, long int >& v ); template float tnlVectorOperations< tnlCuda >::getVectorSum( const tnlVector< float, tnlCuda, long int >& v ); template double tnlVectorOperations< tnlCuda >::getVectorSum( const tnlVector< double, tnlCuda, long int >& v ); -template long double tnlVectorOperations< tnlCuda >::getVectorSum( const tnlVector< long double, tnlCuda, long int >& v ); +//template long double tnlVectorOperations< tnlCuda >::getVectorSum( const tnlVector< long double, tnlCuda, long int >& v ); /**** * Difference max @@ -110,12 +110,12 @@ template int tnlVectorOperations< tnlCuda >::getVectorDifferenceMax( con template long int tnlVectorOperations< tnlCuda >::getVectorDifferenceMax( const tnlVector< long int, tnlCuda, int >& v1, const tnlVector< long int, tnlCuda, int >& v2 ); template float tnlVectorOperations< tnlCuda >::getVectorDifferenceMax( const tnlVector< float, tnlCuda, int >& v1, const tnlVector< float, tnlCuda, int >& v2); template double tnlVectorOperations< tnlCuda >::getVectorDifferenceMax( const tnlVector< double, tnlCuda, int >& v1, const tnlVector< double, tnlCuda, int >& v2 ); -template long double tnlVectorOperations< tnlCuda >::getVectorDifferenceMax( const tnlVector< long double, tnlCuda, int >& v1, const tnlVector< long double, tnlCuda, int >& v2 ); +//template long double tnlVectorOperations< tnlCuda >::getVectorDifferenceMax( const tnlVector< long double, tnlCuda, int >& v1, const tnlVector< long double, tnlCuda, int >& v2 ); template int tnlVectorOperations< tnlCuda >::getVectorDifferenceMax( const tnlVector< int, tnlCuda, long int >& v1, const tnlVector< int, tnlCuda, long int >& v2 ); template long int tnlVectorOperations< tnlCuda >::getVectorDifferenceMax( const tnlVector< long int, tnlCuda, long int >& v1, const tnlVector< long int, tnlCuda, long int >& v2 ); template float tnlVectorOperations< tnlCuda >::getVectorDifferenceMax( const tnlVector< float, tnlCuda, long int >& v1, const tnlVector< float, tnlCuda, long int >& v2 ); template double tnlVectorOperations< tnlCuda >::getVectorDifferenceMax( const tnlVector< double, tnlCuda, long int >& v1, const tnlVector< double, tnlCuda, long int >& v2 ); -template long double tnlVectorOperations< tnlCuda >::getVectorDifferenceMax( const tnlVector< long double, tnlCuda, long int >& v1, const tnlVector< long double, tnlCuda, long int >& v2 ); +//template long double tnlVectorOperations< tnlCuda >::getVectorDifferenceMax( const tnlVector< long double, tnlCuda, long int >& v1, const tnlVector< long double, tnlCuda, long int >& v2 ); /**** * Difference min @@ -124,12 +124,12 @@ template int tnlVectorOperations< tnlCuda >::getVectorDifferenceMin( con template long int tnlVectorOperations< tnlCuda >::getVectorDifferenceMin( const tnlVector< long int, tnlCuda, int >& v1, const tnlVector< long int, tnlCuda, int >& v2 ); template float tnlVectorOperations< tnlCuda >::getVectorDifferenceMin( const tnlVector< float, tnlCuda, int >& v1, const tnlVector< float, tnlCuda, int >& v2); template double tnlVectorOperations< tnlCuda >::getVectorDifferenceMin( const tnlVector< double, tnlCuda, int >& v1, const tnlVector< double, tnlCuda, int >& v2 ); -template long double tnlVectorOperations< tnlCuda >::getVectorDifferenceMin( const tnlVector< long double, tnlCuda, int >& v1, const tnlVector< long double, tnlCuda, int >& v2 ); +//template long double tnlVectorOperations< tnlCuda >::getVectorDifferenceMin( const tnlVector< long double, tnlCuda, int >& v1, const tnlVector< long double, tnlCuda, int >& v2 ); template int tnlVectorOperations< tnlCuda >::getVectorDifferenceMin( const tnlVector< int, tnlCuda, long int >& v1, const tnlVector< int, tnlCuda, long int >& v2 ); template long int tnlVectorOperations< tnlCuda >::getVectorDifferenceMin( const tnlVector< long int, tnlCuda, long int >& v1, const tnlVector< long int, tnlCuda, long int >& v2 ); template float tnlVectorOperations< tnlCuda >::getVectorDifferenceMin( const tnlVector< float, tnlCuda, long int >& v1, const tnlVector< float, tnlCuda, long int >& v2 ); template double tnlVectorOperations< tnlCuda >::getVectorDifferenceMin( const tnlVector< double, tnlCuda, long int >& v1, const tnlVector< double, tnlCuda, long int >& v2 ); -template long double tnlVectorOperations< tnlCuda >::getVectorDifferenceMin( const tnlVector< long double, tnlCuda, long int >& v1, const tnlVector< long double, tnlCuda, long int >& v2 ); +//template long double tnlVectorOperations< tnlCuda >::getVectorDifferenceMin( const tnlVector< long double, tnlCuda, long int >& v1, const tnlVector< long double, tnlCuda, long int >& v2 ); /**** * Difference abs max @@ -138,12 +138,12 @@ template int tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMax( template long int tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMax( const tnlVector< long int, tnlCuda, int >& v1, const tnlVector< long int, tnlCuda, int >& v2 ); template float tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMax( const tnlVector< float, tnlCuda, int >& v1, const tnlVector< float, tnlCuda, int >& v2); template double tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMax( const tnlVector< double, tnlCuda, int >& v1, const tnlVector< double, tnlCuda, int >& v2 ); -template long double tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMax( const tnlVector< long double, tnlCuda, int >& v1, const tnlVector< long double, tnlCuda, int >& v2 ); +//template long double tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMax( const tnlVector< long double, tnlCuda, int >& v1, const tnlVector< long double, tnlCuda, int >& v2 ); template int tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMax( const tnlVector< int, tnlCuda, long int >& v1, const tnlVector< int, tnlCuda, long int >& v2 ); template long int tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMax( const tnlVector< long int, tnlCuda, long int >& v1, const tnlVector< long int, tnlCuda, long int >& v2 ); template float tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMax( const tnlVector< float, tnlCuda, long int >& v1, const tnlVector< float, tnlCuda, long int >& v2 ); template double tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMax( const tnlVector< double, tnlCuda, long int >& v1, const tnlVector< double, tnlCuda, long int >& v2 ); -template long double tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMax( const tnlVector< long double, tnlCuda, long int >& v1, const tnlVector< long double, tnlCuda, long int >& v2 ); +//template long double tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMax( const tnlVector< long double, tnlCuda, long int >& v1, const tnlVector< long double, tnlCuda, long int >& v2 ); /**** * Difference abs min @@ -152,12 +152,12 @@ template int tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMin( template long int tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMin( const tnlVector< long int, tnlCuda, int >& v1, const tnlVector< long int, tnlCuda, int >& v2 ); template float tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMin( const tnlVector< float, tnlCuda, int >& v1, const tnlVector< float, tnlCuda, int >& v2); template double tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMin( const tnlVector< double, tnlCuda, int >& v1, const tnlVector< double, tnlCuda, int >& v2 ); -template long double tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMin( const tnlVector< long double, tnlCuda, int >& v1, const tnlVector< long double, tnlCuda, int >& v2 ); +//template long double tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMin( const tnlVector< long double, tnlCuda, int >& v1, const tnlVector< long double, tnlCuda, int >& v2 ); template int tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMin( const tnlVector< int, tnlCuda, long int >& v1, const tnlVector< int, tnlCuda, long int >& v2 ); template long int tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMin( const tnlVector< long int, tnlCuda, long int >& v1, const tnlVector< long int, tnlCuda, long int >& v2 ); template float tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMin( const tnlVector< float, tnlCuda, long int >& v1, const tnlVector< float, tnlCuda, long int >& v2 ); template double tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMin( const tnlVector< double, tnlCuda, long int >& v1, const tnlVector< double, tnlCuda, long int >& v2 ); -template long double tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMin( const tnlVector< long double, tnlCuda, long int >& v1, const tnlVector< long double, tnlCuda, long int >& v2 ); +//template long double tnlVectorOperations< tnlCuda >::getVectorDifferenceAbsMin( const tnlVector< long double, tnlCuda, long int >& v1, const tnlVector< long double, tnlCuda, long int >& v2 ); #endif \ No newline at end of file diff --git a/src/implementation/core/vectors/tnlVector_impl.h b/src/implementation/core/vectors/tnlVector_impl.h index beab0badbc65851b51f4981dfb7f2d3b65a13750..eef7083d219657fcea34e752501af91a95517666 100644 --- a/src/implementation/core/vectors/tnlVector_impl.h +++ b/src/implementation/core/vectors/tnlVector_impl.h @@ -130,6 +130,7 @@ template< typename Real, tnlVector< Real, Device, Index >& tnlVector< Real, Device, Index > :: operator -= ( const Vector& vector ) { alphaXPlusBetaY( -1.0, vector, 1.0 ); + return *this; } template< typename Real, @@ -139,6 +140,7 @@ template< typename Real, tnlVector< Real, Device, Index >& tnlVector< Real, Device, Index > :: operator += ( const Vector& vector ) { alphaXPlusBetaY( 1.0, vector, 1.0 ); + return *this; } template< typename Real, diff --git a/src/implementation/functions/tnlFunctionDiscretizer_impl.h b/src/implementation/functions/tnlFunctionDiscretizer_impl.h index 3eab02a171d8a126c18476b1f3023ddc84ab0411..5351a6cad5ac3321311cc819b4af81cdb1a5dc99 100644 --- a/src/implementation/functions/tnlFunctionDiscretizer_impl.h +++ b/src/implementation/functions/tnlFunctionDiscretizer_impl.h @@ -26,17 +26,17 @@ void tnlFunctionDiscretizer< Mesh, Function, Vector >::discretize( const Mesh& m const typename Vector::RealType& time ) { //tnlAssert( Mesh::Dimensions == Function::Dimensions, ); // TODO: change this to tnlStaticAssert - typename Mesh::IndexType i = 0; + IndexType i = 0; discreteFunction.setSize( mesh.getNumberOfCells() ); if( DeviceType::DeviceType == ( int ) tnlHostDevice ) { while( i < mesh.getNumberOfCells() ) { - typename Mesh::VertexType v; - typename Mesh::CoordinatesType c; + VertexType v; + CoordinatesType c; c = mesh.getCellCoordinates( i ); - v = mesh.getCellCenter( c ); - discreteFunction[ i ] = function.template getValue< XDiffOrder, YDiffOrder, ZDiffOrder >( v, time ); + v = mesh.template getCellCenter< VertexType >( c ); + discreteFunction[ i ] = function.template getValue< XDiffOrder, YDiffOrder, ZDiffOrder, VertexType >( v, time ); i++; } } diff --git a/src/implementation/functions/tnlSinWaveFunction_impl.h b/src/implementation/functions/tnlSinWaveFunction_impl.h index 10f0afea489c339d0657327ae3f74e5068abdb8f..90f6f003cd99fb76116a0d583a7ae7a2b0d88209 100644 --- a/src/implementation/functions/tnlSinWaveFunction_impl.h +++ b/src/implementation/functions/tnlSinWaveFunction_impl.h @@ -129,11 +129,11 @@ getValue( const Vertex& v, if( XDiffOrder == 1 && YDiffOrder == 0 ) return 2.0 * M_PI * x / ( this->waveLength * sqrt( x * x + y * y ) ) * this->amplitude * cos( this->phase + 2.0 * M_PI * sqrt( x * x + y * y ) / this->waveLength ); if( XDiffOrder == 2 && YDiffOrder == 0 ) - return 2.0 * M_PI * y * y / ( this->waveLength * sqrt( x * x + y * y ) * sqrt( x * x + y * y ) * sqrt( x * x + y * y ) ) * this->amplitude * cos( this->phase + 2.0 * M_PI * sqrt( x * x + y * y ) / this->waveLength ) - 4.0 * M_PI * M_PI * x * x / ( this->waveLength * this->waveLength * ( x * x + y * y ) ) * this->amplitude * sin( this->phase + 2.0 * M_PI * sqrt( x * x + y * y ) / this->waveLength ); + return 2.0 * M_PI * x * x / ( this->waveLength * sqrt( x * x + y * y ) * sqrt( x * x + y * y ) * sqrt( x * x + y * y ) ) * this->amplitude * cos( this->phase + 2.0 * M_PI * sqrt( x * x + y * y ) / this->waveLength ) - 4.0 * M_PI * M_PI * x * x / ( this->waveLength * this->waveLength * ( x * x + y * y ) ) * this->amplitude * sin( this->phase + 2.0 * M_PI * sqrt( x * x + y * y ) / this->waveLength ); if( XDiffOrder == 0 && YDiffOrder == 1 ) return 2.0 * M_PI * y / ( this->waveLength * sqrt( x * x + y * y ) ) * this->amplitude * cos( this->phase + 2.0 * M_PI * sqrt( x * x + y * y ) / this->waveLength ); if( XDiffOrder == 0 && YDiffOrder == 2 ) - return 2.0 * M_PI * x * x / ( this->waveLength * sqrt( x * x + y * y ) * sqrt( x * x + y * y ) * sqrt( x * x + y * y ) ) * this->amplitude * cos( this->phase + 2.0 * M_PI * sqrt( x * x + y * y ) / this->waveLength ) - 4.0 * M_PI * M_PI * y * y / ( this->waveLength * this->waveLength * ( x * x + y * y ) ) * this->amplitude * sin( this->phase + 2.0 * M_PI * sqrt( x * x + y * y ) / this->waveLength ); + return 2.0 * M_PI * y * y / ( this->waveLength * sqrt( x * x + y * y ) * sqrt( x * x + y * y ) * sqrt( x * x + y * y ) ) * this->amplitude * cos( this->phase + 2.0 * M_PI * sqrt( x * x + y * y ) / this->waveLength ) - 4.0 * M_PI * M_PI * y * y / ( this->waveLength * this->waveLength * ( x * x + y * y ) ) * this->amplitude * sin( this->phase + 2.0 * M_PI * sqrt( x * x + y * y ) / this->waveLength ); return 0.0; } diff --git a/src/implementation/functions/tnlTestFunction_impl.cu b/src/implementation/functions/tnlTestFunction_impl.cu index 7304a74c817a7a4995104f73d9b75ab30e42df08..69354815a11103d8134d35d27e97e323bc3f314b 100644 --- a/src/implementation/functions/tnlTestFunction_impl.cu +++ b/src/implementation/functions/tnlTestFunction_impl.cu @@ -28,9 +28,9 @@ template class tnlTestFunction< 1, double, tnlCuda >; template class tnlTestFunction< 2, double, tnlCuda >; template class tnlTestFunction< 3, double, tnlCuda >; -template class tnlTestFunction< 1, long double, tnlCuda >; +/*template class tnlTestFunction< 1, long double, tnlCuda >; template class tnlTestFunction< 2, long double, tnlCuda >; -template class tnlTestFunction< 3, long double, tnlCuda >; +template class tnlTestFunction< 3, long double, tnlCuda >;*/ #endif #endif diff --git a/src/implementation/functions/tnlTestFunction_impl.h b/src/implementation/functions/tnlTestFunction_impl.h index 912a6da281455d0d81ddd6e60d4a604db248d82f..901415b6da2feb65b6cf0db86fe72f77456551a6 100644 --- a/src/implementation/functions/tnlTestFunction_impl.h +++ b/src/implementation/functions/tnlTestFunction_impl.h @@ -78,7 +78,7 @@ template< int FunctionDimensions, bool tnlTestFunction< FunctionDimensions, Real, Device >:: setupFunction( const tnlParameterContainer& parameters, - const tnlString& prefix ) + const tnlString& prefix ) { FunctionType* auxFunction = new FunctionType; if( ! auxFunction->setup( parameters, prefix ) ) @@ -155,6 +155,42 @@ setup( const tnlParameterContainer& parameters, return false; } +template< int FunctionDimensions, + typename Real, + typename Device > +const tnlTestFunction< FunctionDimensions, Real, Device >& +tnlTestFunction< FunctionDimensions, Real, Device >:: +operator = ( const tnlTestFunction& function ) +{ + this->functionType = function.functionType; + this->timeDependence = function.timeDependence; + this->timeScale = function.timeScale; + + abort(); + + if( Device::DeviceType == ( int ) tnlHostDevice ) + { + switch( this->functionType ) + { + case constant: + //this->function = new tnlConstantFunction< FunctionDimensions, Real >; + //*this->function = * ( ( tnlConstantFunction< FunctionDimensions, Real >*) function.function ); + //.... + // + ; + } + + } + if( Device::DeviceType == ( int ) tnlCudaDevice ) + { + /*this->function = tnlCuda::passToDevice( *auxFunction ); + delete auxFunction; + if( ! checkCudaDevice ) + return false;*/ + } + +} + template< int FunctionDimensions, typename Real, typename Device > @@ -326,9 +362,9 @@ extern template class tnlTestFunction< 1, double, tnlCuda >; extern template class tnlTestFunction< 2, double, tnlCuda >; extern template class tnlTestFunction< 3, double, tnlCuda >; -extern template class tnlTestFunction< 1, long double, tnlCuda >; +/*extern template class tnlTestFunction< 1, long double, tnlCuda >; extern template class tnlTestFunction< 2, long double, tnlCuda >; -extern template class tnlTestFunction< 3, long double, tnlCuda >; +extern template class tnlTestFunction< 3, long double, tnlCuda >;*/ #endif #endif diff --git a/src/implementation/matrices/tnlMatrixSetter_impl.h b/src/implementation/matrices/tnlMatrixSetter_impl.h index b8a808013f2b9879d5c86b46e4a307fa7cab5462..d1e310eea68b807fe98f94a9a702887db8cb6bf5 100644 --- a/src/implementation/matrices/tnlMatrixSetter_impl.h +++ b/src/implementation/matrices/tnlMatrixSetter_impl.h @@ -54,8 +54,8 @@ template< int Dimensions, void tnlMatrixSetter< tnlGrid< Dimensions, Real, Device, Index >, DifferentialOperator, BoundaryConditions, RowLengthsVector >:: getRowLengths( const MeshType& mesh, - DifferentialOperator& differentialOperator, - BoundaryConditions& boundaryConditions, + const DifferentialOperator& differentialOperator, + const BoundaryConditions& boundaryConditions, RowLengthsVector& rowLengths ) const { TraversalUserData userData( differentialOperator, boundaryConditions, rowLengths ); diff --git a/src/implementation/mesh/tnlGrid1D_impl.h b/src/implementation/mesh/tnlGrid1D_impl.h index 2977743cd4a955ed81b32558763bcdfeaf750d90..9ae9018b29b2ecf451e5b5da6ac7317b2260d0f8 100644 --- a/src/implementation/mesh/tnlGrid1D_impl.h +++ b/src/implementation/mesh/tnlGrid1D_impl.h @@ -325,7 +325,7 @@ Vertex tnlGrid< 1, Real, Device, Index >::getCellCenter( const IndexType& cellIn cerr << " cellIndex = " << cellIndex << " this->getNumberOfCells() = " << this->getNumberOfCells() << " this->getName() " << this->getName(); ); - return this->getCellCenter( this->getCellCoordinates( cellIndex ) ); + return this->getCellCenter< VertexType >( this->getCellCoordinates( cellIndex ) ); } template< typename Real, @@ -547,7 +547,7 @@ bool tnlGrid< 1, Real, Device, Index > :: write( const MeshFunction& function, { for( IndexType i = 0; i < getDimensions(). x(); i++ ) { - VertexType v = this->getCellCenter( CoordinatesType( i ) ); + VertexType v = this->getCellCenter< VertexType >( CoordinatesType( i ) ); tnlGnuplotWriter::write( file, v ); tnlGnuplotWriter::write( file, function[ this->getCellIndex( i ) ] ); file << endl; diff --git a/src/implementation/mesh/tnlGrid2D_impl.h b/src/implementation/mesh/tnlGrid2D_impl.h index 970069d6005ec80de5ca0ce37f8821502c1a5dff..c7ba6729a3c2a977aa601e704a59fb057fac0bb7 100644 --- a/src/implementation/mesh/tnlGrid2D_impl.h +++ b/src/implementation/mesh/tnlGrid2D_impl.h @@ -512,7 +512,7 @@ Vertex tnlGrid< 2, Real, Device, Index >::getCellCenter( const IndexType& cellIn cerr << " cellIndex = " << cellIndex << " this->getNumberOfCells() = " << this->getNumberOfCells() << " this->getName() " << this->getName(); ); - return this->getCellCenter( this->getCellCoordinates( cellIndex ) ); + return this->getCellCenter< VertexType >( this->getCellCoordinates( cellIndex ) ); } template< typename Real, @@ -524,14 +524,14 @@ template< int nx, int ny, typename Vertex > #endif Vertex tnlGrid< 2, Real, Device, Index > :: getFaceCenter( const CoordinatesType& faceCoordinates ) const { - tnlStaticAssert( nx >= 0 && ny >= 0 && nx + ny = 1, "Wrong template parameters nx or ny." ); + tnlStaticAssert( nx >= 0 && ny >= 0 && nx + ny == 1, "Wrong template parameters nx or ny." ); if( nx ) { - tnlAssert( faceCoordinates.x() >= 0 && faceCoordinates.x() < this->getDimensions.x() + 1, + tnlAssert( faceCoordinates.x() >= 0 && faceCoordinates.x() < this->getDimensions().x() + 1, cerr << "faceCoordinates.x() = " << faceCoordinates.x() << " this->getDimensions().x() + 1 = " << this->getDimensions().x() + 1 << " this->getName() = " << this->getName(); ); - tnlAssert( faceCoordinates.y() >= 0 && faceCoordinates.y() < this->getDimensions.y(), + tnlAssert( faceCoordinates.y() >= 0 && faceCoordinates.y() < this->getDimensions().y(), cerr << "faceCoordinates.y() = " << faceCoordinates.y() << " this->getDimensions().y() = " << this->getDimensions().y() << " this->getName() = " << this->getName(); ); @@ -544,7 +544,7 @@ Vertex tnlGrid< 2, Real, Device, Index > :: getFaceCenter( const CoordinatesType cerr << "faceCoordinates.x() = " << faceCoordinates.x() << " this->getDimensions().x() = " << this->getDimensions().x() << " this->getName() = " << this->getName(); ); - tnlAssert( faceCoordinates.y() >= 0 && faceCoordinates.y() < this->getDimensions.y() + 1, + tnlAssert( faceCoordinates.y() >= 0 && faceCoordinates.y() < this->getDimensions().y() + 1, cerr << "faceCoordinates.y() = " << faceCoordinates.y() << " this->getDimensions().y() + 1 = " << this->getDimensions().y() + 1 << " this->getName() = " << this->getName(); ); @@ -849,11 +849,11 @@ bool tnlGrid< 2, Real, Device, Index > :: writeMesh( const tnlString& fileName, for( Index j = 0; j < this -> dimensions. y(); j ++ ) { file << "draw( "; - v = this -> getVertex( CoordinatesType( 0, j ) ); + v = this -> getVertex< VertexType >( CoordinatesType( 0, j ) ); file << "( " << v. x() << ", " << v. y() << " )"; for( Index i = 0; i < this -> dimensions. x(); i ++ ) { - v = this -> getVertex( CoordinatesType( i + 1, j ) ); + v = this -> getVertex< VertexType >( CoordinatesType( i + 1, j ) ); file << "--( " << v. x() << ", " << v. y() << " )"; } file << " );" << endl; @@ -862,11 +862,11 @@ bool tnlGrid< 2, Real, Device, Index > :: writeMesh( const tnlString& fileName, for( Index i = 0; i < this -> dimensions. x(); i ++ ) { file << "draw( "; - v = this -> getVertex( CoordinatesType( i, 0 ) ); + v = this -> getVertex< VertexType >( CoordinatesType( i, 0 ) ); file << "( " << v. x() << ", " << v. y() << " )"; for( Index j = 0; j < this -> dimensions. y(); j ++ ) { - v = this -> getVertex( CoordinatesType( i, j + 1 ) ); + v = this -> getVertex< VertexType >( CoordinatesType( i, j + 1 ) ); file << "--( " << v. x() << ", " << v. y() << " )"; } file << " );" << endl; @@ -876,7 +876,7 @@ bool tnlGrid< 2, Real, Device, Index > :: writeMesh( const tnlString& fileName, for( Index i = 0; i < this -> dimensions. x(); i ++ ) for( Index j = 0; j < this -> dimensions. y(); j ++ ) { - v = this -> getCellCenter( CoordinatesType( i, j ) ); + v = this -> getCellCenter< VertexType >( CoordinatesType( i, j ) ); file << "label( scale(0.33) * Label( \"$" << setprecision( 3 ) << cellMeasure << setprecision( 8 ) << "$\" ), ( " << v. x() << ", " << v. y() << " ), S );" << endl; } @@ -931,8 +931,9 @@ bool tnlGrid< 2, Real, Device, Index > :: writeMesh( const tnlString& fileName, << c. x() + v. x() << ", " << c.y() + v. y() << " ), Arrow(size=1mm),p=blue);" << endl; */ } - + return true; } + return false; } template< typename Real, @@ -962,7 +963,7 @@ bool tnlGrid< 2, Real, Device, Index > :: write( const MeshFunction& function, { for( IndexType i = 0; i < getDimensions(). x(); i++ ) { - VertexType v = this->getCellCenter( CoordinatesType( i, j ) ); + VertexType v = this->getCellCenter< VertexType >( CoordinatesType( i, j ) ); tnlGnuplotWriter::write( file, v ); tnlGnuplotWriter::write( file, function[ this->getCellIndex( CoordinatesType( i, j ) ) ] ); file << endl; diff --git a/src/implementation/mesh/tnlGrid3D_impl.h b/src/implementation/mesh/tnlGrid3D_impl.h index 23e93dc26b89d8c5c1e29910dc49e58b8c19a6b4..d0adc76ade5d82ab88517f5efaa0d1c6f3c07f96 100644 --- a/src/implementation/mesh/tnlGrid3D_impl.h +++ b/src/implementation/mesh/tnlGrid3D_impl.h @@ -830,7 +830,7 @@ Vertex tnlGrid< 3, Real, Device, Index >::getCellCenter( const IndexType& cellIn cerr << " cellIndex = " << cellIndex << " this->getNumberOfCells() = " << this->getNumberOfCells() << " this->getName() " << this->getName(); ); - return this->getCellCenter( this->getCellCoordinates( cellIndex ) ); + return this->getCellCenter< VertexType >( this->getCellCoordinates( cellIndex ) ); } template< typename Real, @@ -842,18 +842,18 @@ template< int nx, int ny, int nz, typename Vertex > #endif Vertex tnlGrid< 3, Real, Device, Index > :: getFaceCenter( const CoordinatesType& faceCoordinates ) const { - tnlStaticAssert( nx >= 0 && ny >= 0 && nz >= 0 && nx + ny + nz = 1, "Wrong template parameters nx or ny or nz." ); + tnlStaticAssert( nx >= 0 && ny >= 0 && nz >= 0 && nx + ny + nz == 1, "Wrong template parameters nx or ny or nz." ); if( nx ) { - tnlAssert( faceCoordinates.x() >= 0 && faceCoordinates.x() < this->getDimensions.x() + 1, + tnlAssert( faceCoordinates.x() >= 0 && faceCoordinates.x() < this->getDimensions().x() + 1, cerr << "faceCoordinates.x() = " << faceCoordinates.x() << " this->getDimensions().x() + 1 = " << this->getDimensions().x() + 1 << " this->getName() = " << this->getName(); ); - tnlAssert( faceCoordinates.y() >= 0 && faceCoordinates.y() < this->getDimensions.y(), + tnlAssert( faceCoordinates.y() >= 0 && faceCoordinates.y() < this->getDimensions().y(), cerr << "faceCoordinates.y() = " << faceCoordinates.y() << " this->getDimensions().y() = " << this->getDimensions().y() << " this->getName() = " << this->getName(); ); - tnlAssert( faceCoordinates.z() >= 0 && faceCoordinates.z() < this->getDimensions.z(), + tnlAssert( faceCoordinates.z() >= 0 && faceCoordinates.z() < this->getDimensions().z(), cerr << "faceCoordinates.z() = " << faceCoordinates.z() << " this->getDimensions().z() = " << this->getDimensions().z() << " this->getName() = " << this->getName(); ); @@ -863,15 +863,15 @@ Vertex tnlGrid< 3, Real, Device, Index > :: getFaceCenter( const CoordinatesType } if( ny ) { - tnlAssert( faceCoordinates.x() >= 0 && faceCoordinates.x() < this->getDimensions.x(), + tnlAssert( faceCoordinates.x() >= 0 && faceCoordinates.x() < this->getDimensions().x(), cerr << "faceCoordinates.x() = " << faceCoordinates.x() << " this->getDimensions().x() = " << this->getDimensions().x() << " this->getName() = " << this->getName(); ); - tnlAssert( faceCoordinates.y() >= 0 && faceCoordinates.y() < this->getDimensions.y() + 1, + tnlAssert( faceCoordinates.y() >= 0 && faceCoordinates.y() < this->getDimensions().y() + 1, cerr << "faceCoordinates.y() = " << faceCoordinates.y() << " this->getDimensions().y() + 1 = " << this->getDimensions().y() + 1 << " this->getName() = " << this->getName(); ); - tnlAssert( faceCoordinates.z() >= 0 && faceCoordinates.z() < this->getDimensions.z(), + tnlAssert( faceCoordinates.z() >= 0 && faceCoordinates.z() < this->getDimensions().z(), cerr << "faceCoordinates.z() = " << faceCoordinates.z() << " this->getDimensions().z() = " << this->getDimensions().z() << " this->getName() = " << this->getName(); ); @@ -882,15 +882,15 @@ Vertex tnlGrid< 3, Real, Device, Index > :: getFaceCenter( const CoordinatesType } if( nz ) { - tnlAssert( faceCoordinates.x() >= 0 && faceCoordinates.x() < this->getDimensions.x(), + tnlAssert( faceCoordinates.x() >= 0 && faceCoordinates.x() < this->getDimensions().x(), cerr << "faceCoordinates.x() = " << faceCoordinates.x() << " this->getDimensions().x() = " << this->getDimensions().x() << " this->getName() = " << this->getName(); ); - tnlAssert( faceCoordinates.y() >= 0 && faceCoordinates.y() < this->getDimensions.y(), + tnlAssert( faceCoordinates.y() >= 0 && faceCoordinates.y() < this->getDimensions().y(), cerr << "faceCoordinates.y() = " << faceCoordinates.y() << " this->getDimensions().y()= " << this->getDimensions().y() << " this->getName() = " << this->getName(); ); - tnlAssert( faceCoordinates.z() >= 0 && faceCoordinates.z() < this->getDimensions.z() + 1, + tnlAssert( faceCoordinates.z() >= 0 && faceCoordinates.z() < this->getDimensions().z() + 1, cerr << "faceCoordinates.z() = " << faceCoordinates.z() << " this->getDimensions().z() + 1 = " << this->getDimensions().z() + 1 << " this->getName() = " << this->getName(); ); @@ -909,18 +909,18 @@ template< int dx, int dy, int dz, typename Vertex > #endif Vertex tnlGrid< 3, Real, Device, Index > :: getEdgeCenter( const CoordinatesType& edgeCoordinates ) const { - tnlStaticAssert( dx >= 0 && dy >= 0 && dz >= 0 && dx + dy + dz = 1, "Wrong template parameters nx or ny or nz." ); + tnlStaticAssert( dx >= 0 && dy >= 0 && dz >= 0 && dx + dy + dz == 1, "Wrong template parameters nx or ny or nz." ); if( dx ) { - tnlAssert( edgeCoordinates.x() >= 0 && edgeCoordinates.x() < this->getDimensions.x(), + tnlAssert( edgeCoordinates.x() >= 0 && edgeCoordinates.x() < this->getDimensions().x(), cerr << "edgeCoordinates.x() = " << edgeCoordinates.x() << " this->getDimensions().x() = " << this->getDimensions().x() << " this->getName() = " << this->getName(); ); - tnlAssert( edgeCoordinates.y() >= 0 && edgeCoordinates.y() < this->getDimensions.y() + 1, + tnlAssert( edgeCoordinates.y() >= 0 && edgeCoordinates.y() < this->getDimensions().y() + 1, cerr << "edgeCoordinates.y() = " << edgeCoordinates.y() << " this->getDimensions().y() + 1 = " << this->getDimensions().y() + 1 << " this->getName() = " << this->getName(); ); - tnlAssert( edgeCoordinates.z() >= 0 && edgeCoordinates.z() < this->getDimensions.z() + 1, + tnlAssert( edgeCoordinates.z() >= 0 && edgeCoordinates.z() < this->getDimensions().z() + 1, cerr << "edgeCoordinates.z() = " << edgeCoordinates.z() << " this->getDimensions().z() + 1 = " << this->getDimensions().z() + 1 << " this->getName() = " << this->getName(); ); @@ -930,15 +930,15 @@ Vertex tnlGrid< 3, Real, Device, Index > :: getEdgeCenter( const CoordinatesType } if( dy ) { - tnlAssert( edgeCoordinates.x() >= 0 && edgeCoordinates.x() < this->getDimensions.x() + 1, + tnlAssert( edgeCoordinates.x() >= 0 && edgeCoordinates.x() < this->getDimensions().x() + 1, cerr << "edgeCoordinates.x() = " << edgeCoordinates.x() << " this->getDimensions().x() + 1 = " << this->getDimensions().x() + 1 << " this->getName() = " << this->getName(); ); - tnlAssert( edgeCoordinates.y() >= 0 && edgeCoordinates.y() < this->getDimensions.y(), + tnlAssert( edgeCoordinates.y() >= 0 && edgeCoordinates.y() < this->getDimensions().y(), cerr << "edgeCoordinates.y() = " << edgeCoordinates.y() << " this->getDimensions().y() = " << this->getDimensions().y() << " this->getName() = " << this->getName(); ); - tnlAssert( edgeCoordinates.z() >= 0 && edgeCoordinates.z() < this->getDimensions.z() + 1, + tnlAssert( edgeCoordinates.z() >= 0 && edgeCoordinates.z() < this->getDimensions().z() + 1, cerr << "edgeCoordinates.z() = " << edgeCoordinates.z() << " this->getDimensions().z() + 1 = " << this->getDimensions().z() + 1 << " this->getName() = " << this->getName(); ); @@ -948,15 +948,15 @@ Vertex tnlGrid< 3, Real, Device, Index > :: getEdgeCenter( const CoordinatesType } if( dz ) { - tnlAssert( edgeCoordinates.x() >= 0 && edgeCoordinates.x() < this->getDimensions.x() + 1, + tnlAssert( edgeCoordinates.x() >= 0 && edgeCoordinates.x() < this->getDimensions().x() + 1, cerr << "edgeCoordinates.x() = " << edgeCoordinates.x() << " this->getDimensions().x() = " << this->getDimensions().x() << " this->getName() = " << this->getName(); ); - tnlAssert( edgeCoordinates.y() >= 0 && edgeCoordinates.y() < this->getDimensions.y() + 1, + tnlAssert( edgeCoordinates.y() >= 0 && edgeCoordinates.y() < this->getDimensions().y() + 1, cerr << "edgeCoordinates.y() = " << edgeCoordinates.y() << " this->getDimensions().y() + 1 = " << this->getDimensions().y() + 1 << " this->getName() = " << this->getName(); ); - tnlAssert( edgeCoordinates.z() >= 0 && edgeCoordinates.z() < this->getDimensions.z(), + tnlAssert( edgeCoordinates.z() >= 0 && edgeCoordinates.z() < this->getDimensions().z(), cerr << "edgeCoordinates.z() = " << edgeCoordinates.z() << " this->getDimensions().z() = " << this->getDimensions().z() << " this->getName() = " << this->getName(); ); @@ -1092,7 +1092,7 @@ __device__ __host__ #endif bool tnlGrid< 3, Real, Device, Index > :: isBoundaryFace( const CoordinatesType& faceCoordinates ) const { - tnlStaticAssert( nx >= 0 && ny >= 0 && nz >=0 && nx + ny == 1, "Wrong template parameters nx or ny." ); + tnlStaticAssert( nx >= 0 && ny >= 0 && nz >=0 && nx + ny + nz == 1, "Wrong template parameters nx or ny or nz." ); if( nx ) { tnlAssert( faceCoordinates.x() >= 0 && faceCoordinates.x() < this->getDimensions().x() + 1, @@ -1123,22 +1123,22 @@ bool tnlGrid< 3, Real, Device, Index > :: isBoundaryFace( const CoordinatesType& } if( nz ) { - tnlAssert( faceCoordinates.x() >= 0 && faceCoordinates.x() < this->getDimensions.x(), + tnlAssert( faceCoordinates.x() >= 0 && faceCoordinates.x() < this->getDimensions().x(), cerr << "faceCoordinates.x() = " << faceCoordinates.x() << " this->getDimensions().x() = " << this->getDimensions().x() << " this->getName() = " << this->getName(); ); - tnlAssert( faceCoordinates.y() >= 0 && faceCoordinates.y() < this->getDimensions.y(), + tnlAssert( faceCoordinates.y() >= 0 && faceCoordinates.y() < this->getDimensions().y(), cerr << "faceCoordinates.y() = " << faceCoordinates.y() << " this->getDimensions().y()= " << this->getDimensions().y() << " this->getName() = " << this->getName(); ); - tnlAssert( faceCoordinates.z() >= 0 && faceCoordinates.z() < this->getDimensions.z() + 1, + tnlAssert( faceCoordinates.z() >= 0 && faceCoordinates.z() < this->getDimensions().z() + 1, cerr << "faceCoordinates.z() = " << faceCoordinates.z() << " this->getDimensions().z() + 1 = " << this->getDimensions().z() + 1 << " this->getName() = " << this->getName(); ); if( faceCoordinates.z() == 0 || faceCoordinates.z() == this->getDimensions().z() ) return true; return false; - } + } } template< typename Real, @@ -1150,18 +1150,18 @@ __device__ __host__ #endif bool tnlGrid< 3, Real, Device, Index >::isBoundaryEdge( const CoordinatesType& edgeCoordinates ) const { - tnlStaticAssert( dx >= 0 && dy >= 0 && dz >= 0 && dx + dy + dz = 1, "Wrong template parameters nx or ny or nz." ); + tnlStaticAssert( dx >= 0 && dy >= 0 && dz >= 0 && dx + dy + dz == 1, "Wrong template parameters nx or ny or nz." ); if( dx ) { - tnlAssert( edgeCoordinates.x() >= 0 && edgeCoordinates.x() < this->getDimensions.x(), + tnlAssert( edgeCoordinates.x() >= 0 && edgeCoordinates.x() < this->getDimensions().x(), cerr << "edgeCoordinates.x() = " << edgeCoordinates.x() << " this->getDimensions().x() = " << this->getDimensions().x() << " this->getName() = " << this->getName(); ); - tnlAssert( edgeCoordinates.y() >= 0 && edgeCoordinates.y() < this->getDimensions.y() + 1, + tnlAssert( edgeCoordinates.y() >= 0 && edgeCoordinates.y() < this->getDimensions().y() + 1, cerr << "edgeCoordinates.y() = " << edgeCoordinates.y() << " this->getDimensions().y() + 1 = " << this->getDimensions().y() + 1 << " this->getName() = " << this->getName(); ); - tnlAssert( edgeCoordinates.z() >= 0 && edgeCoordinates.z() < this->getDimensions.z() + 1, + tnlAssert( edgeCoordinates.z() >= 0 && edgeCoordinates.z() < this->getDimensions().z() + 1, cerr << "edgeCoordinates.z() = " << edgeCoordinates.z() << " this->getDimensions().z() + 1 = " << this->getDimensions().z() + 1 << " this->getName() = " << this->getName(); ); @@ -1172,15 +1172,15 @@ bool tnlGrid< 3, Real, Device, Index >::isBoundaryEdge( const CoordinatesType& e } if( dy ) { - tnlAssert( edgeCoordinates.x() >= 0 && edgeCoordinates.x() < this->getDimensions.x() + 1, + tnlAssert( edgeCoordinates.x() >= 0 && edgeCoordinates.x() < this->getDimensions().x() + 1, cerr << "edgeCoordinates.x() = " << edgeCoordinates.x() << " this->getDimensions().x() + 1 = " << this->getDimensions().x() + 1 << " this->getName() = " << this->getName(); ); - tnlAssert( edgeCoordinates.y() >= 0 && edgeCoordinates.y() < this->getDimensions.y(), + tnlAssert( edgeCoordinates.y() >= 0 && edgeCoordinates.y() < this->getDimensions().y(), cerr << "edgeCoordinates.y() = " << edgeCoordinates.y() << " this->getDimensions().y() = " << this->getDimensions().y() << " this->getName() = " << this->getName(); ); - tnlAssert( edgeCoordinates.z() >= 0 && edgeCoordinates.z() < this->getDimensions.z() + 1, + tnlAssert( edgeCoordinates.z() >= 0 && edgeCoordinates.z() < this->getDimensions().z() + 1, cerr << "edgeCoordinates.z() = " << edgeCoordinates.z() << " this->getDimensions().z() + 1 = " << this->getDimensions().z() + 1 << " this->getName() = " << this->getName(); ); @@ -1192,15 +1192,15 @@ bool tnlGrid< 3, Real, Device, Index >::isBoundaryEdge( const CoordinatesType& e } if( dz ) { - tnlAssert( edgeCoordinates.x() >= 0 && edgeCoordinates.x() < this->getDimensions.x() + 1, + tnlAssert( edgeCoordinates.x() >= 0 && edgeCoordinates.x() < this->getDimensions().x() + 1, cerr << "edgeCoordinates.x() = " << edgeCoordinates.x() << " this->getDimensions().x() = " << this->getDimensions().x() << " this->getName() = " << this->getName(); ); - tnlAssert( edgeCoordinates.y() >= 0 && edgeCoordinates.y() < this->getDimensions.y() + 1, + tnlAssert( edgeCoordinates.y() >= 0 && edgeCoordinates.y() < this->getDimensions().y() + 1, cerr << "edgeCoordinates.y() = " << edgeCoordinates.y() << " this->getDimensions().y() + 1 = " << this->getDimensions().y() + 1 << " this->getName() = " << this->getName(); ); - tnlAssert( edgeCoordinates.z() >= 0 && edgeCoordinates.z() < this->getDimensions.z(), + tnlAssert( edgeCoordinates.z() >= 0 && edgeCoordinates.z() < this->getDimensions().z(), cerr << "edgeCoordinates.z() = " << edgeCoordinates.z() << " this->getDimensions().z() = " << this->getDimensions().z() << " this->getName() = " << this->getName(); ); @@ -1404,7 +1404,7 @@ bool tnlGrid< 3, Real, Device, Index > :: write( const MeshFunction& function, { for( IndexType i = 0; i < getDimensions(). x(); i++ ) { - VertexType v = this -> getCellCenter( CoordinatesType( i, j, k ) ); + VertexType v = this -> getCellCenter< VertexType >( CoordinatesType( i, j, k ) ); tnlGnuplotWriter::write( file, v ); tnlGnuplotWriter::write( file, function[ this->getCellIndex( CoordinatesType( i, j, k ) ) ] ); file << endl; diff --git a/src/implementation/mesh/tnlTraversal_Grid1D_impl.h b/src/implementation/mesh/tnlTraversal_Grid1D_impl.h index 99259fa78ed37eb1b8855479c88efcc1acfe05b0..b17f5133d4f67dac3d930980d38fc6ac2ea02afd 100644 --- a/src/implementation/mesh/tnlTraversal_Grid1D_impl.h +++ b/src/implementation/mesh/tnlTraversal_Grid1D_impl.h @@ -35,13 +35,22 @@ processEntities( const GridType& grid, */ CoordinatesType coordinates; const IndexType& xSize = grid.getDimensions().x(); - for( coordinates.x() = 0; coordinates.x() < xSize; coordinates.x() ++ ) + + /**** + * Boundary conditions + */ + coordinates.x() = 0; + boundaryEntitiesProcessor.template processCell( grid, userData, 0, coordinates ); + coordinates.x() = xSize - 1; + boundaryEntitiesProcessor.template processCell( grid, userData, xSize - 1, coordinates ); + + /**** + * Interior cells + */ + for( coordinates.x() = 1; coordinates.x() < xSize-1; coordinates.x() ++ ) { const IndexType index = grid.getCellIndex( coordinates ); - if( grid.isBoundaryCell( coordinates ) ) - boundaryEntitiesProcessor.template processCell( grid, userData, index, coordinates ); - else - interiorEntitiesProcessor.template processCell( grid, userData, index, coordinates ); + interiorEntitiesProcessor.template processCell( grid, userData, index, coordinates ); } } diff --git a/src/implementation/mesh/tnlTraversal_Grid2D_impl.h b/src/implementation/mesh/tnlTraversal_Grid2D_impl.h index 2f1bb1ee02bd4aaa180d1aafc893d918dab20e55..a5e6f346090b4f5189d7d103c89b359e70f13e97 100644 --- a/src/implementation/mesh/tnlTraversal_Grid2D_impl.h +++ b/src/implementation/mesh/tnlTraversal_Grid2D_impl.h @@ -37,17 +37,36 @@ processEntities( const GridType& grid, CoordinatesType coordinates; const IndexType& xSize = grid.getDimensions().x(); const IndexType& ySize = grid.getDimensions().y(); + + /**** + * Boundary conditions + */ + for( coordinates.x() = 0; coordinates.x() < xSize; coordinates.x() ++ ) + { + coordinates.y() = 0; + boundaryEntitiesProcessor.template processCell( grid, userData, grid.getCellIndex( coordinates ), coordinates ); + coordinates.y() = ySize - 1; + boundaryEntitiesProcessor.template processCell( grid, userData, grid.getCellIndex( coordinates ), coordinates ); + } + for( coordinates.y() = 1; coordinates.y() < ySize - 1; coordinates.y() ++ ) + { + coordinates.x() = 0; + boundaryEntitiesProcessor.template processCell( grid, userData, grid.getCellIndex( coordinates ), coordinates ); + coordinates.x() = xSize - 1; + boundaryEntitiesProcessor.template processCell( grid, userData, grid.getCellIndex( coordinates ), coordinates ); + } + + /**** + * Interior cells + */ #ifdef HAVE_OPENMP //#pragma omp parallel for #endif - for( coordinates.y() = 0; coordinates.y() < ySize; coordinates.y() ++ ) - for( coordinates.x() = 0; coordinates.x() < xSize; coordinates.x() ++ ) + for( coordinates.y() = 1; coordinates.y() < ySize - 1; coordinates.y() ++ ) + for( coordinates.x() = 1; coordinates.x() < xSize - 1; coordinates.x() ++ ) { const IndexType index = grid.getCellIndex( coordinates ); - if( grid.isBoundaryCell( coordinates ) ) - boundaryEntitiesProcessor.template processCell( grid, userData, index, coordinates ); - else - interiorEntitiesProcessor.template processCell( grid, userData, index, coordinates ); + interiorEntitiesProcessor.template processCell( grid, userData, index, coordinates ); } } diff --git a/src/implementation/mesh/tnlTraversal_Grid3D_impl.h b/src/implementation/mesh/tnlTraversal_Grid3D_impl.h index d0f21814f66d3f7096368aa1667c2e18b8dd3d75..e64353b0f0c336da069e049fc6f5124cbd7eee21 100644 --- a/src/implementation/mesh/tnlTraversal_Grid3D_impl.h +++ b/src/implementation/mesh/tnlTraversal_Grid3D_impl.h @@ -37,6 +37,38 @@ processEntities( const GridType& grid, const IndexType& xSize = grid.getDimensions().x(); const IndexType& ySize = grid.getDimensions().y(); const IndexType& zSize = grid.getDimensions().z(); + + /**** + * Boundary conditions + */ + for( coordinates.y() = 0; coordinates.y() < ySize; coordinates.y() ++ ) + for( coordinates.x() = 0; coordinates.x() < xSize; coordinates.x() ++ ) + { + coordinates.z() = 0; + boundaryEntitiesProcessor.template processCell( grid, userData, grid.getCellIndex( coordinates ), coordinates ); + coordinates.z() = zSize - 1; + boundaryEntitiesProcessor.template processCell( grid, userData, grid.getCellIndex( coordinates ), coordinates ); + } + + for( coordinates.z() = 0; coordinates.z() < zSize; coordinates.z() ++ ) + for( coordinates.x() = 0; coordinates.x() < xSize; coordinates.x() ++ ) + { + coordinates.y() = 0; + boundaryEntitiesProcessor.template processCell( grid, userData, grid.getCellIndex( coordinates ), coordinates ); + coordinates.y() = ySize - 1; + boundaryEntitiesProcessor.template processCell( grid, userData, grid.getCellIndex( coordinates ), coordinates ); + } + + for( coordinates.z() = 0; coordinates.z() < zSize; coordinates.z() ++ ) + for( coordinates.y() = 0; coordinates.y() < ySize; coordinates.y() ++ ) + { + coordinates.x() = 0; + boundaryEntitiesProcessor.template processCell( grid, userData, grid.getCellIndex( coordinates ), coordinates ); + coordinates.x() = xSize - 1; + boundaryEntitiesProcessor.template processCell( grid, userData, grid.getCellIndex( coordinates ), coordinates ); + } + + #ifdef HAVE_OPENMP //#pragma omp parallel for #endif @@ -45,10 +77,7 @@ processEntities( const GridType& grid, for( coordinates.x() = 0; coordinates.x() < xSize; coordinates.x() ++ ) { const IndexType index = grid.getCellIndex( coordinates ); - if( grid.isBoundaryCell( coordinates ) ) - boundaryEntitiesProcessor.template processCell( grid, userData, index, coordinates ); - else - interiorEntitiesProcessor.template processCell( grid, userData, index, coordinates ); + interiorEntitiesProcessor.template processCell( grid, userData, index, coordinates ); } } diff --git a/src/implementation/operators/diffusion/tnlExactLinearDiffusion_impl.h b/src/implementation/operators/diffusion/tnlExactLinearDiffusion_impl.h index fa004a3eff63a7dac6b9b84c3e2363c69ab4b916..921c6d71454fc96e0ec977fe1e7bf5e44097c992 100644 --- a/src/implementation/operators/diffusion/tnlExactLinearDiffusion_impl.h +++ b/src/implementation/operators/diffusion/tnlExactLinearDiffusion_impl.h @@ -32,7 +32,7 @@ getValue( const Function& function, const Vertex& v, const Real& time ) { - return function.template getValue< 2 >( v, time ); + return function.template getValue< 2, 0, 0, Vertex >( v, time ); } tnlString @@ -49,8 +49,8 @@ getValue( const Function& function, const Vertex& v, const Real& time ) { - return function.template getValue< 2, 0 >( v, time ) + - function.template getValue< 0, 2 >( v, time ); + return function.template getValue< 2, 0, 0, Vertex >( v, time ) + + function.template getValue< 0, 2, 0, Vertex >( v, time ); } tnlString @@ -67,9 +67,9 @@ getValue( const Function& function, const Vertex& v, const Real& time ) { - return function.template getValue< 2, 0, 0 >( v, time ) + - function.template getValue< 0, 2, 0 >( v, time ) + - function.template getValue< 0, 0, 2 >( v, time ); + return function.template getValue< 2, 0, 0, Vertex >( v, time ) + + function.template getValue< 0, 2, 0, Vertex >( v, time ) + + function.template getValue< 0, 0, 2, Vertex >( v, time ); } diff --git a/src/implementation/operators/diffusion/tnlLinearDiffusion_impl.h b/src/implementation/operators/diffusion/tnlLinearDiffusion_impl.h index 2acc343c26ef8f19fb69487ac86ef157a3e0a1b1..80e0b5be42e11ae64ce8c0de01e1bebc02a38b7f 100644 --- a/src/implementation/operators/diffusion/tnlLinearDiffusion_impl.h +++ b/src/implementation/operators/diffusion/tnlLinearDiffusion_impl.h @@ -81,12 +81,13 @@ updateLinearSystem( const RealType& time, RealType* values, IndexType& rowLength ) const { + const RealType lambdaX = tau * mesh.getHxSquareInverse(); columns[ 0 ] = mesh.getCellXPredecessor( index ); columns[ 1 ] = index; columns[ 2 ] = mesh.getCellXSuccessor( index ); - values[ 0 ] = -tau; - values[ 1 ] = 1.0 + 2.0 * tau; - values[ 2 ] = -tau; + values[ 0 ] = -lambdaX; + values[ 1 ] = 2.0 * lambdaX; + values[ 2 ] = -lambdaX; rowLength = 3; } @@ -170,16 +171,18 @@ updateLinearSystem( const RealType& time, RealType* values, IndexType& rowLength ) const { + const RealType lambdaX = tau * mesh.getHxSquareInverse(); + const RealType lambdaY = tau * mesh.getHySquareInverse(); columns[ 0 ] = mesh.getCellYPredecessor( index ); columns[ 1 ] = mesh.getCellXPredecessor( index ); columns[ 2 ] = index; columns[ 3 ] = mesh.getCellXSuccessor( index ); columns[ 4 ] = mesh.getCellYSuccessor( index ); - values[ 0 ] = -tau; - values[ 1 ] = -tau; - values[ 2 ] = 1.0 + 4.0 * tau; - values[ 3 ] = -tau; - values[ 4 ] = -tau; + values[ 0 ] = -lambdaY; + values[ 1 ] = -lambdaX; + values[ 2 ] = 2.0 * ( lambdaX + lambdaY ); + values[ 3 ] = -lambdaX; + values[ 4 ] = -lambdaY; rowLength = 5; } @@ -266,6 +269,9 @@ updateLinearSystem( const RealType& time, RealType* values, IndexType& rowLength ) const { + const RealType lambdaX = tau * mesh.getHxSquareInverse(); + const RealType lambdaY = tau * mesh.getHySquareInverse(); + const RealType lambdaZ = tau * mesh.getHzSquareInverse(); columns[ 0 ] = mesh.getCellZPredecessor( index ); columns[ 1 ] = mesh.getCellYPredecessor( index ); columns[ 2 ] = mesh.getCellXPredecessor( index ); @@ -273,13 +279,13 @@ updateLinearSystem( const RealType& time, columns[ 4 ] = mesh.getCellXSuccessor( index ); columns[ 5 ] = mesh.getCellYSuccessor( index ); columns[ 6 ] = mesh.getCellZSuccessor( index ); - values[ 0 ] = -tau; - values[ 1 ] = -tau; - values[ 2 ] = -tau; - values[ 3 ] = 1.0 + 6.0 * tau; - values[ 4 ] = -tau; - values[ 5 ] = -tau; - values[ 6 ] = -tau; + values[ 0 ] = -lambdaZ; + values[ 1 ] = -lambdaY; + values[ 2 ] = -lambdaX; + values[ 3 ] = 2.0 * ( lambdaX + lambdaY + lambdaZ ); + values[ 4 ] = -lambdaX; + values[ 5 ] = -lambdaY; + values[ 6 ] = -lambdaZ; rowLength = 7; } diff --git a/src/implementation/operators/tnlDirichletBoundaryConditions_impl.h b/src/implementation/operators/tnlDirichletBoundaryConditions_impl.h index e6dfefa9ca4cc9cc2ac052a546f7309a7740dfef..2367fc85411539e6780e10c0758b0831e15461c7 100644 --- a/src/implementation/operators/tnlDirichletBoundaryConditions_impl.h +++ b/src/implementation/operators/tnlDirichletBoundaryConditions_impl.h @@ -2,21 +2,23 @@ #define TNLDIRICHLETBOUNDARYCONDITIONS_IMPL_H -template< typename MeshReal, +template< int Dimensions, + typename MeshReal, typename Device, typename MeshIndex, typename Function, typename Real, typename Index > bool -tnlDirichletBoundaryConditions< tnlGrid< 1, MeshReal, Device, MeshIndex >, Function, Real, Index >:: +tnlDirichletBoundaryConditions< tnlGrid< Dimensions, MeshReal, Device, MeshIndex >, Function, Real, Index >:: setup( const tnlParameterContainer& parameters, - const tnlString& prefix ) + const tnlString& prefix ) { return function.setup( parameters, prefix ); } -template< typename MeshReal, +template< int Dimensions, + typename MeshReal, typename Device, typename MeshIndex, typename Function, @@ -26,19 +28,20 @@ template< typename MeshReal, __device__ __host__ #endif void -tnlDirichletBoundaryConditions< tnlGrid< 1, MeshReal, Device, MeshIndex >, Function, Real, Index >:: +tnlDirichletBoundaryConditions< tnlGrid< Dimensions, MeshReal, Device, MeshIndex >, Function, Real, Index >:: setBoundaryConditions( const RealType& time, const MeshType& mesh, const IndexType index, const CoordinatesType& coordinates, DofVectorType& u, - DofVectorType& fu ) + DofVectorType& fu ) const { fu[ index ] = 0; - u[ index ] = function.getValue( mesh.getCellCenter( coordinates ), time ); + u[ index ] = function.getValue( mesh.template getCellCenter< VertexType >( coordinates ), time ); } -template< typename MeshReal, +template< int Dimensions, + typename MeshReal, typename Device, typename MeshIndex, typename Function, @@ -48,7 +51,7 @@ template< typename MeshReal, __device__ __host__ #endif Index -tnlDirichletBoundaryConditions< tnlGrid< 1, MeshReal, Device, MeshIndex >, Function, Real, Index >:: +tnlDirichletBoundaryConditions< tnlGrid< Dimensions, MeshReal, Device, MeshIndex >, Function, Real, Index >:: getLinearSystemRowLength( const MeshType& mesh, const IndexType& index, const CoordinatesType& coordinates ) const @@ -56,7 +59,8 @@ getLinearSystemRowLength( const MeshType& mesh, return 1; } -template< typename MeshReal, +template< int Dimensions, + typename MeshReal, typename Device, typename MeshIndex, typename Function, @@ -66,7 +70,7 @@ template< typename MeshReal, __device__ __host__ #endif void -tnlDirichletBoundaryConditions< tnlGrid< 1, MeshReal, Device, MeshIndex >, Function, Real, Index >:: +tnlDirichletBoundaryConditions< tnlGrid< Dimensions, MeshReal, Device, MeshIndex >, Function, Real, Index >:: updateLinearSystem( const RealType& time, const MeshType& mesh, const IndexType& index, @@ -79,176 +83,9 @@ updateLinearSystem( const RealType& time, { columns[ 0 ] = index; values[ 0 ] = 1.0; - b[ index ] = function.getValue( mesh.getCellCenter( coordinates ), time ); + b[ index ] = function.getValue( mesh.template getCellCenter< VertexType >( coordinates ), time ); rowLength = 1; } - -template< typename MeshReal, - typename Device, - typename MeshIndex, - typename Function, - typename Real, - typename Index > -bool -tnlDirichletBoundaryConditions< tnlGrid< 2, MeshReal, Device, MeshIndex >, Function, Real, Index >:: -setup( const tnlParameterContainer& parameters, - const tnlString& prefix ) -{ - return function.setup( parameters, prefix ); -} - - -template< typename MeshReal, - typename Device, - typename MeshIndex, - typename Function, - typename Real, - typename Index > -#ifdef HAVE_CUDA - __device__ __host__ -#endif -void -tnlDirichletBoundaryConditions< tnlGrid< 2, MeshReal, Device, MeshIndex >, Function, Real, Index >:: -setBoundaryConditions( const RealType& time, - const MeshType& mesh, - const IndexType index, - const CoordinatesType& coordinates, - DofVectorType& u, - DofVectorType& fu ) -{ - fu[ index ] = 0; - u[ index ] = function.getValue( mesh.getCellCenter( coordinates ), time ); -} - -template< typename MeshReal, - typename Device, - typename MeshIndex, - typename Function, - typename Real, - typename Index > -#ifdef HAVE_CUDA - __device__ __host__ -#endif -Index -tnlDirichletBoundaryConditions< tnlGrid< 2, MeshReal, Device, MeshIndex >, Function, Real, Index >:: -getLinearSystemRowLength( const MeshType& mesh, - const IndexType& index, - const CoordinatesType& coordinates ) const -{ - return 1; -} - -template< typename MeshReal, - typename Device, - typename MeshIndex, - typename Function, - typename Real, - typename Index > -#ifdef HAVE_CUDA -__device__ __host__ -#endif -void -tnlDirichletBoundaryConditions< tnlGrid< 2, MeshReal, Device, MeshIndex >, Function, Real, Index >:: -updateLinearSystem( const RealType& time, - const MeshType& mesh, - const IndexType& index, - const CoordinatesType& coordinates, - DofVectorType& u, - DofVectorType& b, - IndexType* columns, - RealType* values, - IndexType& rowLength ) const -{ - columns[ 0 ] = index; - values[ 0 ] = 1.0; - b[ index ] = function.getValue( mesh.getCellCenter( coordinates ), time ); - rowLength = 1; -} - - - -template< typename MeshReal, - typename Device, - typename MeshIndex, - typename Function, - typename Real, - typename Index > -bool -tnlDirichletBoundaryConditions< tnlGrid< 3, MeshReal, Device, MeshIndex >, Function, Real, Index >:: -setup( const tnlParameterContainer& parameters, - const tnlString& prefix ) -{ - return function.setup( parameters, prefix ); -} - -template< typename MeshReal, - typename Device, - typename MeshIndex, - typename Function, - typename Real, - typename Index > -#ifdef HAVE_CUDA - __device__ __host__ -#endif -void -tnlDirichletBoundaryConditions< tnlGrid< 3, MeshReal, Device, MeshIndex >, Function, Real, Index >:: -setBoundaryConditions( const RealType& time, - const MeshType& mesh, - const IndexType index, - const CoordinatesType& coordinates, - DofVectorType& u, - DofVectorType& fu ) -{ - fu[ index ] = 0; - u[ index ] = function.getValue( mesh.getCellCenter( coordinates ), time );; -} - -template< typename MeshReal, - typename Device, - typename MeshIndex, - typename Function, - typename Real, - typename Index > -#ifdef HAVE_CUDA - __device__ __host__ -#endif -Index -tnlDirichletBoundaryConditions< tnlGrid< 3, MeshReal, Device, MeshIndex >, Function, Real, Index >:: -getLinearSystemRowLength( const MeshType& mesh, - const IndexType& index, - const CoordinatesType& coordinates ) const -{ - return 1; -} - -template< typename MeshReal, - typename Device, - typename MeshIndex, - typename Function, - typename Real, - typename Index > -#ifdef HAVE_CUDA -__device__ __host__ -#endif -void -tnlDirichletBoundaryConditions< tnlGrid< 3, MeshReal, Device, MeshIndex >, Function, Real, Index >:: -updateLinearSystem( const RealType& time, - const MeshType& mesh, - const IndexType& index, - const CoordinatesType& coordinates, - DofVectorType& u, - DofVectorType& b, - IndexType* columns, - RealType* values, - IndexType& rowLength ) const -{ - columns[ 0 ] = index; - values[ 0 ] = 1.0; - b[ index ] = function.getValue( mesh.getCellCenter( coordinates ), time ); - rowLength = 1; -} - - #endif /* TNLDIRICHLETBOUNDARYCONDITIONS_IMPL_H */ diff --git a/src/implementation/solvers/linear/krylov/tnlTFQMRSolver_impl.h b/src/implementation/solvers/linear/krylov/tnlTFQMRSolver_impl.h index 1c3dd5adf345fb8334fbf432a9555e5a4e80a2ed..cc3c51bf2bd9a085702ded5398168741948c6de2 100644 --- a/src/implementation/solvers/linear/krylov/tnlTFQMRSolver_impl.h +++ b/src/implementation/solvers/linear/krylov/tnlTFQMRSolver_impl.h @@ -36,10 +36,10 @@ template< typename Matrix, typename Preconditioner > tnlString tnlTFQMRSolver< Matrix, Preconditioner > :: getType() const { - return tnlString( "tnlTFQMRSolver< " ) + - tnlString( getType( ( RealType ) 0.0 ) ) + ", " + + /*return tnlString( "tnlTFQMRSolver< " ) + + tnlString( getType< RealType >() + ", " + Device :: getDeviceType() + ", " + - tnlString( getType( ( IndexType ) 0 ) ) + " >"; + tnlString( getType< RealType >() + " >";*/ } template< typename Matrix, diff --git a/src/implementation/solvers/pde/tnlExplicitUpdater_impl.h b/src/implementation/solvers/pde/tnlExplicitUpdater_impl.h index 7358113c2af9e07612a259036f30e551058b2351..7d4145d7e3eb3b472417e022f2326f7f6f760dc8 100644 --- a/src/implementation/solvers/pde/tnlExplicitUpdater_impl.h +++ b/src/implementation/solvers/pde/tnlExplicitUpdater_impl.h @@ -64,9 +64,9 @@ void tnlExplicitUpdater< tnlGrid< Dimensions, Real, Device, Index >, DofVector, DifferentialOperator, BoundaryConditions, RightHandSide >:: update( const RealType& time, const tnlGrid< Dimensions, Real, Device, Index >& mesh, - DifferentialOperator& differentialOperator, - BoundaryConditions& boundaryConditions, - RightHandSide& rightHandSide, + const DifferentialOperator& differentialOperator, + const BoundaryConditions& boundaryConditions, + const RightHandSide& rightHandSide, DofVector& u, DofVector& fu ) const { diff --git a/src/implementation/solvers/pde/tnlSemiImplicitTimeStepper_impl.h b/src/implementation/solvers/pde/tnlSemiImplicitTimeStepper_impl.h index f69d4fa0bd5f421bb467bb5213661fb00a652321..785866a56b0d8e870ff1047bfd51a6f462e459fc 100644 --- a/src/implementation/solvers/pde/tnlSemiImplicitTimeStepper_impl.h +++ b/src/implementation/solvers/pde/tnlSemiImplicitTimeStepper_impl.h @@ -157,7 +157,7 @@ solve( const RealType& time, this->rightHandSide ); if( verbose ) cout << " Solving the linear system for time " << t << " \r" << flush; - if( ! this->linearSystemSolver->solve( this->rightHandSide, dofVector ) ) + if( ! this->linearSystemSolver->template solve< DofVectorType, tnlLinearResidueGetter< MatrixType, DofVectorType > >( this->rightHandSide, dofVector ) ) { cerr << "The linear system solver did not converge." << endl; return false; diff --git a/src/matrices/tnlCSRMatrix.h b/src/matrices/tnlCSRMatrix.h index 59fc2fa5996e64f8d928c11629f1ee817c427135..71d4401ce260a63f4fb0c37c8e12467c45bccc3c 100644 --- a/src/matrices/tnlCSRMatrix.h +++ b/src/matrices/tnlCSRMatrix.h @@ -147,6 +147,7 @@ class tnlCSRMatrix : public tnlSparseMatrix< Real, Device, Index > typename OutVector > void vectorProduct( const InVector& inVector, OutVector& outVector ) const; + // TODO: add const RealType& multiplicator = 1.0 ) template< typename Real2, typename Index2 > void addMatrix( const tnlCSRMatrix< Real2, Device, Index2 >& matrix, diff --git a/src/matrices/tnlMatrixSetter.h b/src/matrices/tnlMatrixSetter.h index cf04a6e2b389d4f186ea626c4e02866d8536a050..01448ea314edc8f9c395af84940127b717e6543a 100644 --- a/src/matrices/tnlMatrixSetter.h +++ b/src/matrices/tnlMatrixSetter.h @@ -25,14 +25,14 @@ class tnlMatrixSetterTraversalUserData { public: - DifferentialOperator& differentialOperator; + const DifferentialOperator& differentialOperator; - BoundaryConditions& boundaryConditions; + const BoundaryConditions& boundaryConditions; RowLengthsVector& rowLengths; - tnlMatrixSetterTraversalUserData( DifferentialOperator& differentialOperator, - BoundaryConditions& boundaryConditions, + tnlMatrixSetterTraversalUserData( const DifferentialOperator& differentialOperator, + const BoundaryConditions& boundaryConditions, RowLengthsVector& rowLengths ) : differentialOperator( differentialOperator ), boundaryConditions( boundaryConditions ), @@ -117,8 +117,8 @@ class tnlMatrixSetter< tnlGrid< Dimensions, Real, Device, Index >, template< int EntityDimensions > void getRowLengths( const MeshType& mesh, - DifferentialOperator& differentialOperator, - BoundaryConditions& boundaryConditions, + const DifferentialOperator& differentialOperator, + const BoundaryConditions& boundaryConditions, RowLengthsVector& rowLengths ) const; diff --git a/src/mesh/tnlGnuplotWriter.h b/src/mesh/tnlGnuplotWriter.h index b962bf769be5681bed7f601a506a4223faaaa477..d4bb1000819a9b40e645386e7f1ff1dac21e02fa 100644 --- a/src/mesh/tnlGnuplotWriter.h +++ b/src/mesh/tnlGnuplotWriter.h @@ -30,28 +30,28 @@ class tnlGnuplotWriter const Element& d ) { str << d; - }; + } template< typename Real > static void write( std::ostream& str, const tnlStaticVector< 1, Real >& d ) { str << d.x() << " "; - }; + } template< typename Real > static void write( std::ostream& str, const tnlStaticVector< 2, Real >& d ) { str << d.x() << " " << d.y() << " "; - }; + } template< typename Real > static void write( std::ostream& str, const tnlStaticVector< 3, Real >& d ) { str << d.x() << " " << d.y() << " " << d. z() << " "; - }; + } }; diff --git a/src/mesh/tnlGrid.h b/src/mesh/tnlGrid.h index 42b671d676a0d89e6b77c95810bbf240ec2fd0ca..41a9e8704eddde9b959b7dfd4202926591367dcd 100644 --- a/src/mesh/tnlGrid.h +++ b/src/mesh/tnlGrid.h @@ -138,19 +138,31 @@ class tnlGrid< 1, Real, Device, Index > : public tnlObject /**** * The type Vertex can have different Real type. */ +#ifdef HAVE_NOT_CXX11 + template< typename Vertex > +#else template< typename Vertex = VertexType > +#endif #ifdef HAVE_CUDA __device__ __host__ #endif Vertex getCellCenter( const CoordinatesType& cellCoordinates ) const; +#ifdef HAVE_NOT_CXX11 + template< typename Vertex > +#else template< typename Vertex = VertexType > +#endif #ifdef HAVE_CUDA __device__ __host__ #endif Vertex getCellCenter( const IndexType& cellIndex ) const; +#ifdef HAVE_NOT_CXX11 + template< typename Vertex > +#else template< typename Vertex = VertexType > +#endif #ifdef HAVE_CUDA __device__ __host__ #endif @@ -252,6 +264,9 @@ class tnlGrid< 2, Real, Device, Index > : public tnlObject void setDimensions( const CoordinatesType& dimensions ); +#ifdef HAVE_CUDA + __device__ __host__ +#endif const CoordinatesType& getDimensions() const; void setDomain( const VertexType& origin, @@ -382,25 +397,42 @@ class tnlGrid< 2, Real, Device, Index > : public tnlObject /**** * The type Vertex can have different Real type. */ +#ifdef HAVE_NOT_CXX11 + template< typename Vertex > +#else template< typename Vertex = VertexType > +#endif #ifdef HAVE_CUDA __device__ __host__ #endif Vertex getCellCenter( const CoordinatesType& cellCoordinates ) const; +#ifdef HAVE_NOT_CXX11 + template< typename Vertex > +#else template< typename Vertex = VertexType > +#endif #ifdef HAVE_CUDA __device__ __host__ #endif Vertex getCellCenter( const IndexType& cellIndex ) const; -template< int nx, int ny, typename Vertex = VertexType > + +#ifdef HAVE_NOT_CXX11 + template< int nx, int ny, typename Vertex > +#else + template< int nx, int ny, typename Vertex = VertexType > +#endif #ifdef HAVE_CUDA __device__ __host__ #endif Vertex getFaceCenter( const CoordinatesType& faceCoordinates ) const; +#ifdef HAVE_NOT_CXX11 + template< typename Vertex > +#else template< typename Vertex = VertexType > +#endif #ifdef HAVE_CUDA __device__ __host__ #endif @@ -711,31 +743,51 @@ class tnlGrid< 3, Real, Device, Index > : public tnlObject /**** * The type Vertex can have different Real type. */ +#ifdef HAVE_NOT_CXX11 + template< typename Vertex > +#else template< typename Vertex = VertexType > +#endif #ifdef HAVE_CUDA __device__ __host__ #endif Vertex getCellCenter( const CoordinatesType& cellCoordinates ) const; +#ifdef HAVE_NOT_CXX11 + template< typename Vertex > +#else template< typename Vertex = VertexType > +#endif #ifdef HAVE_CUDA __device__ __host__ #endif Vertex getCellCenter( const IndexType& cellIndex ) const; -template< int nx, int ny, int nz, typename Vertex = VertexType > +#ifdef HAVE_NOT_CXX11 + template< int nx, int ny, int nz, typename Vertex > +#else + template< int nx, int ny, int nz, typename Vertex = VertexType > +#endif #ifdef HAVE_CUDA __device__ __host__ #endif Vertex getFaceCenter( const CoordinatesType& faceCoordinates ) const; - -template< int dx, int dy, int dz, typename Vertex = VertexType > + +#ifdef HAVE_NOT_CXX11 + template< int dx, int dy, int dz, typename Vertex > +#else + template< int dx, int dy, int dz, typename Vertex = VertexType > +#endif #ifdef HAVE_CUDA __device__ __host__ #endif Vertex getEdgeCenter( const CoordinatesType& edgeCoordinates ) const; +#ifdef HAVE_NOT_CXX11 + template< typename Vertex > +#else template< typename Vertex = VertexType > +#endif #ifdef HAVE_CUDA __device__ __host__ #endif diff --git a/src/operators/CMakeLists.txt b/src/operators/CMakeLists.txt index 17bf431eef7fabd001202a3eb3e46d29d1be3ee3..792b7b2e728111f27c34d5f81d495c1bf2aa994c 100755 --- a/src/operators/CMakeLists.txt +++ b/src/operators/CMakeLists.txt @@ -4,7 +4,8 @@ ADD_SUBDIRECTORY( euler ) SET( headers tnlFiniteDifferences.h tnlDirichletBoundaryConditions.h - tnlNeumannBoundaryConditions.h ) + tnlNeumannBoundaryConditions.h + tnlExactOperatorEvaluator.h ) #SET( libtnlmeshincludedir ${TNL_INCLUDE_DIR}/operators ) #SET( libtnlmeshinclude_HEADERS ${headers} ) diff --git a/src/operators/diffusion/tnlExactLinearDiffusion.h b/src/operators/diffusion/tnlExactLinearDiffusion.h index 13df353d87a032aaa5f179611a7f1fc1701251a0..56fb1f013b4d375fd58b99a238e7d09686556c45 100644 --- a/src/operators/diffusion/tnlExactLinearDiffusion.h +++ b/src/operators/diffusion/tnlExactLinearDiffusion.h @@ -30,8 +30,12 @@ class tnlExactLinearDiffusion< 1 > enum { Dimensions = 1 }; static tnlString getType(); - + +#ifdef HAVE_NOT_CXX11 + template< typename Function, typename Vertex, typename Real > +#else template< typename Function, typename Vertex, typename Real = typename Vertex::RealType > +#endif static Real getValue( const Function& function, const Vertex& v, const Real& time = 0.0 ); @@ -46,7 +50,11 @@ class tnlExactLinearDiffusion< 2 > static tnlString getType(); +#ifdef HAVE_NOT_CXX11 + template< typename Function, typename Vertex, typename Real > +#else template< typename Function, typename Vertex, typename Real = typename Vertex::RealType > +#endif static Real getValue( const Function& function, const Vertex& v, const Real& time = 0.0 ); @@ -61,7 +69,11 @@ class tnlExactLinearDiffusion< 3 > static tnlString getType(); +#ifdef HAVE_NOT_CXX11 + template< typename Function, typename Vertex, typename Real > +#else template< typename Function, typename Vertex, typename Real = typename Vertex::RealType > +#endif static Real getValue( const Function& function, const Vertex& v, const Real& time = 0.0 ); diff --git a/src/operators/tnlDirichletBoundaryConditions.h b/src/operators/tnlDirichletBoundaryConditions.h index b631df7c3d135ff7a9b354a0c30e6f782bfe58f5..8faa4a42d8086ff1782f236af49ecdf0c41515c3 100644 --- a/src/operators/tnlDirichletBoundaryConditions.h +++ b/src/operators/tnlDirichletBoundaryConditions.h @@ -4,6 +4,7 @@ #include <core/vectors/tnlStaticVector.h> #include <config/tnlParameterContainer.h> #include <functions/tnlConstantFunction.h> +#include <core/vectors/tnlSharedVector.h> template< typename Mesh, typename Function = tnlConstantFunction< Mesh::Dimensions, @@ -15,145 +16,31 @@ class tnlDirichletBoundaryConditions }; -template< typename MeshReal, +template< int Dimensions, + typename MeshReal, typename Device, typename MeshIndex, typename Function, typename Real, typename Index > -class tnlDirichletBoundaryConditions< tnlGrid< 1, MeshReal, Device, MeshIndex >, Function, Real, Index > +class tnlDirichletBoundaryConditions< tnlGrid< Dimensions, MeshReal, Device, MeshIndex >, Function, Real, Index > { public: - typedef tnlGrid< 1, MeshReal, Device, MeshIndex > MeshType; + typedef tnlGrid< Dimensions, MeshReal, Device, MeshIndex > MeshType; typedef Real RealType; typedef Device DeviceType; typedef Index IndexType; typedef tnlSharedVector< RealType, DeviceType, IndexType > SharedVector; typedef tnlVector< RealType, DeviceType, IndexType> DofVectorType; - typedef tnlStaticVector< 1, RealType > VertexType; + typedef tnlStaticVector< Dimensions, RealType > VertexType; typedef typename MeshType::CoordinatesType CoordinatesType; bool setup( const tnlParameterContainer& parameters, - const tnlString& prefix = "" ); + const tnlString& prefix = "" ); -#ifdef HAVE_CUDA - __device__ __host__ -#endif - void setBoundaryConditions( const RealType& time, - const MeshType& mesh, - const IndexType index, - const CoordinatesType& coordinates, - DofVectorType& u, - DofVectorType& fu ); - -#ifdef HAVE_CUDA - __device__ __host__ -#endif - Index getLinearSystemRowLength( const MeshType& mesh, - const IndexType& index, - const CoordinatesType& coordinates ) const; - -#ifdef HAVE_CUDA - __device__ __host__ -#endif - void updateLinearSystem( const RealType& time, - const MeshType& mesh, - const IndexType& index, - const CoordinatesType& coordinates, - DofVectorType& u, - DofVectorType& b, - IndexType* columns, - RealType* values, - IndexType& rowLength ) const; - - protected: - - Function function; -}; - -template< typename MeshReal, - typename Device, - typename MeshIndex, - typename Function, - typename Real, - typename Index > -class tnlDirichletBoundaryConditions< tnlGrid< 2, MeshReal, Device, MeshIndex >, Function, Real, Index > -{ - public: - - typedef tnlGrid< 2, MeshReal, Device, MeshIndex > MeshType; - typedef Real RealType; - typedef Device DeviceType; - typedef Index IndexType; - - typedef tnlSharedVector< RealType, DeviceType, IndexType > SharedVector; - typedef tnlVector< RealType, DeviceType, IndexType> DofVectorType; - typedef tnlStaticVector< 2, RealType > VertexType; - typedef typename MeshType::CoordinatesType CoordinatesType; - - bool setup( const tnlParameterContainer& parameters, - const tnlString& prefix = "" ); - -#ifdef HAVE_CUDA - __device__ __host__ -#endif - void setBoundaryConditions( const RealType& time, - const MeshType& mesh, - const IndexType index, - const CoordinatesType& coordinates, - DofVectorType& u, - DofVectorType& fu ); - -#ifdef HAVE_CUDA - __device__ __host__ -#endif - Index getLinearSystemRowLength( const MeshType& mesh, - const IndexType& index, - const CoordinatesType& coordinates ) const; - -#ifdef HAVE_CUDA - __device__ __host__ -#endif - void updateLinearSystem( const RealType& time, - const MeshType& mesh, - const IndexType& index, - const CoordinatesType& coordinates, - DofVectorType& u, - DofVectorType& b, - IndexType* columns, - RealType* values, - IndexType& rowLength ) const; - - protected: - - Function function; - -}; - -template< typename MeshReal, - typename Device, - typename MeshIndex, - typename Function, - typename Real, - typename Index > -class tnlDirichletBoundaryConditions< tnlGrid< 3, MeshReal, Device, MeshIndex >, Function, Real, Index > -{ - public: - - typedef tnlGrid< 3, MeshReal, Device, MeshIndex > MeshType; - typedef Real RealType; - typedef Device DeviceType; - typedef Index IndexType; - - typedef tnlSharedVector< RealType, DeviceType, IndexType > SharedVector; - typedef tnlVector< RealType, DeviceType, IndexType> DofVectorType; - typedef tnlStaticVector< 3, RealType > VertexType; - typedef typename MeshType::CoordinatesType CoordinatesType; - - bool setup( const tnlParameterContainer& parameters, - const tnlString& prefix = "" ); + void setFunction( const Function& function ); #ifdef HAVE_CUDA __device__ __host__ @@ -163,7 +50,7 @@ class tnlDirichletBoundaryConditions< tnlGrid< 3, MeshReal, Device, MeshIndex >, const IndexType index, const CoordinatesType& coordinates, DofVectorType& u, - DofVectorType& fu ); + DofVectorType& fu ) const; #ifdef HAVE_CUDA __device__ __host__ diff --git a/src/operators/tnlExactOperatorEvaluator.h b/src/operators/tnlExactOperatorEvaluator.h new file mode 100644 index 0000000000000000000000000000000000000000..303e14ba6d6208960f91139ad66c156e7efb2694 --- /dev/null +++ b/src/operators/tnlExactOperatorEvaluator.h @@ -0,0 +1,199 @@ +/*************************************************************************** + tnlExactOperatorEvaluator.h - description + ------------------- + begin : Nov 8, 2014 + copyright : (C) 2014 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 TNLEXACTOPERATOREVALUATOR_H_ +#define TNLEXACTOPERATOREVALUATOR_H_ + +#include <mesh/tnlGrid.h> + +template< typename Real, + typename DofVector, + typename DifferentialOperator, + typename Function, + typename BoundaryConditions > +class tnlExactOperatorEvaluatorTraversalUserData +{ + public: + + const Real &time; + + const DifferentialOperator& differentialOperator; + + const BoundaryConditions& boundaryConditions; + + const Function& function; + + DofVector &fu; + + tnlExactOperatorEvaluatorTraversalUserData( const Real& time, + const DifferentialOperator& differentialOperator, + const Function& function, + const BoundaryConditions& boundaryConditions, + DofVector& fu ) + : time( time ), + differentialOperator( differentialOperator ), + boundaryConditions( boundaryConditions ), + function( function ), + fu( fu ) + {}; +}; + +template< typename Mesh, + typename DofVector, + typename DifferentialOperator, + typename Function, + typename BoundaryConditions > +class tnlExactOperatorEvaluator +{ + public: + typedef Mesh MeshType; + typedef typename DofVector::RealType RealType; + typedef typename DofVector::DeviceType DeviceType; + typedef typename DofVector::IndexType IndexType; + typedef tnlExactOperatorEvaluatorTraversalUserData< RealType, + DofVector, + DifferentialOperator, + Function, + BoundaryConditions > TraversalUserData; + + template< int EntityDimensions > + void evaluate( const RealType& time, + const MeshType& mesh, + const DifferentialOperator& differentialOperator, + const Function& function, + const BoundaryConditions& boundaryConditions, + DofVector& fu ) const; + + class TraversalBoundaryEntitiesProcessor + { + public: + + template< int EntityDimension > +#ifdef HAVE_CUDA + __host__ __device__ +#endif + void processEntity( const MeshType& mesh, + TraversalUserData& userData, + const IndexType index ) + { + userData.boundaryConditions.setBoundaryConditions( userData.time, + mesh, + index, + userData.u, + userData.fu ); + } + + }; + + class TraversalInteriorEntitiesProcessor + { + public: + + template< int EntityDimensions > +#ifdef HAVE_CUDA + __host__ __device__ +#endif + void processEntity( const MeshType& mesh, + TraversalUserData& userData, + const IndexType index ) + { + userData.fu[ index ] = userData.differentialOperator.getValue( userData.function, + mesh.template getEntityCenter< EntityDimensions >( index ), + userData.time ); + } + + }; + +}; + +template< int Dimensions, + typename Real, + typename Device, + typename Index, + typename DofVector, + typename DifferentialOperator, + typename Function, + typename BoundaryConditions > +class tnlExactOperatorEvaluator< tnlGrid< Dimensions, Real, Device, Index >, DofVector, DifferentialOperator, Function, BoundaryConditions > +{ + public: + typedef tnlGrid< Dimensions, Real, Device, Index > MeshType; + typedef typename DofVector::RealType RealType; + typedef typename DofVector::DeviceType DeviceType; + typedef typename DofVector::IndexType IndexType; + typedef typename MeshType::CoordinatesType CoordinatesType; + typedef tnlExactOperatorEvaluatorTraversalUserData< RealType, + DofVector, + DifferentialOperator, + Function, + BoundaryConditions > TraversalUserData; + + template< int EntityDimensions > + void evaluate( const RealType& time, + const MeshType& mesh, + const DifferentialOperator& differentialOperator, + const Function& function, + const BoundaryConditions& boundaryConditions, + DofVector& fu ) const; + + class TraversalBoundaryEntitiesProcessor + { + public: + +#ifdef HAVE_CUDA + __host__ __device__ +#endif + void processCell( const MeshType& mesh, + TraversalUserData& userData, + const IndexType index, + const CoordinatesType& c ) + { + userData.boundaryConditions.setBoundaryConditions( userData.time, + mesh, + index, + c, + userData.fu, + userData.fu ); + } + + }; + + class TraversalInteriorEntitiesProcessor + { + public: + +#ifdef HAVE_CUDA + __host__ __device__ +#endif + void processCell( const MeshType& mesh, + TraversalUserData& userData, + const IndexType index, + const CoordinatesType& c ) + { + userData.fu[ index ] = userData.differentialOperator.getValue( userData.function, + mesh.template getCellCenter( index ), + userData.time ); + } + + }; + +}; + + +#include <operators/tnlExactOperatorEvaluator_impl.h> + +#endif /* TNLEXACTOPERATOREVALUATOR_H_ */ diff --git a/src/operators/tnlExactOperatorEvaluator_impl.h b/src/operators/tnlExactOperatorEvaluator_impl.h new file mode 100644 index 0000000000000000000000000000000000000000..43cfcf226049652e8259aa83ab052d97ad81ce29 --- /dev/null +++ b/src/operators/tnlExactOperatorEvaluator_impl.h @@ -0,0 +1,82 @@ +/*************************************************************************** + tnlExactOperatorEvaluator_impl.h - description + ------------------- + begin : Nov 8, 2014 + copyright : (C) 2014 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 TNLEXACTOPERATOREVALUATOR_IMPL_H_ +#define TNLEXACTOPERATOREVALUATOR_IMPL_H_ + +template< typename Mesh, + typename DofVector, + typename DifferentialOperator, + typename Function, + typename BoundaryConditions > + template< int EntityDimensions > +void +tnlExactOperatorEvaluator< Mesh, DofVector, DifferentialOperator, Function, BoundaryConditions >:: +evaluate( const RealType& time, + const Mesh& mesh, + const DifferentialOperator& differentialOperator, + const Function& function, + const BoundaryConditions& boundaryConditions, + DofVector& fu ) const +{ + TraversalUserData userData( time, differentialOperator, function, boundaryConditions, fu ); + TraversalBoundaryEntitiesProcessor boundaryEntitiesProcessor; + TraversalInteriorEntitiesProcessor interiorEntitiesProcessor; + tnlTraversal< MeshType, EntityDimensions > meshTraversal; + meshTraversal.template processEntities< TraversalUserData, + TraversalBoundaryEntitiesProcessor, + TraversalInteriorEntitiesProcessor > + ( mesh, + userData, + boundaryEntitiesProcessor, + interiorEntitiesProcessor ); +} + +template< int Dimensions, + typename Real, + typename Device, + typename Index, + typename DofVector, + typename DifferentialOperator, + typename Function, + typename BoundaryConditions > + template< int EntityDimensions > +void +tnlExactOperatorEvaluator< tnlGrid< Dimensions, Real, Device, Index >, DofVector, DifferentialOperator, Function, BoundaryConditions >:: +evaluate( const RealType& time, + const tnlGrid< Dimensions, Real, Device, Index >& mesh, + const DifferentialOperator& differentialOperator, + const Function& function, + const BoundaryConditions& boundaryConditions, + DofVector& fu ) const +{ + TraversalUserData userData( time, differentialOperator, function, boundaryConditions, fu ); + TraversalBoundaryEntitiesProcessor boundaryEntitiesProcessor; + TraversalInteriorEntitiesProcessor interiorEntitiesProcessor; + tnlTraversal< MeshType, EntityDimensions > meshTraversal; + meshTraversal.template processEntities< TraversalUserData, + TraversalBoundaryEntitiesProcessor, + TraversalInteriorEntitiesProcessor > + ( mesh, + userData, + boundaryEntitiesProcessor, + interiorEntitiesProcessor ); +} + + + +#endif /* TNLEXACTOPERATOREVALUATOR_IMPL_H_ */ diff --git a/src/solvers/pde/tnlExplicitUpdater.h b/src/solvers/pde/tnlExplicitUpdater.h index 51a26712b200c05416bd26f1ef82dfb0748cb5f1..80df7c482baa856c784a6024eb6ec687ca1c21f7 100644 --- a/src/solvers/pde/tnlExplicitUpdater.h +++ b/src/solvers/pde/tnlExplicitUpdater.h @@ -29,18 +29,18 @@ class tnlExplicitUpdaterTraversalUserData const Real &time; - DifferentialOperator& differentialOperator; + const DifferentialOperator& differentialOperator; - BoundaryConditions& boundaryConditions; + const BoundaryConditions& boundaryConditions; - RightHandSide& rightHandSide; + const RightHandSide& rightHandSide; DofVector &u, &fu; tnlExplicitUpdaterTraversalUserData( const Real& time, - DifferentialOperator& differentialOperator, - BoundaryConditions& boundaryConditions, - RightHandSide& rightHandSide, + const DifferentialOperator& differentialOperator, + const BoundaryConditions& boundaryConditions, + const RightHandSide& rightHandSide, DofVector& u, DofVector& fu ) : time( time ), @@ -154,9 +154,9 @@ class tnlExplicitUpdater< tnlGrid< Dimensions, Real, Device, Index >, template< int EntityDimensions > void update( const RealType& time, const MeshType& mesh, - DifferentialOperator& differentialOperator, - BoundaryConditions& boundaryConditions, - RightHandSide& rightHandSide, + const DifferentialOperator& differentialOperator, + const BoundaryConditions& boundaryConditions, + const RightHandSide& rightHandSide, DofVector& u, DofVector& fu ) const; @@ -190,6 +190,8 @@ class tnlExplicitUpdater< tnlGrid< Dimensions, Real, Device, Index >, { public: + typedef typename MeshType::VertexType VertexType; + #ifdef HAVE_CUDA __host__ __device__ #endif @@ -204,7 +206,7 @@ class tnlExplicitUpdater< tnlGrid< Dimensions, Real, Device, Index >, userData.u, userData.time ); - userData.fu[ index ] += userData.rightHandSide.getValue( mesh.getCellCenter( coordinates ), + userData.fu[ index ] += userData.rightHandSide.getValue( mesh.template getCellCenter< VertexType >( coordinates ), userData.time ); } diff --git a/src/solvers/pde/tnlLinearSystemAssembler.h b/src/solvers/pde/tnlLinearSystemAssembler.h index def29d602b6ec07425c6105d9e3788667e601f16..777c0ab3386f1d29e0f3da0426ca8471df56bed9 100644 --- a/src/solvers/pde/tnlLinearSystemAssembler.h +++ b/src/solvers/pde/tnlLinearSystemAssembler.h @@ -256,9 +256,10 @@ class tnlLinearSystemAssembler< tnlGrid< Dimensions, Real, Device, Index >, const IndexType index, const CoordinatesType& coordinates ) { + typedef typename MeshType::VertexType VertexType; userData.b[ index ] = userData.u[ index ] + - userData.tau * userData.rightHandSide.getValue( mesh.getCellCenter( index ), - userData.time ); + userData.tau * userData.rightHandSide.template getValue< VertexType >( mesh.template getCellCenter< VertexType >( index ), + userData.time ); typename MatrixType::IndexType rowLength; userData.differentialOperator.updateLinearSystem( userData.time, userData.tau, diff --git a/tests/benchmarks/tnlCusparseCSRMatrix.h b/tests/benchmarks/tnlCusparseCSRMatrix.h index fd70cc4c92270584daaa5447940ff8e1cd787c63..81d0bc4f63fc37a2d1f8b7ee84ee0b732c3f909e 100644 --- a/tests/benchmarks/tnlCusparseCSRMatrix.h +++ b/tests/benchmarks/tnlCusparseCSRMatrix.h @@ -110,7 +110,7 @@ class tnlCusparseCSRMatrix< double > : public tnlCusparseCSRMatrixBase< double > { tnlAssert( matrix, ); #ifdef HAVE_CUDA - cusparseDcsrmv( *( this->cusparseHandle ), + /*cusparseDcsrmv( *( this->cusparseHandle ), CUSPARSE_OPERATION_NON_TRANSPOSE, this->matrix->getRows(), this->matrix->getColumns(), @@ -121,7 +121,7 @@ class tnlCusparseCSRMatrix< double > : public tnlCusparseCSRMatrixBase< double > this->matrix->columnIndexes.getData(), inVector.getData(), 1.0, - outVector.getData() ); + outVector.getData() );*/ #endif } }; @@ -138,7 +138,7 @@ class tnlCusparseCSRMatrix< float > : public tnlCusparseCSRMatrixBase< float > { tnlAssert( matrix, ); #ifdef HAVE_CUDA - cusparseScsrmv( *( this->cusparseHandle ), + /*cusparseScsrmv( *( this->cusparseHandle ), CUSPARSE_OPERATION_NON_TRANSPOSE, this->matrix->getRows(), this->matrix->getColumns(), @@ -149,7 +149,7 @@ class tnlCusparseCSRMatrix< float > : public tnlCusparseCSRMatrixBase< float > this->matrix->columnIndexes.getData(), inVector.getData(), 0, - outVector.getData() ); + outVector.getData() );*/ #endif } }; diff --git a/tests/unit-tests/core/arrays/tnlArrayOperationsTest.cu b/tests/unit-tests/core/arrays/tnlArrayOperationsTest.cu index fa6b1dc038a6d44be3ea592f22de92b72d685f54..aec760defcf0d01c831de77865bfc4f16e3d9456 100644 --- a/tests/unit-tests/core/arrays/tnlArrayOperationsTest.cu +++ b/tests/unit-tests/core/arrays/tnlArrayOperationsTest.cu @@ -24,4 +24,4 @@ int main( int argc, char* argv[] ) if( ! tnlUnitTestStarter :: run< tnlArrayOperationsTester< int, tnlCuda > >() ) return EXIT_FAILURE; return EXIT_SUCCESS; -} \ No newline at end of file +} diff --git a/tests/unit-tests/matrices/tnlSparseMatrixTester.h b/tests/unit-tests/matrices/tnlSparseMatrixTester.h index 2b25a67d4d17f609f0a2d2ffc13004e8a6cf0e68..5d12983eb8cf2bb4833a840c86fb3266ac29c67f 100644 --- a/tests/unit-tests/matrices/tnlSparseMatrixTester.h +++ b/tests/unit-tests/matrices/tnlSparseMatrixTester.h @@ -259,12 +259,12 @@ class tnlSparseMatrixTester : public CppUnit :: TestCase rowLengths.setValue( 7 ); m.setRowLengths( rowLengths ); - if( DeviceType::DeviceType == tnlHostDevice ) + if( DeviceType::DeviceType == ( int ) tnlHostDevice ) { for( int i = 0; i < 10; i++ ) m.setElementFast( i, i, i ); } - if( DeviceType::DeviceType == tnlCudaDevice ) + if( DeviceType::DeviceType == ( int ) tnlCudaDevice ) { #ifdef HAVE_CUDA MatrixType* kernel_matrix = tnlCuda::passToDevice( m ); @@ -340,7 +340,7 @@ class tnlSparseMatrixTester : public CppUnit :: TestCase rowLengths.setValue( 10 ); m.setRowLengths( rowLengths ); - if( DeviceType::DeviceType == tnlHostDevice ) + if( DeviceType::DeviceType == ( int ) tnlHostDevice ) { for( int i = 0; i < 10; i++ ) m.setElementFast( i, i, i ); @@ -348,7 +348,7 @@ class tnlSparseMatrixTester : public CppUnit :: TestCase for( int j = 0; j < 10; j++ ) m.addElementFast( i, j, 1, 0.5 ); } - if( DeviceType::DeviceType == tnlCudaDevice ) + if( DeviceType::DeviceType == ( int ) tnlCudaDevice ) { #ifdef HAVE_CUDA MatrixType* kernel_matrix = tnlCuda::passToDevice( m ); @@ -377,13 +377,13 @@ class tnlSparseMatrixTester : public CppUnit :: TestCase m.reset(); m.setDimensions( 10, 10 ); m.setRowLengths( rowLengths ); - if( DeviceType::DeviceType == tnlHostDevice ) + if( DeviceType::DeviceType == ( int ) tnlHostDevice ) { for( int i = 9; i >= 0; i-- ) for( int j = 9; j >= 0; j-- ) m.setElementFast( i, j, i+j ); } - if( DeviceType::DeviceType == tnlCudaDevice ) + if( DeviceType::DeviceType == ( int ) tnlCudaDevice ) { #ifdef HAVE_CUDA MatrixType* kernel_matrix = tnlCuda::passToDevice( m ); @@ -456,13 +456,13 @@ class tnlSparseMatrixTester : public CppUnit :: TestCase rowLengths.setElement( i, i+1 ); m.setRowLengths( rowLengths ); - if( DeviceType::DeviceType == tnlHostDevice ) + if( DeviceType::DeviceType == ( int ) tnlHostDevice ) { for( int i = 0; i < 10; i++ ) for( int j = 0; j <= i; j++ ) m.setElementFast( i, j, i + j ); } - if( DeviceType::DeviceType == tnlCudaDevice ) + if( DeviceType::DeviceType == ( int ) tnlCudaDevice ) { #ifdef HAVE_CUDA MatrixType* kernel_matrix = tnlCuda::passToDevice( m ); @@ -491,13 +491,13 @@ class tnlSparseMatrixTester : public CppUnit :: TestCase m.reset(); m.setDimensions( 10, 10 ); m.setRowLengths( rowLengths ); - if( DeviceType::DeviceType == tnlHostDevice ) + if( DeviceType::DeviceType == ( int ) tnlHostDevice ) { for( int i = 9; i >= 0; i-- ) for( int j = i; j >= 0; j-- ) m.setElementFast( i, j, i + j ); } - if( DeviceType::DeviceType == tnlCudaDevice ) + if( DeviceType::DeviceType == ( int ) tnlCudaDevice ) { #ifdef HAVE_CUDA MatrixType* kernel_matrix = tnlCuda::passToDevice( m ); @@ -597,7 +597,7 @@ class tnlSparseMatrixTester : public CppUnit :: TestCase m.setRowLengths( rowLengths ); - if( DeviceType::DeviceType == tnlHostDevice ) + if( DeviceType::DeviceType == ( int ) tnlHostDevice ) { RealType values[ 1 ]; IndexType columnIndexes[ 1 ]; @@ -608,7 +608,7 @@ class tnlSparseMatrixTester : public CppUnit :: TestCase m.setRowFast( i, columnIndexes, values, 1 ); } } - if( DeviceType::DeviceType == tnlCudaDevice ) + if( DeviceType::DeviceType == ( int ) tnlCudaDevice ) { #ifdef HAVE_CUDA MatrixType* kernel_matrix = tnlCuda::passToDevice( m ); @@ -702,7 +702,7 @@ class tnlSparseMatrixTester : public CppUnit :: TestCase for( int i = 0; i < 10; i++ ) columnIndexes[ i ] = i; - if( DeviceType::DeviceType == tnlHostDevice ) + if( DeviceType::DeviceType == ( int ) tnlHostDevice ) { for( int i = 0; i < 10; i++ ) { @@ -715,7 +715,7 @@ class tnlSparseMatrixTester : public CppUnit :: TestCase m.setRowFast( i, columnIndexes, values, 10 ); } } - if( DeviceType::DeviceType == tnlCudaDevice ) + if( DeviceType::DeviceType == ( int ) tnlCudaDevice ) { #ifdef HAVE_CUDA MatrixType* kernel_matrix = tnlCuda::passToDevice( m ); @@ -746,7 +746,7 @@ class tnlSparseMatrixTester : public CppUnit :: TestCase m.setDimensions( 10, 10 ); m.setRowLengths( rowLengths ); - if( DeviceType::DeviceType == tnlHostDevice ) + if( DeviceType::DeviceType == ( int ) tnlHostDevice ) { for( int i = 9; i >= 0; i-- ) { @@ -755,7 +755,7 @@ class tnlSparseMatrixTester : public CppUnit :: TestCase m.setRowFast( i, columnIndexes, values, 10 ); } } - if( DeviceType::DeviceType == tnlCudaDevice ) + if( DeviceType::DeviceType == ( int ) tnlCudaDevice ) { #ifdef HAVE_CUDA MatrixType* kernel_matrix = tnlCuda::passToDevice( m ); @@ -847,7 +847,7 @@ class tnlSparseMatrixTester : public CppUnit :: TestCase for( int i = 0; i < 10; i++ ) columnIndexes[ i ] = i; - if( DeviceType::DeviceType == tnlHostDevice ) + if( DeviceType::DeviceType == ( int ) tnlHostDevice ) { for( int i = 0; i < 10; i++ ) { @@ -856,7 +856,7 @@ class tnlSparseMatrixTester : public CppUnit :: TestCase m.setRowFast( i, columnIndexes, values, i + 1 ); } } - if( DeviceType::DeviceType == tnlCudaDevice ) + if( DeviceType::DeviceType == ( int ) tnlCudaDevice ) { #ifdef HAVE_CUDA MatrixType* kernel_matrix = tnlCuda::passToDevice( m ); @@ -887,7 +887,7 @@ class tnlSparseMatrixTester : public CppUnit :: TestCase m.setDimensions( 10, 10 ); m.setRowLengths( rowLengths ); - if( DeviceType::DeviceType == tnlHostDevice ) + if( DeviceType::DeviceType == ( int ) tnlHostDevice ) { for( int i = 9; i >= 0; i-- ) { @@ -896,7 +896,7 @@ class tnlSparseMatrixTester : public CppUnit :: TestCase m.setRowFast( i, columnIndexes, values, i + 1 ); } } - if( DeviceType::DeviceType == tnlCudaDevice ) + if( DeviceType::DeviceType == ( int ) tnlCudaDevice ) { #ifdef HAVE_CUDA MatrixType* kernel_matrix = tnlCuda::passToDevice( m ); diff --git a/tests/unit-tests/operators/diffusion/tnlLinearDiffusionTest.cpp b/tests/unit-tests/operators/diffusion/tnlLinearDiffusionTest.cpp index 525725954cd2e34eeb5d2b954f06e482b9ac0bd2..8fdba17d6a36f2905e52562520ca3df6dd5ae28f 100644 --- a/tests/unit-tests/operators/diffusion/tnlLinearDiffusionTest.cpp +++ b/tests/unit-tests/operators/diffusion/tnlLinearDiffusionTest.cpp @@ -31,8 +31,10 @@ template< int Dimensions, typename Real, typename Device, typename Index, - typename TestFunction > + typename TestFunction, + typename ApproximationMethod > class tnlPDEOperatorEocTestResult< tnlLinearDiffusion< tnlGrid< Dimensions, Real, Device, Index >, Real, Index >, + ApproximationMethod, TestFunction > { public: @@ -50,23 +52,52 @@ class tnlPDEOperatorEocTestResult< tnlLinearDiffusion< tnlGrid< Dimensions, Real int main( int argc, char* argv[] ) { const bool verbose( true ); - const int MeshSize( 32 ); + const int MeshSize( 64 ); #ifdef HAVE_CPPUNIT + /**** + * Explicit approximation + */ if( ! tnlUnitTestStarter :: run< tnlPDEOperatorEocTester< tnlLinearDiffusion< tnlGrid< 1, double, tnlHost, int >, double, int >, tnlExactLinearDiffusion< 1 >, tnlExpBumpFunction< 1, double >, + tnlExplicitApproximation, MeshSize, - verbose > >() || - ! tnlUnitTestStarter :: run< tnlPDEOperatorEocTester< tnlLinearDiffusion< tnlGrid< 2, double, tnlHost, int >, double, int >, + verbose > >() + /*! tnlUnitTestStarter :: run< tnlPDEOperatorEocTester< tnlLinearDiffusion< tnlGrid< 2, double, tnlHost, int >, double, int >, tnlExactLinearDiffusion< 2 >, tnlExpBumpFunction< 2, double >, + tnlExplicitApproximation, MeshSize, verbose > >() || ! tnlUnitTestStarter :: run< tnlPDEOperatorEocTester< tnlLinearDiffusion< tnlGrid< 3, double, tnlHost, int >, double, int >, tnlExactLinearDiffusion< 3 >, tnlExpBumpFunction< 3, double >, + tnlExplicitApproximation, + MeshSize, + verbose > >() */ + ); + //return EXIT_FAILURE; + /**** + * Implicit (matrix) approximation + */ + if( ! tnlUnitTestStarter :: run< tnlPDEOperatorEocTester< tnlLinearDiffusion< tnlGrid< 1, double, tnlHost, int >, double, int >, + tnlExactLinearDiffusion< 1 >, + tnlExpBumpFunction< 1, double >, + tnlImplicitApproximation, MeshSize, verbose > >() + /*! tnlUnitTestStarter :: run< tnlPDEOperatorEocTester< tnlLinearDiffusion< tnlGrid< 2, double, tnlHost, int >, double, int >, + tnlExactLinearDiffusion< 2 >, + tnlExpBumpFunction< 2, double >, + tnlImplicitApproximation, + MeshSize, + verbose > >() || + ! tnlUnitTestStarter :: run< tnlPDEOperatorEocTester< tnlLinearDiffusion< tnlGrid< 3, double, tnlHost, int >, double, int >, + tnlExactLinearDiffusion< 3 >, + tnlExpBumpFunction< 3, double >, + tnlImplicitApproximation, + MeshSize, + verbose > >() */ ) return EXIT_FAILURE; return EXIT_SUCCESS; diff --git a/tests/unit-tests/operators/diffusion/tnlLinearDiffusionTest.cu b/tests/unit-tests/operators/diffusion/tnlLinearDiffusionTest.cu new file mode 100644 index 0000000000000000000000000000000000000000..912bd9214cddb49e63db55f8a16900751435a1b5 --- /dev/null +++ b/tests/unit-tests/operators/diffusion/tnlLinearDiffusionTest.cu @@ -0,0 +1,108 @@ +/*************************************************************************** + tnlLinearDiffusionTest.cu - description + ------------------- + begin : Nov 15, 2014 + copyright : (C) 2014 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. * + * * + ***************************************************************************/ + +#include <tnlConfig.h> +#include <core/tnlHost.h> +#include <cstdlib> + +#include "../tnlPDEOperatorEocTester.h" +#include "../../tnlUnitTestStarter.h" +#include <mesh/tnlGrid.h> +#include <operators/diffusion/tnlLinearDiffusion.h> +#include <operators/diffusion/tnlExactLinearDiffusion.h> +#include "../tnlPDEOperatorEocTestResult.h" +#include <functions/tnlExpBumpFunction.h> + +template< int Dimensions, + typename Real, + typename Device, + typename Index, + typename TestFunction, + typename ApproximationMethod > +class tnlPDEOperatorEocTestResult< tnlLinearDiffusion< tnlGrid< Dimensions, Real, Device, Index >, Real, Index >, + ApproximationMethod, + TestFunction > +{ + public: + static Real getL1Eoc() { return ( Real ) 2.0; }; + static Real getL1Tolerance() { return ( Real ) 0.05; }; + + static Real getL2Eoc() { return ( Real ) 2.0; }; + static Real getL2Tolerance() { return ( Real ) 0.05; }; + + static Real getMaxEoc() { return ( Real ) 2.0; }; + static Real getMaxTolerance() { return ( Real ) 0.05; }; + +}; + +int main( int argc, char* argv[] ) +{ +#ifdef HAVE_CPPUNIT + const bool verbose( true ); + const int MeshSize( 64 ); + /**** + * Explicit approximation + */ + if( ! tnlUnitTestStarter :: run< tnlPDEOperatorEocTester< tnlLinearDiffusion< tnlGrid< 1, double, tnlHost, int >, double, int >, + tnlExactLinearDiffusion< 1 >, + tnlExpBumpFunction< 1, double >, + tnlExplicitApproximation, + MeshSize, + verbose > >() + /*! tnlUnitTestStarter :: run< tnlPDEOperatorEocTester< tnlLinearDiffusion< tnlGrid< 2, double, tnlHost, int >, double, int >, + tnlExactLinearDiffusion< 2 >, + tnlExpBumpFunction< 2, double >, + tnlExplicitApproximation, + MeshSize, + verbose > >() || + ! tnlUnitTestStarter :: run< tnlPDEOperatorEocTester< tnlLinearDiffusion< tnlGrid< 3, double, tnlHost, int >, double, int >, + tnlExactLinearDiffusion< 3 >, + tnlExpBumpFunction< 3, double >, + tnlExplicitApproximation, + MeshSize, + verbose > >() */ + ); + //return EXIT_FAILURE; + /**** + * Implicit (matrix) approximation + */ + if( ! tnlUnitTestStarter :: run< tnlPDEOperatorEocTester< tnlLinearDiffusion< tnlGrid< 1, double, tnlHost, int >, double, int >, + tnlExactLinearDiffusion< 1 >, + tnlExpBumpFunction< 1, double >, + tnlImplicitApproximation, + MeshSize, + verbose > >() + /*! tnlUnitTestStarter :: run< tnlPDEOperatorEocTester< tnlLinearDiffusion< tnlGrid< 2, double, tnlHost, int >, double, int >, + tnlExactLinearDiffusion< 2 >, + tnlExpBumpFunction< 2, double >, + tnlImplicitApproximation, + MeshSize, + verbose > >() || + ! tnlUnitTestStarter :: run< tnlPDEOperatorEocTester< tnlLinearDiffusion< tnlGrid< 3, double, tnlHost, int >, double, int >, + tnlExactLinearDiffusion< 3 >, + tnlExpBumpFunction< 3, double >, + tnlImplicitApproximation, + MeshSize, + verbose > >() */ + ) + return EXIT_FAILURE; + return EXIT_SUCCESS; +#else + return EXIT_FAILURE; +#endif +} + diff --git a/tests/unit-tests/operators/tnlPDEOperatorEocTestResult.h b/tests/unit-tests/operators/tnlPDEOperatorEocTestResult.h index 0214a086e02688b8a017cfd2b897c76a4cd0d817..7e1954dcf262a418ea87d415f9a7b2ac7964a88a 100644 --- a/tests/unit-tests/operators/tnlPDEOperatorEocTestResult.h +++ b/tests/unit-tests/operators/tnlPDEOperatorEocTestResult.h @@ -19,6 +19,7 @@ #define TNLPDEOPERATOREOCTESTRESULT_H_ template< typename ApproximateOperator, + typename ApproximationMethod, typename TestFunction > class tnlPDEOperatorEocTestResult { diff --git a/tests/unit-tests/operators/tnlPDEOperatorEocTestSetter.h b/tests/unit-tests/operators/tnlPDEOperatorEocTestSetter.h index 2ed0ce0a0e7db203cc0ed19120af293d38a972f1..16542c201dd6c1bcc4348d91e762425fdc0b630c 100644 --- a/tests/unit-tests/operators/tnlPDEOperatorEocTestSetter.h +++ b/tests/unit-tests/operators/tnlPDEOperatorEocTestSetter.h @@ -23,6 +23,7 @@ template< typename ApproximateOperator, typename ExactOperator, + typename ApproximationMethod, typename Mesh, typename TestFunction > class tnlPDEOperatorEocTestSetter @@ -31,11 +32,13 @@ class tnlPDEOperatorEocTestSetter template< typename ApproximateOperator, typename ExactOperator, + typename ApproximationMethod, typename Real, typename Device, typename Index > class tnlPDEOperatorEocTestSetter< ApproximateOperator, ExactOperator, + ApproximationMethod, tnlGrid< 1, Real, Device, Index >, tnlExpBumpFunction< 1, Real > > { @@ -72,11 +75,13 @@ class tnlPDEOperatorEocTestSetter< ApproximateOperator, template< typename ApproximateOperator, typename ExactOperator, + typename ApproximationMethod, typename Real, typename Device, typename Index > class tnlPDEOperatorEocTestSetter< ApproximateOperator, ExactOperator, + ApproximationMethod, tnlGrid< 2, Real, Device, Index >, tnlExpBumpFunction< 2, Real > > { @@ -116,11 +121,13 @@ class tnlPDEOperatorEocTestSetter< ApproximateOperator, template< typename ApproximateOperator, typename ExactOperator, + typename ApproximationMethod, typename Real, typename Device, typename Index > class tnlPDEOperatorEocTestSetter< ApproximateOperator, ExactOperator, + ApproximationMethod, tnlGrid< 3, Real, Device, Index >, tnlExpBumpFunction< 3, Real > > { diff --git a/tests/unit-tests/operators/tnlPDEOperatorEocTester.h b/tests/unit-tests/operators/tnlPDEOperatorEocTester.h index 9e1b50ff541a6976ee1724025aca600d5b70344b..97381cf3ecb89cb5f626999e03af5d99bc96aedf 100644 --- a/tests/unit-tests/operators/tnlPDEOperatorEocTester.h +++ b/tests/unit-tests/operators/tnlPDEOperatorEocTester.h @@ -31,18 +31,19 @@ template< typename ApproximateOperator, typename ExactOperator, typename TestFunction, + typename ApproximationMethod, int MeshSize, bool verbose = false > class tnlPDEOperatorEocTester : public CppUnit :: TestCase { public: - typedef tnlPDEOperatorEocTester< ApproximateOperator, ExactOperator, TestFunction, MeshSize, verbose > TesterType; + typedef tnlPDEOperatorEocTester< ApproximateOperator, ExactOperator, TestFunction, ApproximationMethod, MeshSize, verbose > TesterType; typedef typename CppUnit::TestCaller< TesterType > TestCallerType; typedef typename ApproximateOperator::MeshType MeshType; typedef typename ApproximateOperator::RealType RealType; typedef typename ApproximateOperator::IndexType IndexType; - typedef tnlPDEOperatorEocTestSetter< ApproximateOperator, ExactOperator, MeshType, TestFunction > TestSetter; - typedef tnlPDEOperatorEocTestResult< ApproximateOperator, TestFunction > TestResult; + typedef tnlPDEOperatorEocTestSetter< ApproximateOperator, ExactOperator, ApproximationMethod, MeshType, TestFunction > TestSetter; + typedef tnlPDEOperatorEocTestResult< ApproximateOperator, ApproximationMethod, TestFunction > TestResult; tnlPDEOperatorEocTester(){}; @@ -55,6 +56,7 @@ class tnlPDEOperatorEocTester : public CppUnit :: TestCase ApproximateOperator::getType() + ", " + ExactOperator::getType() + ", " + TestFunction::getType() + ", " + + ApproximationMethod::getType() + ", " + tnlString( MeshSize ) + ", " + tnlString( verbose ) + " >"; CppUnit :: TestSuite* suiteOfTests = new CppUnit :: TestSuite( testName.getString() ); @@ -80,7 +82,8 @@ class tnlPDEOperatorEocTester : public CppUnit :: TestCase tnlApproximationError< MeshType, ExactOperator, ApproximateOperator, - TestFunction > + TestFunction, + ApproximationMethod > ::getError( mesh, exactOperator, approximateOperator, @@ -94,7 +97,8 @@ class tnlPDEOperatorEocTester : public CppUnit :: TestCase tnlApproximationError< MeshType, ExactOperator, ApproximateOperator, - TestFunction > + TestFunction, + ApproximationMethod > ::getError( mesh, exactOperator, approximateOperator, diff --git a/tests/unit-tests/tnlApproximationError.h b/tests/unit-tests/tnlApproximationError.h index 47ad750ceb10c5e5a322d844804e84b43eb34d9a..1c0edc879140b279a446e99ce223761139c57853 100644 --- a/tests/unit-tests/tnlApproximationError.h +++ b/tests/unit-tests/tnlApproximationError.h @@ -19,12 +19,44 @@ #define TNLAPPROXIMATIONERROR_H_ #include <mesh/tnlGrid.h> +#include <functions/tnlConstantFunction.h> +#include <operators/tnlDirichletBoundaryConditions.h> +#include <solvers/pde/tnlExplicitUpdater.h> + +class tnlExplicitApproximation +{ + public: + + static tnlString getType() + { + return tnlString( "tnlExplicitApproximation" ); + }; +}; + +class tnlImplicitApproximation +{ + public: + + static tnlString getType() + { + return tnlString( "tnlImplicitApproximation" ); + }; +}; template< typename Mesh, typename ExactOperator, typename ApproximateOperator, - typename Function > + typename Function, + typename ApproximationMethod > class tnlApproximationError +{ +}; + +template< typename Mesh, + typename ExactOperator, + typename ApproximateOperator, + typename Function > +class tnlApproximationError< Mesh, ExactOperator, ApproximateOperator, Function, tnlExplicitApproximation > { public: @@ -33,6 +65,8 @@ class tnlApproximationError typedef typename MeshType::DeviceType DeviceType; typedef typename MeshType::IndexType IndexType; typedef typename MeshType::VertexType VertexType; + typedef tnlConstantFunction< MeshType::Dimensions, RealType > ConstantFunctionType; + typedef tnlDirichletBoundaryConditions< MeshType, Function > BoundaryConditionsType; static void getError( const Mesh& mesh, const ExactOperator& exactOperator, @@ -43,25 +77,23 @@ class tnlApproximationError RealType& maxErr ); }; -template< int Dimensions, - typename Real, - typename Device, - typename Index, +template< typename Mesh, typename ExactOperator, typename ApproximateOperator, typename Function > -class tnlApproximationError< tnlGrid< Dimensions, Real, Device, Index >, ExactOperator, ApproximateOperator, Function > +class tnlApproximationError< Mesh, ExactOperator, ApproximateOperator, Function, tnlImplicitApproximation > { - public: + public: typedef typename ApproximateOperator::RealType RealType; - typedef tnlGrid< Dimensions, Real, Device, Index > MeshType; + typedef Mesh MeshType; typedef typename MeshType::DeviceType DeviceType; typedef typename MeshType::IndexType IndexType; - typedef typename MeshType::CoordinatesType CoordinatesType; typedef typename MeshType::VertexType VertexType; + typedef tnlConstantFunction< MeshType::Dimensions, RealType > ConstantFunctionType; + typedef tnlDirichletBoundaryConditions< MeshType, ConstantFunctionType > BoundaryConditionsType; - static void getError( const MeshType& mesh, + static void getError( const Mesh& mesh, const ExactOperator& exactOperator, const ApproximateOperator& approximateOperator, const Function& function, @@ -70,8 +102,6 @@ class tnlApproximationError< tnlGrid< Dimensions, Real, Device, Index >, ExactOp RealType& maxErr ); }; - - #include "tnlApproximationError_impl.h" #endif /* TNLAPPROXIMATIONERROR_H_ */ diff --git a/tests/unit-tests/tnlApproximationError_impl.h b/tests/unit-tests/tnlApproximationError_impl.h index f1c8fc1ab864ee66aae6f5b8095fc60465a524f0..1c3879ca663dbe57d892ebc7d38d8f6b462ffd30 100644 --- a/tests/unit-tests/tnlApproximationError_impl.h +++ b/tests/unit-tests/tnlApproximationError_impl.h @@ -21,13 +21,17 @@ #include <mesh/tnlTraversal.h> #include <core/vectors/tnlVector.h> #include <functions/tnlFunctionDiscretizer.h> +#include <matrices/tnlCSRMatrix.h> +#include <matrices/tnlMatrixSetter.h> +#include <solvers/pde/tnlLinearSystemAssembler.h> +#include <operators/tnlExactOperatorEvaluator.h> template< typename Mesh, typename ExactOperator, typename ApproximateOperator, typename Function > void -tnlApproximationError< Mesh, ExactOperator, ApproximateOperator, Function >:: +tnlApproximationError< Mesh, ExactOperator, ApproximateOperator, Function, tnlExplicitApproximation >:: getError( const Mesh& mesh, const ExactOperator& exactOperator, const ApproximateOperator& approximateOperator, @@ -37,39 +41,45 @@ getError( const Mesh& mesh, RealType& maxErr ) { typedef tnlVector< RealType, DeviceType, IndexType > Vector; - Vector functionData, exactData, approximateData; + Vector functionData, exactData, approximateData, aux; const IndexType entities = mesh.getNumberOfCells(); + BoundaryConditionsType boundaryConditions; + ConstantFunctionType zeroFunction; if( ! functionData.setSize( entities ) || ! exactData.setSize( entities ) || - ! approximateData.setSize( entities ) ) + ! approximateData.setSize( entities ) || + ! aux.setSize( entities) ) return; tnlFunctionDiscretizer< Mesh, Function, Vector >::template discretize< 0, 0, 0 >( mesh, function, functionData ); - if( DeviceType::DeviceType == ( int ) tnlHostDevice ) - { - for( IndexType i = 0; i < entities; i++ ) - { - if( ! mesh.isBoundaryCell( i ) ) - { - VertexType v = mesh.getCellCenter( i ); - exactData[ i ] = exactOperator.getValue( function, v ); - approximateData[ i ] = approximateOperator.getValue( mesh, i, functionData ); - } - else exactData[ i ] = approximateData[ i ]; - } - } - if( DeviceType::DeviceType == ( int ) tnlCudaDevice ) - { - // TODO - } + tnlExplicitUpdater< Mesh, Vector, ApproximateOperator, BoundaryConditionsType, ConstantFunctionType > explicitUpdater; + explicitUpdater.template update< Mesh::Dimensions >( 0.0, + mesh, + approximateOperator, + boundaryConditions, + zeroFunction, + functionData, + approximateData ); + tnlExactOperatorEvaluator< Mesh, Vector, ExactOperator, Function, BoundaryConditionsType > operatorEvaluator; + operatorEvaluator.template evaluate< Mesh::Dimensions >( 0.0, mesh, exactOperator, function, boundaryConditions, exactData ); + + /*cout << "Function = " << functionData << endl; + cout << "Approximation = " << approximateData << endl; + cout << "Exact = " << exactData << endl;*/ + + functionData.save( "explicit-function.tnl" ); + approximateData.save( "explicit-approximation.tnl" ); + exactData.save( "explicit-exact.tnl" ); + + l1Err = mesh.getDifferenceLpNorm( exactData, approximateData, ( RealType ) 1.0 ); l2Err = mesh.getDifferenceLpNorm( exactData, approximateData, ( RealType ) 2.0 ); maxErr = mesh.getDifferenceAbsMax( exactData, approximateData ); } -template< int Dimensions, +/*template< int Dimensions, typename Real, typename Device, typename Index, @@ -77,7 +87,7 @@ template< int Dimensions, typename ApproximateOperator, typename Function > void -tnlApproximationError< tnlGrid< Dimensions, Real, Device, Index >, ExactOperator, ApproximateOperator, Function >:: +tnlApproximationError< tnlGrid< Dimensions, Real, Device, Index >, ExactOperator, ApproximateOperator, Function, tnlExplicitApproximation >:: getError( const MeshType& mesh, const ExactOperator& exactOperator, const ApproximateOperator& approximateOperator, @@ -115,10 +125,98 @@ getError( const MeshType& mesh, { // TODO } + cout << "Function = " << functionData << endl; + cout << "Approximation = " << approximateData << endl; + cout << "Exact = " << exactData << endl; + l1Err = mesh.getDifferenceLpNorm( exactData, approximateData, ( RealType ) 1.0 ); l2Err = mesh.getDifferenceLpNorm( exactData, approximateData, ( RealType ) 2.0 ); maxErr = mesh.getDifferenceAbsMax( exactData, approximateData ); -} +}*/ +/**** + * Implicit (matrix) approximation + */ + +template< typename Mesh, + typename ExactOperator, + typename ApproximateOperator, + typename Function > +void +tnlApproximationError< Mesh, ExactOperator, ApproximateOperator, Function, tnlImplicitApproximation >:: +getError( const Mesh& mesh, + const ExactOperator& exactOperator, + const ApproximateOperator& approximateOperator, + const Function& function, + RealType& l1Err, + RealType& l2Err, + RealType& maxErr ) +{ + typedef tnlVector< RealType, DeviceType, IndexType > Vector; + typedef tnlCSRMatrix< RealType, DeviceType, IndexType > MatrixType; + typedef typename MatrixType::RowLengthsVector RowLengthsVectorType; + Vector functionData, exactData, approximateData; + MatrixType matrix; + RowLengthsVectorType rowLengths; + BoundaryConditionsType boundaryConditions; + ConstantFunctionType zeroFunction; + + const IndexType entities = mesh.getNumberOfCells(); + + cerr << "Semi-implicit test " << endl; + + if( ! functionData.setSize( entities ) || + ! exactData.setSize( entities ) || + ! approximateData.setSize( entities ) || + ! rowLengths.setSize( entities ) ) + return; + + tnlFunctionDiscretizer< Mesh, Function, Vector >::template discretize< 0, 0, 0 >( mesh, function, functionData ); + + tnlMatrixSetter< MeshType, ApproximateOperator, BoundaryConditionsType, RowLengthsVectorType > matrixSetter; + matrixSetter.template getRowLengths< Mesh::Dimensions >( mesh, + approximateOperator, + boundaryConditions, + rowLengths ); + matrix.setDimensions( entities, entities ); + if( ! matrix.setRowLengths( rowLengths ) ) + return; + + tnlLinearSystemAssembler< Mesh, Vector, ApproximateOperator, BoundaryConditionsType, ConstantFunctionType, MatrixType > systemAssembler; + systemAssembler.template assembly< Mesh::Dimensions >( 0.0, // time + 1.0, // tau + mesh, + approximateOperator, + boundaryConditions, + zeroFunction, + functionData, + matrix, + approximateData // this has no meaning here + ); + tnlExactOperatorEvaluator< Mesh, Vector, ExactOperator, Function, BoundaryConditionsType > operatorEvaluator; + operatorEvaluator.template evaluate< Mesh::Dimensions >( 0.0, mesh, exactOperator, function, boundaryConditions, exactData ); + + + //cout << "Matrix = " << matrix << endl; + matrix.vectorProduct( functionData, approximateData ); + // TODO: replace this when ,matrix.vectorProduct has multiplicator parameter + for( IndexType i = 0; i < entities; i++ ) + approximateData.setElement( i, -1.0 * approximateData.getElement( i ) ); + + //cout << "Function = " << functionData << endl; + //cout << "Approximation = " << approximateData << endl; + //cout << "Exact = " << exactData << endl; + + + mesh.save( "mesh.tnl" ); + functionData.save( "implicit-function.tnl" ); + approximateData.save( "implicit-approximation.tnl" ); + exactData.save( "implicit-exact.tnl" ); + + + l1Err = mesh.getDifferenceLpNorm( exactData, approximateData, ( RealType ) 1.0 ); + l2Err = mesh.getDifferenceLpNorm( exactData, approximateData, ( RealType ) 2.0 ); + maxErr = mesh.getDifferenceAbsMax( exactData, approximateData ); +} #endif /* TNLAPPROXIMATIONERROR_IMPL_H_ */