Commit 0957c563 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Fixing the code to be compatible with nvcc.

parent 151756a4
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
2015-12-25 Tomas Oberhuber  <tomas.oberhuber@fjfi.cvut.cz>
        * significant changes in grids
            - the central structure is now grid entity rather than grid itself
            - specialization of cells for cross stencils was implemented -- they store indexes of neighbhour cells
            - it currently does not work with nvcc compiler
            - grid traversers takes entity type instead of entity dimensions as a templated argument
        * mesh function was implemented
        * boundary conditions were refactored a simplified
            - there is no need to have analytic and discrete types of boundary conditions
        * tnl-quickstart does not generate correct code now

2012-10-05  Tomas Oberhuber  <tomas.oberhuber@fjfi.cvut.cz>
 
	* src/mesh/detail/container.h:
+2 −0
Original line number Diff line number Diff line
@@ -73,9 +73,11 @@ class tnlMeshFunction : public tnlFunction< Mesh::meshDimensions,
                     const RealType& value );
      
      template< typename EntityType >
      __cuda_callable__
      RealType& operator()( const EntityType& meshEntityIndex );
      
      template< typename EntityType >
      __cuda_callable__
      const RealType& operator()( const EntityType& meshEntityIndex ) const;
            
   protected:
+2 −0
Original line number Diff line number Diff line
@@ -152,6 +152,7 @@ template< typename Mesh,
          int MeshEntityDimensions,
          typename Real >
   template< typename EntityType >
__cuda_callable__
typename tnlMeshFunction< Mesh, MeshEntityDimensions, Real >::RealType& 
tnlMeshFunction< Mesh, MeshEntityDimensions, Real >::
operator()( const EntityType& meshEntity )
@@ -164,6 +165,7 @@ template< typename Mesh,
          int MeshEntityDimensions,
          typename Real >
   template< typename EntityType >
__cuda_callable__
const typename tnlMeshFunction< Mesh, MeshEntityDimensions, Real >::RealType& 
tnlMeshFunction< Mesh, MeshEntityDimensions, Real >::
operator()( const EntityType& meshEntity ) const
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@
#ifdef TEMPLATE_EXPLICIT_INSTANTIATION
#ifdef HAVE_CUDA

#include <functors/tnlTestFunction.h>
#include <functions/tnlTestFunction.h>

template class tnlTestFunction< 1, float, tnlCuda >;
template class tnlTestFunction< 2, float, tnlCuda >;
+1 −1
Original line number Diff line number Diff line
@@ -746,7 +746,7 @@ __global__ void tnlCSRMatrixVectorProductCudaKernel( const tnlCSRMatrix< Real, t
                                                     int gridIdx )
{
   typedef tnlCSRMatrix< Real, tnlCuda, Index > Matrix;
   tnlStaticAssert( Matrix::DeviceType::DeviceType == tnlCudaDevice, );
   static_assert( Matrix::DeviceType::DeviceType == tnlCudaDevice, "" );
   const typename Matrix::IndexType rowIdx = ( gridIdx * tnlCuda::getMaxGridSize() + blockIdx.x ) * blockDim.x + threadIdx.x;
   if( matrix->getCudaKernelType() == Matrix::scalar )
   {
Loading