Loading src/core/tnlSharedPointer.h +5 −6 Original line number Diff line number Diff line Loading @@ -102,7 +102,7 @@ class tnlSharedPointer< Object, tnlHost > : public tnlSmartPointer return *this; } const ThisType& operator=( ThisType&& ptr ) const ThisType& operator=( const ThisType&& ptr ) { if( this-> pointer ) delete this->pointer; Loading Loading @@ -153,7 +153,7 @@ class tnlSharedPointer< Object, tnlCuda > : public tnlSmartPointer typedef Object ObjectType; typedef tnlHost DeviceType; typedef tnlSharedPointer< Object, tnlHost > ThisType; typedef tnlSharedPointer< Object, tnlCuda > ThisType; explicit tnlSharedPointer() : counter( 0 ), cuda_pointer( 0 ), Loading Loading @@ -254,7 +254,6 @@ class tnlSharedPointer< Object, tnlCuda > : public tnlSmartPointer const ThisType& operator=( const ThisType& ptr ) { std::cerr << "Op. = " << std::endl; this->free(); this->pointer = ptr.pointer; this->cuda_pointer = ptr.cuda_pointer; Loading @@ -268,7 +267,7 @@ class tnlSharedPointer< Object, tnlCuda > : public tnlSmartPointer bool synchronize() { #ifdef HAVE_CUDA /*if( this->modified ) if( this->modified ) { std::cerr << "Synchronizing data..." << std::endl; tnlAssert( this->pointer, ); Loading @@ -277,7 +276,7 @@ class tnlSharedPointer< Object, tnlCuda > : public tnlSmartPointer if( ! checkCudaDevice ) return false; return true; }*/ } #else return false; #endif Loading src/mesh/grids/tnlGridTraverser_impl.h +6 −6 Original line number Diff line number Diff line Loading @@ -307,7 +307,7 @@ tnlGridTraverser2D( GridEntity entity( *grid, coordinates, *entityOrientation, *entityBasis ); /*if( entity.getCoordinates().x() <= end->x() && if( entity.getCoordinates().x() <= end->x() && entity.getCoordinates().y() <= end->y() ) { entity.refresh(); Loading @@ -318,7 +318,7 @@ tnlGridTraverser2D( *userData, entity ); } }*/ } } #endif Loading Loading @@ -346,7 +346,7 @@ processEntities( CoordinatesType* kernelEnd = tnlCuda::passToDevice( end ); CoordinatesType* kernelEntityOrientation = tnlCuda::passToDevice( entityOrientation ); CoordinatesType* kernelEntityBasis = tnlCuda::passToDevice( entityBasis ); typename GridEntity::MeshType* kernelGrid = tnlCuda::passToDevice( *gridPointer ); //typename GridEntity::MeshType* kernelGrid = tnlCuda::passToDevice( *gridPointer ); UserData* kernelUserData = tnlCuda::passToDevice( userData ); checkCudaDevice; Loading @@ -358,12 +358,12 @@ processEntities( const IndexType cudaYGrids = tnlCuda::getNumberOfGrids( cudaBlocks.y ); //tnlCuda::synchronizeDevice(); tnlCuda::synchronizeDevice(); for( IndexType gridYIdx = 0; gridYIdx < cudaYGrids; gridYIdx ++ ) for( IndexType gridXIdx = 0; gridXIdx < cudaXGrids; gridXIdx ++ ) tnlGridTraverser2D< Real, Index, GridEntity, UserData, EntitiesProcessor, processOnlyBoundaryEntities > <<< cudaBlocks, cudaBlockSize >>> ( kernelGrid, //&gridPointer.template getData< tnlCuda >(), ( &gridPointer.template getData< tnlCuda >(), kernelUserData, kernelBegin, kernelEnd, Loading @@ -374,7 +374,7 @@ processEntities( cudaThreadSynchronize(); checkCudaDevice; tnlCuda::freeFromDevice( kernelGrid ); //tnlCuda::freeFromDevice( kernelGrid ); tnlCuda::freeFromDevice( kernelBegin ); tnlCuda::freeFromDevice( kernelEnd ); tnlCuda::freeFromDevice( kernelEntityOrientation ); Loading Loading
src/core/tnlSharedPointer.h +5 −6 Original line number Diff line number Diff line Loading @@ -102,7 +102,7 @@ class tnlSharedPointer< Object, tnlHost > : public tnlSmartPointer return *this; } const ThisType& operator=( ThisType&& ptr ) const ThisType& operator=( const ThisType&& ptr ) { if( this-> pointer ) delete this->pointer; Loading Loading @@ -153,7 +153,7 @@ class tnlSharedPointer< Object, tnlCuda > : public tnlSmartPointer typedef Object ObjectType; typedef tnlHost DeviceType; typedef tnlSharedPointer< Object, tnlHost > ThisType; typedef tnlSharedPointer< Object, tnlCuda > ThisType; explicit tnlSharedPointer() : counter( 0 ), cuda_pointer( 0 ), Loading Loading @@ -254,7 +254,6 @@ class tnlSharedPointer< Object, tnlCuda > : public tnlSmartPointer const ThisType& operator=( const ThisType& ptr ) { std::cerr << "Op. = " << std::endl; this->free(); this->pointer = ptr.pointer; this->cuda_pointer = ptr.cuda_pointer; Loading @@ -268,7 +267,7 @@ class tnlSharedPointer< Object, tnlCuda > : public tnlSmartPointer bool synchronize() { #ifdef HAVE_CUDA /*if( this->modified ) if( this->modified ) { std::cerr << "Synchronizing data..." << std::endl; tnlAssert( this->pointer, ); Loading @@ -277,7 +276,7 @@ class tnlSharedPointer< Object, tnlCuda > : public tnlSmartPointer if( ! checkCudaDevice ) return false; return true; }*/ } #else return false; #endif Loading
src/mesh/grids/tnlGridTraverser_impl.h +6 −6 Original line number Diff line number Diff line Loading @@ -307,7 +307,7 @@ tnlGridTraverser2D( GridEntity entity( *grid, coordinates, *entityOrientation, *entityBasis ); /*if( entity.getCoordinates().x() <= end->x() && if( entity.getCoordinates().x() <= end->x() && entity.getCoordinates().y() <= end->y() ) { entity.refresh(); Loading @@ -318,7 +318,7 @@ tnlGridTraverser2D( *userData, entity ); } }*/ } } #endif Loading Loading @@ -346,7 +346,7 @@ processEntities( CoordinatesType* kernelEnd = tnlCuda::passToDevice( end ); CoordinatesType* kernelEntityOrientation = tnlCuda::passToDevice( entityOrientation ); CoordinatesType* kernelEntityBasis = tnlCuda::passToDevice( entityBasis ); typename GridEntity::MeshType* kernelGrid = tnlCuda::passToDevice( *gridPointer ); //typename GridEntity::MeshType* kernelGrid = tnlCuda::passToDevice( *gridPointer ); UserData* kernelUserData = tnlCuda::passToDevice( userData ); checkCudaDevice; Loading @@ -358,12 +358,12 @@ processEntities( const IndexType cudaYGrids = tnlCuda::getNumberOfGrids( cudaBlocks.y ); //tnlCuda::synchronizeDevice(); tnlCuda::synchronizeDevice(); for( IndexType gridYIdx = 0; gridYIdx < cudaYGrids; gridYIdx ++ ) for( IndexType gridXIdx = 0; gridXIdx < cudaXGrids; gridXIdx ++ ) tnlGridTraverser2D< Real, Index, GridEntity, UserData, EntitiesProcessor, processOnlyBoundaryEntities > <<< cudaBlocks, cudaBlockSize >>> ( kernelGrid, //&gridPointer.template getData< tnlCuda >(), ( &gridPointer.template getData< tnlCuda >(), kernelUserData, kernelBegin, kernelEnd, Loading @@ -374,7 +374,7 @@ processEntities( cudaThreadSynchronize(); checkCudaDevice; tnlCuda::freeFromDevice( kernelGrid ); //tnlCuda::freeFromDevice( kernelGrid ); tnlCuda::freeFromDevice( kernelBegin ); tnlCuda::freeFromDevice( kernelEnd ); tnlCuda::freeFromDevice( kernelEntityOrientation ); Loading